control: Add ObjectManager interface

Create the ObjectManager interface on the configured `CONTROL_OBJPATH`
given at configure time which defaults to
`/xyz/openbmc_project/control/thermal`. This is to handle obtaining the
dbus service name regardless if any configured dbus objects(zones)
should be created.

Change-Id: Ie05bc4a1b7bd8aee21df4bf3d38aed1e48be130c
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/json/manager.cpp b/control/json/manager.cpp
index b29c5e9..4ba61e7 100644
--- a/control/json/manager.cpp
+++ b/control/json/manager.cpp
@@ -29,6 +29,7 @@
 
 #include <nlohmann/json.hpp>
 #include <sdbusplus/bus.hpp>
+#include <sdbusplus/server/manager.hpp>
 #include <sdeventplus/event.hpp>
 #include <sdeventplus/utility/timer.hpp>
 
@@ -57,6 +58,7 @@
 
 Manager::Manager(const sdeventplus::Event& event) :
     _bus(util::SDBusPlus::getBus()), _event(event),
+    _mgr(util::SDBusPlus::getBus(), CONTROL_OBJPATH),
     _powerState(std::make_unique<PGoodState>(
         util::SDBusPlus::getBus(),
         std::bind(std::mem_fn(&Manager::powerStateChanged), this,
diff --git a/control/json/manager.hpp b/control/json/manager.hpp
index 1534ab0..ce1c869 100644
--- a/control/json/manager.hpp
+++ b/control/json/manager.hpp
@@ -30,6 +30,7 @@
 #include <nlohmann/json.hpp>
 #include <phosphor-logging/log.hpp>
 #include <sdbusplus/bus.hpp>
+#include <sdbusplus/server/manager.hpp>
 #include <sdeventplus/event.hpp>
 #include <sdeventplus/utility/timer.hpp>
 
@@ -422,16 +423,15 @@
     }
 
   private:
-    /**
-     * The sdbusplus bus object to use
-     */
+    /* The sdbusplus bus object to use */
     sdbusplus::bus::bus& _bus;
 
-    /**
-     * The sdeventplus even loop to use
-     */
+    /* The sdeventplus even loop to use */
     sdeventplus::Event _event;
 
+    /* The sdbusplus manager object to set the ObjectManager interface */
+    sdbusplus::server::manager::manager _mgr;
+
     /* The system's power state determination object */
     std::unique_ptr<PowerState> _powerState;