Deepak Kodihalli | 20ed79e | 2017-07-25 05:48:58 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Lei YU | 3afad18 | 2023-07-18 13:41:30 +0800 | [diff] [blame^] | 3 | #include "config.h" |
| 4 | |
George Liu | dc746c0 | 2022-09-02 11:10:55 +0800 | [diff] [blame] | 5 | #include "utils.hpp" |
| 6 | |
Deepak Kodihalli | 20ed79e | 2017-07-25 05:48:58 -0500 | [diff] [blame] | 7 | #include <sdbusplus/bus.hpp> |
George Liu | c6d3397 | 2020-06-22 10:35:29 +0800 | [diff] [blame] | 8 | |
Gunnar Mills | ab4cc6a | 2018-09-14 14:42:39 -0500 | [diff] [blame] | 9 | #include <string> |
Deepak Kodihalli | 20ed79e | 2017-07-25 05:48:58 -0500 | [diff] [blame] | 10 | |
| 11 | namespace settings |
| 12 | { |
| 13 | |
George Liu | dc746c0 | 2022-09-02 11:10:55 +0800 | [diff] [blame] | 14 | using namespace phosphor::time::utils; |
Deepak Kodihalli | 20ed79e | 2017-07-25 05:48:58 -0500 | [diff] [blame] | 15 | |
| 16 | constexpr auto root = "/"; |
Deepak Kodihalli | 20ed79e | 2017-07-25 05:48:58 -0500 | [diff] [blame] | 17 | constexpr auto timeSyncIntf = "xyz.openbmc_project.Time.Synchronization"; |
| 18 | |
| 19 | /** @class Objects |
| 20 | * @brief Fetch paths of settings D-bus objects of interest upon construction |
| 21 | */ |
| 22 | struct Objects |
| 23 | { |
Gunnar Mills | ab4cc6a | 2018-09-14 14:42:39 -0500 | [diff] [blame] | 24 | public: |
| 25 | /** @brief Constructor - fetch settings objects |
| 26 | * |
| 27 | * @param[in] bus - The D-bus bus object |
| 28 | */ |
Pavithra Barithaya | 864e173 | 2023-04-11 04:30:23 -0500 | [diff] [blame] | 29 | explicit Objects(sdbusplus::bus_t& /*bus*/); |
Brad Bishop | 4e84539 | 2018-12-18 18:13:12 -0500 | [diff] [blame] | 30 | Objects() = delete; |
Brad Bishop | 4e84539 | 2018-12-18 18:13:12 -0500 | [diff] [blame] | 31 | Objects(const Objects&) = delete; |
| 32 | Objects& operator=(const Objects&) = delete; |
Gunnar Mills | ab4cc6a | 2018-09-14 14:42:39 -0500 | [diff] [blame] | 33 | Objects(Objects&&) = default; |
Pavithra Barithaya | 864e173 | 2023-04-11 04:30:23 -0500 | [diff] [blame] | 34 | Objects& operator=(Objects&&) = delete; |
Gunnar Mills | ab4cc6a | 2018-09-14 14:42:39 -0500 | [diff] [blame] | 35 | ~Objects() = default; |
Deepak Kodihalli | 20ed79e | 2017-07-25 05:48:58 -0500 | [diff] [blame] | 36 | |
Gunnar Mills | ab4cc6a | 2018-09-14 14:42:39 -0500 | [diff] [blame] | 37 | /** @brief time sync method settings object */ |
Lei YU | 3afad18 | 2023-07-18 13:41:30 +0800 | [diff] [blame^] | 38 | Path timeSyncMethod = DEFAULT_TIME_SYNC_OBJECT_PATH; |
Deepak Kodihalli | 20ed79e | 2017-07-25 05:48:58 -0500 | [diff] [blame] | 39 | }; |
| 40 | |
| 41 | } // namespace settings |