blob: d362abf792ed497edd04c30b77fc149ddd606b39 [file] [log] [blame]
Jagpal Singh Gill2311b642024-06-23 15:20:35 -07001#include "config.h"
2
Jagpal Singh Gillcc498782024-02-29 15:16:36 -08003#include <phosphor-logging/lg2.hpp>
Jagpal Singh Gill2311b642024-06-23 15:20:35 -07004#include <sdbusplus/async.hpp>
5#include <xyz/openbmc_project/Software/Update/server.hpp>
Jagpal Singh Gillcc498782024-02-29 15:16:36 -08006
7PHOSPHOR_LOG2_USING;
8
9int main()
10{
11 info("Creating Software Manager");
Jagpal Singh Gill2311b642024-06-23 15:20:35 -070012
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 Gillcc498782024-02-29 15:16:36 -080025 return 0;
26}