[ACR-1735] Remove deprecated APIs
[platform/core/api/media-content.git] / include_product / media_info.h
index 2664f2a..29d60c1 100755 (executable)
@@ -56,9 +56,9 @@ extern "C" {
  *                   %http://tizen.org/privilege/externalstorage
  *
  * @remarks The @a info should be released using media_info_destroy(). \n
- *                   You must add the privilege http://tizen.org/privilege/content.write. You need to add more privileges depending on your choice of contents path. \n
- *                   If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage. \n
- *                   If you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
+ *                   You must add the privilege %http://tizen.org/privilege/content.write. You need to add more privileges depending on your choice of contents path. \n
+ *                   If you want to access only internal storage by using this function, you should add privilege %http://tizen.org/privilege/mediastorage. \n
+ *                   If you want to access only external storage by using this function, you should add privilege %http://tizen.org/privilege/externalstorage. \n
  *                   If you want to access storages of both types, you must add all privileges. \n
  *                   Since 4.0, this function does not accept symbolic links. \n
  * @remarks Since 4.0, this function is related to the following feature:\n
@@ -100,9 +100,9 @@ int media_info_insert_to_db(const char *path, media_info_h *info);
  *                   %http://tizen.org/privilege/mediastorage \n
  *                   %http://tizen.org/privilege/externalstorage
  *
- * @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 function, you should add privilege http://tizen.org/privilege/mediastorage. \n
- *                   Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
+ * @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 function, you should add privilege %http://tizen.org/privilege/mediastorage. \n
+ *                   Or if you want to access only external storage by using this function, you should add privilege %http://tizen.org/privilege/externalstorage. \n
  *                   If you can access both storage, you must add all privilege. \n
  *                   Since 4.0, This function does not allow a symbolic link. \n
  * @remarks Since 4.0, this function is related to the following feature:\n
@@ -135,39 +135,6 @@ int media_info_insert_to_db(const char *path, media_info_h *info);
 int media_info_insert_batch_to_db(const char **path_array, unsigned int array_length, media_insert_completed_cb callback, void *user_data);
 
 /**
- * @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 a file is removed from the file system.
- *
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- *
- * @privlevel public
- * @privilege %http://tizen.org/privilege/content.write
- *
- * @param[in] media_id The media ID. It can get from media info handle.
- *
- * @return @c 0 on success,
- *         otherwise a negative error value
- *
- * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
- * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
- * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
- * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
- * @retval #MEDIA_CONTENT_ERROR_NETWORK           Network fail
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
- *
- * @pre This function requires opened connection to content service by media_content_connect().
- *
- * @see media_content_connect()
- * @see media_content_scan_file()
- * @see media_content_scan_folder()
- */
-int media_info_delete_from_db(const char *media_id) TIZEN_DEPRECATED_API;
-
-
-/**
  * @brief Destroys media info.
  * @details The function frees all resources related to the media info handle. This handle
  *          can no longer be used to perform any operations. New media info handle has to
@@ -506,6 +473,30 @@ int media_info_get_video(media_info_h media, video_meta_h *video);
 int media_info_get_audio(media_info_h media, audio_meta_h *audio);
 
 /**
+ * @brief Gets a book metadata handle for a given media info.
+ * @details This function returns a book metadata handle retrieved from the media info handle. \n
+ *          The title and description information of the book can be obtained from @a media.
+ *
+ * @since_tizen 6.5
+ *
+ * @remarks The @a book should be released using book_meta_destroy().
+ *
+ * @param[in] media The handle to the media info
+ * @param[out] book The handle to the book metadata
+ *
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ *
+ * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @see media_info_get_title()
+ * @see media_info_get_description()
+ * @see book_meta_destroy()
+ */
+int media_info_get_book(media_info_h media, book_meta_h *book);
+
+/**
  * @brief Gets the media ID.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  * @remarks The @a media_id should be released using free().
@@ -799,25 +790,6 @@ int media_info_get_favorite(media_info_h media, bool* favorite);
 int media_info_get_title(media_info_h media, char **title);
 
 /**
- * @deprecated Deprecated since 5.0.
- * @brief Gets the storage id of content file.
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
- *
- * @remarks The @a storage_id should be released using free().
- *
- * @param[in] media The handle to the media info
- * @param[out] storage_id The ID of the media storage
- *
- * @return @c 0 on success,
- *         otherwise a negative error value
- *
- * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
- * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
- * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int media_info_get_storage_id(media_info_h media, char **storage_id) TIZEN_DEPRECATED_API;
-
-/**
  * @brief Checks whether the media is protected via DRM.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
@@ -850,49 +822,65 @@ int media_info_is_drm(media_info_h media, bool *is_drm);
 int media_info_is_360_content(media_info_h media, bool *is_360);
 
 /**
- * @deprecated Deprecated since 5.0. Use storage_get_type_dev() instead.
- * @brief Gets the storage type of content file.
+ * @brief Gets the media info from the media database.
+ *
+ * @details This function creates a new media handle from the media database by the given @a media_id.
+ *          Media info will be created and filled with information.
+ *
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @param[in] media The handle to the media info
- * @param[out] storage_type The storage type of the content file
+ * @remarks The @a media should be released using media_info_destroy().
+ *
+ * @param[in] media_id The media ID
+ * @param[out] media The handle to the media info
  *
  * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
+ * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
+ * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
+ *
+ * @pre This function requires opened connection to content service by media_content_connect().
+ *
+ * @see media_content_connect()
+ * @see media_info_destroy()
  */
-int media_info_get_storage_type(media_info_h media, media_content_storage_e *storage_type) TIZEN_DEPRECATED_API;
+int media_info_get_media_from_db(const char *media_id, media_info_h *media);
 
 /**
- * @brief Gets the media info from the media database.
+ * @brief Gets the media info from the media database using path.
  *
- * @details This function creates a new media handle from the media database by the given @a media_id.
- *          Media info will be created and filled with information.
+ * @details This function creates a new media handle filled with information from the database by the given @a media_path.
  *
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 6.5
  *
- * @remarks The @a media should be released using media_info_destroy().
+ * @remarks The @a media should be released using media_info_destroy().\n
+ *          If you want to access only internal storage by using this function, you should add privilege %http://tizen.org/privilege/mediastorage. \n
+ *          If you want to access only external storage by using this function, you should add privilege %http://tizen.org/privilege/externalstorage. \n
+ *          If you want to access storages of both types, you must add all privileges. \n
  *
- * @param[in] media_id The media ID
+ * @param[in] media_path The media path
  * @param[out] media The handle to the media info
  *
  * @return @c 0 on success,
  *         otherwise a negative error value
  *
  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
- * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
  * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
  * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
+ * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
  *
  * @pre This function requires opened connection to content service by media_content_connect().
  *
  * @see media_content_connect()
  * @see media_info_destroy()
  */
-int media_info_get_media_from_db(const char *media_id, media_info_h *media);
+int media_info_get_media_from_db_by_path(const char *media_path, media_info_h *media);
 
 /**
  * @brief Sets the favorite of media info.
@@ -962,9 +950,9 @@ int media_info_update_to_db(media_info_h media);
  *                   %http://tizen.org/privilege/mediastorage \n
  *                   %http://tizen.org/privilege/externalstorage
  *
- * @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 function, you should add privilege http://tizen.org/privilege/mediastorage. \n
- *                   Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage. \n
+ * @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 function, you should add privilege %http://tizen.org/privilege/mediastorage. \n
+ *                   Or if you want to access only external storage by using this function, you should add privilege %http://tizen.org/privilege/externalstorage. \n
  *                   If you can access both storage, you should add all privilege. \n
  *                   Since 4.0, this function does not allow symbolic links. \n
  *                   This function does not support USB storage before 5.0. Since 5.0, USB storage is supported. \n
@@ -994,72 +982,6 @@ int media_info_update_to_db(media_info_h media);
 int media_info_move_to_db(media_info_h media, const char* dst_path);
 
 /**
- * @deprecated Deprecated since 5.0. Use media_info_generate_thumbnail() instead.
- * @brief Creates a thumbnail file for the given media, asynchronously.
- * @details This function creates an thumbnail file for given media item and calls @a callback for completion of creating the thumbnail.
- *          If a thumbnail already exists for the given media, then the path of thumbnail will be returned in callback function. \n
- *          Since 3.0, a thumbnail is not automatically extracted during media scanning. \n
- *          Therefore, if there exists no thumbnail for the given media, you MUST call this function to create a thumbnail.
- *
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- *
- * @privlevel public
- * @privilege %http://tizen.org/privilege/content.write \n
- *                   %http://tizen.org/privilege/mediastorage \n
- *                   %http://tizen.org/privilege/externalstorage
- *
- * @remarks If you want to destroy media handle before callback invoked, you must cancel thumbnail request by using media_info_cancel_thumbnail() \n
- *          Since 3.0, if creation of a thumbnail is failed, empty string will be passed through media_thumbnail_completed_cb().
- *          Items in external storage except MMC not supported.
- *
- * @param[in] media The handle to the media info
- * @param[in] callback The callback function to be invoked
- * @param[in] user_data The user data to be passed to the callback function
- *
- * @return @c 0 on success,
- *         otherwise a negative error value
- *
- * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
- * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY     Out of memory
- * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
- * @retval #MEDIA_CONTENT_ERROR_DB_FAILED         DB Operation failed
- * @retval #MEDIA_CONTENT_ERROR_DB_BUSY           DB Operation busy
- * @retval #MEDIA_CONTENT_ERROR_NETWORK           Network fail
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
- *
- * @pre This function requires opened connection to content service by media_content_connect().
- *
- * @see media_content_connect()
- */
-int media_info_create_thumbnail(media_info_h media, media_thumbnail_completed_cb callback, void *user_data) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Deprecated since 5.0.
- * @brief Cancels the creation of thumbnail file for the given media.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- *
- * @privlevel public
- * @privilege %http://tizen.org/privilege/content.write
- *
- * @remarks If you request cancel for the already thumbnail created media, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION
- *
- * @param[in] media The handle to the media info
- *
- * @return @c 0 on success,
- *         otherwise a negative error value
- *
- * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
- * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
- * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
- *
- * @pre This function requires opened connection to content service by media_content_connect().
- * @see media_content_connect()
- */
-int media_info_cancel_thumbnail(media_info_h media) TIZEN_DEPRECATED_API;
-
-/**
  * @brief Generates a thumbnail file for the given media, synchronously.
  *
  * @since_tizen 5.0
@@ -1067,8 +989,8 @@ int media_info_cancel_thumbnail(media_info_h media) TIZEN_DEPRECATED_API;
  * @privlevel public
  * @privilege %http://tizen.org/privilege/content.write
  *
- * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage. \n
- *          http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
+ * @remarks %http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage. \n
+ *          %http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
  *          Items in external storage are not supported, with the exception of MMC.
  *
  * @param[in] media The handle to the media info
@@ -1107,10 +1029,10 @@ int media_info_generate_thumbnail(media_info_h media);
  *                   %http://tizen.org/privilege/mediastorage \n
  *                   %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 face_count argument in media_face_detection_completed_cb() will be set to 0. \n
- *          Media items in external storage are not supported, with the exception of MMC items. \n
- *          Since 5.5, if the format is unsupported, this function returns an error and callback will not be invoked.
+ * @remarks If you want to destroy the media handle before the callback invoked, you must cancel the face detection request using media_info_cancel_face_detection(). \n
+ *          If the face detection fails, the @a face_count argument in media_face_detection_completed_cb() will be set to 0. \n
+ *          The face detection of media items in external storage except MMC is not supported. \n
+ *          Since 5.5, if the format of media data is unsupported, this function returns an error and the callback will not be invoked.
  *
  * @param[in] media The handle to the media info
  * @param[in] callback The callback function to be invoked when detection is completed
@@ -1147,7 +1069,7 @@ int media_info_start_face_detection(media_info_h media, media_face_detection_com
  * @privlevel public
  * @privilege %http://tizen.org/privilege/content.write
  *
- * @remarks If face detection is already done when you request the cancellation, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION
+ * @remarks If face detection is already done when you request the cancellation, this function returns #MEDIA_CONTENT_ERROR_INVALID_OPERATION
  *
  * @param[in] media The handle to the media info
  *