mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 12:35:25 +00:00
avrcp browsing target: rename API functions from avrcp_subevent_browsing_* to avrcp_browsing_target_send_*
This commit is contained in:
parent
665a00cb2a
commit
48f7d13909
@ -212,7 +212,7 @@ void avrcp_browsing_target_register_packet_handler(btstack_packet_handler_t call
|
||||
avrcp_target_context.browsing_avrcp_callback = callback;
|
||||
}
|
||||
|
||||
uint8_t avrcp_subevent_browsing_get_folder_items_response(uint16_t avrcp_browsing_cid, uint16_t uid_counter, uint8_t * attr_list, uint16_t attr_list_size){
|
||||
uint8_t avrcp_browsing_target_send_get_folder_items_response(uint16_t avrcp_browsing_cid, uint16_t uid_counter, uint8_t * attr_list, uint16_t attr_list_size){
|
||||
avrcp_connection_t * avrcp_connection = get_avrcp_connection_for_browsing_cid_for_role(AVRCP_TARGET, avrcp_browsing_cid);
|
||||
if (!avrcp_connection){
|
||||
log_error("Could not find an AVRCP Target connection for browsing_cid 0x%02x.", avrcp_browsing_cid);
|
||||
@ -255,7 +255,7 @@ uint8_t avrcp_subevent_browsing_get_folder_items_response(uint16_t avrcp_browsin
|
||||
}
|
||||
|
||||
|
||||
uint8_t avrcp_subevent_browsing_get_total_num_items_response(uint16_t avrcp_browsing_cid, uint16_t uid_counter, uint32_t total_num_items){
|
||||
uint8_t avrcp_browsing_target_send_get_total_num_items_response(uint16_t avrcp_browsing_cid, uint16_t uid_counter, uint32_t total_num_items){
|
||||
avrcp_connection_t * avrcp_connection = get_avrcp_connection_for_browsing_cid_for_role(AVRCP_TARGET, avrcp_browsing_cid);
|
||||
if (!avrcp_connection){
|
||||
log_error("Could not find an AVRCP Target connection for browsing_cid 0x%02x.", avrcp_browsing_cid);
|
||||
|
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* avrcp_browsing_controller.h
|
||||
* avrcp_browsing_target.h
|
||||
*
|
||||
* Audio/Video Remote Control Profile Browsing
|
||||
*
|
||||
@ -67,14 +67,22 @@ void avrcp_browsing_target_init(void);
|
||||
void avrcp_browsing_target_register_packet_handler(btstack_packet_handler_t callback);
|
||||
|
||||
/**
|
||||
* @brief Disconnect from AVRCP target
|
||||
* @param avrcp_browsing_cid
|
||||
* @returns status
|
||||
* @brief Send answer to get folder items query on event AVRCP_SUBEVENT_BROWSING_GET_FOLDER_ITEMS. The first byte of this event defines the scope of the query, see avrcp_browsing_scope_t.
|
||||
* @param browsing_cid
|
||||
* @param uid_counter
|
||||
* @param attr_list
|
||||
* @param attr_list_size
|
||||
*/
|
||||
uint8_t avrcp_browsing_target_disconnect(uint16_t avrcp_browsing_cid);
|
||||
uint8_t avrcp_browsing_target_send_get_folder_items_response(uint16_t browsing_cid, uint16_t uid_counter, uint8_t * attr_list, uint16_t attr_list_size);
|
||||
|
||||
/**
|
||||
* @brief Send answer to get total number of items query on event AVRCP_SUBEVENT_BROWSING_GET_TOTAL_NUM_ITEMS. The first byte of this event defines the scope of the query, see avrcp_browsing_scope_t.
|
||||
* @param browsing_cid
|
||||
* @param uid_counter
|
||||
* @param total_num_items
|
||||
*/
|
||||
uint8_t avrcp_browsing_target_send_get_total_num_items_response(uint16_t browsing_cid, uint16_t uid_counter, uint32_t total_num_items);
|
||||
|
||||
uint8_t avrcp_subevent_browsing_get_folder_items_response(uint16_t browsing_cid, uint16_t uid_counter, uint8_t * attr_list, uint16_t attr_list_size);
|
||||
uint8_t avrcp_subevent_browsing_get_total_num_items_response(uint16_t avrcp_browsing_cid, uint16_t uid_counter, uint32_t total_num_items);
|
||||
/* API_END */
|
||||
|
||||
#if defined __cplusplus
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2016 BlueKitchen GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -896,16 +896,16 @@ static void avrcp_browsing_target_packet_handler(uint8_t packet_type, uint16_t c
|
||||
printf(" - %s\n", name);
|
||||
}
|
||||
|
||||
avrcp_status = avrcp_subevent_browsing_get_folder_items_response(browsing_cid, uid_counter, media_player_list, sizeof(media_player_list));
|
||||
avrcp_status = avrcp_browsing_target_send_get_folder_items_response(browsing_cid, uid_counter, media_player_list, sizeof(media_player_list));
|
||||
break;
|
||||
case AVRCP_BROWSING_MEDIA_PLAYER_VIRTUAL_FILESYSTEM:
|
||||
avrcp_status = avrcp_subevent_browsing_get_folder_items_response(browsing_cid, uid_counter, virtual_filesystem_list, sizeof(virtual_filesystem_list));
|
||||
avrcp_status = avrcp_browsing_target_send_get_folder_items_response(browsing_cid, uid_counter, virtual_filesystem_list, sizeof(virtual_filesystem_list));
|
||||
break;
|
||||
case AVRCP_BROWSING_SEARCH:
|
||||
avrcp_status = avrcp_subevent_browsing_get_folder_items_response(browsing_cid, uid_counter, search_list, sizeof(search_list));
|
||||
avrcp_status = avrcp_browsing_target_send_get_folder_items_response(browsing_cid, uid_counter, search_list, sizeof(search_list));
|
||||
break;
|
||||
case AVRCP_BROWSING_NOW_PLAYING:
|
||||
avrcp_status = avrcp_subevent_browsing_get_folder_items_response(browsing_cid, uid_counter, now_playing_list, sizeof(now_playing_list));
|
||||
avrcp_status = avrcp_browsing_target_send_get_folder_items_response(browsing_cid, uid_counter, now_playing_list, sizeof(now_playing_list));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -916,14 +916,14 @@ static void avrcp_browsing_target_packet_handler(uint8_t packet_type, uint16_t c
|
||||
switch (scope){
|
||||
case AVRCP_BROWSING_MEDIA_PLAYER_LIST:
|
||||
total_num_items = big_endian_read_16(media_player_list, 0);
|
||||
avrcp_status = avrcp_subevent_browsing_get_total_num_items_response(browsing_cid, uid_counter, total_num_items);
|
||||
avrcp_status = avrcp_browsing_target_send_get_total_num_items_response(browsing_cid, uid_counter, total_num_items);
|
||||
break;
|
||||
case AVRCP_BROWSING_MEDIA_PLAYER_VIRTUAL_FILESYSTEM:
|
||||
total_num_items = big_endian_read_16(virtual_filesystem_list, 0);
|
||||
avrcp_status = avrcp_subevent_browsing_get_total_num_items_response(browsing_cid, uid_counter, total_num_items);
|
||||
avrcp_status = avrcp_browsing_target_send_get_total_num_items_response(browsing_cid, uid_counter, total_num_items);
|
||||
break;
|
||||
default:
|
||||
avrcp_status = avrcp_subevent_browsing_get_total_num_items_response(browsing_cid, uid_counter, total_num_items);
|
||||
avrcp_status = avrcp_browsing_target_send_get_total_num_items_response(browsing_cid, uid_counter, total_num_items);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user