Invoke SetNTP and UpdateUseNtpField in time manager

1. When time mode is changed, invoke systemd timedate1's SetNTP
method to update NTP settings;
2. When settings use_dhcp_ntp property is changed, invoke
NetworkManager's UpdateUseNtpField method to update its setting;
3. Move the common code of getProperty() into utils.hpp

Change-Id: I981e0e9de9c0430282b3364c38c282312bb2be89
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/manager.hpp b/manager.hpp
index 7edb30f..7c00122 100644
--- a/manager.hpp
+++ b/manager.hpp
@@ -70,6 +70,9 @@
         /** @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 @@
          */
         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 @@
         /** @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