blob: 908000580bc43053a30d3ce1fa54dc14b97c105c [file] [log] [blame]
Alexander Hansen0119cd72025-01-14 14:15:39 +01001#pragma once
2
3#include <sdbusplus/async/context.hpp>
4#include <xyz/openbmc_project/Software/Update/aserver.hpp>
5
6class Software;
7
8using RequestedApplyTimes = sdbusplus::common::xyz::openbmc_project::software::
9 ApplyTime::RequestedApplyTimes;
10
11class 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};