OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_ | |
Reilly Grant (use Gerrit)
2017/06/06 21:35:49
This include guard should be DEVICE_USB_FAKE_USB_D
Ravi Nanjundappa
2017/06/07 03:22:01
Done.
| |
6 #define DEVICE_USB_USB_DEVICE_HANDLE_H_ | |
7 | |
5 #include "device/usb/usb_device_handle.h" | 8 #include "device/usb/usb_device_handle.h" |
6 | 9 |
7 namespace device { | 10 namespace device { |
8 | 11 |
9 // This class implements a fake USB device handle that will handle control | 12 // This class implements a fake USB device handle that will handle control |
10 // requests by responding with data out of the provided buffer. The format of | 13 // requests by responding with data out of the provided buffer. The format of |
11 // each record in the buffer is: | 14 // each record in the buffer is: |
12 // | 15 // |
13 // 0 1 2 3... | 16 // 0 1 2 3... |
14 // +---------+---------+---------+---------- - - - | 17 // +---------+---------+---------+---------- - - - |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 | 75 |
73 private: | 76 private: |
74 ~FakeUsbDeviceHandle() override; | 77 ~FakeUsbDeviceHandle() override; |
75 | 78 |
76 const uint8_t* const data_; | 79 const uint8_t* const data_; |
77 const size_t size_; | 80 const size_t size_; |
78 size_t position_; | 81 size_t position_; |
79 }; | 82 }; |
80 | 83 |
81 } // namespace device | 84 } // namespace device |
85 | |
86 #endif // DEVICE_USB_USB_DEVICE_HANDLE_H_ | |
OLD | NEW |