Add sst_time_get_changed() 41/235341/3 accepted/tizen/unified/20200605.171604 submit/tizen/20200604.070957
authorjinwang.an <jinwang.an@samsung.com>
Thu, 4 Jun 2020 04:13:19 +0000 (13:13 +0900)
committerjinwang.an <jinwang.an@samsung.com>
Thu, 4 Jun 2020 04:21:37 +0000 (13:21 +0900)
Change-Id: I2280645d330e115c6e3a3f76bce4546d23338275
Signed-off-by: jinwang.an <jinwang.an@samsung.com>
src/sst_core.c
src/sst_interface.c
src/sst_time_N_locale.c
src/sst_time_N_locale.h

index f0ba32c..718b58d 100644 (file)
@@ -165,7 +165,7 @@ int sst_del_value(system_settings_key_e key, sst_interface_data_type data_type,
        DBG("Enter");
        RETVM_IF(key < 0 || SYSTEM_SETTINGS_KEY_MAX <= key,
                SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER, "Invalid Key(%d)", key);
-       
+
        sst_interface *iface = NULL;
        ret = sst_get_interface(key, &iface);
        if (SYSTEM_SETTINGS_ERROR_NONE != ret) {
index 757b28f..f85e99b 100644 (file)
@@ -282,7 +282,7 @@ struct _system_setting_s system_setting_table[] = {
                SYSTEM_SETTINGS_KEY_TIME_CHANGED,
                VCONFKEY_SYSTEM_TIME_CHANGED,
                SYSTEM_SETTING_DATA_TYPE_INT,
-               NULL,
+               sst_time_get_changed,
                NULL,
                sst_vconf_set_changed_cb,
                sst_vconf_unset_changed_cb,
index b978b97..27f9b55 100644 (file)
@@ -170,3 +170,13 @@ int sst_locale_set_timezone(sst_interface *iface, void *value)
 
        return SYSTEM_SETTINGS_ERROR_NONE;
 }
+
+//TODO : checking this function is being used or not.
+int sst_time_get_changed(sst_interface *iface, void **value)
+{
+       time_t cur_tick;
+       int ** val = (int**)value;
+       cur_tick = time(NULL);
+       **val = cur_tick;
+       return SYSTEM_SETTINGS_ERROR_NONE;
+}
index cc4357c..74509ad 100644 (file)
@@ -24,4 +24,5 @@ int sst_locale_set_language(sst_interface *iface, void *value);
 int sst_locale_get_timeformat_24hour(sst_interface *iface, void **value);
 int sst_locale_set_timeformat_24hour(sst_interface *iface, void *value);
 int sst_locale_get_timezone(sst_interface *iface, void **value);
-int sst_locale_set_timezone(sst_interface *iface, void *value);
\ No newline at end of file
+int sst_locale_set_timezone(sst_interface *iface, void *value);
+int sst_time_get_changed(sst_interface *iface, void **value);