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 CHROMEOS_DBUS_AUDIO_NODE_H_ | 5 #ifndef CHROMEOS_DBUS_AUDIO_NODE_H_ |
6 #define CHROMEOS_DBUS_AUDIO_NODE_H_ | 6 #define CHROMEOS_DBUS_AUDIO_NODE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "chromeos/chromeos_export.h" | 13 #include "chromeos/chromeos_export.h" |
14 | 14 |
15 namespace chromeos { | 15 namespace chromeos { |
16 | 16 |
17 // Structure to hold AudioNode data received from cras. | 17 // Structure to hold AudioNode data received from cras. |
18 struct CHROMEOS_EXPORT AudioNode { | 18 struct CHROMEOS_EXPORT AudioNode { |
19 bool is_input; | 19 bool is_input; |
20 uint64_t id; | 20 uint64_t id; |
| 21 uint64_t stable_device_id; |
21 std::string device_name; | 22 std::string device_name; |
22 std::string type; | 23 std::string type; |
23 std::string name; | 24 std::string name; |
24 std::string mic_positions; | 25 std::string mic_positions; |
25 bool active; | 26 bool active; |
26 // Time that the node was plugged in. | 27 // Time that the node was plugged in. |
27 uint64_t plugged_time; | 28 uint64_t plugged_time; |
28 | 29 |
29 AudioNode(); | 30 AudioNode(); |
30 AudioNode(bool is_input, | 31 AudioNode(bool is_input, |
31 uint64_t id, | 32 uint64_t id, |
| 33 uint64_t stable_device_id, |
32 std::string device_name, | 34 std::string device_name, |
33 std::string type, | 35 std::string type, |
34 std::string name, | 36 std::string name, |
35 bool active, | 37 bool active, |
36 uint64_t plugged_time); | 38 uint64_t plugged_time); |
37 ~AudioNode(); | 39 ~AudioNode(); |
38 std::string ToString() const; | 40 std::string ToString() const; |
39 }; | 41 }; |
40 | 42 |
41 typedef std::vector<AudioNode> AudioNodeList; | 43 typedef std::vector<AudioNode> AudioNodeList; |
42 | 44 |
43 } // namespace chromeos | 45 } // namespace chromeos |
44 | 46 |
45 #endif // CHROMEOS_DBUS_AUDIO_NODE_H_ | 47 #endif // CHROMEOS_DBUS_AUDIO_NODE_H_ |
OLD | NEW |