OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // https://webbluetoothcg.github.io/web-bluetooth/#idl-def-BluetoothDevice | 5 // https://webbluetoothcg.github.io/web-bluetooth/#idl-def-BluetoothDevice |
6 | 6 |
7 // Implement BluetoothDevice interface: http://crbug.com/421668 | 7 // Implement BluetoothDevice interface: http://crbug.com/421668 |
8 // enum VendorIdSource { | 8 // enum VendorIDSource { |
9 // "bluetooth", | 9 // "bluetooth", |
10 // "usb" | 10 // "usb" |
11 // }; | 11 // }; |
12 | 12 |
13 [ | 13 [ |
14 GarbageCollected, | 14 GarbageCollected, |
15 NoInterfaceObject, | 15 NoInterfaceObject, |
16 RuntimeEnabled=Bluetooth, | 16 RuntimeEnabled=Bluetooth, |
17 ] interface BluetoothDevice | 17 ] interface BluetoothDevice |
18 // Implement ServiceEventHandlers interface: http://crbug.com/421670 | 18 // Implement ServiceEventHandlers interface: http://crbug.com/421670 |
19 // : ServiceEventHandlers | 19 // : ServiceEventHandlers |
20 { | 20 { |
21 // Implement BluetoothDevice interface: http://crbug.com/421668 | 21 // Implement BluetoothDevice interface: http://crbug.com/421668 |
22 readonly attribute DOMString instanceId; | 22 readonly attribute DOMString instanceID; |
23 // readonly attribute DOMString? name; | 23 // readonly attribute DOMString? name; |
24 // readonly attribute long? deviceClass; | 24 // readonly attribute long? deviceClass; |
25 // readonly attribute VendorIdSource? vendorIdSource; | 25 // readonly attribute VendorIDSource? vendorIDSource; |
26 // readonly attribute long? vendorId; | 26 // readonly attribute long? vendorID; |
27 // readonly attribute long? productId; | 27 // readonly attribute long? productID; |
28 // readonly attribute long? productVersion; | 28 // readonly attribute long? productVersion; |
29 // readonly attribute boolean? paired; | 29 // readonly attribute boolean? paired; |
30 // readonly attribute boolean? connected; | 30 // readonly attribute boolean? connected; |
31 // readonly attribute sequence<UUID>? uuids; | 31 // readonly attribute sequence<UUID>? uuids; |
32 // Promise<void> connect (); | 32 // Promise<void> connect (); |
33 // Promise<void> disconnect (); | 33 // Promise<void> disconnect (); |
34 // Promise<BluetoothGATTService> getService (BluetoothServiceUuid ser
vice); | 34 // Promise<BluetoothGATTService> getService (BluetoothServiceUuid ser
vice); |
35 // Promise<BluetoothGATTServiceSequence> getAllServices (); | 35 // Promise<BluetoothGATTServiceSequence> getAllServices (); |
36 // Promise<BluetoothGATTServiceSequence> getAllServices (BluetoothServiceUuid
service); | 36 // Promise<BluetoothGATTServiceSequence> getAllServices (BluetoothServiceUuid
service); |
37 // Promise<BluetoothGATTServiceSequence> getAllServices (sequence<BluetoothSe
rviceUuid> services); | 37 // Promise<BluetoothGATTServiceSequence> getAllServices (sequence<BluetoothSe
rviceUuid> services); |
38 }; | 38 }; |
OLD | NEW |