Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2460)

Unified Diff: device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h

Issue 2728623004: Fix getting notified twice after subscribe to notifications and call readValue (Closed)
Patch Set: updated test code Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 253c00ef6708dba25162713f075a92d636da37da..01b61f2200a9f6d1df0f61320e4a2e2045f86b2b 100644
--- a/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h
@@ -107,11 +107,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_;
@@ -130,6 +136,9 @@ class BluetoothRemoteGattCharacteristicBlueZ
// The GATT service this GATT characteristic belongs to.
BluetoothRemoteGattServiceBlueZ* service_;
+ // Number of gatt read requests in progress.
+ int num_of_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>

Powered by Google App Engine
This is Rietveld 408576698