OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_MIDI_PORT_INFO_H_ | 5 #ifndef MEDIA_MIDI_MIDI_PORT_INFO_H_ |
6 #define MEDIA_MIDI_MIDI_PORT_INFO_H_ | 6 #define MEDIA_MIDI_MIDI_PORT_INFO_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "media/midi/midi_export.h" | 11 #include "media/midi/midi_export.h" |
| 12 #include "media/midi/midi_service.mojom.h" |
12 | 13 |
13 namespace midi { | 14 namespace midi { |
14 | 15 |
15 enum MidiPortState { | |
16 MIDI_PORT_DISCONNECTED, | |
17 MIDI_PORT_CONNECTED, | |
18 MIDI_PORT_OPENED, | |
19 MIDI_PORT_STATE_LAST = MIDI_PORT_OPENED, | |
20 }; | |
21 | |
22 struct MIDI_EXPORT MidiPortInfo final { | 16 struct MIDI_EXPORT MidiPortInfo final { |
23 MidiPortInfo(); | 17 MidiPortInfo(); |
24 MidiPortInfo(const std::string& in_id, | 18 MidiPortInfo(const std::string& in_id, |
25 const std::string& in_manufacturer, | 19 const std::string& in_manufacturer, |
26 const std::string& in_name, | 20 const std::string& in_name, |
27 const std::string& in_version, | 21 const std::string& in_version, |
28 MidiPortState in_state); | 22 mojom::PortState in_state); |
29 | 23 |
30 MidiPortInfo(const MidiPortInfo& info); | 24 MidiPortInfo(const MidiPortInfo& info); |
31 ~MidiPortInfo(); | 25 ~MidiPortInfo(); |
32 | 26 |
33 std::string id; | 27 std::string id; |
34 std::string manufacturer; | 28 std::string manufacturer; |
35 std::string name; | 29 std::string name; |
36 std::string version; | 30 std::string version; |
37 MidiPortState state; | 31 mojom::PortState state; |
38 }; | 32 }; |
39 | 33 |
40 using MidiPortInfoList = std::vector<MidiPortInfo>; | 34 using MidiPortInfoList = std::vector<MidiPortInfo>; |
41 | 35 |
42 } // namespace midi | 36 } // namespace midi |
43 | 37 |
44 #endif // MEDIA_MIDI_MIDI_PORT_INFO_H_ | 38 #endif // MEDIA_MIDI_MIDI_PORT_INFO_H_ |
OLD | NEW |