Add TIME_CHANGED event
authorSung-jae Park <nicesj.park@samsung.com>
Tue, 15 Jan 2013 05:17:39 +0000 (14:17 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Tue, 15 Jan 2013 05:17:39 +0000 (14:17 +0900)
Change-Id: I268c3bcf3e52864165576061874b9727b98a368a

packaging/org.tizen.data-provider-slave.spec
src/main.c

index 78b3a83..d9057e2 100644 (file)
@@ -1,6 +1,6 @@
 Name: org.tizen.data-provider-slave
 Summary: Slave data provider
-Version: 0.9.0
+Version: 0.9.1
 Release: 1
 Group: main/app
 License: Flora License
index 4176a63..e72430b 100644 (file)
@@ -117,6 +117,15 @@ static Eina_Bool property_cb(void *data, int type, void *event)
        return ECORE_CALLBACK_PASS_ON;
 }
 
+static void time_changed_cb(keynode_t *node, void *user_data)
+{
+       if (vconf_keynode_get_int(node) != VCONFKEY_SYSMAN_STIME_CHANGED)
+               return;
+
+       DbgPrint("Time is changed\n");
+       lb_system_event_all(LB_SYS_EVENT_TIME_CHANGED);
+}
+
 static bool app_create(void *data)
 {
        int ret;
@@ -148,6 +157,9 @@ static bool app_create(void *data)
        ret = update_monitor_init();
        DbgPrint("Content update monitor is initiated: %d\n", ret);
 
+       ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_STIME, time_changed_cb, NULL);
+       DbgPrint("System time event callback added: %d\n", ret);
+
        return TRUE;
 }