Use sdbusplus object wrapper
Use sdbusplus::server::object::object to wrap interfaces. This is
the preferred way to ensure created objects emit freedesktop
ObjectManager signals.
Resolves openbmc/openbmc#756
Change-Id: Ia57057e0227ed92bef77f28e42942194f5e802f3
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/manager.hpp b/manager.hpp
index b254719..31ced21 100644
--- a/manager.hpp
+++ b/manager.hpp
@@ -78,6 +78,13 @@
} // namespace holder
} // namespace interface
+
+template <typename T>
+using ServerObject = typename sdbusplus::server::object::object<T>;
+
+using ManagerIface =
+ sdbusplus::server::xyz::openbmc_project::Inventory::Manager;
+
} // namespace details
/** @class Manager
@@ -87,7 +94,7 @@
* DBus API.
*/
class Manager final :
- public sdbusplus::server::xyz::openbmc_project::Inventory::Manager
+ public details::ServerObject<details::ManagerIface>
{
public:
Manager() = delete;