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_cbperipheral_mac.h" |
| 6 |
| 7 @implementation MockCBPeripheral |
| 8 |
| 9 @synthesize name = _name; |
| 10 @synthesize identifier = _identifier; |
| 11 @synthesize state = _state; |
| 12 |
| 13 - (instancetype)initWithIdentifier:(NSUUID*)identifier { |
| 14 self = [super init]; |
| 15 if (self) { |
| 16 _identifier = [identifier retain]; |
| 17 _name = [@"FakeBluetoothDevice" retain]; |
| 18 _state = CBPeripheralStateDisconnected; |
| 19 } |
| 20 return self; |
| 21 } |
| 22 |
| 23 - (void)dealloc { |
| 24 [_name release]; |
| 25 [_identifier release]; |
| 26 [super dealloc]; |
| 27 } |
| 28 |
| 29 - (void)setStateForTesting:(CBPeripheralState)state { |
| 30 _state = state; |
| 31 } |
| 32 |
| 33 @end |
OLD | NEW |