Loading system/bta/dm/bta_dm_api.c +16 −0 Original line number Diff line number Diff line Loading @@ -1091,6 +1091,22 @@ BOOLEAN BTA_DmUseSsr( BD_ADDR bd_addr ) return use_ssr; } /******************************************************************************* ** ** Function BTA_DmGetConnectionState ** ** Description Returns whether the remote device is currently connected. ** ** Returns 0 if the device is NOT connected. ** *******************************************************************************/ UINT16 BTA_DmGetConnectionState( BD_ADDR bd_addr ) { tBTA_DM_PEER_DEVICE * p_dev = bta_dm_find_peer_device(bd_addr); return (p_dev && p_dev->conn_state == BTA_DM_CONNECTED); } /******************************************************************************* ** Device Identification (DI) Server Functions *******************************************************************************/ Loading system/bta/include/bta_api.h +11 −0 Original line number Diff line number Diff line Loading @@ -1634,6 +1634,17 @@ BTA_API extern void BTA_GetEirService( UINT8 *p_eir, tBTA_SERVICE_MASK *p_servic *******************************************************************************/ BTA_API extern BOOLEAN BTA_DmUseSsr( BD_ADDR bd_addr ); /******************************************************************************* ** ** Function BTA_DmGetConnectionState ** ** Description Returns whether the remote device is currently connected. ** ** Returns 0 if the device is NOT connected. ** *******************************************************************************/ BTA_API extern UINT16 BTA_DmGetConnectionState( BD_ADDR bd_addr ); /******************************************************************************* ** Loading system/btif/include/btif_api.h +11 −0 Original line number Diff line number Diff line Loading @@ -230,6 +230,17 @@ bt_status_t btif_dm_cancel_bond(const bt_bdaddr_t *bd_addr); *******************************************************************************/ bt_status_t btif_dm_remove_bond(const bt_bdaddr_t *bd_addr); /******************************************************************************* ** ** Function btif_dm_get_connection_state ** ** Description Returns whether the remote device is currently connected ** ** Returns 0 if not connected ** *******************************************************************************/ uint16_t btif_dm_get_connection_state(const bt_bdaddr_t *bd_addr); /******************************************************************************* ** ** Function btif_dm_pin_reply Loading system/btif/src/bluetooth.c +10 −0 Original line number Diff line number Diff line Loading @@ -289,6 +289,15 @@ static int remove_bond(const bt_bdaddr_t *bd_addr) return btif_dm_remove_bond(bd_addr); } static int get_connection_state(const bt_bdaddr_t *bd_addr) { /* sanity check */ if (interface_ready() == FALSE) return 0; return btif_dm_get_connection_state(bd_addr); } static int pin_reply(const bt_bdaddr_t *bd_addr, uint8_t accept, uint8_t pin_len, bt_pin_code_t *pin_code) { Loading Loading @@ -426,6 +435,7 @@ static const bt_interface_t bluetoothInterface = { create_bond, remove_bond, cancel_bond, get_connection_state, pin_reply, ssp_reply, get_profile_interface, Loading system/btif/src/btif_dm.c +14 −0 Original line number Diff line number Diff line Loading @@ -552,6 +552,20 @@ void btif_dm_cb_remove_bond(bt_bdaddr_t *bd_addr) } } /******************************************************************************* ** ** Function btif_dm_get_connection_state ** ** Description Returns whether the remote device is currently connected ** ** Returns 0 if not connected ** *******************************************************************************/ uint16_t btif_dm_get_connection_state(const bt_bdaddr_t *bd_addr) { return BTA_DmGetConnectionState((UINT8 *)bd_addr->address); } /******************************************************************************* ** ** Function search_devices_copy_cb Loading Loading
system/bta/dm/bta_dm_api.c +16 −0 Original line number Diff line number Diff line Loading @@ -1091,6 +1091,22 @@ BOOLEAN BTA_DmUseSsr( BD_ADDR bd_addr ) return use_ssr; } /******************************************************************************* ** ** Function BTA_DmGetConnectionState ** ** Description Returns whether the remote device is currently connected. ** ** Returns 0 if the device is NOT connected. ** *******************************************************************************/ UINT16 BTA_DmGetConnectionState( BD_ADDR bd_addr ) { tBTA_DM_PEER_DEVICE * p_dev = bta_dm_find_peer_device(bd_addr); return (p_dev && p_dev->conn_state == BTA_DM_CONNECTED); } /******************************************************************************* ** Device Identification (DI) Server Functions *******************************************************************************/ Loading
system/bta/include/bta_api.h +11 −0 Original line number Diff line number Diff line Loading @@ -1634,6 +1634,17 @@ BTA_API extern void BTA_GetEirService( UINT8 *p_eir, tBTA_SERVICE_MASK *p_servic *******************************************************************************/ BTA_API extern BOOLEAN BTA_DmUseSsr( BD_ADDR bd_addr ); /******************************************************************************* ** ** Function BTA_DmGetConnectionState ** ** Description Returns whether the remote device is currently connected. ** ** Returns 0 if the device is NOT connected. ** *******************************************************************************/ BTA_API extern UINT16 BTA_DmGetConnectionState( BD_ADDR bd_addr ); /******************************************************************************* ** Loading
system/btif/include/btif_api.h +11 −0 Original line number Diff line number Diff line Loading @@ -230,6 +230,17 @@ bt_status_t btif_dm_cancel_bond(const bt_bdaddr_t *bd_addr); *******************************************************************************/ bt_status_t btif_dm_remove_bond(const bt_bdaddr_t *bd_addr); /******************************************************************************* ** ** Function btif_dm_get_connection_state ** ** Description Returns whether the remote device is currently connected ** ** Returns 0 if not connected ** *******************************************************************************/ uint16_t btif_dm_get_connection_state(const bt_bdaddr_t *bd_addr); /******************************************************************************* ** ** Function btif_dm_pin_reply Loading
system/btif/src/bluetooth.c +10 −0 Original line number Diff line number Diff line Loading @@ -289,6 +289,15 @@ static int remove_bond(const bt_bdaddr_t *bd_addr) return btif_dm_remove_bond(bd_addr); } static int get_connection_state(const bt_bdaddr_t *bd_addr) { /* sanity check */ if (interface_ready() == FALSE) return 0; return btif_dm_get_connection_state(bd_addr); } static int pin_reply(const bt_bdaddr_t *bd_addr, uint8_t accept, uint8_t pin_len, bt_pin_code_t *pin_code) { Loading Loading @@ -426,6 +435,7 @@ static const bt_interface_t bluetoothInterface = { create_bond, remove_bond, cancel_bond, get_connection_state, pin_reply, ssp_reply, get_profile_interface, Loading
system/btif/src/btif_dm.c +14 −0 Original line number Diff line number Diff line Loading @@ -552,6 +552,20 @@ void btif_dm_cb_remove_bond(bt_bdaddr_t *bd_addr) } } /******************************************************************************* ** ** Function btif_dm_get_connection_state ** ** Description Returns whether the remote device is currently connected ** ** Returns 0 if not connected ** *******************************************************************************/ uint16_t btif_dm_get_connection_state(const bt_bdaddr_t *bd_addr) { return BTA_DmGetConnectionState((UINT8 *)bd_addr->address); } /******************************************************************************* ** ** Function search_devices_copy_cb Loading