/system/bt/stack/gatt/ |
D | gatt_db.c | 41 static BOOLEAN allocate_svc_db_buf(tGATT_SVC_DB *p_db); 42 static void *allocate_attr_in_db(tGATT_SVC_DB *p_db, tBT_UUID *p_uuid, tGATT_PERM perm); 43 static BOOLEAN deallocate_attr_in_db(tGATT_SVC_DB *p_db, void *p_attr); 44 static BOOLEAN copy_extra_byte_in_db(tGATT_SVC_DB *p_db, void **p_dst, UINT16 len); 46 static BOOLEAN gatts_db_add_service_declaration(tGATT_SVC_DB *p_db, tBT_UUID *p_service, BOOLEAN is… 62 BOOLEAN gatts_init_service_db (tGATT_SVC_DB *p_db, tBT_UUID *p_service, BOOLEAN is_pri, in gatts_init_service_db() argument 65 p_db->svc_buffer = fixed_queue_new(SIZE_MAX); in gatts_init_service_db() 67 if (!allocate_svc_db_buf(p_db)) in gatts_init_service_db() 77 p_db->next_handle = s_hdl; in gatts_init_service_db() 78 p_db->end_handle = s_hdl + num_handle; in gatts_init_service_db() [all …]
|
D | gatt_int.h | 232 tGATT_SVC_DB *p_db; /* pointer to the service database */ member 677 extern BOOLEAN gatts_init_service_db (tGATT_SVC_DB *p_db, tBT_UUID *p_service, BOOLEAN is_pri, UINT… 678 extern UINT16 gatts_add_included_service (tGATT_SVC_DB *p_db, UINT16 s_handle, UINT16 e_handle, tBT… 679 extern UINT16 gatts_add_characteristic (tGATT_SVC_DB *p_db, tGATT_PERM perm, tGATT_CHAR_PROP proper… 680 extern UINT16 gatts_add_char_descr (tGATT_SVC_DB *p_db, tGATT_PERM perm, tBT_UUID *p_dscp_uuid); 681 extern tGATT_STATUS gatts_db_read_attr_value_by_type (tGATT_TCB *p_tcb, tGATT_SVC_DB *p_db, UINT8 o… 683 extern tGATT_STATUS gatts_read_attr_value_by_handle(tGATT_TCB *p_tcb,tGATT_SVC_DB *p_db, UINT8 op_c… 685 extern tGATT_STATUS gatts_write_attr_perm_check (tGATT_SVC_DB *p_db, UINT8 op_code,UINT16 handle, U… 687 extern tGATT_STATUS gatts_read_attr_perm_check(tGATT_SVC_DB *p_db, BOOLEAN is_long, UINT16 handle, … 689 extern tBT_UUID * gatts_get_service_uuid (tGATT_SVC_DB *p_db);
|
D | gatt_sr.c | 425 if ((err = gatts_read_attr_perm_check( gatt_cb.sr_reg[i_rcb].p_db, in gatt_process_read_multi_req() 466 gatt_cb.sr_reg[i_rcb].p_db, in gatt_process_read_multi_req() 529 if ((p_uuid = gatts_get_service_uuid (p_rcb->p_db)) != NULL) in gatt_build_primary_service_rsp() 605 if (!p_rcb->p_db || !p_rcb->p_db->p_attr_list) in gatt_build_find_info_rsp() 609 p_attr = (tGATT_ATTR16 *) p_rcb->p_db->p_attr_list; in gatt_build_find_info_rsp() 987 p_rcb->p_db, in gatts_process_read_by_type_req() 1086 status = gatts_write_attr_perm_check (gatt_cb.sr_reg[i_rcb].p_db, in gatts_process_write_req() 1157 p_rcb->p_db, in gatts_process_read_req() 1231 p_attr = (tGATT_ATTR16 *)p_rcb->p_db->p_attr_list; in gatts_process_attribute_req()
|
D | gatt_utils.c | 450 p_svc_uuid = gatts_get_service_uuid (p_rcb->p_db); in gatt_is_last_attribute() 1374 p_this_uuid = gatts_get_service_uuid (p_sreg->p_db); in gatt_sr_find_i_rcb_by_app_id() 1418 p_sreg->p_db = &p_list->svc_db; in gatt_sr_alloc_rcb() 1421 fixed_queue_length(p_sreg->p_db->svc_buffer)); in gatt_sr_alloc_rcb()
|
D | gatt_api.c | 514 p_uuid = gatts_get_service_uuid (p_sreg->p_db); in GATTS_StartService()
|
/system/bt/stack/avrc/ |
D | avrc_sdp.c | 111 tAVRC_SDP_DB_PARAMS *p_db, tAVRC_FIND_CBACK *p_cback) in AVRC_FindService() argument 124 p_db == NULL || p_db->p_db == NULL || p_cback == NULL) in AVRC_FindService() 136 if(p_db->p_attrs == NULL || p_db->num_attr == 0) in AVRC_FindService() 138 p_db->p_attrs = a2d_attr_list; in AVRC_FindService() 139 p_db->num_attr = AVRC_NUM_ATTR; in AVRC_FindService() 142 result = SDP_InitDiscoveryDb(p_db->p_db, p_db->db_len, 1, &uuid_list, p_db->num_attr, in AVRC_FindService() 143 p_db->p_attrs); in AVRC_FindService() 148 avrc_cb.p_db = p_db->p_db; in AVRC_FindService() 153 result = SDP_ServiceSearchAttributeRequest(bd_addr, p_db->p_db, avrc_sdp_cback); in AVRC_FindService()
|
D | avrc_int.h | 125 tSDP_DISCOVERY_DB *p_db; /* pointer to discovery database */ member
|
/system/bt/stack/a2dp/ |
D | a2d_api.c | 71 if ((p_rec = SDP_FindServiceInDb(a2d_cb.find.p_db, in a2d_sdp_cback() 116 osi_free_and_reset((void**)&a2d_cb.find.p_db); in a2d_sdp_cback() 271 tA2D_SDP_DB_PARAMS *p_db, tA2D_FIND_CBACK *p_cback) in A2D_FindService() argument 284 p_db == NULL || p_cback == NULL) in A2D_FindService() 295 if(p_db->p_attrs == NULL || p_db->num_attr == 0) in A2D_FindService() 297 p_db->p_attrs = a2d_attr_list; in A2D_FindService() 298 p_db->num_attr = A2D_NUM_ATTR; in A2D_FindService() 301 if(a2d_cb.find.p_db == NULL) in A2D_FindService() 302 a2d_cb.find.p_db = (tSDP_DISCOVERY_DB*)osi_malloc(p_db->db_len); in A2D_FindService() 304 result = SDP_InitDiscoveryDb(a2d_cb.find.p_db, p_db->db_len, 1, &uuid_list, p_db->num_attr, in A2D_FindService() [all …]
|
D | a2d_int.h | 48 tSDP_DISCOVERY_DB *p_db; /* pointer to discovery database */ member
|
/system/bt/stack/sdp/ |
D | sdp_discovery.c | 52 static tSDP_DISC_REC *add_record (tSDP_DISCOVERY_DB *p_db, BD_ADDR p_bda); 53 static UINT8 *add_attr (UINT8 *p, tSDP_DISCOVERY_DB *p_db, tSDP_DISC_REC *p_rec, 141 p = sdpu_build_uuid_seq (p, 1, &p_ccb->p_db->uuid_filters[p_ccb->cur_uuid_idx]); in sdp_snd_service_search_req() 143 p = sdpu_build_uuid_seq (p, p_ccb->p_db->num_uuid_filters, p_ccb->p_db->uuid_filters); in sdp_snd_service_search_req() 362 if(p_ccb->p_db->raw_data) in sdp_copy_raw_data() 364 cpy_len = p_ccb->p_db->raw_size - p_ccb->p_db->raw_used; in sdp_copy_raw_data() 379 list_len, cpy_len, p_ccb->p_db->raw_size, p_ccb->p_db->raw_used); in sdp_copy_raw_data() 381 memcpy (&p_ccb->p_db->raw_data[p_ccb->p_db->raw_used], p, cpy_len); in sdp_copy_raw_data() 382 p_ccb->p_db->raw_used += cpy_len; in sdp_copy_raw_data() 496 if (p_ccb->p_db->num_attr_filters) in process_service_attr_rsp() [all …]
|
D | sdp_api.c | 67 BOOLEAN SDP_InitDiscoveryDb (tSDP_DISCOVERY_DB *p_db, UINT32 len, UINT16 num_uuid, in SDP_InitDiscoveryDb() argument 74 if (p_db == NULL || (sizeof (tSDP_DISCOVERY_DB) > len) || in SDP_InitDiscoveryDb() 78 PTR_TO_UINT(p_db), len, num_uuid, num_attr); in SDP_InitDiscoveryDb() 83 memset (p_db, 0, (size_t)len); in SDP_InitDiscoveryDb() 85 p_db->mem_size = len - sizeof (tSDP_DISCOVERY_DB); in SDP_InitDiscoveryDb() 86 p_db->mem_free = p_db->mem_size; in SDP_InitDiscoveryDb() 87 p_db->p_first_rec = NULL; in SDP_InitDiscoveryDb() 88 p_db->p_free_mem = (UINT8 *)(p_db + 1); in SDP_InitDiscoveryDb() 91 p_db->uuid_filters[xx] = *p_uuid_list++; in SDP_InitDiscoveryDb() 93 p_db->num_uuid_filters = num_uuid; in SDP_InitDiscoveryDb() [all …]
|
D | sdp_main.c | 608 if ((p_ccb->cur_uuid_idx == 0) && (p_ccb->p_db->p_first_rec)) in sdp_disconnect() 609 p_ccb->cur_uuid_idx = p_ccb->p_db->num_uuid_filters; in sdp_disconnect() 611 while (++p_ccb->cur_uuid_idx < p_ccb->p_db->num_uuid_filters) in sdp_disconnect() 614 if ((p_ccb->p_db->uuid_filters[p_ccb->cur_uuid_idx].len == 2) in sdp_disconnect() 615 && (SDP_FindServiceInDb (p_ccb->p_db, in sdp_disconnect() 616 p_ccb->p_db->uuid_filters[p_ccb->cur_uuid_idx].uu.uuid16, in sdp_disconnect() 620 if ((p_ccb->p_db->uuid_filters[p_ccb->cur_uuid_idx].len > 2) in sdp_disconnect() 621 && (SDP_FindServiceUUIDInDb (p_ccb->p_db, in sdp_disconnect() 622 &p_ccb->p_db->uuid_filters[p_ccb->cur_uuid_idx], NULL))) in sdp_disconnect() 635 if ((reason == SDP_NO_RECS_MATCH) && (p_ccb->p_db->p_first_rec)) in sdp_disconnect()
|
D | sdp_db.c | 284 tSDP_DB *p_db = &sdp_cb.server_db; in SDP_CreateRecord() local 287 if (p_db->num_records < SDP_MAX_RECORDS) in SDP_CreateRecord() 289 memset (&p_db->record[p_db->num_records], 0, in SDP_CreateRecord() 294 if (p_db->num_records) in SDP_CreateRecord() 295 handle = p_db->record[p_db->num_records - 1].record_handle + 1; in SDP_CreateRecord() 299 p_db->record[p_db->num_records].record_handle = handle; in SDP_CreateRecord() 301 p_db->num_records++; in SDP_CreateRecord() 302 SDP_TRACE_DEBUG("SDP_CreateRecord ok, num_records:%d", p_db->num_records); in SDP_CreateRecord() 308 return (p_db->record[p_db->num_records - 1].record_handle); in SDP_CreateRecord()
|
D | sdp_utils.c | 83 tCONN_CB *sdpu_find_ccb_by_db (tSDP_DISCOVERY_DB *p_db) in sdpu_find_ccb_by_db() argument 89 if (p_db) in sdpu_find_ccb_by_db() 94 if ((p_ccb->con_state != SDP_STATE_IDLE) && (p_ccb->p_db == p_db)) in sdpu_find_ccb_by_db() 808 void sdpu_sort_attr_list( UINT16 num_attr, tSDP_DISCOVERY_DB *p_db ) in sdpu_sort_attr_list() argument 826 if( p_db->attr_filters[i] > p_db->attr_filters[i+1] ) in sdpu_sort_attr_list() 829 x = p_db->attr_filters[i]; in sdpu_sort_attr_list() 830 p_db->attr_filters[i] = p_db->attr_filters[i+1]; in sdpu_sort_attr_list() 831 p_db->attr_filters[i+1] = x; in sdpu_sort_attr_list()
|
D | sdpint.h | 187 tSDP_DISCOVERY_DB *p_db; /* Database to save info into */ member 273 extern tCONN_CB *sdpu_find_ccb_by_db (tSDP_DISCOVERY_DB *p_db); 290 extern void sdpu_sort_attr_list( UINT16 num_attr, tSDP_DISCOVERY_DB *p_db );
|
/system/bt/stack/include/ |
D | sdp_api.h | 190 BOOLEAN SDP_InitDiscoveryDb (tSDP_DISCOVERY_DB *p_db, UINT32 len, 205 BOOLEAN SDP_CancelServiceSearch (tSDP_DISCOVERY_DB *p_db); 217 tSDP_DISCOVERY_DB *p_db, 235 tSDP_DISCOVERY_DB *p_db, 253 tSDP_DISCOVERY_DB *p_db, 270 tSDP_DISC_REC *SDP_FindAttributeInDb (tSDP_DISCOVERY_DB *p_db, 301 tSDP_DISC_REC *SDP_FindServiceInDb (tSDP_DISCOVERY_DB *p_db, 322 tSDP_DISC_REC *SDP_FindServiceUUIDInDb (tSDP_DISCOVERY_DB *p_db, 353 tSDP_DISC_REC *SDP_FindServiceInDb_128bit(tSDP_DISCOVERY_DB *p_db, 625 tSDP_DISCOVERY_DB *p_db, UINT32 len, [all …]
|
D | avrc_api.h | 133 tSDP_DISCOVERY_DB *p_db; /* Pointer to the discovery database */ member 254 tAVRC_SDP_DB_PARAMS *p_db, tAVRC_FIND_CBACK *p_cback);
|
D | hidh_api.h | 104 tSDP_DISCOVERY_DB *p_db,
|
D | a2d_api.h | 204 tA2D_SDP_DB_PARAMS *p_db, tA2D_FIND_CBACK *p_cback);
|
/system/bt/stack/hid/ |
D | hidh_api.c | 53 tHID_STATUS HID_HostGetSDPRecord ( BD_ADDR addr, tSDP_DISCOVERY_DB *p_db, UINT32 db_len, in HID_HostGetSDPRecord() argument 64 hh_cb.p_sdp_db = p_db; in HID_HostGetSDPRecord() 65 SDP_InitDiscoveryDb (p_db, db_len, 1, &uuid_list, 0, NULL); in HID_HostGetSDPRecord() 67 if (SDP_ServiceSearchRequest (addr, p_db, hidh_search_callback)) in HID_HostGetSDPRecord() 102 tSDP_DISCOVERY_DB *p_db = hh_cb.p_sdp_db; in hidh_search_callback() local 120 if ((p_rec = SDP_FindServiceUUIDInDb (p_db, &hid_uuid, NULL)) == NULL) in hidh_search_callback()
|
/system/bt/stack/btm/ |
D | btm_pm.c | 420 tBTM_PM_MCB *p_db = &btm_cb.pm_mode_db[ind]; /* per ACL link */ in btm_pm_sm_alloc() local 421 memset (p_db, 0, sizeof(tBTM_PM_MCB)); in btm_pm_sm_alloc() 422 p_db->state = BTM_PM_ST_ACTIVE; in btm_pm_sm_alloc() 424 BTM_TRACE_DEBUG( "btm_pm_sm_alloc ind:%d st:%d", ind, p_db->state); in btm_pm_sm_alloc()
|
D | btm_inq.c | 1506 tINQ_BDADDR *p_db = &p_inq->p_bd_db[0]; in btm_inq_find_bdaddr() local 1510 if ((p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE) || !p_db) in btm_inq_find_bdaddr() 1513 for (xx = 0; xx < p_inq->num_bd_entries; xx++, p_db++) in btm_inq_find_bdaddr() 1515 if (!memcmp(p_db->bd_addr, p_bda, BD_ADDR_LEN) in btm_inq_find_bdaddr() 1516 && p_db->inq_count == p_inq->inq_counter) in btm_inq_find_bdaddr() 1522 p_db->inq_count = p_inq->inq_counter; in btm_inq_find_bdaddr() 1523 memcpy(p_db->bd_addr, p_bda, BD_ADDR_LEN); in btm_inq_find_bdaddr()
|
/system/bt/bta/hl/ |
D | bta_hl_sdp.c | 578 tSDP_DISC_REC *bta_hl_find_sink_or_src_srv_class_in_db (const tSDP_DISCOVERY_DB *p_db, in bta_hl_find_sink_or_src_srv_class_in_db() argument 586 if (p_db == NULL) in bta_hl_find_sink_or_src_srv_class_in_db() 593 p_rec = p_db->p_first_rec; in bta_hl_find_sink_or_src_srv_class_in_db()
|
D | bta_hl_act.c | 1850 osi_free_and_reset((void **)&p_cb->p_db); in bta_hl_sdp_cback() 2170 if (p_cb->p_db == NULL) in bta_hl_init_sdp() 2171 (p_cb->p_db = (tSDP_DISCOVERY_DB *)osi_malloc(BTA_HL_DISC_SIZE)); in bta_hl_init_sdp() 2185 SDP_InitDiscoveryDb(p_cb->p_db, BTA_HL_DISC_SIZE, 1, &uuid_list, num_attrs, attr_list); in bta_hl_init_sdp() 2187 if (!SDP_ServiceSearchAttributeRequest(p_cb->bd_addr, p_cb->p_db, p_cb->sdp_cback)) in bta_hl_init_sdp() 2198 osi_free_and_reset((void **)&p_cb->p_db); in bta_hl_init_sdp()
|
D | bta_hl_int.h | 497 tSDP_DISCOVERY_DB *p_db; /* pointer to discovery database */ member 611 extern tSDP_DISC_REC *bta_hl_find_sink_or_src_srv_class_in_db (const tSDP_DISCOVERY_DB *p_db,
|