| Index: device/usb/usb_device_handle.h
|
| diff --git a/device/usb/usb_device_handle.h b/device/usb/usb_device_handle.h
|
| index 3e608d5c5c14b9aae9fa51e0e840124e7f633c8f..eed10dd674234b5a68210529fbe9af1ae62ed482 100644
|
| --- a/device/usb/usb_device_handle.h
|
| +++ b/device/usb/usb_device_handle.h
|
| @@ -37,9 +37,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 };
|
| @@ -78,17 +87,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,
|
| @@ -106,6 +119,7 @@ class UsbDeviceHandle : public base::RefCountedThreadSafe<UsbDeviceHandle> {
|
|
|
| virtual ~UsbDeviceHandle();
|
|
|
| + private:
|
| DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandle);
|
| };
|
|
|
|
|