mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-27 06:35:20 +00:00
avrcp browsing controller: rename functions
This commit is contained in:
parent
6d5d598a96
commit
c490eb5a45
@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
#define PSM_AVCTP_BROWSING 0x001b
|
#define PSM_AVCTP_BROWSING 0x001b
|
||||||
|
|
||||||
void avrcp_browser_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size, avrcp_context_t * context);
|
static void avrcp_browser_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size, avrcp_context_t * context);
|
||||||
static void avrcp_browsing_controller_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
|
static void avrcp_browsing_controller_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
|
||||||
|
|
||||||
static avrcp_connection_t * get_avrcp_connection_for_browsing_cid(uint16_t browsing_cid, avrcp_context_t * context){
|
static avrcp_connection_t * get_avrcp_connection_for_browsing_cid(uint16_t browsing_cid, avrcp_context_t * context){
|
||||||
@ -169,7 +169,7 @@ static uint8_t avrcp_browsing_connect(bd_addr_t remote_addr, avrcp_context_t * c
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void avrcp_browser_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size, avrcp_context_t * context){
|
static void avrcp_browser_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size, avrcp_context_t * context){
|
||||||
UNUSED(channel);
|
UNUSED(channel);
|
||||||
UNUSED(size);
|
UNUSED(size);
|
||||||
bd_addr_t event_addr;
|
bd_addr_t event_addr;
|
||||||
@ -748,19 +748,19 @@ uint8_t avrcp_browsing_controller_disconnect(uint16_t avrcp_browsing_cid){
|
|||||||
return ERROR_CODE_SUCCESS;
|
return ERROR_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t avrcp_avrcp_browsing_configure_incoming_connection(uint16_t avrcp_browsing_cid, uint8_t * ertm_buffer, uint32_t size, l2cap_ertm_config_t * ertm_config){
|
uint8_t avrcp_browsing_controller_configure_incoming_connection(uint16_t avrcp_browsing_cid, uint8_t * ertm_buffer, uint32_t size, l2cap_ertm_config_t * ertm_config){
|
||||||
avrcp_connection_t * avrcp_connection = get_avrcp_connection_for_browsing_cid(avrcp_browsing_cid, &avrcp_controller_context);
|
avrcp_connection_t * avrcp_connection = get_avrcp_connection_for_browsing_cid(avrcp_browsing_cid, &avrcp_controller_context);
|
||||||
if (!avrcp_connection){
|
if (!avrcp_connection){
|
||||||
log_error("avrcp_avrcp_browsing_decline_incoming_connection: could not find a connection.");
|
log_error("avrcp_browsing_controller_decline_incoming_connection: could not find a connection.");
|
||||||
return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER;
|
return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER;
|
||||||
}
|
}
|
||||||
if (!avrcp_connection->browsing_connection){
|
if (!avrcp_connection->browsing_connection){
|
||||||
log_error("avrcp_avrcp_browsing_decline_incoming_connection: no browsing connection.");
|
log_error("avrcp_browsing_controller_decline_incoming_connection: no browsing connection.");
|
||||||
return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER;
|
return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avrcp_connection->browsing_connection->state != AVCTP_CONNECTION_W4_ERTM_CONFIGURATION){
|
if (avrcp_connection->browsing_connection->state != AVCTP_CONNECTION_W4_ERTM_CONFIGURATION){
|
||||||
log_error("avrcp_avrcp_browsing_decline_incoming_connection: browsing connection in a wrong state.");
|
log_error("avrcp_browsing_controller_decline_incoming_connection: browsing connection in a wrong state.");
|
||||||
return ERROR_CODE_COMMAND_DISALLOWED;
|
return ERROR_CODE_COMMAND_DISALLOWED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -772,10 +772,10 @@ uint8_t avrcp_avrcp_browsing_configure_incoming_connection(uint16_t avrcp_browsi
|
|||||||
return ERROR_CODE_SUCCESS;
|
return ERROR_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t avrcp_avrcp_browsing_decline_incoming_connection(uint16_t avrcp_browsing_cid){
|
uint8_t avrcp_browsing_controller_decline_incoming_connection(uint16_t avrcp_browsing_cid){
|
||||||
avrcp_connection_t * avrcp_connection = get_avrcp_connection_for_browsing_cid(avrcp_browsing_cid, &avrcp_controller_context);
|
avrcp_connection_t * avrcp_connection = get_avrcp_connection_for_browsing_cid(avrcp_browsing_cid, &avrcp_controller_context);
|
||||||
if (!avrcp_connection){
|
if (!avrcp_connection){
|
||||||
log_error("avrcp_avrcp_browsing_decline_incoming_connection: could not find a connection.");
|
log_error("avrcp_browsing_controller_decline_incoming_connection: could not find a connection.");
|
||||||
return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER;
|
return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER;
|
||||||
}
|
}
|
||||||
if (!avrcp_connection->browsing_connection) return ERROR_CODE_SUCCESS;
|
if (!avrcp_connection->browsing_connection) return ERROR_CODE_SUCCESS;
|
||||||
|
@ -128,14 +128,14 @@ uint8_t avrcp_browsing_controller_connect(bd_addr_t bd_addr, uint8_t * ertm_buff
|
|||||||
* @param ertm_config
|
* @param ertm_config
|
||||||
* @returns status
|
* @returns status
|
||||||
*/
|
*/
|
||||||
uint8_t avrcp_avrcp_browsing_configure_incoming_connection(uint16_t avrcp_browsing_cid, uint8_t * ertm_buffer, uint32_t size, l2cap_ertm_config_t * ertm_config);
|
uint8_t avrcp_browsing_controller_configure_incoming_connection(uint16_t avrcp_browsing_cid, uint8_t * ertm_buffer, uint32_t size, l2cap_ertm_config_t * ertm_config);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Decline incoming connection.
|
* @brief Decline incoming connection.
|
||||||
* @param avrcp_browsing_cid
|
* @param avrcp_browsing_cid
|
||||||
* @returns status
|
* @returns status
|
||||||
*/
|
*/
|
||||||
uint8_t avrcp_avrcp_browsing_decline_incoming_connection(uint16_t avrcp_browsing_cid);
|
uint8_t avrcp_browsing_controller_decline_incoming_connection(uint16_t avrcp_browsing_cid);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -360,12 +360,12 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packe
|
|||||||
local_cid = avrcp_subevent_incoming_browsing_connection_get_browsing_cid(packet);
|
local_cid = avrcp_subevent_incoming_browsing_connection_get_browsing_cid(packet);
|
||||||
if (browsing_cid != 0 && browsing_cid != local_cid) {
|
if (browsing_cid != 0 && browsing_cid != local_cid) {
|
||||||
printf("AVRCP Browsing Client connection failed, expected 0x%02X l2cap cid, received 0x%02X\n", browsing_cid, local_cid);
|
printf("AVRCP Browsing Client connection failed, expected 0x%02X l2cap cid, received 0x%02X\n", browsing_cid, local_cid);
|
||||||
avrcp_avrcp_browsing_decline_incoming_connection(browsing_cid);
|
avrcp_browsing_controller_decline_incoming_connection(browsing_cid);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
browsing_cid = local_cid;
|
browsing_cid = local_cid;
|
||||||
printf("AVRCP Browsing Client configure incoming connection, browsing cid 0x%02x\n", browsing_cid);
|
printf("AVRCP Browsing Client configure incoming connection, browsing cid 0x%02x\n", browsing_cid);
|
||||||
avrcp_avrcp_browsing_configure_incoming_connection(browsing_cid, ertm_buffer, sizeof(ertm_buffer), &ertm_config);
|
avrcp_browsing_controller_configure_incoming_connection(browsing_cid, ertm_buffer, sizeof(ertm_buffer), &ertm_config);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED: {
|
case AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user