* @details In general, you can use this function to insert content files into the media database. \n
* You can use media_content_scan_file()/media_content_scan_folder() function instead of this function. \n
* If media information exists in the media database, this function returns information stored in the database.\n
- * Since 5.5, if media information exists in the media database,
- * this function will return the latest information after checking that the information is up-to-date. (Media database will be updated if necessary).
+ * Since 5.5, if media information already exists in the media database,
+ * this function returns the updated latest information. (Media database will be updated if necessary).
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
* %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
* %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
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
int media_info_foreach_bookmark_from_db(const char *media_id, filter_h filter, media_bookmark_cb callback, void *user_data);
/**
+ * @deprecated Deprecated since 8.0.
* @brief Gets the number of face for the passed @a media_id from the media database.
* @details If @c NULL is passed to the @a filter, then no filtering is applied.
*
* @see media_filter_create()
*
*/
-int media_info_get_face_count_from_db(const char *media_id, filter_h filter, int *face_count);
+int media_info_get_face_count_from_db(const char *media_id, filter_h filter, int *face_count) TIZEN_DEPRECATED_API;
/**
+ * @deprecated Deprecated since 8.0.
* @brief Iterates through the media files with optional @a filter in the given @a media_id from the media database.
* @details This function gets all media face info associated with the given media id and
* meeting desired filter option and calls @a callback for
* @see media_filter_create()
*
*/
-int media_info_foreach_face_from_db(const char *media_id, filter_h filter, media_face_cb callback, void *user_data);
+int media_info_foreach_face_from_db(const char *media_id, filter_h filter, media_face_cb callback, void *user_data) TIZEN_DEPRECATED_API;
/**
* @brief Gets the image metadata handle for a given media info.
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().
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
*
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.
* %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
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
* @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
int media_info_generate_thumbnail(media_info_h media);
/**
+ * @deprecated Deprecated since 8.0.
* @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
* @brief Starts face detection for the given image, asynchronously.
* @details This function detects faces for given image item and calls the given callback function when the detection is completed. \n
* The given callback function is called when the detection is completed. \n
- * To obtain the detected faces, call the media_info_foreach_face_from_db() function.
+ * To obtain the detected faces, call the media_info_foreach_face_from_db() function. \n
+ * Supported image formats are jpg, png, and bmp.
*
* @since_tizen 3.0
*
* %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.
- * Media items in external storage are not supported, with the exception of MMC items.
+ * @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
* @see media_content_connect()
* @see media_info_cancel_face_detection()
*/
-int media_info_start_face_detection(media_info_h media, media_face_detection_completed_cb callback, void *user_data);
+int media_info_start_face_detection(media_info_h media, media_face_detection_completed_cb callback, void *user_data) TIZEN_DEPRECATED_API;
/**
+ * @deprecated Deprecated since 8.0.
* @ingroup CAPI_CONTENT_MEDIA_FACE_DETECTION_MODULE
* @brief Cancels face detection of image for the given media.
* @details This function cancels face detection for given media item. \n
* @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
*
* @see media_content_connect()
* @see media_info_start_face_detection()
*/
-int media_info_cancel_face_detection(media_info_h media);
+int media_info_cancel_face_detection(media_info_h media) TIZEN_DEPRECATED_API;
/**
* @}