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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_descriptor_chromeos.h

Issue 309623002: device/bluetooth: Update GATT descriptor value D-Bus bindings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed clang error Created 6 years, 6 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_remote_gatt_descriptor_chromeos.h
diff --git a/device/bluetooth/bluetooth_remote_gatt_descriptor_chromeos.h b/device/bluetooth/bluetooth_remote_gatt_descriptor_chromeos.h
index 129daea9a75738bb7b2c3802a4c93fdc1667a949..d4ea1e68217a6a25d69b636b1cab334d29f573d4 100644
--- a/device/bluetooth/bluetooth_remote_gatt_descriptor_chromeos.h
+++ b/device/bluetooth/bluetooth_remote_gatt_descriptor_chromeos.h
@@ -57,15 +57,16 @@ class BluetoothRemoteGattDescriptorChromeOS
const dbus::ObjectPath& object_path);
virtual ~BluetoothRemoteGattDescriptorChromeOS();
- // Called by dbus:: on completion of the request to get the descriptor value.
- void OnGetValue(const ValueCallback& callback,
- const ErrorCallback& error_callback,
- bool success);
+ // Called by dbus:: on successful completion of a request to read
+ // the descriptor value.
+ void OnValueSuccess(const ValueCallback& callback,
+ const std::vector<uint8>& value);
- // Called by dbus:: on completion of the request to set the descriptor value.
- void OnSetValue(const base::Closure& callback,
- const ErrorCallback& error_callback,
- bool success);
+ // Called by dbus:: on unsuccessful completion of a request to read or write
+ // the descriptor value.
+ void OnError(const ErrorCallback& error_callback,
+ const std::string& error_name,
+ const std::string& error_message);
// Object path of the D-Bus descriptor object.
dbus::ObjectPath object_path_;
@@ -73,6 +74,9 @@ class BluetoothRemoteGattDescriptorChromeOS
// The GATT characteristic this descriptor belongs to.
BluetoothRemoteGattCharacteristicChromeOS* characteristic_;
+ // The cached characteristic value based on the most recent read request.
+ std::vector<uint8> cached_value_;
+
// 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<BluetoothRemoteGattDescriptorChromeOS> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698