diff options
| author | Deepak Kodihalli <dkodihal@in.ibm.com> | 2017-02-27 00:47:12 -0600 |
|---|---|---|
| committer | Deepak Kodihalli <dkodihal@in.ibm.com> | 2017-03-15 09:20:14 -0500 |
| commit | b388da6553fac65a50ce02ca4d87b31fb5c9faeb (patch) | |
| tree | 1aac6fb762b248c5105bff26579a8c85ecf44af3 | |
| parent | 867f7aa7098ebcc3f62fec7faa6121390d1bd055 (diff) | |
| download | phosphor-logging-b388da6553fac65a50ce02ca4d87b31fb5c9faeb.tar.gz phosphor-logging-b388da6553fac65a50ce02ca4d87b31fb5c9faeb.zip | |
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 <dkodihal@in.ibm.com>
| -rw-r--r-- | Makefile.am | 3 | ||||
| -rw-r--r-- | 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 <sdbusplus/bus.hpp> #include <sdbusplus/server/object.hpp> #include "xyz/openbmc_project/Logging/Entry/server.hpp" +#include "org/openbmc/Associations/server.hpp" namespace phosphor { namespace logging { -namespace details -{ - -template <typename T> -using ServerObject = typename sdbusplus::server::object::object<T>; - -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<details::EntryIface> +class Entry : public EntryIfaces { public: Entry() = delete; @@ -52,8 +48,7 @@ class Entry : public details::ServerObject<details::EntryIface> Level severityErr, std::string&& msgErr, std::vector<std::string>&& additionalDataErr) : - details::ServerObject<details::EntryIface> - (bus, path.c_str(), true) + EntryIfaces(bus, path.c_str(), true) { id(idErr); severity(severityErr); |

