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

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: Merge fix 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..6ba9d73cf3206ebe226c8bbddf58124a4190a796 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,18 @@ enum WebBluetoothError {
ENUM_MAX_VALUE = REQUEST_DEVICE_WITHOUT_FRAME,
};
+// Enum to be used when querying for GATT Objects.
+enum WebBluetoothQueryType {
Jeffrey Yasskin 2016/04/25 17:26:11 Maybe s/Type/Quantity/, but it's not a big deal.
ortuno 2016/04/25 20:37:41 Done.
+ SINGLE,
+ MULTIPLE
+};
+
+struct WebBluetoothRemoteGATTCharacteristic {
+ string instance_id;
+ string? uuid;
+ uint32 properties;
+};
+
// TODO(ortuno): Define Bluetooth Service.
// https://crbug.com/508771
@@ -79,6 +91,16 @@ interface WebBluetoothService {
// a device disconnects.
SetClient(associated WebBluetoothServiceClient client);
+ // Returns the Characteristics of a GATT Service with |service_instance_id|.
+ // If |single_characteristic| is true, only one characteristic will be
+ // returned.
+ RemoteServiceGetCharacteristics(
+ string service_instance_id,
+ WebBluetoothQueryType type,
+ 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