Add a new move type PM_MOVE_TO_EXTENDED 45/140445/3
authorSangyoon Jang <jeremy.jang@samsung.com>
Tue, 25 Jul 2017 04:32:18 +0000 (13:32 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Thu, 3 Aug 2017 02:10:38 +0000 (02:10 +0000)
A new move type PM_MOVE_TO_EXTENDED is added to move package to
extended storage.

Change-Id: I5e7ba0be5a1c1b2444dcd3a7fe64396800761653
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
client/include/package-manager.h
client/src/pkgmgr.c

index 52a486a..a7709e0 100644 (file)
@@ -209,6 +209,7 @@ typedef enum {
 typedef enum {
        PM_MOVE_TO_INTERNAL = 0,
        PM_MOVE_TO_SDCARD = 1,
+       PM_MOVE_TO_EXTENDED = 2,
 } pkgmgr_move_type;
 
 typedef enum {
@@ -394,7 +395,7 @@ int pkgmgr_client_usr_uninstall(pkgmgr_client *pc, const char *pkg_type,
  * @param[in]  pc      pkgmgr_client
  * @param[in]  pkg_type                package type
  * @param[in]  pkgid   application package id
- * @param[in]  move_type               PM_MOVE_TO_INTERNAL or PM_MOVE_TO_SDCARD
+ * @param[in]  move_type               move type
  * @param[in]  mode            installation mode  - PM_DEFAULT, PM_QUIET
  * @param[in]  event_cb        user callback
  * @param[in]  data    user data
index f940516..babdd8c 100644 (file)
@@ -719,7 +719,7 @@ API int pkgmgr_client_usr_move(pkgmgr_client *pc, const char *pkg_type,
        }
 
        if ((move_type < PM_MOVE_TO_INTERNAL) ||
-                       (move_type > PM_MOVE_TO_SDCARD))
+                       (move_type > PM_MOVE_TO_EXTENDED))
                return PKGMGR_R_EINVAL;
 
        if (client->pc_type != PC_REQUEST) {
@@ -1607,7 +1607,7 @@ API int pkgmgr_client_usr_request_service(
        case PM_REQUEST_MOVE:
                tryvm_if(pkgid == NULL, ret = PKGMGR_R_EINVAL, "pkgid is NULL\n");
                tryvm_if(pc == NULL, ret = PKGMGR_R_EINVAL, "pc is NULL\n");
-               tryvm_if((service_mode < PM_MOVE_TO_INTERNAL) || (service_mode > PM_MOVE_TO_SDCARD), ret = PKGMGR_R_EINVAL, "service_mode is wrong\n");
+               tryvm_if((service_mode < PM_MOVE_TO_INTERNAL) || (service_mode > PM_MOVE_TO_EXTENDED), ret = PKGMGR_R_EINVAL, "service_mode is wrong\n");
 
                ret = __move_pkg_process(pc, pkgid, pkg_type, uid, (pkgmgr_move_type)service_mode, event_cb, data);
                break;