Add internal API to get container 36/182736/5
authorhyunho <hhstark.kang@samsung.com>
Wed, 27 Jun 2018 11:06:34 +0000 (20:06 +0900)
committerhyunho <hhstark.kang@samsung.com>
Fri, 13 Jul 2018 02:34:11 +0000 (11:34 +0900)
Change-Id: Icac12e3ab9668a6513453d60ab74d69c8d7564bc
Signed-off-by: hyunho <hhstark.kang@samsung.com>
watchface-complication/watchface-editable.cc

index 767a6c8..65ec470 100644 (file)
@@ -207,7 +207,6 @@ extern "C" EXPORT_API int watchface_editable_add_complication(
 
   IEditable::Geometry editable_geo(geo->x, geo->y, geo->w, geo->h);
   SharedHandle<IEditable>::Share(sh).get()->SetGeo(editable_geo);
-
   if (ec->IsExist(edit_id)) {
     LOGE("ID already exist");
     return WATCHFACE_COMPLICATION_ERROR_EXIST_ID;
@@ -512,3 +511,20 @@ extern "C" EXPORT_API int watchface_editable_geometry_get(
 
   return WATCHFACE_COMPLICATION_ERROR_NONE;
 }
+
+extern "C" EXPORT_API int watchface_editable_container_get(
+    watchface_editable_container_h *container) {
+  if (container == NULL) {
+    LOGE("Invalid param");
+    return WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER;
+  }
+
+  if (__container == NULL) {
+    LOGE("Container is not ready yet");
+    return WATCHFACE_COMPLICATION_ERROR_IO_ERROR;
+  }
+
+  *container = __container;
+
+  return WATCHFACE_COMPLICATION_ERROR_NONE;
+}