Lei YU | 01539e7 | 2019-07-31 10:57:38 +0800 | [diff] [blame] | 1 | #include "config.h" |
| 2 | |
| 3 | #include "item_updater.hpp" |
| 4 | |
| 5 | #include <phosphor-logging/log.hpp> |
| 6 | #include <sdbusplus/bus.hpp> |
| 7 | #include <sdbusplus/server/manager.hpp> |
Patrick Williams | 5670b18 | 2023-05-10 07:50:50 -0500 | [diff] [blame] | 8 | |
Lei YU | 01539e7 | 2019-07-31 10:57:38 +0800 | [diff] [blame] | 9 | #include <system_error> |
| 10 | |
| 11 | int main(int /* argc */, char* /* argv */[]) |
Lei YU | e065f61 | 2019-07-30 14:10:52 +0800 | [diff] [blame] | 12 | { |
Lei YU | 01539e7 | 2019-07-31 10:57:38 +0800 | [diff] [blame] | 13 | auto bus = sdbusplus::bus::new_default(); |
| 14 | |
| 15 | // Add sdbusplus ObjectManager. |
Patrick Williams | 374fae5 | 2022-07-22 19:26:55 -0500 | [diff] [blame] | 16 | sdbusplus::server::manager_t objManager(bus, SOFTWARE_OBJPATH); |
Lei YU | 01539e7 | 2019-07-31 10:57:38 +0800 | [diff] [blame] | 17 | |
| 18 | phosphor::software::updater::ItemUpdater updater(bus, SOFTWARE_OBJPATH); |
| 19 | |
| 20 | bus.request_name(BUSNAME_UPDATER); |
| 21 | |
| 22 | while (true) |
| 23 | { |
| 24 | bus.process_discard(); |
| 25 | bus.wait(); |
| 26 | } |
Lei YU | e065f61 | 2019-07-30 14:10:52 +0800 | [diff] [blame] | 27 | return 0; |
| 28 | } |