- /*Delete from Package App Localized Info*/
- up = mfx->uiapplication;
- sp = mfx->serviceapplication;
- while(up != NULL)
- {
- snprintf(query, MAX_QUERY_LEN,
- "delete from package_app_localized_info where app_id='%s'", up->appid);
- ret = __exec_query(query);
- if (ret == -1) {
- DBG("Package App Localized Info DB Delete Failed\n");
- return -1;
- }
- memset(query, '\0', MAX_QUERY_LEN);
- up = up->next;
- }
- while(sp != NULL)
- {
- snprintf(query, MAX_QUERY_LEN,
- "delete from package_app_localized_info where app_id='%s'", sp->appid);
- ret = __exec_query(query);
- if (ret == -1) {
- DBG("Package App Localized Info DB Delete Failed\n");
- return -1;
- }
- memset(query, '\0', MAX_QUERY_LEN);
- sp = sp->next;
- }
-
- /*Delete from App icon localized Info*/
- up = mfx->uiapplication;
- while(up != NULL)
- {
- snprintf(query, MAX_QUERY_LEN,
- "delete from package_app_icon_section_info where app_id='%s'", up->appid);
- ret = __exec_query(query);
- if (ret == -1) {
- DBG("Package App image Info DB Delete Failed\n");
- return -1;
- }
- memset(query, '\0', MAX_QUERY_LEN);
- up = up->next;
- }
-
- /*Delete from App image Info*/
- up = mfx->uiapplication;
- while(up != NULL)
- {
- snprintf(query, MAX_QUERY_LEN,
- "delete from package_app_image_info where app_id='%s'", up->appid);
- ret = __exec_query(query);
- if (ret == -1) {
- DBG("Package App image Info DB Delete Failed\n");
- return -1;
- }
- memset(query, '\0', MAX_QUERY_LEN);
- up = up->next;
- }
-
- /*Delete from Package App App-Svc*/
- up = mfx->uiapplication;
- sp = mfx->serviceapplication;
- while(up != NULL)
- {
- snprintf(query, MAX_QUERY_LEN,
- "delete from package_app_app_svc where app_id='%s'", up->appid);
- ret = __exec_query(query);
- if (ret == -1) {
- DBG("Package App App-Svc DB Delete Failed\n");
- return -1;
- }
- memset(query, '\0', MAX_QUERY_LEN);
- up = up->next;
- }
- while(sp != NULL)
- {
- snprintf(query, MAX_QUERY_LEN,
- "delete from package_app_app_svc where app_id='%s'", sp->appid);
- ret = __exec_query(query);
- if (ret == -1) {
- DBG("Package App App-Svc DB Delete Failed\n");
- return -1;
- }
- memset(query, '\0', MAX_QUERY_LEN);
- sp = sp->next;
- }
-
- /*Delete from Package App App-Control*/
- up = mfx->uiapplication;
- sp = mfx->serviceapplication;
- while(up != NULL)
- {
- snprintf(query, MAX_QUERY_LEN,
- "delete from package_app_app_control where app_id='%s'", up->appid);
- ret = __exec_query(query);
- if (ret == -1) {
- DBG("Package App App-Control DB Delete Failed\n");
- return -1;
- }
- memset(query, '\0', MAX_QUERY_LEN);
- up = up->next;
- }
- while(sp != NULL)
- {
- snprintf(query, MAX_QUERY_LEN,
- "delete from package_app_app_control where app_id='%s'", sp->appid);
- ret = __exec_query(query);
- if (ret == -1) {
- DBG("Package App App-Control DB Delete Failed\n");
- return -1;
- }
- memset(query, '\0', MAX_QUERY_LEN);
- sp = sp->next;
- }
-
- /*Delete from Package App App-Category*/
- up = mfx->uiapplication;
- sp = mfx->serviceapplication;
- while(up != NULL)
- {
- snprintf(query, MAX_QUERY_LEN,
- "delete from package_app_app_category where app_id='%s'", up->appid);
- ret = __exec_query(query);
- if (ret == -1) {
- DBG("Package App App-Category DB Delete Failed\n");
- return -1;
- }
- memset(query, '\0', MAX_QUERY_LEN);
- up = up->next;
- }
- while(sp != NULL)
- {
- snprintf(query, MAX_QUERY_LEN,
- "delete from package_app_app_category where app_id='%s'", sp->appid);
- ret = __exec_query(query);
- if (ret == -1) {
- DBG("Package App App-Category DB Delete Failed\n");
- return -1;
- }
- memset(query, '\0', MAX_QUERY_LEN);
- sp = sp->next;
- }
-
- /*Delete from Package App App-Metadata*/
- up = mfx->uiapplication;
- sp = mfx->serviceapplication;
- while(up != NULL)
- {
- snprintf(query, MAX_QUERY_LEN,
- "delete from package_app_app_metadata where app_id='%s'", up->appid);
- ret = __exec_query(query);
- if (ret == -1) {
- DBG("Package App App-Metadata DB Delete Failed\n");
- return -1;
- }
- memset(query, '\0', MAX_QUERY_LEN);
- up = up->next;
- }
- while(sp != NULL)
- {
- snprintf(query, MAX_QUERY_LEN,
- "delete from package_app_app_metadata where app_id='%s'", sp->appid);
- ret = __exec_query(query);
- if (ret == -1) {
- DBG("Package App App-Metadata DB Delete Failed\n");
- return -1;
- }
- memset(query, '\0', MAX_QUERY_LEN);
- sp = sp->next;
- }
-
- /*Delete from Package App App-permission*/
- up = mfx->uiapplication;
- sp = mfx->serviceapplication;
- while(up != NULL)
- {
- snprintf(query, MAX_QUERY_LEN,
- "delete from package_app_app_permission where app_id='%s'", up->appid);
- ret = __exec_query(query);
- if (ret == -1) {
- DBG("Package App App-permission DB Delete Failed\n");
- return -1;
- }
- memset(query, '\0', MAX_QUERY_LEN);
- up = up->next;
- }
- while(sp != NULL)
- {
- snprintf(query, MAX_QUERY_LEN,
- "delete from package_app_app_permission where app_id='%s'", sp->appid);
- ret = __exec_query(query);
- if (ret == -1) {
- DBG("Package App App-permission DB Delete Failed\n");
- return -1;
- }
- memset(query, '\0', MAX_QUERY_LEN);
- sp = sp->next;
- }
-
- /*Delete from Package App Share Allowed*/
- up = mfx->uiapplication;
- sp = mfx->serviceapplication;
- while(up != NULL)
- {
- snprintf(query, MAX_QUERY_LEN,
- "delete from package_app_share_allowed where app_id='%s'", up->appid);
- ret = __exec_query(query);
- if (ret == -1) {
- DBG("Package App Share Allowed DB Delete Failed\n");
- return -1;
- }
- memset(query, '\0', MAX_QUERY_LEN);
- up = up->next;
- }
- while(sp != NULL)
- {
- snprintf(query, MAX_QUERY_LEN,
- "delete from package_app_share_allowed where app_id='%s'", sp->appid);
- ret = __exec_query(query);
- if (ret == -1) {
- DBG("Package App Share Allowed DB Delete Failed\n");
- return -1;
- }
- memset(query, '\0', MAX_QUERY_LEN);
- sp = sp->next;
- }
-
- /*Delete from Package App Share Request*/
- up = mfx->uiapplication;
- sp = mfx->serviceapplication;
- while(up != NULL)
- {
- snprintf(query, MAX_QUERY_LEN,
- "delete from package_app_share_request where app_id='%s'", up->appid);
- ret = __exec_query(query);
- if (ret == -1) {
- DBG("Package App Share Request DB Delete Failed\n");
- return -1;
- }
- memset(query, '\0', MAX_QUERY_LEN);
- up = up->next;
- }
- while(sp != NULL)
- {
- snprintf(query, MAX_QUERY_LEN,
- "delete from package_app_share_request where app_id='%s'", sp->appid);
- ret = __exec_query(query);
- if (ret == -1) {
- DBG("Package App Share Request DB Delete Failed\n");
- return -1;
- }
- memset(query, '\0', MAX_QUERY_LEN);