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

Unified Diff: device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h

Issue 1948763003: Adding support for service scan on OS X (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: Fixing comments Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h
diff --git a/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h b/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h
index fee3dc6923b7a6b89687f65b1f9146df0e106e60..f82d2b080bdb1ade734b7221e16a898054707ce4 100644
--- a/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h
+++ b/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h
@@ -10,13 +10,21 @@
#import <CoreBluetooth/CoreBluetooth.h>
+namespace device {
+
+class BluetoothTestMac;
+}
+
// This class mocks the behavior of a CBPeripheral.
@interface MockCBPeripheral : NSObject
@property(nonatomic, readonly) CBPeripheralState state;
@property(nonatomic, readonly) NSUUID* identifier;
@property(nonatomic, readonly) NSString* name;
+@property(nonatomic, assign) id<CBPeripheralDelegate> delegate;
@property(nonatomic, readonly) CBPeripheral* peripheral;
+@property(retain, readonly) NSArray* services;
+@property(nonatomic, assign) device::BluetoothTestMac* bluetoothTestMac;
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithIdentifier:(NSUUID*)identifier;
@@ -24,7 +32,12 @@
- (instancetype)initWithIdentifier:(NSUUID*)identifier
name:(NSString*)name NS_DESIGNATED_INITIALIZER;
+// Methods for faking events.
- (void)setState:(CBPeripheralState)state;
+- (void)removeAllServices;
+- (void)addServices:(NSArray*)services;
+- (void)didDiscoverWithError:(NSError*)error;
+- (void)removeService:(CBService*)uuid;
@end
« 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