From f685bfb7b1f6da17165a33590b18f559476e670f Mon Sep 17 00:00:00 2001 From: Jakub Pawlowski Date: Wed, 29 Mar 2017 14:28:43 -0700 Subject: [PATCH] Bluetooth 5 periodic scan (2/3) This patch wires calls/callbacks through stack to prepare for actual implementation. Test: manual Bug: 30622771 Change-Id: Iac8c74a228f34f5ea4231a76848e22ea64f11d06 --- btif/src/btif_ble_scanner.cc | 6 ++++++ service/test/low_energy_scanner_unittest.cc | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/btif/src/btif_ble_scanner.cc b/btif/src/btif_ble_scanner.cc index 4fb351780..c23c75120 100644 --- a/btif/src/btif_ble_scanner.cc +++ b/btif/src/btif_ble_scanner.cc @@ -420,6 +420,12 @@ class BleScannerInterfaceImpl : public BleScannerInterface { base::Bind(&BTM_BleReadScanReports, (uint8_t)scan_mode, Bind(bta_batch_scan_reports_cb, client_if))); } + + void StartSync(uint8_t sid, bt_bdaddr_t address, uint16_t skip, + uint16_t timeout, StartSyncCb start_cb, SyncReportCb report_cb, + SyncLostCb lost_cb) override {} + + void StopSync(uint16_t handle) override {} }; BleScannerInterface* btLeScannerInstance = nullptr; diff --git a/service/test/low_energy_scanner_unittest.cc b/service/test/low_energy_scanner_unittest.cc index a53d2c473..dc20ecfb3 100644 --- a/service/test/low_energy_scanner_unittest.cc +++ b/service/test/low_energy_scanner_unittest.cc @@ -67,6 +67,10 @@ class MockScannerHandler : public BleScannerInterface { MOCK_METHOD2(BatchscanReadReports, void(int client_if, int scan_mode)); + MOCK_METHOD7(StartSync, void(uint8_t, bt_bdaddr_t, uint16_t, uint16_t, + StartSyncCb, SyncReportCb, SyncLostCb)); + MOCK_METHOD1(StopSync, void(uint16_t)); + void ScanFilterAddRemove(int action, int filt_type, int filt_index, int company_id, int company_id_mask, const bt_uuid_t* p_uuid, -- 2.11.0