Home
last modified time | relevance | path

Searched refs:p_attr (Results 1 – 19 of 19) sorted by relevance

/system/bt/stack/sdp/
Dsdp_api.cc233 tSDP_DISC_ATTR* p_attr; in SDP_FindAttributeInDb() local
244 p_attr = p_rec->p_first_attr; in SDP_FindAttributeInDb()
245 while (p_attr) { in SDP_FindAttributeInDb()
246 if (p_attr->attr_id == attr_id) return (p_rec); in SDP_FindAttributeInDb()
248 p_attr = p_attr->p_next_attr; in SDP_FindAttributeInDb()
268 tSDP_DISC_ATTR* p_attr; in SDP_FindAttributeInRec() local
270 p_attr = p_rec->p_first_attr; in SDP_FindAttributeInRec()
271 while (p_attr) { in SDP_FindAttributeInRec()
272 if (p_attr->attr_id == attr_id) return (p_attr); in SDP_FindAttributeInRec()
274 p_attr = p_attr->p_next_attr; in SDP_FindAttributeInRec()
[all …]
Dsdp_utils.cc71 for (tSDP_DISC_ATTR* p_attr = p_rec->p_first_attr; p_attr != nullptr; in sdpu_find_profile_version() local
72 p_attr = p_attr->p_next_attr) { in sdpu_find_profile_version()
74 if (p_attr->attr_id != ATTR_ID_BT_PROFILE_DESC_LIST || in sdpu_find_profile_version()
75 SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) != DATA_ELE_SEQ_DESC_TYPE) { in sdpu_find_profile_version()
79 for (tSDP_DISC_ATTR* p_sattr = p_attr->attr_value.v.p_sub_attr; in sdpu_find_profile_version()
124 for (tSDP_DISC_ATTR* p_attr = p_rec->p_first_attr; p_attr != nullptr; in sdpu_find_most_specific_service_uuid() local
125 p_attr = p_attr->p_next_attr) { in sdpu_find_most_specific_service_uuid()
126 if (p_attr->attr_id == ATTR_ID_SERVICE_CLASS_ID_LIST && in sdpu_find_most_specific_service_uuid()
127 SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == DATA_ELE_SEQ_DESC_TYPE) { in sdpu_find_most_specific_service_uuid()
128 tSDP_DISC_ATTR* p_first_attr = p_attr->attr_value.v.p_sub_attr; in sdpu_find_most_specific_service_uuid()
[all …]
Dsdp_db.cc60 tSDP_ATTRIBUTE* p_attr; in sdp_db_service_search() local
74 p_attr = &p_rec->attribute[0]; in sdp_db_service_search()
75 for (xx = 0; xx < p_rec->num_attributes; xx++, p_attr++) { in sdp_db_service_search()
76 if (p_attr->type == UUID_DESC_TYPE) { in sdp_db_service_search()
77 if (sdpu_compare_uuid_arrays(p_attr->value_ptr, p_attr->len, in sdp_db_service_search()
81 } else if (p_attr->type == DATA_ELE_SEQ_DESC_TYPE) { in sdp_db_service_search()
82 if (find_uuid_in_seq(p_attr->value_ptr, p_attr->len, in sdp_db_service_search()
399 tSDP_ATTRIBUTE* p_attr = &p_rec->attribute[0]; in SDP_AddAttribute() local
402 for (xx = 0; xx < p_rec->num_attributes; xx++, p_attr++) { in SDP_AddAttribute()
404 if (p_attr->id == attr_id) { in SDP_AddAttribute()
[all …]
Dsdp_discovery.cc801 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 …]
Dsdp_server.cc323 tSDP_ATTRIBUTE* p_attr; in process_service_attr_req() local
407 p_attr = sdp_db_find_attr_in_rec(p_rec, attr_seq.attr_entry[xx].start, in process_service_attr_req()
410 if (p_attr) { in process_service_attr_req()
417 p_ccb->cont_info.next_attr_start_id = p_attr->id; in process_service_attr_req()
421 attr_len = sdpu_get_attrib_entry_len(p_attr); in process_service_attr_req()
431 p_rsp = sdpu_build_partial_attrib_entry(p_rsp, p_attr, rem_len, in process_service_attr_req()
451 p_rsp, p_attr, (uint16_t)rem_len, &p_ccb->cont_info.attr_offset); in process_service_attr_req()
454 p_ccb->cont_info.next_attr_start_id = p_attr->id; in process_service_attr_req()
457 p_rsp = sdpu_build_attrib_entry(p_rsp, p_attr); in process_service_attr_req()
462 attr_seq.attr_entry[xx].start = p_attr->id + 1; in process_service_attr_req()
[all …]
Dsdpint.h257 extern uint8_t* sdpu_build_attrib_seq(uint8_t* p_out, uint16_t* p_attr,
259 extern uint8_t* sdpu_build_attrib_entry(uint8_t* p_out, tSDP_ATTRIBUTE* p_attr);
274 tSDP_DISC_ATTR* p_attr);
281 extern uint16_t sdpu_get_attrib_entry_len(tSDP_ATTRIBUTE* p_attr);
283 tSDP_ATTRIBUTE* p_attr,
/system/bt/bta/sdp/
Dbta_sdp_act.cc53 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/
Dhidh_api.cc73 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/
Dbta_mce_act.cc77 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/
Da2dp_api.cc67 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/
Dgatt_auth.cc47 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()
Dgatt_db.cc446 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 …]
Dgatt_cl.cc299 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/
Dbta_hf_client_sdp.cc220 tSDP_DISC_ATTR* p_attr; in bta_hf_client_sdp_find_attr() local
249 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_hf_client_sdp_find_attr()
250 if (p_attr != NULL) { in bta_hf_client_sdp_find_attr()
255 client_cb->peer_features = p_attr->attr_value.v.u16; in bta_hf_client_sdp_find_attr()
264 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_NETWORK); in bta_hf_client_sdp_find_attr()
265 if (p_attr != NULL) { in bta_hf_client_sdp_find_attr()
266 if (p_attr->attr_value.v.u16 == 0x01) { in bta_hf_client_sdp_find_attr()
/system/bt/bta/ag/
Dbta_ag_sdp.cc294 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/
Dbta_gattc_cache.cc537 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/
Davrc_bld_tg.cc914 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/
Dbta_av_act.cc1623 tSDP_DISC_ATTR* p_attr; in bta_av_check_peer_features() local
1660 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_av_check_peer_features()
1661 if (p_attr != NULL) { in bta_av_check_peer_features()
1662 categories = p_attr->attr_value.v.u16; in bta_av_check_peer_features()
1731 tSDP_DISC_ATTR* p_attr = in bta_avk_check_peer_features() local
1733 if (p_attr != NULL) { in bta_avk_check_peer_features()
1734 uint16_t categories = p_attr->attr_value.v.u16; in bta_avk_check_peer_features()
/system/bt/btif/src/
Dbtif_rc.cc3750 btrc_element_attr_val_t* p_attr = in handle_get_elem_attr_response() local
3760 p_attr[i].attr_id = p_rsp->p_attrs[i].attr_id; in handle_get_elem_attr_response()
3763 memcpy(p_attr[i].text, p_rsp->p_attrs[i].name.p_str, in handle_get_elem_attr_response()
3770 p_dev->rc_addr, p_rsp->num_attrs, p_attr)); in handle_get_elem_attr_response()
3771 do_in_jni_thread(FROM_HERE, base::Bind(osi_free, p_attr)); in handle_get_elem_attr_response()