diff options
Diffstat (limited to 'manager.hpp')
-rw-r--r-- | manager.hpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/manager.hpp b/manager.hpp index 7edb30f..7c00122 100644 --- a/manager.hpp +++ b/manager.hpp @@ -70,6 +70,9 @@ class Manager /** @brief Check if host is on and update hostOn variable */ void checkHostOn(); + /** @brief Check if use_dhcp_ntp is used and update NTP setting */ + void checkDhcpNtp(); + /** @brief Get setting from settingsd service * * @param[in] setting - The string of the setting @@ -126,6 +129,18 @@ class Manager */ void setRequestedOwner(const std::string& owner); + /** @brief Update the NTP setting to systemd time service + * + * @param[in] value - The time mode value, e.g. "NTP" or "MANUAL" + */ + void updateNtpSetting(const std::string& value); + + /** @brief Update dhcp_ntp setting to OpenBMC network service + * + * @param[in] value - The use_dhcp_ntp value, e.g. "yes" or "no" + */ + void updateDhcpNtpSetting(const std::string& useDhcpNtp); + /** @brief The static function called on settings property changed * * @param[in] msg - Data associated with subscribed signal @@ -176,6 +191,9 @@ class Manager /** @brief The string of time owner property */ static constexpr auto PROPERTY_TIME_OWNER = "time_owner"; + /** @brief The string of use dhcp ntp property */ + static constexpr auto PROPERTY_DHCP_NTP = "use_dhcp_ntp"; + using Updater = std::function<void(const std::string&)>; /** @brief Map the property string to functions that shall |