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

AccountConfiguration Class Reference
[QtMessagingModule, QtPimModule]

The AccountConfiguration class stores attributes associated with an external messaging account. More...

    #include <AccountConfiguration>

This class is under development and is subject to change.

Public Types

Public Functions


Detailed Description

The AccountConfiguration class stores attributes associated with an external messaging account.

The AccountConfiguration class stores various attributes associated with either an incoming source of messages such as an SMS, MMS, POP, or IMAP account, or an outgoing sink for messages such as an SMTP account.

Note: the AccountConfiguration class will be replaced by a more flexible solution in a future release of Qt Extended.

SMTP specific methods

AccountConfiguration includes a number of SMTP specific methods. emailAddress() is used as the from email address when composing email messages. smtpServer() is the domain name or DNS address of the SMTP server used to send email messages, and smtpPort() is the port address of the server.

If smtpAuthentication() or smtpEncryption() is true then smtpUsername() and smtpPassword() will be used to authenticate and/or encrypt communication to the server.

If useSignature() is true the signature as given by signature() will be appended to emails sent.

Each of these methods has a corresponding setter method.

POP/IMAP specific methods

A number of POP/IMAP specific methods are included in AccountConfiguration. mailUserName() and mailPassword() are used when logging into an a POP or IMAP server. mailServer() is the domain name or DNS address of the server, and mailPort() is the port number of the server. If mailEncryption() is true encrypted communication with the server will be attempted.

If canCollectMail() is true then the account can be used to collect email. If canDeleteMail() is true then mail will be deleted from the server after it is downloaded to the client.

maxMailSize() is the size of the largest mail to download in full. For mails larger than this size only header (summary) information such as the title, author, recipients and date will be downloaded.

markMessageForDeletion() can be used to mark a message for deletion and serverUids() returns a list of unique server identifiers for messages in the account.

Each of these methods has a corresponding setter method.

IMAP specific methods

A few IMAP specific methods are included. baseFolder() defines the folder that will be used as the root folder when communicating with the server, only messages in the base folder and subfolders of the base folder will be retrieved. The base folder can be set with setBaseFolder().

mailboxes() returns a list of folders owned by the account, and getMailbox() can be used to find the folder with a specified name.

MMS specific methods

A few MMS specific methods are also included. networkConfig() returns the network configuration used for the account, and if isAutoDownload() is true then when a preliminary MMS notification arrives an attempt at retrieving the full MMS message will be made.


Member Type Documentation

enum AccountConfiguration::AuthType

This enum type is used to describe the type of authentication used to communicate with a server.

ConstantValueDescription
AccountConfiguration::Auth_NONE0No authentication is used for this account.
AccountConfiguration::Auth_LOGIN1A two stage simple cleartext password mechanism.
AccountConfiguration::Auth_PLAIN2A one stage simple cleartext password mechanism. PLAIN supercedes the LOGIN mechanism.
AccountConfiguration::Auth_INCOMING3Indicates mail check must be done before sending SMTP mail. Only applies to accounts with both incoming and outgoing details defined.

enum AccountConfiguration::EncryptType

This enum type is used to describe the type of encryption used to communicate with a server. Transport Layer Security (TLS) and its predecessor Secure Sockets Layer (SSL) enable encrypted communication with an e-mail server.

ConstantValueDescription
AccountConfiguration::Encrypt_NONE0No encryption is used.
AccountConfiguration::Encrypt_SSL1SSL (Secure Sockets Layer) encryption is used.
AccountConfiguration::Encrypt_TLS2TLS (Transport Layer Security) encryption is used.


Member Function Documentation

AccountConfiguration::AccountConfiguration ()

Creates an empty and invalid AccountConfiguration.

AccountConfiguration::AccountConfiguration ( const QMailAccountId & id )

Creates an AccountConfiguration by loading the data from the mail store as specified by the QMailAccountId id. If the account does not exist in the store, then an empty and invalid AccountConfiguration will result.

See also QMailStore::account().

AccountConfiguration::~AccountConfiguration ()

Destroys the configuration object.

QString AccountConfiguration::accountName () const

Returns the name of the account.

QMailAccount::AccountType AccountConfiguration::accountType () const

Returns the account type.

QString AccountConfiguration::baseFolder () const

Returns the base folder for this account.

See also setBaseFolder().

bool AccountConfiguration::canCollectMail () const

Returns true if the account can be used to collect mail.

bool AccountConfiguration::canDeleteMail () const

Returns true if mail should be deleted from the server after being deleted and expunged locally; otherwise returns false.

See also setDeleteMail().

bool AccountConfiguration::canSendMail () const

Returns true if the account can be used to send mail.

int AccountConfiguration::checkInterval () const

Returns the time in minutes between automatic mail retrieval attempts for the account.

setCheckInterval()

See also setCheckInterval().

QString AccountConfiguration::emailAddress () const

Returns the email address used when sending mail.

See also setEmailAddress().

QMailAccountId AccountConfiguration::id () const

Returns the storage id for this account.

bool AccountConfiguration::intervalCheckRoamingEnabled () const

Returns true if interval mail checking is enabled even when the device is in roaming mode.

See also setIntervalCheckRoamingEnabled().

bool AccountConfiguration::isAutoDownload () const

Only applicable for MMS accounts. Returns true if the full MMS will be retrieved when the preliminary MMS notification arrives; otherwise returns false.

See also setAutoDownload().

EncryptType AccountConfiguration::mailEncryption () const

Returns the encryption type used for the incoming mail server for the account.

See also setMailEncryption().

QString AccountConfiguration::mailPassword () const

Returns the password used to login to the incoming mail server for the account.

See also setMailPassword().

int AccountConfiguration::mailPort () const

Returns the incoming mail server port for the account.

See also setMailPort().

QString AccountConfiguration::mailServer () const

Returns the incoming mail server for the account.

See also setMailServer().

QString AccountConfiguration::mailUserName () const

Returns the user name used to login to the incoming mail server for the account.

See also setMailUserName().

int AccountConfiguration::maxMailSize () const

Returns the maximum size of mails to be fully downloaded.

See also setMaxMailSize().

QString AccountConfiguration::networkConfig () const

Returns the network configuration for the account if any; otherwise returns the default WAP account from the general Qt Extended network settings.

See also setNetworkConfig().

bool AccountConfiguration::pushEnabled () const

Returns true if the account is push email enabled otherwise returns false.

If an account is push email enabled then the connection to the server for this account should be kept open so that new mail can be discovered as soon as it arrives. This may require less bandwith than repeatedly polling the account for new mail using interval checking.

Currently only supported for IMAP accounts using the IDLE extension documented in RFC2177.

See also setPushEnabled().

void AccountConfiguration::readSettings ( QSettings * conf )

Deserialize the account information from the current group of the given QSettings file conf.

See also saveSettings().

void AccountConfiguration::saveSettings ( QSettings * conf ) const

Serialize the account information to the current group of the given QSettings file conf.

See also readSettings().

void AccountConfiguration::setAutoDownload ( bool autodl )

Only applicable for MMS accounts. If autodl is true sets the account to automatically download the full MMS message once the preliminary MMS notification arrives. Otherwise full MMS messages will not be automatically fetched.

See also isAutoDownload().

void AccountConfiguration::setBaseFolder ( const QString & s )

Sets the base folder for this account to s. This folder is shown in the user interface as the root folder for this account.

See also baseFolder().

void AccountConfiguration::setCheckInterval ( int i )

Sets the time in minutes between automatic mail retrieval attempts for the account to i.

See also checkInterval().

void AccountConfiguration::setDeleteMail ( bool b )

If b is true the mail should be deleted from the server after being deleted and expunged locally; otherwise do not delete mail from the server. When enabled mail is deleted on the server the next time mail is downloaded.

See also canDeleteMail().

void AccountConfiguration::setEmailAddress ( const QString & str )

Sets the email address used when sending mail to str.

See also emailAddress().

void AccountConfiguration::setIntervalCheckRoamingEnabled ( bool enabled )

Sets whether interval checking is enabled during device roaming to enabled.

See also intervalCheckRoamingEnabled().

void AccountConfiguration::setMailEncryption ( EncryptType t )

Sets the encryption type used for the incoming mail server for the account to t.

See also mailEncryption().

void AccountConfiguration::setMailPassword ( const QString & str )

Sets the password used to login to the incoming mail server for the account to str.

See also mailPassword().

void AccountConfiguration::setMailPort ( int i )

Sets the incoming mail server port for the account to i.

See also mailPort().

void AccountConfiguration::setMailServer ( const QString & str )

Sets the incoming mail server for the account to str.

See also mailServer().

void AccountConfiguration::setMailUserName ( const QString & str )

Sets the user name used to login to the incoming mail server for the account to str.

See also mailUserName().

void AccountConfiguration::setMaxMailSize ( int i )

Sets the maximum size of mails to download in bytes to i. For mails larger than this size only the mail header will be downloaded.

See also maxMailSize().

void AccountConfiguration::setNetworkConfig ( const QString & c )

Sets the network configuration for the account to c.

See also networkConfig().

void AccountConfiguration::setPushEnabled ( bool enabled )

Sets whether the account is push email enabled to enabled.

See also pushEnabled().

void AccountConfiguration::setSignature ( const QString & str )

Sets the signature text for outgoing mails for the account to str.

See also signature().

void AccountConfiguration::setSmtpAuthentication ( AuthType t )

Sets the authentication type used for the outgoing SMTP mail server for the account to t.

See also smtpAuthentication().

void AccountConfiguration::setSmtpEncryption ( EncryptType t )

Sets the encryption type used for the outgoing SMTP mail server for the account to t.

See also smtpEncryption().

void AccountConfiguration::setSmtpPassword ( const QString & password )

Sets the password used to login to the outgoing SMTP mail server for the account to password.

See also smtpPassword().

void AccountConfiguration::setSmtpPort ( int i )

Sets the SMTP port number used when sending mail to i.

See also smtpPort().

void AccountConfiguration::setSmtpServer ( const QString & str )

Sets the SMTP server used to send mail to str.

See also smtpServer().

void AccountConfiguration::setSmtpUsername ( const QString & username )

Sets the user name used to login to the outgoing SMTP mail server for the account to username.

See also smtpUsername().

void AccountConfiguration::setUseSignature ( bool b )

If b is true append signature text to outgoing mails for the account; otherwise do not.

See also useSignature().

void AccountConfiguration::setUserName ( const QString & str )

Sets the user name used to login to the outgoing mail server for the account to str.

See also userName().

QString AccountConfiguration::signature () const

Returns the signature text for outgoing mails for the account.

See also setSignature().

AuthType AccountConfiguration::smtpAuthentication () const

Returns the authentication type used for the outgoing SMTP mail server for the account.

See also setSmtpAuthentication().

EncryptType AccountConfiguration::smtpEncryption () const

Returns the encryption type used for the outgoing SMTP mail server for the account.

See also setSmtpEncryption().

QString AccountConfiguration::smtpPassword () const

Returns the password used to login to the outgoing SMTP mail server for the account.

See also setSmtpPassword().

int AccountConfiguration::smtpPort () const

Returns the SMTP port number used when sending mail.

See also setSmtpPort().

QString AccountConfiguration::smtpServer () const

Returns the SMTP server used to send mail.

See also setSmtpServer().

QString AccountConfiguration::smtpUsername () const

Returns the user name used to login to the outgoing SMTP mail server for the account.

See also setSmtpUsername().

bool AccountConfiguration::useSignature () const

Returns true if signature text should be appended to outgoing mails for the account; otherwise returns false.

See also setUseSignature().

QString AccountConfiguration::userName () const

Returns the user name used to login to the outgoing mail server for the account.

See also setUserName().


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3