blob: 85ce9076b0c005c8fdececa22f21a3f54ddc2a38 [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://webbluetoothchrome.github.io/web-bluetooth/#idl-def-bluetoothgattservice
// Implement BluetoothRemoteGATTService interface: https://crbug.com/483342
[
GarbageCollected,
RuntimeEnabled=WebBluetooth,
// TODO(https://crbug.com/584113) Enable Web Bluetooth Experiment.
// OriginTrialEnabled=WebBluetooth,
] interface BluetoothRemoteGATTService { // : ServiceEventHandlers {
readonly attribute UUID uuid;
readonly attribute boolean isPrimary;
// TODO(ortuno): Once device is implemented test that it matches
// the original device.
// 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);
};