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

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

Issue 2904363002: bluetooth: macOS: Removing intermediate methods in BluetoothRemoteServiceMac (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_low_energy_device_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 10 matching lines...) Expand all
21 #include "build/build_config.h" 21 #include "build/build_config.h"
22 #include "crypto/sha2.h" 22 #include "crypto/sha2.h"
23 #include "device/bluetooth/bluetooth_device_mac.h" 23 #include "device/bluetooth/bluetooth_device_mac.h"
24 24
25 @class BluetoothLowEnergyPeripheralDelegate; 25 @class BluetoothLowEnergyPeripheralDelegate;
26 26
27 namespace device { 27 namespace device {
28 28
29 class BluetoothAdapterMac; 29 class BluetoothAdapterMac;
30 class BluetoothRemoteGattServiceMac; 30 class BluetoothRemoteGattServiceMac;
31 class BluetoothRemoteGattCharacteristicMac;
31 class BluetoothRemoteGattDescriptorMac; 32 class BluetoothRemoteGattDescriptorMac;
32 33
33 class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyDeviceMac 34 class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyDeviceMac
34 : public BluetoothDeviceMac { 35 : public BluetoothDeviceMac {
35 public: 36 public:
36 BluetoothLowEnergyDeviceMac(BluetoothAdapterMac* adapter, 37 BluetoothLowEnergyDeviceMac(BluetoothAdapterMac* adapter,
37 CBPeripheral* peripheral); 38 CBPeripheral* peripheral);
38 ~BluetoothLowEnergyDeviceMac() override; 39 ~BluetoothLowEnergyDeviceMac() override;
39 40
40 // BluetoothDevice overrides. 41 // BluetoothDevice overrides.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // Returns the Bluetooth adapter. 126 // Returns the Bluetooth adapter.
126 BluetoothAdapterMac* GetMacAdapter(); 127 BluetoothAdapterMac* GetMacAdapter();
127 128
128 // Returns the CoreBluetooth Peripheral. 129 // Returns the CoreBluetooth Peripheral.
129 CBPeripheral* GetPeripheral(); 130 CBPeripheral* GetPeripheral();
130 131
131 // Returns BluetoothRemoteGattServiceMac based on the CBService. 132 // Returns BluetoothRemoteGattServiceMac based on the CBService.
132 BluetoothRemoteGattServiceMac* GetBluetoothRemoteGattServiceMac( 133 BluetoothRemoteGattServiceMac* GetBluetoothRemoteGattServiceMac(
133 CBService* service) const; 134 CBService* service) const;
134 135
136 // Returns BluetoothRemoteGattCharacteristicMac based on the CBCharacteristic.
137 BluetoothRemoteGattCharacteristicMac* GetBluetoothRemoteGattCharacteristicMac(
138 CBCharacteristic* cb_characteristic) const;
139
135 // Returns BluetoothRemoteGattDescriptorMac based on the CBDescriptor. 140 // Returns BluetoothRemoteGattDescriptorMac based on the CBDescriptor.
136 BluetoothRemoteGattDescriptorMac* GetBluetoothRemoteGattDescriptorMac( 141 BluetoothRemoteGattDescriptorMac* GetBluetoothRemoteGattDescriptorMac(
137 CBDescriptor* cb_descriptor) const; 142 CBDescriptor* cb_descriptor) const;
138 143
139 // Callback used when the CoreBluetooth Peripheral is disconnected. 144 // Callback used when the CoreBluetooth Peripheral is disconnected.
140 void DidDisconnectPeripheral(NSError* error); 145 void DidDisconnectPeripheral(NSError* error);
141 146
142 // CoreBluetooth data structure. 147 // CoreBluetooth data structure.
143 base::scoped_nsobject<CBPeripheral> peripheral_; 148 base::scoped_nsobject<CBPeripheral> peripheral_;
144 149
(...skipping 20 matching lines...) Expand all
165 }; 170 };
166 171
167 // Stream operator for logging. 172 // Stream operator for logging.
168 DEVICE_BLUETOOTH_EXPORT std::ostream& operator<<( 173 DEVICE_BLUETOOTH_EXPORT std::ostream& operator<<(
169 std::ostream& out, 174 std::ostream& out,
170 const BluetoothLowEnergyDeviceMac& device); 175 const BluetoothLowEnergyDeviceMac& device);
171 176
172 } // namespace device 177 } // namespace device
173 178
174 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ 179 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_low_energy_device_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698