OSDN Git Service

Bluetooth 5 periodic scan (2/3)
authorJakub Pawlowski <jpawlowski@google.com>
Wed, 29 Mar 2017 21:28:43 +0000 (14:28 -0700)
committerJakub Pawlowski <jpawlowski@google.com>
Sat, 1 Apr 2017 05:29:54 +0000 (22:29 -0700)
This patch wires calls/callbacks through stack to prepare for actual
implementation.

Test: manual
Bug: 30622771
Change-Id: Iac8c74a228f34f5ea4231a76848e22ea64f11d06
(cherry picked from commit f685bfb7b1f6da17165a33590b18f559476e670f)

btif/src/btif_ble_scanner.cc
service/test/low_energy_scanner_unittest.cc

index 4fb3517..c23c751 100644 (file)
@@ -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;
index a53d2c4..dc20ecf 100644 (file)
@@ -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,