Add base support for BMC code management
This is the starting code needed to build the application.
Change-Id: Ied9beee1ea4f12805622c17c99c01b89c3f74d50
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/version_software_manager.hpp b/version_software_manager.hpp
new file mode 100644
index 0000000..45d9d82
--- /dev/null
+++ b/version_software_manager.hpp
@@ -0,0 +1,53 @@
+#pragma once
+#include <iostream>
+
+#include <sdbusplus/bus.hpp>
+#include "xyz/openbmc_project/Software/Version/server.hpp"
+
+namespace phosphor
+{
+namespace software
+{
+namespace manager
+{
+
+/** @class Version
+ * @brief OpenBMC version software management implementation.
+ * @details A concrete implementation for xyz.openbmc_project.Software.Version
+ * DBus API.
+ */
+class Version : public sdbusplus::server::object::object<
+ sdbusplus::xyz::openbmc_project::Software::server::Version>
+{
+ public:
+ /** @brief Constructs Version Software Manager
+ *
+ * @param[in] bus - The Dbus bus object
+ * @param[in] objPath - The Dbus object path
+ */
+ Version(sdbusplus::bus::bus& bus,
+ const char* objPath) :
+ sdbusplus::server::object::object<
+ sdbusplus::xyz::openbmc_project::Software::server::Version>
+ (bus, (std::string{objPath} + '/' +
+ getId()).c_str()) {};
+
+ private:
+ /**
+ * @brief Get the code version identifier.
+ *
+ * @return The version identifier.
+ **/
+ const std::string getVersion() const;
+
+ /**
+ * @brief Get the Software Version id.
+ *
+ * @return The id.
+ **/
+ const std::string getId() const;
+};
+
+} // namespace manager
+} // namespace software
+} // namespace phosphor