summaryrefslogtreecommitdiffstats
path: root/src/event_manager.hpp
diff options
context:
space:
mode:
authorRatan Gupta <ratagupt@in.ibm.com>2017-10-06 21:37:01 +0530
committerRatan Gupta <ratagupt@in.ibm.com>2018-02-23 20:05:18 +0530
commit3e84ec6645bcea669805947f1409b58b4b0d9f72 (patch)
treeff1adf181670223651713503ecc06887f403e821 /src/event_manager.hpp
parentcd22786a280372a2e31c61dffabae204a8ab9d8b (diff)
downloadphosphor-dbus-monitor-3e84ec6645bcea669805947f1409b58b4b0d9f72.tar.gz
phosphor-dbus-monitor-3e84ec6645bcea669805947f1409b58b4b0d9f72.zip
Implement create function in event manager
Implement the logging event interface. Create the dbus event object based on the event type. Change-Id: Idfa9e5c43f170d904fd25f22d73e0509b1785fc9 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
Diffstat (limited to 'src/event_manager.hpp')
-rw-r--r--src/event_manager.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/event_manager.hpp b/src/event_manager.hpp
index 3d1f8d1..7184852 100644
--- a/src/event_manager.hpp
+++ b/src/event_manager.hpp
@@ -1,5 +1,10 @@
#pragma once
+#include "event_entry.hpp"
+
+#include <map>
+#include <memory>
+#include <queue>
#include <sdbusplus/bus.hpp>
namespace phosphor
@@ -24,16 +29,26 @@ class Manager
* @detail Add the objectPath,propertyName, propertyValue
* as additional data of the event object.
* @param[in] eventName - Name of the event.
+ * @param[in] eventMessage - Message for 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& eventMessage,
const std::string& objectPath,
const std::string& propertyName,
const std::string& propertyValue);
+ private:
+ using EventName = std::string;
+ /** @brief Queue of events */
+ using EventQueue = std::queue<std::unique_ptr<Entry>>;
+
+ using EventMap = std::map<EventName, EventQueue>;
+ /** @brief Map of event name and the list of events **/
+ EventMap eventMap;
};
Manager& getManager();
OpenPOWER on IntegriCloud