Index: device/bluetooth/bluetooth_adapter_mac.h |
diff --git a/device/bluetooth/bluetooth_adapter_mac.h b/device/bluetooth/bluetooth_adapter_mac.h |
index 472c2f9bd104fc65cdf9e53719324d8612bc1069..7811bbbf6b3611abccc3fe8ef5a1785d139898ba 100644 |
--- a/device/bluetooth/bluetooth_adapter_mac.h |
+++ b/device/bluetooth/bluetooth_adapter_mac.h |
@@ -97,16 +97,28 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterMac |
// (crbug.com/506287). |
static bool IsLowEnergyAvailable(); |
- // Resets |low_energy_central_manager_| to |central_manager| and sets |
- // |low_energy_central_manager_delegate_| as the manager's delegate. Should |
- // be called only when |IsLowEnergyAvailable()|. |
- void SetCentralManagerForTesting(CBCentralManager* central_manager); |
+ // Creates a GATT connection by calling CoreBluetooth APIs. |
+ void CreateGattConnection(BluetoothLowEnergyDeviceMac* device_mac); |
+ |
+ // Close the GATT connection by calling CoreBluetooth APIs. |
scheib
2016/02/10 18:59:45
Closes https://google.github.io/styleguide/cppguid
jlebel
2016/02/10 21:20:07
Done.
|
+ void DisconnectGatt(BluetoothLowEnergyDeviceMac* device_mac); |
+ |
+ // Methods called from CBCentralManager delegate. |
+ void DidConnectPeripheral(CBPeripheral* peripheral); |
+ void DidFailToConnectPeripheral(CBPeripheral* peripheral, NSError* error); |
+ void DidDisconnectPeripheral(CBPeripheral* peripheral, NSError* error); |
protected: |
// BluetoothAdapter override: |
void RemovePairingDelegateInternal( |
device::BluetoothDevice::PairingDelegate* pairing_delegate) override; |
+ // Resets |low_energy_central_manager_| to |central_manager| and sets |
+ // |low_energy_central_manager_delegate_| as the manager's delegate. Should |
+ // be called only when |IsLowEnergyAvailable()|. |
+ void SetCentralManagerForTesting(CBCentralManager* central_manager); |
+ CBCentralManager* GetCentralManagerForTesting(); |
+ |
private: |
// The length of time that must elapse since the last Inquiry response (on |
// Classic devices) or call to BluetoothLowEnergyDevice::Update() (on Low |