| Index: device/usb/usb_device_handle.h
|
| diff --git a/device/usb/usb_device_handle.h b/device/usb/usb_device_handle.h
|
| index a97dddcd151ce0203ae83478a1cd8845d8b5bf79..b206cf19f8e8c0cc6d30566f2eda51294c71e08e 100644
|
| --- a/device/usb/usb_device_handle.h
|
| +++ b/device/usb/usb_device_handle.h
|
| @@ -40,9 +40,18 @@ enum UsbTransferStatus {
|
| // UsbDeviceHandle class provides basic I/O related functionalities.
|
| class UsbDeviceHandle : public base::RefCountedThreadSafe<UsbDeviceHandle> {
|
| public:
|
| + struct IsochronousPacket {
|
| + uint32_t length;
|
| + uint32_t transferred_length;
|
| + UsbTransferStatus status;
|
| + };
|
| +
|
| using ResultCallback = base::Callback<void(bool)>;
|
| using TransferCallback = base::Callback<
|
| void(UsbTransferStatus, scoped_refptr<net::IOBuffer>, size_t)>;
|
| + using IsochronousTransferCallback =
|
| + base::Callback<void(scoped_refptr<net::IOBuffer>,
|
| + const std::vector<IsochronousPacket>& packets)>;
|
|
|
| enum TransferRequestType { STANDARD, CLASS, VENDOR, RESERVED };
|
| enum TransferRecipient { DEVICE, INTERFACE, ENDPOINT, OTHER };
|
| @@ -81,17 +90,21 @@ class UsbDeviceHandle : public base::RefCountedThreadSafe<UsbDeviceHandle> {
|
| unsigned int timeout,
|
| const TransferCallback& callback) = 0;
|
|
|
| - virtual void IsochronousTransfer(UsbEndpointDirection direction,
|
| - uint8_t endpoint,
|
| - scoped_refptr<net::IOBuffer> buffer,
|
| - size_t length,
|
| - unsigned int packets,
|
| - unsigned int packet_length,
|
| - unsigned int timeout,
|
| - const TransferCallback& callback) = 0;
|
| + virtual void IsochronousTransferIn(
|
| + uint8_t endpoint_number,
|
| + const std::vector<uint32_t>& packet_lengths,
|
| + unsigned int timeout,
|
| + const IsochronousTransferCallback& callback) = 0;
|
| +
|
| + virtual void IsochronousTransferOut(
|
| + uint8_t endpoint_number,
|
| + scoped_refptr<net::IOBuffer> buffer,
|
| + const std::vector<uint32_t>& packet_lengths,
|
| + unsigned int timeout,
|
| + const IsochronousTransferCallback& callback) = 0;
|
|
|
| virtual void GenericTransfer(UsbEndpointDirection direction,
|
| - uint8_t endpoint,
|
| + uint8_t endpoint_number,
|
| scoped_refptr<net::IOBuffer> buffer,
|
| size_t length,
|
| unsigned int timeout,
|
| @@ -109,6 +122,7 @@ class UsbDeviceHandle : public base::RefCountedThreadSafe<UsbDeviceHandle> {
|
|
|
| virtual ~UsbDeviceHandle();
|
|
|
| + private:
|
| DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandle);
|
| };
|
|
|
|
|