blob: d7c986f1312c7a5eb03dcf375713ac317a09626d [file] [log] [blame]
Deepak Kodihalli20ed79e2017-07-25 05:48:58 -05001#pragma once
2
Lei YU3afad182023-07-18 13:41:30 +08003#include "config.h"
4
George Liudc746c02022-09-02 11:10:55 +08005#include "utils.hpp"
6
Deepak Kodihalli20ed79e2017-07-25 05:48:58 -05007#include <sdbusplus/bus.hpp>
George Liuc6d33972020-06-22 10:35:29 +08008
Gunnar Millsab4cc6a2018-09-14 14:42:39 -05009#include <string>
Deepak Kodihalli20ed79e2017-07-25 05:48:58 -050010
11namespace settings
12{
13
Deepak Kodihalli20ed79e2017-07-25 05:48:58 -050014constexpr auto root = "/";
Deepak Kodihalli20ed79e2017-07-25 05:48:58 -050015constexpr auto timeSyncIntf = "xyz.openbmc_project.Time.Synchronization";
Jason Zhue1010302024-04-02 04:20:43 +000016constexpr auto ntpSync = "xyz.openbmc_project.Time.Synchronization.Method.NTP";
17constexpr auto manualSync =
18 "xyz.openbmc_project.Time.Synchronization.Method.Manual";
Deepak Kodihalli20ed79e2017-07-25 05:48:58 -050019
20/** @class Objects
21 * @brief Fetch paths of settings D-bus objects of interest upon construction
22 */
23struct Objects
24{
Gunnar Millsab4cc6a2018-09-14 14:42:39 -050025 public:
26 /** @brief Constructor - fetch settings objects
27 *
28 * @param[in] bus - The D-bus bus object
29 */
Pavithra Barithaya864e1732023-04-11 04:30:23 -050030 explicit Objects(sdbusplus::bus_t& /*bus*/);
Brad Bishop4e845392018-12-18 18:13:12 -050031 Objects() = delete;
Brad Bishop4e845392018-12-18 18:13:12 -050032 Objects(const Objects&) = delete;
33 Objects& operator=(const Objects&) = delete;
Gunnar Millsab4cc6a2018-09-14 14:42:39 -050034 Objects(Objects&&) = default;
Pavithra Barithaya864e1732023-04-11 04:30:23 -050035 Objects& operator=(Objects&&) = delete;
Gunnar Millsab4cc6a2018-09-14 14:42:39 -050036 ~Objects() = default;
Deepak Kodihalli20ed79e2017-07-25 05:48:58 -050037
Gunnar Millsab4cc6a2018-09-14 14:42:39 -050038 /** @brief time sync method settings object */
Pavithra Barithayab2670242023-11-30 04:22:08 -060039 phosphor::time::utils::Path timeSyncMethod = DEFAULT_TIME_SYNC_OBJECT_PATH;
Deepak Kodihalli20ed79e2017-07-25 05:48:58 -050040};
41
42} // namespace settings