E_PMINFO_APPINFO_PROP_APP_MIME,
E_PMINFO_APPINFO_PROP_APP_HWACCELERATION,
E_PMINFO_APPINFO_PROP_APP_CATEGORY,
+ E_PMINFO_APPINFO_PROP_APP_SCREENREADER,
E_PMINFO_APPINFO_PROP_APP_MAX_STR = E_PMINFO_APPINFO_PROP_APP_CATEGORY
} pkgmgrinfo_appinfo_filter_prop_str;
}pkgmgrinfo_app_hwacceleration;
typedef enum {
+ PMINFO_SCREENREADER_OFF = 0, /**< Don't use screen reader*/
+ PMINFO_SCREENREADER_ON = 1, /**< Use screen reader*/
+ PMINFO_SCREENREADER_USE_SYSTEM_SETTING = 2 /**< Follow system setting for screen reader */
+}pkgmgrinfo_app_screenreader;
+
+typedef enum {
PMINFO_RECENTIMAGE_USE_ICON = 0, /**<Use icon for recent image*/
PMINFO_RECENTIMAGE_USE_CAPTURE = 1, /**< Use capture for recent image*/
PMINFO_RECENTIMAGE_USE_NOTHING = 2 /**< Don't use recent image */
#define PMINFO_APPINFO_PROP_APP_CATEGORY "PMINFO_APPINFO_PROP_APP_CATEGORY"
/** String property for filtering based on app info*/
#define PMINFO_APPINFO_PROP_APP_HWACCELERATION "PMINFO_APPINFO_PROP_APP_HWACCELERATION"
+ /** String property for filtering based on app info*/
+#define PMINFO_APPINFO_PROP_APP_SCREENREADER "PMINFO_APPINFO_PROP_APP_SCREENREADER"
/** Boolean property for filtering based on app info*/
#define PMINFO_APPINFO_PROP_APP_NODISPLAY "PMINFO_APPINFO_PROP_APP_NODISPLAY"
int pkgmgrinfo_appinfo_get_hwacceleration(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_hwacceleration *hwacceleration);
/**
+ * @fn int pkgmgrinfo_appinfo_get_screenreader(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_screenreader *screenreader)
+ * @brief This API gets the application 'screenreader' 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] screenreader pointer to hold package accessibility 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_appinfo_get_appinfo()
+ * @post pkgmgrinfo_appinfo_destroy_appinfo()
+ * @see pkgmgrinfo_appinfo_get_appid()
+ * @see pkgmgrinfo_appinfo_is_multiple()
+ * @code
+static int get_app_screenreader(const char *appid)
+{
+ int ret = 0;
+ pkgmgrinfo_app_screenreader screenreader = PMINFO_USE_SYSTEM_SETTING;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_get_screenreader(handle, &screenreader);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ printf("app screenreader: %d\n", screenreader);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_get_screenreader(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_screenreader *screenreader);
+
+/**
* @fn int pkgmgrinfo_appinfo_get_effectimage(pkgmgrinfo_appinfo_h handle, char **portrait_img, char **landscape_img)
* @brief This API gets the application's landscape & portrait effect images
*
Name: pkgmgr-info
Summary: Packager Manager infomation api for package
-Version: 0.0.126
+Version: 0.0.127
Release: 1
Group: Application Framework/Package Management
License: Apache-2.0
<xs:enumeration value="use-system-setting"/>
</xs:restriction>
</xs:simpleType>
+ <xs:simpleType name="ScreenReaderType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="screenreader-off"/>
+ <xs:enumeration value="screenreader-on"/>
+ <xs:enumeration value="use-system-setting"/>
+ </xs:restriction>
+ </xs:simpleType>
<xs:simpleType name="RecentImage">
<xs:restriction base="xs:string">
<xs:enumeration value="icon"/>
<xs:attribute name="categories" type="xs:NCName"/>
<xs:attribute name="extraid"/>
<xs:attribute name="hw-acceleration" type="packages:HwAccelerationType"/>
+ <xs:attribute name="screen-reader" type="packages:ScreenReaderType"/>
<xs:attribute name="recentimage" type="packages:RecentImage"/>
<xs:attribute name="mainapp" type="xs:boolean"/>
<xs:attribute name="indicatordisplay" type="xs:boolean"/>
free((void *)uiapplication->hwacceleration);
uiapplication->hwacceleration = NULL;
}
+ if (uiapplication->screenreader) {
+ free((void *)uiapplication->screenreader);
+ uiapplication->screenreader = NULL;
+ }
if (uiapplication->mainapp) {
free((void *)uiapplication->mainapp);
uiapplication->mainapp = NULL;
} else {
uiapplication->hwacceleration = strdup("use-system-setting");
}
+ if (xmlTextReaderGetAttribute(reader, XMLCHAR("screen-reader"))) {
+ uiapplication->screenreader = ASCII(xmlTextReaderGetAttribute(reader, XMLCHAR("screen-reader")));
+ if (uiapplication->screenreader == NULL)
+ uiapplication->screenreader = strdup("use-system-setting");
+ } else {
+ uiapplication->screenreader = strdup("use-system-setting");
+ }
if (xmlTextReaderGetAttribute(reader, XMLCHAR("recentimage")))
uiapplication->recentimage = ASCII(xmlTextReaderGetAttribute(reader, XMLCHAR("recentimage")));
if (xmlTextReaderGetAttribute(reader, XMLCHAR("mainapp"))) {
const char *categories;
const char *extraid;
const char *hwacceleration;
+ const char *screenreader;
const char *mainapp;
const char *package;
const char *recentimage;
"app_taskmanage text DEFAULT 'false', " \
"app_enabled text DEFAULT 'true', " \
"app_hwacceleration text DEFAULT 'use-system-setting', " \
+ "app_screenreader text DEFAULT 'use-system-setting', " \
"app_mainapp text, " \
"app_recentimage text, " \
"app_launchcondition text, " \
{
snprintf(query, MAX_QUERY_LEN,
"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_mainapp , app_recentimage, " \
+ "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, 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')",\
+ "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')",\
up->appid, "uiapp", up->exec, up->nodisplay, up->type, "\0", up->multiple,
- "\0", up->taskmanage, up->enabled, up->hwacceleration,up->mainapp, up->recentimage,
+ "\0", up->taskmanage, up->enabled, up->hwacceleration, up->screenreader, up->mainapp, up->recentimage,
up->launchcondition, up->indicatordisplay, up->portraitimg, up->landscapeimg, up->guestmode_visibility, up->permission_type,
mfx->preload, up->submode, up->submode_mainid, up->component_type, mfx->package);
ret = __exec_query(query);
{E_PMINFO_APPINFO_PROP_APP_URI, PMINFO_APPINFO_PROP_APP_URI},
{E_PMINFO_APPINFO_PROP_APP_MIME, PMINFO_APPINFO_PROP_APP_MIME},
{E_PMINFO_APPINFO_PROP_APP_CATEGORY, PMINFO_APPINFO_PROP_APP_CATEGORY},
- {E_PMINFO_APPINFO_PROP_APP_HWACCELERATION, PMINFO_APPINFO_PROP_APP_HWACCELERATION}
+ {E_PMINFO_APPINFO_PROP_APP_HWACCELERATION, PMINFO_APPINFO_PROP_APP_HWACCELERATION},
+ {E_PMINFO_APPINFO_PROP_APP_SCREENREADER, PMINFO_APPINFO_PROP_APP_SCREENREADER}
};
struct _appinfo_int_map_t {
case E_PMINFO_APPINFO_PROP_APP_HWACCELERATION:
snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_hwacceleration='%s'", node->value);
break;
+ case E_PMINFO_APPINFO_PROP_APP_SCREENREADER:
+ snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_screenreader='%s'", node->value);
+ break;
case E_PMINFO_APPINFO_PROP_APP_LAUNCHCONDITION:
snprintf(buf, MAX_QUERY_LEN, "package_app_info.app_launchcondition IN %s", node->value);
break;
info->manifest_info->uiapplication->hwacceleration = strdup(coltxt[i]);
else
info->manifest_info->uiapplication->hwacceleration = NULL;
+ } else if (strcmp(colname[i], "app_screenreader") == 0 ){
+ if (coltxt[i])
+ info->manifest_info->uiapplication->screenreader = strdup(coltxt[i]);
+ else
+ info->manifest_info->uiapplication->screenreader = NULL;
} else if (strcmp(colname[i], "app_indicatordisplay") == 0 ){
if (coltxt[i])
info->manifest_info->uiapplication->indicatordisplay = strdup(coltxt[i]);
info->manifest_info->uiapplication->hwacceleration = strdup(coltxt[i]);
else
info->manifest_info->uiapplication->hwacceleration = NULL;
+ } else if (strcmp(colname[i], "app_screenreader") == 0 ){
+ if (coltxt[i])
+ info->manifest_info->uiapplication->screenreader = strdup(coltxt[i]);
+ else
+ info->manifest_info->uiapplication->screenreader = NULL;
} else if (strcmp(colname[i], "app_indicatordisplay") == 0 ){
if (coltxt[i])
info->manifest_info->uiapplication->indicatordisplay = strdup(coltxt[i]);
info->uiapp_info->hwacceleration = strdup(coltxt[i]);
else
info->uiapp_info->hwacceleration = NULL;
+ } else if (strcmp(colname[i], "app_screenreader") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->screenreader = strdup(coltxt[i]);
+ else
+ info->uiapp_info->screenreader = NULL;
} else if (strcmp(colname[i], "app_enabled") == 0 ) {
if (coltxt[i])
info->uiapp_info->enabled= strdup(coltxt[i]);
info->uiapp_info->hwacceleration = strdup(coltxt[i]);
else
info->uiapp_info->hwacceleration = NULL;
+ } else if (strcmp(colname[i], "app_screenreader") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->screenreader = strdup(coltxt[i]);
+ else
+ info->uiapp_info->screenreader = NULL;
} else if (strcmp(colname[i], "app_enabled") == 0 ) {
if (coltxt[i])
info->uiapp_info->enabled= strdup(coltxt[i]);
return PMINFO_R_OK;
}
+API int pkgmgrinfo_appinfo_get_screenreader(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_screenreader *screenreader)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");
+ retvm_if(screenreader == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL");
+ char *val = NULL;
+ pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
+ val = (char *)info->uiapp_info->screenreader;
+ if (val) {
+ if (strcasecmp(val, "screenreader-off") == 0)
+ *screenreader = PMINFO_SCREENREADER_OFF;
+ else if (strcasecmp(val, "screenreader-on") == 0)
+ *screenreader = PMINFO_SCREENREADER_ON;
+ else
+ *screenreader = PMINFO_SCREENREADER_USE_SYSTEM_SETTING;
+ }
+ return PMINFO_R_OK;
+}
+
API int pkgmgrinfo_appinfo_get_effectimage(pkgmgrinfo_appinfo_h handle, char **portrait_img, char **landscape_img)
{
retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL");