diff options
author | Ratan Gupta <ratagupt@in.ibm.com> | 2017-10-06 21:27:13 +0530 |
---|---|---|
committer | Ratan Gupta <ratagupt@in.ibm.com> | 2018-02-23 20:05:18 +0530 |
commit | cd22786a280372a2e31c61dffabae204a8ab9d8b (patch) | |
tree | 1ce61d893b4f212dca25cca792aa5a5e2035fba1 /src/event_manager.hpp | |
parent | ef69ac02f480902f61869ea4d2c08f6aa786786b (diff) | |
download | phosphor-dbus-monitor-cd22786a280372a2e31c61dffabae204a8ab9d8b.tar.gz phosphor-dbus-monitor-cd22786a280372a2e31c61dffabae204a8ab9d8b.zip |
Implement event manager class
On handling of property change event, If callback is
of type event then event manager would be asked to create
the event dbus objects.
Change-Id: I7f1d365d7f44a1cca54516e9ef555bb132d6b063
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
Diffstat (limited to 'src/event_manager.hpp')
-rw-r--r-- | src/event_manager.hpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/event_manager.hpp b/src/event_manager.hpp new file mode 100644 index 0000000..3d1f8d1 --- /dev/null +++ b/src/event_manager.hpp @@ -0,0 +1,42 @@ +#pragma once + +#include <sdbusplus/bus.hpp> + +namespace phosphor +{ +namespace events +{ + +/** @class Manager + * @brief OpenBMC Event manager implementation. + */ +class Manager +{ + public: + Manager() = default; + Manager(const Manager&) = delete; + Manager& operator=(const Manager&) = delete; + Manager(Manager&&) = default; + Manager& operator=(Manager&&) = default; + virtual ~Manager() = default; + + /** @brief Create the D-Bus Event object. + * @detail Add the objectPath,propertyName, propertyValue + * as additional data of the event object. + * @param[in] eventName - Name of the event. + * @param[in] objectPath - Path of the D-Bus object. + * @param[in] propertyName - Name of the property. + * @param[in] propertyValue - Value of the property. + */ + void create( + const std::string& eventName, + const std::string& objectPath, + const std::string& propertyName, + const std::string& propertyValue); + +}; + +Manager& getManager(); + +} // namespace events +} // namespace phosphor |