Add a new storage type 91/157791/5
authorSangyoon Jang <jeremy.jang@samsung.com>
Thu, 26 Oct 2017 08:28:29 +0000 (17:28 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Mon, 4 Dec 2017 09:26:03 +0000 (18:26 +0900)
The extended storage feature is introduced, this patch adds enum
variable for getting extended storage type, requesting for moving package
to extended storage.

Change-Id: Ic0ecb746a1ce53d57a77804e4eb954445b24394c
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
include/package_info.h
include/package_manager.h
src/package_info.c

index 75185c9..9b0145b 100644 (file)
@@ -53,6 +53,7 @@ typedef struct package_updateinfo_s *package_updateinfo_h;
 typedef enum {
        PACKAGE_INFO_INTERNAL_STORAGE = 0,    /**< Internal storage */
        PACKAGE_INFO_EXTERNAL_STORAGE = 1,    /**< External storage */
+       PACKAGE_INFO_EXTENDED_STORAGE = 2,    /**< Extended storage (Since 5.0) */
 } package_info_installed_storage_type_e;
 
 
index 87da8f0..8269f92 100644 (file)
@@ -129,6 +129,7 @@ typedef enum {
 typedef enum {
        PACKAGE_MANAGER_REQUEST_MOVE_TO_INTERNAL = 0,    /**< Internal type */
        PACKAGE_MANAGER_REQUEST_MOVE_TO_EXTERNAL,        /**< External type */
+       PACKAGE_MANAGER_REQUEST_MOVE_TO_EXTENDED,        /**< Extended type (Since 5.0) */
 
        /* These enum will be deprecated. Use above enum instead. */
        PACAKGE_MANAGER_REQUEST_MOVE_TO_INTERNAL = 0,
index 15f59e4..bcc4981 100644 (file)
@@ -330,6 +330,11 @@ API int package_info_get_installed_storage(package_info_h package_info, package_
                *storage = PACKAGE_INFO_INTERNAL_STORAGE;
        else if (pkg_info_value == PMINFO_EXTERNAL_STORAGE)
                *storage = PACKAGE_INFO_EXTERNAL_STORAGE;
+       else if (pkg_info_value == PMINFO_EXTENDED_STORAGE)
+               *storage = PACKAGE_INFO_EXTENDED_STORAGE;
+       else
+               return package_manager_error(PACKAGE_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+
 
        return PACKAGE_MANAGER_ERROR_NONE;
 }