int pkgmgrinfo_pkginfo_get_installed_time(pkgmgrinfo_pkginfo_h handle, int *installed_time);
/**
+ * @fn int pkgmgrinfo_appinfo_get_launch_mode(pkgmgrinfo_appinfo_h handle, char **mode)
+ * @brief This API gets the launch mode of package 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] mode pointer to hold launch mode 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
+ * @pre pkgmgrinfo_pkginfo_get_pkginfo()
+ * @post pkgmgrinfo_pkginfo_destroy_pkginfo()
+ * @see pkgmgrinfo_pkginfo_get_pkgid()
+ * @see pkgmgrinfo_pkginfo_is_removable()
+ * @code
+static int get_pkg_launch_mode(const char *pkgid)
+{
+ int ret = 0;
+ char *launch_mode = NULL;
+ pkgmgrinfo_pkginfo_h handle;
+ ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_pkginfo_get_launch_mode(handle, &mode);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ return -1;
+ }
+ printf("launch mode: %s\n", mode);
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ return 0;
+}
+ * @endcode
+ */
+int pkgmgrinfo_appinfo_get_launch_mode(pkgmgrinfo_appinfo_h handle, char **mode);
+
+/**
* @fn int pkgmgrinfo_pkginfo_get_storeclientid(pkgmgrinfo_pkginfo_h handle, char **storeclientid)
* @brief This API gets the store client id of package from the package ID
*
<xs:attribute name="component-type" type="xs:string"/>
<xs:attribute name="submode" type="xs:boolean"/>
<xs:attribute name="submode-mainid" type="xs:string"/>
+ <xs:attribute name="launch_mode" type="packages:LaunchType"/>
</xs:complexType>
</xs:element>
<xs:element name="ime-application">
<xs:enumeration value="setting"/>
</xs:restriction>
</xs:simpleType>
+ <xs:simpleType name="LaunchType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="caller"/>
+ <xs:enumeration value="single"/>
+ <xs:enumeration value="group"/>
+ </xs:restriction>
+ </xs:simpleType>
<xs:simpleType name="ResolutionType">
<xs:restriction base="xs:string">
<xs:enumeration value="xhigh"/>
}
if (xmlTextReaderGetAttribute(reader, XMLCHAR("submode-mainid")))
uiapplication->submode_mainid = ASCII(xmlTextReaderGetAttribute(reader, XMLCHAR("submode-mainid")));
+ if (xmlTextReaderGetAttribute(reader, XMLCHAR("launch_mode"))) {
+ uiapplication->launch_mode = ASCII(xmlTextReaderGetAttribute(reader, XMLCHAR("launch_mode")));
+ if (uiapplication->launch_mode == NULL)
+ uiapplication->launch_mode = strdup("caller");
+ } else {
+ uiapplication->launch_mode = strdup("caller");
+ }
depth = xmlTextReaderDepth(reader);
while ((ret = __next_child_element(reader, depth))) {
const char *preload;
const char *submode;
const char *submode_mainid;
+ const char *launch_mode;
struct label_x *label;
struct icon_x *icon;
struct image_x *image;
struct datacontrol_x *datacontrol;
struct uiapplication_x *prev;
struct uiapplication_x *next;
+
} uiapplication_x;
typedef struct serviceapplication_x {
"app_preload text DEFAULT 'false', " \
"app_submode text DEFAULT 'false', " \
"app_submode_mainid text, " \
+ "app_launch_mode text NOT NULL DEFAULT 'caller', " \
"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, 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')",\
+ "app_preload, app_submode, app_submode_mainid, component_type, package, app_launch_mode) " \
+ "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')",\
up->appid,
"uiapp",
up->exec,
up->submode,
__get_str(up->submode_mainid),
up->component_type,
- mfx->package);
+ mfx->package,
+ up->launch_mode);
ret = __exec_query(query);
if (ret == -1) {
info->manifest_info->uiapplication->submode_mainid = strdup(coltxt[i]);
else
info->manifest_info->uiapplication->submode_mainid = NULL;
+ } else if (strcmp(colname, "app_launch_mode") == 0 ) {
+ if (coltxt[i])
+ info->manifest_info->uiapplication->launch_mode = strdup(coltxt[i]);
+ else
+ info->manifest_info->uiapplication->launch_mode = NULL;
} else
continue;
}
info->manifest_info->uiapplication->submode_mainid = strdup(coltxt[j]);
else
info->manifest_info->uiapplication->submode_mainid = NULL;
+ } else if (strcmp(colname[j], "app_launch_mode") == 0 ) {
+ if (coltxt[j])
+ info->manifest_info->uiapplication->launch_mode = strdup(coltxt[j]);
+ else
+ info->manifest_info->uiapplication->launch_mode = NULL;
} else
continue;
}
info->uiapp_info->submode_mainid = strdup(coltxt[i]);
else
info->uiapp_info->submode_mainid = NULL;
+ } else if (strcmp(colname[i], "app_launch_mode") == 0 ) {
+ if (coltxt[i])
+ info->uiapp_info->launch_mode = strdup(coltxt[i]);
+ else
+ info->uiapp_info->launch_mode = NULL;
} else
continue;
}
return PMINFO_R_OK;
}
+API int pkgmgrinfo_appinfo_get_launch_mode(pkgmgrinfo_appinfo_h handle, char **mode)
+{
+ retvm_if(handle == NULL, PMINFO_R_EINVAL, "appinfo handle is NULL\n");
+ retvm_if(mode == NULL, PMINFO_R_EINVAL, "Argument supplied to hold return value is NULL\n");
+ pkgmgr_appinfo_x *info = (pkgmgr_appinfo_x *)handle;
+ if (info->uiapp_info->launch_mode)
+ *mode = (char *)(info->uiapp_info->launch_mode);
+ else
+ return PMINFO_R_ERROR;
+
+ return PMINFO_R_OK;
+}
+
API int pkgmgrinfo_appinfo_usr_get_datacontrol_info(const char *providerid, const char *type, uid_t uid, char **appid, char **access)
{
retvm_if(providerid == NULL, PMINFO_R_EINVAL, "Argument supplied is NULL\n");