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

Unified Diff: device/bluetooth/device.h

Issue 2649473002: bluetooth: Add control for reading/writing of descriptor values to internals page. (Closed)
Patch Set: Merge upstream Created 3 years, 11 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
« no previous file with comments | « chrome/browser/resources/bluetooth_internals/value_control.js ('k') | device/bluetooth/device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/device.h
diff --git a/device/bluetooth/device.h b/device/bluetooth/device.h
index 953b80bfb38a4075c9d75a11d3924fa5d1024bcc..223f19d7f7aab6899dfecd05978886f0006d876f 100644
--- a/device/bluetooth/device.h
+++ b/device/bluetooth/device.h
@@ -67,6 +67,17 @@ class Device : public mojom::Device, public device::BluetoothAdapter::Observer {
void GetDescriptors(const std::string& service_id,
const std::string& characteristic_id,
const GetDescriptorsCallback& callback) override;
+ void ReadValueForDescriptor(
+ const std::string& service_id,
+ const std::string& characteristic_id,
+ const std::string& descriptor_id,
+ const ReadValueForDescriptorCallback& callback) override;
+ void WriteValueForDescriptor(
+ const std::string& service_id,
+ const std::string& characteristic_id,
+ const std::string& descriptor_id,
+ const std::vector<uint8_t>& value,
+ const WriteValueForDescriptorCallback& callback) override;
private:
Device(scoped_refptr<device::BluetoothAdapter> adapter,
@@ -92,6 +103,19 @@ class Device : public mojom::Device, public device::BluetoothAdapter::Observer {
const WriteValueForCharacteristicCallback& callback,
device::BluetoothGattService::GattErrorCode error_code);
+ void OnReadRemoteDescriptor(const ReadValueForDescriptorCallback& callback,
+ const std::vector<uint8_t>& value);
+
+ void OnReadRemoteDescriptorError(
+ const ReadValueForDescriptorCallback& callback,
+ device::BluetoothGattService::GattErrorCode error_code);
+
+ void OnWriteRemoteDescriptor(const WriteValueForDescriptorCallback& callback);
+
+ void OnWriteRemoteDescriptorError(
+ const WriteValueForDescriptorCallback& callback,
+ device::BluetoothGattService::GattErrorCode error_code);
+
const std::string& GetAddress();
// The current BluetoothAdapter.
« no previous file with comments | « chrome/browser/resources/bluetooth_internals/value_control.js ('k') | device/bluetooth/device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698