Lines Matching refs:conn_id

53 static void gatt_request_cback(uint16_t conn_id, uint32_t trans_id,
56 const RawAddress& bda, uint16_t conn_id,
59 static void gatt_disc_res_cback(uint16_t conn_id, tGATT_DISC_TYPE disc_type,
61 static void gatt_disc_cmpl_cback(uint16_t conn_id, tGATT_DISC_TYPE disc_type,
63 static void gatt_cl_op_cmpl_cback(uint16_t conn_id, tGATTC_OPTYPE op,
89 uint16_t conn_id = GATT_INVALID_CONN_ID; in gatt_profile_find_conn_id_by_bd_addr() local
90 GATT_GetConnIdIfConnected(gatt_cb.gatt_if, remote_bda, &conn_id, in gatt_profile_find_conn_id_by_bd_addr()
92 if (conn_id == GATT_INVALID_CONN_ID) in gatt_profile_find_conn_id_by_bd_addr()
93 GATT_GetConnIdIfConnected(gatt_cb.gatt_if, remote_bda, &conn_id, in gatt_profile_find_conn_id_by_bd_addr()
95 return conn_id; in gatt_profile_find_conn_id_by_bd_addr()
107 static tGATT_PROFILE_CLCB* gatt_profile_find_clcb_by_conn_id(uint16_t conn_id) { in gatt_profile_find_clcb_by_conn_id() argument
113 if (p_clcb->in_use && p_clcb->conn_id == conn_id) return p_clcb; in gatt_profile_find_clcb_by_conn_id()
154 tGATT_PROFILE_CLCB* gatt_profile_clcb_alloc(uint16_t conn_id, in gatt_profile_clcb_alloc() argument
164 p_clcb->conn_id = conn_id; in gatt_profile_clcb_alloc()
262 static void gatt_request_cback(uint16_t conn_id, uint32_t trans_id, in gatt_request_cback() argument
295 if (rsp_needed) GATTS_SendRsp(conn_id, trans_id, status, &rsp_msg); in gatt_request_cback()
308 const RawAddress& bda, uint16_t conn_id, in gatt_connect_cback() argument
312 << ", conn_id: " << loghex(conn_id) << "reason: " << loghex(reason); in gatt_connect_cback()
319 p_clcb->conn_id = conn_id; in gatt_connect_cback()
402 static void gatt_disc_res_cback(uint16_t conn_id, tGATT_DISC_TYPE disc_type, in gatt_disc_res_cback() argument
404 tGATT_PROFILE_CLCB* p_clcb = gatt_profile_find_clcb_by_conn_id(conn_id); in gatt_disc_res_cback()
437 static void gatt_disc_cmpl_cback(uint16_t conn_id, tGATT_DISC_TYPE disc_type, in gatt_disc_cmpl_cback() argument
439 tGATT_PROFILE_CLCB* p_clcb = gatt_profile_find_clcb_by_conn_id(conn_id); in gatt_disc_cmpl_cback()
454 static void gatt_attr_send_is_eatt_cb(uint16_t conn_id, gatt_op_cb_data* cb, in gatt_attr_send_is_eatt_cb() argument
460 GATT_GetConnectionInfor(conn_id, &gatt_if, bd_addr, &transport); in gatt_attr_send_is_eatt_cb()
467 static bool gatt_svc_read_cl_supp_feat_req(uint16_t conn_id, in gatt_svc_read_cl_supp_feat_req() argument
479 tGATT_STATUS status = GATTC_Read(conn_id, GATT_READ_BY_TYPE, &param); in gatt_svc_read_cl_supp_feat_req()
489 static bool gatt_att_write_cl_supp_feat(uint16_t conn_id, uint16_t handle) { in gatt_att_write_cl_supp_feat() argument
494 attr.conn_id = conn_id; in gatt_att_write_cl_supp_feat()
499 tGATT_STATUS status = GATTC_Write(conn_id, GATT_WRITE, &attr); in gatt_att_write_cl_supp_feat()
517 static void gatt_cl_op_cmpl_cback(uint16_t conn_id, tGATTC_OPTYPE op, in gatt_cl_op_cmpl_cback() argument
520 auto iter = OngoingOps.find(conn_id); in gatt_cl_op_cmpl_cback()
523 << " status: " << loghex(status) << " conn id: " << loghex(conn_id); in gatt_cl_op_cmpl_cback()
551 gatt_attr_send_is_eatt_cb(conn_id, operation_callback_data, in gatt_cl_op_cmpl_cback()
560 if (gatt_svc_read_cl_supp_feat_req(conn_id, operation_callback_data)) in gatt_cl_op_cmpl_cback()
581 gatt_att_write_cl_supp_feat(conn_id, p_data->att_value.handle); in gatt_cl_op_cmpl_cback()
601 GATTC_Discover(p_clcb->conn_id, GATT_DISC_SRVC_BY_UUID, 0x0001, 0xffff, in gatt_cl_start_config_ccc()
606 GATTC_Discover(p_clcb->conn_id, GATT_DISC_CHAR, 0x0001, p_clcb->e_handle, in gatt_cl_start_config_ccc()
611 GATTC_Discover(p_clcb->conn_id, GATT_DISC_CHAR_DSCPT, p_clcb->s_handle, in gatt_cl_start_config_ccc()
622 GATTC_Write(p_clcb->conn_id, GATT_WRITE, &ccc_value); in gatt_cl_start_config_ccc()
647 if (GATT_GetConnIdIfConnected(gatt_cb.gatt_if, remote_bda, &p_clcb->conn_id, in GATT_ConfigServiceChangeCCC()
674 const RawAddress& peer_bda, uint16_t conn_id, in gatt_svc_read_supp_feat_req() argument
677 tGATT_PROFILE_CLCB* p_clcb = gatt_profile_find_clcb_by_conn_id(conn_id); in gatt_svc_read_supp_feat_req()
680 p_clcb = gatt_profile_clcb_alloc(conn_id, peer_bda, BT_TRANSPORT_LE); in gatt_svc_read_supp_feat_req()
684 VLOG(1) << __func__ << " p_clcb is NULL " << loghex(conn_id); in gatt_svc_read_supp_feat_req()
688 auto it = OngoingOps.find(conn_id); in gatt_svc_read_supp_feat_req()
691 << loghex(conn_id); in gatt_svc_read_supp_feat_req()
703 if (GATTC_Read(conn_id, GATT_READ_BY_TYPE, &param) != GATT_SUCCESS) { in gatt_svc_read_supp_feat_req()
711 OngoingOps[conn_id] = std::move(cb_data); in gatt_svc_read_supp_feat_req()
728 uint16_t conn_id; in gatt_profile_get_eatt_support() local
735 GATT_GetConnIdIfConnected(gatt_cb.gatt_if, remote_bda, &conn_id, in gatt_profile_get_eatt_support()
739 if (conn_id == GATT_INVALID_CONN_ID) return false; in gatt_profile_get_eatt_support()
741 return gatt_svc_read_supp_feat_req(remote_bda, conn_id, std::move(cb)); in gatt_profile_get_eatt_support()