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

QSimFiles Class Reference
[QtTelephonyModule]

The QSimFiles class provides an interface for reading and writing the files on a SIM. More...

    #include <QSimFiles>

Inherits QCommInterface.

Inherited by QModemSimFiles.

Public Functions

Public Slots

Signals

Additional Inherited Members


Detailed Description

The QSimFiles class provides an interface for reading and writing the files on a SIM.

Client applications should use QBinarySimFile and QRecordBasedSimFile to access SIM files as they provide a cleaner interface. The QSimFiles class is mainly intended for use by service implementations, which inherit from QSimFiles and override the methods described below. QModemSimFiles is the standard implementation of the service for AT-based modems.

See also QBinarySimFile, QRecordBasedSimFile, and QModemSimFiles.


Member Function Documentation

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

Construct a new SIM file access 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 file access. If there is more than one service that supports SIM file access, the caller should enumerate them with QCommServiceManager::supports() and create separate QSimFiles objects for each.

Normally this constructor would not be used by client applications. Client applications should use QBinarySimFile and QRecordBasedSimFile. Server applications should inherit from the QSimFiles class and call this constructor with mode set to QCommInterface::Server.

See also QCommServiceManager::supports().

QSimFiles::~QSimFiles ()

Destroy this SIM file access object.

void QSimFiles::error ( const QString & reqid, QTelephony::SimFileError err )   [signal]

Signal that is emitted when the request reqid fails with an error code err.

See also readBinary(), writeBinary(), readRecord(), and writeRecord().

void QSimFiles::fileInfo ( const QString & reqid, int size, int recordSize, QTelephony::SimFileType type )   [signal]

Signal that is emitted when the file information request reqid was successful. The size of the file in bytes is size. If the file is record-based, then recordSize will be the size of the individual records. If the file is binary-based, then recordSize will be 1. The type parameter specifies the actual file type.

See also requestFileInfo().

void QSimFiles::readBinary ( const QString & reqid, const QString & fileid, int pos, int len )   [virtual slot]

Read len bytes from position pos of the binary file fileid. The reqid parameter indicates a caller-assigned request identifier.

Once the read completes, the readDone() signal will be emitted with the same reqid. If the request fails, the error() signal will be emitted.

Client applications should use QBinarySimFile::read() instead.

See also readDone() and writeBinary().

void QSimFiles::readDone ( const QString & reqid, const QByteArray & data, int pos )   [signal]

Signal that is emitted when the read request reqid was successful in reading data from pos in the file.

See also readBinary() and readRecord().

void QSimFiles::readRecord ( const QString & reqid, const QString & fileid, int recno, int recordSize = -1 )   [virtual slot]

Read record recno the record-based file fileid. The reqid parameter indicates a caller-assigned request identifier.

Once the read completes, the readDone() signal will be emitted with the same reqid. If the request fails, the error() signal will be emitted.

If recordSize is not -1, it indicates that the record size is already known. Otherwise the service will determine the record size for itself.

Client applications should use QRecordBasedSimFile::read() instead.

See also readDone() and writeRecord().

void QSimFiles::requestFileInfo ( const QString & reqid, const QString & fileid )   [virtual slot]

Request the current file information for fileid. The reqid parameter indicates a caller-assigned request identifier.

Once the request completes, the fileInfo() signal will be emitted when the same reqid. If the request fails, the error() signal will be emitted.

Client applications should use QBinarySimFile::requestFileSize() or QRecordBasedSimFile::requestFileInfo() instead.

See also fileInfo().

void QSimFiles::writeBinary ( const QString & reqid, const QString & fileid, int pos, const QByteArray & data )   [virtual slot]

Write data at position pos of the binary file fileid. The reqid parameter indicates a caller-assigned request identifier.

Once the write completes, the writeDone() signal will be emitted with the same reqid. If the request fails, the error() signal will be emitted.

Client applications should use QBinarySimFile::write() instead.

See also writeDone() and readBinary().

void QSimFiles::writeDone ( const QString & reqid, int pos )   [signal]

Signal that is emitted when the write request reqid successfully wrote to position pos of the file.

See also writeBinary() and writeRecord().

void QSimFiles::writeRecord ( const QString & reqid, const QString & fileid, int recno, const QByteArray & data )   [virtual slot]

Write data at position recno of the record-based file fileid. The reqid parameter indicates a caller-assigned request identifier.

Once the write completes, the writeDone() signal will be emitted with the same reqid. If the request fails, the error() signal will be emitted.

Client applications should use QRecordBasedSimFile::write() instead.

See also writeDone() and readRecord().


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3