blob: edab043c9e7baa8b86db5238d3783e8fc98ee6bd [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
] 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);
};