presence: Add sensor to redundancy policy api
Include a reference to the sensor changing state when sensor
implementations ping the policy object.
This allows policy logic based on multiple sensors, simultaneously.
Change-Id: I44cf00c7ecd220d0cc99e51ca6093bac6da7343c
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/presence/rpolicy.hpp b/presence/rpolicy.hpp
index 34beb77..8f7db3e 100644
--- a/presence/rpolicy.hpp
+++ b/presence/rpolicy.hpp
@@ -9,6 +9,8 @@
namespace presence
{
+class PresenceSensor;
+
/**
* @class RedundancyPolicy
* @brief Redundancy policy interface.
@@ -44,8 +46,9 @@
* the inventory and execute their policy logic.
*
* @param[in] present - The new state of the sensor.
+ * @param[in] sensor - The sensor that changed state.
*/
- virtual void stateChanged(bool present) = 0;
+ virtual void stateChanged(bool present, PresenceSensor& sensor) = 0;
/**
* @brief monitor