summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/Source/modules/bluetooth/BluetoothGATTRemoteServer.idl
blob: 3c609df16d6f90fe1256dc8ce068e8a5431d4d01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// 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,
    OriginTrialEnabled=WebBluetooth,
] interface BluetoothGATTRemoteServer
{
    readonly attribute BluetoothDevice                   device;
    readonly attribute boolean                           connected;
    [CallWith=ScriptState] Promise<BluetoothGATTRemoteServer>             connect();
    [CallWith=ScriptState] void                                           disconnect();
    [CallWith=ScriptState, RaisesException] Promise<BluetoothGATTService> getPrimaryService (BluetoothServiceUUID service);
  // Promise<sequence<BluetoothGATTService>> getPrimaryServices (optional BluetoothServiceUUID service);
};