mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-19 15:40:52 +00:00
avrcp browsing: change go up one folder API
This commit is contained in:
parent
2f511ffbef
commit
e5b24613ab
@ -501,17 +501,8 @@ static void stdin_process(char cmd){
|
||||
avrcp_browsing_controller_browse_media(browsing_cid, 0, 0xFFFFFFFF, AVRCP_MEDIA_ATTR_ALL);
|
||||
break;
|
||||
case 'u':
|
||||
if (folder_index < 0 && !parent_folder_set){
|
||||
printf("AVRCP Browsing: no folders available\n");
|
||||
break;
|
||||
}
|
||||
if (!parent_folder_set){
|
||||
parent_folder_set = 1;
|
||||
memcpy(parent_folder_name, folders[0].name, folders[0].name_len);
|
||||
memcpy(parent_folder_uid, folders[0].uid, 8);
|
||||
}
|
||||
printf("AVRCP Browsing: go up one level of %s\n", (char *)parent_folder_name);
|
||||
status = avrcp_browsing_controller_go_up_one_level(browsing_cid, parent_folder_uid);
|
||||
printf("AVRCP Browsing: go up one level\n");
|
||||
status = avrcp_browsing_controller_go_up_one_level(browsing_cid);
|
||||
folder_index = -1;
|
||||
break;
|
||||
case 'd':
|
||||
|
@ -283,33 +283,33 @@ typedef struct {
|
||||
uint16_t l2cap_browsing_cid;
|
||||
|
||||
avctp_connection_state_t state;
|
||||
uint8_t wait_to_send;
|
||||
uint8_t transaction_label;
|
||||
uint8_t wait_to_send;
|
||||
uint8_t transaction_label;
|
||||
|
||||
uint8_t * ertm_buffer;
|
||||
uint32_t ertm_buffer_size;
|
||||
uint8_t *ertm_buffer;
|
||||
uint32_t ertm_buffer_size;
|
||||
l2cap_ertm_config_t ertm_config;
|
||||
|
||||
// players
|
||||
uint8_t set_addressed_player_id;
|
||||
uint8_t set_browsed_player_id;
|
||||
uint8_t set_addressed_player_id;
|
||||
uint8_t set_browsed_player_id;
|
||||
|
||||
uint16_t addressed_player_id;
|
||||
uint16_t browsed_player_id;
|
||||
uint16_t browsed_player_uid_counter;
|
||||
|
||||
// get folder item
|
||||
uint8_t get_folder_item;
|
||||
uint8_t scope;
|
||||
uint8_t get_folder_item;
|
||||
uint8_t scope;
|
||||
uint32_t start_item;
|
||||
uint32_t end_item;
|
||||
uint32_t attr_bitmap;
|
||||
uint32_t attr_bitmap;
|
||||
|
||||
// change_path
|
||||
uint8_t change_path;
|
||||
uint8_t direction;
|
||||
uint8_t change_path;
|
||||
uint8_t direction;
|
||||
uint16_t uid_counter;
|
||||
uint8_t folder_uid[8];
|
||||
uint8_t folder_uid[8];
|
||||
} avrcp_browsing_connection_t;
|
||||
// BROWSING END
|
||||
|
||||
|
@ -613,8 +613,8 @@ uint8_t avrcp_browsing_controller_change_path(uint16_t avrcp_browsing_cid, uint8
|
||||
return ERROR_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
uint8_t avrcp_browsing_controller_go_up_one_level(uint16_t avrcp_browsing_cid, uint8_t * folder_uid){
|
||||
return avrcp_browsing_controller_change_path(avrcp_browsing_cid, 0, folder_uid);
|
||||
uint8_t avrcp_browsing_controller_go_up_one_level(uint16_t avrcp_browsing_cid){
|
||||
return avrcp_browsing_controller_change_path(avrcp_browsing_cid, 0, 0);
|
||||
}
|
||||
|
||||
uint8_t avrcp_browsing_controller_go_down_one_level(uint16_t avrcp_browsing_cid, uint8_t * folder_uid){
|
||||
|
@ -182,7 +182,7 @@ uint8_t avrcp_browsing_controller_set_addressed_player(uint16_t avrcp_browsing_c
|
||||
* @param folder_uid 8 bytes long
|
||||
**/
|
||||
uint8_t avrcp_browsing_controller_change_path(uint16_t avrcp_browsing_cid, uint8_t direction, uint8_t * folder_uid);
|
||||
uint8_t avrcp_browsing_controller_go_up_one_level(uint16_t avrcp_browsing_cid, uint8_t * folder_uid);
|
||||
uint8_t avrcp_browsing_controller_go_up_one_level(uint16_t avrcp_browsing_cid);
|
||||
uint8_t avrcp_browsing_controller_go_down_one_level(uint16_t avrcp_browsing_cid, uint8_t * folder_uid);
|
||||
|
||||
/* API_END */
|
||||
|
Loading…
x
Reference in New Issue
Block a user