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: |
| 22 | SoftwareUpdate(sdbusplus::async::context& ctx, const char* path, |
| 23 | Software& software, |
| 24 | const std::set<RequestedApplyTimes>& allowedApplyTimes); |
| 25 | |
| 26 | auto method_call(start_update_t su, auto image, auto applyTime) |
| 27 | -> sdbusplus::async::task<start_update_t::return_type>; |
| 28 | |
| 29 | auto get_property(allowed_apply_times_t aat) const; |
| 30 | |
| 31 | private: |
| 32 | Software& software; |
| 33 | |
| 34 | const std::set<RequestedApplyTimes> allowedApplyTimes; |
| 35 | }; |
| 36 | |
| 37 | }; // namespace phosphor::software::update |