blob: 4c5bee528c0a64770a5451cdbda93c50c7724e44 [file] [log] [blame]
Adriana Kobylak2d8fa222017-03-15 12:34:32 -05001#pragma once
2
3#include <sdbusplus/bus.hpp>
4#include <xyz/openbmc_project/Software/Activation/server.hpp>
Adriana Kobylakea9626f2017-04-05 15:37:40 -05005#include <xyz/openbmc_project/Software/ActivationBlocksTransition/server.hpp>
Adriana Kobylak2d8fa222017-03-15 12:34:32 -05006
7namespace openpower
8{
9namespace software
10{
Adriana Kobylakbefe5ce2017-04-05 15:57:44 -050011namespace updater
Adriana Kobylak2d8fa222017-03-15 12:34:32 -050012{
13
14using ActivationInherit = sdbusplus::server::object::object<
15 sdbusplus::xyz::openbmc_project::Software::server::Activation>;
Adriana Kobylakea9626f2017-04-05 15:37:40 -050016using ActivationBlocksTransitionInherit = sdbusplus::server::object::object<
17 sdbusplus::xyz::openbmc_project::Software::server::ActivationBlocksTransition>;
Adriana Kobylak2d8fa222017-03-15 12:34:32 -050018
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 */
24class 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 Kobylakbefe5ce2017-04-05 15:57:44 -050034
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 Kobylak2d8fa222017-03-15 12:34:32 -050052};
53
Adriana Kobylakea9626f2017-04-05 15:37:40 -050054/** @class ActivationBlocksTransition
55 * @brief OpenBMC ActivationBlocksTransition implementation.
56 * @details A concrete implementation for
57 * xyz.openbmc_project.Software.ActivationBlocksTransition DBus API.
58 */
59class 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 Kobylakbefe5ce2017-04-05 15:57:44 -050072} // namespace updater
Adriana Kobylak2d8fa222017-03-15 12:34:32 -050073} // namespace software
74} // namespace openpower
75