| // Copyright 2014 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // https://webbluetoothchrome.github.io/web-bluetooth/#idl-def-bluetoothdevice |
| |
| // Implement BluetoothDevice interface: http://crbug.com/421668 |
| |
| enum VendorIDSource { |
| "bluetooth", |
| "usb" |
| }; |
| |
| [ |
| GarbageCollected, |
| RuntimeEnabled=WebBluetooth, |
| ] interface BluetoothDevice |
| // Implement ServiceEventHandlers interface: http://crbug.com/421670 |
| // : ServiceEventHandlers |
| { |
| // Implement BluetoothDevice interface: http://crbug.com/421668 |
| readonly attribute DOMString instanceID; |
| readonly attribute DOMString? name; |
| // readonly attribute BluetoothAdvertisingData adData; |
| readonly attribute unsigned long? deviceClass; |
| readonly attribute VendorIDSource? vendorIDSource; |
| readonly attribute unsigned long? vendorID; |
| readonly attribute unsigned long? productID; |
| readonly attribute unsigned long? productVersion; |
| readonly attribute boolean paired; |
| // readonly attribute BluetoothGATTRemoteServer? gattServer; |
| readonly attribute UUID[] uuids; |
| [CallWith=ScriptState] Promise<BluetoothGATTRemoteServer> connectGATT (); |
| }; |