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

Side by Side Diff: device/bluetooth/bluetooth_low_energy_device_mac.h

Issue 1685963003: Adding the last test related with connect/disconnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@connectdisconnect
Patch Set: Issue to convert no NSError to ConnectErrorCode Created 4 years, 10 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_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_
7 7
8 #if defined(OS_IOS) 8 #if defined(OS_IOS)
9 #import <CoreBluetooth/CoreBluetooth.h> 9 #import <CoreBluetooth/CoreBluetooth.h>
10 #else // !defined(OS_IOS) 10 #else // !defined(OS_IOS)
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 friend class BluetoothAdapterMacTest; 106 friend class BluetoothAdapterMacTest;
107 friend class BluetoothTestMac; 107 friend class BluetoothTestMac;
108 108
109 // Returns the Bluetooth adapter. 109 // Returns the Bluetooth adapter.
110 BluetoothAdapterMac* GetMacAdapter(); 110 BluetoothAdapterMac* GetMacAdapter();
111 111
112 // Returns the CoreBluetooth Peripheral. 112 // Returns the CoreBluetooth Peripheral.
113 CBPeripheral* GetPeripheral(); 113 CBPeripheral* GetPeripheral();
114 114
115 // Callback used when the CoreBluetooth Peripheral is disconnected. 115 // Callback used when the CoreBluetooth Peripheral is disconnected.
116 void DidDisconnectPeripheral(); 116 void DidDisconnectPeripheral(BluetoothDevice::ConnectErrorCode error_code);
117 117
118 // Called by the adapter when CoreBluetooth calls CBCentralManager's delegate. 118 // Called by the adapter when CoreBluetooth calls CBCentralManager's delegate.
119 void GattConnected(); 119 void GattConnected();
120 120
121 // Equivalent to [peripheral_ state]. Allows compilation on OS X 10.6. 121 // Equivalent to [peripheral_ state]. Allows compilation on OS X 10.6.
122 CBPeripheralState GetPeripheralState() const; 122 CBPeripheralState GetPeripheralState() const;
123 123
124 // CoreBluetooth data structure. 124 // CoreBluetooth data structure.
125 base::scoped_nsobject<CBPeripheral> peripheral_; 125 base::scoped_nsobject<CBPeripheral> peripheral_;
126 126
(...skipping 15 matching lines...) Expand all
142 142
143 // The services (identified by UUIDs) that this device provides. 143 // The services (identified by UUIDs) that this device provides.
144 std::set<BluetoothUUID> advertised_uuids_; 144 std::set<BluetoothUUID> advertised_uuids_;
145 145
146 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac); 146 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac);
147 }; 147 };
148 148
149 } // namespace device 149 } // namespace device
150 150
151 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ 151 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698