Deepak Kodihalli | 5de0957 | 2017-05-16 23:53:40 -0500 | [diff] [blame] | 1 | #include "config.h" |
| 2 | |
Patrick Venture | 414db5a | 2018-11-01 16:46:46 -0700 | [diff] [blame] | 3 | #include "settings_manager.hpp" |
| 4 | |
| 5 | #include <sdbusplus/bus.hpp> |
| 6 | #include <sdbusplus/server/manager.hpp> |
| 7 | |
Jagpal Singh Gill | cfd49eb | 2023-04-23 23:09:09 -0700 | [diff] [blame^] | 8 | int main([[maybe_unused]] int argc, [[maybe_unused]] char* argv[]) |
Deepak Kodihalli | 5de0957 | 2017-05-16 23:53:40 -0500 | [diff] [blame] | 9 | { |
| 10 | auto bus = sdbusplus::bus::new_default(); |
| 11 | |
Deepak Kodihalli | 9711211 | 2017-05-31 01:18:14 -0500 | [diff] [blame] | 12 | // Add sdbusplus ObjectManager. The settings objects are spread across |
| 13 | // the object namespace and are not under a (settings) root. Hence register |
| 14 | // "/" as the path. |
Patrick Williams | 7c4181c | 2022-07-22 19:26:52 -0500 | [diff] [blame] | 15 | sdbusplus::server::manager_t objManager(bus, "/"); |
Deepak Kodihalli | 7a6f252 | 2017-06-23 23:05:47 -0500 | [diff] [blame] | 16 | bus.request_name(SETTINGS_BUSNAME); |
Deepak Kodihalli | 5de0957 | 2017-05-16 23:53:40 -0500 | [diff] [blame] | 17 | |
| 18 | phosphor::settings::Manager mgr(bus); |
| 19 | |
Patrick Venture | 414db5a | 2018-11-01 16:46:46 -0700 | [diff] [blame] | 20 | while (true) |
Deepak Kodihalli | 5de0957 | 2017-05-16 23:53:40 -0500 | [diff] [blame] | 21 | { |
| 22 | bus.process_discard(); |
| 23 | bus.wait(); |
| 24 | } |
| 25 | |
| 26 | return 0; |
| 27 | } |