OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module blink.mojom; | 5 module blink.mojom; |
6 | 6 |
7 import "device/bluetooth/public/interfaces/bluetooth_uuid.mojom"; | 7 import "device/bluetooth/public/interfaces/bluetooth_uuid.mojom"; |
8 | 8 |
9 // Errors that can occur during Web Bluetooth execution, which are transformed | 9 // Errors that can occur during Web Bluetooth execution, which are transformed |
10 // to a DOMException in Source/modules/bluetooth/BluetoothError.cpp. | 10 // to a DOMException in Source/modules/bluetooth/BluetoothError.cpp. |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 // Indicates if the function will return a single or multiple | 86 // Indicates if the function will return a single or multiple |
87 // GATT objects. | 87 // GATT objects. |
88 enum WebBluetoothGATTQueryQuantity { | 88 enum WebBluetoothGATTQueryQuantity { |
89 SINGLE, | 89 SINGLE, |
90 MULTIPLE | 90 MULTIPLE |
91 }; | 91 }; |
92 | 92 |
93 struct WebBluetoothDevice { | 93 struct WebBluetoothDevice { |
94 string id; | 94 string id; |
95 string name; | 95 string? name; |
96 array<string> uuids; | 96 array<string> uuids; |
97 }; | 97 }; |
98 | 98 |
99 struct WebBluetoothRemoteGATTService { | 99 struct WebBluetoothRemoteGATTService { |
100 string instance_id; | 100 string instance_id; |
101 string uuid; | 101 string uuid; |
102 }; | 102 }; |
103 | 103 |
104 struct WebBluetoothRemoteGATTCharacteristic { | 104 struct WebBluetoothRemoteGATTCharacteristic { |
105 string instance_id; | 105 string instance_id; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 }; | 179 }; |
180 | 180 |
181 // Classes should implement this interface and pass an associated pointer | 181 // Classes should implement this interface and pass an associated pointer |
182 // bound to them to the WebBluetoothService by using SetClient. Classes | 182 // bound to them to the WebBluetoothService by using SetClient. Classes |
183 // that do this will be notified of device events e.g. device disconnection. | 183 // that do this will be notified of device events e.g. device disconnection. |
184 interface WebBluetoothServiceClient { | 184 interface WebBluetoothServiceClient { |
185 RemoteCharacteristicValueChanged(string characteristic_instance_id, | 185 RemoteCharacteristicValueChanged(string characteristic_instance_id, |
186 array<uint8> value); | 186 array<uint8> value); |
187 GattServerDisconnected(string device_id); | 187 GattServerDisconnected(string device_id); |
188 }; | 188 }; |
OLD | NEW |