19b21efc5SLei YU #pragma once 29b21efc5SLei YU 39b21efc5SLei YU #include "activation.hpp" 49b21efc5SLei YU 59b21efc5SLei YU namespace openpower 69b21efc5SLei YU { 79b21efc5SLei YU namespace software 89b21efc5SLei YU { 99b21efc5SLei YU namespace updater 109b21efc5SLei YU { 119b21efc5SLei YU 129b21efc5SLei YU class RedundancyPriorityUbi : public RedundancyPriority 139b21efc5SLei YU { 149b21efc5SLei YU public: 15*df7a6157SAdriana Kobylak RedundancyPriorityUbi(sdbusplus::bus::bus& bus, const std::string& path, 16*df7a6157SAdriana Kobylak Activation& parent, uint8_t value) : 17*df7a6157SAdriana Kobylak RedundancyPriority(bus, path, parent, value) 18*df7a6157SAdriana Kobylak { 19*df7a6157SAdriana Kobylak priority(value); 20*df7a6157SAdriana Kobylak } 219b21efc5SLei YU virtual ~RedundancyPriorityUbi() = default; 229b21efc5SLei YU 239b21efc5SLei YU /** @brief Overloaded Priority property set function 249b21efc5SLei YU * 259b21efc5SLei YU * @param[in] value - uint8_t 269b21efc5SLei YU * 279b21efc5SLei YU * @return Success or exception thrown 289b21efc5SLei YU */ 299b21efc5SLei YU uint8_t priority(uint8_t value) override; 309b21efc5SLei YU }; 319b21efc5SLei YU 329b21efc5SLei YU /** @class ActivationUbi 339b21efc5SLei YU * @brief OpenBMC activation software management implementation. 349b21efc5SLei YU * @details A concrete implementation for 359b21efc5SLei YU * xyz.openbmc_project.Software.Activation DBus API. 369b21efc5SLei YU */ 379b21efc5SLei YU class ActivationUbi : public Activation 389b21efc5SLei YU { 399b21efc5SLei YU public: 409b21efc5SLei YU using Activation::Activation; 419b21efc5SLei YU virtual ~ActivationUbi() = default; 429b21efc5SLei YU 439b21efc5SLei YU /** @brief Overloaded Activation property setter function 449b21efc5SLei YU * 459b21efc5SLei YU * @param[in] value - One of Activation::Activations 469b21efc5SLei YU * 479b21efc5SLei YU * @return Success or exception thrown 489b21efc5SLei YU */ 499b21efc5SLei YU Activations activation(Activations value) override; 509b21efc5SLei YU 519b21efc5SLei YU RequestedActivations 529b21efc5SLei YU requestedActivation(RequestedActivations value) override; 539b21efc5SLei YU 549b21efc5SLei YU private: 559b21efc5SLei YU /** @brief Tracks whether the read-only & read-write volumes have been 569b21efc5SLei YU *created as part of the activation process. **/ 579b21efc5SLei YU bool ubiVolumesCreated = false; 589b21efc5SLei YU 599b21efc5SLei YU void unitStateChange(sdbusplus::message::message& msg) override; 609b21efc5SLei YU void startActivation() override; 619b21efc5SLei YU void finishActivation() override; 629b21efc5SLei YU }; 639b21efc5SLei YU 649b21efc5SLei YU } // namespace updater 659b21efc5SLei YU } // namespace software 669b21efc5SLei YU } // namespace openpower 67