Create a DBus notification for each LogEntry
For each log entry, a new FilePath DBus object will be created where
the FilePath.path value is the location of the JSON LogEntry file.
Tested:
Tested with unit tests and locally on a machine.
Signed-off-by: Kasun Athukorala <kasunath@google.com>
Change-Id: I5999826f7b4447bfca88b83c487d7c03a1c84a08
diff --git a/include/rde/external_storer_file.hpp b/include/rde/external_storer_file.hpp
index 3d12dc9..f6a6281 100644
--- a/include/rde/external_storer_file.hpp
+++ b/include/rde/external_storer_file.hpp
@@ -2,6 +2,7 @@
#include "external_storer_interface.hpp"
#include "nlohmann/json.hpp"
+#include "notifier_dbus_handler.hpp"
#include <boost/uuid/uuid_generators.hpp>
@@ -75,21 +76,24 @@
/**
* @brief Constructor for the ExternalStorerFileInterface.
*
+ * @param[in] bus - bus to attach to.
* @param[in] rootPath - root path for creating redfish folders.
* Eg: "/run/bmcweb"
* @param[in] fileHandler - an ExternalStorerFileWriter object. This class
* will take the ownership of this object.
*/
ExternalStorerFileInterface(
- std::string_view rootPath,
+ sdbusplus::bus::bus& bus, std::string_view rootPath,
std::unique_ptr<FileHandlerInterface> fileHandler);
bool publishJson(std::string_view jsonStr) override;
private:
+ sdbusplus::bus::bus& bus;
std::string rootPath;
std::unique_ptr<FileHandlerInterface> fileHandler;
std::string logServiceId;
+ std::unique_ptr<CperFileNotifierHandler> cperNotifier;
boost::uuids::random_generator randomGen;
/**