Music Hub
..
A session-wide music playback service
call_monitor.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2014 Canonical Ltd
3
*
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License version 3 as
6
* 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
* Author: Justin McPherson <justin.mcpherson@canonical.com>
17
*/
18
19
20
#ifndef CORE_UBUNTU_MEDIA_TELEPHONY_CALL_MONITOR_H_
21
#define CORE_UBUNTU_MEDIA_TELEPHONY_CALL_MONITOR_H_
22
23
#include <core/signal.h>
24
25
#include <functional>
26
#include <memory>
27
28
namespace
core
29
{
30
namespace
ubuntu
31
{
32
namespace
media
33
{
34
namespace
telephony
35
{
36
// CallMonitor models the ability to observe and react
37
// to changes of the overall call state of the system.
38
struct
CallMonitor
39
{
40
// Save us some typing.
41
typedef
std::shared_ptr<CallMonitor>
Ptr
;
42
43
// All known call states
44
enum class
State
45
{
46
// No current call.
47
OffHook
,
48
// Call in progress.
49
OnHook
50
};
51
52
CallMonitor
() =
default
;
53
virtual
~CallMonitor
() =
default
;
54
55
// Emitted whenever the current call state of the system changes.
56
virtual
const
core::Signal<State>&
on_call_state_changed
()
const
= 0;
57
};
58
59
// Returns a platform default implementation of CallMonitor.
60
CallMonitor::Ptr
make_platform_default_call_monitor
();
61
}
62
}
63
}
64
}
65
66
#endif // CORE_UBUNTU_MEDIA_TELEPHONY_CALL_MONITOR_H_
core::ubuntu::media::telephony::CallMonitor::CallMonitor
CallMonitor()=default
core
Definition:
player.h:33
core::ubuntu::media::telephony::CallMonitor
Definition:
call_monitor.h:38
core::ubuntu::media::telephony::CallMonitor::on_call_state_changed
virtual const core::Signal< State > & on_call_state_changed() const =0
core::ubuntu::media::telephony::make_platform_default_call_monitor
CallMonitor::Ptr make_platform_default_call_monitor()
core::ubuntu::media::telephony::CallMonitor::State::OffHook
core::ubuntu::media
Definition:
player.h:37
core::ubuntu::media::telephony::CallMonitor::Ptr
std::shared_ptr< CallMonitor > Ptr
Definition:
call_monitor.h:41
core::ubuntu::media::telephony::CallMonitor::~CallMonitor
virtual ~CallMonitor()=default
core::ubuntu::media::telephony::CallMonitor::State
State
Definition:
call_monitor.h:44
core::ubuntu::media::telephony::CallMonitor::State::OnHook
src
core
media
telephony
call_monitor.h
Generated on Mon Apr 27 2015 23:48:55 for Music Hub by
1.8.9.1