/system/bt/stack/sdp/ |
D | sdp_api.c | 265 tSDP_DISC_ATTR *p_attr; in SDP_FindAttributeInDb() local 278 p_attr = p_rec->p_first_attr; in SDP_FindAttributeInDb() 279 while (p_attr) in SDP_FindAttributeInDb() 281 if (p_attr->attr_id == attr_id) in SDP_FindAttributeInDb() 284 p_attr = p_attr->p_next_attr; in SDP_FindAttributeInDb() 308 tSDP_DISC_ATTR *p_attr; in SDP_FindAttributeInRec() local 310 p_attr = p_rec->p_first_attr; in SDP_FindAttributeInRec() 311 while (p_attr) in SDP_FindAttributeInRec() 313 if (p_attr->attr_id == attr_id) in SDP_FindAttributeInRec() 314 return(p_attr); in SDP_FindAttributeInRec() [all …]
|
D | sdp_utils.c | 173 UINT8 *sdpu_build_attrib_seq (UINT8 *p_out, UINT16 *p_attr, UINT16 num_attrs) in sdpu_build_attrib_seq() argument 179 if (!p_attr) in sdpu_build_attrib_seq() 196 if (!p_attr) in sdpu_build_attrib_seq() 205 for (xx = 0; xx < num_attrs; xx++, p_attr++) in sdpu_build_attrib_seq() 208 UINT16_TO_BE_STREAM (p_out, *p_attr); in sdpu_build_attrib_seq() 227 UINT8 *sdpu_build_attrib_entry (UINT8 *p_out, tSDP_ATTRIBUTE *p_attr) in sdpu_build_attrib_entry() argument 231 UINT16_TO_BE_STREAM (p_out, p_attr->id); in sdpu_build_attrib_entry() 235 switch(p_attr->type) in sdpu_build_attrib_entry() 242 if(p_attr->len > 0xFFFF) in sdpu_build_attrib_entry() 244 UINT8_TO_BE_STREAM (p_out, (p_attr->type << 3) | SIZE_IN_NEXT_LONG); in sdpu_build_attrib_entry() [all …]
|
D | sdp_db.c | 62 tSDP_ATTRIBUTE *p_attr; in sdp_db_service_search() local 77 p_attr = &p_rec->attribute[0]; in sdp_db_service_search() 78 for (xx = 0; xx < p_rec->num_attributes; xx++, p_attr++) in sdp_db_service_search() 80 if (p_attr->type == UUID_DESC_TYPE) in sdp_db_service_search() 82 if (sdpu_compare_uuid_arrays (p_attr->value_ptr, p_attr->len, in sdp_db_service_search() 87 else if (p_attr->type == DATA_ELE_SEQ_DESC_TYPE) in sdp_db_service_search() 89 if (find_uuid_in_seq (p_attr->value_ptr, p_attr->len, in sdp_db_service_search() 441 tSDP_ATTRIBUTE *p_attr = &p_rec->attribute[0]; in SDP_AddAttribute() local 444 for (xx = 0; xx < p_rec->num_attributes; xx++, p_attr++) in SDP_AddAttribute() 447 if (p_attr->id == attr_id) in SDP_AddAttribute() [all …]
|
D | sdp_discovery.c | 835 tSDP_DISC_ATTR *p_attr; in add_attr() local 865 p_attr = (tSDP_DISC_ATTR *) p_db->p_free_mem; in add_attr() 866 p_attr->attr_id = attr_id; in add_attr() 867 p_attr->attr_len_type = (UINT16)attr_len | (attr_type << 12); in add_attr() 868 p_attr->p_next_attr = NULL; in add_attr() 895 … p = add_attr (p, p_db, p_rec, ATTR_ID_PROTOCOL_DESC_LIST, p_attr, (UINT8)(nest_level + 1)); in add_attr() 906 p_attr->attr_value.v.u8 = *p++; in add_attr() 909 BE_STREAM_TO_UINT16 (p_attr->attr_value.v.u16, p); in add_attr() 912 BE_STREAM_TO_UINT32 (p_attr->attr_value.v.u32, p); in add_attr() 915 BE_STREAM_TO_ARRAY (p, p_attr->attr_value.v.array, (INT32)attr_len); in add_attr() [all …]
|
D | sdp_server.c | 326 tSDP_ATTRIBUTE *p_attr; in process_service_attr_req() local 400 …p_attr = sdp_db_find_attr_in_rec (p_rec, attr_seq.attr_entry[xx].start, attr_seq.attr_entry[xx].en… in process_service_attr_req() 402 if (p_attr) in process_service_attr_req() 411 p_ccb->cont_info.next_attr_start_id = p_attr->id; in process_service_attr_req() 415 attr_len = sdpu_get_attrib_entry_len(p_attr); in process_service_attr_req() 419 p_rsp = sdpu_build_partial_attrib_entry (p_rsp, p_attr, rem_len, in process_service_attr_req() 438 p_rsp = sdpu_build_partial_attrib_entry (p_rsp, p_attr, (UINT16)rem_len, in process_service_attr_req() 442 p_ccb->cont_info.next_attr_start_id = p_attr->id; in process_service_attr_req() 446 p_rsp = sdpu_build_attrib_entry (p_rsp, p_attr); in process_service_attr_req() 452 attr_seq.attr_entry[xx].start = p_attr->id + 1; in process_service_attr_req() [all …]
|
D | sdpint.h | 277 extern UINT8 *sdpu_build_attrib_seq (UINT8 *p_out, UINT16 *p_attr, UINT16 num_attrs); 278 extern UINT8 *sdpu_build_attrib_entry (UINT8 *p_out, tSDP_ATTRIBUTE *p_attr); 288 extern BOOLEAN sdpu_compare_uuid_with_attr (tBT_UUID *p_btuuid, tSDP_DISC_ATTR *p_attr); 293 extern UINT16 sdpu_get_attrib_entry_len(tSDP_ATTRIBUTE *p_attr); 294 extern UINT8 *sdpu_build_partial_attrib_entry (UINT8 *p_out, tSDP_ATTRIBUTE *p_attr, UINT16 len, UI…
|
/system/bt/stack/gatt/ |
D | gatt_db.c | 43 static BOOLEAN deallocate_attr_in_db(tGATT_SVC_DB *p_db, void *p_attr); 118 static tGATT_STATUS gatts_check_attr_readability(tGATT_ATTR16 *p_attr, in gatts_check_attr_readability() argument 125 tGATT_PERM perm = p_attr->permission; in gatts_check_attr_readability() 168 switch (p_attr->uuid) in gatts_check_attr_readability() 207 static tGATT_STATUS read_attr_value (void *p_attr, in read_attr_value() argument 219 tGATT_ATTR16 *p_attr16 = (tGATT_ATTR16 *)p_attr; in read_attr_value() 228 …status = gatts_check_attr_readability((tGATT_ATTR16 *)p_attr, offset, read_long, sec_flag, key_siz… in read_attr_value() 335 tGATT_ATTR16 *p_attr; in gatts_db_read_attr_value_by_type() local 342 p_attr = (tGATT_ATTR16 *)p_db->p_attr_list; in gatts_db_read_attr_value_by_type() 344 while (p_attr && p_attr->handle <= e_handle) in gatts_db_read_attr_value_by_type() [all …]
|
D | gatt_auth.c | 46 tGATT_VALUE *p_attr = (tGATT_VALUE *)p_clcb->p_attr_buf; in gatt_sign_data() local 55 p_data = (UINT8 *)osi_malloc(p_attr->len + 3); /* 3 = 2 byte handle + opcode */ in gatt_sign_data() 59 UINT16_TO_STREAM(p, p_attr->handle); in gatt_sign_data() 60 ARRAY_TO_STREAM(p, p_attr->value, p_attr->len); in gatt_sign_data() 63 if ((payload_size - GATT_AUTH_SIGN_LEN - 3) < p_attr->len) in gatt_sign_data() 64 p_attr->len = payload_size - GATT_AUTH_SIGN_LEN - 3; in gatt_sign_data() 66 p_signature = p_attr->value + p_attr->len; in gatt_sign_data() 69 (UINT16)(p_attr->len + 3), /* 3 = 2 byte handle + opcode */ in gatt_sign_data() 71 p_attr->len += BTM_BLE_AUTH_SIGN_LEN; in gatt_sign_data()
|
D | gatt_cl.c | 229 tGATT_VALUE *p_attr = (tGATT_VALUE *)p_clcb->p_attr_buf; in gatt_act_write() local 231 if (p_attr) in gatt_act_write() 236 p_clcb->s_handle = p_attr->handle; in gatt_act_write() 241 p_attr->handle, in gatt_act_write() 242 p_attr->len, in gatt_act_write() 244 p_attr->value); in gatt_act_write() 248 if (p_attr->len <= (p_tcb->payload_size - GATT_HDR_SIZE)) in gatt_act_write() 250 p_clcb->s_handle = p_attr->handle; in gatt_act_write() 255 p_attr->handle, in gatt_act_write() 256 p_attr->len, in gatt_act_write() [all …]
|
D | gatt_sr.c | 602 tGATT_ATTR16 *p_attr = NULL; in gatt_build_find_info_rsp() local 609 p_attr = (tGATT_ATTR16 *) p_rcb->p_db->p_attr_list; in gatt_build_find_info_rsp() 613 while (p_attr) in gatt_build_find_info_rsp() 615 if (p_attr->handle > e_hdl) in gatt_build_find_info_rsp() 620 if (p_attr->handle >= s_hdl) in gatt_build_find_info_rsp() 623 …p_msg->offset = (p_attr->uuid_type == GATT_ATTR_UUID_TYPE_16) ? GATT_INFO_TYPE_PAIR_16 : GATT_INFO… in gatt_build_find_info_rsp() 627 … if (p_msg->offset == GATT_INFO_TYPE_PAIR_16 && p_attr->uuid_type == GATT_ATTR_UUID_TYPE_16) in gatt_build_find_info_rsp() 629 UINT16_TO_STREAM(p, p_attr->handle); in gatt_build_find_info_rsp() 630 UINT16_TO_STREAM(p, p_attr->uuid); in gatt_build_find_info_rsp() 632 …else if (p_msg->offset == GATT_INFO_TYPE_PAIR_128 && p_attr->uuid_type == GATT_ATTR_UUID_TYPE_128 … in gatt_build_find_info_rsp() [all …]
|
/system/bt/bta/sdp/ |
D | bta_sdp_act.c | 95 tSDP_DISC_ATTR *p_attr; in bta_create_mns_sdp_record() local 106 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_MAP_SUPPORTED_FEATURES)) != NULL) in bta_create_mns_sdp_record() 108 record->mns.supported_features = p_attr->attr_value.v.u32; in bta_create_mns_sdp_record() 111 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_NAME)) != NULL) in bta_create_mns_sdp_record() 113 record->mns.hdr.service_name_length = SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in bta_create_mns_sdp_record() 114 record->mns.hdr.service_name = (char *)p_attr->attr_value.v.array; in bta_create_mns_sdp_record() 127 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_GOEP_L2CAP_PSM)) != NULL) in bta_create_mns_sdp_record() 129 record->mns.hdr.l2cap_psm = p_attr->attr_value.v.u16; in bta_create_mns_sdp_record() 135 tSDP_DISC_ATTR *p_attr; in bta_create_mas_sdp_record() local 149 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_MAS_INSTANCE_ID)) != NULL) in bta_create_mas_sdp_record() [all …]
|
/system/bt/stack/hid/ |
D | hidh_api.c | 79 tSDP_DISC_ATTR *p_attr; in hidh_get_str_attr() local 82 if ((p_attr = SDP_FindAttributeInRec(p_rec, attr_id)) != NULL) in hidh_get_str_attr() 84 if((name_len = SDP_DISC_ATTR_LEN(p_attr->attr_len_type)) < max_len ) in hidh_get_str_attr() 86 memcpy( str, (char *) p_attr->attr_value.v.array, name_len ); in hidh_get_str_attr() 91 memcpy( str, (char *) p_attr->attr_value.v.array, max_len-1 ); in hidh_get_str_attr() 104 tSDP_DISC_ATTR *p_attr, *p_subattr1, *p_subattr2, *p_repdesc; in hidh_search_callback() local 129 if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_DESCRIPTOR_LIST)) == NULL) in hidh_search_callback() 130 || (SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) != DATA_ELE_SEQ_DESC_TYPE) in hidh_search_callback() 131 || ((p_subattr1 = p_attr->attr_value.v.p_sub_attr) == NULL) in hidh_search_callback() 144 if (((p_attr = SDP_FindAttributeInRec (p_rec, ATTR_ID_HID_VIRTUAL_CABLE)) != NULL) && in hidh_search_callback() [all …]
|
/system/bt/bta/mce/ |
D | bta_mce_act.c | 80 tSDP_DISC_ATTR *p_attr; in bta_mce_search_cback() local 95 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_NAME)) == NULL) in bta_mce_search_cback() 98 evt_data.mas[found].p_srv_name = (char *) p_attr->attr_value.v.array; in bta_mce_search_cback() 99 evt_data.mas[found].srv_name_len= SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in bta_mce_search_cback() 101 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_MAS_INSTANCE_ID)) == NULL) in bta_mce_search_cback() 104 evt_data.mas[found].instance_id = p_attr->attr_value.v.u8; in bta_mce_search_cback() 106 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_MSG_TYPE)) == NULL) in bta_mce_search_cback() 109 evt_data.mas[found].msg_type = p_attr->attr_value.v.u8; in bta_mce_search_cback()
|
/system/bt/bta/gatt/ |
D | bta_gattc_cache.c | 86 tBTA_GATTC_CACHE_ATTR *p_attr = data; in display_cache_attribute() local 88 p_attr->handle, p_attr->uuid.uu.uuid16, in display_cache_attribute() 89 bta_gattc_attr_type[p_attr->attr_type], p_attr->property); in display_cache_attribute() 1126 void bta_gattc_fill_gatt_db_el(btgatt_db_element_t *p_attr, in bta_gattc_fill_gatt_db_el() argument 1132 p_attr->type = type; in bta_gattc_fill_gatt_db_el() 1133 p_attr->attribute_handle = att_handle; in bta_gattc_fill_gatt_db_el() 1134 p_attr->start_handle = s_handle; in bta_gattc_fill_gatt_db_el() 1135 p_attr->end_handle = e_handle; in bta_gattc_fill_gatt_db_el() 1136 p_attr->id = id; in bta_gattc_fill_gatt_db_el() 1137 p_attr->properties = prop; in bta_gattc_fill_gatt_db_el() [all …]
|
/system/bt/stack/a2dp/ |
D | a2d_api.c | 58 tSDP_DISC_ATTR *p_attr; in a2d_sdp_cback() local 79 if ((p_attr = SDP_FindAttributeInRec(p_rec, in a2d_sdp_cback() 82 a2d_svc.p_service_name = (char *) p_attr->attr_value.v.array; in a2d_sdp_cback() 83 a2d_svc.service_len = SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in a2d_sdp_cback() 87 if ((p_attr = SDP_FindAttributeInRec(p_rec, in a2d_sdp_cback() 90 a2d_svc.p_provider_name = (char *) p_attr->attr_value.v.array; in a2d_sdp_cback() 91 a2d_svc.provider_len = SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in a2d_sdp_cback() 95 if ((p_attr = SDP_FindAttributeInRec(p_rec, in a2d_sdp_cback() 98 a2d_svc.features = p_attr->attr_value.v.u16; in a2d_sdp_cback()
|
/system/bt/bta/hl/ |
D | bta_hl_sdp.c | 38 BOOLEAN 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; 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() 56 …for (p_sattr = p_attr->attr_value.v.p_sub_attr; p_sattr && (item_cnt < 4) ; p_sattr = p_sattr->p_n… in bta_hl_fill_sup_feature_list() 583 tSDP_DISC_ATTR *p_attr, *p_sattr; in bta_hl_find_sink_or_src_srv_class_in_db() local 602 p_attr = p_rec->p_first_attr; in bta_hl_find_sink_or_src_srv_class_in_db() 603 while (p_attr) in bta_hl_find_sink_or_src_srv_class_in_db() 605 if ((p_attr->attr_id == ATTR_ID_SERVICE_CLASS_ID_LIST) in bta_hl_find_sink_or_src_srv_class_in_db() 606 && (SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == DATA_ELE_SEQ_DESC_TYPE)) in bta_hl_find_sink_or_src_srv_class_in_db() 608 … for (p_sattr = p_attr->attr_value.v.p_sub_attr; p_sattr; p_sattr = p_sattr->p_next_attr) in bta_hl_find_sink_or_src_srv_class_in_db() [all …]
|
D | bta_hl_act.c | 1690 tSDP_DISC_ATTR *p_attr; in bta_hl_sdp_cback() local 1742 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_NAME)) != NULL) in bta_hl_sdp_cback() 1744 if (SDP_DISC_ATTR_LEN(p_attr->attr_len_type) < BT_MAX_SERVICE_NAME_LEN) in bta_hl_sdp_cback() 1745 name_len = (UINT16)SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in bta_hl_sdp_cback() 1748 memcpy(p_hdp_rec->srv_name, p_attr->attr_value.v.array, name_len); in bta_hl_sdp_cback() 1752 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_DESCRIPTION)) != NULL) in bta_hl_sdp_cback() 1754 if (SDP_DISC_ATTR_LEN(p_attr->attr_len_type) < BT_MAX_SERVICE_NAME_LEN) in bta_hl_sdp_cback() 1755 name_len = (UINT16)SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in bta_hl_sdp_cback() 1758 memcpy(p_hdp_rec->srv_desp, p_attr->attr_value.v.array, name_len); in bta_hl_sdp_cback() 1763 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_PROVIDER_NAME)) != NULL) in bta_hl_sdp_cback() [all …]
|
D | bta_hl_int.h | 607 extern BOOLEAN bta_hl_fill_sup_feature_list( const tSDP_DISC_ATTR *p_attr,
|
/system/bt/bta/hf_client/ |
D | bta_hf_client_sdp.c | 220 tSDP_DISC_ATTR *p_attr; in bta_hf_client_sdp_find_attr() local 252 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES)) != NULL) in bta_hf_client_sdp_find_attr() 259 bta_hf_client_cb.scb.peer_features = p_attr->attr_value.v.u16; in bta_hf_client_sdp_find_attr() 269 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_NETWORK)) != NULL) in bta_hf_client_sdp_find_attr() 271 if (p_attr->attr_value.v.u16 == 0x01) in bta_hf_client_sdp_find_attr()
|
/system/bt/bta/ag/ |
D | bta_ag_sdp.c | 308 tSDP_DISC_ATTR *p_attr; in bta_ag_sdp_find_attr() local 366 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES)) != NULL) in bta_ag_sdp_find_attr() 372 p_scb->peer_features = p_attr->attr_value.v.u16; in bta_ag_sdp_find_attr() 377 … if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_REMOTE_AUDIO_VOLUME_CONTROL)) != NULL) in bta_ag_sdp_find_attr() 380 if (p_attr->attr_value.v.u8) in bta_ag_sdp_find_attr()
|
/system/bt/bta/av/ |
D | bta_av_act.c | 1668 tSDP_DISC_ATTR *p_attr; in bta_av_check_peer_features() local 1709 if ((p_attr = SDP_FindAttributeInRec(p_rec, in bta_av_check_peer_features() 1712 categories = p_attr->attr_value.v.u16; in bta_av_check_peer_features() 1779 tSDP_DISC_ATTR *p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_avk_check_peer_features() local 1780 if (p_attr != NULL) in bta_avk_check_peer_features() 1782 UINT16 categories = p_attr->attr_value.v.u16; in bta_avk_check_peer_features()
|
/system/bt/btif/src/ |
D | btif_rc.c | 3010 btrc_element_attr_val_t *p_attr = in handle_get_elem_attr_response() local 3016 p_attr[i].attr_id = p_rsp->p_attrs[i].attr_id; in handle_get_elem_attr_response() 3020 memcpy(p_attr[i].text, p_rsp->p_attrs[i].name.p_str, in handle_get_elem_attr_response() 3026 &rc_addr, p_rsp->num_attr, p_attr); in handle_get_elem_attr_response() 3027 osi_free(p_attr); in handle_get_elem_attr_response()
|