From 6daff21c5dd1868454e9a11287a86ddde6ea75f0 Mon Sep 17 00:00:00 2001 From: hj kim Date: Wed, 6 Mar 2019 18:32:57 +0900 Subject: [PATCH] [ACR-1363] Add and Remove some playlist related APIs 1. Deprecated int mc_server_foreach_playlist(mc_server_h server, mc_playlist_cb callback, void *user_data) int mc_client_foreach_server_playlist(mc_client_h client, const char *server_name, mc_playlist_cb callback, void *user_data) 2. Added int mc_playlist_get_item_count(mc_playlist_h playlist, int *item_count); int mc_playlist_get_playlist_count(const char *app_id, int *playlist_count); int mc_playlist_foreach_playlist(const char *app_id, mc_playlist_cb callback, void *user_data); int mc_playlist_get_playlist(const char *app_id, const char *playlist_name, mc_playlist_h *playlist); Change-Id: I618b4f4141541bef05b452e408d90c59299b4bbf --- include/media_controller_client.h | 300 ++++++++++++++---------- include/media_controller_internal.h | 6 - include/media_controller_metadata.h | 4 +- include/media_controller_playlist.h | 148 ++++++++++-- include/media_controller_server.h | 185 +++++++++------ src/media_controller_client.c | 2 + src/media_controller_playlist.c | 42 +++- src/media_controller_server.c | 3 +- test/client_test/media_controller_client_test.c | 2 +- test/server_test/media_controller_server_test.c | 12 +- 10 files changed, 472 insertions(+), 232 deletions(-) diff --git a/include/media_controller_client.h b/include/media_controller_client.h index 48e1d18..f7961ea 100755 --- a/include/media_controller_client.h +++ b/include/media_controller_client.h @@ -265,13 +265,13 @@ typedef bool (*mc_subscribed_server_cb)(const char *server_name, void *user_data * @param[in] server_name The app_id of the media controller server which sent the notification. * @param[in] mode The playlist update mode of the updated media controller server * @param[in] playlist_name Updated playlist name. - * @param[in] playlist The handle to the media controller playlist. + * @param[in] playlist The handle of the media controller playlist. * @param[in] user_data The user data passed from the mc_client_set_playlist_updated_cb() function * * @pre mc_client_set_playlist_updated_cb() * * @see mc_client_set_playlist_updated_cb() - * @see mc_client_foreach_server_playlist() + * @see mc_playlist_foreach_playlist() */ typedef void (*mc_playlist_updated_cb)(const char *server_name, mc_playlist_update_mode_e mode, const char *playlist_name, mc_playlist_h playlist, void *user_data); @@ -309,14 +309,14 @@ typedef void (*mc_client_custom_event_received_cb)(const char *server_name, cons * * @remarks The @a client should be released using @c mc_client_destroy(). You can create only one client handle for each process. * - * @param[out] client The handle to the media controller client + * @param[out] client The handle of the media controller client * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @see mc_client_destroy() */ int mc_client_create(mc_client_h *client); @@ -329,16 +329,17 @@ int mc_client_create(mc_client_h *client); * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] callback The callback to be invoked when the media controller server status is changed * @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_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() @@ -352,13 +353,13 @@ int mc_client_set_server_updated_cb(mc_client_h client, mc_server_state_updated_ * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() @@ -373,16 +374,17 @@ int mc_client_unset_server_updated_cb(mc_client_h client); * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] callback The callback to be invoked when the playback status is changed * @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_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() @@ -396,13 +398,14 @@ int mc_client_set_playback_updated_cb(mc_client_h client, mc_playback_updated_cb * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() @@ -417,16 +420,17 @@ int mc_client_unset_playback_updated_cb(mc_client_h client); * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] callback The callback to be invoked when the metadata status is changed * @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_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() @@ -440,13 +444,14 @@ int mc_client_set_metadata_updated_cb(mc_client_h client, mc_metadata_updated_cb * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() @@ -461,16 +466,17 @@ int mc_client_unset_metadata_updated_cb(mc_client_h client); * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] callback The callback to be invoked when the shuffle mode is changed * @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_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() @@ -484,13 +490,14 @@ int mc_client_set_shuffle_mode_updated_cb(mc_client_h client, mc_shuffle_mode_up * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() @@ -505,16 +512,17 @@ int mc_client_unset_shuffle_mode_updated_cb(mc_client_h client); * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] callback The callback to be invoked when the repeat mode is changed * @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_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() @@ -528,13 +536,14 @@ int mc_client_set_repeat_mode_updated_cb(mc_client_h client, mc_repeat_mode_upda * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() @@ -549,16 +558,17 @@ int mc_client_unset_repeat_mode_updated_cb(mc_client_h client); * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] callback The callback to be invoked when the ability is changed * @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_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() @@ -572,13 +582,14 @@ int mc_client_set_playback_ability_updated_cb(mc_client_h client, mc_playback_ab * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() @@ -593,16 +604,17 @@ int mc_client_unset_playback_ability_updated_cb(mc_client_h client); * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] callback The callback to be invoked when the ability is changed * @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_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() @@ -616,13 +628,14 @@ int mc_client_set_shuffle_ability_updated_cb(mc_client_h client, mc_shuffle_abil * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() @@ -637,16 +650,17 @@ int mc_client_unset_shuffle_ability_updated_cb(mc_client_h client); * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] callback The callback to be invoked when the ability is changed * @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_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() @@ -660,13 +674,14 @@ int mc_client_set_repeat_ability_updated_cb(mc_client_h client, mc_repeat_abilit * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() @@ -681,16 +696,17 @@ int mc_client_unset_repeat_ability_updated_cb(mc_client_h client); * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] callback The callback to be invoked when the reply is received * @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_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_unset_cmd_reply_received_cb() @@ -705,13 +721,14 @@ int mc_client_set_cmd_reply_received_cb(mc_client_h client, mc_cmd_reply_receive * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_set_cmd_reply_received_cb() @@ -727,16 +744,17 @@ int mc_client_unset_cmd_reply_received_cb(mc_client_h client); * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] callback The callback to be invoked when the playlist status is changed * @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_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() @@ -752,13 +770,14 @@ int mc_client_set_playlist_updated_cb(mc_client_h client, mc_playlist_updated_cb * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() @@ -779,10 +798,11 @@ int mc_client_unset_playlist_updated_cb(mc_client_h client); * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_client_create() * @see mc_client_custom_event_received_cb() @@ -799,13 +819,14 @@ int mc_client_set_custom_event_received_cb(mc_client_h client, mc_client_custom_ * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_client_create() * @see mc_client_custom_event_received_cb() @@ -825,7 +846,7 @@ int mc_client_unset_custom_event_received_cb(mc_client_h client); * If @a request_id is not null there, the media controller client should send the reply to the media controller server with the @a request_id. \n * If @a request_id is null, this function will return #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER. * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server * @param[in] request_id The id of the event request, received in the mc_client_set_custom_event_received_cb() function. * @param[in] result_code The result code of custom event @@ -833,10 +854,11 @@ int mc_client_unset_custom_event_received_cb(mc_client_h client); * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_client_create() * @see mc_client_set_custom_event_received_cb() @@ -858,16 +880,17 @@ int mc_client_send_event_reply(mc_client_h client, const char *server_name, cons * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] subscription_type The subscription type * @param[in] server_name The app_id of the media controller server * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create() * @pre Set the callback for monitoring status of the media controller server * @post Unsubscribe the media controller server for monitoring status by calling mc_client_unsubscribe() @@ -888,14 +911,16 @@ int mc_client_subscribe(mc_client_h client, mc_subscription_type_e subscription_ * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] subscription_type The subscription type * @param[in] server_name The app_id of the media controller server * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation + * * @pre Create a media controller client handle by calling mc_client_create() * @pre Subscribe the media controller server for monitoring status by calling mc_client_subscribe() * @see mc_client_create() @@ -910,17 +935,18 @@ int mc_client_unsubscribe(mc_client_h client, mc_subscription_type_e subscriptio * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] subscription_type The subscription type * @param[in] callback The callback to be invoked when the list of the subscribed media controller server. * @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_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create() * @pre Subscribe the media controller server for monitoring status by calling mc_client_subscribe() * @see mc_client_create() @@ -940,8 +966,9 @@ int mc_client_foreach_server_subscribed(mc_client_h client, mc_subscription_type * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * * @pre The playback update callback should be set with mc_client_set_playback_updated_cb(). * @see mc_client_set_playback_updated_cb() */ @@ -959,8 +986,9 @@ int mc_client_get_playback_state(mc_playback_h playback, mc_playback_states_e *s * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * * @pre The playback update callback should be set with mc_client_set_playback_updated_cb(). * @see mc_client_set_playback_updated_cb() */ @@ -982,13 +1010,13 @@ int mc_client_get_playback_position(mc_playback_h playback, unsigned long long * * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * * @pre The playback update callback should be set with mc_client_set_playback_updated_cb(). * @see mc_client_set_playback_updated_cb() - * @see mc_client_foreach_server_playlist() + * @see mc_playlist_foreach_playlist() */ int mc_client_get_playlist_item_index(mc_playback_h playback, char **index) TIZEN_DEPRECATED_API; @@ -1008,13 +1036,14 @@ int mc_client_get_playlist_item_index(mc_playback_h playback, char **index) TIZE * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * * @pre The playback update callback should be set with mc_client_set_playback_updated_cb(). * @see mc_client_set_playback_updated_cb() - * @see mc_client_foreach_server_playlist() + * @see mc_playlist_foreach_playlist() */ int mc_client_get_playlist_item_info(mc_playback_h playback, char **playlist_name, char **index); @@ -1032,8 +1061,10 @@ int mc_client_get_playlist_item_info(mc_playback_h playback, char **playlist_nam * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation + * * @pre The playback update callback should be set with mc_client_set_playback_updated_cb(). * @see mc_client_set_playback_updated_cb() */ @@ -1052,8 +1083,10 @@ int mc_client_get_playback_content_type(mc_playback_h playback, mc_content_type_ * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation + * * @pre The playback update callback should be set with mc_client_set_playback_updated_cb(). * @see mc_client_set_playback_updated_cb() */ @@ -1088,15 +1121,16 @@ int mc_client_destroy_playback(mc_playback_h playback); * After a media controller server sets the playback state to #MC_PLAYBACK_STATE_PLAYING, the @a server_state is #MC_SERVER_STATE_ACTIVATE. * After a media controller server is destroyed, @a server_state is #MC_SERVER_STATE_DEACTIVATE. * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[out] server_name The app_id of the latest media controller server * @param[out] server_state The state of the latest media controller server * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory */ int mc_client_get_latest_server_info(mc_client_h client, char **server_name, mc_server_state_e *server_state); @@ -1111,16 +1145,16 @@ int mc_client_get_latest_server_info(mc_client_h client, char **server_name, mc_ * @remarks The @a playback should be released using @c mc_client_destroy_playback(). \n * If there is no playback info, return value of the playback is NULL. * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server * @param[out] playback The handle to playback * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory */ int mc_client_get_server_playback_info(mc_client_h client, const char *server_name, mc_playback_h *playback); @@ -1135,16 +1169,16 @@ int mc_client_get_server_playback_info(mc_client_h client, const char *server_na * @remarks The @a metadata should be released using @c mc_metadata_destroy(). \n * If there is no metadata, return value of the metadata is NULL. * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server * @param[out] metadata The handle to metadata * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory */ int mc_client_get_server_metadata(mc_client_h client, const char *server_name, mc_metadata_h *metadata); @@ -1158,14 +1192,14 @@ int mc_client_get_server_metadata(mc_client_h client, const char *server_name, m * * @remarks If there is no shuffle mode info, return value is #MC_SHUFFLE_MODE_OFF. * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server * @param[out] mode The info of the latest shuffle mode * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter */ int mc_client_get_server_shuffle_mode(mc_client_h client, const char *server_name, mc_shuffle_mode_e *mode); @@ -1179,14 +1213,14 @@ int mc_client_get_server_shuffle_mode(mc_client_h client, const char *server_nam * * @remarks If there is no repeat mode info, return value is #MC_REPEAT_MODE_OFF. * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server * @param[out] mode The info of the latest shuffle mode * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter */ int mc_client_get_server_repeat_mode(mc_client_h client, const char *server_name, mc_repeat_mode_e *mode); @@ -1200,19 +1234,21 @@ int mc_client_get_server_repeat_mode(mc_client_h client, const char *server_name * @remarks The @a uri should be released using @c free(). \n * If there is no URI info, return value of the uri is NULL. * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server * @param[out] uri The icon URI * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_destroy() - * @see mc_client_foreach_server_playlist() + * @see mc_playlist_foreach_playlist() */ int mc_client_get_server_icon(mc_client_h client, const char *server_name, char **uri); @@ -1225,16 +1261,17 @@ int mc_client_get_server_icon(mc_client_h client, const char *server_name, char * * @remarks The @a ability should be released using @c mc_playback_ability_destroy(). * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server * @param[out] ability The handle to ability * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @pre Get a server name handle by calling mc_client_create(). * @see mc_client_create() @@ -1254,15 +1291,17 @@ int mc_client_get_server_playback_ability(mc_client_h client, const char *server * * @remarks If the ability's support is not set, the result value is #MC_ABILITY_SUPPORTED_UNDECIDED. * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server * @param[out] support The support value of the shuffle ability * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller client handle by calling mc_client_create(). * @pre Get a server name handle by calling mc_client_create(). * @see mc_client_create() @@ -1281,15 +1320,17 @@ int mc_client_get_server_shuffle_ability_support(mc_client_h client, const char * * @remarks If the ability's support is not set, the result value is #MC_ABILITY_SUPPORTED_UNDECIDED. * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server * @param[out] support The support value of the repeat ability * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller client handle by calling mc_client_create(). * @pre Get a server name handle by calling mc_client_create(). * @see mc_client_create() @@ -1309,22 +1350,24 @@ int mc_client_get_server_repeat_ability_support(mc_client_h client, const char * * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] callback The callback function to be invoked, will be called for each server * @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_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() */ int mc_client_foreach_server(mc_client_h client, mc_activated_server_cb callback, void *user_data); /** + * @deprecated Deprecated since 5.5. Use mc_playlist_foreach_playlist() instead. * @brief Retrieves all playlists of the media controller server. * @details This function gets all playlists of the media controller server. * The callback function will be invoked for every retrieved playlist. @@ -1334,7 +1377,7 @@ int mc_client_foreach_server(mc_client_h client, mc_activated_server_cb callback * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.client * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server * @param[in] callback The callback function to be invoked. * @param[in] user_data The user data to be passed to the callback function @@ -1343,16 +1386,16 @@ int mc_client_foreach_server(mc_client_h client, mc_activated_server_cb callback * otherwise a negative error value * * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_playlist_cb() */ -int mc_client_foreach_server_playlist(mc_client_h client, const char *server_name, mc_playlist_cb callback, void *user_data); +int mc_client_foreach_server_playlist(mc_client_h client, const char *server_name, mc_playlist_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** * @brief Sends the playback action command to server. @@ -1364,16 +1407,18 @@ int mc_client_foreach_server_playlist(mc_client_h client, const char *server_nam * @remarks The @a request_id should be released using free().\n * If the @a request_id is null, the server will not send the reply of the command. * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server * @param[in] action The playback action command to send to the media controller server * @param[out] request_id The id of the command request, it will be passed to the mc_cmd_reply_received_cb() function * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_get_server_playback_info() @@ -1391,16 +1436,18 @@ int mc_client_send_playback_action_cmd(mc_client_h client, const char *server_na * @remarks The @a request_id should be released using free().\n * If the @a request_id is null, the server will not send the reply of the command. * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server * @param[in] position The position of the playback in milliseconds to send to media controller server. * @param[out] request_id The id of the command request, it will be passed to the mc_cmd_reply_received_cb() function * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_get_server_playback_info() @@ -1418,16 +1465,18 @@ int mc_client_send_playback_position_cmd(mc_client_h client, const char *server_ * @remarks The @a request_id should be released using free().\n * If the @a request_id is null, the server will not send the reply of the command. * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server * @param[in] shuffle_mode The shuffle mode to send to media controller server * @param[out] request_id The id of the command request, it will be passed to the mc_cmd_reply_received_cb() function * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_get_server_playback_info() @@ -1445,16 +1494,18 @@ int mc_client_send_shuffle_mode_cmd(mc_client_h client, const char *server_name, * @remarks The @a request_id should be released using free().\n * If the @a request_id is null, the server will not send the reply of the command. * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server * @param[in] repeat_mode The repeat mode to send to media controller server * @param[out] request_id The id of the command request, it will be passed to the mc_cmd_reply_received_cb() function * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_get_server_playback_info() @@ -1473,7 +1524,7 @@ int mc_client_send_repeat_mode_cmd(mc_client_h client, const char *server_name, * @remarks The @a request_id should be released using free().\n * If the @a request_id is null, the server will not send the reply of the command. * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server * @param[in] playlist_name The playlist name of the server * @param[in] index The index of the media in playlist to send to the media controller server @@ -1483,9 +1534,11 @@ int mc_client_send_repeat_mode_cmd(mc_client_h client, const char *server_name, * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_set_cmd_reply_received_cb() @@ -1503,7 +1556,7 @@ int mc_client_send_playlist_cmd(mc_client_h client, const char *server_name, con * @remarks The @a request_id should be released using free().\n * If the @a request_id is null, the server will not send the reply of the command. * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server * @param[in] command The command to be sent * @param[in] data The extra data @@ -1511,10 +1564,11 @@ int mc_client_send_playlist_cmd(mc_client_h client, const char *server_name, con * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() * @see mc_client_set_cmd_reply_received_cb() @@ -1532,17 +1586,18 @@ int mc_client_send_custom_cmd(mc_client_h client, const char *server_name, const * @remarks The @a request_id should be released using free().\n * If the @a request_id is null, the server will not send the reply of the command. * - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server * @param[in] search The search handle to be sent * @param[out] request_id The id of the command request, it will be passed to the mc_cmd_reply_received_cb() function * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful - * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller client handle by calling mc_client_create(). * @pre Create search handle and set data by calling mc_search_create() and mc_search_set_condition(). * @see mc_client_create() @@ -1555,12 +1610,13 @@ int mc_client_send_search_cmd(mc_client_h client, const char *server_name, mc_se /** * @brief Destroys client. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * @param[in] client The handle to the media controller client + * @param[in] client The handle of the media controller client * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_client_create() */ diff --git a/include/media_controller_internal.h b/include/media_controller_internal.h index 2eb63e8..70d001e 100755 --- a/include/media_controller_internal.h +++ b/include/media_controller_internal.h @@ -33,12 +33,6 @@ int mc_playlist_create(const char *playlist_name, mc_playlist_h *playlist); int mc_playlist_update_item(mc_playlist_h playlist, const char *index, mc_meta_e attribute, const char *value); int mc_server_get_playlist(mc_server_h server, const char *playlist_name, mc_playlist_h *playlist); -/*To Support Web API*/ -int mc_playlist_get_playlist_count(const char *server_name, int *playlist_count); -int mc_playlist_foreach_playlist(const char *server_name, mc_playlist_cb callback, void *user_data); -int mc_playlist_get_item_count(mc_playlist_h playlist, int *item_count); - - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/include/media_controller_metadata.h b/include/media_controller_metadata.h index 5157946..b765b9e 100755 --- a/include/media_controller_metadata.h +++ b/include/media_controller_metadata.h @@ -67,7 +67,7 @@ int mc_metadata_clone(mc_metadata_h src, mc_metadata_h *dst); * * @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif * - * @param[in] metadata The handle to the media controller metadata + * @param[in] metadata The handle of the media controller metadata * * @return @c 0 on success, * otherwise a negative error value @@ -310,7 +310,7 @@ int mc_playback_ability_clone(mc_playback_ability_h src, mc_playback_ability_h * * * @since_tizen 5.0 * - * @param[in] ability The handle to the playback ability + * @param[in] ability The handle of the playback ability * * @return @c 0 on success, * otherwise a negative error value diff --git a/include/media_controller_playlist.h b/include/media_controller_playlist.h index dea1a96..c478a4b 100755 --- a/include/media_controller_playlist.h +++ b/include/media_controller_playlist.h @@ -43,17 +43,16 @@ extern "C" { * To use the @a playlist outside this function, copy the handle with the mc_playlist_clone() function. \n * The callback is called in the main loop. * - * @param[in] playlist The handle to the media controller playlist. + * @param[in] playlist The handle of the media controller playlist. * @param[in] user_data The user data passed from the foreach function * * @return @c true to continue with the next iteration of the loop, * otherwise @c false to break out of the loop * - * @pre mc_server_foreach_playlist() and mc_client_foreach_server_playlist() will invoke this function. + * @pre mc_playlist_foreach_playlist() will invoke this function. * * @see mc_playlist_clone() - * @see mc_server_foreach_playlist() - * @see mc_client_foreach_server_playlist() + * @see mc_playlist_foreach_playlist() * @see mc_playlist_get_name() * @see mc_playlist_foreach_item() */ @@ -90,7 +89,7 @@ typedef bool (*mc_playlist_item_cb)(const char *index, mc_metadata_h metadata, v * * @remarks The @a playlist_name should be released using free(). * - * @param[in] playlist The handle to the media controller playlist + * @param[in] playlist The handle of the media controller playlist * @param[out] playlist_name The name of the playlist * * @return @c 0 on success, @@ -100,22 +99,44 @@ typedef bool (*mc_playlist_item_cb)(const char *index, mc_metadata_h metadata, v * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * - * @pre You can get playlist handle using mc_server_foreach_playlist() if you are media controller server, or mc_client_foreach_server_playlist() if you are media controller client. + * @pre The playlist handle should be received by calling mc_playlist_foreach_playlist() or mc_playlist_get_playlist(). * - * @see mc_server_foreach_playlist() - * @see mc_client_foreach_server_playlist() + * @see mc_playlist_foreach_playlist() + * @see mc_playlist_get_playlist() * @see mc_playlist_destroy() */ int mc_playlist_get_name(mc_playlist_h playlist, char **playlist_name); /** + * @brief Gets the number of the media item in a playlist. + * @since_tizen 5.5 + * + * @param[in] playlist The handle of the media controller playlist + * @param[out] item_count The number of media items. + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation + * + * @pre The playlist handle should be received by calling mc_playlist_foreach_playlist() or mc_playlist_get_playlist(). + * + * @see mc_playlist_foreach_playlist() + * @see mc_playlist_get_playlist() + * @see mc_playlist_destroy() + */ +int mc_playlist_get_item_count(mc_playlist_h playlist, int *item_count); + +/** * @brief Iterates through media items in a playlist. - * @details This function gets all items in a playlist. + * @details This function iterates through all items in the playlist. * The callback function will be invoked for every retrieved playlist item. * If there are no items on the playlist, the callback will not be invoked. * @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif * - * @param[in] playlist The handle to the media controller playlist + * @param[in] playlist The handle of the media controller playlist * @param[in] callback The callback function to be invoked * @param[in] user_data The user data to be passed to the callback function * @@ -127,17 +148,116 @@ int mc_playlist_get_name(mc_playlist_h playlist, char **playlist_name); * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * - * @pre You can get playlist handle using mc_server_foreach_playlist() if you are media controller server, or mc_client_foreach_server_playlist() if you are media controller client. + * @pre The playlist handle should be received by calling mc_playlist_foreach_playlist() or mc_playlist_get_playlist(). * @post This function invokes mc_playlist_item_cb(). * - * @see mc_server_foreach_playlist() - * @see mc_client_foreach_server_playlist() + * @see mc_playlist_foreach_playlist() + * @see mc_playlist_get_playlist() * @see mc_playlist_item_cb() * @see mc_playlist_destroy() */ int mc_playlist_foreach_item(mc_playlist_h playlist, mc_playlist_item_cb callback, void *user_data); /** + * @brief Gets the number of playlists for the given @a app_id. + * @details The media controller server can have serveral playlists. You can get playlist count only for the activated media controller server. + * If @a app_id is not an ID of an activated media controller server, this function will return #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER. + * @since_tizen 5.5 + * + * @privlevel public + * @privilege %http://tizen.org/privilege/mediacontroller.server \n + * %http://tizen.org/privilege/mediacontroller.client \n + * + * @remarks You must add privilege %http://tizen.org/privilege/mediacontroller.server, if you are the media controller server. + * You must add privilege %http://tizen.org/privilege/mediacontroller.client, if you are the media controller client. + * + * @param[in] app_id The app_id of the media controller server + * @param[out] playlist_count The number of playlists the media controller server has. + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation + * + * @see mc_client_foreach_server() + */ +int mc_playlist_get_playlist_count(const char *app_id, int *playlist_count); + +/** + * @brief Iterates through playlists of the media controller server. + * @details This function iterates through all playlists of the given @a app_id. + * The media controller server can have serveral playlists. You can get playlists only for the activated media controller server. + * If @a app_id is not an ID of an activated media controller server, this function will return #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER. + * The callback function will be invoked for every retrieved playlist. + * If there are no playlists, the callback will not be invoked. + * @since_tizen 5.5 + * + * @privlevel public + * @privilege %http://tizen.org/privilege/mediacontroller.server \n + * %http://tizen.org/privilege/mediacontroller.client \n + * + * @remarks You must add privilege %http://tizen.org/privilege/mediacontroller.server, if you are the media controller server. + * You must add privilege %http://tizen.org/privilege/mediacontroller.client, if you are the media controller client. + * + * @param[in] app_id The app_id of the media controller server + * @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_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * + * @post This function invokes mc_playlist_cb(). + * + * @see mc_playlist_cb() + */ +int mc_playlist_foreach_playlist(const char *app_id, mc_playlist_cb callback, void *user_data); + +/** + * @brief Gets the playlist handle. + * @details This function creates a new playlist handle for the given @a app_id and @a playlist_name. + * You can get the playlist only for the activated media controller server. + * If @a app_id is not an ID of an activated media controller server, or if @a playlist_name is invalid, \n + * this function will return #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER. + * @since_tizen 5.5 + * + * @privlevel public + * @privilege %http://tizen.org/privilege/mediacontroller.server \n + * %http://tizen.org/privilege/mediacontroller.client \n + * + * @remarks You must add privilege %http://tizen.org/privilege/mediacontroller.server, if you are the media controller server. + * You must add privilege %http://tizen.org/privilege/mediacontroller.client, if you are the media controller client. + * The @a playlist should be released using mc_playlist_destroy(). + * + * @param[in] app_id The app_id of the media controller server + * @param[in] playlist_name The name of the playlist + * @param[out] playlist The handle of the media controller playlist + * + * @return @c 0 on success, + * otherwise a negative error value + * + * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * + * @see mc_playlist_get_name() + * @see mc_playlist_get_item_count() + * @see mc_playlist_foreach_item() + * @see mc_playlist_destroy() + */ +int mc_playlist_get_playlist(const char *app_id, const char *playlist_name, mc_playlist_h *playlist); + +/** * @brief Clones a media controller playlist handle. * @details This function copies the media controller playlist handle from a source to * destination. The #mc_playlist_h is created internally and available through media controller playlist functions. @@ -168,7 +288,7 @@ int mc_playlist_clone(mc_playlist_h src, mc_playlist_h *dst); * * @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif * - * @param[in] playlist The handle to the media controller playlist + * @param[in] playlist The handle of the media controller playlist * * @return @c 0 on success, * otherwise a negative error value diff --git a/include/media_controller_server.h b/include/media_controller_server.h index 19017ba..8d39fed 100755 --- a/include/media_controller_server.h +++ b/include/media_controller_server.h @@ -253,10 +253,11 @@ typedef void (*mc_server_search_cmd_received_cb)(const char *client_name, const * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @see mc_server_destroy() */ int mc_server_create(mc_server_h *server); @@ -273,9 +274,10 @@ int mc_server_create(mc_server_h *server); * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * * @pre Create a media controller server handle by calling mc_server_create(). * @post Apply the updated playback information by calling mc_server_update_playback_info(). @@ -297,9 +299,10 @@ int mc_server_set_playback_state(mc_server_h server, mc_playback_states_e state) * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * * @pre Create a media controller server handle by calling mc_server_create(). * @post Apply the updated playback information by calling mc_server_update_playback_info(). @@ -324,9 +327,10 @@ int mc_server_set_playback_position(mc_server_h server, unsigned long long posit * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * * @pre Create a media controller server handle by calling mc_server_create(). * @post Apply the updated playback information by calling mc_server_update_playback_info(). @@ -352,9 +356,10 @@ int mc_server_set_playlist_item_index(mc_server_h server, const char *index) TI * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * * @pre Create a media controller server handle by calling mc_server_create(). * @post Apply the updated playback information by calling mc_server_update_playback_info(). @@ -378,9 +383,11 @@ int mc_server_set_playlist_item_info(mc_server_h server, const char *playlist_na * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller server handle by calling mc_server_create(). * @post Apply the updated playback information by calling mc_server_update_playback_info(). * @see mc_server_create() @@ -402,9 +409,11 @@ int mc_server_set_playback_content_type(mc_server_h server, mc_content_type_e co * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller server handle by calling mc_server_create(). * @post Apply the updated age rating information by calling mc_server_update_playback_info(). * @see mc_server_create() @@ -425,10 +434,11 @@ int mc_server_set_content_age_rating(mc_server_h server, mc_content_age_rating_e * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -448,9 +458,11 @@ int mc_server_update_playback_info(mc_server_h server); * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller server handle by calling mc_server_create(). * @post Apply the updated metadata information by calling mc_server_update_metadata(). * @see mc_server_create() @@ -471,10 +483,11 @@ int mc_server_set_metadata(mc_server_h server, mc_meta_e attribute, const char * * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -494,10 +507,11 @@ int mc_server_update_metadata(mc_server_h server); * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -517,10 +531,11 @@ int mc_server_update_shuffle_mode(mc_server_h server, mc_shuffle_mode_e mode); * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -540,10 +555,11 @@ int mc_server_update_repeat_mode(mc_server_h server, mc_repeat_mode_e mode); * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -561,9 +577,10 @@ int mc_server_set_playback_action_cmd_received_cb(mc_server_h server, mc_server_ * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -583,10 +600,11 @@ int mc_server_unset_playback_action_cmd_received_cb(mc_server_h server); * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -604,9 +622,10 @@ int mc_server_set_playback_position_cmd_received_cb(mc_server_h server, mc_serve * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -626,10 +645,11 @@ int mc_server_unset_playback_position_cmd_received_cb(mc_server_h server); * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -647,9 +667,10 @@ int mc_server_set_shuffle_mode_cmd_received_cb(mc_server_h server, mc_server_shu * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -669,10 +690,11 @@ int mc_server_unset_shuffle_mode_cmd_received_cb(mc_server_h server); * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -690,9 +712,10 @@ int mc_server_set_repeat_mode_cmd_received_cb(mc_server_h server, mc_server_repe * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -712,10 +735,11 @@ int mc_server_unset_repeat_mode_cmd_received_cb(mc_server_h server); * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -733,9 +757,10 @@ int mc_server_set_playlist_cmd_received_cb(mc_server_h server, mc_server_playlis * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -755,10 +780,11 @@ int mc_server_unset_playlist_cmd_received_cb(mc_server_h server); * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -776,9 +802,10 @@ int mc_server_set_custom_cmd_received_cb(mc_server_h server, mc_server_custom_cm * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -803,9 +830,11 @@ int mc_server_unset_custom_cmd_received_cb(mc_server_h server); * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_playback_action_cmd_received_cb() @@ -834,10 +863,11 @@ int mc_server_send_cmd_reply(mc_server_h server, const char *client_name, const * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_activated_client_cb() @@ -864,9 +894,11 @@ int mc_server_foreach_client(mc_server_h server, mc_activated_client_cb callback * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_event_reply_received_cb() @@ -884,16 +916,17 @@ int mc_server_send_custom_event(mc_server_h server, const char *client_name, con * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.server * - * @param[in] server The handle to the media controller server + * @param[in] server The handle of the media controller server * @param[in] callback The callback to be invoked when the reply is received * @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_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @pre mc_server_send_custom_event(). * @see mc_server_create() @@ -909,13 +942,14 @@ int mc_server_set_event_reply_received_cb(mc_server_h server, mc_server_event_re * @privlevel public * @privilege %http://tizen.org/privilege/mediacontroller.server * - * @param[in] server The handle to the media controller server + * @param[in] server The handle of the media controller server * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller client handle by calling mc_client_create(). * @see mc_server_create() * @see mc_server_set_event_reply_received_cb() @@ -936,10 +970,11 @@ int mc_server_unset_event_reply_received_cb(mc_server_h server); * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -957,9 +992,10 @@ int mc_server_set_search_cmd_received_cb(mc_server_h server, mc_server_search_cm * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -993,16 +1029,16 @@ int mc_server_destroy(mc_server_h server); * * @param[in] server The handle to media controller server * @param[in] playlist_name The name of the created playlist. It should not be NULL. - * @param[out] playlist The handle to the media controller playlist + * @param[out] playlist The handle of the media controller playlist * * @return @c 0 on success, * otherwise a negative error value * * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * * @pre Create a media controller server handle by calling mc_server_create(). * @post You can call mc_server_add_item_to_playlist() if you have items to add in the playlist and should call @c mc_server_update_playlist_done() to register it. @@ -1026,7 +1062,7 @@ int mc_server_create_playlist(mc_server_h server, const char *playlist_name, mc_ * If you have more items, register the first 100 items by calling mc_server_update_playlist_done(), then add the remaining items. * * @param[in] server The handle to media controller server - * @param[in] playlist The handle to the media controller playlist + * @param[in] playlist The handle of the media controller playlist * @param[in] index The index of the playlist item. It should not be NULL * @param[in] attribute The key attribute name to set * @param[in] value The value of the attribute @@ -1035,9 +1071,10 @@ int mc_server_create_playlist(mc_server_h server, const char *playlist_name, mc_ * otherwise a negative error value * * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * * @pre Create a media controller server handle by calling mc_server_create(). * @pre Create a media controller playlist handle by calling mc_server_create_playlist(). @@ -1058,16 +1095,16 @@ int mc_server_add_item_to_playlist(mc_server_h server, mc_playlist_h playlist, c * @privilege %http://tizen.org/privilege/mediacontroller.server * * @param[in] server The handle to media controller server - * @param[in] playlist The handle to the media controller playlist + * @param[in] playlist The handle of the media controller playlist * * @return @c 0 on success, * otherwise a negative error value * * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * * @pre Create a media controller server handle by calling mc_server_create(). * @pre Create a media controller playlist handle by calling mc_server_create_playlist(). @@ -1086,16 +1123,16 @@ int mc_server_update_playlist_done(mc_server_h server, mc_playlist_h playlist); * @privilege %http://tizen.org/privilege/mediacontroller.server * * @param[in] server The handle to media controller server - * @param[in] playlist The handle to the media controller playlist + * @param[in] playlist The handle of the media controller playlist * * @return @c 0 on success, * otherwise a negative error value * * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * * @pre Create a media controller server handle by calling mc_server_create(). * @pre Create a media controller playlist handle by calling mc_server_create_playlist(). @@ -1107,6 +1144,7 @@ int mc_server_update_playlist_done(mc_server_h server, mc_playlist_h playlist); int mc_server_delete_playlist(mc_server_h server, mc_playlist_h playlist); /** + * @deprecated Deprecated since 5.5. Use mc_playlist_foreach_playlist() instead. * @brief Retrieves all playlists of the media controller server. * @details This function gets all playlists of the media controller server. * The callback function will be invoked for every retrieved playlist. @@ -1124,17 +1162,17 @@ int mc_server_delete_playlist(mc_server_h server, mc_playlist_h playlist); * otherwise a negative error value * * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() * @see mc_playlist_cb() */ -int mc_server_foreach_playlist(mc_server_h server, mc_playlist_cb callback, void *user_data); +int mc_server_foreach_playlist(mc_server_h server, mc_playlist_cb callback, void *user_data) TIZEN_DEPRECATED_API; /** * @brief Sets the playback ability's support of the media controller. @@ -1151,10 +1189,11 @@ int mc_server_foreach_playlist(mc_server_h server, mc_playlist_cb callback, void * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @post Update abilities of a media controller server by calling mc_server_update_playback_ability(). * @see mc_server_create() @@ -1174,10 +1213,11 @@ int mc_server_set_playback_ability(mc_server_h server, mc_playback_action_e acti * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @pre Set abilities of a media controller server by calling mc_server_set_playback_ability(). * @see mc_server_create() @@ -1199,10 +1239,11 @@ int mc_server_update_playback_ability(mc_server_h server); * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -1223,10 +1264,11 @@ int mc_server_set_shuffle_ability(mc_server_h server, mc_ability_support_e suppo * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() @@ -1247,10 +1289,11 @@ int mc_server_set_repeat_ability(mc_server_h server, mc_ability_support_e suppor * @return @c 0 on success, * otherwise a negative error value * @retval #MEDIA_CONTROLLER_ERROR_NONE Successful + * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied * @retval #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory * @retval #MEDIA_CONTROLLER_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED Permission denied + * @retval #MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory + * * @pre Create a media controller server handle by calling mc_server_create(). * @see mc_server_create() * @see mc_server_destroy() diff --git a/src/media_controller_client.c b/src/media_controller_client.c index 05fad18..a833870 100755 --- a/src/media_controller_client.c +++ b/src/media_controller_client.c @@ -1015,6 +1015,8 @@ int mc_client_foreach_server_playlist(mc_client_h client, const char *server_nam int ret = MEDIA_CONTROLLER_ERROR_NONE; media_controller_client_s *mc_client = (media_controller_client_s *)client; + mc_warning("DEPRECATION WARNING: mc_client_foreach_server_playlist() is deprecated and will be removed from next release. Use mc_playlist_foreach_playlist() instead."); + mc_retvm_if(mc_client == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Handle is NULL"); mc_retvm_if(!MC_STRING_VALID(server_name), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid server_name"); mc_retvm_if(callback == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "invalid callback"); diff --git a/src/media_controller_playlist.c b/src/media_controller_playlist.c index 641acc4..01d813e 100755 --- a/src/media_controller_playlist.c +++ b/src/media_controller_playlist.c @@ -199,19 +199,19 @@ int mc_playlist_get_name(mc_playlist_h playlist, char **playlist_name) return ret; } -int mc_playlist_get_playlist_count(const char *server_name, int *playlist_count) +int mc_playlist_get_playlist_count(const char *app_id, int *playlist_count) { int ret = MEDIA_CONTROLLER_ERROR_NONE; void* db_handle = NULL; - mc_retvm_if(!MC_STRING_VALID(server_name), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid server_name"); + mc_retvm_if(!MC_STRING_VALID(app_id), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid app_id"); mc_retvm_if(playlist_count == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "invalid playlist_count"); ret = mc_db_connect(&db_handle, getuid(), FALSE); mc_retvm_if(db_handle == NULL, MEDIA_CONTROLLER_ERROR_INVALID_OPERATION, "fail mc_db_connect [%d]", ret); - if (mc_db_is_server_table_exist(db_handle, server_name) == TRUE) - *playlist_count = _mc_db_get_playlist_count(db_handle, server_name); + if (_mc_db_is_activated_server(db_handle, app_id) == TRUE) + *playlist_count = _mc_db_get_playlist_count(db_handle, app_id); else ret = MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER; @@ -220,19 +220,19 @@ int mc_playlist_get_playlist_count(const char *server_name, int *playlist_count) return ret; } -int mc_playlist_foreach_playlist(const char *server_name, mc_playlist_cb callback, void *user_data) +int mc_playlist_foreach_playlist(const char *app_id, mc_playlist_cb callback, void *user_data) { int ret = MEDIA_CONTROLLER_ERROR_NONE; void* db_handle = NULL; - mc_retvm_if(!MC_STRING_VALID(server_name), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid server_name"); + mc_retvm_if(!MC_STRING_VALID(app_id), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid app_id"); mc_retvm_if(callback == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "invalid callback"); ret = mc_db_connect(&db_handle, getuid(), FALSE); mc_retvm_if(db_handle == NULL, MEDIA_CONTROLLER_ERROR_INVALID_OPERATION, "fail mc_db_connect [%d]", ret); - if (mc_db_is_server_table_exist(db_handle, server_name) == TRUE) - ret = mc_db_get_foreach_playlist(db_handle, server_name, callback, user_data); + if (_mc_db_is_activated_server(db_handle, app_id) == TRUE) + ret = mc_db_get_foreach_playlist(db_handle, app_id, callback, user_data); else ret = MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER; @@ -253,7 +253,7 @@ int mc_playlist_get_item_count(mc_playlist_h playlist, int *item_count) ret = mc_db_connect(&db_handle, getuid(), FALSE); mc_retvm_if(db_handle == NULL, MEDIA_CONTROLLER_ERROR_INVALID_OPERATION, "fail mc_db_connect [%d]", ret); - if (mc_db_is_server_table_exist(db_handle, _playlist->server_name) == TRUE) + if (_mc_db_is_activated_server(db_handle, _playlist->server_name) == TRUE) *item_count = _mc_db_get_playlist_item_count(db_handle, _playlist->server_name, _playlist->playlist_name); else ret = MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER; @@ -275,7 +275,7 @@ int mc_playlist_foreach_item(mc_playlist_h playlist, mc_playlist_item_cb callbac ret = mc_db_connect(&db_handle, getuid(), FALSE); mc_retvm_if(db_handle == NULL, MEDIA_CONTROLLER_ERROR_INVALID_OPERATION, "fail mc_db_connect [%d]", ret); - if (mc_db_is_server_table_exist(db_handle, _playlist->server_name) == TRUE) + if (_mc_db_is_activated_server(db_handle, _playlist->server_name) == TRUE) ret = mc_db_get_playlist_item(db_handle, _playlist->server_name, _playlist->playlist_name, callback, user_data); else ret = MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER; @@ -285,6 +285,28 @@ int mc_playlist_foreach_item(mc_playlist_h playlist, mc_playlist_item_cb callbac return ret; } +int mc_playlist_get_playlist(const char *app_id, const char *playlist_name, mc_playlist_h *playlist) +{ + int ret = MEDIA_CONTROLLER_ERROR_NONE; + void* db_handle = NULL; + + mc_retvm_if(!MC_STRING_VALID(app_id), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "invalid app_id"); + mc_retvm_if(!MC_STRING_VALID(playlist_name), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "invalid playlist_name"); + mc_retvm_if(playlist == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "invalid playlist"); + + ret = mc_db_connect(&db_handle, getuid(), FALSE); + mc_retvm_if(db_handle == NULL, MEDIA_CONTROLLER_ERROR_INVALID_OPERATION, "fail mc_db_connect [%d]", ret); + + if (_mc_db_is_activated_server(db_handle, app_id) == TRUE) + ret = mc_db_get_playlist_by_name(db_handle, MC_PRIV_TYPE_SERVER, app_id, playlist_name, playlist); + else + ret = MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER; + + mc_db_disconnect(db_handle); + + return ret; +} + int mc_playlist_clone(mc_playlist_h src, mc_playlist_h *dst) { int ret = MEDIA_CONTROLLER_ERROR_NONE; diff --git a/src/media_controller_server.c b/src/media_controller_server.c index 6c0f12b..e4a492e 100755 --- a/src/media_controller_server.c +++ b/src/media_controller_server.c @@ -877,9 +877,10 @@ int mc_server_delete_playlist(mc_server_h server, mc_playlist_h playlist) int mc_server_foreach_playlist(mc_server_h server, mc_playlist_cb callback, void *user_data) { int ret = MEDIA_CONTROLLER_ERROR_NONE; - media_controller_server_s *mc_server = (media_controller_server_s *)server; + mc_warning("DEPRECATION WARNING: mc_server_foreach_playlist() is deprecated and will be removed from next release. Use mc_playlist_foreach_playlist() instead."); + mc_retvm_if(mc_server == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "invalid server"); mc_retvm_if(callback == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "invalid callback"); diff --git a/test/client_test/media_controller_client_test.c b/test/client_test/media_controller_client_test.c index fb21a21..80dab9a 100755 --- a/test/client_test/media_controller_client_test.c +++ b/test/client_test/media_controller_client_test.c @@ -571,7 +571,7 @@ static gboolean _get_info(int type) g_print("playlist count: %d", item_cnt); - ret = mc_client_foreach_server_playlist(g_mc_client, g_server_name, server_playlist_cb, NULL); + ret = mc_playlist_foreach_playlist(g_server_name, server_playlist_cb, NULL); mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE, FALSE, "Fail to mc_client_get_server_playlist [%d]", ret); break; diff --git a/test/server_test/media_controller_server_test.c b/test/server_test/media_controller_server_test.c index b69b835..e89653a 100755 --- a/test/server_test/media_controller_server_test.c +++ b/test/server_test/media_controller_server_test.c @@ -77,9 +77,11 @@ enum { /*--------------------------------------------------------------------------- | LOCAL VARIABLE DEFINITIONS: | ---------------------------------------------------------------------------*/ -int g_menu_state = CURRENT_STATE_MAIN_MENU; -int g_menu_set_state = CURRENT_STATE_SET_MODE_NONE; -int g_menu_send_event = 0; +static int g_menu_state = CURRENT_STATE_MAIN_MENU; +static int g_menu_set_state = CURRENT_STATE_SET_MODE_NONE; +static int g_menu_send_event = 0; + +#define TEST_SERVER_ID "org.tizen.testsuites" /*--------------------------------------------------------------------------- | LOCAL FUNCTION PROTOTYPES: | @@ -374,9 +376,9 @@ static int __update_playlist(mc_server_h server, mc_playlist_update_mode_e mode) } else { - ret = mc_server_foreach_playlist(server, server_playlist_list_cb, &playlist_list); + ret = mc_playlist_foreach_playlist(TEST_SERVER_ID, server_playlist_list_cb, &playlist_list); if (ret != MEDIA_CONTROLLER_ERROR_NONE) - mc_error("Fail to mc_server_foreach_playlist [%d]", ret); + mc_error("Fail to mc_playlist_foreach_playlist [%d]", ret); for (idx = 0; idx < g_list_length(playlist_list); idx++) { mc_playlist_h playlist = NULL; -- 2.7.4