Detailed Description
The QBinarySimFile class provides an interface to access binary files on a SIM.
This class is typically used to access auxiliary information on a SIM such as icons, extended address book attributes, MMS settings, etc.
This class can only be used on binary SIM files. For record-based SIM files, use QRecordBasedSimFile instead.
Binary SIM files are usually limited in size to 64 kbytes. Attempting to read beyond this boundary will result in an error. Read requests are also typically limited to no more than 256 bytes at a time.
Unlike regular files, it isn't possible to supply a large buffer size and ask the SIM to read as many bytes as possible. It is necessary to explicitly state the exact number of bytes required, even if short. Most binary files contain fixed-sized header information that can be used to determine the size and position of future reads.
Consult 3GPP TS 11.11 and 3GPP TS 51.011 for more information on the format of individual SIM files.
See also QRecordBasedSimFile and QSimFiles.
Member Function Documentation
QBinarySimFile::QBinarySimFile ( const QString & fileid, const QString & service = QString(), QObject * parent = 0 )
Create a binary SIM file access object for fileid and attach it to parent. The service parameter indicates the telephony service to use to access the file, or an empty string to use the default service.
The fileid should be the complete hexadecimal path to the file on the SIM. For example, the EFimg file is numbered 4F20 underneath the DFgraphics directory (5F50), which is in turn underneath the DFtelecom directory (7F10). Therefore, fileid should be 7F105F504F20.
QBinarySimFile::~QBinarySimFile ()
Destroy this binary SIM file access object.
Signal that is emitted if an error err occurred while reading or writing this binary file.
See also read() and write().
void QBinarySimFile::fileSize ( int size ) [signal]
Signal that is emitted when the size of this binary file is returned in response to a requestFileSize() operation.
See also requestFileSize().
void QBinarySimFile::read ( int pos, int len )
Request that len bytes be read from this binary file at position pos. The data will be returned in a readDone() signal.
See also readDone() and write().
void QBinarySimFile::readDone ( const QByteArray & data, int pos ) [signal]
Signal that is emitted when a read from position pos of this binary file completes. The data parameter contains the data that was read from the file.
See also read().
void QBinarySimFile::requestFileSize ()
Request the current size of this binary SIM file. The value will be returned in a fileSize() signal.
See also fileSize().
void QBinarySimFile::write ( int pos, const char * data, int len )
Write len bytes of data to position pos in this binary file. The writeDone() signal will be emitted once the write completes.
See also writeDone() and read().
void QBinarySimFile::write ( int pos, const QByteArray & data )
This is an overloaded member function, provided for convenience.
Write data to position pos in this binary file. The writeDone() signal will be emitted once the write completes.
See also writeDone() and read().
void QBinarySimFile::writeDone ( int pos ) [signal]
Signal that is emitted when a write to position pos of this binary file completes.
See also write().