Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h

Issue 2009753002: bluetooth: Make public BluetoothDevice::GetName method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split out name/alias Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_BLUETOOTH_MOCK_BLUETOOTH_CBPERIPHERAL_MAC_H_ 5 #ifndef DEVICE_BLUETOOTH_MOCK_BLUETOOTH_CBPERIPHERAL_MAC_H_
6 #define DEVICE_BLUETOOTH_MOCK_BLUETOOTH_CBPERIPHERAL_MAC_H_ 6 #define DEVICE_BLUETOOTH_MOCK_BLUETOOTH_CBPERIPHERAL_MAC_H_
7 7
8 #include "base/mac/sdk_forward_declarations.h" 8 #include "base/mac/sdk_forward_declarations.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
11 #import <CoreBluetooth/CoreBluetooth.h> 11 #import <CoreBluetooth/CoreBluetooth.h>
12 12
13 namespace device { 13 namespace device {
14 14
15 class BluetoothTestMac; 15 class BluetoothTestMac;
16 } 16 }
17 17
18 // This class mocks the behavior of a CBPeripheral. 18 // This class mocks the behavior of a CBPeripheral.
19 @interface MockCBPeripheral : NSObject 19 @interface MockCBPeripheral : NSObject
20 20
21 @property(nonatomic, readonly) CBPeripheralState state; 21 @property(nonatomic, readonly) CBPeripheralState state;
22 @property(nonatomic, readonly) NSUUID* identifier; 22 @property(nonatomic, readonly) NSUUID* identifier;
23 @property(nonatomic, readonly) NSString* name; 23 @property(nonatomic, readonly) NSString* name;
24 @property(nonatomic, assign) id<CBPeripheralDelegate> delegate; 24 @property(nonatomic, assign) id<CBPeripheralDelegate> delegate;
25 @property(nonatomic, readonly) CBPeripheral* peripheral; 25 @property(nonatomic, readonly) CBPeripheral* peripheral;
26 @property(retain, readonly) NSArray* services; 26 @property(retain, readonly) NSArray* services;
27 @property(nonatomic, assign) device::BluetoothTestMac* bluetoothTestMac; 27 @property(nonatomic, assign) device::BluetoothTestMac* bluetoothTestMac;
28 28
29 - (instancetype)init NS_UNAVAILABLE; 29 - (instancetype)init NS_UNAVAILABLE;
30 - (instancetype)initWithIdentifier:(NSUUID*)identifier;
31 - (instancetype)initWithUTF8StringIdentifier:(const char*)identifier; 30 - (instancetype)initWithUTF8StringIdentifier:(const char*)identifier;
31 - (instancetype)initWithUTF8StringIdentifier:(const char*)identifier
32 name:(NSString*)name;
32 - (instancetype)initWithIdentifier:(NSUUID*)identifier 33 - (instancetype)initWithIdentifier:(NSUUID*)identifier
33 name:(NSString*)name NS_DESIGNATED_INITIALIZER; 34 name:(NSString*)name NS_DESIGNATED_INITIALIZER;
34 35
35 // Methods for faking events. 36 // Methods for faking events.
36 - (void)setState:(CBPeripheralState)state; 37 - (void)setState:(CBPeripheralState)state;
37 - (void)removeAllServices; 38 - (void)removeAllServices;
38 - (void)addServices:(NSArray*)services; 39 - (void)addServices:(NSArray*)services;
39 - (void)didDiscoverServicesWithError:(NSError*)error; 40 - (void)didDiscoverServicesWithError:(NSError*)error;
40 - (void)removeService:(CBService*)uuid; 41 - (void)removeService:(CBService*)uuid;
41 - (void)didDiscoverCharactericsForAllServices; 42 - (void)didDiscoverCharactericsForAllServices;
42 - (void)didModifyServices:(NSArray*)invalidatedServices; 43 - (void)didModifyServices:(NSArray*)invalidatedServices;
43 44
44 @end 45 @end
45 46
46 #endif // DEVICE_BLUETOOTH_MOCK_BLUETOOTH_CBPERIPHERAL_MAC_H_ 47 #endif // DEVICE_BLUETOOTH_MOCK_BLUETOOTH_CBPERIPHERAL_MAC_H_
OLDNEW
« no previous file with comments | « device/bluetooth/test/bluetooth_test_mac.mm ('k') | device/bluetooth/test/mock_bluetooth_cbperipheral_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698