Update description for info move API 81/144781/1 accepted/tizen/4.0/unified/20170828.223645 accepted/tizen/unified/20170822.023746 submit/tizen/20170821.010252 submit/tizen_4.0/20170828.100002
authorMinje Ahn <minje.ahn@samsung.com>
Fri, 18 Aug 2017 02:09:10 +0000 (11:09 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Fri, 18 Aug 2017 02:09:10 +0000 (11:09 +0900)
Add note
Add process for checking storage type

Change-Id: I116fd846b57ed1d5a99e8c697233d763967dca5c
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
include/media_info.h
packaging/capi-content-media-content.spec
src/media_info.c

index c4a17a3..20af652 100755 (executable)
@@ -1572,7 +1572,8 @@ int media_info_set_added_time(media_info_h media, time_t added_time) TIZEN_DEPRE
  * @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
  *                   If you want to access only internal storage by using  this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
  *                   Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
- *                   If you can access both storage, you should add all privilege.
+ *                   If you can access both storage, you should add all privilege. \n
+ *                   This API does not support USB storage.
  *
  * @param[in] media    The media info handle
  * @param[in] dst_path The path of destination
index f049d25..99aa9a3 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-content-media-content
 Summary:    A Media content library in Tizen Native API
-Version:    0.3.22
+Version:    0.3.23
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index c8ee3be..ce4311f 100755 (executable)
@@ -3068,6 +3068,11 @@ int media_info_move_to_db(media_info_h media, const char* dst_path)
                return _content_error_capi(MEDIA_CONTENT_TYPE, ret);
        }
 
+       if (src_storage_type == MEDIA_SVC_STORAGE_EXTERNAL_USB || dst_storage_type == MEDIA_SVC_STORAGE_EXTERNAL_USB) {
+               media_content_sec_error("Unsupported storage type src[%d] dst[%d]", src_storage_type, dst_storage_type);
+               return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+       }
+
        memset(storage_id, 0x00, sizeof(storage_id));
        ret = media_svc_get_storage_id(_content_get_db_handle(), org_repl_path, storage_id, _content_get_uid());
        if (ret != MS_MEDIA_ERR_NONE) {