1 #include "fw-update/activation.hpp" 2 3 #include "fw-update/update_manager.hpp" 4 5 namespace pldm 6 { 7 namespace fw_update 8 { 9 10 ActivationIntf::Activations 11 Activation::activation(ActivationIntf::Activations value) 12 { 13 if (value == ActivationIntf::Activations::Activating) 14 { 15 deleteImpl.reset(); 16 updateManager->activatePackage(); 17 } 18 else if (value == ActivationIntf::Activations::Active || 19 value == ActivationIntf::Activations::Failed) 20 { 21 if (!deleteImpl) 22 { 23 deleteImpl = std::make_unique<Delete>(bus, objPath, updateManager); 24 } 25 } 26 27 return ActivationIntf::activation(value); 28 } 29 30 void Delete::delete_() 31 { 32 updateManager->clearActivationInfo(); 33 } 34 } // namespace fw_update 35 } // namespace pldm 36