| 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..c5e24b166a9ac59bf989c859daa9c454c1e890dd 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 {
|
| @@ -89,6 +92,10 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyDeviceMac
|
| void CreateGattConnectionImpl() override;
|
| void DisconnectGatt() override;
|
|
|
| + // Methods used by BluetoothLowEnergyPeripheralBridge.
|
| + void DidDiscoverPrimaryServices(NSError* error);
|
| + void DidModifyServices(NSArray* invalidatedServices);
|
| +
|
| // Updates information about the device.
|
| virtual void Update(NSDictionary* advertisement_data, int rssi);
|
|
|
| @@ -103,6 +110,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyDeviceMac
|
| private:
|
| friend class BluetoothAdapterMac;
|
| friend class BluetoothAdapterMacTest;
|
| + friend class BluetoothLowEnergyPeripheralBridge;
|
| friend class BluetoothTestMac;
|
|
|
| // Returns the Bluetooth adapter.
|
| @@ -111,12 +119,20 @@ 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_;
|
|
|
| + // Objective-C delegate for the CBPeripheral.
|
| + base::scoped_nsobject<BluetoothLowEnergyPeripheralDelegate>
|
| + peripheral_delegate_;
|
| +
|
| // RSSI value.
|
| int rssi_;
|
|
|
|
|