/system/bt/stack/sdp/ |
D | sdp_api.cc | 221 tSDP_DISC_ATTR* p_attr; in SDP_FindAttributeInRec() local 223 p_attr = p_rec->p_first_attr; in SDP_FindAttributeInRec() 224 while (p_attr) { in SDP_FindAttributeInRec() 225 if (p_attr->attr_id == attr_id) return (p_attr); in SDP_FindAttributeInRec() 227 p_attr = p_attr->p_next_attr; in SDP_FindAttributeInRec() 248 tSDP_DISC_ATTR *p_attr, *p_sattr, *p_extra_sattr; in SDP_FindServiceUUIDInRec() local 250 p_attr = p_rec->p_first_attr; in SDP_FindServiceUUIDInRec() 252 while (p_attr) { in SDP_FindServiceUUIDInRec() 253 if ((p_attr->attr_id == ATTR_ID_SERVICE_CLASS_ID_LIST) && in SDP_FindServiceUUIDInRec() 254 (SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == DATA_ELE_SEQ_DESC_TYPE)) { in SDP_FindServiceUUIDInRec() [all …]
|
D | sdp_utils.cc | 65 for (tSDP_DISC_ATTR* p_attr = p_rec->p_first_attr; p_attr != nullptr; in sdpu_find_profile_version() local 66 p_attr = p_attr->p_next_attr) { in sdpu_find_profile_version() 68 if (p_attr->attr_id != ATTR_ID_BT_PROFILE_DESC_LIST || in sdpu_find_profile_version() 69 SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) != DATA_ELE_SEQ_DESC_TYPE) { in sdpu_find_profile_version() 73 for (tSDP_DISC_ATTR* p_sattr = p_attr->attr_value.v.p_sub_attr; in sdpu_find_profile_version() 118 for (tSDP_DISC_ATTR* p_attr = p_rec->p_first_attr; p_attr != nullptr; in sdpu_find_most_specific_service_uuid() local 119 p_attr = p_attr->p_next_attr) { in sdpu_find_most_specific_service_uuid() 120 if (p_attr->attr_id == ATTR_ID_SERVICE_CLASS_ID_LIST && in sdpu_find_most_specific_service_uuid() 121 SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == DATA_ELE_SEQ_DESC_TYPE) { in sdpu_find_most_specific_service_uuid() 122 tSDP_DISC_ATTR* p_first_attr = p_attr->attr_value.v.p_sub_attr; in sdpu_find_most_specific_service_uuid() [all …]
|
D | sdp_db.cc | 55 tSDP_ATTRIBUTE* p_attr; in sdp_db_service_search() local 69 p_attr = &p_rec->attribute[0]; in sdp_db_service_search() 70 for (xx = 0; xx < p_rec->num_attributes; xx++, p_attr++) { in sdp_db_service_search() 71 if (p_attr->type == UUID_DESC_TYPE) { in sdp_db_service_search() 72 if (sdpu_compare_uuid_arrays(p_attr->value_ptr, p_attr->len, in sdp_db_service_search() 76 } else if (p_attr->type == DATA_ELE_SEQ_DESC_TYPE) { in sdp_db_service_search() 77 if (find_uuid_in_seq(p_attr->value_ptr, p_attr->len, in sdp_db_service_search() 394 tSDP_ATTRIBUTE* p_attr = &p_rec->attribute[0]; in SDP_AddAttribute() local 397 for (xx = 0; xx < p_rec->num_attributes; xx++, p_attr++) { in SDP_AddAttribute() 399 if (p_attr->id == attr_id) { in SDP_AddAttribute() [all …]
|
D | sdp_discovery.cc | 801 tSDP_DISC_ATTR* p_attr; in add_attr() local 840 p_attr = (tSDP_DISC_ATTR*)p_db->p_free_mem; in add_attr() 841 p_attr->attr_id = attr_id; in add_attr() 842 p_attr->attr_len_type = (uint16_t)attr_len | (attr_type << 12); in add_attr() 843 p_attr->p_next_attr = NULL; in add_attr() 867 p_attr, (uint8_t)(nest_level + 1)); in add_attr() 877 p_attr->attr_value.v.u8 = *p++; in add_attr() 880 BE_STREAM_TO_UINT16(p_attr->attr_value.v.u16, p); in add_attr() 883 BE_STREAM_TO_UINT32(p_attr->attr_value.v.u32, p); in add_attr() 886 BE_STREAM_TO_ARRAY(p, p_attr->attr_value.v.array, (int32_t)attr_len); in add_attr() [all …]
|
D | sdp_server.cc | 315 tSDP_ATTRIBUTE* p_attr; in process_service_attr_req() local 399 p_attr = sdp_db_find_attr_in_rec(p_rec, attr_seq.attr_entry[xx].start, in process_service_attr_req() 402 if (p_attr) { in process_service_attr_req() 409 p_ccb->cont_info.next_attr_start_id = p_attr->id; in process_service_attr_req() 413 attr_len = sdpu_get_attrib_entry_len(p_attr); in process_service_attr_req() 423 p_rsp = sdpu_build_partial_attrib_entry(p_rsp, p_attr, rem_len, in process_service_attr_req() 443 p_rsp, p_attr, (uint16_t)rem_len, &p_ccb->cont_info.attr_offset); in process_service_attr_req() 446 p_ccb->cont_info.next_attr_start_id = p_attr->id; in process_service_attr_req() 449 p_rsp = sdpu_build_attrib_entry(p_rsp, p_attr); in process_service_attr_req() 454 attr_seq.attr_entry[xx].start = p_attr->id + 1; in process_service_attr_req() [all …]
|
D | sdpint.h | 210 extern uint8_t* sdpu_build_attrib_seq(uint8_t* p_out, uint16_t* p_attr, 212 extern uint8_t* sdpu_build_attrib_entry(uint8_t* p_out, tSDP_ATTRIBUTE* p_attr); 227 tSDP_DISC_ATTR* p_attr); 234 extern uint16_t sdpu_get_attrib_entry_len(tSDP_ATTRIBUTE* p_attr); 236 tSDP_ATTRIBUTE* p_attr,
|
/system/bt/bta/sdp/ |
D | bta_sdp_act.cc | 53 tSDP_DISC_ATTR* p_attr; in bta_create_mns_sdp_record() local 64 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_MAP_SUPPORTED_FEATURES); in bta_create_mns_sdp_record() 65 if (p_attr != NULL) { in bta_create_mns_sdp_record() 66 record->mns.supported_features = p_attr->attr_value.v.u32; in bta_create_mns_sdp_record() 69 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_NAME); in bta_create_mns_sdp_record() 70 if (p_attr != NULL) { in bta_create_mns_sdp_record() 72 SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in bta_create_mns_sdp_record() 73 record->mns.hdr.service_name = (char*)p_attr->attr_value.v.array; in bta_create_mns_sdp_record() 85 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_GOEP_L2CAP_PSM); in bta_create_mns_sdp_record() 86 if (p_attr != NULL) { in bta_create_mns_sdp_record() [all …]
|
/system/bt/stack/hid/ |
D | hidh_api.cc | 73 tSDP_DISC_ATTR* p_attr; in hidh_get_str_attr() local 76 p_attr = SDP_FindAttributeInRec(p_rec, attr_id); in hidh_get_str_attr() 77 if (p_attr != NULL) { in hidh_get_str_attr() 78 name_len = SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in hidh_get_str_attr() 80 memcpy(str, (char*)p_attr->attr_value.v.array, name_len); in hidh_get_str_attr() 83 memcpy(str, (char*)p_attr->attr_value.v.array, max_len - 1); in hidh_get_str_attr() 93 tSDP_DISC_ATTR *p_attr, *p_subattr1, *p_subattr2, *p_repdesc; in hidh_search_callback() local 115 if (((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_HID_DESCRIPTOR_LIST)) == in hidh_search_callback() 117 (SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) != DATA_ELE_SEQ_DESC_TYPE) || in hidh_search_callback() 118 ((p_subattr1 = p_attr->attr_value.v.p_sub_attr) == NULL) || in hidh_search_callback() [all …]
|
/system/bt/bta/mce/ |
D | bta_mce_act.cc | 77 tSDP_DISC_ATTR* p_attr; in bta_mce_search_cback() local 92 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_NAME); in bta_mce_search_cback() 93 if (p_attr == NULL) continue; in bta_mce_search_cback() 95 evt_data.mas[found].p_srv_name = (char*)p_attr->attr_value.v.array; in bta_mce_search_cback() 97 SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in bta_mce_search_cback() 99 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_MAS_INSTANCE_ID); in bta_mce_search_cback() 100 if (p_attr == NULL) break; in bta_mce_search_cback() 102 evt_data.mas[found].instance_id = p_attr->attr_value.v.u8; in bta_mce_search_cback() 104 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_MSG_TYPE); in bta_mce_search_cback() 105 if (p_attr == NULL) break; in bta_mce_search_cback() [all …]
|
/system/bt/stack/a2dp/ |
D | a2dp_api.cc | 67 tSDP_DISC_ATTR* p_attr; in a2dp_sdp_cback() local 87 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_NAME)) != in a2dp_sdp_cback() 89 a2dp_svc.p_service_name = (char*)p_attr->attr_value.v.array; in a2dp_sdp_cback() 90 a2dp_svc.service_len = SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in a2dp_sdp_cback() 94 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_PROVIDER_NAME)) != in a2dp_sdp_cback() 96 a2dp_svc.p_provider_name = (char*)p_attr->attr_value.v.array; in a2dp_sdp_cback() 97 a2dp_svc.provider_len = SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in a2dp_sdp_cback() 101 if ((p_attr = SDP_FindAttributeInRec( in a2dp_sdp_cback() 103 a2dp_svc.features = p_attr->attr_value.v.u16; in a2dp_sdp_cback()
|
/system/bt/stack/gatt/ |
D | gatt_auth.cc | 47 tGATT_VALUE* p_attr = (tGATT_VALUE*)p_clcb->p_attr_buf; in gatt_sign_data() local 57 (uint8_t*)osi_malloc(p_attr->len + 3); /* 3 = 2 byte handle + opcode */ in gatt_sign_data() 61 UINT16_TO_STREAM(p, p_attr->handle); in gatt_sign_data() 62 ARRAY_TO_STREAM(p, p_attr->value, p_attr->len); in gatt_sign_data() 66 if ((payload_size - GATT_AUTH_SIGN_LEN - 3) < p_attr->len) in gatt_sign_data() 67 p_attr->len = payload_size - GATT_AUTH_SIGN_LEN - 3; in gatt_sign_data() 69 p_signature = p_attr->value + p_attr->len; in gatt_sign_data() 72 (uint16_t)(p_attr->len + 3), /* 3 = 2 byte handle + opcode */ in gatt_sign_data() 74 p_attr->len += BTM_BLE_AUTH_SIGN_LEN; in gatt_sign_data()
|
D | gatt_db.cc | 446 tGATT_ATTR* p_attr = find_attr_by_handle(p_db, handle); in gatts_read_attr_value_by_handle() local 447 if (!p_attr) return GATT_NOT_FOUND; in gatts_read_attr_value_by_handle() 450 tGATT_STATUS status = read_attr_value(*p_attr, offset, &pp, in gatts_read_attr_value_by_handle() 455 status = gatts_send_app_read_request(tcb, op_code, p_attr->handle, offset, in gatts_read_attr_value_by_handle() 456 trans_id, p_attr->gatt_type); in gatts_read_attr_value_by_handle() 484 tGATT_ATTR* p_attr = find_attr_by_handle(p_db, handle); in gatts_read_attr_perm_check() local 485 if (!p_attr) return GATT_NOT_FOUND; in gatts_read_attr_perm_check() 487 return gatts_check_attr_readability(*p_attr, 0, is_long, sec_flag, key_size); in gatts_read_attr_perm_check() 518 tGATT_ATTR* p_attr = find_attr_by_handle(p_db, handle); in gatts_write_attr_perm_check() local 519 if (!p_attr) return GATT_NOT_FOUND; in gatts_write_attr_perm_check() [all …]
|
D | gatt_cl.cc | 299 tGATT_VALUE* p_attr = (tGATT_VALUE*)p_clcb->p_attr_buf; in gatt_check_write_long_terminate() local 306 if (p_rsp_value->handle != p_attr->handle || in gatt_check_write_long_terminate() 308 memcmp(p_rsp_value->value, p_attr->value + p_attr->offset, in gatt_check_write_long_terminate() 318 if ((p_attr->offset += p_rsp_value->len) >= p_attr->len) terminate = true; in gatt_check_write_long_terminate() 329 tGATT_VALUE* p_attr = (tGATT_VALUE*)p_clcb->p_attr_buf; in gatt_send_prepare_write() local 333 uint16_t to_send = p_attr->len - p_attr->offset; in gatt_send_prepare_write() 339 p_clcb->s_handle = p_attr->handle; in gatt_send_prepare_write() 341 uint16_t offset = p_attr->offset; in gatt_send_prepare_write() 349 p_attr->handle, to_send, /* length */ in gatt_send_prepare_write() 351 p_attr->value + p_attr->offset); /* data */ in gatt_send_prepare_write() [all …]
|
/system/bt/bta/hf_client/ |
D | bta_hf_client_sdp.cc | 224 tSDP_DISC_ATTR* p_attr; in bta_hf_client_sdp_find_attr() local 253 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_hf_client_sdp_find_attr() 254 if (p_attr != NULL) { in bta_hf_client_sdp_find_attr() 259 client_cb->peer_features = p_attr->attr_value.v.u16; in bta_hf_client_sdp_find_attr() 268 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_NETWORK); in bta_hf_client_sdp_find_attr() 269 if (p_attr != NULL) { in bta_hf_client_sdp_find_attr() 270 if (p_attr->attr_value.v.u16 == 0x01) { in bta_hf_client_sdp_find_attr()
|
/system/bt/bta/ag/ |
D | bta_ag_sdp.cc | 294 tSDP_DISC_ATTR* p_attr; in bta_ag_sdp_find_attr() local 361 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_ag_sdp_find_attr() 362 if (p_attr != nullptr) { in bta_ag_sdp_find_attr() 366 uint16_t sdp_features = p_attr->attr_value.v.u16; in bta_ag_sdp_find_attr() 397 p_attr = in bta_ag_sdp_find_attr() 399 if (p_attr != nullptr) { in bta_ag_sdp_find_attr() 401 if (p_attr->attr_value.v.u8) in bta_ag_sdp_find_attr()
|
/system/bt/bta/gatt/ |
D | bta_gattc_cache.cc | 537 void bta_gattc_fill_gatt_db_el(btgatt_db_element_t* p_attr, in bta_gattc_fill_gatt_db_el() argument 542 p_attr->type = type; in bta_gattc_fill_gatt_db_el() 543 p_attr->attribute_handle = att_handle; in bta_gattc_fill_gatt_db_el() 544 p_attr->start_handle = s_handle; in bta_gattc_fill_gatt_db_el() 545 p_attr->end_handle = e_handle; in bta_gattc_fill_gatt_db_el() 546 p_attr->id = id; in bta_gattc_fill_gatt_db_el() 547 p_attr->properties = prop; in bta_gattc_fill_gatt_db_el() 551 p_attr->permissions = 0; in bta_gattc_fill_gatt_db_el() 552 p_attr->uuid = uuid; in bta_gattc_fill_gatt_db_el()
|
/system/bt/stack/avrc/ |
D | avrc_bld_tg.cc | 914 tAVRC_ATTR_ENTRY* p_attr; in avrc_bld_get_folder_items_rsp() local 1024 p_attr = p_media->p_attr_list; in avrc_bld_get_folder_items_rsp() 1026 if (p_attr[yy].name.p_str && in avrc_bld_get_folder_items_rsp() 1027 AVRC_IS_VALID_MEDIA_ATTRIBUTE(p_attr[yy].attr_id) && in avrc_bld_get_folder_items_rsp() 1028 (len_left >= (p_attr[yy].name.str_len + 8))) { in avrc_bld_get_folder_items_rsp() 1030 UINT32_TO_BE_STREAM(p_data, p_attr[yy].attr_id); in avrc_bld_get_folder_items_rsp() 1031 UINT16_TO_BE_STREAM(p_data, p_attr[yy].name.charset_id); in avrc_bld_get_folder_items_rsp() 1032 UINT16_TO_BE_STREAM(p_data, p_attr[yy].name.str_len); in avrc_bld_get_folder_items_rsp() 1033 ARRAY_TO_BE_STREAM(p_data, p_attr[yy].name.p_str, in avrc_bld_get_folder_items_rsp() 1034 p_attr[yy].name.str_len); in avrc_bld_get_folder_items_rsp() [all …]
|
/system/bt/bta/av/ |
D | bta_av_act.cc | 1632 tSDP_DISC_ATTR* p_attr; in bta_av_check_peer_features() local 1669 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_av_check_peer_features() 1670 if (p_attr != NULL) { in bta_av_check_peer_features() 1671 categories = p_attr->attr_value.v.u16; in bta_av_check_peer_features() 1732 tSDP_DISC_ATTR* p_attr = in bta_avk_check_peer_features() local 1734 if (p_attr != NULL) { in bta_avk_check_peer_features() 1735 uint16_t categories = p_attr->attr_value.v.u16; in bta_avk_check_peer_features() 1785 tSDP_DISC_ATTR* p_attr = in bta_avk_get_cover_art_psm() local 1798 if (p_attr != NULL && SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) in bta_avk_get_cover_art_psm() 1802 tSDP_DISC_ATTR* p_protocol_list = p_attr->attr_value.v.p_sub_attr; in bta_avk_get_cover_art_psm()
|
/system/bt/btif/src/ |
D | btif_rc.cc | 3870 btrc_element_attr_val_t* p_attr = in handle_get_metadata_attr_response() local 3880 p_attr[i].attr_id = p_rsp->p_attrs[i].attr_id; in handle_get_metadata_attr_response() 3883 memcpy(p_attr[i].text, p_rsp->p_attrs[i].name.p_str, in handle_get_metadata_attr_response() 3890 p_dev->rc_addr, p_rsp->num_attrs, p_attr)); in handle_get_metadata_attr_response() 3891 do_in_jni_thread(FROM_HERE, base::Bind(osi_free, p_attr)); in handle_get_metadata_attr_response()
|