Gunnar Mills | 01a323b | 2017-01-18 09:48:13 -0600 | [diff] [blame^] | 1 | #pragma once |
| 2 | #include <iostream> |
| 3 | |
| 4 | #include <sdbusplus/bus.hpp> |
| 5 | #include "xyz/openbmc_project/Software/Version/server.hpp" |
| 6 | |
| 7 | namespace phosphor |
| 8 | { |
| 9 | namespace software |
| 10 | { |
| 11 | namespace manager |
| 12 | { |
| 13 | |
| 14 | /** @class Version |
| 15 | * @brief OpenBMC version software management implementation. |
| 16 | * @details A concrete implementation for xyz.openbmc_project.Software.Version |
| 17 | * DBus API. |
| 18 | */ |
| 19 | class Version : public sdbusplus::server::object::object< |
| 20 | sdbusplus::xyz::openbmc_project::Software::server::Version> |
| 21 | { |
| 22 | public: |
| 23 | /** @brief Constructs Version Software Manager |
| 24 | * |
| 25 | * @param[in] bus - The Dbus bus object |
| 26 | * @param[in] objPath - The Dbus object path |
| 27 | */ |
| 28 | Version(sdbusplus::bus::bus& bus, |
| 29 | const char* objPath) : |
| 30 | sdbusplus::server::object::object< |
| 31 | sdbusplus::xyz::openbmc_project::Software::server::Version> |
| 32 | (bus, (std::string{objPath} + '/' + |
| 33 | getId()).c_str()) {}; |
| 34 | |
| 35 | private: |
| 36 | /** |
| 37 | * @brief Get the code version identifier. |
| 38 | * |
| 39 | * @return The version identifier. |
| 40 | **/ |
| 41 | const std::string getVersion() const; |
| 42 | |
| 43 | /** |
| 44 | * @brief Get the Software Version id. |
| 45 | * |
| 46 | * @return The id. |
| 47 | **/ |
| 48 | const std::string getId() const; |
| 49 | }; |
| 50 | |
| 51 | } // namespace manager |
| 52 | } // namespace software |
| 53 | } // namespace phosphor |