control: Timers no longer need the zone and group
The zones and groups used by actions run from timers are stored directly
in each action, so they are no longer required to be packaged in the
timer's data.
Change-Id: I9e9b2a1830bdb54fdac00fb12c38e25a699658b2
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/json/manager.cpp b/control/json/manager.cpp
index d02f0f5..b0dc6e3 100644
--- a/control/json/manager.cpp
+++ b/control/json/manager.cpp
@@ -192,9 +192,7 @@
std::get<std::vector<std::unique_ptr<ActionBase>>&>(data.second);
// Perform the actions in the timer data
std::for_each(actions.begin(), actions.end(),
- [zone = std::ref(std::get<Zone&>(data.second)),
- group = std::cref(std::get<const Group&>(data.second))](
- auto& action) { action->run(); });
+ [](auto& action) { action->run(); });
// Remove oneshot timers after they expired
if (data.first == TimerType::oneshot)
diff --git a/control/json/manager.hpp b/control/json/manager.hpp
index d6a4499..eab11a6 100644
--- a/control/json/manager.hpp
+++ b/control/json/manager.hpp
@@ -54,13 +54,11 @@
* Package of data required when a timer expires
* Tuple constructed of:
* std::string = Timer package unique identifier
- * Zone = Zone object to run the actions against
- * Group = Group of dbus objects for the actions
* std::vector<std::unique_ptr<ActionBase>> = List of pointers to actions
* that run when the timer expires
*/
-using TimerPkg = std::tuple<std::string, Zone&, const Group&,
- std::vector<std::unique_ptr<ActionBase>>&>;
+using TimerPkg =
+ std::tuple<std::string, std::vector<std::unique_ptr<ActionBase>>&>;
/**
* Data associated with a running timer that's used when it expires
* Pair constructed of: