Home
last modified time | relevance | path

Searched refs:MockCallbackEvents (Results 1 – 4 of 4) sorted by relevance

/packages/modules/Bluetooth/system/rust/src/gatt/mocks/
Dmock_callbacks.rs13 pub struct MockCallbacks(mpsc::UnboundedSender<MockCallbackEvents>);
17 pub fn new() -> (Self, UnboundedReceiver<MockCallbackEvents>) { in new()
25 pub enum MockCallbackEvents { enum
53 .send(MockCallbackEvents::OnServerRead(conn_id, trans_id, handle, attr_type, offset)) in on_server_read()
67 .send(MockCallbackEvents::OnServerWrite( in on_server_write()
83 self.0.send(MockCallbackEvents::OnIndicationSentConfirmation(conn_id, result)).unwrap(); in on_indication_sent_confirmation()
92 self.0.send(MockCallbackEvents::OnExecute(conn_id, trans_id, decision)).unwrap() in on_execute()
Dmock_database_callbacks.rs18 pub struct MockCallbacks(mpsc::UnboundedSender<MockCallbackEvents>);
22 pub fn new() -> (Self, UnboundedReceiver<MockCallbackEvents>) { in new()
29 pub enum MockCallbackEvents { enum
44 self.0.send(MockCallbackEvents::OnLeConnect(tcb_idx, bearer.downgrade())).ok().unwrap(); in on_le_connect()
48 self.0.send(MockCallbackEvents::OnLeDisconnect(tcb_idx)).ok().unwrap(); in on_le_disconnect()
52 self.0.send(MockCallbackEvents::OnServiceChange(range)).ok().unwrap(); in on_service_change()
/packages/modules/Bluetooth/system/rust/tests/
Dgatt_callbacks_test.rs13 mocks::mock_callbacks::{MockCallbackEvents, MockCallbacks},
32 ) -> (Rc<CallbackTransactionManager>, UnboundedReceiver<MockCallbackEvents>) { in initialize_manager_with_connection() argument
38 async fn pull_trans_id(events_rx: &mut UnboundedReceiver<MockCallbackEvents>) -> TransactionId { in pull_trans_id()
40 MockCallbackEvents::OnServerRead(_, trans_id, _, _, _) => trans_id, in pull_trans_id()
41 MockCallbackEvents::OnServerWrite(_, trans_id, _, _, _, _) => trans_id, in pull_trans_id()
42 MockCallbackEvents::OnExecute(_, trans_id, _) => trans_id, in pull_trans_id()
62 let MockCallbackEvents::OnServerRead(CONN_ID, _, HANDLE_1, BACKING_TYPE, OFFSET) = in test_read_characteristic_callback() localVariable
243 let MockCallbackEvents::OnServerWrite( in test_write_characteristic_callback() localVariable
370 let MockCallbackEvents::OnServerWrite( in test_write_no_response_callback() localVariable
400 let MockCallbackEvents::OnExecute(CONN_ID, _, TransactionDecision::Cancel) = in test_execute_characteristic_callback() localVariable
/packages/modules/Bluetooth/system/rust/src/gatt/server/
Dgatt_database.rs520 mock_database_callbacks::{MockCallbackEvents, MockCallbacks},
1294 assert!(matches!(event, MockCallbackEvents::OnLeConnect(TCB_IDX, _))); in test_connection_listener()
1309 assert!(matches!(event, MockCallbackEvents::OnLeDisconnect(TCB_IDX))); in test_disconnection_listener()
1326 assert!(matches!(event, MockCallbackEvents::OnLeDisconnect(TCB_IDX))); in test_multiple_listeners()
1328 assert!(matches!(event, MockCallbackEvents::OnLeDisconnect(TCB_IDX))); in test_multiple_listeners()
1358 let MockCallbackEvents::OnServiceChange(range) = event else { in test_add_service_changed_listener() localVariable
1409 let MockCallbackEvents::OnServiceChange(range) = event else { in test_partial_remove_service_changed_listener() localVariable
1444 let MockCallbackEvents::OnServiceChange(range) = event else { in test_full_remove_service_changed_listener() localVariable
1474 let MockCallbackEvents::OnServiceChange(range) = event else { in test_trivial_remove_service_changed_listener() localVariable