| Index: device/bluetooth/bluetooth_remote_gatt_characteristic.h
|
| diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic.h b/device/bluetooth/bluetooth_remote_gatt_characteristic.h
|
| index dcd5df1a7b743512ba489fc624fbae3a2ece51ad..cb96c0e96ad670be4c0341f7ae39d490c151e93c 100644
|
| --- a/device/bluetooth/bluetooth_remote_gatt_characteristic.h
|
| +++ b/device/bluetooth/bluetooth_remote_gatt_characteristic.h
|
| @@ -119,23 +119,41 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristic
|
| // Sends a read request to a remote characteristic to read its value.
|
| // |callback| is called to return the read value on success and
|
| // |error_callback| is called for failures.
|
| - virtual void ReadRemoteCharacteristic(
|
| + // If there are any other GATT operations in progress this will fail
|
| + // with BluetoothRemoteGattService::GATT_ERROR_IN_PROGRESS. This currently
|
| + // only happens on Android.
|
| + // TODO(crbug.com/657921): Return in progress error on all platforms.
|
| + virtual void ReadRemoteCharacteristic(const ValueCallback& callback,
|
| + const ErrorCallback& error_callback);
|
| + // TODO(crbug.com/657921): Make pure virtual once all platform implement it.
|
| + virtual void ReadRemoteCharacteristicImpl(
|
| const ValueCallback& callback,
|
| - const ErrorCallback& error_callback) = 0;
|
| + const ErrorCallback& error_callback){};
|
|
|
| // Sends a write request to a remote characteristic with the value |value|.
|
| // |callback| is called to signal success and |error_callback| for failures.
|
| // This method only applies to remote characteristics and will fail for those
|
| // that are locally hosted.
|
| - virtual void WriteRemoteCharacteristic(
|
| + // If there are any other GATT operations in progress this will fail
|
| + // with BluetoothRemoteGattService::GATT_ERROR_IN_PROGRESS. This currently
|
| + // only happens on Android.
|
| + // TODO(crbug.com/657921): Return in progress error on all platforms.
|
| + virtual void WriteRemoteCharacteristic(const std::vector<uint8_t>& value,
|
| + const base::Closure& callback,
|
| + const ErrorCallback& error_callback);
|
| + // TODO(crbug.com/657921): Make pure virtual once all platform implement it.
|
| + virtual void WriteRemoteCharacteristicImpl(
|
| const std::vector<uint8_t>& value,
|
| const base::Closure& callback,
|
| - const ErrorCallback& error_callback) = 0;
|
| + const ErrorCallback& error_callback){};
|
|
|
| protected:
|
| BluetoothRemoteGattCharacteristic();
|
| ~BluetoothRemoteGattCharacteristic() override;
|
|
|
| + bool HasPendingGattOperation();
|
| + void SetPendingGattOperation(bool pending);
|
| +
|
| // Writes to the Client Characteristic Configuration descriptor to enable
|
| // notifications/indications. This method is meant to be called from
|
| // StartNotifySession and should contain only the code necessary to start
|
|
|