chromium/third_party/blink/renderer/modules/bluetooth/bluetooth_remote_gatt_service.idl

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattservice

[
    Exposed=Window,
    RuntimeEnabled=WebBluetooth,
    SecureContext
] interface BluetoothRemoteGATTService {
    [SameObject] readonly attribute BluetoothDevice device;
    readonly attribute UUID uuid;
    readonly attribute boolean isPrimary;
    [RaisesException, CallWith=ScriptState, MeasureAs=WebBluetoothRemoteServiceGetCharacteristic] Promise<BluetoothRemoteGATTCharacteristic> getCharacteristic(BluetoothCharacteristicUUID characteristic);
    [RaisesException, CallWith=ScriptState, MeasureAs=WebBluetoothRemoteServiceGetCharacteristics] Promise<sequence<BluetoothRemoteGATTCharacteristic>> getCharacteristics(optional BluetoothCharacteristicUUID characteristic);
};