<!-- Please describe your changes on the following line: --> Update the WebBluetooth related webidl files with the `[SameObject]` extended attribute, and unify the indentation in these files. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [x] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: b3ae74b5c9ae7b05af10ffbd5080d34bfc5ecb49
30 lines
1.3 KiB
Plaintext
30 lines
1.3 KiB
Plaintext
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattservice
|
|
|
|
[Pref="dom.bluetooth.enabled"]
|
|
interface BluetoothRemoteGATTService : EventTarget {
|
|
[SameObject]
|
|
readonly attribute BluetoothDevice device;
|
|
readonly attribute DOMString uuid;
|
|
readonly attribute boolean isPrimary;
|
|
Promise<BluetoothRemoteGATTCharacteristic> getCharacteristic(BluetoothCharacteristicUUID characteristic);
|
|
Promise<sequence<BluetoothRemoteGATTCharacteristic>>
|
|
getCharacteristics(optional BluetoothCharacteristicUUID characteristic);
|
|
Promise<BluetoothRemoteGATTService> getIncludedService(BluetoothServiceUUID service);
|
|
Promise<sequence<BluetoothRemoteGATTService>> getIncludedServices(optional BluetoothServiceUUID service);
|
|
};
|
|
|
|
[NoInterfaceObject]
|
|
interface ServiceEventHandlers {
|
|
attribute EventHandler onserviceadded;
|
|
attribute EventHandler onservicechanged;
|
|
attribute EventHandler onserviceremoved;
|
|
};
|
|
|
|
// BluetoothRemoteGATTService implements EventTarget;
|
|
// BluetoothRemoteGATTService implements CharacteristicEventHandlers;
|
|
BluetoothRemoteGATTService implements ServiceEventHandlers;
|