Music Hub ..
A session-wide music playback service
 
Loading...
Searching...
No Matches
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
29namespace lomiri
30{
31namespace MediaHubService
32{
33namespace telephony
34{
35// CallMonitor models the ability to observe and react
36// to changes of the overall call state of the system.
37class CallMonitorPrivate;
38class CallMonitor: public QObject
39{
40 Q_OBJECT
41
42public:
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
57Q_SIGNALS:
59
60private:
61 QScopedPointer<CallMonitorPrivate> d_ptr;
62 Q_DECLARE_PRIVATE(CallMonitor)
63};
64
65}
66}
67}
68
69#endif // LOMIRI_MEDIAHUBSERVICE_TELEPHONY_CALL_MONITOR_H