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

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

Issue 1658953003: Revert of Update device/usb and its Mojo interface for variable size ISO packets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « device/devices_app/usb/device_impl_unittest.cc ('k') | device/devices_app/usb/type_converters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 25addb2d411a1f2fab9c286e47a80a96af1f80c7..438aed14f922ad68a73b5ee09699bd89185d623d 100644
--- a/device/devices_app/usb/public/interfaces/device.mojom
+++ b/device/devices_app/usb/public/interfaces/device.mojom
@@ -139,12 +139,6 @@
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.
@@ -244,22 +238,22 @@
// 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.
+ // |packet_length| specifies the maximum expected number of bytes to receive
+ // for each packet in this transfer. |num_packets| specifies the maximum total
+ // number of packets to receive.
+ //
+ // |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 set of packets received from the device, in order.
+ // No received packet's size will exceed |packet_length|, and will be null
+ // if |status| is neither COMPLETED, BABBLE, or SHORT_PACKET.
IsochronousTransferIn(uint8 endpoint_number,
- array<uint32> packet_lengths,
+ uint32 num_packets,
+ uint32 packet_length,
uint32 timeout)
- => (array<uint8>? data, array<IsochronousPacket> packets);
+ => (TransferStatus status, array<array<uint8>>? packets);
// Initiates an outbound isochronous transfer request on a specific endpoint.
// The interface to which |endpoint_number| belongs must be claimed, and the
@@ -267,19 +261,14 @@
// 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.
+ // |packets| specifies the series of data packets to send to the device for
+ // 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.
IsochronousTransferOut(uint8 endpoint_number,
- array<uint8> data,
- array<uint32> packet_lengths,
+ array<array<uint8>> packets,
uint32 timeout)
- => (array<IsochronousPacket> packets);
-};
+ => (TransferStatus status);
+};
« no previous file with comments | « device/devices_app/usb/device_impl_unittest.cc ('k') | device/devices_app/usb/type_converters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698