From 80ed57d661d964d211e422eeb150ab933a906541 Mon Sep 17 00:00:00 2001 From: Minje Ahn Date: Mon, 28 May 2018 15:23:49 +0900 Subject: [PATCH] [ACR-1226] deprecate function to remove item from db Change-Id: If222b2d61e81f3a6fb8b87ad35bb71497fb44fd8 Signed-off-by: Minje Ahn --- include/media_info.h | 7 ++++--- include_product/media_info.h | 7 ++++--- src/media_info.c | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/media_info.h b/include/media_info.h index 55b9eff..a4eedfb 100755 --- a/include/media_info.h +++ b/include/media_info.h @@ -175,9 +175,10 @@ int media_info_insert_batch_to_db(const char **path_array, unsigned int array_le int media_info_insert_burst_shot_to_db(const char **path_array, unsigned int array_length, media_insert_burst_shot_completed_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 5.0. Use media_content_scan_file() instead. * @brief Deletes the media information from the media database. * @details This function only remove media information in the media database. \n - * You can use media_content_scan_file()/media_content_scan_folder() function instead of this function if file is removed from the file system. + * You can use media_content_scan_file()/media_content_scan_folder() function instead of this function if a file is removed from the file system. * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @@ -203,7 +204,7 @@ int media_info_insert_burst_shot_to_db(const char **path_array, unsigned int arr * @see media_content_scan_file() * @see media_content_scan_folder() */ -int media_info_delete_from_db(const char *media_id); +int media_info_delete_from_db(const char *media_id) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 4.0. @@ -1722,7 +1723,7 @@ int media_info_generate_thumbnail(media_info_h media); * %http://tizen.org/privilege/externalstorage * * @remarks If you want to destroy the media handle before callback invoked, you must cancel the face detection request by using media_info_cancel_face_detection(). \n - * If face detection fails, the @a face_count argument in media_face_detection_completed_cb() will be set to 0. + * If face detection fails, the face_count argument in media_face_detection_completed_cb() will be set to 0. * Media items in external storage are not supported, with the exception of MMC items. * * @param[in] media The handle to the media info diff --git a/include_product/media_info.h b/include_product/media_info.h index 55b9eff..a4eedfb 100755 --- a/include_product/media_info.h +++ b/include_product/media_info.h @@ -175,9 +175,10 @@ int media_info_insert_batch_to_db(const char **path_array, unsigned int array_le int media_info_insert_burst_shot_to_db(const char **path_array, unsigned int array_length, media_insert_burst_shot_completed_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 5.0. Use media_content_scan_file() instead. * @brief Deletes the media information from the media database. * @details This function only remove media information in the media database. \n - * You can use media_content_scan_file()/media_content_scan_folder() function instead of this function if file is removed from the file system. + * You can use media_content_scan_file()/media_content_scan_folder() function instead of this function if a file is removed from the file system. * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @@ -203,7 +204,7 @@ int media_info_insert_burst_shot_to_db(const char **path_array, unsigned int arr * @see media_content_scan_file() * @see media_content_scan_folder() */ -int media_info_delete_from_db(const char *media_id); +int media_info_delete_from_db(const char *media_id) TIZEN_DEPRECATED_API; /** * @deprecated Deprecated since 4.0. @@ -1722,7 +1723,7 @@ int media_info_generate_thumbnail(media_info_h media); * %http://tizen.org/privilege/externalstorage * * @remarks If you want to destroy the media handle before callback invoked, you must cancel the face detection request by using media_info_cancel_face_detection(). \n - * If face detection fails, the @a face_count argument in media_face_detection_completed_cb() will be set to 0. + * If face detection fails, the face_count argument in media_face_detection_completed_cb() will be set to 0. * Media items in external storage are not supported, with the exception of MMC items. * * @param[in] media The handle to the media info diff --git a/src/media_info.c b/src/media_info.c index 5866729..79c81c9 100755 --- a/src/media_info.c +++ b/src/media_info.c @@ -735,6 +735,7 @@ int media_info_delete_from_db(const char *media_id) int ret = MEDIA_CONTENT_ERROR_NONE; char *path = NULL; char storage_id[MEDIA_CONTENT_UUID_SIZE+1] = {0, }; + media_content_warn("DEPRECATION WARNING: media_info_delete_from_db() is deprecated and will be removed from next release. Use media_content_scan_file() instead."); if (!STRING_VALID(media_id)) { media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER); -- 2.7.4