Chromium Code Reviews| 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_AUDIO_AUDIO_DEVICE_H_ | 5 #ifndef CHROMEOS_AUDIO_AUDIO_DEVICE_H_ |
| 6 #define CHROMEOS_AUDIO_AUDIO_DEVICE_H_ | 6 #define CHROMEOS_AUDIO_AUDIO_DEVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 35 AudioDevice(); | 35 AudioDevice(); |
| 36 explicit AudioDevice(const AudioNode& node); | 36 explicit AudioDevice(const AudioNode& node); |
| 37 std::string ToString() const; | 37 std::string ToString() const; |
| 38 | 38 |
| 39 // Converts between the string type sent via D-Bus and AudioDeviceType. | 39 // Converts between the string type sent via D-Bus and AudioDeviceType. |
| 40 // Static so they can be used by tests. | 40 // Static so they can be used by tests. |
| 41 static std::string GetTypeString(chromeos::AudioDeviceType type); | 41 static std::string GetTypeString(chromeos::AudioDeviceType type); |
| 42 static chromeos::AudioDeviceType GetAudioType(const std::string& node_type); | 42 static chromeos::AudioDeviceType GetAudioType(const std::string& node_type); |
| 43 | 43 |
| 44 bool is_input; | 44 bool is_input; |
| 45 bool is_for_simple_usage; | |
|
DaleCurtis
2015/06/16 16:40:51
Needs a comment explaining what this means.
jennyz
2015/06/16 21:51:35
Yes, please add a comment to explain its meaning.
cychiang
2015/06/23 06:05:40
Done.
| |
| 45 uint64 id; | 46 uint64 id; |
| 46 std::string display_name; | 47 std::string display_name; |
| 47 std::string device_name; | 48 std::string device_name; |
| 48 AudioDeviceType type; | 49 AudioDeviceType type; |
| 49 uint8 priority; | 50 uint8 priority; |
| 50 bool active; | 51 bool active; |
| 51 uint64 plugged_time; | 52 uint64 plugged_time; |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 typedef std::vector<AudioDevice> AudioDeviceList; | 55 typedef std::vector<AudioDevice> AudioDeviceList; |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 71 return true; | 72 return true; |
| 72 } else { | 73 } else { |
| 73 return false; | 74 return false; |
| 74 } | 75 } |
| 75 } | 76 } |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 } // namespace chromeos | 79 } // namespace chromeos |
| 79 | 80 |
| 80 #endif // CHROMEOS_AUDIO_AUDIO_DEVICE_H_ | 81 #endif // CHROMEOS_AUDIO_AUDIO_DEVICE_H_ |
| OLD | NEW |