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

Unified Diff: device/bluetooth/bluetooth_device.h

Issue 2826383002: bluetooth: Make in progress errors consistent across android
Patch Set: Fix windows Created 3 years, 8 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/bluetooth_device.h
diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h
index ec127b80a971c423437a9c354973a5cad688c81b..4fca8dcd98bb8897a62d53d114c8dc53bc6a2b28 100644
--- a/device/bluetooth/bluetooth_device.h
+++ b/device/bluetooth/bluetooth_device.h
@@ -540,6 +540,16 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDevice {
// Return associated BluetoothAdapter.
BluetoothAdapter* GetAdapter() { return adapter_; }
+ // Returns true if there is a pending read or write GATT operation for any
+ // characteristic or descriptor in the device. It's checked before
+ // performing any GATT operations.
+ bool HasPendingGattOperation() const;
+ // Sets whether or not there is a pending GATT operation for any
+ // characteristic or descriptor in the device. It is set to true when a new
+ // GATT operation is about to be performed and to false once the operation has
+ // finished.
+ void SetPendingGattOperation(bool pending);
+
std::vector<BluetoothRemoteGattService*> GetPrimaryServices();
std::vector<BluetoothRemoteGattService*> GetPrimaryServicesByUUID(
@@ -659,6 +669,9 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDevice {
// Map of Manufacturer IDs to their advertised Manufacturer Data.
ManufacturerDataMap manufacturer_data_;
+ // Indicates if there are any pending GATT operations.
+ bool pending_gatt_operation_;
+
// Timestamp for when an advertisement was last seen.
base::Time last_update_time_;
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_device.cc » ('j') | device/bluetooth/bluetooth_remote_gatt_characteristic.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698