From c490eb5a4574f31bdc34eaecb2734e407cde270e Mon Sep 17 00:00:00 2001 From: Milanka Ringwald Date: Wed, 25 Apr 2018 16:00:58 +0200 Subject: [PATCH] avrcp browsing controller: rename functions --- src/classic/avrcp_browsing_controller.c | 16 ++++++++-------- src/classic/avrcp_browsing_controller.h | 4 ++-- test/pts/avrcp_controller_test.c | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/classic/avrcp_browsing_controller.c b/src/classic/avrcp_browsing_controller.c index 001f23d17..d23966fd6 100644 --- a/src/classic/avrcp_browsing_controller.c +++ b/src/classic/avrcp_browsing_controller.c @@ -48,7 +48,7 @@ #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 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(size); bd_addr_t event_addr; @@ -748,19 +748,19 @@ uint8_t avrcp_browsing_controller_disconnect(uint16_t avrcp_browsing_cid){ 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); 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; } 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; } 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; } @@ -772,10 +772,10 @@ uint8_t avrcp_avrcp_browsing_configure_incoming_connection(uint16_t avrcp_browsi 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); 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; } if (!avrcp_connection->browsing_connection) return ERROR_CODE_SUCCESS; diff --git a/src/classic/avrcp_browsing_controller.h b/src/classic/avrcp_browsing_controller.h index 946c810be..736fc36e9 100644 --- a/src/classic/avrcp_browsing_controller.h +++ b/src/classic/avrcp_browsing_controller.h @@ -128,14 +128,14 @@ uint8_t avrcp_browsing_controller_connect(bd_addr_t bd_addr, uint8_t * ertm_buff * @param ertm_config * @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. * @param avrcp_browsing_cid * @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); /** diff --git a/test/pts/avrcp_controller_test.c b/test/pts/avrcp_controller_test.c index 9539a01c9..c9b4a4d66 100644 --- a/test/pts/avrcp_controller_test.c +++ b/test/pts/avrcp_controller_test.c @@ -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); 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); - avrcp_avrcp_browsing_decline_incoming_connection(browsing_cid); + avrcp_browsing_controller_decline_incoming_connection(browsing_cid); return; } browsing_cid = local_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; case AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED: {