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