Add ICU message format support
[chromium-blink-merge.git] / device / usb / webusb_descriptors.h
blob696d02489611da3ddb6424e7a6405b6ca166e136
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
3 // found in the LICENSE file.
5 #ifndef DEVICE_USB_WEBUSB_DESCRIPTORS_H_
6 #define DEVICE_USB_WEBUSB_DESCRIPTORS_H_
8 #include <stdint.h>
9 #include <vector>
11 #include "url/gurl.h"
13 namespace device {
15 struct WebUsbFunctionSubset {
16 WebUsbFunctionSubset();
17 ~WebUsbFunctionSubset();
19 uint8_t first_interface;
20 std::vector<GURL> origins;
23 struct WebUsbConfigurationSubset {
24 WebUsbConfigurationSubset();
25 ~WebUsbConfigurationSubset();
27 uint8_t configuration_value;
28 std::vector<GURL> origins;
29 std::vector<WebUsbFunctionSubset> functions;
32 struct WebUsbDescriptorSet {
33 WebUsbDescriptorSet();
34 ~WebUsbDescriptorSet();
36 bool Parse(const std::vector<uint8_t>& bytes);
38 std::vector<GURL> origins;
39 std::vector<WebUsbConfigurationSubset> configurations;
42 struct WebUsbPlatformCapabilityDescriptor {
43 WebUsbPlatformCapabilityDescriptor();
44 ~WebUsbPlatformCapabilityDescriptor();
46 bool ParseFromBosDescriptor(const std::vector<uint8_t>& bytes);
48 uint16_t version;
49 uint8_t vendor_code;
52 } // device
54 #endif // DEVICE_USB_WEBUSB_DESCRIPTORS_H_