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

Unified Diff: chromeos/dbus/audio_node.cc

Issue 13863007: Integrate audio dbus api: GetNodes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months 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/dbus/audio_node.h ('k') | chromeos/dbus/cras_audio_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/audio_node.cc
diff --git a/chromeos/dbus/audio_node.cc b/chromeos/dbus/audio_node.cc
new file mode 100644
index 0000000000000000000000000000000000000000..99c79687e87c61a978843656f4e4f45ff7c82f67
--- /dev/null
+++ b/chromeos/dbus/audio_node.cc
@@ -0,0 +1,42 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chromeos/dbus/audio_node.h"
+
+#include "base/format_macros.h"
+#include "base/stringprintf.h"
+
+namespace chromeos {
+
+AudioNode::AudioNode()
+ : is_input(false),
+ id(0),
+ active(false) {
+}
+
+std::string AudioNode::ToString() const {
+ std::string result;
+ base::StringAppendF(&result,
+ "is_input = %s ",
+ is_input ? "true" : "false");
+ base::StringAppendF(&result,
+ "id = %" PRIu64" ",
stevenjb 2013/04/10 20:27:13 nit: no ' ' before PRIu64
jennyz 2013/04/10 20:56:28 Done.
+ id);
+ base::StringAppendF(&result,
+ "device_name = %s ",
+ device_name.c_str());
+ base::StringAppendF(&result,
+ "type = %s ",
+ type.c_str());
+ base::StringAppendF(&result,
+ "name = %s ",
+ name.c_str());
+ base::StringAppendF(&result,
+ "active = %s ",
+ active ? "true" : "false");
+
+ return result;
+}
+
+} // namespace chromeos
« no previous file with comments | « chromeos/dbus/audio_node.h ('k') | chromeos/dbus/cras_audio_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698