blob: e0c9c18559a2b658650ea66b5fd58ed8747b8af3 [file] [log] [blame]
Gunnar Millsb0ce9962018-09-07 13:39:10 -05001#include "config.h"
2
3#include "item_updater.hpp"
4
Lei YU25868182021-05-14 14:50:51 +08005#include <boost/asio/io_context.hpp>
6#include <sdbusplus/asio/connection.hpp>
Gunnar Millsec1b41c2017-05-02 12:20:36 -05007#include <sdbusplus/bus.hpp>
8#include <sdbusplus/server/manager.hpp>
Gunnar Millsec1b41c2017-05-02 12:20:36 -05009
Lei YU25868182021-05-14 14:50:51 +080010boost::asio::io_context& getIOContext()
11{
12 static boost::asio::io_context io;
13 return io;
14}
15
Adriana Kobylak292159f2020-05-05 09:25:55 -050016int main()
Gunnar Millsec1b41c2017-05-02 12:20:36 -050017{
Jagpal Singh Gillbb024eb2024-04-07 23:34:00 -070018 sdbusplus::async::context ctx;
Gunnar Millsec1b41c2017-05-02 12:20:36 -050019
20 // Add sdbusplus ObjectManager.
Jagpal Singh Gillbb024eb2024-04-07 23:34:00 -070021 sdbusplus::server::manager_t objManager(ctx, SOFTWARE_OBJPATH);
Gunnar Millsec1b41c2017-05-02 12:20:36 -050022
Jagpal Singh Gillbb024eb2024-04-07 23:34:00 -070023 phosphor::software::updater::ItemUpdater updater(ctx, SOFTWARE_OBJPATH,
24 false);
Gunnar Millsec1b41c2017-05-02 12:20:36 -050025
Jagpal Singh Gillbb024eb2024-04-07 23:34:00 -070026 ctx.request_name(BUSNAME_UPDATER);
Gunnar Millsec1b41c2017-05-02 12:20:36 -050027
Jagpal Singh Gillbb024eb2024-04-07 23:34:00 -070028 ctx.run();
Lei YU25868182021-05-14 14:50:51 +080029
Gunnar Millsec1b41c2017-05-02 12:20:36 -050030 return 0;
31}