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

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: Using FAILED instead of UNKNOWN error code 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 // Equivalent to [peripheral_ state]. Allows compilation on OS X 10.6. 118 // Equivalent to [peripheral_ state]. Allows compilation on OS X 10.6.
119 CBPeripheralState GetPeripheralState() const; 119 CBPeripheralState GetPeripheralState() const;
120 120
121 // CoreBluetooth data structure. 121 // CoreBluetooth data structure.
122 base::scoped_nsobject<CBPeripheral> peripheral_; 122 base::scoped_nsobject<CBPeripheral> peripheral_;
123 123
124 // RSSI value. 124 // RSSI value.
125 int rssi_; 125 int rssi_;
126 126
(...skipping 12 matching lines...) Expand all
139 139
140 // The services (identified by UUIDs) that this device provides. 140 // The services (identified by UUIDs) that this device provides.
141 std::set<BluetoothUUID> advertised_uuids_; 141 std::set<BluetoothUUID> advertised_uuids_;
142 142
143 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac); 143 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac);
144 }; 144 };
145 145
146 } // namespace device 146 } // namespace device
147 147
148 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ 148 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698