path: root/src/data_types.hpp
diff options
authorRatan Gupta <>2018-02-21 19:03:13 +0530
committerRatan Gupta <>2018-02-22 21:05:19 +0530
commita45e086dc57f51efb882bf864e78fe678238deea (patch)
tree47099446e3b5f83528435a46af0efc90dd395d2a /src/data_types.hpp
parent882d741c2392e2c37c2fbdaf1207e64ea6dc91a7 (diff)
Add callback contexts
Add the notion of a callback context. This enables callbacks to have logic around the conditions they were invoked in. There are two context on which call back can be invoked 1) Startup: during startup all the call backs will be called 2) Signal: As part of condition match on the watched properties. Callback would behave differently based on the context. eg: eventCallback 1) Startup: Don't take any action. 2) Signal: Create the Dbus Object for the event. Change-Id: If455558798ac3e44bbd8a93de0ce1b09d2e308ae Signed-off-by: Ratan Gupta <>
Diffstat (limited to 'src/data_types.hpp')
1 files changed, 6 insertions, 0 deletions
diff --git a/src/data_types.hpp b/src/data_types.hpp
index 1ba0b8a..12d1d6d 100644
--- a/src/data_types.hpp
+++ b/src/data_types.hpp
@@ -21,6 +21,12 @@ constexpr auto propertyIndex = 2;
constexpr auto valueIndex = 2;
constexpr auto metaIndex = 1;
+enum class Context
/** @brief A map with references as keys. */
template <typename Key, typename Value>
using RefKeyMap = std::map<std::reference_wrapper<Key>, Value, std::less<Key>>;
OpenPOWER on IntegriCloud