Alexander Hansen | 0119cd7 | 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 | class Software; |
| 7 | |
| 8 | using RequestedApplyTimes = sdbusplus::common::xyz::openbmc_project::software:: |
| 9 | ApplyTime::RequestedApplyTimes; |
| 10 | |
| 11 | class SoftwareUpdate : |
| 12 | public sdbusplus::aserver::xyz::openbmc_project::software::Update< |
| 13 | SoftwareUpdate> |
| 14 | { |
| 15 | public: |
| 16 | SoftwareUpdate(sdbusplus::async::context& ctx, const char* path, |
| 17 | Software& software, |
| 18 | const std::set<RequestedApplyTimes>& allowedApplyTimes); |
| 19 | |
| 20 | Software& software; |
| 21 | |
| 22 | auto method_call(start_update_t su, auto image, auto applyTime) |
| 23 | -> sdbusplus::async::task<start_update_t::return_type>; |
| 24 | |
| 25 | auto set_property(allowed_apply_times_t aat, auto value) -> bool; |
| 26 | auto get_property(allowed_apply_times_t aat) const; |
| 27 | |
| 28 | private: |
| 29 | const std::set<RequestedApplyTimes> allowedApplyTimes; |
| 30 | }; |