Index: public/platform/modules/webusb/WebUSBDeviceInfo.h |
diff --git a/public/platform/modules/webusb/WebUSBDeviceInfo.h b/public/platform/modules/webusb/WebUSBDeviceInfo.h |
index 85ea1d17fb1fe98a57b11b98393ab13000e72c19..a2c049db7911f9389cea7a722f0f1b8e3aab679b 100644 |
--- a/public/platform/modules/webusb/WebUSBDeviceInfo.h |
+++ b/public/platform/modules/webusb/WebUSBDeviceInfo.h |
@@ -6,10 +6,86 @@ |
#define WebUSBDeviceInfo_h |
#include "public/platform/WebString.h" |
+#include "public/platform/WebVector.h" |
+#include "public/platform/modules/webusb/WebUSBDevice.h" |
namespace blink { |
struct WebUSBDeviceInfo { |
+ struct Endpoint { |
+ enum class Type { |
+ Bulk, |
+ Interrupt, |
+ Isochronous |
+ }; |
+ |
+ Endpoint() |
+ : endpointNumber(0) |
+ , direction(WebUSBDevice::TransferDirection::In) |
+ , type(Type::Bulk) |
+ , packetSize(0) |
+ { |
+ } |
+ |
+ uint8_t endpointNumber; |
+ WebUSBDevice::TransferDirection direction; |
+ Type type; |
+ uint32_t packetSize; |
+ }; |
+ |
+ struct AlternateInterface { |
+ AlternateInterface() |
+ : alternateSetting(0) |
+ , classCode(0) |
+ , subclassCode(0) |
+ , protocolCode(0) |
+ { |
+ } |
+ |
+ uint8_t alternateSetting; |
+ uint8_t classCode; |
+ uint8_t subclassCode; |
+ uint8_t protocolCode; |
+ WebString interfaceName; |
+ WebVector<Endpoint> endpoints; |
+ }; |
+ |
+ struct Interface { |
+ Interface() |
+ : interfaceNumber(0) |
+ { |
+ } |
+ |
+ uint8_t interfaceNumber; |
+ WebVector<AlternateInterface> alternates; |
Reilly Grant (use Gerrit)
2015/08/03 23:00:50
Leave out AlternateInterface and Endpoint until th
Ken Rockot(use gerrit already)
2015/08/04 00:51:25
Done.
|
+ }; |
+ |
+ struct Configuration { |
+ Configuration() |
+ : configurationValue(0) |
+ { |
+ } |
+ |
+ uint8_t configurationValue; |
+ WebString configurationName; |
+ WebVector<Interface> interfaces; |
+ }; |
+ |
+ WebUSBDeviceInfo() |
+ : usbVersionMajor(0) |
+ , usbVersionMinor(0) |
+ , usbVersionSubminor(0) |
+ , deviceClass(0) |
+ , deviceSubclass(0) |
+ , deviceProtocol(0) |
+ , vendorID(0) |
+ , productID(0) |
+ , deviceVersionMajor(0) |
+ , deviceVersionMinor(0) |
+ , deviceVersionSubminor(0) |
+ { |
+ } |
+ |
WebString guid; |
uint8_t usbVersionMajor; |
uint8_t usbVersionMinor; |
@@ -25,6 +101,7 @@ struct WebUSBDeviceInfo { |
WebString manufacturerName; |
WebString productName; |
WebString serialNumber; |
+ WebVector<Configuration> configurations; |
}; |
} // namespace blink |