Music Hub
..
A session-wide music playback service
ostream_reporter.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2014 Canonical Ltd.
3
*
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License version 3,
6
* as published by the Free Software Foundation.
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
12
*
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*
16
* Authored by: Thomas Voß <thomas.voss@canonical.com>
17
*/
18
#ifndef CORE_UBUNTU_MEDIA_AUDIO_OSTREAM_REPORTER_H_
19
#define CORE_UBUNTU_MEDIA_AUDIO_OSTREAM_REPORTER_H_
20
21
#include <
core/media/audio/pulse_audio_output_observer.h
>
22
23
#include <iosfwd>
24
25
namespace
core
26
{
27
namespace
ubuntu
28
{
29
namespace
media
30
{
31
namespace
audio
32
{
33
// A PulseAudioOutputObserver::Reporter implementation printing events to
34
// the configured output stream.
35
class
OStreamReporter
:
public
PulseAudioOutputObserver::Reporter
36
{
37
public
:
38
// Constructs a new reporter instance, outputting events to the given stream.
39
OStreamReporter
(std::ostream& out = std::cout);
40
41
void
connected_to_pulse_audio
()
override
;
42
void
query_for_default_sink_failed
()
override
;
43
void
query_for_default_sink_finished
(
const
std::string& sink_name)
override
;
44
void
query_for_sink_info_finished
(
const
std::string& name, std::uint32_t index,
const
std::set<Port>& known_ports)
override
;
45
void
sink_event_with_index
(std::uint32_t index)
override
;
46
47
private
:
48
std::ostream& out;
49
};
50
}
51
}
52
}
53
}
54
55
#endif // CORE_UBUNTU_MEDIA_AUDIO_OUTPUT_OSTREAM_REPORTER_H_
core::ubuntu::media::audio::OStreamReporter::query_for_default_sink_failed
void query_for_default_sink_failed() override
Definition:
ostream_reporter.cpp:32
core
Definition:
player.h:33
core::ubuntu::media::audio::OStreamReporter::query_for_sink_info_finished
void query_for_sink_info_finished(const std::string &name, std::uint32_t index, const std::set< Port > &known_ports) override
Definition:
ostream_reporter.cpp:42
core::ubuntu::media
Definition:
player.h:37
core::ubuntu::media::audio::OStreamReporter::sink_event_with_index
void sink_event_with_index(std::uint32_t index) override
Definition:
ostream_reporter.cpp:51
core::ubuntu::media::audio
Definition:
ostream_reporter.h:31
pulse_audio_output_observer.h
core::ubuntu::media::audio::OStreamReporter::OStreamReporter
OStreamReporter(std::ostream &out=std::cout)
Definition:
ostream_reporter.cpp:23
core::ubuntu::media::audio::OStreamReporter::query_for_default_sink_finished
void query_for_default_sink_finished(const std::string &sink_name) override
Definition:
ostream_reporter.cpp:37
core::ubuntu::media::audio::PulseAudioOutputObserver::Reporter
Definition:
pulse_audio_output_observer.h:47
core::ubuntu::media::audio::OStreamReporter
Definition:
ostream_reporter.h:35
core::ubuntu::media::audio::OStreamReporter::connected_to_pulse_audio
void connected_to_pulse_audio() override
Definition:
ostream_reporter.cpp:27
src
core
media
audio
ostream_reporter.h
Generated on Wed May 27 2015 18:52:55 for Music Hub by
1.8.9.1