| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 DEVICE_USB_USB_DEVICE_HANDLE_H_ | 5 #ifndef DEVICE_USB_USB_DEVICE_HANDLE_H_ |
| 6 #define DEVICE_USB_USB_DEVICE_HANDLE_H_ | 6 #define DEVICE_USB_USB_DEVICE_HANDLE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 unsigned int timeout, | 104 unsigned int timeout, |
| 105 const IsochronousTransferCallback& callback) = 0; | 105 const IsochronousTransferCallback& callback) = 0; |
| 106 | 106 |
| 107 virtual void GenericTransfer(UsbEndpointDirection direction, | 107 virtual void GenericTransfer(UsbEndpointDirection direction, |
| 108 uint8_t endpoint_number, | 108 uint8_t endpoint_number, |
| 109 scoped_refptr<net::IOBuffer> buffer, | 109 scoped_refptr<net::IOBuffer> buffer, |
| 110 size_t length, | 110 size_t length, |
| 111 unsigned int timeout, | 111 unsigned int timeout, |
| 112 const TransferCallback& callback) = 0; | 112 const TransferCallback& callback) = 0; |
| 113 | 113 |
| 114 // Gets the interface containing |endpoint_address|. Returns false if no | 114 // Gets the interface containing |endpoint_address|. Returns nullptr if no |
| 115 // claimed interface contains that endpoint. | 115 // claimed interface contains that endpoint. |
| 116 virtual bool FindInterfaceByEndpoint(uint8_t endpoint_address, | 116 virtual const UsbInterfaceDescriptor* FindInterfaceByEndpoint( |
| 117 uint8_t* interface_number) = 0; | 117 uint8_t endpoint_address) = 0; |
| 118 | 118 |
| 119 protected: | 119 protected: |
| 120 friend class base::RefCountedThreadSafe<UsbDeviceHandle>; | 120 friend class base::RefCountedThreadSafe<UsbDeviceHandle>; |
| 121 | 121 |
| 122 UsbDeviceHandle(); | 122 UsbDeviceHandle(); |
| 123 | 123 |
| 124 virtual ~UsbDeviceHandle(); | 124 virtual ~UsbDeviceHandle(); |
| 125 | 125 |
| 126 private: | 126 private: |
| 127 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandle); | 127 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandle); |
| 128 }; | 128 }; |
| 129 | 129 |
| 130 } // namespace device | 130 } // namespace device |
| 131 | 131 |
| 132 #endif // DEVICE_USB_USB_DEVICE_HANDLE_H_ | 132 #endif // DEVICE_USB_USB_DEVICE_HANDLE_H_ |
| OLD | NEW |