Initial chassis state management code
This is just the basics to get the generated code
compiling and to verify the basic dbus interfaces.
Change-Id: I335964da456d8173e2ce792c6614770da43303b4
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
diff --git a/chassis_state_manager.hpp b/chassis_state_manager.hpp
new file mode 100644
index 0000000..f3df078
--- /dev/null
+++ b/chassis_state_manager.hpp
@@ -0,0 +1,50 @@
+#pragma once
+
+#include <sdbusplus/bus.hpp>
+#include "xyz/openbmc_project/State/Chassis/server.hpp"
+
+namespace phosphor
+{
+namespace state
+{
+namespace manager
+{
+
+/** @class Chassis
+ * @brief OpenBMC chassis state management implementation.
+ * @details A concrete implementation for xyz.openbmc_project.State.Chassis
+ * DBus API.
+ */
+class Chassis : public sdbusplus::server::object::object<
+ sdbusplus::xyz::openbmc_project::State::server::Chassis>
+{
+ public:
+ /** @brief Constructs Chassis State Manager
+ *
+ * @param[in] bus - The Dbus bus object
+ * @param[in] busName - The Dbus name to own
+ * @param[in] objPath - The Dbus object path
+ */
+ Chassis(sdbusplus::bus::bus& bus,
+ const char* busName,
+ const char* objPath) :
+ sdbusplus::server::object::object<
+ sdbusplus::xyz::openbmc_project::State::server::Chassis>(
+ bus, objPath),
+ bus(bus)
+ {}
+
+ /** @brief Set value of RequestedPowerTransition */
+ Transition requestedPowerTransition(Transition value) override;
+
+ /** @brief Set value of CurrentPowerState */
+ PowerState currentPowerState(PowerState value) override;
+
+ private:
+ /** @brief Persistent sdbusplus DBus connection. */
+ sdbusplus::bus::bus& bus;
+};
+
+} // namespace manager
+} // namespace state
+} // namespace phosphor