mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 22:20:37 +00:00
avdtp: provide avdtp_get_connections
This commit is contained in:
parent
87d9d50861
commit
62c4ec8271
@ -287,6 +287,10 @@ btstack_linked_list_t * avdtp_get_stream_endpoints(void){
|
||||
return &stream_endpoints;
|
||||
}
|
||||
|
||||
btstack_linked_list_t * avdtp_get_connections(void){
|
||||
return &connections;
|
||||
}
|
||||
|
||||
static avdtp_connection_t * avdtp_get_connection_for_bd_addr(bd_addr_t addr){
|
||||
btstack_linked_list_iterator_t it;
|
||||
btstack_linked_list_iterator_init(&it, &connections);
|
||||
@ -406,6 +410,9 @@ static avdtp_connection_t * avdtp_create_connection(bd_addr_t remote_addr, uint1
|
||||
connection->state = AVDTP_SIGNALING_CONNECTION_IDLE;
|
||||
connection->initiator_transaction_label = avdtp_get_next_initiator_transaction_label();
|
||||
connection->configuration_state = AVDTP_CONFIGURATION_STATE_IDLE;
|
||||
connection->a2dp_source_state = A2DP_IDLE;
|
||||
connection->a2dp_source_discover_seps = false;
|
||||
connection->a2dp_sink_state = A2DP_IDLE;
|
||||
connection->avdtp_cid = cid;
|
||||
(void)memcpy(connection->remote_addr, remote_addr, 6);
|
||||
|
||||
|
@ -436,9 +436,6 @@ typedef struct {
|
||||
avdtp_acceptor_connection_state_t acceptor_connection_state;
|
||||
avdtp_initiator_connection_state_t initiator_connection_state;
|
||||
|
||||
a2dp_state_t a2dp_source_state;
|
||||
a2dp_state_t a2dp_sink_state;
|
||||
|
||||
// used to reassemble fragmented commands
|
||||
avdtp_signaling_packet_t acceptor_signaling_packet;
|
||||
|
||||
@ -473,6 +470,12 @@ typedef struct {
|
||||
|
||||
bool incoming_declined;
|
||||
btstack_timer_source_t retry_timer;
|
||||
|
||||
a2dp_state_t a2dp_source_state;
|
||||
bool a2dp_source_discover_seps;
|
||||
|
||||
a2dp_state_t a2dp_sink_state;
|
||||
|
||||
} avdtp_connection_t;
|
||||
|
||||
|
||||
@ -551,6 +554,7 @@ typedef struct {
|
||||
void avdtp_init(void);
|
||||
avdtp_connection_t * avdtp_get_connection_for_avdtp_cid(uint16_t avdtp_cid);
|
||||
avdtp_connection_t * avdtp_get_connection_for_l2cap_signaling_cid(uint16_t l2cap_cid);
|
||||
btstack_linked_list_t * avdtp_get_connections(void);
|
||||
btstack_linked_list_t * avdtp_get_stream_endpoints(void);
|
||||
|
||||
avdtp_stream_endpoint_t * avdtp_get_stream_endpoint_for_seid(uint16_t seid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user