From b388da6553fac65a50ce02ca4d87b31fb5c9faeb Mon Sep 17 00:00:00 2001 From: Deepak Kodihalli Date: Mon, 27 Feb 2017 00:47:12 -0600 Subject: Entry: implement org.openbmc.Associations API Have the Entry object implement the org.openbmc.Associations DBus API in order to add inventory callouts to errors. Change-Id: I9c645c90e3de4601cdbb020b591f5da24c733613 Signed-off-by: Deepak Kodihalli --- Makefile.am | 3 ++- elog_entry.hpp | 21 ++++++++------------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Makefile.am b/Makefile.am index dae8b7a..7623ce5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -31,7 +31,8 @@ phosphor_log_manager_SOURCES = \ xyz/openbmc_project/Logging/Internal/Manager/server.cpp \ log_manager.cpp \ log_manager_main.cpp \ - elog_entry.cpp + elog_entry.cpp \ + org.openbmc.Associations.cpp # Be sure to build needed files before compiling BUILT_SOURCES = \ diff --git a/elog_entry.hpp b/elog_entry.hpp index 76e51cf..5968145 100644 --- a/elog_entry.hpp +++ b/elog_entry.hpp @@ -3,28 +3,24 @@ #include #include #include "xyz/openbmc_project/Logging/Entry/server.hpp" +#include "org/openbmc/Associations/server.hpp" namespace phosphor { namespace logging { -namespace details -{ - -template -using ServerObject = typename sdbusplus::server::object::object; - -using EntryIface = - sdbusplus::xyz::openbmc_project::Logging::server::Entry; -} // namespace details +using EntryIfaces = sdbusplus::server::object::object< + sdbusplus::xyz::openbmc_project::Logging::server::Entry, + sdbusplus::org::openbmc::server::Associations>; /** @class Entry * @brief OpenBMC logging entry implementation. * @details A concrete implementation for the - * xyz.openbmc_project.Logging.Entry DBus API. + * xyz.openbmc_project.Logging.Entry and + * org.openbmc.Associations DBus APIs. */ -class Entry : public details::ServerObject +class Entry : public EntryIfaces { public: Entry() = delete; @@ -52,8 +48,7 @@ class Entry : public details::ServerObject Level severityErr, std::string&& msgErr, std::vector&& additionalDataErr) : - details::ServerObject - (bus, path.c_str(), true) + EntryIfaces(bus, path.c_str(), true) { id(idErr); severity(severityErr); -- cgit v1.2.3