From ab868ce4b7833352647d570ee16c2cec849d1f36 Mon Sep 17 00:00:00 2001 From: Gaurav Asati Date: Fri, 17 Jul 2015 15:13:33 +0530 Subject: Bluetooth: Check A2dp device priority For incoming connections stack does not check priority of device.Add support to check priority of device in stack for incoming connection. Change-Id: I746e8831f5593afa3c88fa37737599ace77a1e2f --- include/hardware/bt_av.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/hardware/bt_av.h b/include/hardware/bt_av.h index 5252a17..fb68d07 100644 --- a/include/hardware/bt_av.h +++ b/include/hardware/bt_av.h @@ -47,6 +47,11 @@ typedef void (* btav_connection_state_callback)(btav_connection_state_t state, typedef void (* btav_audio_state_callback)(btav_audio_state_t state, bt_bdaddr_t *bd_addr); +/** Callback for connection priority of device for incoming connection + * btav_connection_priority_t + */ +typedef void (* btav_connection_priority_callback)(bt_bdaddr_t *bd_addr); + /** Callback for audio configuration change. * Used only for the A2DP sink interface. * state will have one of the values from btav_audio_state_t @@ -64,6 +69,7 @@ typedef struct { btav_connection_state_callback connection_state_cb; btav_audio_state_callback audio_state_cb; btav_audio_config_callback audio_config_cb; + btav_connection_priority_callback connection_priority_cb; } btav_callbacks_t; /** @@ -96,6 +102,9 @@ typedef struct { /** Closes the interface. */ void (*cleanup)( void ); + + /** Send priority of device to stack*/ + void (*allowConnection)( int is_valid ); } btav_interface_t; __END_DECLS -- cgit v1.1