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

// Implement BluetoothRemoteGATTService interface: https://crbug.com/483342

[
    RuntimeEnabled=WebBluetooth,
] interface BluetoothRemoteGATTService { // : ServiceEventHandlers {
    readonly attribute UUID            uuid;
    readonly attribute boolean         isPrimary;
    readonly attribute BluetoothDevice device;
    [RaisesException, CallWith=ScriptState] Promise<BluetoothRemoteGATTCharacteristic>           getCharacteristic(BluetoothCharacteristicUUID characteristic);
    [RaisesException, CallWith=ScriptState] Promise<sequence<BluetoothRemoteGATTCharacteristic>> getCharacteristics(optional BluetoothCharacteristicUUID characteristic);
    // Promise<BluetoothRemoteGATTService>                  getIncludedService(BluetoothServiceUUID service);
    // Promise<sequence<BluetoothRemoteGATTService>>        getIncludedServices(optional BluetoothServiceUUID service);
};
