Revert "Remove TIZEN_FEATURE_COMPATIBILITY code"
[platform/core/api/media-content.git] / include / media_playlist.h
index fdd233c..6cbfe4a 100755 (executable)
@@ -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 <media_content_type.h>
 
@@ -41,7 +41,7 @@ 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
  *
- * @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().
  *
@@ -67,8 +66,8 @@ int media_playlist_get_playlist_count_from_db(filter_h filter, int *playlist_cou
  *
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @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().
@@ -94,9 +92,9 @@ 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
  *
- * @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
  *
  * @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().
@@ -152,10 +148,10 @@ int media_playlist_foreach_media_from_db(int playlist_id, filter_h filter, playl
  * @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
@@ -211,10 +207,10 @@ int media_playlist_delete_from_db(int playlist_id);
  *
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @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
  *
- * @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().
  *
@@ -265,10 +259,10 @@ int media_playlist_destroy(media_playlist_h playlist);
  *
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  *
- * @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()
@@ -287,7 +280,7 @@ 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
  *
- * @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,7 +288,6 @@ 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);
 
@@ -303,9 +295,9 @@ 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
  *
- * @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,7 +306,6 @@ 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);
 
@@ -322,7 +313,7 @@ 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
  *
- * @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()
  *
@@ -342,10 +332,10 @@ 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
  *
- * @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,7 +343,6 @@ 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);
 
@@ -361,8 +350,8 @@ 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
  *
- * @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()
  */
@@ -381,9 +369,9 @@ 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
  *
- * @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()
  */
@@ -401,8 +388,8 @@ 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
  *
- * @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()
@@ -424,8 +410,8 @@ 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
  *
- * @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()
@@ -447,16 +432,15 @@ 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
  *
- * @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);
 
@@ -474,7 +458,7 @@ int media_playlist_get_play_order(media_playlist_h playlist, int playlist_member
  * @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.
+ * @details This function reads a playlist from the m3u playlist file and insert into the db.
  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
  *
  * @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
@@ -533,10 +518,10 @@ 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
  *
- * @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__*/