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 |
| 31 | */ |
| 32 | Activation(sdbusplus::bus::bus& bus, const std::string& path) : |
| 33 | ActivationInherit(bus, path.c_str()) {}; |
Adriana Kobylak | befe5ce | 2017-04-05 15:57:44 -0500 | [diff] [blame^] | 34 | |
| 35 | /** @brief Overloaded Activation property setter function |
| 36 | * |
| 37 | * @param[in] value - One of Activation::Activations |
| 38 | * |
| 39 | * @return Success or exception thrown |
| 40 | */ |
| 41 | Activations activation(Activations value) override; |
| 42 | |
| 43 | /** @brief Overloaded requestedActivation property setter function |
| 44 | * |
| 45 | * @param[in] value - One of Activation::RequestedActivations |
| 46 | * |
| 47 | * @return Success or exception thrown |
| 48 | */ |
| 49 | RequestedActivations requestedActivation(RequestedActivations value) |
| 50 | override; |
| 51 | |
Adriana Kobylak | 2d8fa22 | 2017-03-15 12:34:32 -0500 | [diff] [blame] | 52 | }; |
| 53 | |
Adriana Kobylak | ea9626f | 2017-04-05 15:37:40 -0500 | [diff] [blame] | 54 | /** @class ActivationBlocksTransition |
| 55 | * @brief OpenBMC ActivationBlocksTransition implementation. |
| 56 | * @details A concrete implementation for |
| 57 | * xyz.openbmc_project.Software.ActivationBlocksTransition DBus API. |
| 58 | */ |
| 59 | class ActivationBlocksTransition : public ActivationBlocksTransitionInherit |
| 60 | { |
| 61 | public: |
| 62 | /** @brief Constructs ActivationBlocksTransition. |
| 63 | * |
| 64 | * @param[in] bus - The Dbus bus object |
| 65 | * @param[in] path - The Dbus object path |
| 66 | */ |
| 67 | ActivationBlocksTransition(sdbusplus::bus::bus& bus, |
| 68 | const std::string& path) : |
| 69 | ActivationBlocksTransitionInherit(bus, path.c_str()) {} |
| 70 | }; |
| 71 | |
Adriana Kobylak | befe5ce | 2017-04-05 15:57:44 -0500 | [diff] [blame^] | 72 | } // namespace updater |
Adriana Kobylak | 2d8fa22 | 2017-03-15 12:34:32 -0500 | [diff] [blame] | 73 | } // namespace software |
| 74 | } // namespace openpower |
| 75 | |