summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h
diff options
context:
space:
mode:
authorarmansito@chromium.org <armansito@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-08 02:09:56 +0000
committerarmansito@chromium.org <armansito@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-08 02:09:56 +0000
commit0f647935a95f078fa796035eb7c737b56d001759 (patch)
tree47fea216485f869035b51fa336eb413e480f6427 /chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h
parentc9427af61756f046a118d37b7c801c987bf7687c (diff)
downloadchromium_src-0f647935a95f078fa796035eb7c737b56d001759.zip
chromium_src-0f647935a95f078fa796035eb7c737b56d001759.tar.gz
chromium_src-0f647935a95f078fa796035eb7c737b56d001759.tar.bz2
device/bluetooth: Update GATT descriptor value D-Bus bindings.
This CL updates the Chrome D-Bus bindings and modifies the device/bluetooth GATT Chrome OS code to use the new bindings defined in crbug.com/378182 for descriptor value reads and writes. BUG=378182 TEST=device_unittests; manual tests using custom bluetoothd Review URL: https://codereview.chromium.org/309623002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275718 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h')
-rw-r--r--chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h b/chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h
index 3676983..ce3f2d4 100644
--- a/chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h
+++ b/chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h
@@ -46,6 +46,13 @@ class CHROMEOS_EXPORT FakeBluetoothGattDescriptorClient
virtual std::vector<dbus::ObjectPath> GetDescriptors() OVERRIDE;
virtual Properties* GetProperties(const dbus::ObjectPath& object_path)
OVERRIDE;
+ virtual void ReadValue(const dbus::ObjectPath& object_path,
+ const ValueCallback& callback,
+ const ErrorCallback& error_callback) OVERRIDE;
+ virtual void WriteValue(const dbus::ObjectPath& object_path,
+ const std::vector<uint8>& value,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) OVERRIDE;
// Makes the descriptor with the UUID |uuid| visible under the characteristic
// with object path |characteristic_path|. Descriptor object paths are
@@ -71,7 +78,14 @@ class CHROMEOS_EXPORT FakeBluetoothGattDescriptorClient
void NotifyDescriptorRemoved(const dbus::ObjectPath& object_path);
// Mapping from object paths to Properties structures.
- typedef std::map<dbus::ObjectPath, Properties*> PropertiesMap;
+ struct DescriptorData {
+ DescriptorData();
+ ~DescriptorData();
+
+ scoped_ptr<Properties> properties;
+ std::vector<uint8> value;
+ };
+ typedef std::map<dbus::ObjectPath, DescriptorData*> PropertiesMap;
PropertiesMap properties_;
// List of observers interested in event notifications from us.