Gunnar Mills | 701e021 | 2017-04-03 11:21:27 -0500 | [diff] [blame] | 1 | #include "config.h" |
Gunnar Mills | b0ce996 | 2018-09-07 13:39:10 -0500 | [diff] [blame] | 2 | |
Gunnar Mills | 701e021 | 2017-04-03 11:21:27 -0500 | [diff] [blame] | 3 | #include "download_manager.hpp" |
| 4 | |
Gunnar Mills | b0ce996 | 2018-09-07 13:39:10 -0500 | [diff] [blame] | 5 | #include <sdbusplus/bus.hpp> |
| 6 | |
Adriana Kobylak | 292159f | 2020-05-05 09:25:55 -0500 | [diff] [blame] | 7 | int main() |
Gunnar Mills | 701e021 | 2017-04-03 11:21:27 -0500 | [diff] [blame] | 8 | { |
| 9 | auto bus = sdbusplus::bus::new_default(); |
| 10 | |
| 11 | // Add sdbusplus ObjectManager. |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 12 | sdbusplus::server::manager::manager objManager(bus, SOFTWARE_OBJPATH); |
Gunnar Mills | 701e021 | 2017-04-03 11:21:27 -0500 | [diff] [blame] | 13 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 14 | phosphor::software::manager::Download manager(bus, SOFTWARE_OBJPATH); |
Gunnar Mills | 701e021 | 2017-04-03 11:21:27 -0500 | [diff] [blame] | 15 | |
| 16 | bus.request_name(DOWNLOAD_BUSNAME); |
| 17 | |
| 18 | while (true) |
| 19 | { |
| 20 | bus.process_discard(); |
| 21 | bus.wait(); |
| 22 | } |
| 23 | return 0; |
| 24 | } |