| Alexander Hansen | cc37235 | 2025-01-14 14:15:39 +0100 | [diff] [blame] | 1 | #pragma once | 
|  | 2 |  | 
|  | 3 | #include <sdbusplus/async/context.hpp> | 
|  | 4 | #include <xyz/openbmc_project/Software/Update/aserver.hpp> | 
|  | 5 |  | 
|  | 6 | namespace phosphor::software | 
|  | 7 | { | 
|  | 8 | class Software; | 
|  | 9 | }; | 
|  | 10 |  | 
|  | 11 | using RequestedApplyTimes = sdbusplus::common::xyz::openbmc_project::software:: | 
|  | 12 | ApplyTime::RequestedApplyTimes; | 
|  | 13 |  | 
|  | 14 | namespace phosphor::software::update | 
|  | 15 | { | 
|  | 16 |  | 
|  | 17 | class SoftwareUpdate : | 
|  | 18 | public sdbusplus::aserver::xyz::openbmc_project::software::Update< | 
|  | 19 | SoftwareUpdate> | 
|  | 20 | { | 
|  | 21 | public: | 
| Alexander Hansen | 8b4ab1e | 2025-04-10 14:25:53 +0200 | [diff] [blame] | 22 | SoftwareUpdate(const SoftwareUpdate&) = delete; | 
|  | 23 | SoftwareUpdate(SoftwareUpdate&&) = delete; | 
|  | 24 | SoftwareUpdate& operator=(const SoftwareUpdate&) = delete; | 
|  | 25 | SoftwareUpdate& operator=(SoftwareUpdate&&) = delete; | 
| Alexander Hansen | cc37235 | 2025-01-14 14:15:39 +0100 | [diff] [blame] | 26 | SoftwareUpdate(sdbusplus::async::context& ctx, const char* path, | 
|  | 27 | Software& software, | 
|  | 28 | const std::set<RequestedApplyTimes>& allowedApplyTimes); | 
|  | 29 |  | 
| Alexander Hansen | 8b4ab1e | 2025-04-10 14:25:53 +0200 | [diff] [blame] | 30 | ~SoftwareUpdate(); | 
|  | 31 |  | 
| Alexander Hansen | cc37235 | 2025-01-14 14:15:39 +0100 | [diff] [blame] | 32 | auto method_call(start_update_t su, auto image, auto applyTime) | 
|  | 33 | -> sdbusplus::async::task<start_update_t::return_type>; | 
|  | 34 |  | 
|  | 35 | auto get_property(allowed_apply_times_t aat) const; | 
|  | 36 |  | 
|  | 37 | private: | 
|  | 38 | Software& software; | 
|  | 39 |  | 
|  | 40 | const std::set<RequestedApplyTimes> allowedApplyTimes; | 
|  | 41 | }; | 
|  | 42 |  | 
|  | 43 | }; // namespace phosphor::software::update |