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

Unified Diff: third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom

Issue 1861013005: bluetooth: Move GetCharacteristic(s) over to Mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-separate-tests-read-value
Patch Set: Address palmer's comments Created 4 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
« no previous file with comments | « third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom
diff --git a/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom b/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom
index bdd829d20c149f7dd8ee6fdac0c444e22373004f..4def9bb32c146205a0f06b2fe3cd1049f3bb564b 100644
--- a/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom
+++ b/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom
@@ -68,6 +68,19 @@ enum WebBluetoothError {
ENUM_MAX_VALUE = REQUEST_DEVICE_WITHOUT_FRAME,
};
+// Indicates if the function will return a single or multiple
+// GATT objects.
+enum WebBluetoothGATTQueryQuantity {
+ SINGLE,
+ MULTIPLE
+};
+
+struct WebBluetoothRemoteGATTCharacteristic {
+ string instance_id;
+ string uuid;
+ uint32 properties;
+};
+
// TODO(ortuno): Define Bluetooth Service.
// https://crbug.com/508771
@@ -79,6 +92,16 @@ interface WebBluetoothService {
// a device disconnects.
SetClient(associated WebBluetoothServiceClient client);
+ // Returns the Characteristics of a GATT Service with |service_instance_id|.
+ // If |quantity| == WebBluetoothGATTQueryQuantity::SINGLE, only one
+ // characteristic will be returned.
+ RemoteServiceGetCharacteristics(
+ string service_instance_id,
+ WebBluetoothGATTQueryQuantity quantity,
+ string? characteristics_uuid) => (
+ WebBluetoothError error,
+ array<WebBluetoothRemoteGATTCharacteristic>? characteristics);
+
// Reads the value for characteristic with
// |characteristic_instance_id|. If the value is successfully read the
// callback will be run with WebBluetoothError::SUCCESS and the
« no previous file with comments | « third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698