X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fmedia_playlist.h;h=a81cc7745e07a90c0c14cd975f22ad24f61fa677;hb=84bf986fd703c8fce7ada5c53367299ecd9ec582;hp=fdd233c2e2fac67c0e187e7238fafb68dd181d38;hpb=0e197e3f94afb3bbccc6507b8c70f3b1bc06a689;p=platform%2Fcore%2Fapi%2Fmedia-content.git diff --git a/include/media_playlist.h b/include/media_playlist.h index fdd233c..a81cc77 100755 --- a/include/media_playlist.h +++ b/include/media_playlist.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef __TIZEN_MEDIA_PLAYLIST_H__ -#define __TIZEN_MEDIA_PLAYLIST_H__ +#ifndef __TIZEN_CONTENT_MEDIA_PLAYLIST_H__ +#define __TIZEN_CONTENT_MEDIA_PLAYLIST_H__ #include @@ -39,9 +39,9 @@ extern "C" { /** * @brief Gets the number of playlists for the passed @a 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 filter + * @param[in] filter The handle to the media filter * @param[out] playlist_count The count of the media playlist * * @return @c 0 on success, @@ -51,7 +51,6 @@ extern "C" { * @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(). * @@ -65,10 +64,10 @@ int media_playlist_get_playlist_count_from_db(filter_h filter, int *playlist_cou * The callback function will be invoked for every retrieved media playlist. * If @c NULL is passed to the filter, no filtering is applied. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * - * @param[in] filter The handle to the audio 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, @@ -79,7 +78,6 @@ int media_playlist_get_playlist_count_from_db(filter_h filter, int *playlist_cou * @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_playlist_cb(). @@ -92,11 +90,11 @@ int media_playlist_foreach_playlist_from_db(filter_h filter, media_playlist_cb c /** * @brief Gets the number of the media info for the given playlist present in the media database. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * - * @param[in] playlist_id The ID of the media playlist - * @param[in] filter The media filter handle - * @param[out] media_count The number of media items + * @param[in] playlist_id The ID of the media playlist + * @param[in] filter The handle to the media filter + * @param[out] media_count The number of media items * * @return @c 0 on success, * otherwise a negative error value @@ -105,7 +103,6 @@ int media_playlist_foreach_playlist_from_db(filter_h filter, media_playlist_cb c * @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(). * @@ -116,15 +113,15 @@ int media_playlist_get_media_count_from_db(int playlist_id, filter_h filter, int /** * @brief Iterates through the media files with an optional @a filter in the given audio playlist from the media database. * @details This function gets all media files associated with the given media playlist and - * meeting desired filter option and calls registered callback function for + * meeting desired filter option and calls @a callback for * every retrieved media info. If @c NULL is passed to the @a filter, no filtering is applied. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * * @param[in] playlist_id The ID of the media playlist - * @param[in] filter The audio filter handle - * @param[in] callback The callback function to be invoked - * @param[in] user_data The user data to be passed to the callback function + * @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 @@ -134,7 +131,6 @@ int media_playlist_get_media_count_from_db(int playlist_id, filter_h filter, int * @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(). @@ -147,15 +143,15 @@ int media_playlist_foreach_media_from_db(int playlist_id, filter_h filter, playl /** * @brief Inserts a new playlist with the given name into 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 * - * @remarks You must release the created handle using media_playlist_destroy(). + * @remarks The @a playlist should be released using media_playlist_destroy(). * - * @param[in] name The name of the inserted playlist - * @param[out] playlist A created handle to media playlist + * @param[in] name The name of the inserted playlist + * @param[out] playlist The handle to the media playlist * * @return @c 0 on success, * otherwise a negative error value @@ -178,7 +174,7 @@ int media_playlist_insert_to_db(const char *name, media_playlist_h *playlist); /** * @brief Deletes the given playlist 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 @@ -209,12 +205,12 @@ int media_playlist_delete_from_db(int playlist_id); * @details This function creates a new media playlist handle from the media database by the given @a playlist_id. * The media playlist will be created and will be filled with the playlist information. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * - * @remarks You must release @a playlist using media_playlist_destroy(). + * @remarks The @a playlist should be released using media_playlist_destroy(). * - * @param[in] playlist_id The ID of the media playlist - * @param[out] playlist The media playlist handle associated with the playlist ID + * @param[in] playlist_id The ID of the media playlist + * @param[out] playlist The handle to the media playlist * * @return @c 0 on success, * otherwise a negative error value @@ -224,7 +220,6 @@ int media_playlist_delete_from_db(int playlist_id); * @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(). * @@ -236,19 +231,18 @@ int media_playlist_get_playlist_from_db(int playlist_id, media_playlist_h *playl /** * @brief Destroys a playlist handle. * @details This function frees all resources related to the playlist handle. This - * handle no longer can be used to perform any operation. A new handle has to + * handle no longer can be used to perform any operations. A new handle has to * be created before next usage. * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * - * @param[in] playlist The media playlist handle + * @param[in] playlist The handle to the media playlist * * @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 * * @pre Get a copy of playlist handle by calling media_playlist_clone() or media_playlist_insert_to_db(). * @@ -263,12 +257,12 @@ int media_playlist_destroy(media_playlist_h playlist); * media playlist foreach function such as media_playlist_foreach_playlist_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_playlist_destroy(). + * @remarks The @a dst should be released using media_playlist_destroy(). * - * @param[in] src The source handle of a media playlist - * @param[out] dst The destination handle to a media playlist + * @param[out] dst The destination handle to the media playlist + * @param[in] src The source handle to the media playlist * * @return @c 0 on success, * otherwise a negative error value @@ -276,7 +270,6 @@ int media_playlist_destroy(media_playlist_h playlist); * @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_PERMISSION_DENIED Permission denied * * @see media_playlist_destroy() * @see media_playlist_foreach_playlist_from_db() @@ -285,9 +278,9 @@ int media_playlist_clone(media_playlist_h *dst, media_playlist_h src); /** * @brief Gets the media playlist ID. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * - * @param[in] playlist The media playlist handle + * @param[in] playlist The handle to the media playlist * @param[out] playlist_id The ID of the media playlist * * @return @c 0 on success, @@ -295,17 +288,16 @@ int media_playlist_clone(media_playlist_h *dst, media_playlist_h src); * * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied */ int media_playlist_get_playlist_id(media_playlist_h playlist, int *playlist_id); /** * @brief Gets a name of the playlist. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * - * @remarks You must release @a playlist_name using free(). + * @remarks The @a playlist_name should be released using free(). * - * @param[in] playlist The media playlist handle + * @param[in] playlist The handle to the media playlist * @param[out] playlist_name The playlist name * * @return @c 0 on success, @@ -314,15 +306,14 @@ int media_playlist_get_playlist_id(media_playlist_h playlist, int *playlist_id); * @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_PERMISSION_DENIED Permission denied */ int media_playlist_get_name(media_playlist_h playlist, char **playlist_name); /** * @brief Sets the name of the playlist. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * - * @param[in] playlist The media playlist handle + * @param[in] playlist The handle to the media playlist * @param[in] playlist_name The name of the media playlist * * @return @c 0 on success, @@ -331,7 +322,6 @@ int media_playlist_get_name(media_playlist_h playlist, char **playlist_name); * @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_PERMISSION_DENIED Permission denied * * @post media_playlist_update_to_db() * @@ -340,12 +330,12 @@ int media_playlist_set_name(media_playlist_h playlist, const char *playlist_name /** * @brief Gets a thumbnail path of the playlist. - * @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] playlist The media playlist handle - * @param[out] path The path of the thumbnail + * @param[in] playlist The handle to the media playlist + * @param[out] path The path of the thumbnail * * @return @c 0 on success, * otherwise a negative error value @@ -353,16 +343,15 @@ int media_playlist_set_name(media_playlist_h playlist, const char *playlist_name * @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_PERMISSION_DENIED Permission denied */ int media_playlist_get_thumbnail_path(media_playlist_h playlist, char **path); /** * @brief Sets the thumbnail path of the playlist. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * - * @param[in] playlist The media playlist handle - * @param[in] path The path of the thumbnail + * @param[in] playlist The handle to the media playlist + * @param[in] path The path of the thumbnail * * @return @c 0 on success, * otherwise a negative error value @@ -370,7 +359,6 @@ int media_playlist_get_thumbnail_path(media_playlist_h playlist, char **path); * @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_PERMISSION_DENIED Permission denied * * @post media_playlist_update_to_db() */ @@ -379,11 +367,11 @@ int media_playlist_set_thumbnail_path(media_playlist_h playlist, const char *pat /** * @brief Sets the playing order in the playlist. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * - * @param[in] playlist The media playlist handle - * @param[in] playlist_member_id The playlist member ID - * @param[in] play_order The playing order + * @param[in] playlist The handle to the media playlist + * @param[in] playlist_member_id The ID of the playlist member + * @param[in] play_order The playing order * * @return @c 0 on success, * otherwise a negative error value @@ -391,7 +379,6 @@ int media_playlist_set_thumbnail_path(media_playlist_h playlist, const char *pat * @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_PERMISSION_DENIED Permission denied * * @post media_playlist_update_to_db() */ @@ -399,10 +386,10 @@ int media_playlist_set_play_order(media_playlist_h playlist, int playlist_member /** * @brief Adds a new media info to the playlist. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * - * @param[in] playlist The media playlist handle - * @param[in] media_id The ID to the media info which is added + * @param[in] playlist The handle to the media playlist + * @param[in] media_id The media ID * * @return @c 0 on success, * otherwise a negative error value @@ -410,7 +397,6 @@ int media_playlist_set_play_order(media_playlist_h playlist, int playlist_member * @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_PERMISSION_DENIED Permission denied * * @pre This function requires opened connection to content service by media_content_connect(). * @post media_playlist_update_to_db() @@ -422,10 +408,10 @@ int media_playlist_add_media(media_playlist_h playlist, const char *media_id); /** * @brief Removes the playlist members related with the media from the given playlist. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * - * @param[in] playlist The media playlist handle - * @param[in] playlist_member_id The playlist member ID + * @param[in] playlist The handle to the media playlist + * @param[in] playlist_member_id The ID of the playlist member * * @return @c 0 on success, * otherwise a negative error value @@ -433,7 +419,6 @@ int media_playlist_add_media(media_playlist_h playlist, const char *media_id); * @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_PERMISSION_DENIED Permission denied * * @pre This function requires opened connection to content service by media_content_connect(). * @post media_playlist_update_to_db() @@ -445,18 +430,17 @@ int media_playlist_remove_media(media_playlist_h playlist, int playlist_member_i /** * @brief Gets the played order of the playlist. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif + * @since_tizen 2.3 * - * @param[in] playlist The media playlist handle - * @param[in] playlist_member_id The playlist member ID - * @param[out] play_order The played order + * @param[in] playlist The handle to the media playlist + * @param[in] playlist_member_id The ID of the playlist member + * @param[out] play_order The played order * * @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 */ int media_playlist_get_play_order(media_playlist_h playlist, int playlist_member_id, int *play_order); @@ -469,12 +453,12 @@ int media_playlist_get_play_order(media_playlist_h playlist, int playlist_member * media_playlist_update_to_db() function should be called so as to update * the given playlist attributes in 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] playlist The media playlist handle + * @param[in] playlist The handle to the media playlist * * @return @c 0 on success, * otherwise a negative error value @@ -501,19 +485,20 @@ int media_playlist_update_to_db(media_playlist_h playlist); /** * @brief Imports the playlist from m3u playlist file. - * @details This api reads a playlist from the m3u playlist file and insert into the db. - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * @details This function reads a playlist from the m3u playlist file and insert into the db. + * @since_tizen 2.4 * * @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 - * This api does not support the file of extended m3u playlist. + * @remarks The @a playlist should be released using media_playlist_destroy(). + * @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 + * This function does not support the file of extended m3u playlist. * - * @param[in] playlist_name The name of the playlist to save + * @param[in] playlist_name The name of the media playlist to save * @param[in] path The path to import the playlist file - * @param[out] playlist The media playlist handle + * @param[out] playlist The handle to the media playlist * * @return @c 0 on success, * otherwise a negative error value @@ -531,12 +516,12 @@ int media_playlist_import_from_file(const char *playlist_name, const char *path, /** * @brief Exports the playlist to m3u playlist file. - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * @since_tizen 2.4 * - * @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. * - * @param[in] playlist The media playlist handle + * @param[in] playlist The handle to the media playlist * @param[in] path path The path to export the playlist * * @return @c 0 on success, @@ -560,4 +545,4 @@ int media_playlist_export_to_file(media_playlist_h playlist, const char* path); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /*__TIZEN_MEDIA_PLAYLIST_H__*/ +#endif /*__TIZEN_CONTENT_MEDIA_PLAYLIST_H__*/