blob: 8b6957b431d4f5b1da49f1d04e2eb5ccfd9d734d [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://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattservice
// Implement BluetoothRemoteGATTService interface: https://crbug.com/483342
[
RuntimeEnabled=WebBluetooth,
SecureContext
] interface BluetoothRemoteGATTService { // : ServiceEventHandlers {
[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);
// Promise<BluetoothRemoteGATTService> getIncludedService(BluetoothServiceUUID service);
// Promise<sequence<BluetoothRemoteGATTService>> getIncludedServices(optional BluetoothServiceUUID service);
};