From: junsuk77.oh Date: Wed, 26 Jul 2017 00:39:15 +0000 (+0900) Subject: Add new api to check application support ambient mode X-Git-Tag: submit/tizen_3.0/20170821.044810~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0f585a2515109b70ad09ddd89750686b6ab9d3d;p=platform%2Fcore%2Fapi%2Fapp-manager.git Add new api to check application support ambient mode Change-Id: Ia1dcdf9c148d0c5ef3f70f9af6013d54a8b811a0 Signed-off-by: junsuk77.oh --- diff --git a/include/app_info_extension.h b/include/app_info_extension.h index cf23ece..1dcb8d0 100644 --- a/include/app_info_extension.h +++ b/include/app_info_extension.h @@ -114,6 +114,19 @@ int app_info_foreach_category(app_info_h app_info, app_info_category_cb callback */ int app_info_get_app_component_type(app_info_h app_info, app_info_app_component_type_e *type); +/** + * @brief Checks whether application supports ambient mode. + * @since_tizen 3.0 + * @param[in] app_info The application information + * @param[out] support_ambient @c true if the application support ambient mode, \n + * otherwise @c false + * @return @c 0 on success, + * otherwise a negative error value + * @retval #APP_MANAGER_ERROR_NONE Successful + * @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter + */ +int app_info_is_support_ambient(app_info_h app_info, bool *support_ambient); + #ifdef __cplusplus } #endif diff --git a/src/app_info.c b/src/app_info.c index fc60880..46d42f4 100644 --- a/src/app_info.c +++ b/src/app_info.c @@ -662,6 +662,20 @@ API int app_info_is_preload(app_info_h app_info, bool *preload) return APP_MANAGER_ERROR_NONE; } +API int app_info_is_support_ambient(app_info_h app_info, bool *support_ambient) +{ + bool val; + + if (app_info == NULL || support_ambient == NULL) + return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL); + + if (pkgmgrinfo_appinfo_is_support_ambient(app_info->pkg_app_info, &val) < 0) + return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL); + + *support_ambient = val; + return APP_MANAGER_ERROR_NONE; +} + API int app_info_clone(app_info_h *clone, app_info_h app_info) { app_info_h info;