| 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 <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 unsigned int timeout, | 83 unsigned int timeout, |
| 84 const TransferCallback& callback) = 0; | 84 const TransferCallback& callback) = 0; |
| 85 | 85 |
| 86 virtual void GenericTransfer(UsbEndpointDirection direction, | 86 virtual void GenericTransfer(UsbEndpointDirection direction, |
| 87 uint8_t endpoint, | 87 uint8_t endpoint, |
| 88 scoped_refptr<net::IOBuffer> buffer, | 88 scoped_refptr<net::IOBuffer> buffer, |
| 89 size_t length, | 89 size_t length, |
| 90 unsigned int timeout, | 90 unsigned int timeout, |
| 91 const TransferCallback& callback) = 0; | 91 const TransferCallback& callback) = 0; |
| 92 | 92 |
| 93 // Gets the interface containing |endpoint_address|. Returns false if no |
| 94 // claimed interface contains that endpoint. |
| 95 virtual bool FindInterfaceByEndpoint(uint8_t endpoint_address, |
| 96 uint8_t* interface_number) = 0; |
| 97 |
| 93 protected: | 98 protected: |
| 94 friend class base::RefCountedThreadSafe<UsbDeviceHandle>; | 99 friend class base::RefCountedThreadSafe<UsbDeviceHandle>; |
| 95 | 100 |
| 96 UsbDeviceHandle(); | 101 UsbDeviceHandle(); |
| 97 | 102 |
| 98 virtual ~UsbDeviceHandle(); | 103 virtual ~UsbDeviceHandle(); |
| 99 | 104 |
| 100 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandle); | 105 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandle); |
| 101 }; | 106 }; |
| 102 | 107 |
| 103 } // namespace device | 108 } // namespace device |
| 104 | 109 |
| 105 #endif // DEVICE_USB_USB_DEVICE_HANDLE_H_ | 110 #endif // DEVICE_USB_USB_DEVICE_HANDLE_H_ |
| OLD | NEW |