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
3 // found in the LICENSE file.
5 #include "chromeos/dbus/audio_node.h"
7 #include "base/format_macros.h"
8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/stringprintf.h"
13 AudioNode::AudioNode()
20 AudioNode::AudioNode(bool is_input
,
22 std::string device_name
,
29 device_name(device_name
),
33 plugged_time(plugged_time
) {
36 std::string
AudioNode::ToString() const {
38 base::StringAppendF(&result
,
40 is_input
? "true" : "false");
41 base::StringAppendF(&result
,
42 "id = 0x%" PRIx64
" ",
44 base::StringAppendF(&result
,
47 base::StringAppendF(&result
,
50 base::StringAppendF(&result
,
53 base::StringAppendF(&result
,
55 active
? "true" : "false");
56 base::StringAppendF(&result
,
58 base::Uint64ToString(plugged_time
).c_str());
63 } // namespace chromeos