Entry ctor: accept associations
Pass a list of associations to the Entry ctor. This enables to create
associations between the error object and other objects, if such
associations exist.
Change-Id: I88a517efc0ead0a62b2e6558822d94b8fc1c6070
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/elog_entry.hpp b/elog_entry.hpp
index 5968145..79ddf00 100644
--- a/elog_entry.hpp
+++ b/elog_entry.hpp
@@ -14,6 +14,9 @@
sdbusplus::xyz::openbmc_project::Logging::server::Entry,
sdbusplus::org::openbmc::server::Associations>;
+using AssociationList =
+ std::vector<std::tuple<std::string, std::string, std::string>>;
+
/** @class Entry
* @brief OpenBMC logging entry implementation.
* @details A concrete implementation for the
@@ -47,7 +50,8 @@
uint64_t timestampErr,
Level severityErr,
std::string&& msgErr,
- std::vector<std::string>&& additionalDataErr) :
+ std::vector<std::string>&& additionalDataErr,
+ AssociationList&& objects) :
EntryIfaces(bus, path.c_str(), true)
{
id(idErr);
@@ -55,6 +59,7 @@
timestamp(timestampErr);
message(std::move(msgErr));
additionalData(std::move(additionalDataErr));
+ associations(std::move(objects));
// Emit deferred signal.
this->emit_object_added();