Tizen Native API
4.0
|
Bluetooth AVRCP(Audio/Video Remote Control Profile) Control API provides functions for controlling the remote device.
#include <bluetooth.h>
This API supports the Controller role in the AVRCP spec. In a "walkman" type media player scenario, the Control device may be a headset that allows tracks to be skipped and the Target device would be the actual medial player.
This API is related with the following features:
It is recommended to create application with regard to features, to increase reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
To ensure your application is only running on a device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature Element.
Functions | |
int | bt_avrcp_control_initialize (bt_avrcp_control_connection_state_changed_cb callback, void *user_data) |
Initializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) controller service. | |
int | bt_avrcp_control_deinitialize (void) |
Deinitializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) controller service. | |
int | bt_avrcp_control_connect (const char *remote_address) |
Connects the AVRCP (Audio/Video Remote Control Profile) target device. | |
int | bt_avrcp_control_disconnect (const char *remote_address) |
Disconnects from the AVRCP (Audio/Video Remote Control Profile) target device. | |
int | bt_avrcp_control_send_player_command (bt_avrcp_player_command_e cmd) |
Sends a command to the target device. | |
int | bt_avrcp_control_set_equalizer_state (bt_avrcp_equalizer_state_e state) |
Sends the equalizer state change request to the remote device. | |
int | bt_avrcp_control_get_equalizer_state (bt_avrcp_equalizer_state_e *state) |
Gets the the equalizer state of the remote device. | |
int | bt_avrcp_control_set_repeat_mode (bt_avrcp_repeat_mode_e mode) |
Sends the repeat change request to the remote device. | |
int | bt_avrcp_control_get_repeat_mode (bt_avrcp_repeat_mode_e *mode) |
Gets the repeat state of the remote device. | |
int | bt_avrcp_control_set_shuffle_mode (bt_avrcp_shuffle_mode_e mode) |
Sends the shuffle mode change request to the remote device. | |
int | bt_avrcp_control_get_shuffle_mode (bt_avrcp_shuffle_mode_e *mode) |
Gets the shuffle mode of the remote device. | |
int | bt_avrcp_control_set_scan_mode (bt_avrcp_scan_mode_e mode) |
Sends the scan mode change request to the remote device. | |
int | bt_avrcp_control_get_scan_mode (bt_avrcp_scan_mode_e *mode) |
Gets the scan mode of the remote device. | |
int | bt_avrcp_control_get_position (unsigned int *position) |
Gets the position of the song played by the remote device. | |
int | bt_avrcp_control_get_play_status (bt_avrcp_player_state_e *status) |
Gets the play status of the remote device. | |
int | bt_avrcp_control_get_track_info (bt_avrcp_metadata_attributes_info_s **track) |
Gets the metadata of the track played by the remote device. | |
int | bt_avrcp_control_free_track_info (bt_avrcp_metadata_attributes_info_s *track) |
Frees the track metadata. |
int bt_avrcp_control_connect | ( | const char * | remote_address | ) |
Connects the AVRCP (Audio/Video Remote Control Profile) target device.
[in] | remote_address | The remote address |
BT_ERROR_NONE | Successful |
BT_ERROR_NOT_INITIALIZED | Not initialized |
BT_ERROR_NOT_SUPPORTED | Not supported |
int bt_avrcp_control_deinitialize | ( | void | ) |
Deinitializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) controller service.
BT_ERROR_NONE | Successful |
BT_ERROR_NOT_INITIALIZED | Not initialized |
BT_ERROR_NOT_SUPPORTED | Not supported |
int bt_avrcp_control_disconnect | ( | const char * | remote_address | ) |
Disconnects from the AVRCP (Audio/Video Remote Control Profile) target device.
[in] | remote_address | The remote address |
BT_ERROR_NONE | Successful |
BT_ERROR_NOT_INITIALIZED | Not initialized |
BT_ERROR_NOT_SUPPORTED | Not supported |
Frees the track metadata.
[in] | track | The track metadata. |
BT_ERROR_NONE | Successful |
BT_ERROR_NOT_INITIALIZED | Not initialized |
BT_ERROR_INVALID_PARAMETER | Invalid parameter |
BT_ERROR_NOT_SUPPORTED | Not supported |
int bt_avrcp_control_get_equalizer_state | ( | bt_avrcp_equalizer_state_e * | state | ) |
Gets the the equalizer state of the remote device.
[out] | state | The equalizer state, one of: ON, OFF |
BT_ERROR_NONE | Successful |
BT_ERROR_NOT_INITIALIZED | Not initialized |
BT_ERROR_INVALID_PARAMETER | Invalid parameter |
BT_ERROR_NOT_ENABLED | Not enabled |
BT_ERROR_OPERATION_FAILED | Operation failed |
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED | Remote device is not connected |
BT_ERROR_NOT_SUPPORTED | Not supported |
int bt_avrcp_control_get_play_status | ( | bt_avrcp_player_state_e * | status | ) |
Gets the play status of the remote device.
[out] | status | The play status, one of: PLAYING, STOPPED... |
BT_ERROR_NONE | Successful |
BT_ERROR_NOT_INITIALIZED | Not initialized |
BT_ERROR_INVALID_PARAMETER | Invalid parameter |
BT_ERROR_NOT_ENABLED | Not enabled |
BT_ERROR_OPERATION_FAILED | Operation failed |
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED | Remote device is not connected |
BT_ERROR_NOT_SUPPORTED | Not supported |
int bt_avrcp_control_get_position | ( | unsigned int * | position | ) |
Gets the position of the song played by the remote device.
[out] | position | The position, in milliseconds |
BT_ERROR_NONE | Successful |
BT_ERROR_NOT_INITIALIZED | Not initialized |
BT_ERROR_INVALID_PARAMETER | Invalid parameter |
BT_ERROR_NOT_ENABLED | Not enabled |
BT_ERROR_OPERATION_FAILED | Operation failed |
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED | Remote device is not connected |
BT_ERROR_NOT_SUPPORTED | Not supported |
int bt_avrcp_control_get_repeat_mode | ( | bt_avrcp_repeat_mode_e * | mode | ) |
Gets the repeat state of the remote device.
[out] | mode | The repeat mode, one of: OFF, SINGLE, ALL |
BT_ERROR_NONE | Successful |
BT_ERROR_NOT_INITIALIZED | Not initialized |
BT_ERROR_INVALID_PARAMETER | Invalid parameter |
BT_ERROR_NOT_ENABLED | Not enabled |
BT_ERROR_OPERATION_FAILED | Operation failed |
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED | Remote device is not connected |
BT_ERROR_NOT_SUPPORTED | Not supported |
int bt_avrcp_control_get_scan_mode | ( | bt_avrcp_scan_mode_e * | mode | ) |
Gets the scan mode of the remote device.
[out] | mode | The scan mode, one of: OFF, GROUP, ALL |
BT_ERROR_NONE | Successful |
BT_ERROR_NOT_INITIALIZED | Not initialized |
BT_ERROR_INVALID_PARAMETER | Invalid parameter |
BT_ERROR_NOT_ENABLED | Not enabled |
BT_ERROR_OPERATION_FAILED | Operation failed |
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED | Remote device is not connected |
BT_ERROR_NOT_SUPPORTED | Not supported |
int bt_avrcp_control_get_shuffle_mode | ( | bt_avrcp_shuffle_mode_e * | mode | ) |
Gets the shuffle mode of the remote device.
[out] | mode | The shuffle mode, one of: OFF, GROUP, ALL |
BT_ERROR_NONE | Successful |
BT_ERROR_NOT_INITIALIZED | Not initialized |
BT_ERROR_INVALID_PARAMETER | Invalid parameter |
BT_ERROR_NOT_ENABLED | Not enabled |
BT_ERROR_OPERATION_FAILED | Operation failed |
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED | Remote device is not connected |
BT_ERROR_NOT_SUPPORTED | Not supported |
int bt_avrcp_control_get_track_info | ( | bt_avrcp_metadata_attributes_info_s ** | track | ) |
Gets the metadata of the track played by the remote device.
[out] | track | The track metadata. |
BT_ERROR_NONE | Successful |
BT_ERROR_NOT_INITIALIZED | Not initialized |
BT_ERROR_INVALID_PARAMETER | Invalid parameter |
BT_ERROR_NOT_ENABLED | Not enabled |
BT_ERROR_OPERATION_FAILED | Operation failed |
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED | Remote device is not connected |
BT_ERROR_NOT_SUPPORTED | Not supported |
int bt_avrcp_control_initialize | ( | bt_avrcp_control_connection_state_changed_cb | callback, |
void * | user_data | ||
) |
Initializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) controller service.
[in] | callback | The callback function called when the connection state is changed |
[in] | user_data | The user data to be passed to the callback function |
BT_ERROR_NONE | Successful |
BT_ERROR_NOT_INITIALIZED | Not initialized |
BT_ERROR_INVALID_PARAMETER | Invalid parameter |
BT_ERROR_OPERATION_FAILED | Operation failed |
BT_ERROR_NOT_SUPPORTED | Not supported |
Sends a command to the target device.
[in] | cmd | The commands, one of: Play, Pause, Next, Rewind. |
BT_ERROR_NONE | Successful |
BT_ERROR_NOT_INITIALIZED | Not initialized |
BT_ERROR_INVALID_PARAMETER | Invalid parameter |
BT_ERROR_NOT_ENABLED | Not enabled |
BT_ERROR_OPERATION_FAILED | Operation failed |
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED | Remote device is not connected |
BT_ERROR_PERMISSION_DENIED | Permission denied |
BT_ERROR_NOT_SUPPORTED | Not supported |
Sends the equalizer state change request to the remote device.
[in] | state | The new equalizer state, one of: ON, OFF |
BT_ERROR_NONE | Successful |
BT_ERROR_NOT_INITIALIZED | Not initialized |
BT_ERROR_INVALID_PARAMETER | Invalid parameter |
BT_ERROR_NOT_ENABLED | Not enabled |
BT_ERROR_OPERATION_FAILED | Operation failed |
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED | Remote device is not connected |
BT_ERROR_PERMISSION_DENIED | Permission denied |
BT_ERROR_NOT_SUPPORTED | Not supported |
Sends the repeat change request to the remote device.
[in] | mode | The new repeat mode, one of: OFF, SINGLE, ALL |
BT_ERROR_NONE | Successful |
BT_ERROR_NOT_INITIALIZED | Not initialized |
BT_ERROR_INVALID_PARAMETER | Invalid parameter |
BT_ERROR_NOT_ENABLED | Not enabled |
BT_ERROR_OPERATION_FAILED | Operation failed |
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED | Remote device is not connected |
BT_ERROR_PERMISSION_DENIED | Permission denied |
BT_ERROR_NOT_SUPPORTED | Not supported |
int bt_avrcp_control_set_scan_mode | ( | bt_avrcp_scan_mode_e | mode | ) |
Sends the scan mode change request to the remote device.
[in] | mode | The new scan mode, one of: OFF, GROUP, ALL |
BT_ERROR_NONE | Successful |
BT_ERROR_NOT_INITIALIZED | Not initialized |
BT_ERROR_INVALID_PARAMETER | Invalid parameter |
BT_ERROR_NOT_ENABLED | Not enabled |
BT_ERROR_OPERATION_FAILED | Operation failed |
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED | Remote device is not connected |
BT_ERROR_PERMISSION_DENIED | Permission denied |
BT_ERROR_NOT_SUPPORTED | Not supported |
Sends the shuffle mode change request to the remote device.
[in] | mode | The new shuffle mode, one of: OFF, GROUP, ALL |
BT_ERROR_NONE | Successful |
BT_ERROR_NOT_INITIALIZED | Not initialized |
BT_ERROR_INVALID_PARAMETER | Invalid parameter |
BT_ERROR_NOT_ENABLED | Not enabled |
BT_ERROR_OPERATION_FAILED | Operation failed |
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED | Remote device is not connected |
BT_ERROR_PERMISSION_DENIED | Permission denied |
BT_ERROR_NOT_SUPPORTED | Not supported |