blob: da0ff13d0e3c1a6716bcbe22bad2980b3c68536b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// 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/volume_state.h"
#include "base/format_macros.h"
#include "base/stringprintf.h"
namespace chromeos {
VolumeState::VolumeState()
: output_volume(0),
output_mute(false),
input_gain(0),
input_mute(false) {
}
std::string VolumeState::ToString() const {
std::string result;
base::StringAppendF(&result,
"output_volume = %d ",
output_volume);
base::StringAppendF(&result,
"output_mute = %s ",
output_mute ? "true" : "false");
base::StringAppendF(&result,
"output_mute = %s ",
output_mute ? "true" : "false");
base::StringAppendF(&result,
"input_gain = %d ",
input_gain);
base::StringAppendF(&result,
"input_mute = %s ",
input_mute ? "true" : "false");
return result;
}
} // namespace chromeos
|