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/uuid.mojom"; | 7 import "device/bluetooth/public/interfaces/uuid.mojom"; |
8 | 8 |
9 // Result codes that can occur during Web Bluetooth execution, which are | 9 // Result codes that can occur during Web Bluetooth execution, which are |
10 // transformed to a DOMException in Source/modules/bluetooth/BluetoothError.cpp. | 10 // transformed to a DOMException in Source/modules/bluetooth/BluetoothError.cpp. |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 MULTIPLE | 88 MULTIPLE |
89 }; | 89 }; |
90 | 90 |
91 struct WebBluetoothDeviceId { | 91 struct WebBluetoothDeviceId { |
92 string device_id; | 92 string device_id; |
93 }; | 93 }; |
94 | 94 |
95 struct WebBluetoothDevice { | 95 struct WebBluetoothDevice { |
96 WebBluetoothDeviceId id; | 96 WebBluetoothDeviceId id; |
97 string? name; | 97 string? name; |
98 array<string> uuids; | |
99 }; | 98 }; |
100 | 99 |
101 struct WebBluetoothRemoteGATTService { | 100 struct WebBluetoothRemoteGATTService { |
102 string instance_id; | 101 string instance_id; |
103 string uuid; | 102 string uuid; |
104 }; | 103 }; |
105 | 104 |
106 struct WebBluetoothRemoteGATTCharacteristic { | 105 struct WebBluetoothRemoteGATTCharacteristic { |
107 string instance_id; | 106 string instance_id; |
108 string uuid; | 107 string uuid; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 }; | 180 }; |
182 | 181 |
183 // Classes should implement this interface and pass an associated pointer | 182 // Classes should implement this interface and pass an associated pointer |
184 // bound to them to the WebBluetoothService by using SetClient. Classes | 183 // bound to them to the WebBluetoothService by using SetClient. Classes |
185 // that do this will be notified of device events e.g. device disconnection. | 184 // that do this will be notified of device events e.g. device disconnection. |
186 interface WebBluetoothServiceClient { | 185 interface WebBluetoothServiceClient { |
187 RemoteCharacteristicValueChanged(string characteristic_instance_id, | 186 RemoteCharacteristicValueChanged(string characteristic_instance_id, |
188 array<uint8> value); | 187 array<uint8> value); |
189 GattServerDisconnected(WebBluetoothDeviceId device_id); | 188 GattServerDisconnected(WebBluetoothDeviceId device_id); |
190 }; | 189 }; |
OLD | NEW |