From: hyunho Date: Fri, 5 Oct 2018 08:17:45 +0000 (+0900) Subject: Add missing internal API delaration X-Git-Tag: accepted/tizen/unified/20181010.061715~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=180181b06676f184b7a1dc919d13e3fb99befa10;p=platform%2Fcore%2Fappfw%2Fwatchface-complication.git Add missing internal API delaration Change-Id: Iab1536844347e9cb2f4901cef410a9ca224c414b Signed-off-by: hyunho --- diff --git a/watchface-complication/CMakeLists.txt b/watchface-complication/CMakeLists.txt index c86b3cf..ecd184f 100644 --- a/watchface-complication/CMakeLists.txt +++ b/watchface-complication/CMakeLists.txt @@ -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 index 0000000..5ccb414 --- /dev/null +++ b/watchface-complication/include/watchface-editable-internal.h @@ -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 +#include +#include + +#include + +#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__ */ diff --git a/watchface-complication/watchface-editable.cc b/watchface-complication/watchface-editable.cc index c3bc1fc..57aad0b 100644 --- a/watchface-complication/watchface-editable.cc +++ b/watchface-complication/watchface-editable.cc @@ -21,6 +21,7 @@ #include #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" diff --git a/watchface-editor/include/watchface-editor.h b/watchface-editor/include/watchface-editor.h index bf27d7a..9e4118b 100644 --- a/watchface-editor/include/watchface-editor.h +++ b/watchface-editor/include/watchface-editor.h @@ -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 + +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); + +/** * @} */