/external/bluetooth/bluedroid/stack/gatt/ |
D | gatt_cl.c | 40 void gatt_send_prepare_write(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb); 72 void gatt_act_discovery(tGATT_CLCB *p_clcb) in gatt_act_discovery() argument 74 UINT8 op_code = disc_type_to_att_opcode[p_clcb->op_subtype]; in gatt_act_discovery() 77 if (p_clcb->s_handle <= p_clcb->e_handle && p_clcb->s_handle != 0) in gatt_act_discovery() 81 cl_req.browse.s_handle = p_clcb->s_handle; in gatt_act_discovery() 82 cl_req.browse.e_handle = p_clcb->e_handle; in gatt_act_discovery() 84 if (disc_type_to_uuid[p_clcb->op_subtype] != 0) in gatt_act_discovery() 87 cl_req.browse.uuid.uu.uuid16 = disc_type_to_uuid[p_clcb->op_subtype]; in gatt_act_discovery() 90 … if (p_clcb->op_subtype == GATT_DISC_SRVC_BY_UUID) /* fill in the FindByTypeValue request info*/ in gatt_act_discovery() 93 cl_req.find_type_value.uuid.uu.uuid16 = disc_type_to_uuid[p_clcb->op_subtype]; in gatt_act_discovery() [all …]
|
D | gatt_attr.c | 66 tGATT_PROFILE_CLCB *p_clcb = NULL; in gatt_profile_find_conn_id_by_bd_addr() local 68 for (i_clcb = 0, p_clcb= gatt_cb.profile_clcb; i_clcb < GATT_MAX_APPS; i_clcb++, p_clcb++) in gatt_profile_find_conn_id_by_bd_addr() 70 if (p_clcb->in_use && p_clcb->connected && !memcmp(p_clcb->bda, bda, BD_ADDR_LEN)) in gatt_profile_find_conn_id_by_bd_addr() 72 return p_clcb->conn_id; in gatt_profile_find_conn_id_by_bd_addr() 91 tGATT_PROFILE_CLCB *p_clcb = NULL; in gatt_profile_find_clcb_by_bd_addr() local 93 for (i_clcb = 0, p_clcb= gatt_cb.profile_clcb; i_clcb < GATT_MAX_APPS; i_clcb++, p_clcb++) in gatt_profile_find_clcb_by_bd_addr() 95 if (p_clcb->in_use && p_clcb->connected && !memcmp(p_clcb->bda, bda, BD_ADDR_LEN)) in gatt_profile_find_clcb_by_bd_addr() 97 return p_clcb; in gatt_profile_find_clcb_by_bd_addr() 101 return p_clcb; in gatt_profile_find_clcb_by_bd_addr() 116 tGATT_PROFILE_CLCB *p_clcb = NULL; in gatt_profile_clcb_alloc() local [all …]
|
D | gatt_auth.c | 43 static BOOLEAN gatt_sign_data (tGATT_CLCB *p_clcb) in gatt_sign_data() argument 45 tGATT_VALUE *p_attr = (tGATT_VALUE *)p_clcb->p_attr_buf; in gatt_sign_data() 47 UINT16 payload_size = p_clcb->p_tcb->payload_size; in gatt_sign_data() 52 gatt_set_sec_act(p_clcb->p_tcb, GATT_SEC_OK); in gatt_sign_data() 68 if (BTM_BleDataSignature(p_clcb->p_tcb->peer_bda, in gatt_sign_data() 74 gatt_set_ch_state(p_clcb->p_tcb, GATT_CH_OPEN); in gatt_sign_data() 75 gatt_act_write(p_clcb, GATT_SEC_SIGN_DATA); in gatt_sign_data() 79 gatt_end_operation(p_clcb, GATT_INTERNAL_ERROR, NULL); in gatt_sign_data() 132 void gatt_sec_check_complete(BOOLEAN sec_check_ok, tGATT_CLCB *p_clcb, UINT8 sec_act) in gatt_sec_check_complete() argument 134 if (GKI_queue_is_empty(&p_clcb->p_tcb->pending_enc_clcb)) in gatt_sec_check_complete() [all …]
|
D | gatt_api.c | 774 tGATT_CLCB *p_clcb; in GATTC_ConfigureMTU() local 792 if ((p_clcb = gatt_clcb_alloc(conn_id)) != NULL) in GATTC_ConfigureMTU() 794 p_clcb->p_tcb->payload_size = mtu; in GATTC_ConfigureMTU() 795 p_clcb->operation = GATTC_OPTYPE_CONFIG; in GATTC_ConfigureMTU() 797 … ret = attp_send_cl_msg (p_clcb->p_tcb, p_clcb->clcb_idx, GATT_REQ_MTU, (tGATT_CL_MSG *)&mtu); in GATTC_ConfigureMTU() 820 tGATT_CLCB *p_clcb; in GATTC_Discover() local 844 if ((p_clcb = gatt_clcb_alloc(conn_id)) != NULL ) in GATTC_Discover() 852 gatt_clcb_dealloc(p_clcb); in GATTC_Discover() 856 p_clcb->operation = GATTC_OPTYPE_DISCOVERY; in GATTC_Discover() 857 p_clcb->op_subtype = disc_type; in GATTC_Discover() [all …]
|
D | gatt_utils.c | 1524 tGATT_CLCB *p_clcb = NULL; in gatt_clcb_alloc() local 1534 p_clcb = &gatt_cb.clcb[i]; in gatt_clcb_alloc() 1536 p_clcb->in_use = TRUE; in gatt_clcb_alloc() 1537 p_clcb->conn_id = conn_id; in gatt_clcb_alloc() 1538 p_clcb->clcb_idx = i; in gatt_clcb_alloc() 1539 p_clcb->p_reg = p_reg; in gatt_clcb_alloc() 1540 p_clcb->p_tcb = p_tcb; in gatt_clcb_alloc() 1544 return p_clcb; in gatt_clcb_alloc() 1556 void gatt_clcb_dealloc (tGATT_CLCB *p_clcb) in gatt_clcb_dealloc() argument 1558 if (p_clcb && p_clcb->in_use) in gatt_clcb_dealloc() [all …]
|
D | gatt_int.h | 404 tGATT_CLCB *p_clcb; member 414 tGATT_CLCB *p_clcb; member 566 …n tGATT_PENDING_ENC_CLCB* gatt_add_pending_enc_channel_clcb(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb ); 621 extern void gatt_clcb_dealloc (tGATT_CLCB *p_clcb); 645 extern void gatt_end_operation(tGATT_CLCB *p_clcb, tGATT_STATUS status, void *p_data); 647 extern void gatt_act_discovery(tGATT_CLCB *p_clcb); 648 extern void gatt_act_read(tGATT_CLCB *p_clcb, UINT16 offset); 649 extern void gatt_act_write(tGATT_CLCB *p_clcb, UINT8 sec_act); 656 extern void gatt_send_queue_write_cancel (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, tGATT_EXEC_FLAG fla… 659 extern BOOLEAN gatt_security_check_start(tGATT_CLCB *p_clcb); [all …]
|
/external/bluetooth/bluedroid/bta/gatt/ |
D | bta_gattc_act.c | 314 tBTA_GATTC_CLCB *p_clcb = NULL; in bta_gattc_process_api_open() local 321 if ((p_clcb = bta_gattc_find_alloc_clcb(p_msg->api_conn.client_if, in bta_gattc_process_api_open() 324 bta_gattc_sm_execute(p_clcb, event, p_msg); in bta_gattc_process_api_open() 359 tBTA_GATTC_CLCB *p_clcb = NULL; in bta_gattc_process_api_open_cancel() local 365 if ((p_clcb = bta_gattc_find_clcb_by_cif(p_msg->api_cancel_conn.client_if, in bta_gattc_process_api_open_cancel() 368 bta_gattc_sm_execute(p_clcb, event, p_msg); in bta_gattc_process_api_open_cancel() 398 void bta_gattc_cancel_open_error(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data) in bta_gattc_cancel_open_error() argument 403 if ( p_clcb && p_clcb->p_rcb && p_clcb->p_rcb->p_cback ) in bta_gattc_cancel_open_error() 404 (*p_clcb->p_rcb->p_cback)(BTA_GATTC_CANCEL_OPEN_EVT, &cb_data); in bta_gattc_cancel_open_error() 416 void bta_gattc_open_error(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data) in bta_gattc_open_error() argument [all …]
|
D | bta_gattc_utils.c | 165 tBTA_GATTC_CLCB *p_clcb = &bta_gattc_cb.clcb[0]; in bta_gattc_find_clcb_by_cif() local 168 for (i = 0; i < BTA_GATTC_CLCB_MAX; i ++, p_clcb ++) in bta_gattc_find_clcb_by_cif() 170 if (p_clcb->in_use && in bta_gattc_find_clcb_by_cif() 171 p_clcb->p_rcb->client_if == client_if && in bta_gattc_find_clcb_by_cif() 172 p_clcb->p_srcb && in bta_gattc_find_clcb_by_cif() 173 bdcmp(p_clcb->p_srcb->server_bda, remote_bda) == 0) in bta_gattc_find_clcb_by_cif() 174 return p_clcb; in bta_gattc_find_clcb_by_cif() 189 tBTA_GATTC_CLCB *p_clcb = &bta_gattc_cb.clcb[0]; in bta_gattc_find_clcb_by_conn_id() local 192 for (i = 0; i < BTA_GATTC_CLCB_MAX; i ++, p_clcb ++) in bta_gattc_find_clcb_by_conn_id() 194 if (p_clcb->in_use && in bta_gattc_find_clcb_by_conn_id() [all …]
|
D | bta_gattc_int.h | 395 extern void bta_gattc_sm_execute(tBTA_GATTC_CLCB *p_clcb, UINT16 event, tBTA_GATTC_DATA *p_data); 406 extern void bta_gattc_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data); 407 extern void bta_gattc_open_fail(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data); 408 extern void bta_gattc_open_error(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data); 410 extern void bta_gattc_cancel_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data); 411 extern void bta_gattc_cancel_open_ok(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data); 412 extern void bta_gattc_cancel_open_error(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data); 414 extern void bta_gattc_conn(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data); 416 extern void bta_gattc_close(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data); 417 extern void bta_gattc_close_fail(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data); [all …]
|
D | bta_gattc_main.c | 76 typedef void (*tBTA_GATTC_ACTION)(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data); 288 void bta_gattc_sm_execute(tBTA_GATTC_CLCB *p_clcb, UINT16 event, tBTA_GATTC_DATA *p_data) in bta_gattc_sm_execute() argument 294 tBTA_GATTC_STATE in_state = p_clcb->state; in bta_gattc_sm_execute() 304 state_table = bta_gattc_st_tbl[p_clcb->state]; in bta_gattc_sm_execute() 309 p_clcb->state = state_table[event][BTA_GATTC_NEXT_STATE]; in bta_gattc_sm_execute() 316 (*bta_gattc_action[action])(p_clcb, p_data); in bta_gattc_sm_execute() 325 if (in_state != p_clcb->state) in bta_gattc_sm_execute() 329 gattc_state_code(p_clcb->state), in bta_gattc_sm_execute() 348 tBTA_GATTC_CLCB *p_clcb = NULL; in bta_gattc_hdl_event() local 384 if ((p_clcb = bta_gattc_find_clcb_by_conn_id(p_msg->layer_specific)) in bta_gattc_hdl_event() [all …]
|
D | bta_gattc_cache.c | 536 tBTA_GATTC_CLCB *p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id); in bta_gattc_explore_srvc() local 542 if (p_clcb == NULL) in bta_gattc_explore_srvc() 570 p_clcb->p_srcb->state = BTA_GATTC_SERV_SAVE; in bta_gattc_explore_srvc() 908 tBTA_GATTC_CLCB *p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id); in bta_gattc_disc_res_cback() local 912 if (p_srvc_cb != NULL && p_clcb != NULL && p_clcb->state == BTA_GATTC_DISCOVER_ST) in bta_gattc_disc_res_cback() 973 tBTA_GATTC_CLCB *p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id); in bta_gattc_disc_cmpl_cback() local 975 if ( p_clcb && (status != GATT_SUCCESS || p_clcb->status != GATT_SUCCESS) ) in bta_gattc_disc_cmpl_cback() 977 if (p_clcb->status == GATT_SUCCESS) in bta_gattc_disc_cmpl_cback() 978 p_clcb->status = status; in bta_gattc_disc_cmpl_cback() 979 bta_gattc_sm_execute(p_clcb, BTA_GATTC_DISCOVER_CMPL_EVT, NULL); in bta_gattc_disc_cmpl_cback() [all …]
|
/external/bluetooth/bluedroid/stack/gap/ |
D | gap_ble.c | 86 tGAP_CLCB *p_clcb = NULL; in gap_find_clcb_by_bd_addr() local 88 for (i_clcb = 0, p_clcb= gap_cb.clcb; i_clcb < GAP_MAX_CL; i_clcb++, p_clcb++) in gap_find_clcb_by_bd_addr() 90 if (p_clcb->in_use && !memcmp(p_clcb->bda, bda, BD_ADDR_LEN)) in gap_find_clcb_by_bd_addr() 92 return p_clcb; in gap_find_clcb_by_bd_addr() 111 tGAP_CLCB *p_clcb = NULL; in gap_ble_find_clcb_by_conn_id() local 113 for (i_clcb = 0, p_clcb= gap_cb.clcb; i_clcb < GAP_MAX_CL; i_clcb++, p_clcb++) in gap_ble_find_clcb_by_conn_id() 115 if (p_clcb->in_use && p_clcb->connected && p_clcb->conn_id == conn_id) in gap_ble_find_clcb_by_conn_id() 117 return p_clcb; in gap_ble_find_clcb_by_conn_id() 121 return p_clcb; in gap_ble_find_clcb_by_conn_id() 136 tGAP_CLCB *p_clcb = NULL; in gap_clcb_alloc() local [all …]
|