1 #pragma once
2 
3 #include "activation.hpp"
4 
5 namespace openpower
6 {
7 namespace software
8 {
9 namespace updater
10 {
11 
12 class RedundancyPriorityUbi : public RedundancyPriority
13 {
14   public:
15     using RedundancyPriority::RedundancyPriority;
16     virtual ~RedundancyPriorityUbi() = default;
17 
18     /** @brief Overloaded Priority property set function
19      *
20      *  @param[in] value - uint8_t
21      *
22      *  @return Success or exception thrown
23      */
24     uint8_t priority(uint8_t value) override;
25 };
26 
27 /** @class ActivationUbi
28  *  @brief OpenBMC activation software management implementation.
29  *  @details A concrete implementation for
30  *  xyz.openbmc_project.Software.Activation DBus API.
31  */
32 class ActivationUbi : public Activation
33 {
34   public:
35     using Activation::Activation;
36     virtual ~ActivationUbi() = default;
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     RequestedActivations
47         requestedActivation(RequestedActivations value) override;
48 
49   private:
50     /** @brief Tracks whether the read-only & read-write volumes have been
51      *created as part of the activation process. **/
52     bool ubiVolumesCreated = false;
53 
54     void unitStateChange(sdbusplus::message::message& msg) override;
55     void startActivation() override;
56     void finishActivation() override;
57 };
58 
59 } // namespace updater
60 } // namespace software
61 } // namespace openpower
62