Chang the name of the api receiving candidate data 25/174325/3
authormk5004.lee <mk5004.lee@samsung.com>
Fri, 30 Mar 2018 05:49:31 +0000 (14:49 +0900)
committermk5004.lee <mk5004.lee@samsung.com>
Fri, 30 Mar 2018 07:57:51 +0000 (16:57 +0900)
Change-Id: I8126dd4c7a915ff88918897c65663b63b776c38e
Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
watchface-complication/include/watchface-complication.h
watchface-complication/watchface-complication.cc
watchface-editor/include/watchface-editor.h
watchface-editor/watchface-editor.cc

index aa60b05..dc525cf 100755 (executable)
@@ -69,10 +69,6 @@ int complication_create(int complication_id, const char *default_provider_id,
                         complication_shape_type type,
                         complication_h *created_handle);
 int complication_destroy(complication_h handle);
-int complication_get_provider_id(const bundle *candidate,
-    const char **provider_id);
-int complication_get_type(const bundle *candidate,
-    complication_type *cur_type);
 int complication_get_short_text_data(bundle *data, char **text, char **icon,
     char **title);
 int complication_get_long_text_data(bundle *data, char **text, char **icon,
index 66f409a..00de042 100755 (executable)
@@ -192,40 +192,6 @@ extern "C" EXPORT_API int complication_get_cur_type(complication_h handle,
   return COMPLICATION_ERROR_NONE;
 }
 
-extern "C" EXPORT_API int complication_get_provider_id(const bundle* candidate,
-    const char** provider_id) {
-  if (candidate == NULL || provider_id == NULL)
-    return COMPLICATION_ERROR_INVALID_PARAMETER;
-
-  char* val = NULL;
-
-  bundle_get_str(const_cast<bundle*>(candidate),
-      Complication::GetProviderIdKey(), &val);
-  if (val != NULL)
-    *provider_id = val;
-  else
-    return COMPLICATION_ERROR_INVALID_PARAMETER;
-
-  return COMPLICATION_ERROR_NONE;
-}
-
-extern "C" EXPORT_API int complication_get_type(const bundle* candidate,
-    complication_type* cur_type) {
-  if (candidate == NULL || cur_type == NULL)
-    return COMPLICATION_ERROR_INVALID_PARAMETER;
-
-  char* val = NULL;
-
-  bundle_get_str(const_cast<bundle*>(candidate),
-      Complication::GetProviderTypeKey(), &val);
-  if (val != NULL)
-    *cur_type = static_cast<complication_type>(atoi(val));
-  else
-    return COMPLICATION_ERROR_INVALID_PARAMETER;
-
-  return COMPLICATION_ERROR_NONE;
-}
-
 extern "C" EXPORT_API int complication_get_short_text_data(bundle* data,
     char** text, char** icon, char** title) {
 
@@ -369,4 +335,4 @@ extern "C" EXPORT_API int complication_get_image_value_data(bundle* data,
   }
 
   return COMPLICATION_ERROR_NONE;
-}
\ No newline at end of file
+}
index e75e5f5..b145e3b 100755 (executable)
@@ -136,6 +136,11 @@ int editor_launch_setup_app(const editable_h handle, on_setup_result cb, void *u
  */
 int editor_is_setup_app_exist(const editable_h handle, bool *exist);
 
+int editor_get_camplication_provider_id(const bundle *camplication,
+    const char **provider_id);
+int editor_get_camplication_type(const bundle *camplication,
+    complication_type *cur_type);
+
 /**
  * @}
  */
index 08bdbc7..7d6534f 100755 (executable)
@@ -391,3 +391,37 @@ extern "C" EXPORT_API int editor_launch_setup_app(const editable_h handle,
 
   return COMPLICATION_ERROR_NONE;
 }
+
+extern "C" EXPORT_API int editor_get_complication_provider_id(
+    const bundle* complication, const char **provider_id) {
+  if (complication == NULL || provider_id == NULL)
+    return COMPLICATION_ERROR_INVALID_PARAMETER;
+
+  char *val = NULL;
+
+  bundle_get_str(const_cast<bundle*>(complication),
+      Complication::GetProviderIdKey(), &val);
+  if (val != NULL)
+    *provider_id = val;
+  else
+    return COMPLICATION_ERROR_INVALID_PARAMETER;
+
+  return COMPLICATION_ERROR_NONE;
+}
+
+extern "C" EXPORT_API int editor_get_complication_type(
+    const bundle* complication, complication_type *cur_type) {
+  if (complication == NULL || cur_type == NULL)
+    return COMPLICATION_ERROR_INVALID_PARAMETER;
+
+  char* val = NULL;
+
+  bundle_get_str(const_cast<bundle*>(complication),
+      Complication::GetProviderTypeKey(), &val);
+  if (val != NULL)
+    *cur_type = static_cast<complication_type>(atoi(val));
+  else
+    return COMPLICATION_ERROR_INVALID_PARAMETER;
+
+  return COMPLICATION_ERROR_NONE;
+}