Update WebBluetooth webidl files

This commit is contained in:
Zakor Gyula 2017-02-01 14:12:13 +01:00 committed by Attila Dusnoki
parent da89099e26
commit 706cffbca8
10 changed files with 48 additions and 45 deletions

View file

@ -30,19 +30,15 @@ dictionary RequestDeviceOptions {
[Pref="dom.bluetooth.enabled"] [Pref="dom.bluetooth.enabled"]
interface Bluetooth : EventTarget { interface Bluetooth : EventTarget {
// [SecureContext] // [SecureContext]
// readonly attribute BluetoothDevice? referringDevice;
attribute EventHandler onavailabilitychanged;
// [SecureContext]
// Promise<boolean> getAvailability(); // Promise<boolean> getAvailability();
// [SecureContext] [SecureContext]
// attribute EventHandler onavailabilitychanged; attribute EventHandler onavailabilitychanged;
// [SecureContext] // [SecureContext, SameObject]
// readonly attribute BluetoothDevice? referringDevice; // readonly attribute BluetoothDevice? referringDevice;
[SecureContext] [SecureContext]
Promise<BluetoothDevice> requestDevice(optional RequestDeviceOptions options); Promise<BluetoothDevice> requestDevice(optional RequestDeviceOptions options);
}; };
// Bluetooth implements EventTarget;
// Bluetooth implements BluetoothDeviceEventHandlers; // Bluetooth implements BluetoothDeviceEventHandlers;
// Bluetooth implements CharacteristicEventHandlers; // Bluetooth implements CharacteristicEventHandlers;
// Bluetooth implements ServiceEventHandlers; // Bluetooth implements ServiceEventHandlers;

View file

@ -12,13 +12,16 @@ interface BluetoothServiceDataMap {
};*/ };*/
[Pref="dom.bluetooth.enabled", Constructor(DOMString type, BluetoothAdvertisingEventInit init)] [Pref="dom.bluetooth.enabled", Constructor(DOMString type, BluetoothAdvertisingEventInit init)]
interface BluetoothAdvertisingEvent : Event { interface BluetoothAdvertisingEvent : Event {
[SameObject]
readonly attribute BluetoothDevice device; readonly attribute BluetoothDevice device;
// readonly attribute FrozenArray<UUID> uuids; // readonly attribute FrozenArray<UUID> uuids;
readonly attribute DOMString? name; readonly attribute DOMString? name;
readonly attribute unsigned short? appearance; readonly attribute unsigned short? appearance;
readonly attribute byte? txPower; readonly attribute byte? txPower;
readonly attribute byte? rssi; readonly attribute byte? rssi;
// [SameObject]
// readonly attribute BluetoothManufacturerDataMap manufacturerData; // readonly attribute BluetoothManufacturerDataMap manufacturerData;
// [SameObject]
// readonly attribute BluetoothServiceDataMap serviceData; // readonly attribute BluetoothServiceDataMap serviceData;
}; };
dictionary BluetoothAdvertisingEventInit : EventInit { dictionary BluetoothAdvertisingEventInit : EventInit {

View file

@ -6,6 +6,7 @@
[Pref="dom.bluetooth.enabled"] [Pref="dom.bluetooth.enabled"]
interface BluetoothRemoteGATTCharacteristic : EventTarget { interface BluetoothRemoteGATTCharacteristic : EventTarget {
[SameObject]
readonly attribute BluetoothRemoteGATTService service; readonly attribute BluetoothRemoteGATTService service;
readonly attribute DOMString uuid; readonly attribute DOMString uuid;
readonly attribute BluetoothCharacteristicProperties properties; readonly attribute BluetoothCharacteristicProperties properties;

View file

@ -6,6 +6,7 @@
[Pref="dom.bluetooth.enabled"] [Pref="dom.bluetooth.enabled"]
interface BluetoothRemoteGATTDescriptor { interface BluetoothRemoteGATTDescriptor {
[SameObject]
readonly attribute BluetoothRemoteGATTCharacteristic characteristic; readonly attribute BluetoothRemoteGATTCharacteristic characteristic;
readonly attribute DOMString uuid; readonly attribute DOMString uuid;
readonly attribute ByteString? value; readonly attribute ByteString? value;

View file

@ -6,6 +6,7 @@
[Pref="dom.bluetooth.enabled"] [Pref="dom.bluetooth.enabled"]
interface BluetoothRemoteGATTServer { interface BluetoothRemoteGATTServer {
[SameObject]
readonly attribute BluetoothDevice device; readonly attribute BluetoothDevice device;
readonly attribute boolean connected; readonly attribute boolean connected;
Promise<BluetoothRemoteGATTServer> connect(); Promise<BluetoothRemoteGATTServer> connect();

View file

@ -6,6 +6,7 @@
[Pref="dom.bluetooth.enabled"] [Pref="dom.bluetooth.enabled"]
interface BluetoothRemoteGATTService : EventTarget { interface BluetoothRemoteGATTService : EventTarget {
[SameObject]
readonly attribute BluetoothDevice device; readonly attribute BluetoothDevice device;
readonly attribute DOMString uuid; readonly attribute DOMString uuid;
readonly attribute boolean isPrimary; readonly attribute boolean isPrimary;

View file

@ -28,7 +28,7 @@ interface NavigatorID {
// https://webbluetoothcg.github.io/web-bluetooth/#navigator-extensions // https://webbluetoothcg.github.io/web-bluetooth/#navigator-extensions
partial interface Navigator { partial interface Navigator {
readonly attribute Bluetooth bluetooth; [SameObject, Pref="dom.bluetooth.enabled"] readonly attribute Bluetooth bluetooth;
}; };
// https://w3c.github.io/ServiceWorker/#navigator-service-worker // https://w3c.github.io/ServiceWorker/#navigator-service-worker