OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 MEDIA_MIDI_USB_MIDI_DESCRIPTOR_PARSER_H_ | 5 #ifndef MEDIA_MIDI_USB_MIDI_DESCRIPTOR_PARSER_H_ |
6 #define MEDIA_MIDI_USB_MIDI_DESCRIPTOR_PARSER_H_ | 6 #define MEDIA_MIDI_USB_MIDI_DESCRIPTOR_PARSER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "media/base/media_export.h" | 12 #include "media/midi/usb_midi_export.h" |
13 #include "media/midi/usb_midi_jack.h" | 13 #include "media/midi/usb_midi_jack.h" |
14 | 14 |
15 namespace media { | 15 namespace media { |
16 | 16 |
17 class UsbMidiDevice; | 17 class UsbMidiDevice; |
18 | 18 |
19 // UsbMidiDescriptorParser parses USB descriptors and | 19 // UsbMidiDescriptorParser parses USB descriptors and |
20 // generates input / output lists of MIDIPortInfo. | 20 // generates input / output lists of MIDIPortInfo. |
21 // This is not a generic USB descriptor parser: this parser is designed | 21 // This is not a generic USB descriptor parser: this parser is designed |
22 // for collecting USB-MIDI jacks information from the descriptor. | 22 // for collecting USB-MIDI jacks information from the descriptor. |
23 class MEDIA_EXPORT UsbMidiDescriptorParser { | 23 class USB_MIDI_EXPORT UsbMidiDescriptorParser { |
24 public: | 24 public: |
25 struct DeviceInfo { | 25 struct DeviceInfo { |
26 DeviceInfo() | 26 DeviceInfo() |
27 : vendor_id(0), | 27 : vendor_id(0), |
28 product_id(0), | 28 product_id(0), |
29 bcd_device_version(0), | 29 bcd_device_version(0), |
30 manufacturer_index(0), | 30 manufacturer_index(0), |
31 product_index(0) {} | 31 product_index(0) {} |
32 uint16 vendor_id; | 32 uint16 vendor_id; |
33 uint16 product_id; | 33 uint16 product_id; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 std::vector<UsbMidiJack> incomplete_jacks_; | 74 std::vector<UsbMidiJack> incomplete_jacks_; |
75 | 75 |
76 DISALLOW_COPY_AND_ASSIGN(UsbMidiDescriptorParser); | 76 DISALLOW_COPY_AND_ASSIGN(UsbMidiDescriptorParser); |
77 }; | 77 }; |
78 | 78 |
79 | 79 |
80 } // namespace media | 80 } // namespace media |
81 | 81 |
82 #endif // MEDIA_MIDI_USB_MIDI_DESCRIPTOR_PARSER_H_ | 82 #endif // MEDIA_MIDI_USB_MIDI_DESCRIPTOR_PARSER_H_ |
OLD | NEW |