mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-15 12:39:51 +00:00
pbap_client: add PbapSupportedFeatures to OBEX Connect request
This commit is contained in:
parent
046d2a34e6
commit
bca6857aa1
@ -387,6 +387,12 @@ uint8_t goep_client_create_connection(btstack_packet_handler_t handler, bd_addr_
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t goep_client_get_pbap_supported_features(uint16_t goep_cid){
|
||||
UNUSED(goep_cid);
|
||||
goep_client_t * context = goep_client;
|
||||
return context->pbap_supported_features;
|
||||
}
|
||||
|
||||
uint8_t goep_client_disconnect(uint16_t goep_cid){
|
||||
UNUSED(goep_cid);
|
||||
goep_client_t * context = goep_client;
|
||||
|
@ -93,6 +93,11 @@ void goep_client_request_can_send_now(uint16_t goep_cid);
|
||||
*/
|
||||
uint8_t goep_client_get_request_opcode(uint16_t goep_cid);
|
||||
|
||||
/**
|
||||
* brief Get PBAP Supported Features found in SDP record during conenct
|
||||
*/
|
||||
uint32_t goep_client_get_pbap_supported_features(uint16_t goep_cid);
|
||||
|
||||
/**
|
||||
* @brief Set Connection ID used for newly created requests
|
||||
* @param gope_cid
|
||||
|
@ -120,5 +120,7 @@
|
||||
#define PBAP_APPLICATION_PARAMETER_VCARD_SELECTOR_OPERATOR 0x0E
|
||||
// ResetNewMissedCalls - 0x0F - 1 byte
|
||||
#define PBAP_APPLICATION_PARAMETER_RESET_NEW_MISSED_CALLS 0x0F
|
||||
// PbapSupportedFeatures - 0x10 - 4 bytes
|
||||
#define PBAP_APPLICATION_PARAMETER_PBAP_SUPPORTED_FEATURES 0x10
|
||||
|
||||
#endif
|
||||
|
@ -223,6 +223,11 @@ static void pbap_handle_can_send_now(void){
|
||||
case PBAP_W2_SEND_CONNECT_REQUEST:
|
||||
goep_client_create_connect_request(pbap_client->goep_cid, OBEX_VERSION, 0, OBEX_MAX_PACKETLEN_DEFAULT);
|
||||
goep_client_add_header_target(pbap_client->goep_cid, 16, pbap_uuid);
|
||||
// Add PbapSupportedFeatures
|
||||
application_parameters[0] = PBAP_APPLICATION_PARAMETER_PBAP_SUPPORTED_FEATURES;
|
||||
application_parameters[1] = 4;
|
||||
big_endian_store_32(application_parameters, 2, goep_client_get_pbap_supported_features(pbap_client->goep_cid));
|
||||
goep_client_add_header_application_parameters(pbap_client->goep_cid, 6, &application_parameters[0]);
|
||||
pbap_client->state = PBAP_W4_CONNECT_RESPONSE;
|
||||
goep_client_execute(pbap_client->goep_cid);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user