Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Bjerring committed Jun 6, 2018
1 parent 5684f56 commit 1c78b62
Showing 1 changed file with 16 additions and 36 deletions.
52 changes: 16 additions & 36 deletions interfaces/webusb.idl
@@ -1,7 +1,5 @@
// GENERATED CONTENT - DO NOT EDIT
// Content of this file was automatically extracted from the
// "WebUSB API" spec.
// See: https://wicg.github.io/webusb/
// Copied from https://wicg.github.io/webusb/#idl-index minus the
// definitions related to Permissions API integration which is unstable.

dictionary USBDeviceFilter {
unsigned short vendorId;
Expand All @@ -16,7 +14,7 @@ dictionary USBDeviceRequestOptions {
required sequence<USBDeviceFilter> filters;
};

[Exposed=(DedicatedWorker,SharedWorker,Window), SecureContext]
[Exposed=(DedicatedWorker, SharedWorker, Window), SecureContext]
interface USB : EventTarget {
attribute EventHandler onconnect;
attribute EventHandler ondisconnect;
Expand All @@ -29,7 +27,7 @@ partial interface Navigator {
[SameObject] readonly attribute USB usb;
};

[Exposed=(DedicatedWorker,SharedWorker), SecureContext]
[Exposed=(DedicatedWorker, SharedWorker), SecureContext]
partial interface WorkerNavigator {
[SameObject] readonly attribute USB usb;
};
Expand All @@ -40,13 +38,13 @@ dictionary USBConnectionEventInit : EventInit {

[
Constructor(DOMString type, USBConnectionEventInit eventInitDict),
Exposed=(DedicatedWorker,SharedWorker,Window)
Exposed=(DedicatedWorker, SharedWorker, Window)
]
interface USBConnectionEvent : Event {
[SameObject] readonly attribute USBDevice device;
};

[Exposed=(DedicatedWorker,SharedWorker,Window)]
[Exposed=(DedicatedWorker, SharedWorker, Window)]
interface USBDevice {
readonly attribute octet usbVersionMajor;
readonly attribute octet usbVersionMinor;
Expand Down Expand Up @@ -110,7 +108,7 @@ dictionary USBControlTransferParameters {

[
Constructor(USBTransferStatus status, optional DataView? data),
Exposed=(DedicatedWorker,SharedWorker,Window)
Exposed=(DedicatedWorker, SharedWorker, Window)
]
interface USBInTransferResult {
readonly attribute DataView? data;
Expand All @@ -119,7 +117,7 @@ interface USBInTransferResult {

[
Constructor(USBTransferStatus status, optional unsigned long bytesWritten = 0),
Exposed=(DedicatedWorker,SharedWorker,Window)
Exposed=(DedicatedWorker, SharedWorker, Window)
]
interface USBOutTransferResult {
readonly attribute unsigned long bytesWritten;
Expand All @@ -128,7 +126,7 @@ interface USBOutTransferResult {

[
Constructor(USBTransferStatus status, optional DataView? data),
Exposed=(DedicatedWorker,SharedWorker,Window)
Exposed=(DedicatedWorker, SharedWorker, Window)
]
interface USBIsochronousInTransferPacket {
readonly attribute DataView? data;
Expand All @@ -137,7 +135,7 @@ interface USBIsochronousInTransferPacket {

[
Constructor(sequence<USBIsochronousInTransferPacket> packets, optional DataView? data),
Exposed=(DedicatedWorker,SharedWorker,Window)
Exposed=(DedicatedWorker, SharedWorker, Window)
]
interface USBIsochronousInTransferResult {
readonly attribute DataView? data;
Expand All @@ -146,7 +144,7 @@ interface USBIsochronousInTransferResult {

[
Constructor(USBTransferStatus status, optional unsigned long bytesWritten = 0),
Exposed=(DedicatedWorker,SharedWorker,Window)
Exposed=(DedicatedWorker, SharedWorker, Window)
]
interface USBIsochronousOutTransferPacket {
readonly attribute unsigned long bytesWritten;
Expand All @@ -155,15 +153,15 @@ interface USBIsochronousOutTransferPacket {

[
Constructor(sequence<USBIsochronousOutTransferPacket> packets),
Exposed=(DedicatedWorker,SharedWorker,Window)
Exposed=(DedicatedWorker, SharedWorker, Window)
]
interface USBIsochronousOutTransferResult {
readonly attribute FrozenArray<USBIsochronousOutTransferPacket> packets;
};

[
Constructor(USBDevice device, octet configurationValue),
Exposed=(DedicatedWorker,SharedWorker,Window)
Exposed=(DedicatedWorker, SharedWorker, Window)
]
interface USBConfiguration {
readonly attribute octet configurationValue;
Expand All @@ -173,7 +171,7 @@ interface USBConfiguration {

[
Constructor(USBConfiguration configuration, octet interfaceNumber),
Exposed=(DedicatedWorker,SharedWorker,Window)
Exposed=(DedicatedWorker, SharedWorker, Window)
]
interface USBInterface {
readonly attribute octet interfaceNumber;
Expand All @@ -184,7 +182,7 @@ interface USBInterface {

[
Constructor(USBInterface deviceInterface, octet alternateSetting),
Exposed=(DedicatedWorker,SharedWorker,Window)
Exposed=(DedicatedWorker, SharedWorker, Window)
]
interface USBAlternateInterface {
readonly attribute octet alternateSetting;
Expand All @@ -208,29 +206,11 @@ enum USBEndpointType {

[
Constructor(USBAlternateInterface alternate, octet endpointNumber, USBDirection direction),
Exposed=(DedicatedWorker,SharedWorker,Window)
Exposed=(DedicatedWorker, SharedWorker, Window)
]
interface USBEndpoint {
readonly attribute octet endpointNumber;
readonly attribute USBDirection direction;
readonly attribute USBEndpointType type;
readonly attribute unsigned long packetSize;
};

dictionary USBPermissionDescriptor : PermissionDescriptor {
sequence<USBDeviceFilter> filters;
};

dictionary AllowedUSBDevice {
required octet vendorId;
required octet productId;
DOMString serialNumber;
};

dictionary USBPermissionStorage {
sequence<AllowedUSBDevice> allowedDevices = [];
};

interface USBPermissionResult : PermissionStatus {
attribute FrozenArray<USBDevice> devices;
};

0 comments on commit 1c78b62

Please sign in to comment.