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_; |