Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3548)

Unified Diff: chromeos/dbus/audio_node.h

Issue 2510093003: Handle audio node stable device ID change (Closed)
Patch Set: fix a typo Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/audio/cras_audio_handler_unittest.cc ('k') | chromeos/dbus/audio_node.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/audio_node.h
diff --git a/chromeos/dbus/audio_node.h b/chromeos/dbus/audio_node.h
index d6f90e523cb6eded89b8a66f715970435dac4735..7d01001b66981bb0264c8738ffd47b21a2a91d2f 100644
--- a/chromeos/dbus/audio_node.h
+++ b/chromeos/dbus/audio_node.h
@@ -16,21 +16,25 @@ namespace chromeos {
// Structure to hold AudioNode data received from cras.
struct CHROMEOS_EXPORT AudioNode {
- bool is_input;
- uint64_t id;
- uint64_t stable_device_id;
+ bool is_input = false;
+ uint64_t id = 0;
+ bool has_v2_stable_device_id = false;
+ uint64_t stable_device_id_v1 = 0;
+ uint64_t stable_device_id_v2 = 0;
std::string device_name;
std::string type;
std::string name;
std::string mic_positions;
- bool active;
+ bool active = false;
// Time that the node was plugged in.
- uint64_t plugged_time;
+ uint64_t plugged_time = 0;
AudioNode();
AudioNode(bool is_input,
uint64_t id,
- uint64_t stable_device_id,
+ bool has_v2_stable_device_id,
+ uint64_t stable_device_id_v1,
+ uint64_t stable_device_id_v2,
std::string device_name,
std::string type,
std::string name,
@@ -38,7 +42,10 @@ struct CHROMEOS_EXPORT AudioNode {
uint64_t plugged_time);
AudioNode(const AudioNode& other);
~AudioNode();
+
std::string ToString() const;
+ int StableDeviceIdVersion() const;
+ uint64_t StableDeviceId() const;
};
typedef std::vector<AudioNode> AudioNodeList;
« no previous file with comments | « chromeos/audio/cras_audio_handler_unittest.cc ('k') | chromeos/dbus/audio_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698