| Index: device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h
|
| diff --git a/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h b/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h
|
| index 0687b0d2d31788a2877e4e74f1497ced97baffa3..c25c22fab5ce256904bb47084a8badaf2ba13e0b 100644
|
| --- a/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h
|
| +++ b/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h
|
| @@ -63,6 +63,14 @@ class BluetoothRemoteGattCharacteristicBlueZ
|
| const base::Closure& callback,
|
| const ErrorCallback& error_callback) override;
|
|
|
| + bool characteristic_value_read_in_progress() {
|
| + return characteristic_value_read_in_progress_;
|
| + }
|
| +
|
| + void set_characteristic_value_read_in_progress(bool in_progress) {
|
| + characteristic_value_read_in_progress_ = in_progress;
|
| + }
|
| +
|
| protected:
|
| void SubscribeToNotifications(
|
| device::BluetoothRemoteGattDescriptor* ccc_descriptor,
|
| @@ -110,11 +118,17 @@ class BluetoothRemoteGattCharacteristicBlueZ
|
| const std::string& error_name,
|
| const std::string& error_message);
|
|
|
| - // Called by dbus:: on unsuccessful completion of a request to read or write
|
| + // Called by dbus:: on unsuccessful completion of a request to read
|
| // the characteristic value.
|
| - void OnError(const ErrorCallback& error_callback,
|
| - const std::string& error_name,
|
| - const std::string& error_message);
|
| + void OnReadError(const ErrorCallback& error_callback,
|
| + const std::string& error_name,
|
| + const std::string& error_message);
|
| +
|
| + // Called by dbus:: on unsuccessful completion of a request to write
|
| + // the characteristic value.
|
| + void OnWriteError(const ErrorCallback& error_callback,
|
| + const std::string& error_name,
|
| + const std::string& error_message);
|
|
|
| // True, if there exists a Bluez notify session.
|
| bool has_notify_session_;
|
| @@ -133,6 +147,9 @@ class BluetoothRemoteGattCharacteristicBlueZ
|
| // The GATT service this GATT characteristic belongs to.
|
| BluetoothRemoteGattServiceBlueZ* service_;
|
|
|
| + // True if a gatt read request is in progress.
|
| + bool characteristic_value_read_in_progress_;
|
| +
|
| // Note: This should remain the last member so it'll be destroyed and
|
| // invalidate its weak pointers before any other members are destroyed.
|
| base::WeakPtrFactory<BluetoothRemoteGattCharacteristicBlueZ>
|
|
|