| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_USB_USB_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_USB_USB_INTERFACE_H_ |
| 6 #define CHROME_BROWSER_USB_USB_INTERFACE_H_ | 6 #define CHROME_BROWSER_USB_USB_INTERFACE_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 | 10 |
| 11 struct libusb_config_descriptor; | 11 struct libusb_config_descriptor; |
| 12 struct libusb_endpoint_descriptor; | 12 struct libusb_endpoint_descriptor; |
| 13 struct libusb_interface; | 13 struct libusb_interface; |
| 14 struct libusb_interface_descriptor; | 14 struct libusb_interface_descriptor; |
| 15 | 15 |
| 16 typedef libusb_config_descriptor* PlatformUsbConfigDescriptor; | 16 typedef libusb_config_descriptor* PlatformUsbConfigDescriptor; |
| 17 typedef const libusb_endpoint_descriptor* PlatformUsbEndpointDescriptor; | 17 typedef const libusb_endpoint_descriptor* PlatformUsbEndpointDescriptor; |
| 18 typedef const libusb_interface* PlatformUsbInterface; | 18 typedef const libusb_interface* PlatformUsbInterface; |
| 19 typedef const libusb_interface_descriptor* PlatformUsbInterfaceDescriptor; | 19 typedef const libusb_interface_descriptor* PlatformUsbInterfaceDescriptor; |
| 20 | 20 |
| 21 class UsbDevice; | |
| 22 | |
| 23 enum UsbTransferType { | 21 enum UsbTransferType { |
| 24 USB_TRANSFER_CONTROL = 0, | 22 USB_TRANSFER_CONTROL = 0, |
| 25 USB_TRANSFER_ISOCHRONOUS, | 23 USB_TRANSFER_ISOCHRONOUS, |
| 26 USB_TRANSFER_BULK, | 24 USB_TRANSFER_BULK, |
| 27 USB_TRANSFER_INTERRUPT, | 25 USB_TRANSFER_INTERRUPT, |
| 28 }; | 26 }; |
| 29 | 27 |
| 30 enum UsbEndpointDirection { | 28 enum UsbEndpointDirection { |
| 31 USB_DIRECTION_INBOUND = 0, | 29 USB_DIRECTION_INBOUND = 0, |
| 32 USB_DIRECTION_OUTBOUND, | 30 USB_DIRECTION_OUTBOUND, |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 GetInterface(size_t index) const; | 119 GetInterface(size_t index) const; |
| 122 | 120 |
| 123 private: | 121 private: |
| 124 friend class base::RefCounted<UsbConfigDescriptor>; | 122 friend class base::RefCounted<UsbConfigDescriptor>; |
| 125 ~UsbConfigDescriptor(); | 123 ~UsbConfigDescriptor(); |
| 126 | 124 |
| 127 PlatformUsbConfigDescriptor config_; | 125 PlatformUsbConfigDescriptor config_; |
| 128 }; | 126 }; |
| 129 | 127 |
| 130 #endif // CHROME_BROWSER_USB_USB_INTERFACE_H_ | 128 #endif // CHROME_BROWSER_USB_USB_INTERFACE_H_ |
| OLD | NEW |