Home
last modified time | relevance | path

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

/system/bt/stack/sdp/
Dsdp_api.cc221 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 …]
Dsdp_utils.cc66 for (tSDP_DISC_ATTR* p_attr = p_rec->p_first_attr; p_attr != nullptr; in sdpu_find_profile_version() local
67 p_attr = p_attr->p_next_attr) { in sdpu_find_profile_version()
69 if (p_attr->attr_id != ATTR_ID_BT_PROFILE_DESC_LIST || in sdpu_find_profile_version()
70 SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) != DATA_ELE_SEQ_DESC_TYPE) { in sdpu_find_profile_version()
74 for (tSDP_DISC_ATTR* p_sattr = p_attr->attr_value.v.p_sub_attr; in sdpu_find_profile_version()
119 for (tSDP_DISC_ATTR* p_attr = p_rec->p_first_attr; p_attr != nullptr; in sdpu_find_most_specific_service_uuid() local
120 p_attr = p_attr->p_next_attr) { in sdpu_find_most_specific_service_uuid()
121 if (p_attr->attr_id == ATTR_ID_SERVICE_CLASS_ID_LIST && in sdpu_find_most_specific_service_uuid()
122 SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == DATA_ELE_SEQ_DESC_TYPE) { in sdpu_find_most_specific_service_uuid()
123 tSDP_DISC_ATTR* p_first_attr = p_attr->attr_value.v.p_sub_attr; in sdpu_find_most_specific_service_uuid()
[all …]
Dsdp_db.cc54 tSDP_ATTRIBUTE* p_attr; in sdp_db_service_search() local
68 p_attr = &p_rec->attribute[0]; in sdp_db_service_search()
69 for (xx = 0; xx < p_rec->num_attributes; xx++, p_attr++) { in sdp_db_service_search()
70 if (p_attr->type == UUID_DESC_TYPE) { in sdp_db_service_search()
71 if (sdpu_compare_uuid_arrays(p_attr->value_ptr, p_attr->len, in sdp_db_service_search()
75 } else if (p_attr->type == DATA_ELE_SEQ_DESC_TYPE) { in sdp_db_service_search()
76 if (find_uuid_in_seq(p_attr->value_ptr, p_attr->len, in sdp_db_service_search()
397 tSDP_ATTRIBUTE* p_attr = &p_rec->attribute[0]; in SDP_AddAttribute() local
400 for (xx = 0; xx < p_rec->num_attributes; xx++, p_attr++) { in SDP_AddAttribute()
402 if (p_attr->id == attr_id) { in SDP_AddAttribute()
[all …]
Dsdp_discovery.cc792 tSDP_DISC_ATTR* p_attr; in add_attr() local
831 p_attr = (tSDP_DISC_ATTR*)p_db->p_free_mem; in add_attr()
832 p_attr->attr_id = attr_id; in add_attr()
833 p_attr->attr_len_type = (uint16_t)attr_len | (attr_type << 12); in add_attr()
834 p_attr->p_next_attr = NULL; in add_attr()
858 p_attr, (uint8_t)(nest_level + 1)); in add_attr()
868 p_attr->attr_value.v.u8 = *p++; in add_attr()
871 BE_STREAM_TO_UINT16(p_attr->attr_value.v.u16, p); in add_attr()
874 BE_STREAM_TO_UINT32(p_attr->attr_value.v.u32, p); in add_attr()
877 BE_STREAM_TO_ARRAY(p, p_attr->attr_value.v.array, (int32_t)attr_len); in add_attr()
[all …]
Dsdp_server.cc319 tSDP_ATTRIBUTE* p_attr; in process_service_attr_req() local
403 p_attr = sdp_db_find_attr_in_rec(p_rec, attr_seq.attr_entry[xx].start, in process_service_attr_req()
406 if (p_attr) { in process_service_attr_req()
413 p_ccb->cont_info.next_attr_start_id = p_attr->id; in process_service_attr_req()
417 attr_len = sdpu_get_attrib_entry_len(p_attr); in process_service_attr_req()
427 p_rsp = sdpu_build_partial_attrib_entry(p_rsp, p_attr, rem_len, in process_service_attr_req()
447 p_rsp, p_attr, (uint16_t)rem_len, &p_ccb->cont_info.attr_offset); in process_service_attr_req()
450 p_ccb->cont_info.next_attr_start_id = p_attr->id; in process_service_attr_req()
453 p_rsp = sdpu_build_attrib_entry(p_rsp, p_attr); in process_service_attr_req()
458 attr_seq.attr_entry[xx].start = p_attr->id + 1; in process_service_attr_req()
[all …]
Dsdpint.h201 extern uint8_t* sdpu_build_attrib_seq(uint8_t* p_out, uint16_t* p_attr,
203 extern uint8_t* sdpu_build_attrib_entry(uint8_t* p_out, tSDP_ATTRIBUTE* p_attr);
218 tSDP_DISC_ATTR* p_attr);
225 extern uint16_t sdpu_get_attrib_entry_len(tSDP_ATTRIBUTE* p_attr);
227 tSDP_ATTRIBUTE* p_attr,
229 extern uint16_t sdpu_is_avrcp_profile_description_list(tSDP_ATTRIBUTE* p_attr);
/system/bt/bta/sdp/
Dbta_sdp_act.cc36 tSDP_DISC_ATTR* p_attr; in bta_create_mns_sdp_record() local
47 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_MAP_SUPPORTED_FEATURES); in bta_create_mns_sdp_record()
48 if (p_attr != NULL) { in bta_create_mns_sdp_record()
49 record->mns.supported_features = p_attr->attr_value.v.u32; in bta_create_mns_sdp_record()
52 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_NAME); in bta_create_mns_sdp_record()
53 if (p_attr != NULL) { in bta_create_mns_sdp_record()
55 SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in bta_create_mns_sdp_record()
56 record->mns.hdr.service_name = (char*)p_attr->attr_value.v.array; in bta_create_mns_sdp_record()
68 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_GOEP_L2CAP_PSM); in bta_create_mns_sdp_record()
69 if (p_attr != NULL) { in bta_create_mns_sdp_record()
[all …]
/system/bt/stack/hid/
Dhidh_api.cc74 tSDP_DISC_ATTR* p_attr; in hidh_get_str_attr() local
77 p_attr = SDP_FindAttributeInRec(p_rec, attr_id); in hidh_get_str_attr()
78 if (p_attr != NULL) { in hidh_get_str_attr()
79 name_len = SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in hidh_get_str_attr()
81 memcpy(str, (char*)p_attr->attr_value.v.array, name_len); in hidh_get_str_attr()
84 memcpy(str, (char*)p_attr->attr_value.v.array, max_len - 1); in hidh_get_str_attr()
94 tSDP_DISC_ATTR *p_attr, *p_subattr1, *p_subattr2, *p_repdesc; in hidh_search_callback() local
116 if (((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_HID_DESCRIPTOR_LIST)) == in hidh_search_callback()
118 (SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) != DATA_ELE_SEQ_DESC_TYPE) || in hidh_search_callback()
119 ((p_subattr1 = p_attr->attr_value.v.p_sub_attr) == NULL) || in hidh_search_callback()
[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.cc50 tGATT_VALUE* p_attr = (tGATT_VALUE*)p_clcb->p_attr_buf; in gatt_sign_data() local
60 (uint8_t*)osi_malloc(p_attr->len + 3); /* 3 = 2 byte handle + opcode */ in gatt_sign_data()
64 UINT16_TO_STREAM(p, p_attr->handle); in gatt_sign_data()
65 ARRAY_TO_STREAM(p, p_attr->value, p_attr->len); in gatt_sign_data()
69 if ((payload_size - GATT_AUTH_SIGN_LEN - 3) < p_attr->len) in gatt_sign_data()
70 p_attr->len = payload_size - GATT_AUTH_SIGN_LEN - 3; in gatt_sign_data()
72 p_signature = p_attr->value + p_attr->len; in gatt_sign_data()
75 (uint16_t)(p_attr->len + 3), /* 3 = 2 byte handle + opcode */ in gatt_sign_data()
77 p_attr->len += BTM_BLE_AUTH_SIGN_LEN; in gatt_sign_data()
Dgatt_db.cc474 tGATT_ATTR* p_attr = find_attr_by_handle(p_db, handle); in gatts_read_attr_value_by_handle() local
475 if (!p_attr) return GATT_NOT_FOUND; in gatts_read_attr_value_by_handle()
478 tGATT_STATUS status = read_attr_value(*p_attr, offset, &pp, in gatts_read_attr_value_by_handle()
483 status = gatts_send_app_read_request(tcb, cid, op_code, p_attr->handle, in gatts_read_attr_value_by_handle()
484 offset, trans_id, p_attr->gatt_type); in gatts_read_attr_value_by_handle()
512 tGATT_ATTR* p_attr = find_attr_by_handle(p_db, handle); in gatts_read_attr_perm_check() local
513 if (!p_attr) return GATT_NOT_FOUND; in gatts_read_attr_perm_check()
515 return gatts_check_attr_readability(*p_attr, 0, is_long, sec_flag, key_size); in gatts_read_attr_perm_check()
546 tGATT_ATTR* p_attr = find_attr_by_handle(p_db, handle); in gatts_write_attr_perm_check() local
547 if (!p_attr) return GATT_NOT_FOUND; in gatts_write_attr_perm_check()
[all …]
Dgatt_cl.cc307 tGATT_VALUE* p_attr = (tGATT_VALUE*)p_clcb->p_attr_buf; in gatt_check_write_long_terminate() local
314 if (p_rsp_value->handle != p_attr->handle || in gatt_check_write_long_terminate()
316 memcmp(p_rsp_value->value, p_attr->value + p_attr->offset, in gatt_check_write_long_terminate()
326 if ((p_attr->offset += p_rsp_value->len) >= p_attr->len) terminate = true; in gatt_check_write_long_terminate()
337 tGATT_VALUE* p_attr = (tGATT_VALUE*)p_clcb->p_attr_buf; in gatt_send_prepare_write() local
341 uint16_t to_send = p_attr->len - p_attr->offset; in gatt_send_prepare_write()
348 p_clcb->s_handle = p_attr->handle; in gatt_send_prepare_write()
350 uint16_t offset = p_attr->offset; in gatt_send_prepare_write()
358 tcb, p_clcb, GATT_REQ_PREPARE_WRITE, p_attr->handle, to_send, /* length */ in gatt_send_prepare_write()
360 p_attr->value + p_attr->offset); /* data */ in gatt_send_prepare_write()
[all …]
/system/bt/bta/hf_client/
Dbta_hf_client_sdp.cc224 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/
Dbta_ag_sdp.cc291 tSDP_DISC_ATTR* p_attr; in bta_ag_sdp_find_attr() local
358 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_ag_sdp_find_attr()
359 if (p_attr != nullptr) { in bta_ag_sdp_find_attr()
363 uint16_t sdp_features = p_attr->attr_value.v.u16; in bta_ag_sdp_find_attr()
394 p_attr = in bta_ag_sdp_find_attr()
396 if (p_attr != nullptr) { in bta_ag_sdp_find_attr()
398 if (p_attr->attr_value.v.u8) in bta_ag_sdp_find_attr()
/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/gatt/
Dbta_gattc_cache.cc754 void bta_gattc_fill_gatt_db_el(btgatt_db_element_t* p_attr, in bta_gattc_fill_gatt_db_el() argument
759 p_attr->type = type; in bta_gattc_fill_gatt_db_el()
760 p_attr->attribute_handle = att_handle; in bta_gattc_fill_gatt_db_el()
761 p_attr->start_handle = s_handle; in bta_gattc_fill_gatt_db_el()
762 p_attr->end_handle = e_handle; in bta_gattc_fill_gatt_db_el()
763 p_attr->id = id; in bta_gattc_fill_gatt_db_el()
764 p_attr->properties = prop; in bta_gattc_fill_gatt_db_el()
768 p_attr->permissions = 0; in bta_gattc_fill_gatt_db_el()
769 p_attr->uuid = uuid; in bta_gattc_fill_gatt_db_el()
/system/bt/bta/test/
Dbta_dip_test.cc40 bool sdpu_compare_uuid_with_attr(const Uuid& uuid, tSDP_DISC_ATTR* p_attr) { in sdpu_compare_uuid_with_attr() argument
/system/bt/bta/av/
Dbta_av_act.cc1635 tSDP_DISC_ATTR* p_attr; in bta_av_check_peer_features() local
1672 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_av_check_peer_features()
1673 if (p_attr != NULL) { in bta_av_check_peer_features()
1674 categories = p_attr->attr_value.v.u16; in bta_av_check_peer_features()
1735 tSDP_DISC_ATTR* p_attr = in bta_avk_check_peer_features() local
1737 if (p_attr != NULL) { in bta_avk_check_peer_features()
1738 uint16_t categories = p_attr->attr_value.v.u16; in bta_avk_check_peer_features()
1788 tSDP_DISC_ATTR* p_attr = in bta_avk_get_cover_art_psm() local
1801 if (p_attr != NULL && SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) in bta_avk_get_cover_art_psm()
1805 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/
Dbtif_rc.cc3865 btrc_element_attr_val_t* p_attr = in handle_get_metadata_attr_response() local
3875 p_attr[i].attr_id = p_rsp->p_attrs[i].attr_id; in handle_get_metadata_attr_response()
3878 memcpy(p_attr[i].text, p_rsp->p_attrs[i].name.p_str, in handle_get_metadata_attr_response()
3885 p_dev->rc_addr, p_rsp->num_attrs, p_attr)); in handle_get_metadata_attr_response()
3886 do_in_jni_thread(FROM_HERE, base::Bind(osi_free, p_attr)); in handle_get_metadata_attr_response()