blob: 15f7dbe96dce0e0031263de42ec5493e28981d5f [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()};
Jagpal Singh Gill2311b642024-06-23 15:20:35 -070016
Pavithra Barithayacfaf0832024-07-04 14:58:18 +053017 // 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 Gill2311b642024-06-23 15:20:35 -070020 ctx.request_name(serviceName);
21 co_return;
22 }(ctx));
23
24 ctx.run();
25
Jagpal Singh Gillcc498782024-02-29 15:16:36 -080026 return 0;
27}