[SyncFS] Run RemoteToLocalSyncer as a background task
[chromium-blink-merge.git] / device / usb / usb_descriptors.h
blob2881aba6eca7ed2325c341744e7869e0f0564725
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
3 // found in the LICENSE file.
5 #ifndef DEVICE_USB_USB_DESCRIPTORS_H_
6 #define DEVICE_USB_USB_DESCRIPTORS_H_
8 #include <stdint.h>
9 #include <vector>
11 namespace device {
13 enum UsbTransferType {
14 USB_TRANSFER_CONTROL = 0,
15 USB_TRANSFER_ISOCHRONOUS,
16 USB_TRANSFER_BULK,
17 USB_TRANSFER_INTERRUPT,
20 enum UsbEndpointDirection {
21 USB_DIRECTION_INBOUND = 0,
22 USB_DIRECTION_OUTBOUND,
25 enum UsbSynchronizationType {
26 USB_SYNCHRONIZATION_NONE = 0,
27 USB_SYNCHRONIZATION_ASYNCHRONOUS,
28 USB_SYNCHRONIZATION_ADAPTIVE,
29 USB_SYNCHRONIZATION_SYNCHRONOUS,
32 enum UsbUsageType {
33 USB_USAGE_DATA = 0,
34 USB_USAGE_FEEDBACK,
35 USB_USAGE_EXPLICIT_FEEDBACK
38 struct UsbEndpointDescriptor {
39 UsbEndpointDescriptor();
40 ~UsbEndpointDescriptor();
42 typedef std::vector<UsbEndpointDescriptor>::const_iterator Iterator;
44 uint8_t address;
45 UsbEndpointDirection direction;
46 uint16_t maximum_packet_size;
47 UsbSynchronizationType synchronization_type;
48 UsbTransferType transfer_type;
49 UsbUsageType usage_type;
50 uint16_t polling_interval;
51 std::vector<uint8_t> extra_data;
54 struct UsbInterfaceDescriptor {
55 UsbInterfaceDescriptor();
56 ~UsbInterfaceDescriptor();
58 typedef std::vector<UsbInterfaceDescriptor>::const_iterator Iterator;
60 uint8_t interface_number;
61 uint8_t alternate_setting;
62 uint8_t interface_class;
63 uint8_t interface_subclass;
64 uint8_t interface_protocol;
65 std::vector<UsbEndpointDescriptor> endpoints;
66 std::vector<uint8_t> extra_data;
69 struct UsbConfigDescriptor {
70 UsbConfigDescriptor();
71 ~UsbConfigDescriptor();
73 uint8_t configuration_value;
74 bool self_powered;
75 bool remote_wakeup;
76 uint16_t maximum_power;
77 std::vector<UsbInterfaceDescriptor> interfaces;
78 std::vector<uint8_t> extra_data;
81 } // namespace device
83 #endif // DEVICE_USB_USB_DESCRIPTORS_H_