From: Minje Ahn Date: Tue, 19 Mar 2024 08:15:30 +0000 (+0900) Subject: Remove media_folder_insert_to_db X-Git-Tag: accepted/tizen/unified/20240320.110717^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b8eb368f062a565ea9d5a07a9222e41afd7cfe12;hp=20e9cd7816214d413dbf408cf435f0508b564f5a;p=platform%2Fcore%2Fapi%2Fmedia-content.git Remove media_folder_insert_to_db Change-Id: I2d46dd1165eb11b57dc390fcd3651c152a5b94d5 Signed-off-by: Minje Ahn --- diff --git a/include_product/media_content_product.h b/include_product/media_content_product.h index 2c3c3f9..3fbcb75 100755 --- a/include_product/media_content_product.h +++ b/include_product/media_content_product.h @@ -204,20 +204,6 @@ int media_folder_set_name(media_folder_h folder, const char *name); */ int media_folder_update_to_db(media_folder_h folder); -/** - * @brief insert media folder into database by folder path - * @since_tizen 4.0 - * - * @param[in] folder path - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int media_folder_insert_to_db(const char *path); - /********** media_group **********/ /** diff --git a/packaging/capi-content-media-content.spec b/packaging/capi-content-media-content.spec index 9aeb6d7..522300d 100644 --- a/packaging/capi-content-media-content.spec +++ b/packaging/capi-content-media-content.spec @@ -1,6 +1,6 @@ Name: capi-content-media-content Summary: A Media content library in Tizen Native API -Version: 0.4.27 +Version: 0.4.28 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/media_folder.c b/src/media_folder.c index 2a6cdb3..6091798 100755 --- a/src/media_folder.c +++ b/src/media_folder.c @@ -253,54 +253,6 @@ int media_folder_set_name(media_folder_h folder, const char *name) return ret; } -int media_folder_insert_to_db(const char *path) -{ - int ret = MEDIA_CONTENT_ERROR_NONE; - char storage_id[MEDIA_CONTENT_UUID_SIZE+1] = {0, }; - - content_retip_if_fail(STRING_VALID(path)); - - content_retvm_if(_media_util_is_ignorable_dir(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid folder path"); - - ret = _media_content_check_dir(path); - content_retvm_if(ret == MEDIA_CONTENT_ERROR_PERMISSION_DENIED, ret, "Permission Denied"); - content_retvm_if(ret == MEDIA_CONTENT_ERROR_INVALID_PARAMETER, ret, "invalid path[%s]", path); - - ret = media_svc_get_storage_id(_content_get_db_handle(), path, storage_id, _content_get_uid()); - if (ret != MS_MEDIA_ERR_NONE) { - content_error("media_svc_get_storage_id failed : %d", ret); - return _content_error_capi(ret); - } - - ret = media_svc_check_folder_exist_by_path(_content_get_db_handle(), storage_id, path); - if (ret == MS_MEDIA_ERR_DB_NO_RECORD) { - content_sec_debug("media_svc_check_folder_exist_by_path : no record : %s", path); - - ret = media_svc_insert_folder(_content_get_db_handle(), storage_id, path, false, _content_get_uid()); - if (ret != MS_MEDIA_ERR_NONE) { - if (ret == MS_MEDIA_ERR_DB_CONSTRAINT_FAIL) { - content_sec_error("This item is already inserted. This may be normal operation because other process already did this (%s)", path); - ret = MEDIA_CONTENT_ERROR_NONE; - } else { - content_sec_error("media_svc_insert_folder failed : %d (%s)", ret, path); - } - - return _content_error_capi(ret); - } - - ret = media_svc_set_folder_scan_status(storage_id, path, MEDIA_DIR_SCAN_DONE, false, _content_get_uid()); - if (ret != MS_MEDIA_ERR_NONE) { - content_sec_error("media_svc_set_folder_scan_status failed : %d", ret); - return _content_error_capi(ret); - } - } else if (ret != MS_MEDIA_ERR_NONE) { - content_sec_error("media_svc_check_folder_exist_by_path failed : %d (%s)", ret, path); - return _content_error_capi(ret); - } - - return ret; -} - int media_folder_get_scan_status(const char *storage_uuid, char* path, media_folder_scan_status_e *scan_status) { int ret = MEDIA_CONTENT_ERROR_NONE;