ModemManager::Sim Class
The Sim class. More...
- Header:
#include <ModemManagerQt/Sim> - CMake:
find_package(KF6 REQUIRED COMPONENTS ModemManagerQt)
target_link_libraries(mytarget PRIVATE KF6::ModemManagerQt) - Inherits: QObject
List of all members, including inherited members
Public Types
Public Functions
- Sim(const QString &path, QObject *parent = nullptr)
- bool active() const
- QDBusPendingReply<> changePin(const QString &oldPin, const QString &newPin)
- QString eid() const
- QStringList emergencyNumbers() const
- QDBusPendingReply<> enablePin(const QString &pin, bool enabled)
- MMSimEsimStatus esimStatus() const
- QByteArray gid1() const
- QByteArray gid2() const
- QString imsi() const
- QString operatorIdentifier() const
- QString operatorName() const
- QVariantMap preferredNetworks() const
- MMSimRemovability removability() const
- QDBusPendingReply<> sendPin(const QString &pin)
- QDBusPendingReply<> sendPuk(const QString &puk, const QString &pin)
- QDBusPendingReply<> setPreferredNetworks(QVariantMap preferredNetworks)
- void setTimeout(int timeout)
- QString simIdentifier() const
- MMSimType simType() const
- int timeout() const
- QString uni() const
Signals
- void activeChanged(bool active)
- void eidChanged(const QString &eid)
- void emergencyNumbersChanged(const QStringList &emergencyNumbers)
- void esimStatusChanged(MMSimEsimStatus esimStatus)
- void gid1Changed(const QByteArray &gid1)
- void gid2Changed(const QByteArray &gid2)
- void imsiChanged(const QString &imsi)
- void operatorIdentifierChanged(const QString &identifier)
- void operatorNameChanged(const QString &name)
- void preferredNetworksChanged(const QVariantMap &preferredNetworks)
- void removabilityChanged(MMSimRemovability removability)
- void simIdentifierChanged(const QString &identifier)
- void simTypeChanged(MMSimType simType)
Detailed Description
The SIM class handles communication with SIM, USIM, and RUIM (CDMA SIM) cards.
Member Type Documentation
Sim::List
Sim::Ptr
Member Function Documentation
[explicit] Sim::Sim(const QString &path, QObject *parent = nullptr)
bool Sim::active() const
* Returns Boolean indicating whether the SIM is currently active. * * On systems that support Multi SIM Single Standby, only one SIM may be * active at any given time, which will be the one considered primary.
* On systems that support Multi SIM Multi Standby, more than one SIM may * be active at any given time, but only one of them is considered primary.
[signal] void Sim::activeChanged(bool active)
QDBusPendingReply<> Sim::changePin(const QString &oldPin, const QString &newPin)
Change the PIN code.
oldPin A string containing the current PIN code.
newPin A string containing the new PIN code.
QString Sim::eid() const
Returns The EID of the SIM card, if any.
[signal] void Sim::eidChanged(const QString &eid)
QStringList Sim::emergencyNumbers() const
Returns List of emergency numbers programmed in the SIM card.
These numbers should be treated as numbers for emergency calls in addition to 112 and 911.
[signal] void Sim::emergencyNumbersChanged(const QStringList &emergencyNumbers)
QDBusPendingReply<> Sim::enablePin(const QString &pin, bool enabled)
Enable or disable the PIN checking.
pin A string containing the PIN code.
enabled TRUE to enable PIN checking, FALSE otherwise.
MMSimEsimStatus Sim::esimStatus() const
Returns If current SIM is ESIM then this indicates whether there is a profile or not.
[signal] void Sim::esimStatusChanged(MMSimEsimStatus esimStatus)
QByteArray Sim::gid1() const
Returns Group identifier 1evel 1.
QByteArray Sim::gid2() const
Returns Group identifier 1evel 2.
[signal] void Sim::gid1Changed(const QByteArray &gid1)
[signal] void Sim::gid2Changed(const QByteArray &gid2)
QString Sim::imsi() const
Returns The IMSI of the SIM card, if any.
[signal] void Sim::imsiChanged(const QString &imsi)
QString Sim::operatorIdentifier() const
Returns The ID of the network operator, as given by the SIM card, if known.
[signal] void Sim::operatorIdentifierChanged(const QString &identifier)
QString Sim::operatorName() const
Returns The name of the network operator, as given by the SIM card, if known.
[signal] void Sim::operatorNameChanged(const QString &name)
QVariantMap Sim::preferredNetworks() const
Returns Map of preferred networks with access technologies configured in the SIM card.
Each entry contains an operator id string key "MCCMNC" consisting of 5 or 6 digits, to an MMModemAccessTechnology mask value. If the SIM card does not support access technology storage, the mask will be set to MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN.
See also setPreferredNetworks()
[signal] void Sim::preferredNetworksChanged(const QVariantMap &preferredNetworks)
MMSimRemovability Sim::removability() const
Returns Indicates whether the current SIM is a removable SIM or not.
[signal] void Sim::removabilityChanged(MMSimRemovability removability)
QDBusPendingReply<> Sim::sendPin(const QString &pin)
Send the PIN to unlock the SIM card.
pin A string containing the PIN code.
QDBusPendingReply<> Sim::sendPuk(const QString &puk, const QString &pin)
Send the PUK and a new PIN to unlock the SIM card.
puk A string containing the PUK code.
pin A string containing the PIN code.
QDBusPendingReply<> Sim::setPreferredNetworks(QVariantMap preferredNetworks)
preferred_plmns List of preferred networks.
Stores the provided preferred network list to the SIM card. Each entry contains an operator id string ("MCCMNC") consisting of 5 or 6 digits, and an MMModemAccessTechnology mask to store to SIM card if supported.
This method removes any pre-existing entries of the preferred network list. Note that even if this operation fails, the preferred network list on the SIM card may have changed.
See also preferredNetworks()
void Sim::setTimeout(int timeout)
Sets the timeout in milliseconds for all async method DBus calls. -1 means the default DBus timeout (usually 25 seconds).
See also timeout()
QString Sim::simIdentifier() const
Returns The ICCID of the SIM card.
This may be available before the PIN has been entered depending on the device itself.
[signal] void Sim::simIdentifierChanged(const QString &identifier)
MMSimType Sim::simType() const
Returns Indicates whether the current primary SIM is a ESIM or a physical SIM.
[signal] void Sim::simTypeChanged(MMSimType simType)
int Sim::timeout() const
Returns the current value of the DBus timeout in milliseconds. -1 means the default DBus timeout (usually 25 seconds).
See also setTimeout()