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> |
| 8 | #include <system_error> |
| 9 | |
| 10 | int main(int /* argc */, char* /* argv */[]) |
Lei YU | e065f61 | 2019-07-30 14:10:52 +0800 | [diff] [blame] | 11 | { |
Lei YU | 01539e7 | 2019-07-31 10:57:38 +0800 | [diff] [blame] | 12 | auto bus = sdbusplus::bus::new_default(); |
| 13 | |
| 14 | // Add sdbusplus ObjectManager. |
| 15 | sdbusplus::server::manager::manager objManager(bus, SOFTWARE_OBJPATH); |
| 16 | |
| 17 | phosphor::software::updater::ItemUpdater updater(bus, SOFTWARE_OBJPATH); |
| 18 | |
| 19 | bus.request_name(BUSNAME_UPDATER); |
| 20 | |
| 21 | while (true) |
| 22 | { |
| 23 | bus.process_discard(); |
| 24 | bus.wait(); |
| 25 | } |
Lei YU | e065f61 | 2019-07-30 14:10:52 +0800 | [diff] [blame] | 26 | return 0; |
| 27 | } |