Home
last modified time | relevance | path

Searched refs:gatt_if (Results 1 – 25 of 34) sorted by relevance

12

/system/bt/stack/gatt/
Dgatt_api.cc170 tGATT_STATUS GATTS_AddService(tGATT_IF gatt_if, btgatt_db_element_t* service, in GATTS_AddService() argument
174 tGATT_REG* p_reg = gatt_get_regcb(gatt_if); in GATTS_AddService()
182 LOG(ERROR) << "Inavlid gatt_if=" << +gatt_if; in GATTS_AddService()
301 elem.gatt_if = gatt_if; in GATTS_AddService()
358 bool GATTS_DeleteService(tGATT_IF gatt_if, Uuid* p_svc_uuid, in GATTS_DeleteService() argument
362 tGATT_REG* p_reg = gatt_get_regcb(gatt_if); in GATTS_DeleteService()
439 tGATT_IF gatt_if = GATT_GET_GATT_IF(conn_id); in GATTS_HandleValueIndication() local
441 tGATT_REG* p_reg = gatt_get_regcb(gatt_if); in GATTS_HandleValueIndication()
502 tGATT_IF gatt_if = GATT_GET_GATT_IF(conn_id); in GATTS_HandleValueNotification() local
504 tGATT_REG* p_reg = gatt_get_regcb(gatt_if); in GATTS_HandleValueNotification()
[all …]
Dgatt_main.cc213 tGATT_IF gatt_if) { in gatt_connect() argument
224 gatt_update_app_use_link_flag(gatt_if, p_tcb, true, true); in gatt_connect()
229 return acl_create_le_connection_with_id(gatt_if, rem_bda); in gatt_connect()
286 bool gatt_update_app_hold_link_status(tGATT_IF gatt_if, tGATT_TCB* p_tcb, in gatt_update_app_hold_link_status() argument
292 auto ret = holders.insert(gatt_if); in gatt_update_app_hold_link_status()
294 VLOG(1) << "added gatt_if=" << +gatt_if; in gatt_update_app_hold_link_status()
296 VLOG(1) << "attempt to add already existing gatt_if=" << +gatt_if; in gatt_update_app_hold_link_status()
302 if (!holders.erase(gatt_if)) { in gatt_update_app_hold_link_status()
303 VLOG(1) << "attempt to remove nonexisting gatt_if=" << +gatt_if; in gatt_update_app_hold_link_status()
307 VLOG(1) << "removed gatt_if=" << +gatt_if; in gatt_update_app_hold_link_status()
[all …]
Dgatt_int.h36 #define GATT_CREATE_CONN_ID(tcb_idx, gatt_if) \ argument
37 ((uint16_t)((((uint8_t)(tcb_idx)) << 8) | ((uint8_t)(gatt_if))))
192 tGATT_IF gatt_if{0}; /* one based */
282 tGATT_IF gatt_if; /* this service is belong to which application */ member
394 tGATT_IF gatt_if; member
447 tGATT_IF gatt_if);
449 extern void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB* p_tcb,
531 extern bool gatt_auto_connect_dev_remove(tGATT_IF gatt_if,
537 extern tGATT_STATUS gatt_sr_process_app_rsp(tGATT_TCB& tcb, tGATT_IF gatt_if,
549 extern bool gatt_cancel_open(tGATT_IF gatt_if, const RawAddress& bda);
[all …]
Dgatt_utils.cc779 tGATT_IF gatt_if = GATT_GET_GATT_IF(conn_id); in gatt_sr_send_req_callback() local
780 tGATT_REG* p_reg = gatt_get_regcb(gatt_if); in gatt_sr_send_req_callback()
917 tGATT_REG* gatt_get_regcb(tGATT_IF gatt_if) { in gatt_get_regcb() argument
918 uint8_t ii = (uint8_t)gatt_if; in gatt_get_regcb()
950 tGATT_IF gatt_if = GATT_GET_GATT_IF(conn_id); in gatt_is_clcb_allocated() local
953 tGATT_REG* p_reg = gatt_get_regcb(gatt_if); in gatt_is_clcb_allocated()
1001 tGATT_IF gatt_if = GATT_GET_GATT_IF(conn_id); in gatt_clcb_alloc() local
1004 tGATT_REG* p_reg = gatt_get_regcb(gatt_if); in gatt_clcb_alloc()
1340 void gatt_sr_update_cback_cnt(tGATT_TCB& tcb, uint16_t cid, tGATT_IF gatt_if, in gatt_sr_update_cback_cnt() argument
1342 uint8_t idx = ((uint8_t)gatt_if) - 1; in gatt_sr_update_cback_cnt()
[all …]
Dgatt_attr.cc63 static void gatt_connect_cback(UNUSED_ATTR tGATT_IF gatt_if,
107 GATT_GetConnIdIfConnected(gatt_cb.gatt_if, remote_bda, &conn_id, in gatt_profile_find_conn_id_by_bd_addr()
110 GATT_GetConnIdIfConnected(gatt_cb.gatt_if, remote_bda, &conn_id, in gatt_profile_find_conn_id_by_bd_addr()
329 static void gatt_connect_cback(UNUSED_ATTR tGATT_IF gatt_if, in gatt_connect_cback() argument
375 gatt_cb.gatt_if = GATT_Register(Uuid::From128BitBE(tmp), "GattProfileDb", in gatt_profile_db_init()
377 GATT_StartIf(gatt_cb.gatt_if); in gatt_profile_db_init()
416 GATTS_AddService(gatt_cb.gatt_if, service, in gatt_profile_db_init()
431 VLOG(1) << __func__ << ": gatt_if=" << gatt_cb.gatt_if << " EATT supported"; in gatt_profile_db_init()
691 if (GATT_GetConnIdIfConnected(gatt_cb.gatt_if, remote_bda, &p_clcb->conn_id, in GATT_ConfigServiceChangeCCC()
696 GATT_Connect(gatt_cb.gatt_if, remote_bda, true, transport, true); in GATT_ConfigServiceChangeCCC()
[all …]
Dgatt_sr.cc274 tGATT_STATUS gatt_sr_process_app_rsp(tGATT_TCB& tcb, tGATT_IF gatt_if, in gatt_sr_process_app_rsp() argument
282 VLOG(1) << __func__ << " gatt_if=" << +gatt_if; in gatt_sr_process_app_rsp()
284 gatt_sr_update_cback_cnt(tcb, sr_res_p->cid, gatt_if, false, false); in gatt_sr_process_app_rsp()
293 gatt_sr_update_prep_cnt(tcb, gatt_if, true, false); in gatt_sr_process_app_rsp()
340 tGATT_IF gatt_if; in gatt_process_exec_write_req() local
376 gatt_if = (tGATT_IF)(i + 1); in gatt_process_exec_write_req()
377 conn_id = GATT_CREATE_CONN_ID(tcb.tcb_idx, gatt_if); in gatt_process_exec_write_req()
479 gatt_sr_process_app_rsp(tcb, it->gatt_if, trans_id, op_code, in gatt_process_read_multi_req()
831 GATT_CREATE_CONN_ID(tcb.tcb_idx, gatt_cb.cl_rcb[i].gatt_if); in gatts_process_mtu_req()
982 conn_id = GATT_CREATE_CONN_ID(tcb.tcb_idx, el.gatt_if); in gatts_process_write_req()
[all …]
/system/bt/bta/gatt/
Dbta_gatts_act.cc43 static void bta_gatts_conn_cback(tGATT_IF gatt_if, const RawAddress& bda,
51 static void bta_gatts_phy_update_cback(tGATT_IF gatt_if, uint16_t conn_id,
54 static void bta_gatts_conn_update_cback(tGATT_IF gatt_if, uint16_t conn_id,
158 GATT_Deregister(p_cb->rcb[i].gatt_if); in bta_gatts_api_disable()
211 cb_data.reg_oper.server_if = p_cb->rcb[first_unuse].gatt_if = in bta_gatts_register()
214 if (!p_cb->rcb[first_unuse].gatt_if) { in bta_gatts_register()
220 p_buf->server_if = p_cb->rcb[first_unuse].gatt_if; in bta_gatts_register()
271 p_cb->rcb[i].gatt_if == p_msg->api_dereg.server_if) { in bta_gatts_deregister()
276 GATT_Deregister(p_cb->rcb[i].gatt_if); in bta_gatts_deregister()
306 cb_data.srvc_oper.server_if = p_rcb->gatt_if; in bta_gatts_delete_service()
[all …]
Dbta_gatts_utils.cc68 if (p_reg->in_use && p_reg->gatt_if == server_if) return p_reg; in bta_gatts_find_app_rcb_by_app_if()
89 if (p_cb->rcb[i].in_use && p_cb->rcb[i].gatt_if == server_if) return i; in bta_gatts_find_app_rcb_idx_by_app_if()
Dbta_gattc_act.cc66 static void bta_gattc_phy_update_cback(tGATT_IF gatt_if, uint16_t conn_id,
69 static void bta_gattc_conn_update_cback(tGATT_IF gatt_if, uint16_t conn_id,
468 tGATT_IF gatt_if; in bta_gattc_conn() local
475 GATT_GetConnectionInfor(p_data->hdr.layer_specific, &gatt_if, p_clcb->bda, in bta_gattc_conn()
1290 tGATT_IF gatt_if; in bta_gattc_process_indicate() local
1293 if (!GATT_GetConnectionInfor(conn_id, &gatt_if, remote_bda, &transport)) { in bta_gattc_process_indicate()
1300 tBTA_GATTC_RCB* p_clrcb = bta_gattc_cl_get_regcb(gatt_if); in bta_gattc_process_indicate()
1330 p_clcb = bta_gattc_clcb_alloc(gatt_if, remote_bda, transport); in bta_gattc_process_indicate()
1414 static void bta_gattc_phy_update_cback(tGATT_IF gatt_if, uint16_t conn_id, in bta_gattc_phy_update_cback() argument
1417 tBTA_GATTC_RCB* p_clreg = bta_gattc_cl_get_regcb(gatt_if); in bta_gattc_phy_update_cback()
[all …]
/system/bt/bta/vc/
Ddevice.cc29 void VolumeControlDevice::Disconnect(tGATT_IF gatt_if) { in Disconnect() argument
34 BTA_GATTC_DeregisterForNotifications(gatt_if, address, in Disconnect()
38 BTA_GATTC_DeregisterForNotifications(gatt_if, address, in Disconnect()
45 BTA_GATTC_CancelOpen(gatt_if, address, false); in Disconnect()
155 bool VolumeControlDevice::subscribe_for_notifications(tGATT_IF gatt_if, in subscribe_for_notifications() argument
160 BTA_GATTC_RegisterForNotifications(gatt_if, address, handle); in subscribe_for_notifications()
184 tGATT_IF gatt_if, GATT_READ_OP_CB chrc_read_cb, in EnqueueInitialRequests() argument
189 if (!subscribe_for_notifications(gatt_if, volume_state_handle, in EnqueueInitialRequests()
207 tGATT_IF gatt_if, GATT_READ_OP_CB chrc_read_cb, in EnqueueRemainingRequests() argument
215 subscribe_for_notifications(gatt_if, handles.first, handles.second, in EnqueueRemainingRequests()
Ddevices.h89 void Disconnect(tGATT_IF gatt_if);
103 bool EnqueueInitialRequests(tGATT_IF gatt_if, GATT_READ_OP_CB chrc_read_cb,
105 void EnqueueRemainingRequests(tGATT_IF gatt_if, GATT_READ_OP_CB chrc_read_cb,
120 bool subscribe_for_notifications(tGATT_IF gatt_if, uint16_t handle,
170 void Disconnect(tGATT_IF gatt_if) { in Disconnect() argument
172 device.Disconnect(gatt_if); in Disconnect()
Dvc_test.cc207 ON_CALL(gatt_interface, RegisterForNotifications(gatt_if, _, _)) in SetUp()
211 ON_CALL(gatt_interface, DeregisterForNotifications(gatt_if, _, _)) in SetUp()
240 app_register_callback.Run(gatt_if, GATT_SUCCESS); in TestAppRegister()
245 EXPECT_CALL(gatt_interface, AppDeregister(gatt_if)); in TestAppUnregister()
257 EXPECT_CALL(gatt_interface, Open(gatt_if, address, true, _)); in TestConnect()
265 EXPECT_CALL(gatt_interface, CancelOpen(gatt_if, address, _)); in TestDisconnect()
277 EXPECT_CALL(gatt_interface, Open(gatt_if, address, false, _)); in TestAddFromStorage()
279 EXPECT_CALL(gatt_interface, Open(gatt_if, address, _, _)).Times(0); in TestAddFromStorage()
302 RegisterForNotifications(gatt_if, address, handles.first)) in TestSubscribeNotifications()
332 .client_if = gatt_if, in GetConnectedEvent()
[all …]
Ddevices_test.cc129 tGATT_IF gatt_if = 8; in TEST_F() local
131 EXPECT_CALL(gatt_interface, CancelOpen(gatt_if, test_address_1, _)); in TEST_F()
132 devices_->Disconnect(gatt_if); in TEST_F()
340 tGATT_IF gatt_if = 0x0001; in TEST_F() local
352 RegisterForNotifications(gatt_if, _, handle_pair.first)); in TEST_F()
359 ASSERT_EQ(true, device->EnqueueInitialRequests(gatt_if, chrc_read_cb, in TEST_F()
404 tGATT_IF gatt_if = 0x0001; in TEST_F() local
420 RegisterForNotifications(gatt_if, _, handle_pair.first)); in TEST_F()
427 device->EnqueueRemainingRequests(gatt_if, chrc_read_cb, cccd_write_cb); in TEST_F()
/system/bt/test/mock/
Dmock_stack_gatt.cc41 bool GATTS_DeleteService(tGATT_IF gatt_if, Uuid* p_svc_uuid, in GATTS_DeleteService() argument
50 bool GATT_CancelConnect(tGATT_IF gatt_if, const RawAddress& bd_addr, in GATT_CancelConnect() argument
55 bool GATT_Connect(tGATT_IF gatt_if, const RawAddress& bd_addr, bool is_direct, in GATT_Connect() argument
60 bool GATT_Connect(tGATT_IF gatt_if, const RawAddress& bd_addr, bool is_direct, in GATT_Connect() argument
66 bool GATT_GetConnIdIfConnected(tGATT_IF gatt_if, const RawAddress& bd_addr, in GATT_GetConnIdIfConnected() argument
123 tGATT_STATUS GATTS_AddService(tGATT_IF gatt_if, btgatt_db_element_t* service, in GATTS_AddService() argument
154 void GATT_Deregister(tGATT_IF gatt_if) { mock_function_count_map[__func__]++; } in GATT_Deregister() argument
159 void GATT_StartIf(tGATT_IF gatt_if) { mock_function_count_map[__func__]++; } in GATT_StartIf() argument
Dmock_bta_vc_device.cc43 tGATT_IF gatt_if, GATT_READ_OP_CB chrc_read_cb, in EnqueueInitialRequests() argument
65 bool VolumeControlDevice::subscribe_for_notifications(tGATT_IF gatt_if, in subscribe_for_notifications() argument
82 void VolumeControlDevice::Disconnect(tGATT_IF gatt_if) { in Disconnect() argument
86 tGATT_IF gatt_if, GATT_READ_OP_CB chrc_read_cb, in EnqueueRemainingRequests() argument
Dmock_stack_gatt_main.cc50 tGATT_IF gatt_if) { in gatt_connect() argument
58 bool gatt_update_app_hold_link_status(tGATT_IF gatt_if, tGATT_TCB* p_tcb, in gatt_update_app_hold_link_status() argument
108 void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB* p_tcb, in gatt_update_app_use_link_flag() argument
/system/bt/btif/src/
Dbtif_gatt_test.cc48 tGATT_IF gatt_if; member
183 test_cb.gatt_if = in btif_gattc_test_command_impl()
186 GATT_StartIf(test_cb.gatt_if); in btif_gattc_test_command_impl()
188 GATT_Deregister(test_cb.gatt_if); in btif_gattc_test_command_impl()
189 test_cb.gatt_if = 0; in btif_gattc_test_command_impl()
203 if (!GATT_Connect(test_cb.gatt_if, *params->bda1, true, BT_TRANSPORT_LE, in btif_gattc_test_command_impl()
/system/bt/stack/include/
Dgatt_api.h657 typedef void(tGATT_CONN_CBACK)(tGATT_IF gatt_if, const RawAddress& bda,
670 typedef void(tGATT_ENC_CMPL_CB)(tGATT_IF gatt_if, const RawAddress& bda);
673 typedef void(tGATT_PHY_UPDATE_CB)(tGATT_IF gatt_if, uint16_t conn_id,
678 typedef void(tGATT_CONN_UPDATE_CB)(tGATT_IF gatt_if, uint16_t conn_id,
800 extern tGATT_STATUS GATTS_AddService(tGATT_IF gatt_if,
817 extern bool GATTS_DeleteService(tGATT_IF gatt_if, bluetooth::Uuid* p_svc_uuid,
1045 extern void GATT_Deregister(tGATT_IF gatt_if);
1060 extern void GATT_StartIf(tGATT_IF gatt_if);
1082 extern bool GATT_Connect(tGATT_IF gatt_if, const RawAddress& bd_addr,
1085 extern bool GATT_Connect(tGATT_IF gatt_if, const RawAddress& bd_addr,
[all …]
/system/bt/stack/test/common/
Dmock_gatt_main.cc49 tGATT_IF gatt_if) { in gatt_connect() argument
57 bool gatt_update_app_hold_link_status(tGATT_IF gatt_if, tGATT_TCB* p_tcb, in gatt_update_app_hold_link_status() argument
108 void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB* p_tcb, in gatt_update_app_use_link_flag() argument
/system/bt/stack/test/gatt/
Dstack_gatt_test.cc52 void tGATT_CONN_CBACK(tGATT_IF gatt_if, const RawAddress& bda, uint16_t conn_id, in tGATT_CONN_CBACK() argument
58 void tGATT_ENC_CMPL_CB(tGATT_IF gatt_if, const RawAddress& bda) {} in tGATT_ENC_CMPL_CB() argument
59 void tGATT_PHY_UPDATE_CB(tGATT_IF gatt_if, uint16_t conn_id, uint8_t tx_phy, in tGATT_PHY_UPDATE_CB() argument
61 void tGATT_CONN_UPDATE_CB(tGATT_IF gatt_if, uint16_t conn_id, uint16_t interval, in tGATT_CONN_UPDATE_CB() argument
Dgatt_sr_test.cc129 void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB* p_tcb, in gatt_update_app_use_link_flag() argument
189 el_.gatt_if = 1; in SetUp()
190 gatt_cb.cl_rcb[el_.gatt_if - 1].in_use = true; in SetUp()
191 gatt_cb.cl_rcb[el_.gatt_if - 1].app_cb.p_req_cb = in SetUp()
252 CHECK(test_state_.application_request_callback.conn_id_ == el_.gatt_if); in TEST_F()
295 CHECK(test_state_.application_request_callback.conn_id_ == el_.gatt_if); in TEST_F()
330 CHECK(test_state_.application_request_callback.conn_id_ == el_.gatt_if); in TEST_F()
365 CHECK(test_state_.application_request_callback.conn_id_ == el_.gatt_if); in TEST_F()
/system/bt/stack/gap/
Dgap_ble.cc81 tGATT_IF gatt_if; variable
379 if (GATT_GetConnIdIfConnected(gatt_if, peer_bda, &p_clcb->conn_id, in accept_client_operation()
383 if (!GATT_Connect(gatt_if, p_clcb->bda, true, BT_TRANSPORT_LE, true)) in accept_client_operation()
415 gatt_if = GATT_Register(app_uuid, "Gap", &gap_cback, false); in gap_attr_db_init()
417 GATT_StartIf(gatt_if); in gap_attr_db_init()
451 GATTS_AddService(gatt_if, service, in gap_attr_db_init()
570 if (!GATT_CancelConnect(gatt_if, peer_bda, true)) { in GAP_BleCancelReadPeerDevName()
/system/bt/stack/srvc/
Dsrvc_eng.cc31 static void srvc_eng_connect_cback(UNUSED_ATTR tGATT_IF gatt_if,
327 static void srvc_eng_connect_cback(UNUSED_ATTR tGATT_IF gatt_if, in srvc_eng_connect_cback() argument
404 srvc_eng_cb.gatt_if = in srvc_eng_init()
406 GATT_StartIf(srvc_eng_cb.gatt_if); in srvc_eng_init()
408 VLOG(1) << "Srvc_Init: gatt_if=" << +srvc_eng_cb.gatt_if; in srvc_eng_init()
Dsrvc_eng_int.h51 tGATT_IF gatt_if; member
/system/bt/bta/hh/
Dbta_hh_le.cc164 bta_hh_cb.gatt_if = BTA_GATTS_INVALID_IF; in bta_hh_le_enable()
175 bta_hh_cb.gatt_if = client_id; in bta_hh_le_enable()
178 bta_hh_cb.gatt_if = BTA_GATTS_INVALID_IF; in bta_hh_le_enable()
201 return (bta_hh_cb.gatt_if == client_if); in bta_hh_le_is_hh_gatt_if()
214 void bta_hh_le_deregister(void) { BTA_GATTC_AppDeregister(bta_hh_cb.gatt_if); } in bta_hh_le_deregister()
261 BTA_GATTC_Open(bta_hh_cb.gatt_if, remote_bda, true, false); in bta_hh_le_open_conn()
545 BTA_GATTC_RegisterForNotifications(bta_hh_cb.gatt_if, p_dev_cb->addr, in bta_hh_le_register_input_notif()
555 bta_hh_cb.gatt_if, p_dev_cb->addr, p_rpt->char_inst_id); in bta_hh_le_register_input_notif()
562 BTA_GATTC_RegisterForNotifications(bta_hh_cb.gatt_if, p_dev_cb->addr, in bta_hh_le_register_input_notif()
572 bta_hh_cb.gatt_if, p_dev_cb->addr, p_rpt->char_inst_id); in bta_hh_le_register_input_notif()
[all …]

12