/system/bt/stack/gatt/ |
D | gatt_cl.cc | 57 void gatt_send_prepare_write(tGATT_TCB& tcb, tGATT_CLCB* p_clcb); 86 void gatt_act_discovery(tGATT_CLCB* p_clcb) { in gatt_act_discovery() argument 87 uint8_t op_code = disc_type_to_att_opcode[p_clcb->op_subtype]; in gatt_act_discovery() 89 if (p_clcb->s_handle > p_clcb->e_handle || p_clcb->s_handle == 0) { in gatt_act_discovery() 91 gatt_end_operation(p_clcb, GATT_SUCCESS, NULL); in gatt_act_discovery() 98 cl_req.browse.s_handle = p_clcb->s_handle; in gatt_act_discovery() 99 cl_req.browse.e_handle = p_clcb->e_handle; in gatt_act_discovery() 101 if (disc_type_to_uuid[p_clcb->op_subtype] != 0) { in gatt_act_discovery() 103 bluetooth::Uuid::From16Bit(disc_type_to_uuid[p_clcb->op_subtype]); in gatt_act_discovery() 106 if (p_clcb->op_subtype == in gatt_act_discovery() [all …]
|
D | gatt_auth.cc | 49 static bool gatt_sign_data(tGATT_CLCB* p_clcb) { in gatt_sign_data() argument 50 tGATT_VALUE* p_attr = (tGATT_VALUE*)p_clcb->p_attr_buf; in gatt_sign_data() 52 uint16_t payload_size = p_clcb->p_tcb->payload_size; in gatt_sign_data() 57 gatt_set_sec_act(p_clcb->p_tcb, GATT_SEC_OK); in gatt_sign_data() 74 p_clcb->p_tcb->peer_bda, p_data, in gatt_sign_data() 78 gatt_set_ch_state(p_clcb->p_tcb, GATT_CH_OPEN); in gatt_sign_data() 79 gatt_act_write(p_clcb, GATT_SEC_SIGN_DATA); in gatt_sign_data() 81 gatt_end_operation(p_clcb, GATT_INTERNAL_ERROR, NULL); in gatt_sign_data() 133 void gatt_sec_check_complete(bool sec_check_ok, tGATT_CLCB* p_clcb, in gatt_sec_check_complete() argument 135 if (p_clcb && p_clcb->p_tcb && p_clcb->p_tcb->pending_enc_clcb.empty()) { in gatt_sec_check_complete() [all …]
|
D | gatt_attr.cc | 75 static void gatt_cl_start_config_ccc(tGATT_PROFILE_CLCB* p_clcb); 126 tGATT_PROFILE_CLCB* p_clcb = NULL; in gatt_profile_find_clcb_by_conn_id() local 128 for (i_clcb = 0, p_clcb = gatt_cb.profile_clcb; i_clcb < GATT_MAX_APPS; in gatt_profile_find_clcb_by_conn_id() 129 i_clcb++, p_clcb++) { in gatt_profile_find_clcb_by_conn_id() 130 if (p_clcb->in_use && p_clcb->conn_id == conn_id) return p_clcb; in gatt_profile_find_clcb_by_conn_id() 148 tGATT_PROFILE_CLCB* p_clcb = NULL; in gatt_profile_find_clcb_by_bd_addr() local 150 for (i_clcb = 0, p_clcb = gatt_cb.profile_clcb; i_clcb < GATT_MAX_APPS; in gatt_profile_find_clcb_by_bd_addr() 151 i_clcb++, p_clcb++) { in gatt_profile_find_clcb_by_bd_addr() 152 if (p_clcb->in_use && p_clcb->transport == transport && p_clcb->connected && in gatt_profile_find_clcb_by_bd_addr() 153 p_clcb->bda == bda) in gatt_profile_find_clcb_by_bd_addr() [all …]
|
D | gatt_utils.cc | 531 void gatt_start_rsp_timer(tGATT_CLCB* p_clcb) { in gatt_start_rsp_timer() argument 534 if (p_clcb->operation == GATTC_OPTYPE_DISCOVERY && in gatt_start_rsp_timer() 535 p_clcb->op_subtype == GATT_DISC_SRVC_ALL) { in gatt_start_rsp_timer() 541 if (p_clcb->gatt_rsp_timer_ent == NULL) { in gatt_start_rsp_timer() 542 p_clcb->gatt_rsp_timer_ent = alarm_new("gatt.gatt_rsp_timer_ent"); in gatt_start_rsp_timer() 544 alarm_set_on_mloop(p_clcb->gatt_rsp_timer_ent, timeout_ms, gatt_rsp_timeout, in gatt_start_rsp_timer() 545 p_clcb); in gatt_start_rsp_timer() 557 void gatt_stop_rsp_timer(tGATT_CLCB* p_clcb) { in gatt_stop_rsp_timer() argument 558 alarm_cancel(p_clcb->gatt_rsp_timer_ent); in gatt_stop_rsp_timer() 642 tGATT_CLCB* p_clcb = (tGATT_CLCB*)data; in gatt_rsp_timeout() local [all …]
|
D | gatt_api.cc | 630 tGATT_CLCB* p_clcb = gatt_clcb_alloc(conn_id); in GATTC_ConfigureMTU() local 631 if (!p_clcb) { in GATTC_ConfigureMTU() 637 p_clcb->cid = L2CAP_ATT_CID; in GATTC_ConfigureMTU() 638 p_clcb->p_tcb->payload_size = mtu; in GATTC_ConfigureMTU() 639 p_clcb->operation = GATTC_OPTYPE_CONFIG; in GATTC_ConfigureMTU() 644 return attp_send_cl_msg(*p_clcb->p_tcb, p_clcb, GATT_REQ_MTU, &gatt_cl_msg); in GATTC_ConfigureMTU() 693 tGATT_CLCB* p_clcb = gatt_clcb_alloc(conn_id); in GATTC_Discover() local 694 if (!p_clcb) { in GATTC_Discover() 702 p_clcb->operation = GATTC_OPTYPE_DISCOVERY; in GATTC_Discover() 703 p_clcb->op_subtype = disc_type; in GATTC_Discover() [all …]
|
D | att_protocol.cc | 427 static tGATT_STATUS attp_cl_send_cmd(tGATT_TCB& tcb, tGATT_CLCB* p_clcb, in attp_cl_send_cmd() argument 431 if (gatt_tcb_is_cid_busy(tcb, p_clcb->cid) && in attp_cl_send_cmd() 433 gatt_cmd_enq(tcb, p_clcb, true, cmd_code, p_cmd); in attp_cl_send_cmd() 440 p_clcb->cid, tcb.eatt, bt_transport_text(tcb.transport).c_str()); in attp_cl_send_cmd() 441 tGATT_STATUS att_ret = attp_send_msg_to_l2cap(tcb, p_clcb->cid, p_cmd); in attp_cl_send_cmd() 452 gatt_start_rsp_timer(p_clcb); in attp_cl_send_cmd() 453 gatt_cmd_enq(tcb, p_clcb, false, cmd_code, NULL); in attp_cl_send_cmd() 502 tGATT_STATUS attp_send_cl_msg(tGATT_TCB& tcb, tGATT_CLCB* p_clcb, in attp_send_cl_msg() argument 507 if (!p_clcb) { in attp_send_cl_msg() 512 uint16_t payload_size = gatt_tcb_get_payload_size_tx(tcb, p_clcb->cid); in attp_send_cl_msg() [all …]
|
D | gatt_int.h | 204 tGATT_CLCB* p_clcb; member 476 extern tGATT_STATUS attp_send_cl_msg(tGATT_TCB& tcb, tGATT_CLCB* p_clcb, 497 extern void gatt_start_rsp_timer(tGATT_CLCB* p_clcb); 498 extern void gatt_stop_rsp_timer(tGATT_CLCB* p_clcb); 568 extern void gatt_clcb_dealloc(tGATT_CLCB* p_clcb); 597 extern tGATT_STATUS gatt_send_write_msg(tGATT_TCB& p_tcb, tGATT_CLCB* p_clcb, 604 extern void gatt_end_operation(tGATT_CLCB* p_clcb, tGATT_STATUS status, 607 extern void gatt_act_discovery(tGATT_CLCB* p_clcb); 608 extern void gatt_act_read(tGATT_CLCB* p_clcb, uint16_t offset); 609 extern void gatt_act_write(tGATT_CLCB* p_clcb, uint8_t sec_act); [all …]
|
/system/bt/bta/gatt/ |
D | bta_gattc_act.cc | 263 tBTA_GATTC_CLCB* p_clcb = bta_gattc_find_alloc_clcb( in bta_gattc_process_api_open() local 266 if (p_clcb != NULL) { in bta_gattc_process_api_open() 267 bta_gattc_sm_execute(p_clcb, event, p_msg); in bta_gattc_process_api_open() 290 tBTA_GATTC_CLCB* p_clcb = bta_gattc_find_clcb_by_cif( in bta_gattc_process_api_open_cancel() local 293 if (p_clcb != NULL) { in bta_gattc_process_api_open_cancel() 294 bta_gattc_sm_execute(p_clcb, event, p_msg); in bta_gattc_process_api_open_cancel() 325 void bta_gattc_cancel_open_error(tBTA_GATTC_CLCB* p_clcb, in bta_gattc_cancel_open_error() argument 331 if (p_clcb && p_clcb->p_rcb && p_clcb->p_rcb->p_cback) in bta_gattc_cancel_open_error() 332 (*p_clcb->p_rcb->p_cback)(BTA_GATTC_CANCEL_OPEN_EVT, &cb_data); in bta_gattc_cancel_open_error() 335 void bta_gattc_open_error(tBTA_GATTC_CLCB* p_clcb, in bta_gattc_open_error() argument [all …]
|
D | bta_gattc_utils.cc | 93 tBTA_GATTC_CLCB* p_clcb = &bta_gattc_cb.clcb[0]; in bta_gattc_find_clcb_by_cif() local 96 for (i = 0; i < BTA_GATTC_CLCB_MAX; i++, p_clcb++) { in bta_gattc_find_clcb_by_cif() 97 if (p_clcb->in_use && p_clcb->p_rcb->client_if == client_if && in bta_gattc_find_clcb_by_cif() 98 p_clcb->transport == transport && p_clcb->bda == remote_bda) in bta_gattc_find_clcb_by_cif() 99 return p_clcb; in bta_gattc_find_clcb_by_cif() 113 tBTA_GATTC_CLCB* p_clcb = &bta_gattc_cb.clcb[0]; in bta_gattc_find_clcb_by_conn_id() local 116 for (i = 0; i < BTA_GATTC_CLCB_MAX; i++, p_clcb++) { in bta_gattc_find_clcb_by_conn_id() 117 if (p_clcb->in_use && p_clcb->bta_conn_id == conn_id) return p_clcb; in bta_gattc_find_clcb_by_conn_id() 135 tBTA_GATTC_CLCB* p_clcb = NULL; in bta_gattc_clcb_alloc() local 142 p_clcb = &bta_gattc_cb.clcb[i_clcb]; in bta_gattc_clcb_alloc() [all …]
|
D | bta_gattc_cache.cc | 63 static void bta_gattc_read_db_hash_cmpl(tBTA_GATTC_CLCB* p_clcb, 66 static void bta_gattc_read_ext_prop_desc_cmpl(tBTA_GATTC_CLCB* p_clcb, 137 tBTA_GATTC_CLCB* p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id); in bta_gattc_discover_pri_service() local 138 if (!p_clcb) return GATT_ERROR; in bta_gattc_discover_pri_service() 140 if (p_clcb->transport == BT_TRANSPORT_LE) { in bta_gattc_discover_pri_service() 152 tBTA_GATTC_CLCB* p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id); in bta_gattc_explore_next_service() local 153 if (!p_clcb) { in bta_gattc_explore_next_service() 175 p_clcb->request_during_discovery = in bta_gattc_explore_next_service() 212 tBTA_GATTC_CLCB* p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id); in bta_gattc_explore_srvc_finished() local 213 if (!p_clcb) { in bta_gattc_explore_srvc_finished() [all …]
|
D | bta_gattc_int.h | 323 extern bool bta_gattc_sm_execute(tBTA_GATTC_CLCB* p_clcb, uint16_t event, 336 extern void bta_gattc_open(tBTA_GATTC_CLCB* p_clcb, 338 extern void bta_gattc_open_fail(tBTA_GATTC_CLCB* p_clcb, 340 extern void bta_gattc_open_error(tBTA_GATTC_CLCB* p_clcb, 343 extern void bta_gattc_cancel_open(tBTA_GATTC_CLCB* p_clcb, 345 extern void bta_gattc_cancel_open_ok(tBTA_GATTC_CLCB* p_clcb, 347 extern void bta_gattc_cancel_open_error(tBTA_GATTC_CLCB* p_clcb, 350 extern void bta_gattc_conn(tBTA_GATTC_CLCB* p_clcb, 353 extern void bta_gattc_close(tBTA_GATTC_CLCB* p_clcb, 355 extern void bta_gattc_close_fail(tBTA_GATTC_CLCB* p_clcb, [all …]
|
D | bta_gattc_main.cc | 67 typedef void (*tBTA_GATTC_ACTION)(tBTA_GATTC_CLCB* p_clcb, 298 bool bta_gattc_sm_execute(tBTA_GATTC_CLCB* p_clcb, uint16_t event, in bta_gattc_sm_execute() argument 304 tBTA_GATTC_STATE in_state = p_clcb->state; in bta_gattc_sm_execute() 316 state_table = bta_gattc_st_tbl[p_clcb->state]; in bta_gattc_sm_execute() 321 p_clcb->state = state_table[event][BTA_GATTC_NEXT_STATE]; in bta_gattc_sm_execute() 327 (*bta_gattc_action[action])(p_clcb, p_data); in bta_gattc_sm_execute() 328 if (p_clcb->p_q_cmd == p_data) { in bta_gattc_sm_execute() 340 if (in_state != p_clcb->state) { in bta_gattc_sm_execute() 343 gattc_state_code(p_clcb->state), in bta_gattc_sm_execute() 349 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 | 295 tGAP_CLCB* p_clcb = find_clcb_by_bd_addr(bda); in client_connect_cback() local 296 if (p_clcb == NULL) { in client_connect_cback() 304 p_clcb->conn_id = conn_id; in client_connect_cback() 305 p_clcb->connected = true; in client_connect_cback() 307 send_cl_read_request(*p_clcb); in client_connect_cback() 310 p_clcb->connected = false; in client_connect_cback() 311 cl_op_cmpl(*p_clcb, false, 0, NULL); in client_connect_cback() 313 clcb_dealloc(*p_clcb); in client_connect_cback() 320 tGAP_CLCB* p_clcb = ble_find_clcb_by_conn_id(conn_id); in client_cmpl_cback() local 326 if (p_clcb == NULL) return; in client_cmpl_cback() [all …]
|
/system/bt/test/mock/ |
D | mock_stack_gatt_auth.cc | 34 bool gatt_security_check_start(tGATT_CLCB* p_clcb) { in gatt_security_check_start() argument 38 tGATT_SEC_ACTION gatt_determine_sec_act(tGATT_CLCB* p_clcb) { in gatt_determine_sec_act() argument 57 void gatt_sec_check_complete(bool sec_check_ok, tGATT_CLCB* p_clcb, in gatt_sec_check_complete() argument
|
D | mock_stack_srvc_dis.cc | 68 void dis_c_cmpl_cback(tSRVC_CLCB* p_clcb, tGATTC_OPTYPE op, tGATT_STATUS status, in dis_c_cmpl_cback() argument
|
D | mock_stack_gatt_attr.cc | 75 void gatt_profile_clcb_dealloc(tGATT_PROFILE_CLCB* p_clcb) { in gatt_profile_clcb_dealloc() argument
|
/system/bt/stack/test/gatt/ |
D | mock_gatt_utils_ref.cc | 49 tGATT_STATUS attp_send_cl_msg(tGATT_TCB& tcb, tGATT_CLCB* p_clcb, in attp_send_cl_msg() argument 61 void gatt_act_discovery(tGATT_CLCB* p_clcb) {} in gatt_act_discovery() argument
|
D | gatt_sr_test.cc | 74 tGATT_STATUS attp_send_cl_msg(tGATT_TCB& tcb, tGATT_CLCB* p_clcb, in attp_send_cl_msg() argument 92 void gatt_act_discovery(tGATT_CLCB* p_clcb) {} in gatt_act_discovery() argument
|