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>
diff --git a/Makefile.am b/Makefile.am
index dae8b7a..7623ce5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -31,7 +31,8 @@
 	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 @@
               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);