Chromium Code Reviews| Index: components/arc/bluetooth/arc_bluetooth_bridge.h |
| diff --git a/components/arc/bluetooth/arc_bluetooth_bridge.h b/components/arc/bluetooth/arc_bluetooth_bridge.h |
| index dd2b8eed0856640263d7269648defbf2c3ce8b42..6ac811cbc8985721f098d7425ae2c0d8d4d593c7 100644 |
| --- a/components/arc/bluetooth/arc_bluetooth_bridge.h |
| +++ b/components/arc/bluetooth/arc_bluetooth_bridge.h |
| @@ -303,6 +303,12 @@ class ArcBluetoothBridge |
| const StopLEListenCallback& callback, |
| device::BluetoothAdvertisement::ErrorCode error_code); |
| + using GattStatusCallback = base::Callback<void(mojom::BluetoothGattStatus)>; |
|
rkc
2016/07/01 22:21:46
Move alias definition to the top of the class.
htt
puthik_chromium
2016/07/14 19:01:47
Done.
|
| + void OnGattOperationDone(const GattStatusCallback& callback) const; |
| + void OnGattOperationError( |
| + const GattStatusCallback& callback, |
| + device::BluetoothGattService::GattErrorCode error_code) const; |
| + |
| using GattReadCallback = base::Callback<void(mojom::BluetoothGattValuePtr)>; |
| void OnGattReadDone(const GattReadCallback& callback, |
| const std::vector<uint8_t>& result) const; |
| @@ -310,21 +316,10 @@ class ArcBluetoothBridge |
| const GattReadCallback& callback, |
| device::BluetoothGattService::GattErrorCode error_code) const; |
| - using GattWriteCallback = base::Callback<void(mojom::BluetoothGattStatus)>; |
| - void OnGattWriteDone(const GattWriteCallback& callback) const; |
| - void OnGattWriteError( |
| - const GattWriteCallback& callback, |
| - device::BluetoothGattService::GattErrorCode error_code) const; |
| - |
| void OnGattNotifyStartDone( |
| const RegisterForGattNotificationCallback& callback, |
| const std::string char_string_id, |
| std::unique_ptr<device::BluetoothGattNotifySession> notify_session); |
| - void OnGattNotifyStartError( |
| - const RegisterForGattNotificationCallback& callback, |
| - device::BluetoothGattService::GattErrorCode error_code) const; |
| - void OnGattNotifyStopDone( |
| - const DeregisterForGattNotificationCallback& callback) const; |
| private: |
| mojo::Array<mojom::BluetoothPropertyPtr> GetDeviceProperties( |
| @@ -356,6 +351,9 @@ class ArcBluetoothBridge |
| // Propagates the list of paired device to Android. |
| void SendCachedPairedDevices() const; |
| + template <class T> |
| + int32_t CreateGattAttributeHandle(T* gatt_obj); |
| + |
| mojo::Binding<mojom::BluetoothHost> binding_; |
| scoped_refptr<bluez::BluetoothAdapterBlueZ> bluetooth_adapter_; |
| @@ -363,6 +361,8 @@ class ArcBluetoothBridge |
| std::unique_ptr<device::BluetoothDiscoverySession> discovery_session_; |
| std::map<std::string, std::unique_ptr<device::BluetoothGattNotifySession>> |
| notification_session_; |
| + // Map from android int handle to Chrome (BlueZ) string identifier. |
| + std::map<int32_t, std::string> gatt_identifier_; |
| // WeakPtrFactory to use for callbacks. |
| base::WeakPtrFactory<ArcBluetoothBridge> weak_factory_; |