Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(989)

Unified Diff: device/devices_app/usb/public/interfaces/device.mojom

Issue 1682363002: Remove //device/devices_app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove two files that somehow survived in //device/devices_app. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
deleted file mode 100644
index 25addb2d411a1f2fab9c286e47a80a96af1f80c7..0000000000000000000000000000000000000000
--- a/device/devices_app/usb/public/interfaces/device.mojom
+++ /dev/null
@@ -1,285 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-module device.usb;
-
-enum OpenDeviceError {
- // Opening the device succeeded.
- OK,
-
- // The operating system denied access to the device.
- ACCESS_DENIED,
-};
-
-enum TransferDirection {
- INBOUND,
- OUTBOUND,
-};
-
-enum ControlTransferType {
- STANDARD,
- CLASS,
- VENDOR,
- RESERVED
-};
-
-enum ControlTransferRecipient {
- DEVICE,
- INTERFACE,
- ENDPOINT,
- OTHER
-};
-
-enum EndpointType {
- BULK,
- INTERRUPT,
- ISOCHRONOUS,
-};
-
-struct EndpointInfo {
- uint8 endpoint_number;
- TransferDirection direction;
- EndpointType type;
- uint32 packet_size;
-};
-
-struct AlternateInterfaceInfo {
- uint8 alternate_setting;
- uint8 class_code;
- uint8 subclass_code;
- uint8 protocol_code;
- string? interface_name;
- array<EndpointInfo> endpoints;
-};
-
-struct InterfaceInfo {
- uint8 interface_number;
- array<AlternateInterfaceInfo> alternates;
-};
-
-struct ConfigurationInfo {
- uint8 configuration_value;
- string? configuration_name;
- array<InterfaceInfo> interfaces;
-};
-
-struct WebUsbFunctionSubset {
- uint8 first_interface;
- array<string> origins;
-};
-
-struct WebUsbConfigurationSubset {
- uint8 configuration_value;
- array<string> origins;
- array<WebUsbFunctionSubset> functions;
-};
-
-struct WebUsbDescriptorSet {
- array<string> origins;
- array<WebUsbConfigurationSubset> configurations;
-};
-
-struct DeviceInfo {
- string guid;
- uint8 usb_version_major;
- uint8 usb_version_minor;
- uint8 usb_version_subminor;
- uint8 class_code;
- uint8 subclass_code;
- uint8 protocol_code;
- uint16 vendor_id;
- uint16 product_id;
- uint8 device_version_major;
- uint8 device_version_minor;
- uint8 device_version_subminor;
- string? manufacturer_name;
- string? product_name;
- string? serial_number;
- array<ConfigurationInfo> configurations;
- WebUsbDescriptorSet? webusb_allowed_origins;
-};
-
-struct ControlTransferParams {
- ControlTransferType type;
- ControlTransferRecipient recipient;
- uint8 request;
- uint16 value;
- uint16 index;
-};
-
-enum TransferStatus {
- // The transfer completed successfully.
- COMPLETED,
-
- // The transfer failed due to a non-specific error.
- TRANSFER_ERROR,
-
- // The transfer was not allowed.
- PERMISSION_DENIED,
-
- // The transfer timed out.
- TIMEOUT,
-
- // The transfer was cancelled.
- CANCELLED,
-
- // The transfer stalled.
- STALLED,
-
- // The transfer failed because the device was disconnected from the host.
- DISCONNECT,
-
- // The transfer succeeded, but the device sent more data than was requested.
- // This applies only to inbound transfers.
- BABBLE,
-
- // The transfer succeeded, but the device sent less data than was requested.
- // This applies only to inbound transfers.
- SHORT_PACKET,
-};
-
-struct IsochronousPacket {
- uint32 length;
- uint32 transferred_length;
- TransferStatus status;
-};
-
-interface Device {
- // Retrieve a DeviceInfo struct containing metadata about the device,
- // including the set of all available device configurations.
- GetDeviceInfo() => (DeviceInfo? info);
-
- // Retrieves the |configuration_value| of the device's currently active
- // configuration. Will return 0 if the device is unconfigured.
- GetConfiguration() => (uint8 value);
-
- // 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);
-
- // Claims a single interface in the current device configuration.
- ClaimInterface(uint8 interface_number) => (bool success);
-
- // Releases a claimed interface in the current device configuration.
- ReleaseInterface(uint8 interface_number) => (bool success);
-
- // Selects an alternate setting for a given claimed interface.
- SetInterfaceAlternateSetting(uint8 interface_number, uint8 alternate_setting)
- => (bool success);
-
- // Resets the device.
- Reset() => (bool success);
-
- // Clear the halt/stall condition for an endpoint.
- ClearHalt(uint8 endpoint) => (bool success);
-
- // Initiates an inbound control transfer request. |params| determine the
- // details of the request. Transfers to recipients other than DEVICE require a
- // corresponding interface to be claimed.
- //
- // |length| specifies the expected number of bytes to receive for this
- // transfer. The size of |data| will never exceed |length|, and |data| will be
- // null if |status| is neither COMPLETED, BABBLE, or SHORT_PACKET.
- //
- // |timeout| specifies the request timeout in milliseconds. A timeout of 0
- // indicates no timeout: the request will remain pending indefinitely until
- // completed or otherwise terminated.
- ControlTransferIn(ControlTransferParams params, uint32 length, uint32 timeout)
- => (TransferStatus status, array<uint8>? data);
-
- // Initiates an inbound control transfer request. |params| determine the
- // details of the request. Transfers to recipients other than DEVICE require a
- // corresponding interface to be claimed.
- //
- // |data| specifies the bytes to send the device in the body of the request.
- //
- // |timeout| specifies the request timeout in milliseconds. A timeout of 0
- // indicates no timeout: the request will remain pending indefinitely until
- // completed or otherwise terminated.
- ControlTransferOut(ControlTransferParams params,
- array<uint8> data,
- uint32 timeout)
- => (TransferStatus status);
-
- // Initiates an inbound generic transfer request on a specific endpoint. The
- // interface to which |endpoint_number| belongs must be claimed, and the
- // appropriate alternate setting must be set on that interface before
- // transfers can be initiated on the endpoint. The endpoint must be of type
- // BULK or INTERRUPT.
- //
- // |length| specifies the expected number of bytes to receive for this
- // transfer. The size of |data| will never exceed |length|, and |data| will be
- // null if |status| is neither COMPLETED, BABBLE, or SHORT_PACKET.
- //
- // |timeout| specifies the request timeout in milliseconds. A timeout of 0
- // indicates no timeout: the request will remain pending indefinitely until
- // completed or otherwise terminated.
- GenericTransferIn(uint8 endpoint_number, uint32 length, uint32 timeout)
- => (TransferStatus status, array<uint8>? data);
-
- // Initiates an outbound generic transfer request on a specific endpoint. The
- // interface to which |endpoint_number| belongs must be claimed, and the
- // appropriate alternate setting must be set on that interface before
- // transfers can be initiated on the endpoint. The endpoint must be of type
- // BULK or INTERRUPT.
- //
- // |data| specifies the bytes to send the device in the body of the request.
- //
- // |timeout| specifies the request timeout in milliseconds. A timeout of 0
- // indicates no timeout: the request will remain pending indefinitely until
- // completed or otherwise terminated.
- GenericTransferOut(uint8 endpoint_number, array<uint8> data, uint32 timeout)
- => (TransferStatus status);
-
- // Initiates an inbound isochronous transfer request on a specific endpoint.
- // The interface to which |endpoint_number| belongs must be claimed, and the
- // appropriate alternate setting must be set on that interface before
- // transfers can be initiated on the endpoint. The endpoint must be of type
- // ISOCHRONOUS.
- //
- // |packet_lengths| specifies the maximum expected number of bytes to receive
- // for each packet in this transfer.
- //
- // |timeout| specifies the request timeout in milliseconds. A timeout of 0
- // indicates no timeout: the request will remain pending indefinitely until
- // completed or otherwise terminated.
- //
- // |data| contains the data received from the device, if any. |packets|
- // contains the status of each packet received from the device, in order. The
- // length of the packet indicates its position in |data| while it's
- // transferred length gives the amount of data actually received from the
- // device.
- IsochronousTransferIn(uint8 endpoint_number,
- array<uint32> packet_lengths,
- uint32 timeout)
- => (array<uint8>? data, array<IsochronousPacket> packets);
-
- // Initiates an outbound isochronous transfer request on a specific endpoint.
- // The interface to which |endpoint_number| belongs must be claimed, and the
- // appropriate alternate setting must be set on that interface before
- // transfers can be initiated on the endpoint. The endpoint must be of type
- // ISOCHRONOUS.
- //
- // |data| specifies the bytes to send to the device.
- //
- // |packet_lengths| specifies how |data| should be separated into packets when
- // it is sent to the device.
- //
- // |timeout| specifies the request timeout in milliseconds. A timeout of 0
- // indicates no timeout: the request will remain pending indefinitely until
- // completed or otherwise terminated.
-
- // |packets| contains the status of each packet sent to the device, in order.
- IsochronousTransferOut(uint8 endpoint_number,
- array<uint8> data,
- array<uint32> packet_lengths,
- uint32 timeout)
- => (array<IsochronousPacket> packets);
-};
« no previous file with comments | « device/devices_app/usb/public/interfaces/BUILD.gn ('k') | device/devices_app/usb/public/interfaces/device_manager.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698