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.hpp b/src/report.hpp
index 98097ae..3e649fd 100644
--- a/src/report.hpp
+++ b/src/report.hpp
@@ -17,6 +17,7 @@
 
 #include <chrono>
 #include <memory>
+#include <unordered_set>
 
 class Report : public interfaces::Report
 {
@@ -30,7 +31,8 @@
            interfaces::ReportManager& reportManager,
            interfaces::JsonStorage& reportStorage,
            std::vector<std::shared_ptr<interfaces::Metric>> metrics,
-           const bool enabled, std::unique_ptr<interfaces::Clock> clock);
+           const bool enabled, std::unique_ptr<interfaces::Clock> clock,
+           const std::vector<std::string>& triggerIds);
 
     Report(const Report&) = delete;
     Report(Report&&) = delete;
@@ -48,6 +50,8 @@
     }
 
     void updateReadings() override;
+    void updateTriggerIds(const std::string& triggerId,
+                          TriggerIdUpdate updateType) override;
     bool storeConfiguration() const;
 
   private:
@@ -81,6 +85,7 @@
     std::unique_ptr<sdbusplus::asio::dbus_interface> deleteIface;
     std::vector<std::shared_ptr<interfaces::Metric>> metrics;
     boost::asio::steady_timer timer;
+    std::unordered_set<std::string> triggerIds;
 
     interfaces::JsonStorage& reportStorage;
     bool enabled;