Gunnar Mills | b0ce996 | 2018-09-07 13:39:10 -0500 | [diff] [blame] | 1 | #include "config.h" |
| 2 | |
| 3 | #include "item_updater.hpp" |
| 4 | |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 5 | #include <sdbusplus/bus.hpp> |
| 6 | #include <sdbusplus/server/manager.hpp> |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 7 | |
Adriana Kobylak | 292159f | 2020-05-05 09:25:55 -0500 | [diff] [blame] | 8 | int main() |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 9 | { |
| 10 | auto bus = sdbusplus::bus::new_default(); |
| 11 | |
| 12 | // Add sdbusplus ObjectManager. |
| 13 | sdbusplus::server::manager::manager objManager(bus, SOFTWARE_OBJPATH); |
| 14 | |
Michael Tritz | 37a5904 | 2017-07-12 13:44:53 -0500 | [diff] [blame] | 15 | phosphor::software::updater::ItemUpdater updater(bus, SOFTWARE_OBJPATH); |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 16 | |
| 17 | bus.request_name(BUSNAME_UPDATER); |
| 18 | |
| 19 | while (true) |
| 20 | { |
| 21 | bus.process_discard(); |
| 22 | bus.wait(); |
| 23 | } |
| 24 | return 0; |
| 25 | } |