Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QMailAccount class represents a messaging account in the mail store. More...
#include <QMailAccount>
This class is under development and is subject to change.
The QMailAccount class represents a messaging account in the mail store.
A QMailAccount is a logical entity that groups messages according to the method by which they are sent and received. An account can be configured to support one more message sources, from which messages are imported into the mail store, and one or more message sinks by which messages are transmitted to external messaging services. Although an account can support multiple source or sinks, this facility is for grouping those that are logically equivalent; for example, using one of multiple connectivity options to retrieve messages from the same external server.
The QMailAccount class is used for accessing properties of the account related to dealing with the account's folders and messages, rather than for modifying the account itself. The AccountConfiguration class allows for the configuration of the account itself to be modified. A newly created account must also have an AccountConfiguration defined, in order to be used for transfer of messages to or from Qt Extended.
QMailAccount allows the communications properties of the account to be tested. The canSendMail() and canCollectMail() functions allow the basic transfer capabilities of the account to be queried. The messageSources() and messageSinks() functions return the protocol tags for each message source or message sink implementations configured for the account. These tags can be used to identify the implementation details of the account if necessary:
void someFunction(const QMailMessage &message)
{
QMailAccount msgAccount(message.parentAccountId());
if (msgAccount.messageSources().contains("imap4", Qt::CaseInsensitive)) {
// This account uses IMAP
...
}
}
The QMailAccount class also provides functions which help clients to access the resources of the account. The mailboxes() function returns a list of each folder associated with the account, while the getMailbox() function allows a mailbox to be located by name. The deletedMessages() and serverUids() functions are primarily used in synchronizing the account's contents with those present on an external server.
See also AccountConfiguration and QMailStore::account().
Creates an uninitialised account object.
Convenience constructor that creates a QMailAccount by loading the data from the store as specified by the QMailAccountId id. If the account does not exist in the store, then this constructor will create an empty and invalid QMailAccount.
Creates a copy of the QMailAccount other.
Destroys the account object.
Returns the name of the account for display purposes.
See also setAccountName().
Returns true if the account can be used to collect mail. That is if it is an IMAP or POP account; otherwise returns false.
Returns true if the account can be used to send mail.
Return the list of messages removed from this account.
This is an overloaded member function, provided for convenience.
Return the list of messages removed from the mailbox identified by folderId.
Returns the name of the account as suitable for displaying in the user interface. Currently simply returns the account name.
Returns the subfolder with the given name if any; other returns an invalid ID.
See also mailboxes().
Returns true if the account has configuration file settings; otherwise false. Currently only returns false for SMS accounts.
See also saveSettings() and readSettings().
Returns the storage id for this account.
See also setId().
Returns true if this account can transmit outgoing messages to external messaging services.
Returns true if this account has incoming messages sourced from external messaging services.
Returns the list of identifiers for the mailboxes of this account.
See also getMailbox().
Returns the list of protocol tags identifying the message sink implementations that can transmit messages for this account.
Returns the list of protocol tags identifying the message source implementations that provide the messages for this account.
Returns the types of messsages this account deals with.
Deserialize the account information from the current group of the given QSettings file conf.
See also saveSettings() and hasSettings().
Serialize the account information to the current group of the given QSettings file conf.
See also readSettings() and hasSettings().
Returns the list of server UIDs for messages owned by this account.
This is an overloaded member function, provided for convenience.
Returns the list of message server UIDs for this account, that are located in the folder identified by folderId.
This is an overloaded member function, provided for convenience.
Returns the list of message server UIDs located in the folder identified by folderId, whose status field yields set when logically ANDed with messageStatusFilter.
Sets the name of the account for display purposes to str.
See also accountName().
Sets the storage id for this account to id.
See also id().
Assigns the value of this account to the account other
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |