| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import "mock_bluetooth_central_manager.h" |
| 6 |
| 7 @implementation MockCentralManager |
| 8 |
| 9 @synthesize scanForPeripheralsWasCalled = _scanForPeripheralsWasCalled; |
| 10 @synthesize stopScanWasCalled = _stopScanWasCalled; |
| 11 |
| 12 - (instancetype)init { |
| 13 _scanForPeripheralsWasCalled = NO; |
| 14 _stopScanWasCalled = NO; |
| 15 return self; |
| 16 } |
| 17 |
| 18 - (instancetype)initWithDelegate:(id<CBCentralManagerDelegate>)delegate |
| 19 queue:(dispatch_queue_t)queue |
| 20 options:(NSDictionary*)options { |
| 21 return [self init]; |
| 22 } |
| 23 |
| 24 - (CBCentralManagerState)state { |
| 25 return CBCentralManagerStatePoweredOn; |
| 26 } |
| 27 |
| 28 - (void)scanForPeripheralsWithServices:(NSArray*)serviceUUIDs |
| 29 options:(NSDictionary*)options { |
| 30 _scanForPeripheralsWasCalled = YES; |
| 31 } |
| 32 |
| 33 - (void)stopScan { |
| 34 _stopScanWasCalled = YES; |
| 35 } |
| 36 |
| 37 @end |
| OLD | NEW |