| 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()}; | 
|  | 16 | constexpr auto serviceName = "xyz.openbmc_project.Software.Manager"; | 
|  | 17 |  | 
|  | 18 | ctx.spawn([](sdbusplus::async::context& ctx) -> sdbusplus::async::task<> { | 
|  | 19 | ctx.request_name(serviceName); | 
|  | 20 | co_return; | 
|  | 21 | }(ctx)); | 
|  | 22 |  | 
|  | 23 | ctx.run(); | 
|  | 24 |  | 
| Jagpal Singh Gill | cc49878 | 2024-02-29 15:16:36 -0800 | [diff] [blame] | 25 | return 0; | 
|  | 26 | } |