control: Provide pointer to manager object to events
To setup triggers on events, a pointer to the manager where service and
property states are stored is needed.
Change-Id: Ic6e2ca81c83f4cfacf01b9cb09b08c9f50f35cb6
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/json/event.cpp b/control/json/event.cpp
index 3db50aa..31db75f 100644
--- a/control/json/event.cpp
+++ b/control/json/event.cpp
@@ -35,11 +35,11 @@
using json = nlohmann::json;
using namespace phosphor::logging;
-Event::Event(const json& jsonObj, sdbusplus::bus::bus& bus,
+Event::Event(const json& jsonObj, sdbusplus::bus::bus& bus, Manager* mgr,
std::map<configKey, std::unique_ptr<Group>>& groups,
std::map<configKey, std::unique_ptr<Zone>>& zones) :
ConfigBase(jsonObj),
- _bus(bus), _zones(zones)
+ _bus(bus), _manager(mgr), _zones(zones)
{
// Event could have a precondition
if (!jsonObj.contains("precondition"))