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
* Copyright © 2022 UBports Foundation.
4
*
5
* Contact: Alberto Mardegan <mardy@users.sourceforge.net>
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU Lesser General Public License version 3 as
9
* published by the Free Software Foundation.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*
19
* Author: Justin McPherson <justin.mcpherson@canonical.com>
20
*/
21
22
23
#ifndef LOMIRI_MEDIAHUBSERVICE_TELEPHONY_CALL_MONITOR_H
24
#define LOMIRI_MEDIAHUBSERVICE_TELEPHONY_CALL_MONITOR_H
25
26
#include <QObject>
27
#include <QScopedPointer>
28
29
namespace
lomiri
30
{
31
namespace
MediaHubService
32
{
33
namespace
telephony
34
{
35
// CallMonitor models the ability to observe and react
36
// to changes of the overall call state of the system.
37
class
CallMonitorPrivate;
38
class
CallMonitor
:
public
QObject
39
{
40
Q_OBJECT
41
42
public
:
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
(
QObject
*parent =
nullptr
);
53
virtual
~CallMonitor
();
54
55
State
callState
()
const
;
56
57
Q_SIGNALS:
58
void
callStateChanged
();
59
60
private
:
61
QScopedPointer<CallMonitorPrivate> d_ptr;
62
Q_DECLARE_PRIVATE(
CallMonitor
)
63
};
64
65
}
66
}
67
}
68
69
#endif // LOMIRI_MEDIAHUBSERVICE_TELEPHONY_CALL_MONITOR_H
QObject
lomiri::MediaHubService::telephony::CallMonitor
Definition:
call_monitor.h:38
lomiri::MediaHubService::telephony::CallMonitor::callState
State callState() const
Definition:
call_monitor.cpp:185
lomiri::MediaHubService::telephony::CallMonitor::State
State
Definition:
call_monitor.h:44
lomiri::MediaHubService::telephony::CallMonitor::~CallMonitor
virtual ~CallMonitor()
lomiri::MediaHubService::telephony::CallMonitor::CallMonitor
CallMonitor(QObject *parent=nullptr)
Definition:
call_monitor.cpp:177
lomiri::MediaHubService::telephony::CallMonitor::callStateChanged
void callStateChanged()
lomiri::MediaHubService::telephony::CallMonitor::State::OnHook
@ OnHook
lomiri::MediaHubService::telephony::CallMonitor::State::OffHook
@ OffHook
lomiri
Definition:
dbus_utils.h:24
src
service
telephony
call_monitor.h
Generated on Fri Dec 16 2022 11:18:10 for Music Hub by
1.8.17