Removed dependency to TriggerManager
introduces Messanger class which allows to send messages directly to
subscribed targets, which allows to break dependencies between classes.
Testes:
- All unit tests are passing
- Links are correctly updated
- Report is correctly updated by Trigger Action
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: I32d3aaba22f9ec07e611f53fe553bd27e1c04c6d
diff --git a/src/report_manager.hpp b/src/report_manager.hpp
index 85fbfa9..96e7cab 100644
--- a/src/report_manager.hpp
+++ b/src/report_manager.hpp
@@ -22,8 +22,7 @@
ReportManager(
std::unique_ptr<interfaces::ReportFactory> reportFactory,
std::unique_ptr<interfaces::JsonStorage> reportStorage,
- const std::shared_ptr<sdbusplus::asio::object_server>& objServer,
- std::unique_ptr<interfaces::TriggerManager>& triggerManager);
+ const std::shared_ptr<sdbusplus::asio::object_server>& objServer);
~ReportManager() = default;
ReportManager(const ReportManager&) = delete;
@@ -32,10 +31,6 @@
ReportManager& operator=(ReportManager&&) = delete;
void removeReport(const interfaces::Report* report) override;
- void updateReport(const std::string& id) override;
- void updateTriggerIds(const std::string& reportId,
- const std::string& triggerId,
- TriggerIdUpdate updateType) override;
private:
std::unique_ptr<interfaces::ReportFactory> reportFactory;
@@ -43,7 +38,6 @@
std::shared_ptr<sdbusplus::asio::object_server> objServer;
std::unique_ptr<sdbusplus::asio::dbus_interface> reportManagerIface;
std::vector<std::unique_ptr<interfaces::Report>> reports;
- std::unique_ptr<interfaces::TriggerManager>& triggerManager;
void verifyAddReport(
const std::string& reportId, const std::string& reportName,