Use application_x instead of service/uiapplication_x 43/48943/1 accepted/tizen/mobile/20151005.055454 accepted/tizen/tv/20151005.055508 accepted/tizen/wearable/20151005.055524 submit/tizen/20151005.030714
authorSangyoon Jang <s89.jang@samsung.com>
Fri, 2 Oct 2015 02:44:53 +0000 (11:44 +0900)
committerSangyoon Jang <s89.jang@samsung.com>
Fri, 2 Oct 2015 02:44:53 +0000 (11:44 +0900)
Change-Id: I5aa31a574048d335b8917f0657699efdf5df7dfa
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
tool/pkg_install_ug.c
tool/pkg_privilege.c

index 66d2013..d4b7461 100644 (file)
@@ -36,7 +36,7 @@ static int _check_bin_directory(const char *pkgid)
 static int _install_ug(char *manifest)
 {
        manifest_x *mfx;
-       uiapplication_x *tmp;
+       application_x *tmp;
        int ret;
 
        mfx = pkgmgr_parser_process_manifest_xml(manifest);
@@ -45,7 +45,7 @@ static int _install_ug(char *manifest)
                return -1;
        }
 
-       for (tmp = mfx->uiapplication; tmp; tmp = tmp->next) {
+       for (tmp = mfx->application; tmp; tmp = tmp->next) {
                if (tmp->exec == NULL || tmp->ui_gadget == NULL ||
                                strcasecmp(tmp->ui_gadget, "true") != 0)
                        continue;
index 03098d3..08e0014 100644 (file)
@@ -98,8 +98,7 @@ static int _insert_privilege(char *manifest, uid_t uid)
        app_inst_req *req;
        manifest_x *mfx;
        privilege_x *priv;
-       struct uiapplication_x *uiapp;
-       struct serviceapplication_x *svcapp;
+       struct application_x *app;
 
        mfx = pkgmgr_parser_process_manifest_xml(manifest);
        if (mfx == NULL) {
@@ -107,9 +106,9 @@ static int _insert_privilege(char *manifest, uid_t uid)
                return -1;
        }
 
-       uiapp = mfx->uiapplication;
-       while (uiapp) {
-               req = _prepare_request(mfx->package, uiapp->appid, uid);
+       app = mfx->application;
+       while (app) {
+               req = _prepare_request(mfx->package, app->appid, uid);
                if (req == NULL) {
                        pkgmgr_parser_free_manifest_xml(mfx);
                        return -1;
@@ -125,28 +124,7 @@ static int _insert_privilege(char *manifest, uid_t uid)
                if (ret != SECURITY_MANAGER_SUCCESS)
                        printf("app install failed: %d\n", ret);
                security_manager_app_inst_req_free(req);
-               uiapp = uiapp->next;
-       }
-
-       svcapp = mfx->serviceapplication;
-       while (svcapp) {
-               req = _prepare_request(mfx->package, svcapp->appid, uid);
-               if (req == NULL) {
-                       pkgmgr_parser_free_manifest_xml(mfx);
-                       return -1;
-               }
-               if (mfx->privileges != NULL) {
-                       for (priv = mfx->privileges->privilege; priv;
-                                       priv = priv->next)
-                               security_manager_app_inst_req_add_privilege(req,
-                                               priv->text);
-               }
-
-               ret = security_manager_app_install(req);
-               if (ret != SECURITY_MANAGER_SUCCESS)
-                       printf("app install failed: %d\n", ret);
-               security_manager_app_inst_req_free(req);
-               svcapp = svcapp->next;
+               app = app->next;
        }
 
        pkgmgr_parser_free_manifest_xml(mfx);
@@ -159,8 +137,7 @@ static int _remove_privilege(char *manifest, uid_t uid)
        int ret;
        app_inst_req *req;
        manifest_x *mfx;
-       struct uiapplication_x *uiapp;
-       struct serviceapplication_x *svcapp;
+       struct application_x *app;
 
        mfx = pkgmgr_parser_process_manifest_xml(manifest);
        if (mfx == NULL) {
@@ -168,25 +145,9 @@ static int _remove_privilege(char *manifest, uid_t uid)
                return -1;
        }
 
-       uiapp = mfx->uiapplication;
-       while (uiapp) {
-               req = _prepare_request(mfx->package, uiapp->appid, uid);
-               if (req == NULL) {
-                       pkgmgr_parser_free_manifest_xml(mfx);
-                       return -1;
-               }
-
-               ret = security_manager_app_uninstall(req);
-               if (ret != SECURITY_MANAGER_SUCCESS)
-                       printf("app uninstall failed: %d\n", ret);
-
-               security_manager_app_inst_req_free(req);
-               uiapp = uiapp->next;
-       }
-
-       svcapp = mfx->serviceapplication;
-       while (svcapp) {
-               req = _prepare_request(mfx->package, svcapp->appid, uid);
+       app = mfx->application;
+       while (app) {
+               req = _prepare_request(mfx->package, app->appid, uid);
                if (req == NULL) {
                        pkgmgr_parser_free_manifest_xml(mfx);
                        return -1;
@@ -197,7 +158,7 @@ static int _remove_privilege(char *manifest, uid_t uid)
                        printf("app uninstall failed: %d\n", ret);
 
                security_manager_app_inst_req_free(req);
-               svcapp = svcapp->next;
+               app = app->next;
        }
 
        pkgmgr_parser_free_manifest_xml(mfx);