From: Hwankyu Jhun Date: Tue, 4 Aug 2020 04:54:09 +0000 (+0900) Subject: Add new functions to add app group X-Git-Tag: accepted/tizen/6.0/unified/20201030.122158~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ed3dc0cbc277b115a05698de2b59aa4039cb943;p=platform%2Fcore%2Fapi%2Fapp-manager.git Add new functions to add app group Adds: - app_manager_add_app_group() - app_manager_remove_app_group() Requires: - https://review.tizen.org/gerrit/#/c/platform/core/appfw/aul-1/+/240130/ - https://review.tizen.org/gerrit/#/c/platform/core/appfw/amd/+/240146/ Change-Id: Icd3025e85615c4a3e27f4ebcdb849d675dafcd65 Signed-off-by: Hwankyu Jhun --- diff --git a/include/app_manager_extension.h b/include/app_manager_extension.h index 5b24761..098eab4 100644 --- a/include/app_manager_extension.h +++ b/include/app_manager_extension.h @@ -202,6 +202,35 @@ int app_manager_unset_app_context_status_cb(app_manager_app_context_status_cb ca int app_manager_foreach_visible_app_context(app_manager_app_context_cb callback, void *user_data); /** + * @brief Adds a new group information to the app group. + * @details A new app group will be added using the given window ID. + * @since_tizen 6.0 + * + * @parma[in] win_id The window ID + * @return @c 0 on success, + * otherwise a negative error value + * @retval #APP_MANAGER_ERROR_NONE Successful + * @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #APP_MANAGER_ERROR_IO_ERROR I/O error + * @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memroy + */ +int app_manager_add_app_group(int win_id); + +/** + * @brief Removes the app group using the given window ID. + * @since_tizen 6.0 + * + * @param[in] win_id The window ID + * @return @c 0 on success, + * otherwise a negative error value + * @retval #APP_MANAGER_ERROR_NONE Successful + * @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #APP_MANAGER_ERROR_IO_ERROR I/O error + * @retval #APP_MANAGER_ERROR_OUT_OF_MEMORY Out of memroy + */ +int app_manager_remove_app_group(int win_id); + +/** * @} */ diff --git a/src/app_manager.c b/src/app_manager.c index a02d747..8956f81 100644 --- a/src/app_manager.c +++ b/src/app_manager.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -693,3 +694,25 @@ API int app_manager_foreach_visible_app_context(app_manager_app_context_cb callb return APP_MANAGER_ERROR_NONE; } + +API int app_manager_add_app_group(int win_id) +{ + int ret; + + ret = aul_app_group_add(win_id); + if (ret != AUL_R_OK) + return app_manager_error(__aul_error_convert(ret), __FUNCTION__, NULL); + + return APP_MANAGER_ERROR_NONE; +} + +API int app_manager_remove_app_group(int win_id) +{ + int ret; + + ret = aul_app_group_remove(win_id); + if (ret != AUL_R_OK) + return app_manager_error(__aul_error_convert(ret), __FUNCTION__, NULL); + + return APP_MANAGER_ERROR_NONE; +}