ModemManagerQt

modemvoice.h
1/*
2 SPDX-FileCopyrightText: 2018 Aleksander Morgado <aleksander@aleksander.es>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#ifndef MODEMMANAGERQT_MODEMVOICE_H
8#define MODEMMANAGERQT_MODEMVOICE_H
9
10#include <modemmanagerqt_export.h>
11
12#include <QObject>
13#include <QSharedPointer>
14
15#include "call.h"
16#include "generictypes.h"
17#include "interface.h"
18
19namespace ModemManager
20{
21class ModemVoicePrivate;
22
23/**
24 * @brief The ModemVoice class
25 *
26 * The Voice interface handles call related actions
27 */
28class MODEMMANAGERQT_EXPORT ModemVoice : public Interface
29{
30 Q_OBJECT
31 Q_DECLARE_PRIVATE(ModemVoice)
32
33public:
35 typedef QList<Ptr> List;
36
37 explicit ModemVoice(const QString &path, QObject *parent = nullptr);
38 ~ModemVoice() override;
39
40 /**
41 * Retrieve all calls.
42 *
43 * This method should only be used once and subsequent information retrieved
44 * either by listening for the callAdded() signal, or by
45 * querying the specific call object of interest using findCall()
46 */
47 ModemManager::Call::List calls() const;
48
49 /**
50 * Creates a new call object.
51 * @param number Number property
52 */
53 QDBusPendingReply<QDBusObjectPath> createCall(const QString &number);
54
55 /**
56 * Creates a new call object.
57 * @param call QVariantMap containing call properties
58 * The 'number' property is mandatory.
59 */
60 QDBusPendingReply<QDBusObjectPath> createCall(const QVariantMap &call);
61
62 /**
63 * Delete a call.
64 *
65 * @param uni path to the Call object
66 */
67 QDBusPendingReply<void> deleteCall(const QString &uni);
68
69 /**
70 * @param uni path to the Call object
71 * @return pointer to the found Call (may be null if not found)
72 */
73 ModemManager::Call::Ptr findCall(const QString &uni);
74
75 /**
76 * Sets the timeout in milliseconds for all async method DBus calls.
77 * -1 means the default DBus timeout (usually 25 seconds).
78 */
79 void setTimeout(int timeout);
80
81 /**
82 * Returns the current value of the DBus timeout in milliseconds.
83 * -1 means the default DBus timeout (usually 25 seconds).
84 */
85 int timeout() const;
86
87Q_SIGNALS:
88 /**
89 * Emitted when an new Call is detected.
90 *
91 * @param uni path to the Call object
92 */
93 void callAdded(const QString &uni);
94
95 /**
96 * Emitted when a call has been deleted.
97 * @param uni path to the Call object
98 */
99 void callDeleted(const QString &uni);
100};
101
102} // namespace ModemManager
103
104#endif
The ModemVoice class.
Definition modemvoice.h:29
void callAdded(const QString &uni)
Emitted when an new Call is detected.
void callDeleted(const QString &uni)
Emitted when a call has been deleted.
This namespace allows to query the underlying system to discover the available modem interfaces respo...
Definition bearer.cpp:20
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:51 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.