blob: 13ac4792572252409329f42646fe3b8f692624d8 [file] [log] [blame]
// 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,
DependentLifetime,
RuntimeEnabled=WebBluetooth,
// TODO(https://crbug.com/584113) Enable Web Bluetooth Experiment.
// OriginTrialEnabled=WebBluetooth,
] interface BluetoothDevice : EventTarget
// Implement ServiceEventHandlers interface: http://crbug.com/421670
// : ServiceEventHandlers
{
// Implement BluetoothDevice interface: http://crbug.com/421668
[DeprecateAs=BluetoothDeviceInstanceId, ImplementedAs=id] readonly attribute DOMString instanceID;
readonly attribute DOMString id;
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 BluetoothRemoteGATTServer gatt;
readonly attribute UUID[] uuids;
[CallWith=ScriptState, DeprecateAs=BluetoothDeviceConnectGATT] Promise<BluetoothRemoteGATTServer> connectGATT ();
attribute EventHandler ongattserverdisconnected;
};