| Index: device/devices_app/usb/public/interfaces/device.mojom
|
| diff --git a/device/devices_app/usb/public/interfaces/device.mojom b/device/devices_app/usb/public/interfaces/device.mojom
|
| index 9c24c078a58b3540bbcbbb534c9e62ad5e1beaf3..a5e2905ed32948adef105abde36bb0c263c03259 100644
|
| --- a/device/devices_app/usb/public/interfaces/device.mojom
|
| +++ b/device/devices_app/usb/public/interfaces/device.mojom
|
| @@ -4,6 +4,14 @@
|
|
|
| module device.usb;
|
|
|
| +enum OpenDeviceError {
|
| + // Opening the device succeeded.
|
| + OK,
|
| +
|
| + // The operating system denied access to the device.
|
| + ACCESS_DENIED,
|
| +};
|
| +
|
| enum TransferDirection {
|
| IN,
|
| OUT,
|
| @@ -129,14 +137,20 @@ enum TransferStatus {
|
| };
|
|
|
| interface Device {
|
| - // Closes the device. Calling this effectively invalidates the Device object.
|
| - Close() => ();
|
| -
|
| // Retrieve a DeviceInfo struct containing metadata about the device,
|
| - // including the set of all available device configurations. May return null
|
| - // if the device has been closed.
|
| + // including the set of all available device configurations.
|
| GetDeviceInfo() => (DeviceInfo? info);
|
|
|
| + // Retrieves the device's currently active configuration. May return null if
|
| + // the device is unconfigured.
|
| + GetConfiguration() => (ConfigurationInfo? info);
|
| +
|
| + // Opens the device. Methods below require the device be opened first.
|
| + Open() => (OpenDeviceError error);
|
| +
|
| + // Closes the device.
|
| + Close() => ();
|
| +
|
| // Initiates a device control transfer to set the device's configuration to
|
| // one with the configuration value |value|.
|
| SetConfiguration(uint8 value) => (bool success);
|
|
|