Add missing internal API delaration 81/190781/9
authorhyunho <hhstark.kang@samsung.com>
Fri, 5 Oct 2018 08:17:45 +0000 (17:17 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Fri, 5 Oct 2018 08:23:29 +0000 (08:23 +0000)
Change-Id: Iab1536844347e9cb2f4901cef410a9ca224c414b
Signed-off-by: hyunho <hhstark.kang@samsung.com>
watchface-complication/CMakeLists.txt
watchface-complication/include/watchface-editable-internal.h [new file with mode: 0644]
watchface-complication/watchface-editable.cc
watchface-editor/include/watchface-editor.h

index c86b3cf..ecd184f 100644 (file)
@@ -52,5 +52,6 @@ SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROJECT_NAME}
 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR})
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/watchface-editable-internal.h DESTINATION include/${PROJECT_NAME})
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/watchface-editable.h DESTINATION include/${PROJECT_NAME})
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/watchface-complication.h DESTINATION include/${PROJECT_NAME})
\ No newline at end of file
diff --git a/watchface-complication/include/watchface-editable-internal.h b/watchface-complication/include/watchface-editable-internal.h
new file mode 100644 (file)
index 0000000..5ccb414
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_APPFW_WATCHFACE_EDITABLE_INTERNAL_H__
+#define __TIZEN_APPFW_WATCHFACE_EDITABLE_INTERNAL_H__
+
+#include <tizen.h>
+#include <glib.h>
+#include <bundle.h>
+
+#include <watchface-editable.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Gets current editable container
+ * @since_tizen 5.0
+ * @remarks Created candidates list should be destroyed after used.
+ * @param[out] container The editable container
+ * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
+ *         otherwise an error code (see #watchface_complication_error_e) on failure
+ * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
+ * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O Error
+ * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
+ * @par Sample code:
+ * @code
+{
+       watchface_editable_container_h container;
+
+       int ret = watchface_editable_container_get(&container);
+       if (ret != WATCHFACE_COMPLICATION_ERROR_NONE)
+               return;
+}
+ * @endcode
+ */
+int watchface_editable_container_get(watchface_editable_container_h *container);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  /* __TIZEN_APPFW_WATCHFACE_EDITABLE_INTERNAL_H__ */
index c3bc1fc..57aad0b 100644 (file)
@@ -21,6 +21,7 @@
 #include <string>
 
 #include "watchface-complication/include/watchface-editable.h"
+#include "watchface-complication/include/watchface-editable-internal.h"
 #include "watchface-complication/editables-container.h"
 #include "watchface-complication/design-element.h"
 #include "watchface-complication/shared-handle.h"
index bf27d7a..9e4118b 100644 (file)
@@ -548,6 +548,36 @@ int watchface_editor_get_complication_is_supported(const bundle *candidate_data,
                        char **error_message);
 
 /**
+ * @brief Gets editable's setup appid.
+ * @since_tizen 5.0
+ * @param[in] handle The editable handle
+ * @param[out] setup_appid The complication application's setup appid.
+ * @return #WATCHFACE_COMPLICATION_ERROR_NONE if success, other value if failure
+ * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Success
+ * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
+ * @retval #WATCHFACE_COMPLICATION_ERROR_NO_DATA No data available
+ * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
+ * @par Sample code:
+ * @code
+#include <watchface-complication.h>
+
+int _on_request_edit(const char *appid, editable_list_h list_h,
+                             void *user_data)
+{
+       const watchface_editable_h ed;
+       char *setup_appid;
+
+       watchface_editor_editable_list_get_nth(s_info.list_h, 0, &ed);
+       watchface_editor_get_setup_appid(ed, &setup_appid);
+       return 0;
+}
+ * @endcode
+ */
+int watchface_editor_get_setup_appid(
+               watchface_editable_h handle, char** setup_appid);
+
+/**
  * @}
  */