Gunnar Mills | b0ce996 | 2018-09-07 13:39:10 -0500 | [diff] [blame] | 1 | #include "config.h" |
2 | |||||
3 | #include "item_updater.hpp" | ||||
Jagpal Singh Gill | 2431e7f | 2024-04-07 23:51:12 -0700 | [diff] [blame] | 4 | #include "software_utils.hpp" |
Gunnar Mills | b0ce996 | 2018-09-07 13:39:10 -0500 | [diff] [blame] | 5 | |
Lei YU | 2586818 | 2021-05-14 14:50:51 +0800 | [diff] [blame] | 6 | #include <sdbusplus/asio/connection.hpp> |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 7 | #include <sdbusplus/bus.hpp> |
8 | #include <sdbusplus/server/manager.hpp> | ||||
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 9 | |
Jagpal Singh Gill | dd003f5 | 2024-08-13 15:45:50 -0700 | [diff] [blame] | 10 | using ItemUpdaterIntf = phosphor::software::updater::ItemUpdater; |
11 | |||||
Adriana Kobylak | 292159f | 2020-05-05 09:25:55 -0500 | [diff] [blame] | 12 | int main() |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 13 | { |
Jagpal Singh Gill | bb024eb | 2024-04-07 23:34:00 -0700 | [diff] [blame] | 14 | sdbusplus::async::context ctx; |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 15 | |
16 | // Add sdbusplus ObjectManager. | ||||
Jagpal Singh Gill | bb024eb | 2024-04-07 23:34:00 -0700 | [diff] [blame] | 17 | sdbusplus::server::manager_t objManager(ctx, SOFTWARE_OBJPATH); |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 18 | |
Jagpal Singh Gill | dd003f5 | 2024-08-13 15:45:50 -0700 | [diff] [blame] | 19 | ItemUpdaterIntf updater(ctx, SOFTWARE_OBJPATH, |
20 | ItemUpdaterIntf::UpdaterType::ALL, false); | ||||
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 21 | |
Jagpal Singh Gill | bb024eb | 2024-04-07 23:34:00 -0700 | [diff] [blame] | 22 | ctx.request_name(BUSNAME_UPDATER); |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 23 | |
Jagpal Singh Gill | bb024eb | 2024-04-07 23:34:00 -0700 | [diff] [blame] | 24 | ctx.run(); |
Lei YU | 2586818 | 2021-05-14 14:50:51 +0800 | [diff] [blame] | 25 | |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 26 | return 0; |
27 | } |