blob: 7709ec9ab59a9914e3e0ce677e76ee5abdac531a [file] [log] [blame]
Gunnar Millsb0ce9962018-09-07 13:39:10 -05001#include "config.h"
2
3#include "item_updater.hpp"
Jagpal Singh Gill2431e7f2024-04-07 23:51:12 -07004#include "software_utils.hpp"
Gunnar Millsb0ce9962018-09-07 13:39:10 -05005
Lei YU25868182021-05-14 14:50:51 +08006#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
Jagpal Singh Gilldd003f52024-08-13 15:45:50 -070010using ItemUpdaterIntf = phosphor::software::updater::ItemUpdater;
11
Adriana Kobylak292159f2020-05-05 09:25:55 -050012int main()
Gunnar Millsec1b41c2017-05-02 12:20:36 -050013{
Jagpal Singh Gillbb024eb2024-04-07 23:34:00 -070014 sdbusplus::async::context ctx;
Gunnar Millsec1b41c2017-05-02 12:20:36 -050015
16 // Add sdbusplus ObjectManager.
Jagpal Singh Gillbb024eb2024-04-07 23:34:00 -070017 sdbusplus::server::manager_t objManager(ctx, SOFTWARE_OBJPATH);
Gunnar Millsec1b41c2017-05-02 12:20:36 -050018
Jagpal Singh Gilldd003f52024-08-13 15:45:50 -070019 ItemUpdaterIntf updater(ctx, SOFTWARE_OBJPATH,
20 ItemUpdaterIntf::UpdaterType::ALL, false);
Gunnar Millsec1b41c2017-05-02 12:20:36 -050021
Jagpal Singh Gillbb024eb2024-04-07 23:34:00 -070022 ctx.request_name(BUSNAME_UPDATER);
Gunnar Millsec1b41c2017-05-02 12:20:36 -050023
Jagpal Singh Gillbb024eb2024-04-07 23:34:00 -070024 ctx.run();
Lei YU25868182021-05-14 14:50:51 +080025
Gunnar Millsec1b41c2017-05-02 12:20:36 -050026 return 0;
27}