X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fmedia_bookmark.h;h=8872b7b97f0824e3f45c4494d2b955413da6ea67;hb=refs%2Fchanges%2F80%2F308280%2F6;hp=ef32da61d4ba4042fc6a14e30cb37839ef8c358d;hpb=948068dc02047c8ba66452790746b6eb5b38ff33;p=platform%2Fcore%2Fapi%2Fmedia-content.git diff --git a/include/media_bookmark.h b/include/media_bookmark.h index ef32da6..8872b7b 100755 --- a/include/media_bookmark.h +++ b/include/media_bookmark.h @@ -16,8 +16,8 @@ -#ifndef __TIZEN_MEDIA_BOOKMARK_H__ -#define __TIZEN_MEDIA_BOOKMARK_H__ +#ifndef __TIZEN_CONTENT_MEDIA_BOOKMARK_H__ +#define __TIZEN_CONTENT_MEDIA_BOOKMARK_H__ #include @@ -38,14 +38,15 @@ extern "C" { */ /** + * @deprecated Deprecated since 9.0. * @brief Inserts a new bookmark in media on the specified time offset to the media database. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @privlevel public * @privilege %http://tizen.org/privilege/content.write * - * @param[in] media_id The media ID - * @param[in] time The bookmark time offset (in seconds) + * @param[in] media_id The media ID + * @param[in] time The bookmark time offset (in seconds) * @param[in] thumbnail_path The thumbnail path of video bookmark\ n * If the media type is audio, then thumbnail is null. * @@ -65,16 +66,17 @@ extern "C" { * @see media_content_connect() * @see media_bookmark_delete_from_db() */ -int media_bookmark_insert_to_db(const char *media_id, time_t time, const char *thumbnail_path); +int media_bookmark_insert_to_db(const char *media_id, time_t time, const char *thumbnail_path) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 9.0. * @brief Removes a media bookmark from the media database. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @privlevel public * @privilege %http://tizen.org/privilege/content.write * - * @param[in] bookmark_id The ID of media bookmark + * @param[in] bookmark_id The ID of the media bookmark * * @return @c 0 on success, * otherwise a negative error value @@ -92,13 +94,14 @@ int media_bookmark_insert_to_db(const char *media_id, time_t time, const char *t * @see media_content_connect() * @see media_bookmark_insert_to_db() */ -int media_bookmark_delete_from_db(int bookmark_id); +int media_bookmark_delete_from_db(int bookmark_id) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 9.0. * @brief Gets the number of bookmarks with an optional filter from the media database. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * - * @param[in] filter The handle to the media filter + * @param[in] filter The handle to the media filter * @param[out] bookmark_count The count of the media bookmark * * @return @c 0 on success, @@ -108,26 +111,55 @@ int media_bookmark_delete_from_db(int bookmark_id); * @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_bookmark_get_bookmark_count_from_db(filter_h filter, int *bookmark_count); +int media_bookmark_get_bookmark_count_from_db(filter_h filter, int *bookmark_count) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 9.0. + * @brief Iterates through the bookmarks with an optional filter from the media database. + * @details This function gets all bookmarks associated with the given filter and calls @a callback for every retrieved media bookmark. + * If @c NULL is passed to the @a filter, then no filtering is applied. + * @since_tizen 4.0 + * + * @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, + * 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_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(). + * @post This function invokes media_bookmark_cb(). + * + * @see media_content_connect() + * @see media_bookmark_cb() + * @see media_filter_create() + */ +int media_bookmark_foreach_bookmark_from_db(filter_h filter, media_bookmark_cb callback, void *user_data) TIZEN_DEPRECATED_API; + +/** + * @deprecated Deprecated since 9.0. * @brief Clones a media bookmark. * @details This function copies the media bookmark handle from a source to destination. There is no media_bookmark_create() function. * The media_bookmark_h is created internally and available through media bookmark foreach function such as media_info_foreach_bookmark_from_db(). * To use this handle outside of these foreach functions, use this function. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * - * @remarks The destination handle must be released using media_bookmark_destroy(). + * @remarks The @a dst should be released using media_bookmark_destroy(). * - * @param[out] dst The destination handle to media bookmark - * @param[in] src The source handle to media bookmark + * @param[out] dst The destination handle to the media bookmark + * @param[in] src The source handle to the media bookmark * * @return @c 0 on success, * otherwise a negative error value @@ -139,17 +171,18 @@ int media_bookmark_get_bookmark_count_from_db(filter_h filter, int *bookmark_cou * @see media_bookmark_destroy() * @see media_info_foreach_bookmark_from_db() */ -int media_bookmark_clone(media_bookmark_h *dst, media_bookmark_h src); +int media_bookmark_clone(media_bookmark_h *dst, media_bookmark_h src) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 9.0. * @brief Destroys a media bookmark. * @details This function frees all the resources related to the bookmark handle. This handle - * no longer can be used to perform any operation. A new handle has to + * no longer can be used to perform any operations. A new handle has to * be created before the next use. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * - * @param[in] bookmark The handle to media bookmark + * @param[in] bookmark The handle to the media bookmark * * @return @c 0 on success, * otherwise a negative error value @@ -161,14 +194,15 @@ int media_bookmark_clone(media_bookmark_h *dst, media_bookmark_h src); * * @see media_bookmark_clone() */ -int media_bookmark_destroy(media_bookmark_h bookmark); +int media_bookmark_destroy(media_bookmark_h bookmark) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 9.0. * @brief Gets the bookmark ID. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * - * @param[in] bookmark The handle to media bookmark - * @param[out] bookmark_id The media bookmark ID + * @param[in] bookmark The handle to the media bookmark + * @param[out] bookmark_id The ID of the media bookmark * * @return @c 0 on success, * otherwise a negative error value @@ -176,16 +210,17 @@ int media_bookmark_destroy(media_bookmark_h bookmark); * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter */ -int media_bookmark_get_bookmark_id(media_bookmark_h bookmark, int *bookmark_id); +int media_bookmark_get_bookmark_id(media_bookmark_h bookmark, int *bookmark_id) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 9.0. * @brief Gets the bookmark time marked parameter. * @details This function returns time offset in seconds from beginning of the movie on which bookmark * was placed. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * - * @param[in] bookmark The handle to media bookmark + * @param[in] bookmark The handle to the media bookmark * @param[out] marked_time The bookmark time offset (in seconds) * * @return @c 0 on success, @@ -194,16 +229,17 @@ int media_bookmark_get_bookmark_id(media_bookmark_h bookmark, int *bookmark_id); * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter */ -int media_bookmark_get_marked_time(media_bookmark_h bookmark, time_t *marked_time); +int media_bookmark_get_marked_time(media_bookmark_h bookmark, time_t *marked_time) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 9.0. * @brief Gets the media bookmark thumbnail. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * - * @remarks You must release @a path using free(). + * @remarks The @a path should be released using free(). * - * @param[in] bookmark The handle to media bookmark - * @param[out] path The thumbnail path of media bookmark + * @param[in] bookmark The handle to the media bookmark + * @param[out] path The thumbnail path of media bookmark * * @return @c 0 on success, * otherwise a negative error value @@ -212,16 +248,17 @@ int media_bookmark_get_marked_time(media_bookmark_h bookmark, time_t *marked_tim * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory */ -int media_bookmark_get_thumbnail_path(media_bookmark_h bookmark, char **path); +int media_bookmark_get_thumbnail_path(media_bookmark_h bookmark, char **path) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 9.0. * @brief Gets the media bookmark name which user set. * @since_tizen 4.0 * - * @remarks You must release @a name using free(). + * @remarks The @a name should be released using free(). * - * @param[in] bookmark The handle to media bookmark - * @param[out] name The name of media bookmark. If name was not set, empty string is returned. + * @param[in] bookmark The handle to the media bookmark + * @param[out] name The name of media bookmark. If name was not set, empty string is returned. * If User set bookmark name to NULL, name will be empty string also. * * @return @c 0 on success, @@ -231,14 +268,15 @@ int media_bookmark_get_thumbnail_path(media_bookmark_h bookmark, char **path); * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory */ -int media_bookmark_get_name(media_bookmark_h bookmark, char **name); +int media_bookmark_get_name(media_bookmark_h bookmark, char **name) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 9.0. * @brief Sets the media bookmark name. * @since_tizen 4.0 * - * @param[in] bookmark The handle to media bookmark - * @param[in] name The name of media bookmark. Can be NULL, empty or non-empty string. + * @param[in] bookmark The handle to the media bookmark + * @param[in] name The name of media bookmark. Can be NULL, empty or non-empty string. * * @return @c 0 on success, * otherwise a negative error value @@ -249,9 +287,10 @@ int media_bookmark_get_name(media_bookmark_h bookmark, char **name); * * @post media_bookmark_update_to_db() */ -int media_bookmark_set_name(media_bookmark_h bookmark, const char *name); +int media_bookmark_set_name(media_bookmark_h bookmark, const char *name) TIZEN_DEPRECATED_API; /** + * @deprecated Deprecated since 9.0. * @brief Updates bookmark information to the media database. * @details The function updates the given bookmark meta in the media database. \n * The function should be called after any change in bookmark attributes, to be updated to the media database. \n @@ -263,26 +302,26 @@ int media_bookmark_set_name(media_bookmark_h bookmark, const char *name); * @privilege %http://tizen.org/privilege/content.write * * @remarks Do not call this function in callback function of foreach function like media_info_foreach_bookmark_from_db(). - * @param[in] bookmark The handle to media bookmark + * @param[in] bookmark The handle to the media bookmark * * @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 when Application has no privilege + * @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 when Application has no privilege * * @pre This function requires opened connection to content service by media_content_connect(). * * @see media_content_connect() * @see media_bookmark_set_name() */ -int media_bookmark_update_to_db(media_bookmark_h bookmark); +int media_bookmark_update_to_db(media_bookmark_h bookmark) TIZEN_DEPRECATED_API; /** * @} @@ -291,4 +330,4 @@ int media_bookmark_update_to_db(media_bookmark_h bookmark); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /*__TIZEN_MEDIA_BOOKMARK_H__*/ +#endif /*__TIZEN_CONTENT_MEDIA_BOOKMARK_H__*/