diff options
author | Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> | 2017-10-18 01:41:51 -0500 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-04-11 05:05:20 +0000 |
commit | 6524b9d8385919276d21471bec4352b00146c2d0 (patch) | |
tree | 6e6097c7c798ef96cd03b2864a8de908606925ca /src/event_entry.hpp | |
parent | 06fdaff4bbfadf84123d5275433318e82643807a (diff) | |
download | phosphor-dbus-monitor-6524b9d8385919276d21471bec4352b00146c2d0.tar.gz phosphor-dbus-monitor-6524b9d8385919276d21471bec4352b00146c2d0.zip |
Add persistency for events
Persist event D-bus objects using cereal
Resolves openbmc/openbmc#2319
Change-Id: Ifa15d944fe1d1026761f65eeb647dcbdf6afdba0
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Diffstat (limited to 'src/event_entry.hpp')
-rw-r--r-- | src/event_entry.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/event_entry.hpp b/src/event_entry.hpp index e39f1e2..899e5ec 100644 --- a/src/event_entry.hpp +++ b/src/event_entry.hpp @@ -50,6 +50,17 @@ class Entry : public EntryIface this->emit_object_added(); } + /** @brief Constructor to create an empty event object with only + * timestamp, caller should make a call to emit added signal. + * @param[in] path - Path to attach at. + * @param[in] timestamp - timestamp when the event created. + */ + Entry(const std::string& path, uint64_t eventTimestamp) : + EntryIface(SDBusPlus::getBus(), path.c_str(), true), objectPath(path) + { + timestamp(eventTimestamp); + } + /** @brief Path of Object. */ std::string objectPath; }; |