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_IMPL_H_ | 5 #ifndef DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_ |
6 #define DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_ | 6 #define DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 virtual void Close() OVERRIDE; | 37 virtual void Close() OVERRIDE; |
38 virtual bool ClaimInterface(const int interface_number) OVERRIDE; | 38 virtual bool ClaimInterface(const int interface_number) OVERRIDE; |
39 virtual bool ReleaseInterface(const int interface_number) OVERRIDE; | 39 virtual bool ReleaseInterface(const int interface_number) OVERRIDE; |
40 virtual bool SetInterfaceAlternateSetting( | 40 virtual bool SetInterfaceAlternateSetting( |
41 const int interface_number, | 41 const int interface_number, |
42 const int alternate_setting) OVERRIDE; | 42 const int alternate_setting) OVERRIDE; |
43 virtual bool ResetDevice() OVERRIDE; | 43 virtual bool ResetDevice() OVERRIDE; |
44 virtual bool GetManufacturer(base::string16* manufacturer) OVERRIDE; | 44 virtual bool GetManufacturer(base::string16* manufacturer) OVERRIDE; |
45 virtual bool GetProduct(base::string16* product) OVERRIDE; | 45 virtual bool GetProduct(base::string16* product) OVERRIDE; |
46 virtual bool GetSerial(base::string16* serial) OVERRIDE; | 46 virtual bool GetSerial(base::string16* serial) OVERRIDE; |
47 virtual void ControlTransfer(const UsbEndpointDirection direction, | 47 virtual void ControlTransfer(UsbEndpointDirection direction, |
48 const TransferRequestType request_type, | 48 TransferRequestType request_type, |
49 const TransferRecipient recipient, | 49 TransferRecipient recipient, |
50 const uint8 request, | 50 uint8 request, |
51 const uint16 value, | 51 uint16 value, |
52 const uint16 index, | 52 uint16 index, |
53 net::IOBuffer* buffer, | 53 net::IOBuffer* buffer, |
54 const size_t length, | 54 size_t length, |
55 const unsigned int timeout, | 55 unsigned int timeout, |
56 const UsbTransferCallback& callback) OVERRIDE; | 56 const UsbTransferCallback& callback) OVERRIDE; |
57 | 57 |
58 virtual void BulkTransfer(const UsbEndpointDirection direction, | 58 virtual void BulkTransfer(UsbEndpointDirection direction, |
59 const uint8 endpoint, | 59 uint8 endpoint, |
60 net::IOBuffer* buffer, | 60 net::IOBuffer* buffer, |
61 const size_t length, | 61 size_t length, |
62 const unsigned int timeout, | 62 unsigned int timeout, |
63 const UsbTransferCallback& callback) OVERRIDE; | 63 const UsbTransferCallback& callback) OVERRIDE; |
64 | 64 |
65 virtual void InterruptTransfer(const UsbEndpointDirection direction, | 65 virtual void InterruptTransfer(UsbEndpointDirection direction, |
66 const uint8 endpoint, | 66 uint8 endpoint, |
67 net::IOBuffer* buffer, | 67 net::IOBuffer* buffer, |
68 const size_t length, | 68 size_t length, |
69 const unsigned int timeout, | 69 unsigned int timeout, |
70 const UsbTransferCallback& callback) OVERRIDE; | 70 const UsbTransferCallback& callback) OVERRIDE; |
71 | 71 |
72 virtual void IsochronousTransfer( | 72 virtual void IsochronousTransfer( |
73 const UsbEndpointDirection direction, | 73 UsbEndpointDirection direction, |
74 const uint8 endpoint, | 74 uint8 endpoint, |
75 net::IOBuffer* buffer, | 75 net::IOBuffer* buffer, |
76 const size_t length, | 76 size_t length, |
77 const unsigned int packets, | 77 unsigned int packets, |
78 const unsigned int packet_length, | 78 unsigned int packet_length, |
79 const unsigned int timeout, | 79 unsigned int timeout, |
80 const UsbTransferCallback& callback) OVERRIDE; | 80 const UsbTransferCallback& callback) OVERRIDE; |
81 | 81 |
82 PlatformUsbDeviceHandle handle() const { return handle_; } | 82 PlatformUsbDeviceHandle handle() const { return handle_; } |
83 | 83 |
84 protected: | 84 protected: |
85 friend class UsbDeviceImpl; | 85 friend class UsbDeviceImpl; |
86 | 86 |
87 // This constructor is called by UsbDevice. | 87 // This constructor is called by UsbDevice. |
88 UsbDeviceHandleImpl(scoped_refptr<UsbContext> context, | 88 UsbDeviceHandleImpl(scoped_refptr<UsbContext> context, |
89 UsbDeviceImpl* device, | 89 UsbDeviceImpl* device, |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 164 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
165 | 165 |
166 base::ThreadChecker thread_checker_; | 166 base::ThreadChecker thread_checker_; |
167 | 167 |
168 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandleImpl); | 168 DISALLOW_COPY_AND_ASSIGN(UsbDeviceHandleImpl); |
169 }; | 169 }; |
170 | 170 |
171 } // namespace device | 171 } // namespace device |
172 | 172 |
173 #endif // DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_ | 173 #endif // DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_ |
OLD | NEW |