| 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/base/media_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 namespace midi { |
| 16 | 17 |
| 17 class UsbMidiDevice; | 18 class UsbMidiDevice; |
| 18 | 19 |
| 19 // UsbMidiDescriptorParser parses USB descriptors and | 20 // UsbMidiDescriptorParser parses USB descriptors and |
| 20 // generates input / output lists of MIDIPortInfo. | 21 // generates input / output lists of MIDIPortInfo. |
| 21 // This is not a generic USB descriptor parser: this parser is designed | 22 // This is not a generic USB descriptor parser: this parser is designed |
| 22 // for collecting USB-MIDI jacks information from the descriptor. | 23 // for collecting USB-MIDI jacks information from the descriptor. |
| 23 class MEDIA_EXPORT UsbMidiDescriptorParser { | 24 class MEDIA_EXPORT UsbMidiDescriptorParser { |
| 24 public: | 25 public: |
| 25 struct DeviceInfo { | 26 struct DeviceInfo { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 70 |
| 70 bool is_parsing_usb_midi_interface_; | 71 bool is_parsing_usb_midi_interface_; |
| 71 uint8 current_endpoint_address_; | 72 uint8 current_endpoint_address_; |
| 72 uint8 current_cable_number_; | 73 uint8 current_cable_number_; |
| 73 | 74 |
| 74 std::vector<UsbMidiJack> incomplete_jacks_; | 75 std::vector<UsbMidiJack> incomplete_jacks_; |
| 75 | 76 |
| 76 DISALLOW_COPY_AND_ASSIGN(UsbMidiDescriptorParser); | 77 DISALLOW_COPY_AND_ASSIGN(UsbMidiDescriptorParser); |
| 77 }; | 78 }; |
| 78 | 79 |
| 79 | 80 } // namespace midi |
| 80 } // namespace media | 81 } // namespace media |
| 81 | 82 |
| 82 #endif // MEDIA_MIDI_USB_MIDI_DESCRIPTOR_PARSER_H_ | 83 #endif // MEDIA_MIDI_USB_MIDI_DESCRIPTOR_PARSER_H_ |
| OLD | NEW |