Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QSimInfo Class Reference
[QtTelephonyModule]

The QSimInfo class provides information about a SIM's identity. More...

    #include <QSimInfo>

Inherits QCommInterface.

Inherited by QModemSimInfo.

Properties

Public Functions

Signals

Protected Functions

Additional Inherited Members


Detailed Description

The QSimInfo class provides information about a SIM's identity.

The identity of the SIM can be retrieved with the identity() method. If the identity is not yet known, identity() will return an empty string. The inserted() and removed() signals can be used to track SIM's as they are inserted and removed.

At system start up and just after a modem reset, the SIM identity may not be available immediately even if a SIM is physically present in the modem. Client applications should monitor the inserted() signal to be notified when the SIM identity has been positively determined.

If the modem eventually determines that there is no SIM present at all, the notInserted() signal will be emitted. Note that some modems cannot tell the difference between a missing SIM and a SIM which is not yet ready for use, so the notInserted() signal may not be reliable. It is the responsibility of modem vendor plug-ins to correctly implement the notInserted() feature.


Property Documentation

identity : const QString

This property holds the identity of the SIM.

Access functions:

insertedTime : const QDateTime

This property holds the date and time of the last time the SIM was detected as inserted.

Access functions:


Member Function Documentation

QSimInfo::QSimInfo ( const QString & service = QString(), QObject * parent = 0, QCommInterface::Mode mode = Client )

Construct a new SIM information object for service and attach it to parent. The object will be created in client mode if mode is Client, or server mode otherwise.

If service is empty, this class will use the first available service that supports SIM information. If there is more than one service that supports SIM information, the caller should enumerate them with QCommServiceManager::supports() and create separate QSimInfo objects for each.

See also QCommServiceManager::supports().

QSimInfo::~QSimInfo ()

Destroy this SIM information object.

void QSimInfo::inserted ()   [signal]

Signal that is emitted when a new SIM is inserted into the phone. The identity() function will return the identity of the SIM.

See also identity(), insertedTime(), and removed().

void QSimInfo::notInserted ()   [signal]

Signal that is emitted when the modem detects that there is no SIM inserted because the AT+CIMI command returned an error return code of 10. An inserted() signal may be received after this signal if a SIM is inserted later.

Note that it is possible for identity() to return an empty string during initialization even if there is a SIM inserted, so it is not a reliable indicator of a missing SIM. The notInserted() signal is more reliable.

See also identity() and inserted().

void QSimInfo::removed ()   [signal]

Signal that is emitted when a SIM is removed from the phone. The identity() function will return an empty string.

See also identity(), insertedTime(), and inserted().

void QSimInfo::setIdentity ( const QString & identity )   [protected]

Sets the SIM identity and emit inserted() or removed() signals as appropriate. This function is intended for use by server-side implementations of the QSimInfo interface.

See also identity(), inserted(), and removed().


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3