blob: 5e2695430370cd76b28e91182bc592ed6a0cc504 [file] [log] [blame]
// Copyright 2015 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-bluetoothgattremoteserver
// Implement BluetoothGATTRemoteServer interface: https://crbug.com/476735
[
GarbageCollected,
RuntimeEnabled=WebBluetooth,
// TODO(https://crbug.com/584113) Enable Web Bluetooth Experiment.
// OriginTrialEnabled=WebBluetooth,
] interface BluetoothRemoteGATTServer
{
readonly attribute BluetoothDevice device;
readonly attribute boolean connected;
[CallWith=ScriptState] Promise<BluetoothRemoteGATTServer> connect();
[CallWith=ScriptState] void disconnect();
[CallWith=ScriptState, RaisesException] Promise<BluetoothRemoteGATTService> getPrimaryService (BluetoothServiceUUID service);
// Promise<sequence<BluetoothRemoteGATTService>> getPrimaryServices (optional BluetoothServiceUUID service);
};