*/
int bt_avrcp_control_send_delay_report(unsigned int value);
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Registers a callback function that will be invoked when the delay is changed.
+ * @since_tizen 5.0
+ * @param[in] callback The callback function to register
+ * @param[in] user_data The user data to be passed to the callback function
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
+ * @retval #BT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
+ * @see bt_avrcp_target_initialize()
+ * @see bt_avrcp_control_initialize()
+ */
+int bt_avrcp_set_delay_changed_cb(bt_avrcp_delay_changed_cb callback, void *user_data);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Unregisters a callback function that will be invoked when the delay is changed.
+ * @since_tizen 5.0
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED Not initialized
+ * @retval #BT_ERROR_NOT_SUPPORTED Not supported
+ *
+ * @pre The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
+ * @see bt_avrcp_target_initialize()
+ * @see bt_avrcp_control_initialize()
+ * @see bt_avrcp_set_delay_changed_cb()
+ */
+int bt_avrcp_unset_delay_changed_cb(void);
+
/**
* @ingroup CAPI_NETWORK_BLUETOOTH_PROXIMITY_MODULE
* @brief Creates the Proximity Profile Reporter Role.
BT_EVENT_AVRCP_PLAY_STATUS_CHANGED, /**< AVRCP scan mode change callback */
BT_EVENT_AVRCP_SONG_POSITION_CHANGED, /**< AVRCP scan mode change callback */
BT_EVENT_AVRCP_TRACK_INFO_CHANGED, /**< AVRCP scan mode change callback */
+ BT_EVENT_AVRCP_DELAY_CHANGED, /**< AVRCP scan mode change callback */
BT_EVENT_HID_CONNECTION_STATUS, /**< HID connection status callback */
BT_EVENT_HID_DEVICE_CONNECTION_STATUS, /**< HID Device connection status callback */
BT_EVENT_HID_DEVICE_DATA_RECEIVED, /**< HID Device Data received callback */
*/
typedef void (*bt_adapter_le_state_changed_cb)(int result, bt_adapter_le_state_e adapter_le_state, void *user_data);
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_AVRCP_MODULE
+ * @brief Called when the delay is changed by the remote device.
+ * @since_tizen 5.0
+ * @param[in] delay Streaming delay in milliseconds.
+ * @param[in] user_data The user data passed from the callback registration function
+ * @see bt_avrcp_set_delay_changed_cb()
+ * @see bt_avrcp_unset_delay_changed_cb()
+ */
+typedef void (*bt_avrcp_delay_changed_cb) (unsigned int delay, void *user_data);
+
/**
* @ingroup CAPI_NETWORK_BLUETOOTH_AUDIO_AG_MODULE
* @brief Enumerations for the call state
return BT_ERROR_NONE;
}
+int bt_avrcp_set_delay_changed_cb(bt_avrcp_delay_changed_cb callback, void *user_data)
+{
+ BT_CHECK_AVRCP_SUPPORT();
+ BT_CHECK_INIT_STATUS();
+ BT_CHECK_INPUT_PARAMETER(callback);
+ _bt_set_cb(BT_EVENT_AVRCP_DELAY_CHANGED, callback, user_data);
+ return BT_ERROR_NONE;
+}
+
+int bt_avrcp_unset_delay_changed_cb(void)
+{
+ BT_CHECK_AVRCP_SUPPORT();
+ BT_CHECK_INIT_STATUS();
+ _bt_unset_cb(BT_EVENT_AVRCP_DELAY_CHANGED);
+ return BT_ERROR_NONE;
+}
+
int bt_avrcp_set_play_status_changed_cb(bt_avrcp_play_status_changed_cb callback, void *user_data)
{
BT_CHECK_AVRCP_SUPPORT();
((bt_avrcp_position_changed_cb)bt_event_slot_container[event_index].callback)
(*postion, bt_event_slot_container[event_index].user_data);
break;
+ case BLUETOOTH_EVENT_AVRCP_DELAY_CHANGED:
+ BT_INFO("BLUETOOTH_EVENT_AVRCP_DELAY_CHANGED ");
+ unsigned int *delay = (unsigned int *)(param->param_data);
+ ((bt_avrcp_delay_changed_cb)bt_event_slot_container[event_index].callback)
+ (*delay, bt_event_slot_container[event_index].user_data);
+ break;
case BLUETOOTH_EVENT_AVRCP_TRACK_CHANGED:
BT_INFO("BLUETOOTH_EVENT_AVRCP_TRACK_CHANGED ");
bt_avrcp_metadata_attributes_info_s meta_info = {0, };
return BT_EVENT_AVRCP_PLAY_STATUS_CHANGED;
case BLUETOOTH_EVENT_AVRCP_TRACK_CHANGED:
return BT_EVENT_AVRCP_TRACK_INFO_CHANGED;
+ case BLUETOOTH_EVENT_AVRCP_DELAY_CHANGED:
+ return BT_EVENT_AVRCP_DELAY_CHANGED;
case BLUETOOTH_HID_CONNECTED:
return BT_EVENT_HID_CONNECTION_STATUS;
case BLUETOOTH_HID_DISCONNECTED: