Adriana Kobylak | 2d8fa22 | 2017-03-15 12:34:32 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <sdbusplus/bus.hpp> |
| 4 | #include <xyz/openbmc_project/Software/Activation/server.hpp> |
Adriana Kobylak | ea9626f | 2017-04-05 15:37:40 -0500 | [diff] [blame] | 5 | #include <xyz/openbmc_project/Software/ActivationBlocksTransition/server.hpp> |
Adriana Kobylak | 2d8fa22 | 2017-03-15 12:34:32 -0500 | [diff] [blame] | 6 | |
| 7 | namespace openpower |
| 8 | { |
| 9 | namespace software |
| 10 | { |
Adriana Kobylak | befe5ce | 2017-04-05 15:57:44 -0500 | [diff] [blame] | 11 | namespace updater |
Adriana Kobylak | 2d8fa22 | 2017-03-15 12:34:32 -0500 | [diff] [blame] | 12 | { |
| 13 | |
| 14 | using ActivationInherit = sdbusplus::server::object::object< |
| 15 | sdbusplus::xyz::openbmc_project::Software::server::Activation>; |
Adriana Kobylak | ea9626f | 2017-04-05 15:37:40 -0500 | [diff] [blame] | 16 | using ActivationBlocksTransitionInherit = sdbusplus::server::object::object< |
| 17 | sdbusplus::xyz::openbmc_project::Software::server::ActivationBlocksTransition>; |
Adriana Kobylak | 2d8fa22 | 2017-03-15 12:34:32 -0500 | [diff] [blame] | 18 | |
| 19 | /** @class Activation |
| 20 | * @brief OpenBMC activation software management implementation. |
| 21 | * @details A concrete implementation for |
| 22 | * xyz.openbmc_project.Software.Activation DBus API. |
| 23 | */ |
| 24 | class Activation : public ActivationInherit |
| 25 | { |
| 26 | public: |
| 27 | /** @brief Constructs Activation Software Manager |
| 28 | * |
| 29 | * @param[in] bus - The Dbus bus object |
| 30 | * @param[in] path - The Dbus object path |
Adriana Kobylak | bc37a4c | 2017-04-10 09:45:36 -0500 | [diff] [blame^] | 31 | * @param[in] versionId - The software version id |
Adriana Kobylak | 2d8fa22 | 2017-03-15 12:34:32 -0500 | [diff] [blame] | 32 | */ |
Adriana Kobylak | bc37a4c | 2017-04-10 09:45:36 -0500 | [diff] [blame^] | 33 | Activation(sdbusplus::bus::bus& bus, const std::string& path, |
| 34 | std::string& versionId) : |
| 35 | ActivationInherit(bus, path.c_str()), |
| 36 | versionId(versionId) {} |
Adriana Kobylak | befe5ce | 2017-04-05 15:57:44 -0500 | [diff] [blame] | 37 | |
| 38 | /** @brief Overloaded Activation property setter function |
| 39 | * |
| 40 | * @param[in] value - One of Activation::Activations |
| 41 | * |
| 42 | * @return Success or exception thrown |
| 43 | */ |
| 44 | Activations activation(Activations value) override; |
| 45 | |
| 46 | /** @brief Overloaded requestedActivation property setter function |
| 47 | * |
| 48 | * @param[in] value - One of Activation::RequestedActivations |
| 49 | * |
| 50 | * @return Success or exception thrown |
| 51 | */ |
| 52 | RequestedActivations requestedActivation(RequestedActivations value) |
| 53 | override; |
| 54 | |
Adriana Kobylak | bc37a4c | 2017-04-10 09:45:36 -0500 | [diff] [blame^] | 55 | /** @brief Version id */ |
| 56 | std::string versionId; |
Adriana Kobylak | 2d8fa22 | 2017-03-15 12:34:32 -0500 | [diff] [blame] | 57 | }; |
| 58 | |
Adriana Kobylak | ea9626f | 2017-04-05 15:37:40 -0500 | [diff] [blame] | 59 | /** @class ActivationBlocksTransition |
| 60 | * @brief OpenBMC ActivationBlocksTransition implementation. |
| 61 | * @details A concrete implementation for |
| 62 | * xyz.openbmc_project.Software.ActivationBlocksTransition DBus API. |
| 63 | */ |
| 64 | class ActivationBlocksTransition : public ActivationBlocksTransitionInherit |
| 65 | { |
| 66 | public: |
| 67 | /** @brief Constructs ActivationBlocksTransition. |
| 68 | * |
| 69 | * @param[in] bus - The Dbus bus object |
| 70 | * @param[in] path - The Dbus object path |
| 71 | */ |
| 72 | ActivationBlocksTransition(sdbusplus::bus::bus& bus, |
| 73 | const std::string& path) : |
| 74 | ActivationBlocksTransitionInherit(bus, path.c_str()) {} |
| 75 | }; |
| 76 | |
Adriana Kobylak | befe5ce | 2017-04-05 15:57:44 -0500 | [diff] [blame] | 77 | } // namespace updater |
Adriana Kobylak | 2d8fa22 | 2017-03-15 12:34:32 -0500 | [diff] [blame] | 78 | } // namespace software |
| 79 | } // namespace openpower |
| 80 | |