Remove set speed event
Allows the complete removal of a set speed event from the zone. This is
done when any precondition defined for the event to be active is not
met any longer.
Change-Id: Idbec357f76f0fd7db9107e8c9d3e00461872c528
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/zone.hpp b/control/zone.hpp
index f618c10..32707cb 100644
--- a/control/zone.hpp
+++ b/control/zone.hpp
@@ -3,7 +3,6 @@
#include <vector>
#include <algorithm>
#include <sdbusplus/bus.hpp>
-#include <sdbusplus/server.hpp>
#include "fan.hpp"
#include "types.hpp"
#include "timer.hpp"
@@ -142,6 +141,13 @@
void initEvent(const SetSpeedEvent& event);
/**
+ * @brief Removes all the set speed event properties and actions
+ *
+ * @param[in] event - Set speed event
+ */
+ void removeEvent(const SetSpeedEvent& event);
+
+ /**
* @brief Get the default floor speed
*
* @return - The defined default floor speed
@@ -342,14 +348,9 @@
std::map<const Group*, bool> _active;
/**
- * @brief List of signal event arguments
+ * @brief List of signal event arguments and Dbus matches for callbacks
*/
- std::vector<std::unique_ptr<EventData>> _signalEvents;
-
- /**
- * @brief list of Dbus matches for callbacks
- */
- std::vector<sdbusplus::server::match::match> _matches;
+ std::vector<SignalEvent> _signalEvents;
/**
* @brief Refresh the given property's cached value