X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fmedia_storage.h;h=ccadd946f579ad76656f75981a1de638cd32d63d;hb=53e9dfd6d13a24cf8260984833fca50b664a26bc;hp=b2026127847242802f8b116fa356f4ece3835ae2;hpb=f31090409e3e9eebf6f8516df66638c3a16b1df4;p=platform%2Fcore%2Fapi%2Fmedia-content.git diff --git a/include/media_storage.h b/include/media_storage.h index b202612..ccadd94 100755 --- a/include/media_storage.h +++ b/include/media_storage.h @@ -15,8 +15,8 @@ */ -#ifndef __TIZEN_MEDIA_STORAGE_H__ -#define __TIZEN_MEDIA_STORAGE_H__ +#ifndef __TIZEN_CONTENT_MEDIA_STORAGE_H__ +#define __TIZEN_CONTENT_MEDIA_STORAGE_H__ #include @@ -28,7 +28,7 @@ extern "C" { /** * @file media_storage.h - * @brief This file contains API on main functional operations with storage that are related to media resources in the media database. \n + * @brief This file contains API on main functional operations with external storage that are related to media resources in the media database. \n * Operations include: getting number of storages, cloning and destroying storage, getting storage`s ID, name, path and type. */ @@ -38,64 +38,64 @@ extern "C" { */ /** +* @deprecated Deprecated since 5.0. * @brief Gets media storage from database. -* @since_tizen 2.4 +* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * -* @remarks You must release the handle using media_storage_destroy(). \n +* @remarks The @a storage should be released using media_storage_destroy(). * -* @param[in] storage_id The storage id to get media storage info +* @param[in] storage_id The ID of the media storage * @param[out] storage The media storage handle * * @return @c 0 on success, * otherwise a negative error value * -* @retval #MEDIA_CONTENT_ERROR_NONE Successful +* @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_DB_FAILED DB Operation failed -* @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy -* @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - +* @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 * * @pre This function requires opened connection to content service by media_content_connect(). * * @see media_content_connect() */ -int media_storage_get_storage_info_from_db(const char *storage_id, media_storage_h *storage); +int media_storage_get_storage_info_from_db(const char *storage_id, media_storage_h *storage) TIZEN_DEPRECATED_API; /** +* @deprecated Deprecated since 5.0. Use @ref CAPI_SYSTEM_STORAGE_MODULE instead. * @brief Gets the count of media storage for the passed @a filter from the media database. -* @since_tizen 2.4 +* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * -* @param[in] filter The handle to filter +* @param[in] filter The handle to the media filter * @param[out] storage_count The count of storage * * @return @c 0 on success, * otherwise a negative error value * -* @retval #MEDIA_CONTENT_ERROR_NONE Successful +* @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_PERMISSION_DENIED Permission denied +* @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() */ -int media_storage_get_storage_count_from_db(filter_h filter, int *storage_count); +int media_storage_get_storage_count_from_db(filter_h filter, int *storage_count) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 5.0. Use @ref CAPI_SYSTEM_STORAGE_MODULE instead. * @brief Iterates through media storage from the media database. * @details This function gets all media storage handles meeting the given @a filter. * The @a callback function will be invoked for every retrieved media storage. * If @c NULL is passed to the @a filter, then no filtering is applied. * - * @since_tizen 2.4 + * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * - * @param[in] filter The media storage handle filter - * @param[in] callback The callback function to be invoked + * @param[in] filter The handle to the media filter + * @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, @@ -106,7 +106,6 @@ int media_storage_get_storage_count_from_db(filter_h filter, int *storage_count) * @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(). * @post This function invokes media_storage_destroy(). @@ -114,14 +113,17 @@ int media_storage_get_storage_count_from_db(filter_h filter, int *storage_count) * @see media_content_connect() * @see media_storage_destroy() */ -int media_storage_foreach_storage_from_db(filter_h filter, media_storage_cb callback, void *user_data); +int media_storage_foreach_storage_from_db(filter_h filter, media_storage_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** - * @brief Gets the count of media files for the passed @a filter in the given @a storage from the media database. - * @since_tizen 2.4 + * @deprecated Deprecated since 5.0. Use media_info_get_media_count_from_db() instead. + * @brief Gets the count of media files for the passed @a filter in the given @a storage_id from the media database. + * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * + * @remarks Use media_info_get_media_count_from_db() if you want to search for internal storage. * - * @param[in] storage_id The ID of the media storage - * @param[in] filter The filter of the media content + * @param[in] storage_id The ID of the media storage + * @param[in] filter The handle to the media filter * @param[out] media_count The count of media storage items * * @return @c 0 on success, @@ -131,30 +133,31 @@ int media_storage_foreach_storage_from_db(filter_h filter, media_storage_cb call * @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 - * @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_storage_get_media_count_from_db(const char *storage_id, filter_h filter, int *media_count); +int media_storage_get_media_count_from_db(const char *storage_id, filter_h filter, int *media_count) TIZEN_DEPRECATED_API; /** - * @brief Iterates through the media files with an optional @a filter in the given @a storage from the media database. + * @deprecated Deprecated since 5.0. Use media_info_foreach_media_from_db() instead. + * @brief Iterates through the media files with an optional @a filter in the given @a storage_id from the media database. * @details This function gets all media files associated with the given storage and - * meeting desired filter option and calls registered callback function for + * meeting desired filter option and calls @a callback for * every retrieved media item. If @c NULL is passed to the @a filter, no filtering is applied. * - * @since_tizen 2.4 + * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * - * @remarks Do not call updating DB function like media_info_update_to_db(), media_info_refresh_metadata_to_db(), audio_meta_update_to_db(), image_meta_update_to_db() and video_meta_update_to_db() in your callback function, + * @remarks Do not call updating DB function like media_info_update_to_db() in your callback function, * your callback function is invoked as inline function. \n * So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB. \n - * We do not recommend you call updating DB function in callback of foreach function. + * We do not recommend you call updating DB function in callback of foreach function.\n + * Use media_info_foreach_media_from_db() if you want to search for internal storage. * * @param[in] storage_id The ID of the media storage - * @param[in] filter The handle to the media info filter - * @param[in] callback The callback function to be invoked + * @param[in] filter The handle to the media filter + * @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, @@ -165,7 +168,6 @@ int media_storage_get_media_count_from_db(const char *storage_id, filter_h filte * @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(). * @post This function invokes media_info_cb(). @@ -174,17 +176,18 @@ int media_storage_get_media_count_from_db(const char *storage_id, filter_h filte * @see media_content_connect() * @see media_filter_create() */ -int media_storage_foreach_media_from_db(const char *storage_id, filter_h filter, media_info_cb callback, void *user_data); +int media_storage_foreach_media_from_db(const char *storage_id, filter_h filter, media_info_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 5.0. * @brief Destroys media storage handle. * @details The function frees all resources related to the media storage handle. This handle - * can no longer be used to perform any operation. New media storage handle has to + * can no longer be used to perform any operations. New media storage handle has to * be created before the next usage. * - * @since_tizen 2.4 + * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * - * @param[in] storage The media storage handle + * @param[in] storage The media storage handle * * @return @c 0 on success, * otherwise a negative error value @@ -196,9 +199,10 @@ int media_storage_foreach_media_from_db(const char *storage_id, filter_h filter, * * @see media_storage_clone() */ -int media_storage_destroy(media_storage_h storage); +int media_storage_destroy(media_storage_h storage) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 5.0. * @brief Clones the media storage handle. * * @details This function copies the media storage handle from a source to the destination. @@ -206,12 +210,12 @@ int media_storage_destroy(media_storage_h storage); * available through media storage foreach function such as media_storage_foreach_storage_from_db(). * To use this handle outside of these foreach functions, use this function. * - * @since_tizen 2.4 + * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * - * @remarks You must release the destination handle using media_storage_destroy(). + * @remarks The @a dst should be released using media_storage_destroy(). * - * @param[out] dst The destination handle to the media storage - * @param[in] src The source handle to media storage + * @param[out] dst The destination handle to the media storage + * @param[in] src The source handle to the media storage * * @return @c 0 on success, * otherwise a negative error value @@ -224,35 +228,17 @@ int media_storage_destroy(media_storage_h storage); * @see media_storage_foreach_storage_from_db() * @see media_storage_get_storage_info_from_db() */ -int media_storage_clone(media_storage_h *dst, media_storage_h src); +int media_storage_clone(media_storage_h *dst, media_storage_h src) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 5.0. * @brief Gets the storage id of media storage. - * @since_tizen 2.4 - * - * @remarks You must release @a storage_id using free(). - * - * @param[in] storage The media storage handle - * @param[out] storage_id The storage 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_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - */ -int media_storage_get_id(media_storage_h storage, char **storage_id); - -/** - * @brief Gets the storage name of media storage. - * @since_tizen 2.4 + * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * - * @remarks You must release @a storage_name using free(). - * If the requested storage is not the cloud storage, this API returns NULL. + * @remarks The @a storage_id should be released using free(). * - * @param[in] storage The media storage handle - * @param[out] storage_name The storage name of the media storage + * @param[in] storage The media storage handle + * @param[out] storage_id The ID of the media storage * * @return @c 0 on success, * otherwise a negative error value @@ -261,16 +247,17 @@ int media_storage_get_id(media_storage_h storage, char **storage_id); * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory */ -int media_storage_get_name(media_storage_h storage, char **storage_name); +int media_storage_get_id(media_storage_h storage, char **storage_id) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 5.0. Use @ref CAPI_SYSTEM_STORAGE_MODULE instead. * @brief Gets the storage path of media storage. - * @since_tizen 2.4 + * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * - * @remarks You must release @a storage_path using free(). + * @remarks The @a storage_path should be released using free(). * - * @param[in] storage The media storage handle - * @param[out] storage_path The storage path of the media storage + * @param[in] storage The media storage handle + * @param[out] storage_path The storage path of the media storage * * @return @c 0 on success, * otherwise a negative error value @@ -279,14 +266,15 @@ int media_storage_get_name(media_storage_h storage, char **storage_name); * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory */ -int media_storage_get_path(media_storage_h storage, char **storage_path); +int media_storage_get_path(media_storage_h storage, char **storage_path) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 5.0. Use storage_get_type_dev() instead. * @brief Gets the storage type of media storage. - * @since_tizen 2.4 + * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * - * @param[in] storage The media storage handle - * @param[out] storage_type The storage type of the media storage + * @param[in] storage The media storage handle + * @param[out] storage_type The storage type of the media storage * * @return @c 0 on success, * otherwise a negative error value @@ -294,7 +282,7 @@ int media_storage_get_path(media_storage_h storage, char **storage_path); * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter */ -int media_storage_get_type(media_storage_h storage, media_content_storage_e *storage_type); +int media_storage_get_type(media_storage_h storage, media_content_storage_e *storage_type) TIZEN_DEPRECATED_API; /** * @} @@ -304,4 +292,4 @@ int media_storage_get_type(media_storage_h storage, media_content_storage_e *sto } #endif /* __cplusplus */ -#endif /* __TIZEN_MEDIA_STORAGE_H__ */ +#endif /* __TIZEN_CONTENT_MEDIA_STORAGE_H__ */