#define PMINFO_PKGINFO_PROP_PACKAGE_APPSETTING "PMINFO_PKGINFO_PROP_PACKAGE_APPSETTING"
/** Boolean property for filtering based on package info*/
#define PMINFO_PKGINFO_PROP_PACKAGE_NODISPLAY_SETTING "PMINFO_PKGINFO_PROP_PACKAGE_NODISPLAY_SETTING"
+ /** Boolean property for filtering based on package info*/
+#define PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE "PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE"
/** Integer property for filtering based on package info*/
#define PMINFO_PKGINFO_PROP_PACKAGE_SIZE "PMINFO_PKGINFO_PROP_PACKAGE_SIZE"
#define PMINFO_APPINFO_PROP_APP_LAUNCHCONDITION "PMINFO_APPINFO_PROP_APP_LAUNCHCONDITION"
/** Boolean property for filtering based on app info*/
#define PMINFO_APPINFO_PROP_APP_UI_GADGET "PMINFO_APPINFO_PROP_APP_UI_GADGET"
+ /** Boolean property for filtering based on app info*/
+#define PMINFO_APPINFO_PROP_APP_SUPPORT_DISABLE "PMINFO_APPINFO_PROP_APP_SUPPORT_DISABLE"
/** will be updated*/
/** string property for filtering based on pkg info*/
*/
int pkgmgrinfo_pkginfo_is_update(pkgmgrinfo_pkginfo_h handle, bool *update);
+/**
+ * @fn int pkgmgrinfo_pkginfo_is_support_disable(pkgmgrinfo_pkginfo_h handle, bool *support_disable)
+ * @brief This API gets the package 'support_disable' value from the package ID
+ *
+ * @par This API is for package-manager client application
+ * @par Sync (or) Async : Synchronous API
+ *
+ * @param[in] handle pointer to package info handle
+ * @param[out] support_disable pointer to hold package support_disable 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
+ * @pre pkgmgrinfo_pkginfo_get_pkginfo()
+ * @post pkgmgrinfo_pkginfo_destroy_pkginfo()
+ * @see pkgmgrinfo_pkginfo_get_pkgid()
+ * @code
+static int get_pkg_support_disable(const char *pkgid)
+{
+ int ret = 0;
+ bool support_disable;
+ pkgmgrinfo_pkginfo_h handle = NULL;
+ ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_pkginfo_is_support_disable(handle, &support_disable);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ return -1;
+ }
+ printf("pkg support_disable: %d\n", support_disable);
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_pkginfo_is_support_disable(pkgmgrinfo_pkginfo_h handle, bool *support_disable);
/**
* @fn int pkgmgrinfo_pkginfo_is_global(uid_t uid, const char *pkgid)
int pkgmgrinfo_appinfo_is_ui_gadget(pkgmgrinfo_appinfo_h handle, bool *ui_gadget);
/**
+ * @fn int pkgmgrinfo_appinfo_is_support_disable(pkgmgrinfo_appinfo_h handle, bool *support_disable)
+ * @brief This API gets the application 'support_disable' 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] support_disable pointer to hold package support_disable value
+ * @return 0 if success, error code(<0) if fail
+ * @retval PMINFO_R_OK success
+ * @retval PMINFO_R_EINVAL invalid argument
+ * @pre pkgmgrinfo_appinfo_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @code
+static int get_app_support_disable(const char *appid)
+{
+ int ret = 0;
+ bool support_disable;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_is_support_disable(handle, &support_disable);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("app support_disable: %d\n", support_disable);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_is_support_disable(pkgmgrinfo_appinfo_h handle, bool *support_disable);
+
+/**
* @fn int pkgmgrinfo_appinfo_destroy_appinfo(pkgmgrinfo_appinfo_h handle)
* @brief This API destroys the application information handle freeing up all the resources
*
const char *submode_mainid;
const char *launch_mode;
const char *ui_gadget;
+ const char *support_disable;
const char *component_type;
const char *package;
struct label_x *label;
const char *submode_mainid;
const char *launch_mode;
const char *ui_gadget;
+ const char *support_disable;
struct label_x *label;
struct icon_x *icon;
struct image_x *image;
const char *csc_path; /**< package csc path*/
const char *nodisplay_setting; /**< package no display setting menu*/
const char *api_version; /**< minimum version of API package using*/
+ const char *support_disable; /**< package support disable flag*/
struct icon_x *icon; /**< package icon*/
struct label_x *label; /**< package label*/
struct author_x *author; /**< package author*/
E_PMINFO_PKGINFO_PROP_PACKAGE_UPDATE,
E_PMINFO_PKGINFO_PROP_PACKAGE_APPSETTING,
E_PMINFO_PKGINFO_PROP_PACKAGE_NODISPLAY_SETTING,
- E_PMINFO_PKGINFO_PROP_PACKAGE_MAX_BOOL = E_PMINFO_PKGINFO_PROP_PACKAGE_NODISPLAY_SETTING
+ E_PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE,
+ E_PMINFO_PKGINFO_PROP_PACKAGE_MAX_BOOL = E_PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE
} pkgmgrinfo_pkginfo_filter_prop_bool;
/*Integer properties for filtering based on package info*/
E_PMINFO_APPINFO_PROP_APP_TASKMANAGE,
E_PMINFO_APPINFO_PROP_APP_LAUNCHCONDITION,
E_PMINFO_APPINFO_PROP_APP_UI_GADGET,
- E_PMINFO_APPINFO_PROP_APP_MAX_BOOL = E_PMINFO_APPINFO_PROP_APP_UI_GADGET
+ E_PMINFO_APPINFO_PROP_APP_SUPPORT_DISABLE,
+ E_PMINFO_APPINFO_PROP_APP_MAX_BOOL = E_PMINFO_APPINFO_PROP_APP_SUPPORT_DISABLE
} pkgmgrinfo_appinfo_filter_prop_bool;
/*Integer properties for filtering based on app info*/
<xs:attribute name="nodisplay-setting" type="xs:boolean"/>
<xs:attribute name="url" type="xs:string"/>
<xs:attribute name="api-version" type="xs:string"/>
+ <xs:attribute name="support-disable" type="xs:boolean"/>
</xs:complexType>
</xs:element>
__save_xml_attribute(reader, "nodisplay-setting", &mfx->nodisplay_setting, "false");
__save_xml_attribute(reader, "url", &mfx->package_url, NULL);
__save_xml_attribute(reader, "api-version", &mfx->api_version, NULL);
+ __save_xml_attribute(reader, "support-disable", &mfx->support_disable, "false");
__save_xml_installed_time(mfx);
__save_xml_root_path(mfx, uid);
"mainapp_id text," \
"package_url text," \
"root_path text," \
- "csc_path text )"
+ "csc_path text," \
+ "package_support_disable text DEFAULT 'false')"
#define QUERY_CREATE_TABLE_PACKAGE_LOCALIZED_INFO "create table if not exists package_localized_info " \
"(package text not null, " \
"app_submode_mainid text, " \
"app_launch_mode text NOT NULL DEFAULT 'caller', " \
"app_ui_gadget text DEFAULT 'false', " \
+ "app_support_disable text DEFAULT 'false', " \
"component_type text, " \
"package text not null, " \
"FOREIGN KEY(package) " \
"insert into package_app_info(app_id, app_component, app_exec, app_nodisplay, app_type, app_onboot, " \
"app_multiple, app_autorestart, app_taskmanage, app_enabled, app_hwacceleration, app_screenreader, app_mainapp , app_recentimage, " \
"app_launchcondition, app_indicatordisplay, app_portraitimg, app_landscapeimg, app_guestmodevisibility, app_permissiontype, "\
- "app_preload, app_submode, app_submode_mainid, app_launch_mode, app_ui_gadget, component_type, package) " \
- "values('%s', '%s', '%s', '%s', '%s', '%s', '%s','%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')",\
+ "app_preload, app_submode, app_submode_mainid, app_launch_mode, app_ui_gadget, app_support_disable, component_type, package) " \
+ "values('%s', '%s', '%s', '%s', '%s', '%s', '%s','%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')",\
up->appid,
"uiapp",
up->exec,
__get_str(up->submode_mainid),
up->launch_mode,
up->ui_gadget,
+ mfx->support_disable,
up->component_type,
mfx->package);
snprintf(query, MAX_QUERY_LEN,
"insert into package_info(package, package_type, package_version, package_api_version, install_location, package_size, " \
"package_removable, package_preload, package_readonly, package_update, package_appsetting, package_nodisplay, package_system," \
- "author_name, author_email, author_href, installed_time, installed_storage, storeclient_id, mainapp_id, package_url, root_path, csc_path) " \
- "values('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')",\
+ "author_name, author_email, author_href, installed_time, installed_storage, storeclient_id, mainapp_id, package_url, root_path, csc_path, package_support_disable) " \
+ "values('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')",\
mfx->package,
mfx->type,
mfx->version,
mfx->mainapp_id,
__get_str(mfx->package_url),
mfx->root_path,
- __get_str(mfx->csc_path));
+ __get_str(mfx->csc_path),
+ mfx->support_disable);
ret = __exec_query(query);
if (ret == -1) {
"app_landscapeimg, app_guestmodevisibility, "
"app_permissiontype, app_preload, app_submode, "
"app_submode_mainid, app_launch_mode, app_ui_gadget, "
+ "app_support_disable, "
"component_type, package "
"FROM package_app_info WHERE app_id=%Q";
int ret;
_save_column_str(stmt, idx++, &info->submode_mainid);
_save_column_str(stmt, idx++, &info->launch_mode);
_save_column_str(stmt, idx++, &info->ui_gadget);
+ _save_column_str(stmt, idx++, &info->support_disable);
_save_column_str(stmt, idx++, &info->component_type);
_save_column_str(stmt, idx++, &info->package);
return PMINFO_R_OK;
}
+API int pkgmgrinfo_appinfo_is_support_disable(pkgmgrinfo_appinfo_h handle,
+ bool *support_disable)
+{
+ pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
+
+ if (info == NULL || info->app_info == NULL || support_disable == NULL) {
+ _LOGE("invalid parameter");
+ return PMINFO_R_EINVAL;
+ }
+
+ *support_disable = _get_bool_value(info->app_info->support_disable);
+
+ return PMINFO_R_OK;
+}
+
API int pkgmgrinfo_appinfo_destroy_appinfo(pkgmgrinfo_appinfo_h handle)
{
retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
free((void *)uiapplication->ui_gadget);
uiapplication->ui_gadget = NULL;
}
+ if (uiapplication->support_disable) {
+ free((void *)uiapplication->support_disable);
+ uiapplication->support_disable = NULL;
+ }
free((void*)uiapplication);
uiapplication = NULL;
free((void *)application->component_type);
if (application->package)
free((void *)application->package);
+ if (application->support_disable)
+ free((void *)application->support_disable);
/*Free Label*/
if (application->label) {
free((void *)package->api_version);
package->api_version = NULL;
}
+ if (package->support_disable) {
+ free((void *)package->support_disable);
+ package->support_disable = NULL;
+ }
/*Free Icon*/
if (package->icon) {
"package_readonly, package_update, package_appsetting, "
"package_system, package_type, package_size, installed_time, "
"installed_storage, storeclient_id, mainapp_id, package_url, "
- "root_path, csc_path, package_nodisplay, package_api_version "
+ "root_path, csc_path, package_nodisplay, package_api_version, "
+ "package_support_disable "
"FROM package_info WHERE package=%Q";
int ret;
char *query;
_save_column_str(stmt, idx++, &info->csc_path);
_save_column_str(stmt, idx++, &info->nodisplay_setting);
_save_column_str(stmt, idx++, &info->api_version);
+ _save_column_str(stmt, idx++, &info->support_disable);
if (_pkginfo_get_author(db, info->package, &info->author)) {
pkgmgrinfo_basic_free_package(info);
return PMINFO_R_OK;
}
+API int pkgmgrinfo_pkginfo_is_support_disable(pkgmgrinfo_pkginfo_h handle, bool *support_disable)
+{
+ char *val;
+ pkgmgr_pkginfo_x *info = (pkgmgr_pkginfo_x *)handle;
+
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "pkginfo handle is NULL\n");
+ retvm_if(support_disable == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL\n");
+
+ if (info->pkg_info == NULL || info->pkg_info->support_disable == NULL)
+ return PMINFO_R_ERROR;
+
+ val = (char *)info->pkg_info->support_disable;
+ if (strcasecmp(val, "true") == 0)
+ *support_disable = 1;
+ else if (strcasecmp(val, "false") == 0)
+ *support_disable = 0;
+ else
+ *support_disable = 1;
+
+ return PMINFO_R_OK;
+}
+
API int pkgmgrinfo_pkginfo_is_for_all_users(pkgmgrinfo_pkginfo_h handle, bool *for_all_users)
{
char *val;
return PMINFO_R_OK;
}
-
API int pkgmgrinfo_pkginfo_destroy_pkginfo(pkgmgrinfo_pkginfo_h handle)
{
pkgmgr_pkginfo_x *info = (pkgmgr_pkginfo_x *)handle;
{E_PMINFO_PKGINFO_PROP_PACKAGE_READONLY, PMINFO_PKGINFO_PROP_PACKAGE_READONLY},
{E_PMINFO_PKGINFO_PROP_PACKAGE_UPDATE, PMINFO_PKGINFO_PROP_PACKAGE_UPDATE},
{E_PMINFO_PKGINFO_PROP_PACKAGE_APPSETTING, PMINFO_PKGINFO_PROP_PACKAGE_APPSETTING},
- {E_PMINFO_PKGINFO_PROP_PACKAGE_NODISPLAY_SETTING, PMINFO_PKGINFO_PROP_PACKAGE_NODISPLAY_SETTING}
+ {E_PMINFO_PKGINFO_PROP_PACKAGE_NODISPLAY_SETTING, PMINFO_PKGINFO_PROP_PACKAGE_NODISPLAY_SETTING},
+ {E_PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE, PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE}
};
struct _appinfo_str_map_t {
{E_PMINFO_APPINFO_PROP_APP_AUTORESTART, PMINFO_APPINFO_PROP_APP_AUTORESTART},
{E_PMINFO_APPINFO_PROP_APP_TASKMANAGE, PMINFO_APPINFO_PROP_APP_TASKMANAGE},
{E_PMINFO_APPINFO_PROP_APP_LAUNCHCONDITION, PMINFO_APPINFO_PROP_APP_LAUNCHCONDITION},
- {E_PMINFO_APPINFO_PROP_APP_UI_GADGET, PMINFO_APPINFO_PROP_APP_UI_GADGET}
+ {E_PMINFO_APPINFO_PROP_APP_UI_GADGET, PMINFO_APPINFO_PROP_APP_UI_GADGET},
+ {E_PMINFO_APPINFO_PROP_APP_SUPPORT_DISABLE, PMINFO_APPINFO_PROP_APP_SUPPORT_DISABLE}
};
inline pkgmgrinfo_pkginfo_filter_prop_str _pminfo_pkginfo_convert_to_prop_str(const char *property)
case E_PMINFO_PKGINFO_PROP_PACKAGE_NODISPLAY_SETTING:
snprintf(buf, sizeof(buf), "package_info.package_nodisplay IN %s", node->value);
break;
+ case E_PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE:
+ snprintf(buf, sizeof(buf), "package_info.package_support_disable IN %s", node->value);
+ break;
case E_PMINFO_APPINFO_PROP_APP_ID:
snprintf(buf, sizeof(buf), "package_app_info.app_id='%s'", node->value);
case E_PMINFO_APPINFO_PROP_APP_METADATA_VALUE:
snprintf(buf, sizeof(buf), "package_app_app_metadata.md_value='%s'", node->value);
break;
+ case E_PMINFO_APPINFO_PROP_APP_SUPPORT_DISABLE:
+ snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_support_disable IN %s", node->value);
+ break;
default:
_LOGE("Invalid Property Type\n");
*condition = NULL;