typedef void (*mc_playback_ability_updated_cb)(const char *server_name, mc_playback_ability_h ability, void *user_data);
/**
- * @deprecated Deprecated since 5.5. Use mc_ability_support_updated_cb() instead.
- * @brief Called when the shuffle ability support of the media controller server is updated.
- * @since_tizen 5.0
- *
- * @remarks The callback is called in the dbus event loop.\n
- * The @a server_name should not be released by the application. \n
- * The @a server_name can be used only in the callback. To use outside, make a copy.
- *
- * @param[in] server_name The app_id of the media controller server which sent the notification
- * @param[in] support The support value of the ability of the updated media controller server
- * @param[in] user_data The user data passed from the mc_client_set_shuffle_ability_updated_cb() function
- *
- * @pre mc_client_set_shuffle_ability_updated_cb()
- *
- * @see mc_client_set_shuffle_ability_updated_cb()
- */
-typedef void (*mc_shuffle_ability_updated_cb)(const char *server_name, mc_ability_support_e support, void *user_data) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Deprecated since 5.5. Use mc_ability_support_updated_cb() instead.
- * @brief Called when the repeat ability of the media controller server is updated.
- * @since_tizen 5.0
- *
- * @remarks The callback is called in the dbus event loop.\n
- * The @a server_name should not be released by the application. \n
- * The @a server_name can be used only in the callback. To use outside, make a copy.
- *
- * @param[in] server_name The app_id of the media controller server which sent the notification
- * @param[in] support The support value of the ability of the updated media controller server
- * @param[in] user_data The user data passed from the mc_client_set_repeat_ability_updated_cb() function
- *
- * @pre mc_client_set_repeat_ability_updated_cb()
- *
- * @see mc_client_set_repeat_ability_updated_cb()
- */
-typedef void (*mc_repeat_ability_updated_cb)(const char *server_name, mc_ability_support_e support, void *user_data) TIZEN_DEPRECATED_API;
-
-/**
* @brief Called when a media controller server's support for an ability is updated.
* @since_tizen 5.5
*
int mc_client_unset_playback_ability_updated_cb(mc_client_h client);
/**
- * @deprecated Deprecated since 5.5. Use mc_client_set_ability_support_updated_cb() instead.
- * @brief Sets the callback for monitoring the shuffle ability of the media controller server.
- * @details The media controller client which calls this function will receive notifications from all media controller servers.
- * @since_tizen 5.0
- *
- * @privlevel public
- * @privilege %http://tizen.org/privilege/mediacontroller.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_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_destroy()
- */
-int mc_client_set_shuffle_ability_updated_cb(mc_client_h client, mc_shuffle_ability_updated_cb callback, void *user_data) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Deprecated since 5.5. Use mc_client_unset_ability_support_updated_cb() instead.
- * @brief Unsets the callback for monitoring the shuffle ability of the media controller server.
- * @since_tizen 5.0
- *
- * @privlevel public
- * @privilege %http://tizen.org/privilege/mediacontroller.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
- *
- * @pre Create a media controller client handle by calling mc_client_create().
- * @see mc_client_create()
- * @see mc_client_destroy()
- */
-int mc_client_unset_shuffle_ability_updated_cb(mc_client_h client) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Deprecated since 5.5. Use mc_client_set_ability_support_updated_cb() instead.
- * @brief Sets the callback for monitoring the repeat ability of the media controller server.
- * @details The media controller client which calls this function will receive notifications from all media controller servers.
- * @since_tizen 5.0
- *
- * @privlevel public
- * @privilege %http://tizen.org/privilege/mediacontroller.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_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_destroy()
- */
-int mc_client_set_repeat_ability_updated_cb(mc_client_h client, mc_repeat_ability_updated_cb callback, void *user_data) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Deprecated since 5.5. Use mc_client_unset_ability_support_updated_cb() instead.
- * @brief Unsets the callback for monitoring the repeat ability of the media controller server.
- * @since_tizen 5.0
- *
- * @privlevel public
- * @privilege %http://tizen.org/privilege/mediacontroller.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
- *
- * @pre Create a media controller client handle by calling mc_client_create().
- * @see mc_client_create()
- * @see mc_client_destroy()
- */
-int mc_client_unset_repeat_ability_updated_cb(mc_client_h client) TIZEN_DEPRECATED_API;
-
-/**
* @brief Sets the callback for monitoring the media controller server's support for an ability.
* @details The media controller client which calls this function will receive notifications from all media controller servers.
* This function can be used to monitor the following abilities:\n
int mc_client_get_playback_position(mc_playback_h playback, unsigned long long *position);
/**
- * @deprecated Deprecated since 5.0. Use mc_client_get_playlist_item_info() instead.
- * @brief Gets the index of the media in playlist.
- * @details Gets the index of the current playing media in a playlist. If the media controller server didn't set the index, the value is NULL.
- * @since_tizen 4.0
- *
- * @privlevel public
- * @privilege %http://tizen.org/privilege/mediacontroller.client
- *
- * @remarks The @a index should be released using free().
- *
- * @param[in] playback The handle to playback
- * @param[out] index The index of the media
- * @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
- *
- * @pre The playback update callback should be set with mc_client_set_playback_updated_cb().
- * @see mc_client_set_playback_updated_cb()
- * @see mc_playlist_foreach_playlist()
- */
-int mc_client_get_playlist_item_index(mc_playback_h playback, char **index) TIZEN_DEPRECATED_API;
-
-/**
* @brief Gets the playlist name and index of the media in playlist.
* @details Gets the playlist name and index of the current playing media in a playlist. \n
* If the media controller server didn't set the info, @a playlist_name and @a index will be set to NULL.
int mc_client_get_server_playback_ability(mc_client_h client, const char *server_name, mc_playback_ability_h *ability);
/**
- * @deprecated Deprecated since 5.5. Use mc_client_get_server_ability_support() instead.
- * @brief Gets the support value of the shuffle ability of the updated media controller server.
- * @since_tizen 5.0
- *
- * @privlevel public
- * @privilege %http://tizen.org/privilege/mediacontroller.client
- *
- * @remarks If the server's ability support is not set, the result value is #MC_ABILITY_SUPPORTED_UNDECIDED. \n
- * It means you can send the corresponding command to the server, but it's not guaranteed that the server can handle it.
- *
- * @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
- *
- * @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()
- * @see mc_client_destroy()
- * @see mc_client_get_latest_server_info()
- * @see mc_client_foreach_server()
- */
-int mc_client_get_server_shuffle_ability_support(mc_client_h client, const char *server_name, mc_ability_support_e *support) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Deprecated since 5.5. Use mc_client_get_server_ability_support() instead.
- * @brief Gets the support value of the repeat ability of the updated media controller server.
- * @since_tizen 5.0
- *
- * @privlevel public
- * @privilege %http://tizen.org/privilege/mediacontroller.client
- *
- * @remarks If the server's ability support is not set, the result value is #MC_ABILITY_SUPPORTED_UNDECIDED. \n
- * It means you can send the corresponding command to the server, but it's not guaranteed that the server can handle it.
- *
- * @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
- *
- * @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()
- * @see mc_client_destroy()
- * @see mc_client_get_latest_server_info()
- * @see mc_client_foreach_server()
- * @see mc_client_get_server_playback_ability()
- */
-int mc_client_get_server_repeat_ability_support(mc_client_h client, const char *server_name, mc_ability_support_e *support) TIZEN_DEPRECATED_API;
-
-/**
* @brief Gets the ability support of the media controller server.
* @since_tizen 5.5
*
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.
- * If there are no playlists, the callback will not be invoked.
- * @since_tizen 4.0
- *
- * @privlevel public
- * @privilege %http://tizen.org/privilege/mediacontroller.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
- *
- * @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
- *
- * @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) TIZEN_DEPRECATED_API;
-
-/**
* @brief Sends the playback action command to server.
* @since_tizen 4.0
*
#define MC_DBUS_SIGNAL_NAME_CUSTOM_EVENT "custom_event"
#define MC_DBUS_SIGNAL_NAME_EVENT_REPLY "event_reply"
#define MC_DBUS_SIGNAL_NAME_PLAYBACK_ABILITY "playback_ability"
-#define MC_DBUS_SIGNAL_NAME_SHUFFLE_ABILITY "shuffle_ability"
-#define MC_DBUS_SIGNAL_NAME_REPEAT_ABILITY "repeat_ability"
#define MC_DBUS_SIGNAL_NAME_ABILITY_SUPPORT "ability_support"
#define MC_DBUS_SIGNAL_NAME_DP_MODE_ABILITY "display_mode_ability"
#define MC_DBUS_SIGNAL_NAME_DP_ROTATION_ABILITY "display_rotation_ability"
MC_CLIENT_EVENT_REPEAT = MC_SUBSCRIPTION_TYPE_REPEAT_MODE,
MC_CLIENT_EVENT_PLAYLIST = MC_SUBSCRIPTION_TYPE_PLAYLIST,
MC_CLIENT_EVENT_PLAYBACK_ABILITY = MC_SUBSCRIPTION_TYPE_PLAYBACK_ABILITY,
- MC_CLIENT_EVENT_SHUFFLE_ABILITY = MC_SUBSCRIPTION_TYPE_SHUFFLE_ABILITY,
- MC_CLIENT_EVENT_REPEAT_ABILITY = MC_SUBSCRIPTION_TYPE_REPEAT_ABILITY,
MC_CLIENT_EVENT_ABILITY_SUPPORT = MC_SUBSCRIPTION_TYPE_ABILITY_SUPPORT,
MC_CLIENT_EVENT_DISPLAY_MODE_ABILITY = MC_SUBSCRIPTION_TYPE_DISPLAY_MODE_ABILITY,
MC_CLIENT_EVENT_DISPLAY_ROTATION_ABILITY = MC_SUBSCRIPTION_TYPE_DISPLAY_ROTATION_ABILITY,
int mc_server_set_playback_position(mc_server_h server, unsigned long long position);
/**
- * @deprecated Deprecated since 5.0. Use mc_server_set_playlist_item_info() instead.
- * @brief Sets the index of the current playing media in the playlist to update the latest playback info.
- * @details 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".\n
- * The media controller server can let media controller clients know the index of current playing media by using this function.
- * @since_tizen 4.0
- *
- * @privlevel public
- * @privilege %http://tizen.org/privilege/mediacontroller.server
- *
- * @param[in] server The handle to media controller server
- * @param[in] index The index of the current playing media in the 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
- *
- * @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()
- * @see mc_server_destroy()
- * @see mc_server_update_playback_info()
- * @see mc_server_create_playlist()
- */
-int mc_server_set_playlist_item_index(mc_server_h server, const char *index) TIZEN_DEPRECATED_API;
-
-/**
* @brief Sets the playlist name and index of the current playing media in the playlist to update the latest playback info.
* @details 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".\n
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.
- * If there are no playlists, callback will not be invoked.
- * @since_tizen 4.0
- *
- * @privlevel public
- * @privilege %http://tizen.org/privilege/mediacontroller.server
- *
- * @param[in] server The handle to media controller server
- * @param[in] callback The callback function to be invoked, will be called for each playlist
- * @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
- *
- * @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) TIZEN_DEPRECATED_API;
-
-/**
* @brief Sets the playback ability's support of the media controller.
* @since_tizen 5.0
*
int mc_server_update_playback_ability(mc_server_h server);
/**
- * @deprecated Deprecated since 5.5. Use mc_server_set_ability_support() instead.
- * @brief Sets the shuffle ability's support of the media controller.
- * @since_tizen 5.0
- *
- * @privlevel public
- * @privilege %http://tizen.org/privilege/mediacontroller.server
- *
- * @remarks If @a support is #MC_ABILITY_SUPPORTED_UNDECIDED, this function will return #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER.
- *
- * @param[in] server The handle to media controller server
- * @param[in] support The support value of the 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
- *
- * @pre Create a media controller server handle by calling mc_server_create().
- * @see mc_server_create()
- * @see mc_server_destroy()
- */
-int mc_server_set_shuffle_ability(mc_server_h server, mc_ability_support_e support) TIZEN_DEPRECATED_API;
-
-/**
- * @deprecated Deprecated since 5.5. Use mc_server_set_ability_support() instead.
- * @brief Sets the repeat ability's support of the media controller.
- * @since_tizen 5.0
- *
- * @privlevel public
- * @privilege %http://tizen.org/privilege/mediacontroller.server
- *
- * @remarks If @a support is #MC_ABILITY_SUPPORTED_UNDECIDED, this function will return #MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER.
- *
- * @param[in] server The handle to media controller server
- * @param[in] support The support value of the 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
- *
- * @pre Create a media controller server handle by calling mc_server_create().
- * @see mc_server_create()
- * @see mc_server_destroy()
- */
-int mc_server_set_repeat_ability(mc_server_h server, mc_ability_support_e support) TIZEN_DEPRECATED_API;
-
-/**
* @brief Sets the ability's support of the media controller.
* @details This function allows setting the support for the following abilities:
* #MC_ABILITY_SHUFFLE, \n
MC_SUBSCRIPTION_TYPE_REPEAT_MODE, /**< Repeat mode */
MC_SUBSCRIPTION_TYPE_PLAYLIST, /**< Playlist (Since 4.0) */
MC_SUBSCRIPTION_TYPE_PLAYBACK_ABILITY, /**< Playback ability (Since 5.0) */
- MC_SUBSCRIPTION_TYPE_SHUFFLE_ABILITY, /**< Shuffle ability (Since 5.0) (Deprecated since 5.5. Use #MC_SUBSCRIPTION_TYPE_ABILITY_SUPPORT instead)*/
- MC_SUBSCRIPTION_TYPE_REPEAT_ABILITY, /**< Repeat ability (Since 5.0) (Deprecated since 5.5. Use #MC_SUBSCRIPTION_TYPE_ABILITY_SUPPORT instead)*/
MC_SUBSCRIPTION_TYPE_ABILITY_SUPPORT = 9, /**< Ability support (Since 5.5) */
MC_SUBSCRIPTION_TYPE_DISPLAY_MODE_ABILITY, /**< Display mode ability (Since 5.5) */
MC_SUBSCRIPTION_TYPE_DISPLAY_ROTATION_ABILITY, /**< Display rotation ability (Since 5.5) */
Name: capi-media-controller
Summary: A media controller library in Tizen Native API
-Version: 0.2.42
+Version: 0.2.43
Release: 1
Group: Multimedia/API
License: Apache-2.0
static void __client_cmd_reply_received_cb(const char *interface_name, const char *signal_name, const char *message, const char *request_id, void *user_data);
static void __client_custom_event_received_cb(const char *interface_name, const char *signal_name, const char *message, const char *request_id, void *user_data);
static void __client_playback_ability_cb(const char *interface_name, const char *signal_name, const char *message, const char *request_id, void *user_data);
-static void __client_ability_cb(const char *interface_name, const char *signal_name, const char *message, const char *request_id, void *user_data);
static void __client_ability_support_cb(const char *interface_name, const char *signal_name, const char *message, const char *request_id, void *user_data);
static void __client_display_mode_ability_cb(const char *interface_name, const char *signal_name, const char *message, const char *request_id, void *user_data);
static void __client_display_rotation_ability_cb(const char *interface_name, const char *signal_name, const char *message, const char *request_id, void *user_data);
{MC_DBUS_SIGNAL_NAME_PLAYBACK_REPEAT, __client_repeat_cb},
{MC_DBUS_SIGNAL_NAME_PLAYLIST, __client_playlist_cb},
{MC_DBUS_SIGNAL_NAME_PLAYBACK_ABILITY, __client_playback_ability_cb},
- {MC_DBUS_SIGNAL_NAME_SHUFFLE_ABILITY, __client_ability_cb},
- {MC_DBUS_SIGNAL_NAME_REPEAT_ABILITY, __client_ability_cb},
{MC_DBUS_SIGNAL_NAME_ABILITY_SUPPORT, __client_ability_support_cb},
{MC_DBUS_SIGNAL_NAME_DP_MODE_ABILITY, __client_display_mode_ability_cb},
{MC_DBUS_SIGNAL_NAME_DP_ROTATION_ABILITY, __client_display_rotation_ability_cb},
mc_playback_ability_destroy(ability);
}
-static void __client_ability_cb(const char *interface_name, const char *signal_name, const char *message, const char *request_id, void *user_data)
-{
- gchar **params = NULL;
- media_controller_receiver_s *receiver = (media_controller_receiver_s *)user_data;
- mc_retm_if_failed(receiver && receiver->callback);
-
- mc_shuffle_ability_updated_cb callback = (mc_shuffle_ability_updated_cb)receiver->callback;
-
- mc_secure_debug("__client_ability_cb(%s, %s, %s, %s, %p)", interface_name, signal_name, message, request_id, user_data);
-
- params = g_strsplit(message, MC_STRING_DELIMITER, 0);
- mc_retm_if_failed(params);
-
- callback(params[0], (mc_ability_support_e)atoi(params[1]), receiver->user_data);
-
- g_strfreev(params);
-}
-
static void __client_ability_support_cb(const char *interface_name, const char *signal_name, const char *message, const char *request_id, void *user_data)
{
gchar **params = NULL;
return __mc_client_unset_updated_cb(client, MC_CLIENT_EVENT_PLAYBACK_ABILITY);
}
-int mc_client_set_shuffle_ability_updated_cb(mc_client_h client, mc_shuffle_ability_updated_cb callback, void *user_data)
-{
- mc_warning("DEPRECATION WARNING: mc_client_set_shuffle_ability_updated_cb() is deprecated and will be removed from next release. Use mc_client_set_ability_support_updated_cb() instead.");
-
- return __mc_client_set_updated_cb(client, MC_CLIENT_EVENT_SHUFFLE_ABILITY, callback, user_data);
-}
-
-int mc_client_unset_shuffle_ability_updated_cb(mc_client_h client)
-{
- mc_warning("DEPRECATION WARNING: mc_client_unset_shuffle_ability_updated_cb() is deprecated and will be removed from next release. Use mc_client_unset_ability_support_updated_cb() instead.");
-
- return __mc_client_unset_updated_cb(client, MC_CLIENT_EVENT_SHUFFLE_ABILITY);
-}
-
-int mc_client_set_repeat_ability_updated_cb(mc_client_h client, mc_repeat_ability_updated_cb callback, void *user_data)
-{
- mc_warning("DEPRECATION WARNING: mc_client_set_repeat_ability_updated_cb() is deprecated and will be removed from next release. Use mc_client_set_ability_support_updated_cb() instead.");
-
- return __mc_client_set_updated_cb(client, MC_CLIENT_EVENT_REPEAT_ABILITY, callback, user_data);
-}
-
-int mc_client_unset_repeat_ability_updated_cb(mc_client_h client)
-{
- mc_warning("DEPRECATION WARNING: mc_client_unset_repeat_ability_updated_cb() is deprecated and will be removed from next release. Use mc_client_unset_ability_support_updated_cb() instead.");
-
- return __mc_client_unset_updated_cb(client, MC_CLIENT_EVENT_REPEAT_ABILITY);
-}
-
int mc_client_set_ability_support_updated_cb(mc_client_h client, mc_ability_support_updated_cb callback, void *user_data)
{
return __mc_client_set_updated_cb(client, MC_CLIENT_EVENT_ABILITY_SUPPORT, callback, user_data);
return MEDIA_CONTROLLER_ERROR_NONE;
}
-int mc_client_get_playlist_item_index(mc_playback_h playback, char **index)
-{
- media_controller_playback_s *mc_playback = (media_controller_playback_s *)playback;
-
- mc_warning("DEPRECATION WARNING: mc_client_get_playlist_item_index() is deprecated and will be removed from next release. Use mc_client_get_playlist_item_info() instead.");
-
- mc_retvm_if(mc_playback == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Handle is NULL");
- mc_retvm_if(index == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "index is NULL");
-
- *index = g_strdup(mc_playback->index);
-
- return MEDIA_CONTROLLER_ERROR_NONE;
-}
-
int mc_client_get_playlist_item_info(mc_playback_h playback, char **playlist_name, char **index)
{
media_controller_playback_s *mc_playback = (media_controller_playback_s *)playback;
return _mc_db_get_display_rotation(mc_client->db_handle, server_name, rotation);
}
-int mc_client_foreach_server_playlist(mc_client_h client, const char *server_name, mc_playlist_cb callback, void *user_data)
-{
- 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");
-
- ret = _mc_db_get_foreach_playlist(mc_client->db_handle, server_name, callback, user_data);
-
- return ret;
-}
-
int mc_client_foreach_server(mc_client_h client, mc_activated_server_cb callback, void *user_data)
{
int ret = MEDIA_CONTROLLER_ERROR_NONE;
return _mc_db_get_ability_supported(mc_client->db_handle, server_name, ability, support);
}
-int mc_client_get_server_shuffle_ability_support(mc_client_h client, const char *server_name, mc_ability_support_e *support)
-{
- mc_warning("DEPRECATION WARNING: mc_client_get_server_shuffle_ability_support() is removed from 5.5. Use mc_client_get_server_ability_support() instead.");
-
- return __mc_client_get_server_ability(client, server_name, MC_ABILITY_SHUFFLE, support);
-}
-
-int mc_client_get_server_repeat_ability_support(mc_client_h client, const char *server_name, mc_ability_support_e *support)
-{
- mc_warning("DEPRECATION WARNING: mc_client_get_server_repeat_ability_support() is removed from 5.5. Use mc_client_get_server_ability_support() instead.");
-
- return __mc_client_get_server_ability(client, server_name, MC_ABILITY_REPEAT, support);
-}
-
int mc_client_get_server_ability_support(mc_client_h client, const char *server_name, mc_ability_e ability, mc_ability_support_e *support)
{
return __mc_client_get_server_ability(client, server_name, ability, support);
return MEDIA_CONTROLLER_ERROR_NONE;
}
-int mc_server_set_playlist_item_index(mc_server_h server, const char *index)
-{
- media_controller_server_s *mc_server = (media_controller_server_s *)server;
-
- mc_warning("DEPRECATION WARNING: mc_server_set_playlist_item_index() is deprecated and will be removed from next release. Use mc_server_set_playlist_item_info() instead.");
-
- mc_retvm_if(mc_server == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Handle is NULL");
- mc_retvm_if(!MC_STRING_VALID(index), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid index");
-
- mc_debug("index update [%s]", index);
-
- g_free(mc_server->playback.index);
-
- mc_server->playback.index = g_strdup(index);
-
- return MEDIA_CONTROLLER_ERROR_NONE;
-}
-
int mc_server_set_playlist_item_info(mc_server_h server, const char *playlist_name, const char *index)
{
media_controller_server_s *mc_server = (media_controller_server_s *)server;
return ret;
}
-int mc_server_foreach_playlist(mc_server_h server, mc_playlist_cb callback, void *user_data)
-{
- 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");
-
- return _mc_db_get_foreach_playlist(mc_server->db_handle, mc_server->server_name, callback, user_data);
-}
-
static int __mc_server_set_ability(mc_server_h server, mc_ability_e ability, mc_ability_support_e support)
{
int ret = MEDIA_CONTROLLER_ERROR_NONE;
ret = __mc_server_send_message(mc_server, MC_DBUS_UPDATE_INTERFACE, MC_DBUS_SIGNAL_NAME_ABILITY_SUPPORT, ability, support, NULL);
mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE, ret, "fail to __mc_server_send_message");
- /*To Support Deprecated ability for shuffle and repeat*/
- if (ability == MC_ABILITY_SHUFFLE) {
- ret = __mc_server_send_message(mc_server, MC_DBUS_UPDATE_INTERFACE, MC_DBUS_SIGNAL_NAME_SHUFFLE_ABILITY, support, 0, NULL);
- mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE, ret, "fail to __mc_server_send_message");
- } else if (ability == MC_ABILITY_REPEAT) {
- ret = __mc_server_send_message(mc_server, MC_DBUS_UPDATE_INTERFACE, MC_DBUS_SIGNAL_NAME_REPEAT_ABILITY, support, 0, NULL);
- mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE, ret, "fail to __mc_server_send_message");
- }
-
return ret;
}
return ret;
}
-int mc_server_set_shuffle_ability(mc_server_h server, mc_ability_support_e support)
-{
- mc_warning("DEPRECATION WARNING: mc_server_set_shuffle_ability() is removed from 5.5. Use mc_server_set_ability_support() instead.");
- return __mc_server_set_ability(server, MC_ABILITY_SHUFFLE, support);
-}
-
-int mc_server_set_repeat_ability(mc_server_h server, mc_ability_support_e support)
-{
- mc_warning("DEPRECATION WARNING: mc_server_set_repeat_ability() is removed from 5.5. Use mc_server_set_ability_support() instead.");
- return __mc_server_set_ability(server, MC_ABILITY_REPEAT, support);
-}
-
int mc_server_set_ability_support(mc_server_h server, mc_ability_e ability, mc_ability_support_e support)
{
return __mc_server_set_ability(server, ability, support);
}
}
-static void __mc_shuffle_ability_updated_cb(const char *server_name, mc_ability_support_e support, void *user_data)
-{
- media_controller_client_s *_client = (media_controller_client_s *)g_mc_client;
- mc_debug("[Client:%s] shuffle_ability(%d) updated from server[%s]", _client->client_name, support, server_name);
-}
-
-static void __mc_repeat_ability_updated_cb(const char *server_name, mc_ability_support_e support, void *user_data)
-{
- media_controller_client_s *_client = (media_controller_client_s *)g_mc_client;
- mc_debug("[Client:%s] repeat_ability(%d) updated from server[%s]", _client->client_name, support, server_name);
-}
-
static void __mc_ability_updated_cb(const char *server_name, mc_ability_e ability, mc_ability_support_e support, void *user_data)
{
media_controller_client_s *_client = (media_controller_client_s *)g_mc_client;
ret = mc_client_set_playback_ability_updated_cb(g_mc_client, __mc_playback_ability_updated_cb, NULL);
mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE, FALSE, "Fail to mc_client_set_playback_ability_updated_cb [%d]", ret);
- ret = mc_client_set_shuffle_ability_updated_cb(g_mc_client, __mc_shuffle_ability_updated_cb, NULL);
- mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE, FALSE, "Fail to mc_client_set_shuffle_ability_updated_cb [%d]", ret);
-
- ret = mc_client_set_repeat_ability_updated_cb(g_mc_client, __mc_repeat_ability_updated_cb, NULL);
- mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE, FALSE, "Fail to mc_client_set_repeat_ability_updated_cb [%d]", ret);
-
ret = mc_client_set_ability_support_updated_cb(g_mc_client, __mc_ability_updated_cb, NULL);
mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE, FALSE, "Fail to mc_client_set_ability_support_updated_cb [%d]", ret);
g_print("Fail to set playlist info");
return FALSE;
}
-
- ret = mc_server_set_playlist_item_index(g_mc_server, cmd);
- if (ret != MEDIA_CONTROLLER_ERROR_NONE) {
- g_print("Fail to set playlist info");
- return FALSE;
- }
-
g_print("set playlist item id: %s", cmd);
break;