ModemManagerQt

modemcdma.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_MODEMCDMA_H
11#define MODEMMANAGERQT_MODEMCDMA_H
12
13#include <modemmanagerqt_export.h>
14
15#include <QDBusPendingReply>
16#include <QObject>
17#include <QSharedPointer>
18#include <QVariant>
19
20#include "generictypes.h"
21#include "interface.h"
22
23namespace ModemManager
24{
25class ModemCdmaPrivate;
26
27/**
28 * @brief The ModemCdma class
29 *
30 * This class provides access to specific actions that may be performed in modems with CDMA capabilities.
31 */
32class MODEMMANAGERQT_EXPORT ModemCdma : public Interface
33{
34 Q_OBJECT
35 Q_DECLARE_PRIVATE(ModemCdma)
36public:
38 typedef QList<Ptr> List;
39
40 explicit ModemCdma(const QString &path, QObject *parent = nullptr);
41 ~ModemCdma() override;
42
43 /**
44 * Provisions the modem for use with a given carrier using the modem's
45 * Over-The-Air (OTA) activation functionality, if any.
46 *
47 * Some modems will reboot after this call is made.
48 *
49 * @param carrierCode name of carrier, or carrier-specific code
50 */
51 QDBusPendingReply<void> activate(const QString &carrierCode);
52
53 /**
54 * Sets the modem provisioning data directly, without contacting the carrier over the air.
55 *
56 * Some modems will reboot after this call is made.
57 *
58 * @param properties QVariantMap consisting of:
59 *
60 * "spc": The Service Programming Code, given as a string of exactly 6 digit characters. Mandatory parameter.
61 * "sid": The System Identification Number, given as a 16-bit unsigned integer (signature "q"). Mandatory parameter.
62 * "mdn": The Mobile Directory Number, given as a string of maximum 15 characters. Mandatory parameter.
63 * "min": The Mobile Identification Number, given as a string of maximum 15 characters. Mandatory parameter.
64 * "mn-ha-key": The MN-HA key, given as a string of maximum 16 characters.
65 * "mn-aaa-key": The MN-AAA key, given as a string of maximum 16 characters.
66 * "prl": The Preferred Roaming List, given as an array of maximum 16384 bytes.
67 */
68 QDBusPendingReply<void> activateManual(const QVariantMap &properties);
69
70 /**
71 * @return a MMModemCdmaActivationState value specifying the state of the activation in the 3GPP2 network.
72 */
73 MMModemCdmaActivationState activationState() const;
74
75 /**
76 * @return the modem's Mobile Equipment Identifier.
77 */
78 QString meid() const;
79
80 /**
81 * @return the modem's Electronic Serial Number (superseded by MEID but still used by older devices).
82 */
83 QString esn() const;
84
85 /**
86 * @return the System Identifier of the serving CDMA 1x network, if known, and if the modem is registered with a CDMA 1x network.
87 * @see http://ifast.org or the mobile broadband provider database for mappings of SIDs to network providers.
88 */
89 uint sid() const;
90
91 /**
92 * @return the Network Identifier of the serving CDMA 1x network, if known, and if the modem is registered with a CDMA 1x network.
93 */
94 uint nid() const;
95
96 /**
97 * @return a MMModemCdmaRegistrationState value specifying the CDMA 1x registration state.
98 */
99 MMModemCdmaRegistrationState cdma1xRegistrationState() const;
100
101 /**
102 * @return a MMModemCdmaRegistrationState value specifying the EVDO registration state.
103 */
104 MMModemCdmaRegistrationState evdoRegistrationState() const;
105
106 /**
107 * Sets the timeout in milliseconds for all async method DBus calls.
108 * -1 means the default DBus timeout (usually 25 seconds).
109 */
110 void setTimeout(int timeout);
111
112 /**
113 * Returns the current value of the DBus timeout in milliseconds.
114 * -1 means the default DBus timeout (usually 25 seconds).
115 */
116 int timeout() const;
117
118Q_SIGNALS:
119 /**
120 * This signal is emitted when the activation info this network changes
121 *
122 * @param state current activation state, given as a MMModemCdmaActivationState.
123 * @param error carrier-specific error code, given as a MMCdmaActivationError.
124 * @param status_changes properties that have changed as a result of this activation state change, including "mdn" and "min".
125 * The map may be empty if the changed properties are unknown.
126 */
127 void activationStateChanged(MMModemCdmaActivationState state, MMCdmaActivationError error, const QVariantMap &status_changes);
128 void meidChanged(const QString &meid);
129 void esnChanged(const QString &esn);
130 void sidChanged(uint sid);
131 void nidChanged(uint nid);
132 void cdma1xRegistrationStateChanged(MMModemCdmaRegistrationState cdma1xRegistrationState);
133 void evdoRegistrationStateChanged(MMModemCdmaRegistrationState evdoRegistrationState);
134};
135} // namespace ModemManager
136
137#endif
The ModemCdma class.
Definition modemcdma.h:33
void activationStateChanged(MMModemCdmaActivationState state, MMCdmaActivationError error, const QVariantMap &status_changes)
This signal is emitted when the activation info this network changes.
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.