blob: 08fba78e6dff78f0ffdd5ff3546f01ccad613b71 [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
Adriana Kobylakbc37a4c2017-04-10 09:45:36 -050031 * @param[in] versionId - The software version id
Adriana Kobylak2d8fa222017-03-15 12:34:32 -050032 */
Adriana Kobylakbc37a4c2017-04-10 09:45:36 -050033 Activation(sdbusplus::bus::bus& bus, const std::string& path,
34 std::string& versionId) :
35 ActivationInherit(bus, path.c_str()),
36 versionId(versionId) {}
Adriana Kobylakbefe5ce2017-04-05 15:57:44 -050037
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 Kobylakbc37a4c2017-04-10 09:45:36 -050055 /** @brief Version id */
56 std::string versionId;
Adriana Kobylak2d8fa222017-03-15 12:34:32 -050057};
58
Adriana Kobylakea9626f2017-04-05 15:37:40 -050059/** @class ActivationBlocksTransition
60 * @brief OpenBMC ActivationBlocksTransition implementation.
61 * @details A concrete implementation for
62 * xyz.openbmc_project.Software.ActivationBlocksTransition DBus API.
63 */
64class 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 Kobylakbefe5ce2017-04-05 15:57:44 -050077} // namespace updater
Adriana Kobylak2d8fa222017-03-15 12:34:32 -050078} // namespace software
79} // namespace openpower
80