From cd22786a280372a2e31c61dffabae204a8ab9d8b Mon Sep 17 00:00:00 2001 From: Ratan Gupta Date: Fri, 6 Oct 2017 21:27:13 +0530 Subject: 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 --- src/event_manager.hpp | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/event_manager.hpp (limited to 'src/event_manager.hpp') 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 + +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 -- cgit v1.2.1