| OLD | NEW |
| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // Sends notification if this device is ready with all services discovered. | 122 // Sends notification if this device is ready with all services discovered. |
| 123 void SendNotificationIfDiscoveryComplete(); | 123 void SendNotificationIfDiscoveryComplete(); |
| 124 | 124 |
| 125 // Returns the Bluetooth adapter. | 125 // Returns the Bluetooth adapter. |
| 126 BluetoothAdapterMac* GetMacAdapter(); | 126 BluetoothAdapterMac* GetMacAdapter(); |
| 127 | 127 |
| 128 // Returns the CoreBluetooth Peripheral. | 128 // Returns the CoreBluetooth Peripheral. |
| 129 CBPeripheral* GetPeripheral(); | 129 CBPeripheral* GetPeripheral(); |
| 130 | 130 |
| 131 // Returns BluetoothRemoteGattServiceMac based on the CBService. | 131 // Returns BluetoothRemoteGattServiceMac based on the CBService. |
| 132 BluetoothRemoteGattServiceMac* GetBluetoothRemoteGattService( | 132 BluetoothRemoteGattServiceMac* GetBluetoothRemoteGattServiceMac( |
| 133 CBService* service) const; | 133 CBService* service) const; |
| 134 | 134 |
| 135 // Returns BluetoothRemoteGattDescriptorMac based on the CBDescriptor. | 135 // Returns BluetoothRemoteGattDescriptorMac based on the CBDescriptor. |
| 136 BluetoothRemoteGattDescriptorMac* GetBluetoothRemoteGattDescriptor( | 136 BluetoothRemoteGattDescriptorMac* GetBluetoothRemoteGattDescriptorMac( |
| 137 CBDescriptor* cb_descriptor) const; | 137 CBDescriptor* cb_descriptor) const; |
| 138 | 138 |
| 139 // Callback used when the CoreBluetooth Peripheral is disconnected. | 139 // Callback used when the CoreBluetooth Peripheral is disconnected. |
| 140 void DidDisconnectPeripheral(NSError* error); | 140 void DidDisconnectPeripheral(NSError* error); |
| 141 | 141 |
| 142 // CoreBluetooth data structure. | 142 // CoreBluetooth data structure. |
| 143 base::scoped_nsobject<CBPeripheral> peripheral_; | 143 base::scoped_nsobject<CBPeripheral> peripheral_; |
| 144 | 144 |
| 145 // Objective-C delegate for the CBPeripheral. | 145 // Objective-C delegate for the CBPeripheral. |
| 146 base::scoped_nsobject<BluetoothLowEnergyPeripheralDelegate> | 146 base::scoped_nsobject<BluetoothLowEnergyPeripheralDelegate> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 165 }; | 165 }; |
| 166 | 166 |
| 167 // Stream operator for logging. | 167 // Stream operator for logging. |
| 168 DEVICE_BLUETOOTH_EXPORT std::ostream& operator<<( | 168 DEVICE_BLUETOOTH_EXPORT std::ostream& operator<<( |
| 169 std::ostream& out, | 169 std::ostream& out, |
| 170 const BluetoothLowEnergyDeviceMac& device); | 170 const BluetoothLowEnergyDeviceMac& device); |
| 171 | 171 |
| 172 } // namespace device | 172 } // namespace device |
| 173 | 173 |
| 174 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ | 174 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ |
| OLD | NEW |