| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 module device.usb; | 5 module device.usb; |
| 6 | 6 |
| 7 enum OpenDeviceError { | 7 enum OpenDeviceError { |
| 8 // Opening the device succeeded. | 8 // Opening the device succeeded. |
| 9 OK, | 9 OK, |
| 10 | 10 |
| 11 // The operating system denied access to the device. | 11 // The operating system denied access to the device. |
| 12 ACCESS_DENIED, | 12 ACCESS_DENIED, |
| 13 }; | 13 }; |
| 14 | 14 |
| 15 enum TransferDirection { | 15 enum TransferDirection { |
| 16 IN, | 16 INBOUND, |
| 17 OUT, | 17 OUTBOUND, |
| 18 }; | 18 }; |
| 19 | 19 |
| 20 enum ControlTransferType { | 20 enum ControlTransferType { |
| 21 STANDARD, | 21 STANDARD, |
| 22 CLASS, | 22 CLASS, |
| 23 VENDOR, | 23 VENDOR, |
| 24 RESERVED | 24 RESERVED |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 enum ControlTransferRecipient { | 27 enum ControlTransferRecipient { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 uint8 request; | 106 uint8 request; |
| 107 uint16 value; | 107 uint16 value; |
| 108 uint16 index; | 108 uint16 index; |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 enum TransferStatus { | 111 enum TransferStatus { |
| 112 // The transfer completed successfully. | 112 // The transfer completed successfully. |
| 113 COMPLETED, | 113 COMPLETED, |
| 114 | 114 |
| 115 // The transfer failed due to a non-specific error. | 115 // The transfer failed due to a non-specific error. |
| 116 ERROR, | 116 TRANSFER_ERROR, |
| 117 | 117 |
| 118 // The transfer was not allowed. | 118 // The transfer was not allowed. |
| 119 PERMISSION_DENIED, | 119 PERMISSION_DENIED, |
| 120 | 120 |
| 121 // The transfer timed out. | 121 // The transfer timed out. |
| 122 TIMEOUT, | 122 TIMEOUT, |
| 123 | 123 |
| 124 // The transfer was cancelled. | 124 // The transfer was cancelled. |
| 125 CANCELLED, | 125 CANCELLED, |
| 126 | 126 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 // this transfer. | 265 // this transfer. |
| 266 // | 266 // |
| 267 // |timeout| specifies the request timeout in milliseconds. A timeout of 0 | 267 // |timeout| specifies the request timeout in milliseconds. A timeout of 0 |
| 268 // indicates no timeout: the request will remain pending indefinitely until | 268 // indicates no timeout: the request will remain pending indefinitely until |
| 269 // completed or otherwise terminated. | 269 // completed or otherwise terminated. |
| 270 IsochronousTransferOut(uint8 endpoint_number, | 270 IsochronousTransferOut(uint8 endpoint_number, |
| 271 array<array<uint8>> packets, | 271 array<array<uint8>> packets, |
| 272 uint32 timeout) | 272 uint32 timeout) |
| 273 => (TransferStatus status); | 273 => (TransferStatus status); |
| 274 }; | 274 }; |
| OLD | NEW |