Initial phosphor-state-manager commit
Still a lot of work to come with this one but this is the
initial makefile and building of a basic application
that provides dbus introspection and properties of
the xyz/openbmc_project/State/Host.interface.yaml
Change-Id: I406fafa6a50721b2f28ab6df03ef98a940e2db6e
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
diff --git a/host_state_manager_main.cpp b/host_state_manager_main.cpp
new file mode 100644
index 0000000..07314e1
--- /dev/null
+++ b/host_state_manager_main.cpp
@@ -0,0 +1,26 @@
+#include <cstdlib>
+#include <iostream>
+#include <exception>
+#include <sdbusplus/bus.hpp>
+#include "config.h"
+#include "host_state_manager.hpp"
+
+int main(int argc, char *argv[])
+{
+ auto bus = sdbusplus::bus::new_default();
+
+ phosphor::state::manager::Host manager(bus,
+ BUSNAME,
+ OBJPATH);
+ // Add sdbusplus ObjectManager.
+ sdbusplus::server::manager::manager objManager(bus, OBJPATH);
+
+ bus.request_name(BUSNAME);
+
+ while(true)
+ {
+ bus.process_discard();
+ bus.wait();
+ }
+ return 0;
+}