summaryrefslogtreecommitdiffstats
path: root/elog_entry.hpp
diff options
context:
space:
mode:
authorDeepak Kodihalli <dkodihal@in.ibm.com>2017-06-12 04:33:29 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-06-26 02:33:34 +0000
commit72654f10e45056ab55b77d835e2bfd01e8d98480 (patch)
treea81c82f786690244abf0a8be2185e6c775cabac5 /elog_entry.hpp
parent979632aeb629b4cb62aed276f7422c34cd7983bc (diff)
downloadphosphor-logging-72654f10e45056ab55b77d835e2bfd01e8d98480.tar.gz
phosphor-logging-72654f10e45056ab55b77d835e2bfd01e8d98480.zip
Persist error d-bus objects
Use Cereal to implement serialization and de-serialization of properties of error d-bus objects. Serialize and persist error d-bus objects as they are put on the bus. De-serialize and restore them (if persistent ones exist) when phosphor-log-manager starts up. Change-Id: I1f5df1abbe74bfdb86e3e82a78ff7115e90e2112 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Diffstat (limited to 'elog_entry.hpp')
-rw-r--r--elog_entry.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/elog_entry.hpp b/elog_entry.hpp
index 06f6bc2..ffff8af 100644
--- a/elog_entry.hpp
+++ b/elog_entry.hpp
@@ -75,6 +75,24 @@ class Entry : public EntryIfaces
this->emit_object_added();
};
+ /** @brief Constructor that puts an "empty" error object on the bus,
+ * with only the id property populated. Rest of the properties
+ * to be set by the caller. Caller should emit the added signal.
+ * @param[in] bus - Bus to attach to.
+ * @param[in] path - Path to attach at.
+ * @param[in] id - The error entry id.
+ * @param[in] parent - The error's parent.
+ */
+ Entry(sdbusplus::bus::bus& bus,
+ const std::string& path,
+ uint32_t entryId,
+ Manager& parent) :
+ EntryIfaces(bus, path.c_str(), true),
+ parent(parent)
+ {
+ id(entryId);
+ };
+
/** @brief Set resolution status of the error.
* @param[in] value - boolean indicating resolution
* status (true = resolved)
@@ -89,6 +107,8 @@ class Entry : public EntryIfaces
return sdbusplus::xyz::openbmc_project::
Logging::server::Entry::resolved(value);
}
+ using sdbusplus::xyz::openbmc_project::
+ Logging::server::Entry::resolved;
/** @brief Delete this d-bus object.
*/
OpenPOWER on IntegriCloud