X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fpkgmgr-info.h;h=134af6451f2b94db2580abcc823419c8762f43e3;hb=40dab426ff2db0e6ae94dc3d5495580015e8f2df;hp=8f16df45346ecf90cd0aed580344559781833291;hpb=efa99f2893bd7d827d7ff5bed76c24db5d1d63de;p=platform%2Fcore%2Fappfw%2Fpkgmgr-info.git diff --git a/include/pkgmgr-info.h b/include/pkgmgr-info.h index 8f16df4..134af64 100644 --- a/include/pkgmgr-info.h +++ b/include/pkgmgr-info.h @@ -1722,6 +1722,42 @@ static int get_res_version(const char *pkgid) int pkgmgrinfo_pkginfo_get_res_version(pkgmgrinfo_pkginfo_h handle, char **res_version); /** + * @fn int pkgmgrinfo_pkginfo_get_light_user_switch_mode(pkgmgrinfo_pkginfo_h handle, char **mode) + * @brief This API gets the light_user_switch_mode of package + * + * @par Sync (or) Async : Synchronous API + * + * @param[in] handle pointer to package info handle + * @param[out] mode pointer to hold resource version of package + * @return 0 if success, error code(<0) if fail + * @retval PMINFO_R_OK success + * @retval PMINFO_R_EINVAL invalid argument + * @retval PMINFO_R_ERROR internal error + * @code +static int get_light_user_switch_mode(const char *pkgid) +{ + int ret = 0; + char *mode = 0; + pkgmgrinfo_pkginfo_h handle; + ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &handle); + if (ret != PMINFO_R_OK) + return -1; + + ret = pkgmgrinfo_pkginfo_get_light_user_switch_mode(handle, &mode); + if (ret != PMINFO_R_OK) { + pkgmgrinfo_pkginfo_destroy_pkginfo(handle); + return -1; + } + printf("light_user_switch_mode : %s\n", mode); + pkgmgrinfo_pkginfo_destroy_pkginfo(handle); + + return 0; +} + * @endcode + */ +int pkgmgrinfo_pkginfo_get_light_user_switch_mode(pkgmgrinfo_pkginfo_h handle, char **mode); + +/** * @fn int pkgmgrinfo_pkginfo_get_support_mode(pkgmgrinfo_pkginfo_h handle, int *support_mode) * @brief This API gets the support_mode of package * @@ -5148,6 +5184,22 @@ int pkgmgrinfo_appinfo_get_setup_appid(pkgmgrinfo_appinfo_h handle, char **setup int pkgmgrinfo_appinfo_is_support_ambient(pkgmgrinfo_appinfo_h handle, bool *support_ambient); /** + * @fn int pkgmgrinfo_appinfo_get_light_user_switch_mode(pkgmgrinfo_appinfo_h handle, char *mode) + * @brief This API gets the application 'light_user_switch_mode' value from the app ID + * + * @par This API is for package-manager client application + * @par Sync (or) Async : Synchronous API + * + * @param[in] handle pointer to application info handle + * @param[out] mode pointer to hold package light_user_switch_mode value + * @return 0 if success, error code(<0) if fail + * @retval PMINFO_R_OK success + * @retval PMINFO_R_EINVAL invalid argument + * @retval PMINFO_R_ERROR internal error + */ +int pkgmgrinfo_appinfo_get_light_user_switch_mode(pkgmgrinfo_appinfo_h handle, char **mode); + +/** * @fn int pkgmgrinfo_appinfo_destroy_appinfo(pkgmgrinfo_appinfo_h handle) * @brief This API destroys the application information handle freeing up all the resources *