Fix the name of Policy Changed Callback API 84/67784/1
authorSungjun, Lee <sjun221.lee@samsung.com>
Thu, 28 Apr 2016 08:18:14 +0000 (17:18 +0900)
committerSungjun, Lee <sjun221.lee@samsung.com>
Thu, 28 Apr 2016 08:18:14 +0000 (17:18 +0900)
Change-Id: Ie01f36d34a19da60597b18fe58cda1cbab8727ac
Signed-off-by: Sungjun, Lee <sjun221.lee@samsung.com>
libs/dpm/client-handle.cpp

index e878ffe..4b818cb 100644 (file)
@@ -52,12 +52,12 @@ int dpm_context_destroy(dpm_context_h handle)
     return 0;
 }
 
-int dpm_add_policy_changed_listener(dpm_context_h handle, const char* name, dpm_policy_changed_cb handler, void* user_data, int* id)
+int dpm_context_add_policy_changed_cb(dpm_context_h handle, const char* name, dpm_policy_changed_cb callback, void* user_data, int* id)
 {
     assert(handle);
 
     DevicePolicyContext& client = GetDevicePolicyContext(handle);
-    int ret = client.subscribePolicyChange(name, handler, user_data);
+    int ret = client.subscribePolicyChange(name, callback, user_data);
     if (ret < 0) {
         return -1;
     }
@@ -66,12 +66,14 @@ int dpm_add_policy_changed_listener(dpm_context_h handle, const char* name, dpm_
     return 0;
 }
 
-void dpm_remove_policy_change_listener(dpm_context_h handle, int id)
+int dpm_context_remove_policy_changed_cb(dpm_context_h handle, int id)
 {
     assert(handle);
 
     DevicePolicyContext& client = GetDevicePolicyContext(handle);
     client.unsubscribePolicyChange(id);
+
+    return 0;
 }
 
 int dpm_context_add_signal_cb(dpm_context_h handle, const char* signal, dpm_signal_cb callback, void* user_data, int *id)