blob: 3ee9f1ad743045d9417770a47561b5b1f535b487 [file] [log] [blame]
Jagpal Singh Gill6d131aa2024-04-07 23:56:48 -07001#include "item_updater.hpp"
Jagpal Singh Gill2311b642024-06-23 15:20:35 -07002
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>
Jagpal Singh Gill6d131aa2024-04-07 23:56:48 -07005
6using ItemUpdaterIntf = phosphor::software::updater::ItemUpdater;
Jagpal Singh Gillcc498782024-02-29 15:16:36 -08007
8PHOSPHOR_LOG2_USING;
9
10int main()
11{
12 info("Creating Software Manager");
Jagpal Singh Gill2311b642024-06-23 15:20:35 -070013 auto path = std::string(SOFTWARE_OBJPATH) + "/bmc";
14 sdbusplus::async::context ctx;
Jagpal Singh Gill6d131aa2024-04-07 23:56:48 -070015 sdbusplus::server::manager_t manager{ctx, SOFTWARE_OBJPATH};
Jagpal Singh Gill2311b642024-06-23 15:20:35 -070016
Jagpal Singh Gill6d131aa2024-04-07 23:56:48 -070017 constexpr auto serviceName = "xyz.openbmc_project.Software.Manager";
18
19 ItemUpdaterIntf itemUpdater{ctx, path};
20 ctx.request_name(serviceName);
Jagpal Singh Gill2311b642024-06-23 15:20:35 -070021
22 ctx.run();
Jagpal Singh Gillcc498782024-02-29 15:16:36 -080023 return 0;
24}