Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QWapAccount class provides a wrapper around configuration files for WAP accounts. More...
#include <QWapAccount>
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.
This enum specifies the sender vsibility for MMS messages.
Constant | Value | Description |
---|---|---|
QWapAccount::Default | 0 | the visibility is chosen by the transfer agent |
QWapAccount::SenderHidden | 1 | the sender address is not revealed |
QWapAccount::SenderVisible | 2 | the sender address is part of the message |
Creates a new WAP account.
Creates a new WAP account and reads the details from wapConfig. If wapConfig is empty or doesn't exist a new account is created.
Creates a new WAP account by copying the other WAP account.
Destroys the WAP account object.
Returns the configuration file (file path and name ) where the details for this WAP account are stored.
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.
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.
Returns true when the sender permits delivery reports for send MMS messages.
See also setMmsDeliveryReport().
Returns the expiry time for MMS messages in hours.
See also setMmsExpiry().
Returns the sender visibility for MMS messages.
See also setMmsSenderVisibility().
Returns the URL of the MMS serveri (including the port).
See also setMmsServer() and QUrl.
Returns the user visible name of this WAP account.
See also setName().
ifaceHandle becomes the default data interface for this WAP account.
See also dataInterface().
url points to the new WAP gateway.
See also gateway().
Sets the MMS delivery report permission to delRpt.
See also mmsDeliveryReport().
Sets the expiry time for MMS messages to mmsExpiry hours.
See also mmsExpiry().
Sets the MMS sender visibility to v.
See also mmsSenderVisibility().
url points to the new MMS server.
See also mmsServer().
name becomes the new name for this WAP account.
See also name().
Assignment operator. Sets data on this to be what is set on 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.
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |