Jagpal Singh Gill | 2311b64 | 2024-06-23 15:20:35 -0700 | [diff] [blame] | 1 | #include "config.h" |
| 2 | |
Jagpal Singh Gill | cc49878 | 2024-02-29 15:16:36 -0800 | [diff] [blame] | 3 | #include <phosphor-logging/lg2.hpp> |
Jagpal Singh Gill | 2311b64 | 2024-06-23 15:20:35 -0700 | [diff] [blame] | 4 | #include <sdbusplus/async.hpp> |
| 5 | #include <xyz/openbmc_project/Software/Update/server.hpp> |
Jagpal Singh Gill | cc49878 | 2024-02-29 15:16:36 -0800 | [diff] [blame] | 6 | |
| 7 | PHOSPHOR_LOG2_USING; |
| 8 | |
| 9 | int main() |
| 10 | { |
| 11 | info("Creating Software Manager"); |
Jagpal Singh Gill | 2311b64 | 2024-06-23 15:20:35 -0700 | [diff] [blame] | 12 | |
| 13 | auto path = std::string(SOFTWARE_OBJPATH) + "/bmc"; |
| 14 | sdbusplus::async::context ctx; |
| 15 | sdbusplus::server::manager_t manager{ctx, path.c_str()}; |
Jagpal Singh Gill | 2311b64 | 2024-06-23 15:20:35 -0700 | [diff] [blame] | 16 | |
Pavithra Barithaya | cfaf083 | 2024-07-04 14:58:18 +0530 | [diff] [blame] | 17 | // NOLINTNEXTLINE(readability-static-accessed-through-instance) |
| 18 | ctx.spawn([=](sdbusplus::async::context& ctx) -> sdbusplus::async::task<> { |
| 19 | constexpr auto serviceName = "xyz.openbmc_project.Software.Manager"; |
Jagpal Singh Gill | 2311b64 | 2024-06-23 15:20:35 -0700 | [diff] [blame] | 20 | ctx.request_name(serviceName); |
| 21 | co_return; |
| 22 | }(ctx)); |
| 23 | |
| 24 | ctx.run(); |
| 25 | |
Jagpal Singh Gill | cc49878 | 2024-02-29 15:16:36 -0800 | [diff] [blame] | 26 | return 0; |
| 27 | } |