/system/bt/stack/gatt/ |
D | gatt_cl.cc | 52 void gatt_send_prepare_write(tGATT_TCB& tcb, tGATT_CLCB* p_clcb); 81 void gatt_act_discovery(tGATT_CLCB* p_clcb) { in gatt_act_discovery() argument 82 uint8_t op_code = disc_type_to_att_opcode[p_clcb->op_subtype]; in gatt_act_discovery() 84 if (p_clcb->s_handle > p_clcb->e_handle || p_clcb->s_handle == 0) { in gatt_act_discovery() 86 gatt_end_operation(p_clcb, GATT_SUCCESS, NULL); in gatt_act_discovery() 93 cl_req.browse.s_handle = p_clcb->s_handle; in gatt_act_discovery() 94 cl_req.browse.e_handle = p_clcb->e_handle; in gatt_act_discovery() 96 if (disc_type_to_uuid[p_clcb->op_subtype] != 0) { in gatt_act_discovery() 98 bluetooth::Uuid::From16Bit(disc_type_to_uuid[p_clcb->op_subtype]); in gatt_act_discovery() 101 if (p_clcb->op_subtype == in gatt_act_discovery() [all …]
|
D | gatt_attr.cc | 67 static void gatt_cl_start_config_ccc(tGATT_PROFILE_CLCB* p_clcb); 109 tGATT_PROFILE_CLCB* p_clcb = NULL; in gatt_profile_find_clcb_by_conn_id() local 111 for (i_clcb = 0, p_clcb = gatt_cb.profile_clcb; i_clcb < GATT_MAX_APPS; in gatt_profile_find_clcb_by_conn_id() 112 i_clcb++, p_clcb++) { in gatt_profile_find_clcb_by_conn_id() 113 if (p_clcb->in_use && p_clcb->conn_id == conn_id) return p_clcb; in gatt_profile_find_clcb_by_conn_id() 131 tGATT_PROFILE_CLCB* p_clcb = NULL; in gatt_profile_find_clcb_by_bd_addr() local 133 for (i_clcb = 0, p_clcb = gatt_cb.profile_clcb; i_clcb < GATT_MAX_APPS; in gatt_profile_find_clcb_by_bd_addr() 134 i_clcb++, p_clcb++) { in gatt_profile_find_clcb_by_bd_addr() 135 if (p_clcb->in_use && p_clcb->transport == transport && p_clcb->connected && in gatt_profile_find_clcb_by_bd_addr() 136 p_clcb->bda == bda) in gatt_profile_find_clcb_by_bd_addr() [all …]
|
D | gatt_auth.cc | 46 static bool gatt_sign_data(tGATT_CLCB* p_clcb) { in gatt_sign_data() argument 47 tGATT_VALUE* p_attr = (tGATT_VALUE*)p_clcb->p_attr_buf; in gatt_sign_data() 49 uint16_t payload_size = p_clcb->p_tcb->payload_size; in gatt_sign_data() 54 gatt_set_sec_act(p_clcb->p_tcb, GATT_SEC_OK); in gatt_sign_data() 71 p_clcb->p_tcb->peer_bda, p_data, in gatt_sign_data() 75 gatt_set_ch_state(p_clcb->p_tcb, GATT_CH_OPEN); in gatt_sign_data() 76 gatt_act_write(p_clcb, GATT_SEC_SIGN_DATA); in gatt_sign_data() 78 gatt_end_operation(p_clcb, GATT_INTERNAL_ERROR, NULL); in gatt_sign_data() 130 void gatt_sec_check_complete(bool sec_check_ok, tGATT_CLCB* p_clcb, in gatt_sec_check_complete() argument 132 if (p_clcb && p_clcb->p_tcb && p_clcb->p_tcb->pending_enc_clcb.empty()) { in gatt_sec_check_complete() [all …]
|
D | gatt_utils.cc | 520 void gatt_start_rsp_timer(tGATT_CLCB* p_clcb) { in gatt_start_rsp_timer() argument 523 if (p_clcb->operation == GATTC_OPTYPE_DISCOVERY && in gatt_start_rsp_timer() 524 p_clcb->op_subtype == GATT_DISC_SRVC_ALL) { in gatt_start_rsp_timer() 530 if (p_clcb->gatt_rsp_timer_ent == NULL) { in gatt_start_rsp_timer() 531 p_clcb->gatt_rsp_timer_ent = alarm_new("gatt.gatt_rsp_timer_ent"); in gatt_start_rsp_timer() 533 alarm_set_on_mloop(p_clcb->gatt_rsp_timer_ent, timeout_ms, gatt_rsp_timeout, in gatt_start_rsp_timer() 534 p_clcb); in gatt_start_rsp_timer() 576 tGATT_CLCB* p_clcb = (tGATT_CLCB*)data; in gatt_rsp_timeout() local 578 if (p_clcb == NULL || p_clcb->p_tcb == NULL) { in gatt_rsp_timeout() 582 if (p_clcb->operation == GATTC_OPTYPE_DISCOVERY && in gatt_rsp_timeout() [all …]
|
D | gatt_api.cc | 592 tGATT_CLCB* p_clcb = gatt_clcb_alloc(conn_id); in GATTC_ConfigureMTU() local 593 if (!p_clcb) return GATT_NO_RESOURCES; in GATTC_ConfigureMTU() 595 p_clcb->p_tcb->payload_size = mtu; in GATTC_ConfigureMTU() 596 p_clcb->operation = GATTC_OPTYPE_CONFIG; in GATTC_ConfigureMTU() 599 return attp_send_cl_msg(*p_clcb->p_tcb, p_clcb, GATT_REQ_MTU, &gatt_cl_msg); in GATTC_ConfigureMTU() 649 tGATT_CLCB* p_clcb = gatt_clcb_alloc(conn_id); in GATTC_Discover() local 650 if (!p_clcb) return GATT_NO_RESOURCES; in GATTC_Discover() 652 p_clcb->operation = GATTC_OPTYPE_DISCOVERY; in GATTC_Discover() 653 p_clcb->op_subtype = disc_type; in GATTC_Discover() 654 p_clcb->s_handle = start_handle; in GATTC_Discover() [all …]
|
D | gatt_int.h | 204 tGATT_CLCB* p_clcb; member 437 extern tGATT_STATUS attp_send_cl_msg(tGATT_TCB& tcb, tGATT_CLCB* p_clcb, 456 extern void gatt_start_rsp_timer(tGATT_CLCB* p_clcb); 511 extern void gatt_clcb_dealloc(tGATT_CLCB* p_clcb); 535 extern uint8_t gatt_send_write_msg(tGATT_TCB& p_tcb, tGATT_CLCB* p_clcb, 541 extern void gatt_end_operation(tGATT_CLCB* p_clcb, tGATT_STATUS status, 544 extern void gatt_act_discovery(tGATT_CLCB* p_clcb); 545 extern void gatt_act_read(tGATT_CLCB* p_clcb, uint16_t offset); 546 extern void gatt_act_write(tGATT_CLCB* p_clcb, uint8_t sec_act); 548 extern void gatt_cmd_enq(tGATT_TCB& tcb, tGATT_CLCB* p_clcb, bool to_send, [all …]
|
D | att_protocol.cc | 416 tGATT_STATUS attp_cl_send_cmd(tGATT_TCB& tcb, tGATT_CLCB* p_clcb, in attp_cl_send_cmd() argument 421 gatt_cmd_enq(tcb, p_clcb, true, cmd_code, p_cmd); in attp_cl_send_cmd() 436 gatt_start_rsp_timer(p_clcb); in attp_cl_send_cmd() 437 gatt_cmd_enq(tcb, p_clcb, false, cmd_code, NULL); in attp_cl_send_cmd() 457 tGATT_STATUS attp_send_cl_msg(tGATT_TCB& tcb, tGATT_CLCB* p_clcb, in attp_send_cl_msg() argument 532 return attp_cl_send_cmd(tcb, p_clcb, op_code, p_cmd); in attp_send_cl_msg()
|
/system/bt/bta/gatt/ |
D | bta_gattc_act.cc | 261 tBTA_GATTC_CLCB* p_clcb = bta_gattc_find_alloc_clcb( in bta_gattc_process_api_open() local 264 if (p_clcb != NULL) { in bta_gattc_process_api_open() 265 bta_gattc_sm_execute(p_clcb, event, p_msg); in bta_gattc_process_api_open() 284 tBTA_GATTC_CLCB* p_clcb = bta_gattc_find_clcb_by_cif( in bta_gattc_process_api_open_cancel() local 287 if (p_clcb != NULL) { in bta_gattc_process_api_open_cancel() 288 bta_gattc_sm_execute(p_clcb, event, p_msg); in bta_gattc_process_api_open_cancel() 319 void bta_gattc_cancel_open_error(tBTA_GATTC_CLCB* p_clcb, in bta_gattc_cancel_open_error() argument 325 if (p_clcb && p_clcb->p_rcb && p_clcb->p_rcb->p_cback) in bta_gattc_cancel_open_error() 326 (*p_clcb->p_rcb->p_cback)(BTA_GATTC_CANCEL_OPEN_EVT, &cb_data); in bta_gattc_cancel_open_error() 329 void bta_gattc_open_error(tBTA_GATTC_CLCB* p_clcb, in bta_gattc_open_error() argument [all …]
|
D | bta_gattc_utils.cc | 85 tBTA_GATTC_CLCB* p_clcb = &bta_gattc_cb.clcb[0]; in bta_gattc_find_clcb_by_cif() local 88 for (i = 0; i < BTA_GATTC_CLCB_MAX; i++, p_clcb++) { in bta_gattc_find_clcb_by_cif() 89 if (p_clcb->in_use && p_clcb->p_rcb->client_if == client_if && in bta_gattc_find_clcb_by_cif() 90 p_clcb->transport == transport && p_clcb->bda == remote_bda) in bta_gattc_find_clcb_by_cif() 91 return p_clcb; in bta_gattc_find_clcb_by_cif() 105 tBTA_GATTC_CLCB* p_clcb = &bta_gattc_cb.clcb[0]; in bta_gattc_find_clcb_by_conn_id() local 108 for (i = 0; i < BTA_GATTC_CLCB_MAX; i++, p_clcb++) { in bta_gattc_find_clcb_by_conn_id() 109 if (p_clcb->in_use && p_clcb->bta_conn_id == conn_id) return p_clcb; in bta_gattc_find_clcb_by_conn_id() 127 tBTA_GATTC_CLCB* p_clcb = NULL; in bta_gattc_clcb_alloc() local 134 p_clcb = &bta_gattc_cb.clcb[i_clcb]; in bta_gattc_clcb_alloc() [all …]
|
D | bta_gattc_int.h | 314 extern bool bta_gattc_sm_execute(tBTA_GATTC_CLCB* p_clcb, uint16_t event, 327 extern void bta_gattc_open(tBTA_GATTC_CLCB* p_clcb, tBTA_GATTC_DATA* p_data); 328 extern void bta_gattc_open_fail(tBTA_GATTC_CLCB* p_clcb, 330 extern void bta_gattc_open_error(tBTA_GATTC_CLCB* p_clcb, 333 extern void bta_gattc_cancel_open(tBTA_GATTC_CLCB* p_clcb, 335 extern void bta_gattc_cancel_open_ok(tBTA_GATTC_CLCB* p_clcb, 337 extern void bta_gattc_cancel_open_error(tBTA_GATTC_CLCB* p_clcb, 340 extern void bta_gattc_conn(tBTA_GATTC_CLCB* p_clcb, tBTA_GATTC_DATA* p_data); 342 extern void bta_gattc_close(tBTA_GATTC_CLCB* p_clcb, tBTA_GATTC_DATA* p_data); 343 extern void bta_gattc_close_fail(tBTA_GATTC_CLCB* p_clcb, [all …]
|
D | bta_gattc_cache.cc | 136 tBTA_GATTC_CLCB* p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id); in bta_gattc_discover_pri_service() local 137 if (!p_clcb) return GATT_ERROR; in bta_gattc_discover_pri_service() 139 if (p_clcb->transport == BTA_TRANSPORT_LE) { in bta_gattc_discover_pri_service() 151 tBTA_GATTC_CLCB* p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id); in bta_gattc_explore_next_service() local 152 if (!p_clcb) { in bta_gattc_explore_next_service() 171 tBTA_GATTC_CLCB* p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id); in bta_gattc_explore_srvc_finished() local 172 if (!p_clcb) { in bta_gattc_explore_srvc_finished() 186 p_clcb->p_srcb->state = BTA_GATTC_SERV_SAVE; in bta_gattc_explore_srvc_finished() 189 bta_gattc_cache_write(p_clcb->p_srcb->server_bda, in bta_gattc_explore_srvc_finished() 190 p_clcb->p_srcb->gatt_database.Serialize()); in bta_gattc_explore_srvc_finished() [all …]
|
D | bta_gattc_main.cc | 68 typedef void (*tBTA_GATTC_ACTION)(tBTA_GATTC_CLCB* p_clcb, 299 bool bta_gattc_sm_execute(tBTA_GATTC_CLCB* p_clcb, uint16_t event, in bta_gattc_sm_execute() argument 305 tBTA_GATTC_STATE in_state = p_clcb->state; in bta_gattc_sm_execute() 317 state_table = bta_gattc_st_tbl[p_clcb->state]; in bta_gattc_sm_execute() 322 p_clcb->state = state_table[event][BTA_GATTC_NEXT_STATE]; in bta_gattc_sm_execute() 328 (*bta_gattc_action[action])(p_clcb, p_data); in bta_gattc_sm_execute() 329 if (p_clcb->p_q_cmd == p_data) { in bta_gattc_sm_execute() 341 if (in_state != p_clcb->state) { in bta_gattc_sm_execute() 344 gattc_state_code(p_clcb->state), in bta_gattc_sm_execute() 350 in_state, p_clcb->state, in_event); in bta_gattc_sm_execute() [all …]
|
/system/bt/stack/srvc/ |
D | srvc_eng.cc | 49 typedef void (*tSRVC_ENG_C_CMPL_ACTION)(tSRVC_CLCB* p_clcb, tGATTC_OPTYPE op, 70 tSRVC_CLCB* p_clcb = NULL; in srvc_eng_find_conn_id_by_bd_addr() local 72 for (i_clcb = 0, p_clcb = srvc_eng_cb.clcb; i_clcb < SRVC_MAX_APPS; in srvc_eng_find_conn_id_by_bd_addr() 73 i_clcb++, p_clcb++) { in srvc_eng_find_conn_id_by_bd_addr() 74 if (p_clcb->in_use && p_clcb->connected && p_clcb->bda == bda) { in srvc_eng_find_conn_id_by_bd_addr() 75 return p_clcb->conn_id; in srvc_eng_find_conn_id_by_bd_addr() 93 tSRVC_CLCB* p_clcb = NULL; in srvc_eng_find_clcb_by_bd_addr() local 95 for (i_clcb = 0, p_clcb = srvc_eng_cb.clcb; i_clcb < SRVC_MAX_APPS; in srvc_eng_find_clcb_by_bd_addr() 96 i_clcb++, p_clcb++) { in srvc_eng_find_clcb_by_bd_addr() 97 if (p_clcb->in_use && p_clcb->connected && p_clcb->bda == bda) { in srvc_eng_find_clcb_by_bd_addr() [all …]
|
D | srvc_dis.cc | 193 tSRVC_CLCB* p_clcb = srvc_eng_find_clcb_by_conn_id(conn_id); in dis_gatt_c_read_dis_value_cmpl() local 199 if (dis_cb.p_read_dis_cback && p_clcb) { in dis_gatt_c_read_dis_value_cmpl() 201 p_clcb->dis_value.attr_mask); in dis_gatt_c_read_dis_value_cmpl() 203 (*dis_cb.p_read_dis_cback)(p_clcb->bda, &p_clcb->dis_value); in dis_gatt_c_read_dis_value_cmpl() 256 void dis_c_cmpl_cback(tSRVC_CLCB* p_clcb, tGATTC_OPTYPE op, tGATT_STATUS status, in dis_c_cmpl_cback() argument 260 uint16_t conn_id = p_clcb->conn_id; in dis_c_cmpl_cback() 275 p_clcb->dis_value.attr_mask |= DIS_ATTR_SYS_ID_BIT; in dis_c_cmpl_cback() 277 STREAM_TO_UINT64(p_clcb->dis_value.system_id, pp); in dis_c_cmpl_cback() 283 p_clcb->dis_value.attr_mask |= DIS_ATTR_PNP_ID_BIT; in dis_c_cmpl_cback() 284 STREAM_TO_UINT8(p_clcb->dis_value.pnp_id.vendor_id_src, pp); in dis_c_cmpl_cback() [all …]
|
D | srvc_dis_int.h | 63 extern void dis_c_cmpl_cback(tSRVC_CLCB* p_clcb, tGATTC_OPTYPE op,
|
/system/bt/stack/gap/ |
D | gap_ble.cc | 290 tGAP_CLCB* p_clcb = find_clcb_by_bd_addr(bda); in client_connect_cback() local 291 if (p_clcb == NULL) return; in client_connect_cback() 294 p_clcb->conn_id = conn_id; in client_connect_cback() 295 p_clcb->connected = true; in client_connect_cback() 297 send_cl_read_request(*p_clcb); in client_connect_cback() 299 p_clcb->connected = false; in client_connect_cback() 300 cl_op_cmpl(*p_clcb, false, 0, NULL); in client_connect_cback() 302 clcb_dealloc(*p_clcb); in client_connect_cback() 309 tGAP_CLCB* p_clcb = ble_find_clcb_by_conn_id(conn_id); in client_cmpl_cback() local 315 if (p_clcb == NULL) return; in client_cmpl_cback() [all …]
|