Tizen Native API  6.5
Media Controller Server

The Media Controller Server API provides functions for sending the server information to the client.

Required Header

#include <media_controller_server.h>

Overview

The Media Controller Server API allows you to send the playback info (mc_server_set_playback_state(), mc_server_set_playback_position(), mc_server_set_playlist_item_info()), the metadata (mc_server_set_metadata() and playlist (mc_server_set_playlist_item_info(), mc_server_create_playlist()). and to receive the custom command (mc_server_set_custom_cmd_received_cb()), to update the status information on the latest server (mc_server_update_playback_info(), mc_server_update_metadata().
Before doing those things you should create handle(mc_server_create()). And if you don't use handle anymore, you have to destroy it(mc_server_destroy()).

Functions

int mc_server_create (mc_server_h *server)
 Creates a media controller server.
int mc_server_set_playback_state (mc_server_h server, mc_playback_states_e state)
 Sets the playback state to update the latest state info.
int mc_server_set_playback_position (mc_server_h server, unsigned long long position)
 Sets the playback position to update the latest playback info.
int mc_server_set_playlist_item_index (mc_server_h server, const char *index) TIZEN_DEPRECATED_API
 Sets the index of the current playing media in the playlist to update the latest playback info.
int mc_server_set_playlist_item_info (mc_server_h server, const char *playlist_name, const char *index)
 Sets the playlist name and index of the current playing media in the playlist to update the latest playback info.
int mc_server_set_playback_content_type (mc_server_h server, mc_content_type_e content_type)
 Sets the playback content type to update the latest playback info.
int mc_server_set_content_age_rating (mc_server_h server, mc_content_age_rating_e age_rating)
 Sets the content age rating to update the latest playback info.
int mc_server_update_playback_info (mc_server_h server)
 Updates the modified playback info.
int mc_server_set_metadata (mc_server_h server, mc_meta_e attribute, const char *value)
 Sets the metadata to update the latest metadata info.
int mc_server_update_metadata (mc_server_h server)
 Updates the modified metadata info.
int mc_server_update_shuffle_mode (mc_server_h server, mc_shuffle_mode_e mode)
 Updates the modified shuffle mode.
int mc_server_update_repeat_mode (mc_server_h server, mc_repeat_mode_e mode)
 Updates the modified repeat mode.
int mc_server_update_subtitles_enabled (mc_server_h server, bool enabled)
 Updates the modified subtitles display status.
int mc_server_update_360_mode_enabled (mc_server_h server, bool enabled)
 Updates the modified 360 mode display status.
int mc_server_update_display_mode (mc_server_h server, mc_display_mode_e mode)
 Updates the modified display mode.
int mc_server_update_display_rotation (mc_server_h server, mc_display_rotation_e rotation)
 Updates the modified display rotation.
int mc_server_set_playback_action_cmd_received_cb (mc_server_h server, mc_server_playback_action_cmd_received_cb callback, void *user_data)
 Sets the callback for receiving playback action command from client.
int mc_server_unset_playback_action_cmd_received_cb (mc_server_h server)
 Unsets the callback for receiving playback action command from client.
int mc_server_set_playback_position_cmd_received_cb (mc_server_h server, mc_server_playback_position_cmd_received_cb callback, void *user_data)
 Sets the callback for receiving playback position command from client.
int mc_server_unset_playback_position_cmd_received_cb (mc_server_h server)
 Unsets the callback for receiving playback position command from client.
int mc_server_set_shuffle_mode_cmd_received_cb (mc_server_h server, mc_server_shuffle_mode_cmd_received_cb callback, void *user_data)
 Sets the callback for receiving shuffle mode command from client.
int mc_server_unset_shuffle_mode_cmd_received_cb (mc_server_h server)
 Unsets the callback for receiving shuffle mode command from client.
int mc_server_set_repeat_mode_cmd_received_cb (mc_server_h server, mc_server_repeat_mode_cmd_received_cb callback, void *user_data)
 Sets the callback for receiving repeat mode command from client.
int mc_server_unset_repeat_mode_cmd_received_cb (mc_server_h server)
 Unsets the callback for receiving repeat mode command from client.
int mc_server_set_playlist_cmd_received_cb (mc_server_h server, mc_server_playlist_cmd_received_cb callback, void *user_data)
 Sets the callback for receiving playlist command from client.
int mc_server_unset_playlist_cmd_received_cb (mc_server_h server)
 Unsets the callback for receiving playlist command from client.
int mc_server_set_custom_cmd_received_cb (mc_server_h server, mc_server_custom_cmd_received_cb callback, void *user_data)
 Sets the callback for receiving custom command from client.
int mc_server_unset_custom_cmd_received_cb (mc_server_h server)
 Unsets the callback for receiving custom command from client.
int mc_server_set_subtitles_cmd_received_cb (mc_server_h server, mc_server_enable_cmd_received_cb callback, void *user_data)
 Sets the callback for receiving subtitles command from client.
int mc_server_unset_subtitles_cmd_received_cb (mc_server_h server)
 Unsets the callback for receiving subtitles command from client.
int mc_server_set_360_mode_cmd_received_cb (mc_server_h server, mc_server_enable_cmd_received_cb callback, void *user_data)
 Sets the callback for receiving 360 mode command from client.
int mc_server_unset_360_mode_cmd_received_cb (mc_server_h server)
 Unsets the callback for receiving 360 mode command from client.
int mc_server_set_display_mode_cmd_received_cb (mc_server_h server, mc_server_display_mode_cmd_received_cb callback, void *user_data)
 Sets the callback for receiving display mode command from client.
int mc_server_unset_display_mode_cmd_received_cb (mc_server_h server)
 Unsets the callback for receiving display mode command from client.
int mc_server_set_display_rotation_cmd_received_cb (mc_server_h server, mc_server_display_rotation_cmd_received_cb callback, void *user_data)
 Sets the callback for receiving display rotation command from client.
int mc_server_unset_display_rotation_cmd_received_cb (mc_server_h server)
 Unsets the callback for receiving display rotation command from client.
int mc_server_send_cmd_reply (mc_server_h server, const char *client_name, const char *request_id, int result_code, bundle *data)
 Replies the result of the requested command to the client.
int mc_server_foreach_client (mc_server_h server, mc_activated_client_cb callback, void *user_data)
 Retrieves all created clients.
int mc_server_send_custom_event (mc_server_h server, const char *client_name, const char *event, bundle *data, char **request_id)
 Sends the customized event with the bundle data.
int mc_server_set_event_reply_received_cb (mc_server_h server, mc_server_event_reply_received_cb callback, void *user_data)
 Sets the callback for receiving the result of the event from the media controller client.
int mc_server_unset_event_reply_received_cb (mc_server_h server)
 Unsets the callback for receiving event reply of the media controller client.
int mc_server_set_search_cmd_received_cb (mc_server_h server, mc_server_search_cmd_received_cb callback, void *user_data)
 Sets the callback for receiving search command from client.
int mc_server_unset_search_cmd_received_cb (mc_server_h server)
 Unsets the callback for receiving search command from client.
int mc_server_destroy (mc_server_h server)
 Destroys media controller server.
int mc_server_create_playlist (mc_server_h server, const char *playlist_name, mc_playlist_h *playlist)
 Creates a new playlist with the given name.
int mc_server_add_item_to_playlist (mc_server_h server, mc_playlist_h playlist, const char *index, mc_meta_e attribute, const char *value)
 Adds a new item to the playlist.
int mc_server_update_playlist_done (mc_server_h server, mc_playlist_h playlist)
 Registers items to the playlist.
int mc_server_delete_playlist (mc_server_h server, mc_playlist_h playlist)
 Deletes the playlist of the media controller server.
int mc_server_foreach_playlist (mc_server_h server, mc_playlist_cb callback, void *user_data) TIZEN_DEPRECATED_API
 Retrieves all playlists of the media controller server.
int mc_server_set_playback_ability (mc_server_h server, mc_playback_action_e action, mc_ability_support_e support)
 Sets the playback ability's support of the media controller.
int mc_server_update_playback_ability (mc_server_h server)
 Updates the modified ability info.
int mc_server_set_shuffle_ability (mc_server_h server, mc_ability_support_e support) TIZEN_DEPRECATED_API
 Sets the shuffle ability's support of the media controller.
int mc_server_set_repeat_ability (mc_server_h server, mc_ability_support_e support) TIZEN_DEPRECATED_API
 Sets the repeat ability's support of the media controller.
int mc_server_set_ability_support (mc_server_h server, mc_ability_e ability, mc_ability_support_e support)
 Sets the ability's support of the media controller.
int mc_server_set_display_mode_ability (mc_server_h server, unsigned int mode, mc_ability_support_e support)
 Sets the display mode ability of the media controller.
int mc_server_set_display_rotation_ability (mc_server_h server, unsigned int rotation, mc_ability_support_e support)
 Sets the display rotation ability of the media controller.
int mc_server_set_icon (mc_server_h server, const char *uri)
 Sets the icon URI of media controller server.

Typedefs

typedef void(* mc_server_playback_action_cmd_received_cb )(const char *client_name, const char *request_id, mc_playback_action_e action, void *user_data)
 Called when the server receives the playback action command from the client.
typedef void(* mc_server_playback_position_cmd_received_cb )(const char *client_name, const char *request_id, unsigned long long position, void *user_data)
 Called when the server receives the playback position from the client.
typedef void(* mc_server_shuffle_mode_cmd_received_cb )(const char *client_name, const char *request_id, mc_shuffle_mode_e shuffle_mode, void *user_data)
 Called when the server receives the shuffle mode from the client.
typedef void(* mc_server_repeat_mode_cmd_received_cb )(const char *client_name, const char *request_id, mc_repeat_mode_e repeat_mode, void *user_data)
 Called when the server receives the repeat mode from the client.
typedef void(* mc_server_playlist_cmd_received_cb )(const char *client_name, const char *request_id, const char *playlist_name, const char *index, mc_playback_action_e action, unsigned long long position, void *user_data)
 Called when the Server receives playlist command from the client.
typedef void(* mc_server_custom_cmd_received_cb )(const char *client_name, const char *request_id, const char *command, bundle *data, void *user_data)
 Called when the Server receives custom command from the client.
typedef bool(* mc_activated_client_cb )(const char *client_name, void *user_data)
 Called when requesting the list of created clients.
typedef void(* mc_server_event_reply_received_cb )(const char *client_name, const char *request_id, int result_code, bundle *data, void *user_data)
 Called when the result of the event from the client is received.
typedef void(* mc_server_search_cmd_received_cb )(const char *client_name, const char *request_id, mc_search_h search, void *user_data)
 Called when the Server receives search command from the client.
typedef void(* mc_server_enable_cmd_received_cb )(const char *client_name, const char *request_id, bool enabled, void *user_data)
 Called when the server receives the subtitle and 360 mode command from the client.
typedef void(* mc_server_display_mode_cmd_received_cb )(const char *client_name, const char *request_id, mc_display_mode_e mode, void *user_data)
 Called when the server receives the display mode command from the client.
typedef void(* mc_server_display_rotation_cmd_received_cb )(const char *client_name, const char *request_id, mc_display_rotation_e rotation, void *user_data)
 Called when the server receives the display rotation command from the client.

Typedef Documentation

typedef bool(* mc_activated_client_cb)(const char *client_name, void *user_data)

Called when requesting the list of created clients.

Since :
5.0
Remarks:
The callback is called in the main loop.
The client_name should not be released by the application.
The client_name can be used only in the callback. To use outside, make a copy.
Parameters:
[in]client_nameThe app_id of the created media controller client
[in]user_dataThe user data passed from the mc_client_foreach_server() function
Returns:
true to continue with the next iteration of the loop, otherwise false to break out of the loop
Precondition:
mc_server_foreach_client()
See also:
mc_server_foreach_client()
typedef void(* mc_server_custom_cmd_received_cb)(const char *client_name, const char *request_id, const char *command, bundle *data, void *user_data)

Called when the Server receives custom command from the client.

This callback is called when server receives custom command from client. If you want to reply to the command, call mc_server_send_cmd_reply() function.

Since :
5.0
Remarks:
The callback is called in the dbus event loop. data should be released using bundle_free().
If request_id is not null, the server should send the reply to the client with the request_id.
The client_name, request_id and command should not be released by the application.
The client_name, request_id and command can be used only in the callback. To use outside, make a copy.
Parameters:
[in]client_nameThe app_id of the media controller client
[in]request_idThe id of the command request
[in]commandThe received command
[in]dataThe extra data
[in]user_dataThe user data passed from the mc_server_set_custom_cmd_received_cb() function
Precondition:
mc_server_set_custom_cmd_received_cb()
See also:
mc_server_set_custom_cmd_received_cb()
mc_server_unset_custom_cmd_received_cb()
mc_server_send_cmd_reply()
typedef void(* mc_server_display_mode_cmd_received_cb)(const char *client_name, const char *request_id, mc_display_mode_e mode, void *user_data)

Called when the server receives the display mode command from the client.

Since :
5.5
Remarks:
The callback is called in the dbus event loop.
If request_id is not null, the server should send the reply to the client with the request_id.
The client_name and request_id should not be released by the application.
The client_name and request_id can be used only in the callback. To use outside, make a copy.
Parameters:
[in]client_nameThe app_id of the media controller client
[in]request_idThe request_id of the media controller client
[in]modeThe received display mode
[in]user_dataThe user data passed from the mc_server_set_display_mode_cmd_received_cb() function
Precondition:
mc_server_set_display_mode_cmd_received_cb()
See also:
mc_server_set_display_mode_cmd_received_cb()
mc_server_send_cmd_reply()
typedef void(* mc_server_display_rotation_cmd_received_cb)(const char *client_name, const char *request_id, mc_display_rotation_e rotation, void *user_data)

Called when the server receives the display rotation command from the client.

Since :
5.5
Remarks:
The callback is called in the dbus event loop.
If request_id is not null, the server should send the reply to the client with the request_id.
The client_name and request_id should not be released by the application.
The client_name and request_id can be used only in the callback. To use outside, make a copy.
Parameters:
[in]client_nameThe app_id of the media controller client
[in]request_idThe request_id of the media controller client
[in]rotationThe received display rotation
[in]user_dataThe user data passed from the mc_server_set_display_mode_cmd_received_cb() function
Precondition:
mc_server_set_display_rotation_cmd_received_cb()
See also:
mc_server_set_display_rotation_cmd_received_cb()
mc_server_send_cmd_reply()
typedef void(* mc_server_enable_cmd_received_cb)(const char *client_name, const char *request_id, bool enabled, void *user_data)

Called when the server receives the subtitle and 360 mode command from the client.

Since :
5.5
Remarks:
The callback is called in the dbus event loop.
If request_id is not null, the server should send the reply to the client with the request_id.
The client_name and request_id should not be released by the application.
The client_name and request_id can be used only in the callback. To use outside, make a copy.
Parameters:
[in]client_nameThe app_id of the media controller client
[in]request_idThe request_id of the media controller client
[in]enabledThe received command
[in]user_dataThe user data passed from the callback function
Precondition:
mc_server_set_subtitles_cmd_received_cb() or mc_server_set_360_mode_cmd_received_cb()
See also:
mc_server_set_subtitles_cmd_received_cb()
mc_server_set_360_mode_cmd_received_cb()
mc_server_send_cmd_reply()
typedef void(* mc_server_event_reply_received_cb)(const char *client_name, const char *request_id, int result_code, bundle *data, void *user_data)

Called when the result of the event from the client is received.

Since :
5.0
Remarks:
The callback is called in the dbus event loop. data should be released using bundle_free().
The client_name and request_id should not be released by the application.
The client_name and request_id can be used only in the callback. To use outside, make a copy.
Parameters:
[in]client_nameThe app_id of the media controller client
[in]request_idThe id of the event request
[in]result_codeThe result code of the event, mc_result_code_e since 6.0
[in]dataThe extra data
[in]user_dataThe user data passed from the mc_server_set_event_reply_received_cb() function
Precondition:
mc_server_send_custom_event()
mc_server_set_event_reply_received_cb()
See also:
mc_server_send_custom_event()
mc_server_set_event_reply_received_cb()
mc_server_unset_event_reply_received_cb()
typedef void(* mc_server_playback_action_cmd_received_cb)(const char *client_name, const char *request_id, mc_playback_action_e action, void *user_data)

Called when the server receives the playback action command from the client.

Since :
5.0
Remarks:
The callback is called in the dbus event loop.
If request_id is not null, the server should send the reply to the client with the request_id.
The client_name and request_id should not be released by the application.
The client_name and request_id can be used only in the callback. To use outside, make a copy.
Parameters:
[in]client_nameThe app_id of the media controller client
[in]request_idThe request_id of the media controller client
[in]actionThe received playback action
[in]user_dataThe user data passed from the mc_server_set_playback_action_cmd_received_cb() function
Precondition:
mc_server_set_playback_action_cmd_received_cb()
See also:
mc_server_set_playback_action_cmd_received_cb()
mc_server_send_cmd_reply()
typedef void(* mc_server_playback_position_cmd_received_cb)(const char *client_name, const char *request_id, unsigned long long position, void *user_data)

Called when the server receives the playback position from the client.

Since :
5.0
Remarks:
The callback is called in the dbus event loop.
If request_id is not null, the server should send the reply to the client with the request_id.
The client_name and request_id should not be released by the application.
The client_name and request_id can be used only in the callback. To use outside, make a copy.
Parameters:
[in]client_nameThe app_id of the media controller client
[in]request_idThe request_id of the media controller client
[in]positionThe received playback position (milliseconds)
[in]user_dataThe user data passed from the mc_server_set_playback_position_cmd_received_cb() function
Precondition:
mc_server_set_playback_position_cmd_received_cb()
See also:
mc_server_set_playback_position_cmd_received_cb()
mc_server_send_cmd_reply()
typedef void(* mc_server_playlist_cmd_received_cb)(const char *client_name, const char *request_id, const char *playlist_name, const char *index, mc_playback_action_e action, unsigned long long position, void *user_data)

Called when the Server receives playlist command from the client.

Since :
5.0
Remarks:
The callback is called in the dbus event loop.
If request_id is not null, the server should send the reply to the client with the request_id.
The client_name, request_id, playlist_name and index should not be released by the application.
The client_name, request_id, playlist_name and index can be used only in the callback. To use outside, make a copy.
Parameters:
[in]client_nameThe app_id of the media controller client
[in]request_idThe request_id of the media controller client
[in]playlist_nameThe name of the server playlist
[in]indexThe index of the media in playlist
[in]actionThe received playback action
[in]positionThe received playback position (milliseconds)
[in]user_dataThe user data passed from the mc_server_set_playlist_cmd_received_cb() function
Precondition:
mc_server_set_playlist_cmd_received_cb()
See also:
mc_server_set_playlist_cmd_received_cb()
mc_server_send_cmd_reply()
typedef void(* mc_server_repeat_mode_cmd_received_cb)(const char *client_name, const char *request_id, mc_repeat_mode_e repeat_mode, void *user_data)

Called when the server receives the repeat mode from the client.

Since :
5.0
Remarks:
The callback is called in the dbus event loop.
If request_id is not null, the server should send the reply to the client with the request_id.
The client_name and request_id should not be released by the application.
The client_name and request_id can be used only in the callback. To use outside, make a copy.
Parameters:
[in]client_nameThe app_id of the media controller client
[in]request_idThe request_id of the media controller client
[in]repeat_modeThe received repeat mode
[in]user_dataThe user data passed from the mc_server_set_repeat_mode_cmd_received_cb() function
Precondition:
mc_server_set_repeat_mode_cmd_received_cb()
See also:
mc_server_set_repeat_mode_cmd_received_cb()
mc_server_send_cmd_reply()
typedef void(* mc_server_search_cmd_received_cb)(const char *client_name, const char *request_id, mc_search_h search, void *user_data)

Called when the Server receives search command from the client.

This callback is called when server receives search command from client. If you want to reply to the command, call mc_server_send_cmd_reply() function.

Since :
5.0
Remarks:
The callback is called in the dbus event loop.
If request_id is not null, the server should send the reply to the client with the request_id.
The client_name, request_id and search should not be released by the application.
The client_name and request_id can be used only in the callback. To use outside, make a copy.
search also can be used only in the callback. To use outside, make a copy using mc_search_clone().
Parameters:
[in]client_nameThe app_id of the media controller client
[in]request_idThe id of the command request
[in]searchThe handle to search
[in]user_dataThe user data passed from the mc_server_set_search_cmd_received_cb() function
Precondition:
mc_server_set_search_cmd_received_cb()
See also:
mc_server_set_search_cmd_received_cb()
mc_server_unset_search_cmd_received_cb()
mc_server_send_cmd_reply()
mc_search_foreach_condition()
mc_search_clone()
typedef void(* mc_server_shuffle_mode_cmd_received_cb)(const char *client_name, const char *request_id, mc_shuffle_mode_e shuffle_mode, void *user_data)

Called when the server receives the shuffle mode from the client.

Since :
5.0
Remarks:
The callback is called in the dbus event loop.
If request_id is not null, the server should send the reply to the client with the request_id.
The client_name and request_id should not be released by the application.
The client_name and request_id can be used only in the callback. To use outside, make a copy.
Parameters:
[in]client_nameThe app_id of the media controller client
[in]request_idThe request_id of the media controller client
[in]shuffle_modeThe received shuffle_mode
[in]user_dataThe user data passed from the mc_server_set_shuffle_mode_cmd_received_cb() function
Precondition:
mc_server_set_shuffle_mode_cmd_received_cb()
See also:
mc_server_set_shuffle_mode_cmd_received_cb()
mc_server_send_cmd_reply()

Function Documentation

int mc_server_add_item_to_playlist ( mc_server_h  server,
mc_playlist_h  playlist,
const char *  index,
mc_meta_e  attribute,
const char *  value 
)

Adds a new item to the playlist.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It's possible to add at most 100 items at once.
If you have more items, register the first 100 items by calling mc_server_update_playlist_done(), then add the remaining items.
Parameters:
[in]serverThe handle to media controller server
[in]playlistThe handle of the media controller playlist
[in]indexThe index of the playlist item. It should not be NULL
[in]attributeThe key attribute name to set
[in]valueThe value of the attribute
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
Create a media controller playlist handle by calling mc_server_create_playlist().
Postcondition:
You should call mc_server_update_playlist_done() to register it.
See also:
mc_server_create()
mc_server_destroy()
mc_server_create_playlist()
mc_server_update_playlist_done()
mc_playlist_destroy()
int mc_server_create ( mc_server_h server)

Creates a media controller server.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
The server should be released using mc_server_destroy(). You can create only one server handle for each process.
Parameters:
[out]serverThe handle to media controller server
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
See also:
mc_server_destroy()
int mc_server_create_playlist ( mc_server_h  server,
const char *  playlist_name,
mc_playlist_h playlist 
)

Creates a new playlist with the given name.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
The playlist should be released using mc_playlist_destroy().
When the server is destroyed, all its playlists will be deleted automatically.
Parameters:
[in]serverThe handle to media controller server
[in]playlist_nameThe name of the created playlist
[out]playlistThe handle of the media controller playlist
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
Postcondition:
You can call mc_server_add_item_to_playlist() if you have items to add in the playlist and should call mc_server_update_playlist_done() to register it.
See also:
mc_server_create()
mc_server_destroy()
mc_server_add_item_to_playlist()
mc_server_update_playlist_done()
mc_server_delete_playlist()
mc_playlist_destroy()
int mc_server_delete_playlist ( mc_server_h  server,
mc_playlist_h  playlist 
)

Deletes the playlist of the media controller server.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Parameters:
[in]serverThe handle to media controller server
[in]playlistThe handle of the media controller playlist
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
Create a media controller playlist handle by calling mc_server_create_playlist().
See also:
mc_server_create()
mc_server_destroy()
mc_server_create_playlist()
mc_playlist_destroy()
int mc_server_destroy ( mc_server_h  server)

Destroys media controller server.

Since :
3.0
Remarks:
After the server is destroyed, all its abilities will be initialized to the default automatically.
Parameters:
[in]serverThe handle to media controller server
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
int mc_server_foreach_client ( mc_server_h  server,
mc_activated_client_cb  callback,
void *  user_data 
)

Retrieves all created clients.

This function gets all created media controller clients. The callback function will be invoked for every created media controller client. If there are no media controller clients, the callback will not be invoked.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Parameters:
[in]serverThe handle to media controller server
[in]callbackThe callback function to be invoked, will be called for each client
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_activated_client_cb()
mc_server_destroy()
int mc_server_foreach_playlist ( mc_server_h  server,
mc_playlist_cb  callback,
void *  user_data 
)

Retrieves all playlists of the media controller server.

Deprecated:
Deprecated since 5.5. Use mc_playlist_foreach_playlist() instead.

This function gets all playlists of the media controller server. The callback function will be invoked for every retrieved playlist. If there are no playlists, callback will not be invoked.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Parameters:
[in]serverThe handle to media controller server
[in]callbackThe callback function to be invoked, will be called for each playlist
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_playlist_cb()
int mc_server_send_cmd_reply ( mc_server_h  server,
const char *  client_name,
const char *  request_id,
int  result_code,
bundle data 
)

Replies the result of the requested command to the client.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
When the server receives a command, this function can be called by mc_server_playback_action_cmd_received_cb(), mc_server_playback_position_cmd_received_cb(), mc_server_shuffle_mode_cmd_received_cb(), mc_server_repeat_mode_cmd_received_cb(), mc_server_playlist_cmd_received_cb() and mc_server_custom_cmd_received_cb().
If request_id is null, this function will return MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER.
Parameters:
[in]serverThe handle to media controller server
[in]client_nameThe app_id of the media controller client
[in]request_idThe id of the command request, received in the mc_server_custom_cmd_received_cb() function
[in]result_codeThe result code of custom command, mc_result_code_e since 6.0
[in]dataThe extra data
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_playback_action_cmd_received_cb()
mc_server_playback_position_cmd_received_cb()
mc_server_shuffle_mode_cmd_received_cb()
mc_server_repeat_mode_cmd_received_cb()
mc_server_playlist_cmd_received_cb()
mc_server_custom_cmd_received_cb()
mc_server_destroy()
int mc_server_send_custom_event ( mc_server_h  server,
const char *  client_name,
const char *  event,
bundle data,
char **  request_id 
)

Sends the customized event with the bundle data.

If the event is needed in the client, this function should be called. data is a bundle.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
The request_id should be released using free().
If the request_id is null, the client will not send the reply of the custom event.
Parameters:
[in]serverThe handle to media controller server
[in]client_nameThe name of the client which receive the event
[in]eventThe name of the event
[in]dataThe data can include other information associated with the event
[out]request_idThe id of the event request, it will be passed to the mc_server_event_reply_received_cb() function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_event_reply_received_cb()
mc_server_set_event_reply_received_cb()
mc_server_destroy()
int mc_server_set_360_mode_cmd_received_cb ( mc_server_h  server,
mc_server_enable_cmd_received_cb  callback,
void *  user_data 
)

Sets the callback for receiving 360 mode command from client.

Since :
5.5
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is mandatory to set the corresponding ability's support using mc_server_set_ability_support().
If not, server can't receive command from clients. It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
[in]callbackThe callback to be invoked when media controller server receives 360 mode command from client
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_unset_360_mode_cmd_received_cb()
mc_server_set_ability_support()

Sets the ability's support of the media controller.

This function allows setting the support for the following abilities: MC_ABILITY_SHUFFLE,
MC_ABILITY_REPEAT,
MC_ABILITY_PLAYBACK_POSITION,
MC_ABILITY_PLAYLIST,
MC_ABILITY_CLIENT_CUSTOM,
MC_ABILITY_SEARCH,
MC_ABILITY_SUBTITLES,
MC_ABILITY_360_MODE,
To set the support for other abilities, use corresponding function.
For a playback ability, use mc_server_set_playback_ability() and mc_server_update_playback_ability().
For a display mode ability, use mc_server_set_display_mode_ability().
For a display rotation ability, use mc_server_set_display_rotation_ability().

Since :
5.5
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
If support is MC_ABILITY_SUPPORTED_UNDECIDED, this function will return MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER.
Default value is MC_ABILITY_SUPPORTED_UNDECIDED.
But for the MC_ABILITY_SUBTITLES, MC_ABILITY_360_MODE default value is MC_ABILITY_SUPPORTED_NO.
Clients can send command to servers when server's ability is MC_ABILITY_SUPPORTED_YES or MC_ABILITY_SUPPORTED_UNDECIDED. So, it is required that server set the corresponding ability's support to communicate with clients.
Parameters:
[in]serverThe handle to media controller server
[in]abilityThe ability to set support
[in]supportThe support value of the ability
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_set_playback_ability()
mc_server_update_playback_ability()
mc_server_set_display_mode_ability()
mc_server_set_display_rotation_ability()

Sets the content age rating to update the latest playback info.

If this function is called, the updated age rating information will be sent to all clients. Default value is MC_CONTENT_RATING_ALL.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Parameters:
[in]serverThe handle to media controller server
[in]age_ratingAge rating of the content
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
Postcondition:
Apply the updated age rating information by calling mc_server_update_playback_info().
See also:
mc_server_create()
mc_server_destroy()
mc_server_update_playback_info()
int mc_server_set_custom_cmd_received_cb ( mc_server_h  server,
mc_server_custom_cmd_received_cb  callback,
void *  user_data 
)

Sets the callback for receiving custom command from client.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is recommended to set the corresponding ability's support using mc_server_set_ability_support(). It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
[in]callbackThe callback to be invoked when media controller server receives custom command from client
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_unset_custom_cmd_received_cb()
mc_server_set_ability_support()
int mc_server_set_display_mode_ability ( mc_server_h  server,
unsigned int  mode,
mc_ability_support_e  support 
)

Sets the display mode ability of the media controller.

Since :
5.5
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
If support is MC_ABILITY_SUPPORTED_UNDECIDED, this function will return MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER. The default display mode ability is MC_ABILITY_SUPPORTED_NO.
It means client can't send the corresponding command to the server, so to receive command from clients, set ability as MC_ABILITY_SUPPORTED_YES.
Parameters:
[in]serverThe handle to media controller server
[in]modeThe display mode, values of mc_display_mode_e combined with bitwise 'or'.
[in]supportThe support value of the ability
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_set_display_mode_cmd_received_cb()

Sets the callback for receiving display mode command from client.

Since :
5.5
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is mandatory to set the corresponding ability's support using mc_server_set_display_mode_ability().
If not, server can't receive command from clients. It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
[in]callbackThe callback to be invoked when media controller server receives display mode command from client
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_unset_display_mode_cmd_received_cb()
mc_server_set_display_mode_ability()
int mc_server_set_display_rotation_ability ( mc_server_h  server,
unsigned int  rotation,
mc_ability_support_e  support 
)

Sets the display rotation ability of the media controller.

Since :
5.5
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
If support is MC_ABILITY_SUPPORTED_UNDECIDED, this function will return MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER. The default display rotation ability is MC_ABILITY_SUPPORTED_NO.
It means client can't send the corresponding command to the server, so to receive command from clients, set ability as MC_ABILITY_SUPPORTED_YES.
Parameters:
[in]serverThe handle to media controller server
[in]rotationThe display rotation, values of mc_display_rotation_e combined with bitwise 'or'
[in]supportThe support value of the ability
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()

Sets the callback for receiving display rotation command from client.

Since :
5.5
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is mandatory to set the corresponding ability's support using mc_server_set_display_rotation_ability().
If not, server can't receive command from clients. It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
[in]callbackThe callback to be invoked when media controller server receives display rotation command from client
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_unset_display_rotation_cmd_received_cb()
mc_server_set_display_rotation_ability()
int mc_server_set_event_reply_received_cb ( mc_server_h  server,
mc_server_event_reply_received_cb  callback,
void *  user_data 
)

Sets the callback for receiving the result of the event from the media controller client.

The media controller server which calls this function will receive the result of the event from all media controller clients.
The media controller server can send event by using mc_server_send_custom_event().

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Parameters:
[in]serverThe handle of the media controller server
[in]callbackThe callback to be invoked when the reply is received
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
mc_server_send_custom_event().
See also:
mc_server_create()
mc_server_unset_event_reply_received_cb()
mc_server_destroy()
int mc_server_set_icon ( mc_server_h  server,
const char *  uri 
)

Sets the icon URI of media controller server.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It's possible to set URI to NULL if there is no icon.
Parameters:
[in]serverThe handle to media controller server
[in]uriThe icon URI
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
int mc_server_set_metadata ( mc_server_h  server,
mc_meta_e  attribute,
const char *  value 
)

Sets the metadata to update the latest metadata info.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Parameters:
[in]serverThe handle to media controller server
[in]attributeThe key attribute name to set
[in]valueThe value of the attribute
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
Postcondition:
Apply the updated metadata information by calling mc_server_update_metadata().
See also:
mc_server_create()
mc_server_destroy()
mc_server_update_metadata()

Sets the playback ability's support of the media controller.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
If support is MC_ABILITY_SUPPORTED_UNDECIDED, this function will return MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER. To notify all clients about the changes of the playback's ability support, use mc_server_update_playback_ability().
Parameters:
[in]serverThe handle to media controller server
[in]actionThe playback action
[in]supportThe support value of the ability
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
Postcondition:
Update abilities of a media controller server by calling mc_server_update_playback_ability().
See also:
mc_server_create()
mc_server_destroy()
mc_server_update_playback_ability()

Sets the callback for receiving playback action command from client.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is recommended to set the corresponding ability's support using mc_server_set_playback_ability(). It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
[in]callbackThe callback to be invoked when media controller server receives playback action from client.
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_unset_playback_action_cmd_received_cb()
mc_server_set_playback_ability()

Sets the playback content type to update the latest playback info.

If this function is called, the updated content type information will be sent to all clients.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
If content_type is MC_CONTENT_TYPE_UNDECIDED, this function will return MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER.
Parameters:
[in]serverThe handle to media controller server
[in]content_typeThe content type to set the latest status
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
Postcondition:
Apply the updated playback information by calling mc_server_update_playback_info().
See also:
mc_server_create()
mc_server_destroy()
mc_server_update_playback_info()
int mc_server_set_playback_position ( mc_server_h  server,
unsigned long long  position 
)

Sets the playback position to update the latest playback info.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Parameters:
[in]serverThe handle to media controller server
[in]positionThe position to set in milliseconds
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
Postcondition:
Apply the updated playback information by calling mc_server_update_playback_info().
See also:
mc_server_create()
mc_server_destroy()
mc_server_update_playback_info()

Sets the callback for receiving playback position command from client.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is recommended to set the corresponding ability's support using mc_server_set_ability_support(). It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
[in]callbackThe callback to be invoked when media controller server receives position command from client
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_unset_playback_position_cmd_received_cb()
mc_server_set_ability_support()

Sets the playback state to update the latest state info.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Parameters:
[in]serverThe handle to media controller server
[in]stateThe state to set
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
Postcondition:
Apply the updated playback information by calling mc_server_update_playback_info().
See also:
mc_server_create()
mc_server_destroy()
mc_server_update_playback_info()

Sets the callback for receiving playlist command from client.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is recommended to set the corresponding ability's support using mc_server_set_ability_support(). It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
[in]callbackThe callback to be invoked when media controller server receives playlist command from client
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_unset_playlist_cmd_received_cb()
mc_server_set_ability_support()
int mc_server_set_playlist_item_index ( mc_server_h  server,
const char *  index 
)

Sets the index of the current playing media in the playlist to update the latest playback info.

Deprecated:
Deprecated since 5.0. Use mc_server_set_playlist_item_info() instead.

If a media controller server has a playlist, the server can register and share it with media controller client. A playlist is a set of "index" and "media metadata".
The media controller server can let media controller clients know the index of current playing media by using this function.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Parameters:
[in]serverThe handle to media controller server
[in]indexThe index of the current playing media in the playlist
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
Postcondition:
Apply the updated playback information by calling mc_server_update_playback_info().
See also:
mc_server_create()
mc_server_destroy()
mc_server_update_playback_info()
mc_server_create_playlist()
int mc_server_set_playlist_item_info ( mc_server_h  server,
const char *  playlist_name,
const char *  index 
)

Sets the playlist name and index of the current playing media in the playlist to update the latest playback info.

If a media controller server has a playlist, the server can register and share it with media controller client. A playlist is a set of "index" and "media metadata".
The media controller server can let media controller clients know the playlist name and index of current playing media by using this function.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Parameters:
[in]serverThe handle to media controller server
[in]playlist_nameThe name of the playlist. The length of the playlist name should be less than 4096 bytes
[in]indexThe index of the current playing media in the playlist
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
Postcondition:
Apply the updated playback information by calling mc_server_update_playback_info().
See also:
mc_server_create()
mc_server_destroy()
mc_server_update_playback_info()
mc_server_create_playlist()

Sets the repeat ability's support of the media controller.

Deprecated:
Deprecated since 5.5. Use mc_server_set_ability_support() instead.
Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
If support is MC_ABILITY_SUPPORTED_UNDECIDED, this function will return MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER.
Parameters:
[in]serverThe handle to media controller server
[in]supportThe support value of the ability
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()

Sets the callback for receiving repeat mode command from client.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is recommended to set the corresponding ability's support using mc_server_set_ability_support(). It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
[in]callbackThe callback to be invoked when media controller server receives repeat mode from client
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_unset_repeat_mode_cmd_received_cb()
mc_server_set_ability_support()
int mc_server_set_search_cmd_received_cb ( mc_server_h  server,
mc_server_search_cmd_received_cb  callback,
void *  user_data 
)

Sets the callback for receiving search command from client.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is recommended to set the corresponding ability's support using mc_server_set_ability_support(). It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
[in]callbackThe callback to be invoked when media controller server receives search command from client
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_unset_search_cmd_received_cb()
mc_server_set_ability_support()

Sets the shuffle ability's support of the media controller.

Deprecated:
Deprecated since 5.5. Use mc_server_set_ability_support() instead.
Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
If support is MC_ABILITY_SUPPORTED_UNDECIDED, this function will return MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER.
Parameters:
[in]serverThe handle to media controller server
[in]supportThe support value of the ability
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()

Sets the callback for receiving shuffle mode command from client.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is recommended to set the corresponding ability's support using mc_server_set_ability_support(). It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
[in]callbackThe callback to be invoked when media controller server receives shuffle mode from client
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_unset_shuffle_mode_cmd_received_cb()
mc_server_set_ability_support()
int mc_server_set_subtitles_cmd_received_cb ( mc_server_h  server,
mc_server_enable_cmd_received_cb  callback,
void *  user_data 
)

Sets the callback for receiving subtitles command from client.

Since :
5.5
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is mandatory to set the corresponding ability's support using mc_server_set_ability_support().
If not, server can't receive command from clients. It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
[in]callbackThe callback to be invoked when media controller server receives subtitles command from client
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_unset_subtitles_cmd_received_cb()
mc_server_set_ability_support()

Unsets the callback for receiving 360 mode command from client.

Since :
5.5
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is mandatory to set the corresponding ability's support using mc_server_set_ability_support().
If not, server can't receive command from clients. It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_set_360_mode_cmd_received_cb()
mc_server_set_ability_support()

Unsets the callback for receiving custom command from client.

Since :
5.0
Remarks:
It is recommended to set the corresponding ability's support using mc_server_set_ability_support(). It will let the client know about the server's abilities and what commands the client can send.
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Parameters:
[in]serverThe handle to media controller server
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_set_custom_cmd_received_cb()
mc_server_set_ability_support()

Unsets the callback for receiving display mode command from client.

Since :
5.5
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is mandatory to set the corresponding ability's support using mc_server_set_display_mode_ability().
If not, server can't receive command from clients. It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_set_display_mode_cmd_received_cb()
mc_server_set_display_mode_ability()

Unsets the callback for receiving display rotation command from client.

Since :
5.5
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is mandatory to set the corresponding ability's support using mc_server_set_display_rotation_ability().
If not, server can't receive command from clients. It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_set_display_rotation_cmd_received_cb()
mc_server_set_display_rotation_ability()

Unsets the callback for receiving event reply of the media controller client.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Parameters:
[in]serverThe handle of the media controller server
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media controller client handle by calling mc_client_create().
See also:
mc_server_create()
mc_server_set_event_reply_received_cb()
mc_server_destroy()

Unsets the callback for receiving playback action command from client.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is recommended to set the corresponding ability's support using mc_server_set_playback_ability(). It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_set_playback_action_cmd_received_cb()
mc_server_set_playback_ability()

Unsets the callback for receiving playback position command from client.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is recommended to set the corresponding ability's support using mc_server_set_ability_support(). It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_set_playback_position_cmd_received_cb()
mc_server_set_playback_ability()

Unsets the callback for receiving playlist command from client.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is recommended to set the corresponding ability's support using mc_server_set_ability_support(). It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_set_playlist_cmd_received_cb()
mc_server_set_ability_support()

Unsets the callback for receiving repeat mode command from client.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is recommended to set the corresponding ability's support using mc_server_set_ability_support(). It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_set_repeat_mode_cmd_received_cb()
mc_server_set_ability_support()

Unsets the callback for receiving search command from client.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is recommended to set the corresponding ability's support using mc_server_set_ability_support(). It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_set_search_cmd_received_cb()
mc_server_set_ability_support()

Unsets the callback for receiving shuffle mode command from client.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is recommended to set the corresponding ability's support using mc_server_set_ability_support(). It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_set_shuffle_mode_cmd_received_cb()
mc_server_set_ability_support()

Unsets the callback for receiving subtitles command from client.

Since :
5.5
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
It is mandatory to set the corresponding ability's support using mc_server_set_ability_support().
If not, server can't receive command from clients. It will let the client know about the server's abilities and what commands the client can send.
Parameters:
[in]serverThe handle to media controller server
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
mc_server_set_subtitles_cmd_received_cb()
mc_server_set_ability_support()
int mc_server_update_360_mode_enabled ( mc_server_h  server,
bool  enabled 
)

Updates the modified 360 mode display status.

If this function is called, the updated 360 mode display status will be sent to all clients.

Since :
5.5
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
The default 360 mode display is false.
Parameters:
[in]serverThe handle to media controller server
[in]enabledThe 360 mode display status to update the latest status
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()

Updates the modified display mode.

If this function is called, the updated display mode information will be sent to all clients.

Since :
5.5
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
The default display mode is MC_DISPLAY_MODE_FULL_SCREEN.
Parameters:
[in]serverThe handle to media controller server
[in]modeThe display mode to update the latest status
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()

Updates the modified display rotation.

If this function is called, the updated display rotation information will be sent to all clients.

Since :
5.5
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
The default display rotation is MC_DISPLAY_ROTATION_NONE.
Parameters:
[in]serverThe handle to media controller server
[in]rotationThe display rotation to update the latest status
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()

Updates the modified metadata info.

If this function is called, the updated metadata will be sent to all clients.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Parameters:
[in]serverThe handle to media controller server
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()

Updates the modified ability info.

If this function is called, the updated ability will be sent to all clients.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Parameters:
[in]serverThe handle to media controller server
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
Set abilities of a media controller server by calling mc_server_set_playback_ability().
See also:
mc_server_create()
mc_server_destroy()
mc_server_set_playback_ability()

Updates the modified playback info.

If this function is called, the updated playback information will be sent to the controller.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Parameters:
[in]serverThe handle to media controller server
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()

Registers items to the playlist.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Parameters:
[in]serverThe handle to media controller server
[in]playlistThe handle of the media controller playlist
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
Create a media controller playlist handle by calling mc_server_create_playlist().
See also:
mc_server_create()
mc_server_destroy()
mc_server_create_playlist()
mc_playlist_destroy()

Updates the modified repeat mode.

If this function is called, the updated mode information will be sent to all clients.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Parameters:
[in]serverThe handle to media controller server
[in]modeThe repeat mode to update the latest status
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()

Updates the modified shuffle mode.

If this function is called, the updated mode information will be sent to all clients.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Parameters:
[in]serverThe handle to media controller server
[in]modeThe shuffle mode to update the latest status
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()
int mc_server_update_subtitles_enabled ( mc_server_h  server,
bool  enabled 
)

Updates the modified subtitles display status.

If this function is called, the updated subtitles display status will be sent to all clients.

Since :
5.5
Privilege Level:
public
Privilege:
http://tizen.org/privilege/mediacontroller.server
Remarks:
The default subtitles display is false.
Parameters:
[in]serverThe handle to media controller server
[in]enabledThe subtitles display status to update the latest status
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Create a media controller server handle by calling mc_server_create().
See also:
mc_server_create()
mc_server_destroy()