ModemManagerQt

modem3gppussd.h
1/*
2 SPDX-FileCopyrightText: 2008, 2011 Will Stephenson <wstephenson@kde.org>
3 SPDX-FileCopyrightText: 2010 Lamarque Souza <lamarque@kde.org>
4 SPDX-FileCopyrightText: 2013 Lukas Tinkl <ltinkl@redhat.com>
5 SPDX-FileCopyrightText: 2013-2015 Jan Grulich <jgrulich@redhat.com>
6
7 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
8*/
9
10#ifndef MODEMMANAGERQT_MODEM3GPPUSSD_H
11#define MODEMMANAGERQT_MODEM3GPPUSSD_H
12
13#include <modemmanagerqt_export.h>
14
15#include <QDBusPendingReply>
16#include <QObject>
17#include <QSharedPointer>
18
19#include "generictypes.h"
20#include "interface.h"
21
22namespace ModemManager
23{
24class Modem3gppUssdPrivate;
25
26/**
27 * @brief The Modem3gppUssd class
28 *
29 * This class provides access to actions based on the USSD protocol.
30 */
31class MODEMMANAGERQT_EXPORT Modem3gppUssd : public Interface
32{
34 Q_DECLARE_PRIVATE(Modem3gppUssd)
35
36public:
38 typedef QList<Ptr> List;
39
40 explicit Modem3gppUssd(const QString &path, QObject *parent = nullptr);
41 ~Modem3gppUssd() override;
42
43 /**
44 * Sends a USSD @p command string to the network initiating a USSD session.
45 *
46 * When the request is handled by the network, the method returns the
47 * response or an appropriate error. The network may be awaiting further
48 * response from the ME after returning from this method and no new command
49 * can be initiated until this one is cancelled or ended.
50 */
52
53 /**
54 * Respond to a USSD request that is either initiated by the mobile network,
55 * or that is awaiting further input after initiate() was called.
56 */
58
59 /**
60 * Cancel an ongoing USSD session, either mobile or network initiated.
61 */
62 void cancel();
63
64 /**
65 * @return the state of any ongoing USSD session
66 */
67 MMModem3gppUssdSessionState state() const;
68
69 /**
70 * @return any network-initiated request to which no USSD response is required
71 *
72 * When no USSD session is active, or when there is no network- initiated request, this property will be an empty string.
73 */
75
76 /**
77 * @return any pending network-initiated request for a response. Client
78 * should call respond() with the appropriate response to this request.
79 *
80 * When no USSD session is active, or when there is no pending
81 * network-initiated request, this property will be an empty string.
82 */
83 QString networkRequest() const;
84
85 /**
86 * Sets the timeout in milliseconds for all async method DBus calls.
87 * -1 means the default DBus timeout (usually 25 seconds).
88 */
89 void setTimeout(int timeout);
90
91 /**
92 * Returns the current value of the DBus timeout in milliseconds.
93 * -1 means the default DBus timeout (usually 25 seconds).
94 */
95 int timeout() const;
96
98 void stateChanged(MMModem3gppUssdSessionState state);
99 void networkNotificationChanged(const QString &networkNotification);
100 void networkRequestChanged(const QString &networkRequest);
101};
102
103} // namespace ModemManager
104
105#endif
int timeout() const
Returns the current value of the DBus timeout in milliseconds.
QDBusPendingReply< QString > initiate(const QString &command)
Sends a USSD command string to the network initiating a USSD session.
MMModem3gppUssdSessionState state() const
QDBusPendingReply< QString > respond(const QString &response)
Respond to a USSD request that is either initiated by the mobile network, or that is awaiting further...
void setTimeout(int timeout)
Sets the timeout in milliseconds for all async method DBus calls.
QString networkNotification() const
void cancel()
Cancel an ongoing USSD session, either mobile or network initiated.
This namespace allows to query the underlying system to discover the available modem interfaces respo...
Definition bearer.cpp:20
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:54:23 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.