<xs:element ref="packages:category"/>
<xs:element ref="packages:metadata"/>
<xs:element ref="packages:permission"/>
+ <xs:element ref="packages:datacontrol"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="appid" use="required" type="xs:string"/>
permission = tmp;
}
}
+ /*Free DataControl*/
+ if (uiapplication->datacontrol) {
+ datacontrol_x *datacontrol = uiapplication->datacontrol;
+ datacontrol_x *tmp = NULL;
+ while(datacontrol != NULL) {
+ tmp = datacontrol->next;
+ __ps_free_datacontrol(datacontrol);
+ datacontrol = tmp;
+ }
+ }
/* _PRODUCT_LAUNCHING_ENHANCED_ START */
if (uiapplication->indicatordisplay) {
free((void *)uiapplication->indicatordisplay);
metadata_x *tmp9 = NULL;
image_x *tmp10 = NULL;
permission_x *tmp11 = NULL;
+ datacontrol_x *tmp12 = NULL;
if (xmlTextReaderGetAttribute(reader, XMLCHAR("appid"))) {
uiapplication->appid = ASCII(xmlTextReaderGetAttribute(reader, XMLCHAR("appid")));
memset(notification, '\0', sizeof(notification_x));
LISTADD(uiapplication->notification, notification);
ret = __ps_process_notification(reader, notification);
+ } else if (!strcmp(ASCII(node), "datacontrol")) {
+ datacontrol_x *datacontrol = malloc(sizeof(datacontrol_x));
+ if (datacontrol == NULL) {
+ _LOGD("Malloc Failed\n");
+ return -1;
+ }
+ memset(datacontrol, '\0', sizeof(datacontrol_x));
+ LISTADD(uiapplication->datacontrol, datacontrol);
+ ret = __ps_process_datacontrol(reader, datacontrol);
} else
return -1;
if (ret < 0) {
LISTHEAD(uiapplication->permission, tmp11);
uiapplication->permission = tmp11;
}
+ if (uiapplication->datacontrol) {
+ LISTHEAD(uiapplication->datacontrol, tmp12);
+ uiapplication->datacontrol = tmp12;
+ }
return ret;
}
static int __insert_serviceapplication_share_allowed_info(manifest_x *mfx);
static int __insert_uiapplication_share_request_info(manifest_x *mfx);
static int __insert_serviceapplication_share_request_info(manifest_x *mfx);
+static int __insert_uiapplication_datacontrol_info(manifest_x *mfx);
static int __insert_serviceapplication_datacontrol_info(manifest_x *mfx);
static void __insert_serviceapplication_locale_info(gpointer data, gpointer userdata);
static void __insert_uiapplication_locale_info(gpointer data, gpointer userdata);
return 0;
}
+static int __insert_uiapplication_datacontrol_info(manifest_x *mfx)
+{
+ uiapplication_x *up = mfx->uiapplication;
+ datacontrol_x *dc = NULL;
+ int ret = -1;
+ char query[MAX_QUERY_LEN] = {'\0'};
+
+ while(up != NULL)
+ {
+ dc = up->datacontrol;
+ while(dc != NULL)
+ {
+ snprintf(query, MAX_QUERY_LEN,
+ "insert into package_app_data_control(app_id, providerid, access, type) " \
+ "values('%s', '%s', '%s', '%s')",\
+ mfx->uiapplication->appid,
+ dc->providerid,
+ dc->access,
+ dc->type);
+
+ ret = __exec_query(query);
+ if (ret == -1) {
+ _LOGD("Package UiApp Data Control DB Insert Failed\n");
+ return -1;
+ }
+ memset(query, '\0', MAX_QUERY_LEN);
+ dc = dc->next;
+ }
+ up = up->next;
+ }
+ return 0;
+}
+
static int __insert_uiapplication_share_request_info(manifest_x *mfx)
{
uiapplication_x *up = mfx->uiapplication;
return -1;
/*Insert in the package_app_data_control DB*/
+ ret = __insert_uiapplication_datacontrol_info(mfx);
+ if (ret == -1)
+ return -1;
ret = __insert_serviceapplication_datacontrol_info(mfx);
if (ret == -1)
return -1;