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 #ifndef DEVICE_USB_MOCK_USB_DEVICE_HANDLE_H_ | 5 #ifndef DEVICE_USB_MOCK_USB_DEVICE_HANDLE_H_ |
6 #define DEVICE_USB_MOCK_USB_DEVICE_HANDLE_H_ | 6 #define DEVICE_USB_MOCK_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 18 matching lines...) Expand all Loading... |
29 MOCK_METHOD2(ReleaseInterface, | 29 MOCK_METHOD2(ReleaseInterface, |
30 void(int interface_number, const ResultCallback& callback)); | 30 void(int interface_number, const ResultCallback& callback)); |
31 MOCK_METHOD3(SetInterfaceAlternateSetting, | 31 MOCK_METHOD3(SetInterfaceAlternateSetting, |
32 void(int interface_number, | 32 void(int interface_number, |
33 int alternate_setting, | 33 int alternate_setting, |
34 const ResultCallback& callback)); | 34 const ResultCallback& callback)); |
35 MOCK_METHOD1(ResetDevice, void(const ResultCallback& callback)); | 35 MOCK_METHOD1(ResetDevice, void(const ResultCallback& callback)); |
36 MOCK_METHOD2(ClearHalt, | 36 MOCK_METHOD2(ClearHalt, |
37 void(uint8_t endpoint, const ResultCallback& callback)); | 37 void(uint8_t endpoint, const ResultCallback& callback)); |
38 MOCK_METHOD10(ControlTransfer, | 38 MOCK_METHOD10(ControlTransfer, |
39 void(UsbEndpointDirection direction, | 39 void(UsbTransferDirection direction, |
40 TransferRequestType request_type, | 40 UsbControlTransferType request_type, |
41 TransferRecipient recipient, | 41 UsbControlTransferRecipient recipient, |
42 uint8_t request, | 42 uint8_t request, |
43 uint16_t value, | 43 uint16_t value, |
44 uint16_t index, | 44 uint16_t index, |
45 scoped_refptr<net::IOBuffer> buffer, | 45 scoped_refptr<net::IOBuffer> buffer, |
46 size_t length, | 46 size_t length, |
47 unsigned int timeout, | 47 unsigned int timeout, |
48 const TransferCallback& callback)); | 48 const TransferCallback& callback)); |
49 MOCK_METHOD4(IsochronousTransferIn, | 49 MOCK_METHOD4(IsochronousTransferIn, |
50 void(uint8_t endpoint, | 50 void(uint8_t endpoint, |
51 const std::vector<uint32_t>& packet_lengths, | 51 const std::vector<uint32_t>& packet_lengths, |
52 unsigned int timeout, | 52 unsigned int timeout, |
53 const IsochronousTransferCallback& callback)); | 53 const IsochronousTransferCallback& callback)); |
54 MOCK_METHOD5(IsochronousTransferOut, | 54 MOCK_METHOD5(IsochronousTransferOut, |
55 void(uint8_t endpoint, | 55 void(uint8_t endpoint, |
56 scoped_refptr<net::IOBuffer> buffer, | 56 scoped_refptr<net::IOBuffer> buffer, |
57 const std::vector<uint32_t>& packet_lengths, | 57 const std::vector<uint32_t>& packet_lengths, |
58 unsigned int timeout, | 58 unsigned int timeout, |
59 const IsochronousTransferCallback& callback)); | 59 const IsochronousTransferCallback& callback)); |
60 MOCK_METHOD6(GenericTransfer, | 60 MOCK_METHOD6(GenericTransfer, |
61 void(UsbEndpointDirection direction, | 61 void(UsbTransferDirection direction, |
62 uint8_t endpoint, | 62 uint8_t endpoint, |
63 scoped_refptr<net::IOBuffer> buffer, | 63 scoped_refptr<net::IOBuffer> buffer, |
64 size_t length, | 64 size_t length, |
65 unsigned int timeout, | 65 unsigned int timeout, |
66 const TransferCallback& callback)); | 66 const TransferCallback& callback)); |
67 MOCK_METHOD1(FindInterfaceByEndpoint, | 67 MOCK_METHOD1(FindInterfaceByEndpoint, |
68 const UsbInterfaceDescriptor*(uint8_t endpoint_address)); | 68 const UsbInterfaceDescriptor*(uint8_t endpoint_address)); |
69 | 69 |
70 protected: | 70 protected: |
71 ~MockUsbDeviceHandle() override; | 71 ~MockUsbDeviceHandle() override; |
72 | 72 |
73 private: | 73 private: |
74 UsbDevice* device_; | 74 UsbDevice* device_; |
75 }; | 75 }; |
76 | 76 |
77 } // namespace device | 77 } // namespace device |
78 | 78 |
79 #endif // DEVICE_USB_MOCK_USB_DEVICE_HANDLE_H_ | 79 #endif // DEVICE_USB_MOCK_USB_DEVICE_HANDLE_H_ |
OLD | NEW |