/system/bt/stack/sdp/ |
D | sdp_api.cc | 233 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 …]
|
D | sdp_utils.cc | 156 uint8_t* sdpu_build_attrib_seq(uint8_t* p_out, uint16_t* p_attr, in sdpu_build_attrib_seq() argument 162 if (!p_attr) in sdpu_build_attrib_seq() 178 if (!p_attr) { in sdpu_build_attrib_seq() 184 for (xx = 0; xx < num_attrs; xx++, p_attr++) { in sdpu_build_attrib_seq() 186 UINT16_TO_BE_STREAM(p_out, *p_attr); in sdpu_build_attrib_seq() 204 uint8_t* sdpu_build_attrib_entry(uint8_t* p_out, tSDP_ATTRIBUTE* p_attr) { in sdpu_build_attrib_entry() argument 207 UINT16_TO_BE_STREAM(p_out, p_attr->id); in sdpu_build_attrib_entry() 211 switch (p_attr->type) { in sdpu_build_attrib_entry() 217 if (p_attr->len > 0xFFFF) { in sdpu_build_attrib_entry() 218 UINT8_TO_BE_STREAM(p_out, (p_attr->type << 3) | SIZE_IN_NEXT_LONG); in sdpu_build_attrib_entry() [all …]
|
D | sdp_db.cc | 60 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 …]
|
D | sdp_discovery.cc | 861 tSDP_DISC_ATTR* p_attr; in add_attr() local 900 p_attr = (tSDP_DISC_ATTR*)p_db->p_free_mem; in add_attr() 901 p_attr->attr_id = attr_id; in add_attr() 902 p_attr->attr_len_type = (uint16_t)attr_len | (attr_type << 12); in add_attr() 903 p_attr->p_next_attr = NULL; in add_attr() 927 p_attr, (uint8_t)(nest_level + 1)); in add_attr() 937 p_attr->attr_value.v.u8 = *p++; in add_attr() 940 BE_STREAM_TO_UINT16(p_attr->attr_value.v.u16, p); in add_attr() 943 BE_STREAM_TO_UINT32(p_attr->attr_value.v.u32, p); in add_attr() 946 BE_STREAM_TO_ARRAY(p, p_attr->attr_value.v.array, (int32_t)attr_len); in add_attr() [all …]
|
D | sdp_server.cc | 323 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 …]
|
D | sdpint.h | 255 extern uint8_t* sdpu_build_attrib_seq(uint8_t* p_out, uint16_t* p_attr, 257 extern uint8_t* sdpu_build_attrib_entry(uint8_t* p_out, tSDP_ATTRIBUTE* p_attr); 272 tSDP_DISC_ATTR* p_attr); 279 extern uint16_t sdpu_get_attrib_entry_len(tSDP_ATTRIBUTE* p_attr); 281 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/bta/gatt/ |
D | bta_gattc_cache.cc | 747 void bta_gattc_fill_gatt_db_el(btgatt_db_element_t* p_attr, in bta_gattc_fill_gatt_db_el() argument 752 p_attr->type = type; in bta_gattc_fill_gatt_db_el() 753 p_attr->attribute_handle = att_handle; in bta_gattc_fill_gatt_db_el() 754 p_attr->start_handle = s_handle; in bta_gattc_fill_gatt_db_el() 755 p_attr->end_handle = e_handle; in bta_gattc_fill_gatt_db_el() 756 p_attr->id = id; in bta_gattc_fill_gatt_db_el() 757 p_attr->properties = prop; in bta_gattc_fill_gatt_db_el() 761 p_attr->permissions = 0; in bta_gattc_fill_gatt_db_el() 762 p_attr->uuid = uuid; in bta_gattc_fill_gatt_db_el() 913 tBTA_GATTC_NV_ATTR* p_attr) { in bta_gattc_rebuild_cache() argument [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) exec = true; in gatt_check_write_long_terminate() 330 tGATT_VALUE* p_attr = (tGATT_VALUE*)p_clcb->p_attr_buf; in gatt_send_prepare_write() local 334 uint16_t to_send = p_attr->len - p_attr->offset; in gatt_send_prepare_write() 340 p_clcb->s_handle = p_attr->handle; in gatt_send_prepare_write() 342 uint16_t offset = p_attr->offset; in gatt_send_prepare_write() 350 p_attr->handle, to_send, /* length */ in gatt_send_prepare_write() 352 p_attr->value + p_attr->offset); /* data */ in gatt_send_prepare_write() [all …]
|
/system/bt/bta/hl/ |
D | bta_hl_sdp.cc | 39 bool bta_hl_fill_sup_feature_list(const tSDP_DISC_ATTR* p_attr, in bta_hl_fill_sup_feature_list() argument 46 for (p_attr = p_attr->attr_value.v.p_sub_attr; p_attr; in bta_hl_fill_sup_feature_list() 47 p_attr = p_attr->p_next_attr) { in bta_hl_fill_sup_feature_list() 49 if (SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) != DATA_ELE_SEQ_DESC_TYPE) { in bta_hl_fill_sup_feature_list() 55 for (p_sattr = p_attr->attr_value.v.p_sub_attr; p_sattr && (item_cnt < 4); in bta_hl_fill_sup_feature_list() 530 tSDP_DISC_ATTR *p_attr, *p_sattr; in bta_hl_find_sink_or_src_srv_class_in_db() local 542 p_attr = p_rec->p_first_attr; in bta_hl_find_sink_or_src_srv_class_in_db() 543 while (p_attr) { in bta_hl_find_sink_or_src_srv_class_in_db() 544 if ((p_attr->attr_id == ATTR_ID_SERVICE_CLASS_ID_LIST) && in bta_hl_find_sink_or_src_srv_class_in_db() 545 (SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == in bta_hl_find_sink_or_src_srv_class_in_db() [all …]
|
D | bta_hl_act.cc | 1412 tSDP_DISC_ATTR* p_attr; in bta_hl_sdp_cback() local 1455 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_NAME); in bta_hl_sdp_cback() 1456 if (p_attr != NULL) { in bta_hl_sdp_cback() 1457 if (SDP_DISC_ATTR_LEN(p_attr->attr_len_type) < BT_MAX_SERVICE_NAME_LEN) in bta_hl_sdp_cback() 1458 name_len = (uint16_t)SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in bta_hl_sdp_cback() 1461 memcpy(p_hdp_rec->srv_name, p_attr->attr_value.v.array, name_len); in bta_hl_sdp_cback() 1465 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_DESCRIPTION); in bta_hl_sdp_cback() 1466 if (p_attr != NULL) { in bta_hl_sdp_cback() 1467 if (SDP_DISC_ATTR_LEN(p_attr->attr_len_type) < BT_MAX_SERVICE_NAME_LEN) in bta_hl_sdp_cback() 1468 name_len = (uint16_t)SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in bta_hl_sdp_cback() [all …]
|
D | bta_hl_int.h | 568 extern bool bta_hl_fill_sup_feature_list(const tSDP_DISC_ATTR* p_attr,
|
/system/bt/bta/hf_client/ |
D | bta_hf_client_sdp.cc | 220 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/ |
D | bta_ag_sdp.cc | 293 tSDP_DISC_ATTR* p_attr; in bta_ag_sdp_find_attr() local 360 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_ag_sdp_find_attr() 361 if (p_attr != nullptr) { in bta_ag_sdp_find_attr() 365 uint16_t sdp_features = p_attr->attr_value.v.u16; in bta_ag_sdp_find_attr() 396 p_attr = in bta_ag_sdp_find_attr() 398 if (p_attr != nullptr) { in bta_ag_sdp_find_attr() 400 if (p_attr->attr_value.v.u8) in bta_ag_sdp_find_attr()
|
/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 | 1615 tSDP_DISC_ATTR* p_attr; in bta_av_check_peer_features() local 1652 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_av_check_peer_features() 1653 if (p_attr != NULL) { in bta_av_check_peer_features() 1654 categories = p_attr->attr_value.v.u16; in bta_av_check_peer_features() 1723 tSDP_DISC_ATTR* p_attr = in bta_avk_check_peer_features() local 1725 if (p_attr != NULL) { in bta_avk_check_peer_features() 1726 uint16_t categories = p_attr->attr_value.v.u16; in bta_avk_check_peer_features()
|
/system/bt/btif/src/ |
D | btif_rc.cc | 3808 btrc_element_attr_val_t* p_attr = in handle_get_elem_attr_response() local 3818 p_attr[i].attr_id = p_rsp->p_attrs[i].attr_id; in handle_get_elem_attr_response() 3821 memcpy(p_attr[i].text, p_rsp->p_attrs[i].name.p_str, in handle_get_elem_attr_response() 3828 p_dev->rc_addr, p_rsp->num_attrs, p_attr)); in handle_get_elem_attr_response() 3829 do_in_jni_thread(FROM_HERE, base::Bind(osi_free, p_attr)); in handle_get_elem_attr_response()
|