Home
last modified time | relevance | path

Searched refs:p_tcb (Results 1 – 7 of 7) sorted by relevance

/system/bt/stack/gatt/
Dgatt_main.cc71 static void gatt_send_conn_cback(tGATT_TCB* p_tcb);
197 bool gatt_connect(const RawAddress& rem_bda, tGATT_TCB* p_tcb, in gatt_connect() argument
200 if (gatt_get_ch_state(p_tcb) != GATT_CH_OPEN) in gatt_connect()
201 gatt_set_ch_state(p_tcb, GATT_CH_CONN); in gatt_connect()
204 p_tcb->att_lcid = L2CA_ConnectReq(BT_PSM_ATT, rem_bda); in gatt_connect()
205 return p_tcb->att_lcid != 0; in gatt_connect()
209 if (gatt_get_ch_state(p_tcb) == GATT_CH_OPEN) { in gatt_connect()
210 gatt_update_app_use_link_flag(gatt_if, p_tcb, true, true); in gatt_connect()
214 p_tcb->att_lcid = L2CAP_ATT_CID; in gatt_connect()
230 bool gatt_disconnect(tGATT_TCB* p_tcb) { in gatt_disconnect() argument
[all …]
Dgatt_auth.cc49 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()
132 if (p_clcb && p_clcb->p_tcb && p_clcb->p_tcb->pending_enc_clcb.empty()) { in gatt_sec_check_complete()
133 gatt_set_sec_act(p_clcb->p_tcb, GATT_SEC_NONE); in gatt_sec_check_complete()
156 tGATT_TCB* p_tcb = gatt_find_tcb_by_addr(*bd_addr, transport); in gatt_enc_cmpl_cback() local
157 if (!p_tcb) { in gatt_enc_cmpl_cback()
163 if (gatt_get_sec_act(p_tcb) == GATT_SEC_ENC_PENDING) return; in gatt_enc_cmpl_cback()
165 if (p_tcb->pending_enc_clcb.empty()) { in gatt_enc_cmpl_cback()
[all …]
Dgatt_utils.cc91 void gatt_free_pending_ind(tGATT_TCB* p_tcb) { in gatt_free_pending_ind() argument
94 if (p_tcb->pending_ind_q == NULL) return; in gatt_free_pending_ind()
97 while (!fixed_queue_is_empty(p_tcb->pending_ind_q)) in gatt_free_pending_ind()
98 osi_free(fixed_queue_try_dequeue(p_tcb->pending_ind_q)); in gatt_free_pending_ind()
99 fixed_queue_free(p_tcb->pending_ind_q, NULL); in gatt_free_pending_ind()
100 p_tcb->pending_ind_q = NULL; in gatt_free_pending_ind()
161 void gatt_add_pending_ind(tGATT_TCB* p_tcb, tGATT_VALUE* p_ind) { in gatt_add_pending_ind() argument
166 fixed_queue_enqueue(p_tcb->pending_ind_q, p_buf); in gatt_add_pending_ind()
280 bool gatt_is_srv_chg_ind_pending(tGATT_TCB* p_tcb) { in gatt_is_srv_chg_ind_pending() argument
282 << " is_queue_empty=" << fixed_queue_is_empty(p_tcb->pending_ind_q); in gatt_is_srv_chg_ind_pending()
[all …]
Dgatt_api.cc416 tGATT_TCB* p_tcb = gatt_get_tcb_by_idx(tcb_idx); in GATTS_HandleValueIndication() local
419 if ((p_reg == NULL) || (p_tcb == NULL)) { in GATTS_HandleValueIndication()
433 if (GATT_HANDLE_IS_VALID(p_tcb->indicate_handle)) { in GATTS_HandleValueIndication()
435 gatt_add_pending_ind(p_tcb, &indication); in GATTS_HandleValueIndication()
442 attp_build_sr_msg(*p_tcb, GATT_HANDLE_VALUE_IND, &gatt_sr_msg); in GATTS_HandleValueIndication()
445 tGATT_STATUS cmd_status = attp_send_sr_msg(*p_tcb, p_msg); in GATTS_HandleValueIndication()
447 p_tcb->indicate_handle = indication.handle; in GATTS_HandleValueIndication()
448 gatt_start_conf_timer(p_tcb); in GATTS_HandleValueIndication()
475 tGATT_TCB* p_tcb = gatt_get_tcb_by_idx(tcb_idx); in GATTS_HandleValueNotification() local
479 if ((p_reg == NULL) || (p_tcb == NULL)) { in GATTS_HandleValueNotification()
[all …]
Dgatt_int.h307 tGATT_TCB* p_tcb; /* associated TCB of this CLCB */ member
397 extern bool gatt_disconnect(tGATT_TCB* p_tcb);
400 extern bool gatt_connect(const RawAddress& rem_bda, tGATT_TCB* p_tcb,
403 extern void gatt_data_process(tGATT_TCB& p_tcb, BT_HDR* p_buf);
404 extern void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB* p_tcb,
408 extern void gatt_set_ch_state(tGATT_TCB* p_tcb, tGATT_CH_STATE ch_state);
409 extern tGATT_CH_STATE gatt_get_ch_state(tGATT_TCB* p_tcb);
440 extern void gatt_start_conf_timer(tGATT_TCB* p_tcb);
449 extern bool gatt_is_srv_chg_ind_pending(tGATT_TCB* p_tcb);
458 extern void gatt_add_pending_ind(tGATT_TCB* p_tcb, tGATT_VALUE* p_ind);
[all …]
Dgatt_cl.cc124 tGATT_STATUS st = attp_send_cl_msg(*p_clcb->p_tcb, p_clcb, op_code, &cl_req); in gatt_act_discovery()
140 tGATT_TCB& tcb = *p_clcb->p_tcb; in gatt_act_read()
211 tGATT_TCB& tcb = *p_clcb->p_tcb; in gatt_act_write()
817 if (p_clcb->counter == (p_clcb->p_tcb->payload_size - 4)) { in gatt_process_read_by_type_rsp()
/system/bt/bta/gatt/
Dbta_gattc_utils.cc278 tBTA_GATTC_SERV *p_tcb = &bta_gattc_cb.known_server[0], *p_recycle = NULL; in bta_gattc_srcb_alloc() local
282 for (i = 0; i < BTA_GATTC_KNOWN_SR_MAX; i++, p_tcb++) { in bta_gattc_srcb_alloc()
283 if (!p_tcb->in_use) { in bta_gattc_srcb_alloc()
286 } else if (!p_tcb->connected) { in bta_gattc_srcb_alloc()
287 p_recycle = p_tcb; in bta_gattc_srcb_alloc()
293 p_tcb = NULL; in bta_gattc_srcb_alloc()
295 p_tcb = p_recycle; in bta_gattc_srcb_alloc()
297 if (p_tcb != NULL) { in bta_gattc_srcb_alloc()
299 p_tcb->gatt_database.Clear(); in bta_gattc_srcb_alloc()
300 p_tcb->pending_discovery.Clear(); in bta_gattc_srcb_alloc()
[all …]