Chromium Code Reviews| Index: device/bluetooth/bluetooth_low_energy_device_mac.h |
| diff --git a/device/bluetooth/bluetooth_low_energy_device_mac.h b/device/bluetooth/bluetooth_low_energy_device_mac.h |
| index 4466d67f13f9181d2adb21cd08994fe6d6f90546..ceb691a16ed83a3be9c4c7ef282f2a76da3af874 100644 |
| --- a/device/bluetooth/bluetooth_low_energy_device_mac.h |
| +++ b/device/bluetooth/bluetooth_low_energy_device_mac.h |
| @@ -22,10 +22,13 @@ |
| #include "crypto/sha2.h" |
| #include "device/bluetooth/bluetooth_device_mac.h" |
| +@class BluetoothLowEnergyPeripheralDelegate; |
| + |
| namespace device { |
| class BluetoothAdapterMac; |
| class BluetoothLowEnergyDiscoverManagerMac; |
| +class BluetoothRemoteGattServiceMac; |
| class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyDeviceMac |
| : public BluetoothDeviceMac { |
| @@ -87,8 +90,13 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyDeviceMac |
| // BluetoothDevice override. |
| std::string GetDeviceName() const override; |
| void CreateGattConnectionImpl() override; |
| + void DidConnectGatt() override; |
| void DisconnectGatt() override; |
| + // Methods for BluetoothLowEnergyPeripheralBridge. |
|
ortuno
2016/05/06 16:03:32
nit: Methods used by BluetoothLowEnergyPeripheralB
jlebel
2016/05/07 00:16:10
Done.
|
| + void DidDiscoverPrimaryServices(NSError* error); |
| + void DidModifyServices(NSArray* invalidatedServices); |
| + |
| // Updates information about the device. |
| virtual void Update(NSDictionary* advertisement_data, int rssi); |
| @@ -103,6 +111,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyDeviceMac |
| private: |
| friend class BluetoothAdapterMac; |
| friend class BluetoothAdapterMacTest; |
| + friend class BluetoothLowEnergyPeripheralBridge; |
| friend class BluetoothTestMac; |
| // Returns the Bluetooth adapter. |
| @@ -111,11 +120,17 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyDeviceMac |
| // Returns the CoreBluetooth Peripheral. |
| CBPeripheral* GetPeripheral(); |
| + // Returns BluetoothRemoteGattServiceMac based on the CBService. |
| + BluetoothRemoteGattServiceMac* GetBluetoothRemoteGattService( |
| + CBService* service) const; |
| + |
| // Callback used when the CoreBluetooth Peripheral is disconnected. |
| void DidDisconnectPeripheral(BluetoothDevice::ConnectErrorCode error_code); |
| // CoreBluetooth data structure. |
| base::scoped_nsobject<CBPeripheral> peripheral_; |
| + base::scoped_nsobject<BluetoothLowEnergyPeripheralDelegate> |
|
ortuno
2016/05/06 16:03:32
nit: Add comment for this member.
jlebel
2016/05/07 00:16:10
Done.
|
| + peripheral_delegate_; |
| // RSSI value. |
| int rssi_; |