summaryrefslogtreecommitdiffstats
path: root/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h
blob: fee3dc6923b7a6b89687f65b1f9146df0e106e60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef DEVICE_BLUETOOTH_MOCK_BLUETOOTH_CBPERIPHERAL_MAC_H_
#define DEVICE_BLUETOOTH_MOCK_BLUETOOTH_CBPERIPHERAL_MAC_H_

#include "base/mac/sdk_forward_declarations.h"
#include "build/build_config.h"

#import <CoreBluetooth/CoreBluetooth.h>

// 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, readonly) CBPeripheral* peripheral;

- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithIdentifier:(NSUUID*)identifier;
- (instancetype)initWithUTF8StringIdentifier:(const char*)identifier;
- (instancetype)initWithIdentifier:(NSUUID*)identifier
                              name:(NSString*)name NS_DESIGNATED_INITIALIZER;

- (void)setState:(CBPeripheralState)state;

@end

#endif  // DEVICE_BLUETOOTH_MOCK_BLUETOOTH_CBPERIPHERAL_MAC_H_