// 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

[
    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);
    [CallWith=ScriptState, RaisesException] Promise<sequence<BluetoothRemoteGATTService>> getPrimaryServices (optional BluetoothServiceUUID service);
};
