Bug 1523562 [wpt PR 14143] - Update interfaces/web-bluetooth.idl, a=testonly

Automatic update from web-platform-tests
Update interfaces/web-bluetooth.idl (#14143)

Source: https://github.com/tidoust/reffy-reports/blob/52b74b6/whatwg/idl/web-bluetooth.idl
Build: https://travis-ci.org/tidoust/reffy-reports/builds/466372583
--

wpt-commits: df29f0e734ac60913d9f52d23097e188b7a651da
wpt-pr: 14143
This commit is contained in:
autofoolip 2019-01-31 18:59:01 +00:00 коммит произвёл James Graham
Родитель 27bd520e1e
Коммит 51cea28f26
1 изменённых файлов: 33 добавлений и 32 удалений

Просмотреть файл

@ -23,7 +23,7 @@ dictionary RequestDeviceOptions {
boolean acceptAllDevices = false;
};
[SecureContext]
[Exposed=Window, SecureContext]
interface Bluetooth : EventTarget {
Promise<boolean> getAvailability();
attribute EventHandler onavailabilitychanged;
@ -31,9 +31,9 @@ interface Bluetooth : EventTarget {
readonly attribute BluetoothDevice? referringDevice;
Promise<BluetoothDevice> requestDevice(optional RequestDeviceOptions options);
};
Bluetooth implements BluetoothDeviceEventHandlers;
Bluetooth implements CharacteristicEventHandlers;
Bluetooth implements ServiceEventHandlers;
Bluetooth includes BluetoothDeviceEventHandlers;
Bluetooth includes CharacteristicEventHandlers;
Bluetooth includes ServiceEventHandlers;
dictionary BluetoothPermissionDescriptor : PermissionDescriptor {
DOMString deviceId;
@ -53,11 +53,13 @@ dictionary BluetoothPermissionData {
required sequence<AllowedBluetoothDevice> allowedDevices;
};
[Exposed=Window]
interface BluetoothPermissionResult : PermissionStatus {
attribute FrozenArray<BluetoothDevice> devices;
};
[
Exposed=Window,
Constructor(DOMString type, optional ValueEventInit initDict),
SecureContext
]
@ -69,8 +71,8 @@ dictionary ValueEventInit : EventInit {
any value = null;
};
[SecureContext]
interface BluetoothDevice {
[Exposed=Window, SecureContext]
interface BluetoothDevice : EventTarget {
readonly attribute DOMString id;
readonly attribute DOMString? name;
readonly attribute BluetoothRemoteGATTServer? gatt;
@ -79,20 +81,20 @@ interface BluetoothDevice {
void unwatchAdvertisements();
readonly attribute boolean watchingAdvertisements;
};
BluetoothDevice implements EventTarget;
BluetoothDevice implements BluetoothDeviceEventHandlers;
BluetoothDevice implements CharacteristicEventHandlers;
BluetoothDevice implements ServiceEventHandlers;
BluetoothDevice includes BluetoothDeviceEventHandlers;
BluetoothDevice includes CharacteristicEventHandlers;
BluetoothDevice includes ServiceEventHandlers;
[SecureContext]
[Exposed=Window, SecureContext]
interface BluetoothManufacturerDataMap {
readonly maplike<unsigned short, DataView>;
};
[SecureContext]
[Exposed=Window, SecureContext]
interface BluetoothServiceDataMap {
readonly maplike<UUID, DataView>;
};
[
Exposed=Window,
Constructor(DOMString type, BluetoothAdvertisingEventInit init),
SecureContext
]
@ -116,11 +118,11 @@ dictionary BluetoothAdvertisingEventInit : EventInit {
unsigned short appearance;
byte txPower;
byte rssi;
Map manufacturerData;
Map serviceData;
BluetoothManufacturerDataMap manufacturerData;
BluetoothServiceDataMap serviceData;
};
[SecureContext]
[Exposed=Window, SecureContext]
interface BluetoothRemoteGATTServer {
[SameObject]
readonly attribute BluetoothDevice device;
@ -132,8 +134,8 @@ interface BluetoothRemoteGATTServer {
getPrimaryServices(optional BluetoothServiceUUID service);
};
[SecureContext]
interface BluetoothRemoteGATTService {
[Exposed=Window, SecureContext]
interface BluetoothRemoteGATTService : EventTarget {
[SameObject]
readonly attribute BluetoothDevice device;
readonly attribute UUID uuid;
@ -147,12 +149,11 @@ interface BluetoothRemoteGATTService {
Promise<sequence<BluetoothRemoteGATTService>>
getIncludedServices(optional BluetoothServiceUUID service);
};
BluetoothRemoteGATTService implements EventTarget;
BluetoothRemoteGATTService implements CharacteristicEventHandlers;
BluetoothRemoteGATTService implements ServiceEventHandlers;
BluetoothRemoteGATTService includes CharacteristicEventHandlers;
BluetoothRemoteGATTService includes ServiceEventHandlers;
[SecureContext]
interface BluetoothRemoteGATTCharacteristic {
[Exposed=Window, SecureContext]
interface BluetoothRemoteGATTCharacteristic : EventTarget {
[SameObject]
readonly attribute BluetoothRemoteGATTService service;
readonly attribute UUID uuid;
@ -166,10 +167,9 @@ interface BluetoothRemoteGATTCharacteristic {
Promise<BluetoothRemoteGATTCharacteristic> startNotifications();
Promise<BluetoothRemoteGATTCharacteristic> stopNotifications();
};
BluetoothRemoteGATTCharacteristic implements EventTarget;
BluetoothRemoteGATTCharacteristic implements CharacteristicEventHandlers;
BluetoothRemoteGATTCharacteristic includes CharacteristicEventHandlers;
[SecureContext]
[Exposed=Window, SecureContext]
interface BluetoothCharacteristicProperties {
readonly attribute boolean broadcast;
readonly attribute boolean read;
@ -182,7 +182,7 @@ interface BluetoothCharacteristicProperties {
readonly attribute boolean writableAuxiliaries;
};
[SecureContext]
[Exposed=Window, SecureContext]
interface BluetoothRemoteGATTDescriptor {
[SameObject]
readonly attribute BluetoothRemoteGATTCharacteristic characteristic;
@ -192,24 +192,25 @@ interface BluetoothRemoteGATTDescriptor {
Promise<void> writeValue(BufferSource value);
};
[NoInterfaceObject, SecureContext]
interface CharacteristicEventHandlers {
[SecureContext]
interface mixin CharacteristicEventHandlers {
attribute EventHandler oncharacteristicvaluechanged;
};
[NoInterfaceObject, SecureContext]
interface BluetoothDeviceEventHandlers {
[SecureContext]
interface mixin BluetoothDeviceEventHandlers {
attribute EventHandler ongattserverdisconnected;
};
[NoInterfaceObject, SecureContext]
interface ServiceEventHandlers {
[SecureContext]
interface mixin ServiceEventHandlers {
attribute EventHandler onserviceadded;
attribute EventHandler onservicechanged;
attribute EventHandler onserviceremoved;
};
typedef DOMString UUID;
[Exposed=Window]
interface BluetoothUUID {
static UUID getService((DOMString or unsigned long) name);
static UUID getCharacteristic((DOMString or unsigned long) name);