/packages/modules/Bluetooth/system/bta/sdp/ |
D | bta_sdp_act.cc | 40 tSDP_DISC_ATTR* p_attr; in bta_create_mns_sdp_record() local 51 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_MAP_SUPPORTED_FEATURES); in bta_create_mns_sdp_record() 52 if (p_attr != NULL) { in bta_create_mns_sdp_record() 53 if (SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == UINT_DESC_TYPE && in bta_create_mns_sdp_record() 54 SDP_DISC_ATTR_LEN(p_attr->attr_len_type) >= 4) { in bta_create_mns_sdp_record() 55 record->mns.supported_features = p_attr->attr_value.v.u32; in bta_create_mns_sdp_record() 63 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_NAME); in bta_create_mns_sdp_record() 64 if (p_attr != NULL) { in bta_create_mns_sdp_record() 65 if (SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == TEXT_STR_DESC_TYPE) { in bta_create_mns_sdp_record() 67 SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in bta_create_mns_sdp_record() [all …]
|
/packages/modules/Bluetooth/system/stack/sdp/ |
D | sdp_api.cc | 232 tSDP_DISC_ATTR* p_attr; in SDP_FindAttributeInRec() local 234 p_attr = p_rec->p_first_attr; in SDP_FindAttributeInRec() 235 while (p_attr) { in SDP_FindAttributeInRec() 236 if (p_attr->attr_id == attr_id) return (p_attr); in SDP_FindAttributeInRec() 238 p_attr = p_attr->p_next_attr; in SDP_FindAttributeInRec() 259 tSDP_DISC_ATTR *p_attr, *p_sattr, *p_extra_sattr; in SDP_FindServiceUUIDInRec() local 261 p_attr = p_rec->p_first_attr; in SDP_FindServiceUUIDInRec() 263 while (p_attr) { in SDP_FindServiceUUIDInRec() 264 if ((p_attr->attr_id == ATTR_ID_SERVICE_CLASS_ID_LIST) && in SDP_FindServiceUUIDInRec() 265 (SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == DATA_ELE_SEQ_DESC_TYPE)) { in SDP_FindServiceUUIDInRec() [all …]
|
D | sdp_utils.cc | 82 for (tSDP_DISC_ATTR* p_attr = p_rec->p_first_attr; p_attr != nullptr; in sdpu_find_profile_version() local 83 p_attr = p_attr->p_next_attr) { in sdpu_find_profile_version() 85 if (p_attr->attr_id != ATTR_ID_BT_PROFILE_DESC_LIST || in sdpu_find_profile_version() 86 SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) != DATA_ELE_SEQ_DESC_TYPE) { in sdpu_find_profile_version() 90 for (tSDP_DISC_ATTR* p_sattr = p_attr->attr_value.v.p_sub_attr; in sdpu_find_profile_version() 140 for (tSDP_DISC_ATTR* p_attr = p_rec->p_first_attr; p_attr != nullptr; in sdpu_find_most_specific_service_uuid() local 141 p_attr = p_attr->p_next_attr) { in sdpu_find_most_specific_service_uuid() 142 if (p_attr->attr_id == ATTR_ID_SERVICE_CLASS_ID_LIST && in sdpu_find_most_specific_service_uuid() 143 SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == DATA_ELE_SEQ_DESC_TYPE) { in sdpu_find_most_specific_service_uuid() 144 tSDP_DISC_ATTR* p_first_attr = p_attr->attr_value.v.p_sub_attr; in sdpu_find_most_specific_service_uuid() [all …]
|
D | sdp_server.cc | 98 bool sdp_dynamic_change_hfp_version(const tSDP_ATTRIBUTE* p_attr, 100 void hfp_fallback(bool& is_hfp_fallback, const tSDP_ATTRIBUTE* p_attr); 160 bool sdp_dynamic_change_hfp_version(const tSDP_ATTRIBUTE* p_attr, in sdp_dynamic_change_hfp_version() argument 162 if ((p_attr->id != ATTR_ID_BT_PROFILE_DESC_LIST) || in sdp_dynamic_change_hfp_version() 163 (p_attr->len < SDP_PROFILE_DESC_LENGTH)) { in sdp_dynamic_change_hfp_version() 167 if (((p_attr->value_ptr[3] << SDP_PROFILE_DESC_LENGTH) | in sdp_dynamic_change_hfp_version() 168 (p_attr->value_ptr[4])) != UUID_SERVCLASS_HF_HANDSFREE) { in sdp_dynamic_change_hfp_version() 179 p_attr->value_ptr[PROFILE_VERSION_POSITION] = HFP_PROFILE_MINOR_VERSION_7; in sdp_dynamic_change_hfp_version() 181 p_attr->value_ptr[PROFILE_VERSION_POSITION], in sdp_dynamic_change_hfp_version() 194 void hfp_fallback(bool& is_hfp_fallback, const tSDP_ATTRIBUTE* p_attr) { in hfp_fallback() argument [all …]
|
D | sdp_db.cc | 59 const tSDP_ATTRIBUTE* p_attr; in sdp_db_service_search() local 73 p_attr = &p_rec->attribute[0]; in sdp_db_service_search() 74 for (xx = 0; xx < p_rec->num_attributes; xx++, p_attr++) { in sdp_db_service_search() 75 if (p_attr->type == UUID_DESC_TYPE) { in sdp_db_service_search() 76 if (sdpu_compare_uuid_arrays(p_attr->value_ptr, p_attr->len, in sdp_db_service_search() 80 } else if (p_attr->type == DATA_ELE_SEQ_DESC_TYPE) { in sdp_db_service_search() 81 if (find_uuid_in_seq(p_attr->value_ptr, p_attr->len, in sdp_db_service_search() 445 tSDP_ATTRIBUTE* p_attr = &p_rec->attribute[0]; in SDP_AddAttributeToRecord() local 448 for (xx = 0; xx < p_rec->num_attributes; xx++, p_attr++) { in SDP_AddAttributeToRecord() 450 if (p_attr->id == attr_id) { in SDP_AddAttributeToRecord() [all …]
|
D | sdp_discovery.cc | 827 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_t)attr_len | (attr_type << 12); in add_attr() 868 p_attr->p_next_attr = NULL; in add_attr() 892 p_attr, (uint8_t)(nest_level + 1)); in add_attr() 902 p_attr->attr_value.v.u8 = *p++; in add_attr() 905 BE_STREAM_TO_UINT16(p_attr->attr_value.v.u16, p); in add_attr() 908 BE_STREAM_TO_UINT32(p_attr->attr_value.v.u32, p); in add_attr() 911 BE_STREAM_TO_ARRAY(p, p_attr->attr_value.v.array, (int32_t)attr_len); in add_attr() [all …]
|
D | sdpint.h | 272 uint8_t* sdpu_build_attrib_seq(uint8_t* p_out, uint16_t* p_attr, 274 uint8_t* sdpu_build_attrib_entry(uint8_t* p_out, const tSDP_ATTRIBUTE* p_attr); 289 tSDP_DISC_ATTR* p_attr); 295 uint16_t sdpu_get_attrib_entry_len(const tSDP_ATTRIBUTE* p_attr); 297 const tSDP_ATTRIBUTE* p_attr, 306 uint16_t sdpu_is_avrcp_profile_description_list(const tSDP_ATTRIBUTE* p_attr); 307 bool sdpu_is_service_id_avrc_target(const tSDP_ATTRIBUTE* p_attr); 309 void sdpu_set_avrc_target_version(const tSDP_ATTRIBUTE* p_attr, 311 void sdpu_set_avrc_target_features(const tSDP_ATTRIBUTE* p_attr,
|
/packages/modules/Bluetooth/system/stack/hid/ |
D | hidh_api.cc | 86 tSDP_DISC_ATTR* p_attr; in hidh_get_str_attr() local 89 p_attr = SDP_FindAttributeInRec(p_rec, attr_id); in hidh_get_str_attr() 90 if (p_attr != NULL) { in hidh_get_str_attr() 91 if (SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == TEXT_STR_DESC_TYPE) { in hidh_get_str_attr() 92 name_len = SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in hidh_get_str_attr() 94 memcpy(str, (char*)p_attr->attr_value.v.array, name_len); in hidh_get_str_attr() 97 memcpy(str, (char*)p_attr->attr_value.v.array, max_len - 1); in hidh_get_str_attr() 111 tSDP_DISC_ATTR *p_attr, *p_subattr1, *p_subattr2, *p_repdesc; in hidh_search_callback() local 133 if (((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_HID_DESCRIPTOR_LIST)) == in hidh_search_callback() 135 (SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) != DATA_ELE_SEQ_DESC_TYPE) || in hidh_search_callback() [all …]
|
/packages/modules/Bluetooth/system/stack/a2dp/ |
D | a2dp_api.cc | 71 tSDP_DISC_ATTR* p_attr; in a2dp_sdp_cback() local 91 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SERVICE_NAME)) != NULL) { in a2dp_sdp_cback() 92 if (SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == TEXT_STR_DESC_TYPE) { in a2dp_sdp_cback() 93 a2dp_svc.p_service_name = (char*)p_attr->attr_value.v.array; in a2dp_sdp_cback() 94 a2dp_svc.service_len = SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in a2dp_sdp_cback() 103 if ((p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_PROVIDER_NAME)) != in a2dp_sdp_cback() 105 if (SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == TEXT_STR_DESC_TYPE) { in a2dp_sdp_cback() 106 a2dp_svc.p_provider_name = (char*)p_attr->attr_value.v.array; in a2dp_sdp_cback() 107 a2dp_svc.provider_len = SDP_DISC_ATTR_LEN(p_attr->attr_len_type); in a2dp_sdp_cback() 116 if ((p_attr = SDP_FindAttributeInRec( in a2dp_sdp_cback() [all …]
|
/packages/modules/Bluetooth/system/bta/hf_client/ |
D | bta_hf_client_sdp.cc | 223 tSDP_DISC_ATTR* p_attr; in bta_hf_client_sdp_find_attr() local 252 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_hf_client_sdp_find_attr() 253 if (p_attr != NULL && in bta_hf_client_sdp_find_attr() 254 SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == UINT_DESC_TYPE && in bta_hf_client_sdp_find_attr() 255 SDP_DISC_ATTR_LEN(p_attr->attr_len_type) >= 2) { in bta_hf_client_sdp_find_attr() 260 client_cb->peer_features = p_attr->attr_value.v.u16; in bta_hf_client_sdp_find_attr() 269 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_NETWORK); in bta_hf_client_sdp_find_attr() 270 if (p_attr != NULL && in bta_hf_client_sdp_find_attr() 271 SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == UINT_DESC_TYPE && in bta_hf_client_sdp_find_attr() 272 SDP_DISC_ATTR_LEN(p_attr->attr_len_type) >= 2) { in bta_hf_client_sdp_find_attr() [all …]
|
/packages/modules/Bluetooth/system/stack/gatt/ |
D | gatt_db.cc | 491 tGATT_ATTR* p_attr = find_attr_by_handle(p_db, handle); in gatts_read_attr_value_by_handle() local 492 if (!p_attr) return GATT_NOT_FOUND; in gatts_read_attr_value_by_handle() 495 tGATT_STATUS status = read_attr_value(*p_attr, offset, &pp, in gatts_read_attr_value_by_handle() 500 status = gatts_send_app_read_request(tcb, cid, op_code, p_attr->handle, in gatts_read_attr_value_by_handle() 501 offset, trans_id, p_attr->gatt_type); in gatts_read_attr_value_by_handle() 529 tGATT_ATTR* p_attr = find_attr_by_handle(p_db, handle); in gatts_read_attr_perm_check() local 530 if (!p_attr) return GATT_NOT_FOUND; in gatts_read_attr_perm_check() 532 return gatts_check_attr_readability(*p_attr, 0, is_long, sec_flag, key_size); in gatts_read_attr_perm_check() 563 tGATT_ATTR* p_attr = find_attr_by_handle(p_db, handle); in gatts_write_attr_perm_check() local 564 if (!p_attr) return GATT_NOT_FOUND; in gatts_write_attr_perm_check() [all …]
|
D | gatt_auth.cc | 51 tGATT_VALUE* p_attr = (tGATT_VALUE*)p_clcb->p_attr_buf; in gatt_sign_data() local 61 (uint8_t*)osi_malloc(p_attr->len + 3); /* 3 = 2 byte handle + opcode */ in gatt_sign_data() 65 UINT16_TO_STREAM(p, p_attr->handle); in gatt_sign_data() 66 ARRAY_TO_STREAM(p, p_attr->value, p_attr->len); in gatt_sign_data() 70 if ((payload_size - GATT_AUTH_SIGN_LEN - 3) < p_attr->len) in gatt_sign_data() 71 p_attr->len = payload_size - GATT_AUTH_SIGN_LEN - 3; in gatt_sign_data() 73 p_signature = p_attr->value + p_attr->len; in gatt_sign_data() 76 (uint16_t)(p_attr->len + 3), /* 3 = 2 byte handle + opcode */ in gatt_sign_data() 78 p_attr->len += BTM_BLE_AUTH_SIGN_LEN; in gatt_sign_data()
|
D | gatt_cl.cc | 318 tGATT_VALUE* p_attr = (tGATT_VALUE*)p_clcb->p_attr_buf; in gatt_check_write_long_terminate() local 325 if (p_rsp_value->handle != p_attr->handle || in gatt_check_write_long_terminate() 327 memcmp(p_rsp_value->value, p_attr->value + p_attr->offset, in gatt_check_write_long_terminate() 337 if ((p_attr->offset += p_rsp_value->len) >= p_attr->len) terminate = true; in gatt_check_write_long_terminate() 348 tGATT_VALUE* p_attr = (tGATT_VALUE*)p_clcb->p_attr_buf; in gatt_send_prepare_write() local 352 uint16_t to_send = p_attr->len - p_attr->offset; in gatt_send_prepare_write() 359 p_clcb->s_handle = p_attr->handle; in gatt_send_prepare_write() 361 uint16_t offset = p_attr->offset; in gatt_send_prepare_write() 369 tcb, p_clcb, GATT_REQ_PREPARE_WRITE, p_attr->handle, to_send, /* length */ in gatt_send_prepare_write() 371 p_attr->value + p_attr->offset); /* data */ in gatt_send_prepare_write() [all …]
|
/packages/modules/Bluetooth/system/bta/ag/ |
D | bta_ag_sdp.cc | 309 tSDP_DISC_ATTR* p_attr; in bta_ag_sdp_find_attr() local 376 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_ag_sdp_find_attr() 377 if (p_attr != nullptr && in bta_ag_sdp_find_attr() 378 SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == UINT_DESC_TYPE && in bta_ag_sdp_find_attr() 379 SDP_DISC_ATTR_LEN(p_attr->attr_len_type) >= 2) { in bta_ag_sdp_find_attr() 383 uint16_t sdp_features = p_attr->attr_value.v.u16; in bta_ag_sdp_find_attr() 420 p_attr = in bta_ag_sdp_find_attr() 422 if (p_attr != nullptr && in bta_ag_sdp_find_attr() 423 SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == BOOLEAN_DESC_TYPE && in bta_ag_sdp_find_attr() 424 SDP_DISC_ATTR_LEN(p_attr->attr_len_type) >= 1) { in bta_ag_sdp_find_attr() [all …]
|
/packages/modules/Bluetooth/system/bta/gatt/ |
D | bta_gattc_cache.cc | 887 void bta_gattc_fill_gatt_db_el(btgatt_db_element_t* p_attr, in bta_gattc_fill_gatt_db_el() argument 892 p_attr->type = type; in bta_gattc_fill_gatt_db_el() 893 p_attr->attribute_handle = att_handle; in bta_gattc_fill_gatt_db_el() 894 p_attr->start_handle = s_handle; in bta_gattc_fill_gatt_db_el() 895 p_attr->end_handle = e_handle; in bta_gattc_fill_gatt_db_el() 896 p_attr->id = id; in bta_gattc_fill_gatt_db_el() 897 p_attr->properties = prop; in bta_gattc_fill_gatt_db_el() 901 p_attr->permissions = 0; in bta_gattc_fill_gatt_db_el() 902 p_attr->uuid = uuid; in bta_gattc_fill_gatt_db_el()
|
/packages/modules/Bluetooth/system/stack/avrc/ |
D | avrc_bld_tg.cc | 914 tAVRC_ATTR_ENTRY* p_attr; in avrc_bld_get_folder_items_rsp() local 1050 p_attr = p_media->p_attr_list; in avrc_bld_get_folder_items_rsp() 1053 const size_t attribute_len = p_attr[yy].name.str_len + 8; in avrc_bld_get_folder_items_rsp() 1054 if (attribute_len_left < attribute_len || !p_attr[yy].name.p_str || in avrc_bld_get_folder_items_rsp() 1055 AVRC_IS_VALID_MEDIA_ATTRIBUTE(p_attr[yy].attr_id)) { in avrc_bld_get_folder_items_rsp() 1064 UINT32_TO_BE_STREAM(p_data, p_attr[yy].attr_id); in avrc_bld_get_folder_items_rsp() 1065 UINT16_TO_BE_STREAM(p_data, p_attr[yy].name.charset_id); in avrc_bld_get_folder_items_rsp() 1066 UINT16_TO_BE_STREAM(p_data, p_attr[yy].name.str_len); in avrc_bld_get_folder_items_rsp() 1067 ARRAY_TO_BE_STREAM(p_data, p_attr[yy].name.p_str, in avrc_bld_get_folder_items_rsp() 1068 p_attr[yy].name.str_len); in avrc_bld_get_folder_items_rsp()
|
/packages/modules/Bluetooth/system/stack/test/sdp/ |
D | stack_sdp_utils_test.cc | 52 bool sdp_dynamic_change_hfp_version(const tSDP_ATTRIBUTE* p_attr, 54 void hfp_fallback(bool& is_hfp_fallback, const tSDP_ATTRIBUTE* p_attr); 225 uint16_t get_avrc_target_version(tSDP_ATTRIBUTE* p_attr) { in get_avrc_target_version() argument 226 uint8_t* p_version = p_attr->value_ptr + 6; in get_avrc_target_version() 232 uint16_t get_avrc_target_feature(tSDP_ATTRIBUTE* p_attr) { in get_avrc_target_feature() argument 233 uint8_t* p_feature = p_attr->value_ptr; in get_avrc_target_feature()
|
/packages/modules/Bluetooth/system/bta/av/ |
D | bta_av_act.cc | 1716 tSDP_DISC_ATTR* p_attr; in bta_av_check_peer_features() local 1753 p_attr = SDP_FindAttributeInRec(p_rec, ATTR_ID_SUPPORTED_FEATURES); in bta_av_check_peer_features() 1754 if (p_attr != NULL && in bta_av_check_peer_features() 1755 SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == UINT_DESC_TYPE && in bta_av_check_peer_features() 1756 SDP_DISC_ATTR_LEN(p_attr->attr_len_type) >= 2) { in bta_av_check_peer_features() 1757 categories = p_attr->attr_value.v.u16; in bta_av_check_peer_features() 1818 tSDP_DISC_ATTR* p_attr = in bta_avk_check_peer_features() local 1820 if (p_attr != NULL && in bta_avk_check_peer_features() 1821 SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) == UINT_DESC_TYPE && in bta_avk_check_peer_features() 1822 SDP_DISC_ATTR_LEN(p_attr->attr_len_type) >= 2) { in bta_avk_check_peer_features() [all …]
|
/packages/modules/Bluetooth/system/bta/test/ |
D | bta_dip_test.cc | 44 bool sdpu_compare_uuid_with_attr(const Uuid& uuid, tSDP_DISC_ATTR* p_attr) { in sdpu_compare_uuid_with_attr() argument
|
/packages/modules/Bluetooth/system/bta/dm/ |
D | bta_dm_act.cc | 1110 tSDP_DISC_ATTR* p_attr = in store_avrcp_profile_feature() local 1112 if (p_attr == NULL || in store_avrcp_profile_feature() 1113 SDP_DISC_ATTR_TYPE(p_attr->attr_len_type) != UINT_DESC_TYPE || in store_avrcp_profile_feature() 1114 SDP_DISC_ATTR_LEN(p_attr->attr_len_type) < 2) { in store_avrcp_profile_feature() 1118 uint16_t avrcp_features = p_attr->attr_value.v.u16; in store_avrcp_profile_feature()
|
/packages/modules/Bluetooth/system/btif/src/ |
D | btif_rc.cc | 3741 btrc_element_attr_val_t* p_attr = in handle_get_metadata_attr_response() local 3751 p_attr[i].attr_id = p_rsp->p_attrs[i].attr_id; in handle_get_metadata_attr_response() 3754 memcpy(p_attr[i].text, p_rsp->p_attrs[i].name.p_str, in handle_get_metadata_attr_response() 3761 p_dev->rc_addr, p_rsp->num_attrs, p_attr)); in handle_get_metadata_attr_response() 3762 do_in_jni_thread(FROM_HERE, base::Bind(osi_free, p_attr)); in handle_get_metadata_attr_response()
|