Report: Add TriggerIds property

This change is adding TriggerIds property for Report interface. It is an
array of strings, each representing id of trigger which may update given
report Readings property, due to UpdateReport action. This properly is
read-only, but it can be changed in the runtime, when:
- New Trigger is made using AddTrigger dbus method, when ReportId
  argument contains id of given report.
- Trigger is deleted from dbus, and its ReportNames property included id
  of given report.
- ReportNames property of any trigger is updated to include (or not) id
  of given report.

When this property is modified by service, signal will be emitted on
dbus for property change.

When there is existing trigger with id of non-existing report in its
ReportNames property, its id will be added to TriggerIds property of
such report, the moment it is created by user.

Testing done:
- new UTs were made, all UTs are passing.
- manual testing on dbus interface was successful.

Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
Change-Id: I1c4c94ce751ddaee001e3cadde3ea60aa8e1c224
diff --git a/src/report_manager.hpp b/src/report_manager.hpp
index 93b2986..85fbfa9 100644
--- a/src/report_manager.hpp
+++ b/src/report_manager.hpp
@@ -4,6 +4,7 @@
 #include "interfaces/report.hpp"
 #include "interfaces/report_factory.hpp"
 #include "interfaces/report_manager.hpp"
+#include "interfaces/trigger_manager.hpp"
 #include "report.hpp"
 
 #include <systemd/sd-bus-protocol.h>
@@ -21,7 +22,8 @@
     ReportManager(
         std::unique_ptr<interfaces::ReportFactory> reportFactory,
         std::unique_ptr<interfaces::JsonStorage> reportStorage,
-        const std::shared_ptr<sdbusplus::asio::object_server>& objServer);
+        const std::shared_ptr<sdbusplus::asio::object_server>& objServer,
+        std::unique_ptr<interfaces::TriggerManager>& triggerManager);
     ~ReportManager() = default;
 
     ReportManager(const ReportManager&) = delete;
@@ -31,6 +33,9 @@
 
     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;
@@ -38,6 +43,7 @@
     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,