Refactor: Move isPoweredOn to utility

The check of power on will be used by other components, so move it to
utility.
There are several constexpr definitions are used by multiple components,
move them into types.hpp so that we do not have duplicated constexprs.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I42ad142d6e7ae8da9c0cf6d8f5cb21dee229eba2
diff --git a/types.hpp b/types.hpp
new file mode 100644
index 0000000..90b5c6a
--- /dev/null
+++ b/types.hpp
@@ -0,0 +1,22 @@
+#pragma once
+
+/* const expressions shared in this repository */
+
+constexpr auto ASSOCIATION_IFACE = "xyz.openbmc_project.Association";
+constexpr auto LOGGING_IFACE = "xyz.openbmc_project.Logging.Entry";
+constexpr auto INVENTORY_IFACE = "xyz.openbmc_project.Inventory.Item";
+constexpr auto POWER_IFACE = "org.openbmc.control.Power";
+constexpr auto INVENTORY_MGR_IFACE = "xyz.openbmc_project.Inventory.Manager";
+constexpr auto ASSET_IFACE = "xyz.openbmc_project.Inventory.Decorator.Asset";
+constexpr auto VERSION_IFACE = "xyz.openbmc_project.Software.Version";
+
+constexpr auto ENDPOINTS_PROP = "endpoints";
+constexpr auto MESSAGE_PROP = "Message";
+constexpr auto RESOLVED_PROP = "Resolved";
+constexpr auto PRESENT_PROP = "Present";
+constexpr auto VERSION_PURPOSE_PROP = "Purpose";
+
+constexpr auto INVENTORY_OBJ_PATH = "/xyz/openbmc_project/inventory";
+constexpr auto POWER_OBJ_PATH = "/org/openbmc/control/power0";
+
+constexpr auto INPUT_HISTORY = "input_history";