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  · 

QWapAccount Class Reference
[QtBaseModule]

The QWapAccount class provides a wrapper around configuration files for WAP accounts. More...

    #include <QWapAccount>

Public Types

Public Functions


Detailed Description

The QWapAccount class provides a wrapper around configuration files for WAP accounts.

Qt Extended WAP account configurations are saved under $HOME/Applications/Network/wap and can either be accessed via QSettings or QWapAccount. However QWapAccount should be the preferred option because it does not require any knowledge of configuration file format which may change in the future.

    QString configPath = Qtopia::applicationFileName( "Network", "wap" );
    QDir configDir( configPath );
    QStringList files = configDir.entryList( QStringList("*.conf") );

    //just use first entry
    foreach(QString acc, files )
    {
        QWapAccount wap( acc );
    }

The various functions in this class reflect the various parameters which are stored in the WAP configuration.


Member Type Documentation

enum QWapAccount::MMSVisibility

This enum specifies the sender vsibility for MMS messages.

ConstantValueDescription
QWapAccount::Default0the visibility is chosen by the transfer agent
QWapAccount::SenderHidden1the sender address is not revealed
QWapAccount::SenderVisible2the sender address is part of the message


Member Function Documentation

QWapAccount::QWapAccount ()

Creates a new WAP account.

QWapAccount::QWapAccount ( const QString & wapConfig )

Creates a new WAP account and reads the details from wapConfig. If wapConfig is empty or doesn't exist a new account is created.

QWapAccount::QWapAccount ( const QWapAccount & other )

Creates a new WAP account by copying the other WAP account.

QWapAccount::~QWapAccount ()   [virtual]

Destroys the WAP account object.

QString QWapAccount::configuration () const

Returns the configuration file (file path and name ) where the details for this WAP account are stored.

QString QWapAccount::dataInterface () const

Returns the data interface that is related to this WAP account. This is useful when providers require specific APNs, usernames or passwords when connecting to the WAP gateway. The returns string is the path to the associated data account. The status of the data interface can be retrieved by using QNetworkDevice.

    QWapAccount acc;
    ...
    if ( !acc.dataInterface().isEmpty() ) {
        //get state of associated account
        QNetworkDevice interface( acc.dataInterface() );
        QtopiaNetworkInterface::Status s = interface.state();
        ...
        //start interface so that we can use this WAP account
        if ( s != QtopiaNetworkInterface::Up )
            QtopiaNetwork::startInterface( acc.dataInterface() );
    }

This function returns an empty string if there is no associated account.

See also setDataInterface(), QNetworkDevice, and QtopiaNetwork.

QUrl QWapAccount::gateway () const

Returns the URL of the WAP gateway (including port, login and password).

    QWapAccount acc(...)
    ...
    QUrl gateway = acc.gateway();
    QString password = gateway.password();
    QString username = gateway.userName();

See also setGateway() and QUrl.

bool QWapAccount::mmsDeliveryReport () const

Returns true when the sender permits delivery reports for send MMS messages.

See also setMmsDeliveryReport().

int QWapAccount::mmsExpiry () const

Returns the expiry time for MMS messages in hours.

See also setMmsExpiry().

QWapAccount::MMSVisibility QWapAccount::mmsSenderVisibility () const

Returns the sender visibility for MMS messages.

See also setMmsSenderVisibility().

QUrl QWapAccount::mmsServer () const

Returns the URL of the MMS serveri (including the port).

See also setMmsServer() and QUrl.

QString QWapAccount::name () const

Returns the user visible name of this WAP account.

See also setName().

void QWapAccount::setDataInterface ( const QString & ifaceHandle )

ifaceHandle becomes the default data interface for this WAP account.

See also dataInterface().

void QWapAccount::setGateway ( const QUrl & url )

url points to the new WAP gateway.

See also gateway().

void QWapAccount::setMmsDeliveryReport ( bool delRpt )

Sets the MMS delivery report permission to delRpt.

See also mmsDeliveryReport().

void QWapAccount::setMmsExpiry ( int mmsExpiry )

Sets the expiry time for MMS messages to mmsExpiry hours.

See also mmsExpiry().

void QWapAccount::setMmsSenderVisibility ( QWapAccount::MMSVisibility v )

Sets the MMS sender visibility to v.

See also mmsSenderVisibility().

void QWapAccount::setMmsServer ( const QUrl & url )

url points to the new MMS server.

See also mmsServer().

void QWapAccount::setName ( const QString & name )

name becomes the new name for this WAP account.

See also name().

QWapAccount & QWapAccount::operator= ( const QWapAccount & other )

Assignment operator. Sets data on this to be what is set on other.

bool QWapAccount::operator== ( const QWapAccount & other )

Returns true if this WAP account is the same as other. Two QWapAccount object are equal if they refer to the same configuration file.

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 64
  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. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  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. La rubrique Qt a besoin de vous ! 1
Page suivante

Le Qt Developer Network au hasard

Logo

Les composants

Le Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. 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