blob: 406c28234cebf49b96fcc2b5e4afb2179069a13f [file] [log] [blame]
Alexander Hansencc372352025-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
6namespace phosphor::software
7{
8class Software;
9};
10
11using RequestedApplyTimes = sdbusplus::common::xyz::openbmc_project::software::
12 ApplyTime::RequestedApplyTimes;
13
14namespace phosphor::software::update
15{
16
17class 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