| Index: device/bluetooth/test/mock_bluetooth_central_manager_mac.mm
|
| diff --git a/device/bluetooth/test/mock_bluetooth_central_manager_mac.mm b/device/bluetooth/test/mock_bluetooth_central_manager_mac.mm
|
| index fbb0dff41e75d315a5044a6e61dde508fe7382fd..ced601c5eb2649a0fc0bb8613dc6ec52b41cae7c 100644
|
| --- a/device/bluetooth/test/mock_bluetooth_central_manager_mac.mm
|
| +++ b/device/bluetooth/test/mock_bluetooth_central_manager_mac.mm
|
| @@ -7,7 +7,9 @@
|
| #import "device/bluetooth/test/bluetooth_test_mac.h"
|
| #import "device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h"
|
|
|
| -@implementation MockCentralManager
|
| +@implementation MockCentralManager {
|
| + NSMutableArray* _connectedMockPeripheral;
|
| +}
|
|
|
| @synthesize scanForPeripheralsCallCount = _scanForPeripheralsCallCount;
|
| @synthesize stopScanCallCount = _stopScanCallCount;
|
| @@ -15,6 +17,19 @@
|
| @synthesize state = _state;
|
| @synthesize bluetoothTestMac = _bluetoothTestMac;
|
|
|
| +- (instancetype)init {
|
| + self = [super init];
|
| + if (self) {
|
| + _connectedMockPeripheral = [[NSMutableArray alloc] init];
|
| + }
|
| + return self;
|
| +}
|
| +
|
| +- (void)dealloc {
|
| + [_connectedMockPeripheral release];
|
| + [super dealloc];
|
| +}
|
| +
|
| - (BOOL)isKindOfClass:(Class)aClass {
|
| if (aClass == [CBCentralManager class] ||
|
| [aClass isSubclassOfClass:[CBCentralManager class]]) {
|
| @@ -53,4 +68,12 @@
|
| }
|
| }
|
|
|
| +- (NSArray*)retrieveConnectedPeripheralsWithServices:(NSArray*)services {
|
| + return [[_connectedMockPeripheral copy] autorelease];
|
| +}
|
| +
|
| +- (void)addConnectedMockPeripheral:(MockCBPeripheral*)peripheral {
|
| + [_connectedMockPeripheral addObject:peripheral];
|
| +}
|
| +
|
| @end
|
|
|