Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

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

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

Public Slots

  • virtual void readBinary ( const QString & reqid, const QString & fileid, int pos, int len )
  • virtual void readRecord ( const QString & reqid, const QString & fileid, int recno, int recordSize = -1 )
  • virtual void requestFileInfo ( const QString & reqid, const QString & fileid )
  • virtual void writeBinary ( const QString & reqid, const QString & fileid, int pos, const QByteArray & data )
  • virtual void writeRecord ( const QString & reqid, const QString & fileid, int recno, const QByteArray & data )
  • 1 public slot inherited from QObject

Signals

  • void error ( const QString & reqid, QTelephony::SimFileError err )
  • void fileInfo ( const QString & reqid, int size, int recordSize, QTelephony::SimFileType type )
  • void readDone ( const QString & reqid, const QByteArray & data, int pos )
  • void writeDone ( const QString & reqid, int pos )

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().

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 94
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 42
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 6
Page suivante

Le Qt Quarterly au hasard

Logo

Bibliothèques et plug-ins

Qt Quarterly est la revue trimestrielle proposée par Nokia et à destination des développeurs Qt. Ces articles d'une grande qualité technique sont rédigés par des experts Qt. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web