Implement event manager class

On handling of property change event, If callback is
of type event then event manager would be asked to create
the event dbus objects.

Change-Id: I7f1d365d7f44a1cca54516e9ef555bb132d6b063
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/src/main.cpp b/src/main.cpp
index 08cd849..5e191e1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -13,8 +13,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include "sdbusplus.hpp"
+
+#include "config.h"
 #include "generated.hpp"
+#include "sdbusplus.hpp"
+
+#include <sdbusplus/bus.hpp>
+#include <sdbusplus/server/manager.hpp>
 
 using namespace phosphor::dbus::monitoring;
 
@@ -32,6 +37,12 @@
 
 int main(void)
 {
+    auto& bus = SDBusPlus::getBus();
+
+    // Add sdbusplus Object Manager for the 'root' path of events.
+    sdbusplus::server::manager::manager objManager(bus, OBJ_EVENT);
+    bus.request_name(BUSNAME_EVENT);
+
     for (auto& watch : ConfigPropertyWatches::get())
     {
         watch->start();