![]() |
Home | ![]() |
The QMailAccount class represents a messaging account in the mail store. More...
#include <QMailAccount>
This class is under development and is subject to change.
QMailAccount () | |
QMailAccount ( const QMailAccountId & id ) | |
QMailAccount ( const QMailAccount & other ) | |
~QMailAccount () | |
QString | customField ( const QString & name ) const |
const QMap<QString, QString> & | customFields () const |
QMailAddress | fromAddress () const |
QMailAccountId | id () const |
QMailTimeStamp | lastSynchronized () const |
QStringList | messageSinks () const |
QStringList | messageSources () const |
QMailMessageMetaDataFwd::MessageType | messageType () const |
QString | name () const |
void | removeCustomField ( const QString & name ) |
void | setCustomField ( const QString & name, const QString & value ) |
void | setCustomFields ( const QMap<QString, QString> & fields ) |
void | setFromAddress ( const QMailAddress & address ) |
void | setId ( const QMailAccountId & id ) |
void | setLastSynchronized ( const QMailTimeStamp & synced ) |
void | setMessageType ( QMailMessageMetaDataFwd::MessageType type ) |
void | setName ( const QString & str ) |
void | setSignature ( const QString & str ) |
void | setStandardFolder ( QMailFolder::StandardFolder folder, const QMailFolderId & folderId ) |
void | setStatus ( quint64 newStatus ) |
void | setStatus ( quint64 mask, bool set ) |
QString | signature () const |
QMailFolderId | standardFolder ( QMailFolder::StandardFolder folder ) const |
const QMap<QMailFolder::StandardFolder, QMailFolderId> & | standardFolders () const |
quint64 | status () const |
QMailAccount & | operator= ( const QMailAccount & other ) |
const quint64 & | AppendSignature |
const quint64 & | CanCreateFolders |
const quint64 & | CanReferenceExternalData |
const quint64 & | CanRetrieve |
const quint64 & | CanSearchOnServer |
const quint64 & | CanTransmit |
const quint64 & | CanTransmitViaReference |
const quint64 & | Enabled |
const quint64 & | MessageSink |
const quint64 & | MessageSource |
const quint64 & | PreferredSender |
const quint64 & | SynchronizationEnabled |
const quint64 & | Synchronized |
const quint64 & | UseSmartReply |
const quint64 & | UserEditable |
const quint64 & | UserRemovable |
quint64 | statusMask ( const QString & flagName ) |
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 sources 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 QMailAccountConfiguration class allows for the configuration details of the account itself to be modified. A newly created account must also have a QMailAccountConfiguration defined, in order to be used for the transfer of messages.
QMailAccount allows the communications properties of the account to be tested. The MessageSource status flag indicates that the account acts a source of incoming messages, and the MessageSink status flag indicates that the account provides a mechanism for transmitting outgoing messages. The messageSources() and messageSinks() functions return the protocol tags for each message source or message sink implementation 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 mailbox() 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 QMailAccountConfiguration 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 value recorded in the custom field named name.
See also setCustomField() and customFields().
Returns the map of custom fields stored in the account.
See also setCustomFields(), customField(), and setCustomField().
Returns the address from which the account's outgoing messages should be reported as originating.
See also setFromAddress().
Returns the storage id for this account.
See also setId().
Returns the time the account was last succesfully synchronized.
Should be updated by QMailRetrievalAction::retrieveMessageList() when an account is synchronized.
See also setLastSynchronized() and QMailRetrievalAction::retrieveMessageList().
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 messages this account deals with.
See also setMessageType().
Returns the name of the account for display purposes.
See also setName().
Removes the custom field named name.
See also customField() and customFields().
Sets the value of the custom field named name to value.
See also customField() and customFields().
Sets the account to contain the custom fields in fields.
See also setCustomField() and customFields().
Sets the address from which the account's outgoing messages should be reported as originating to address.
See also fromAddress().
Sets the storage id for this account to id.
See also id().
Sets the last successful synchronized time to synced
See also lastSynchronized().
Sets the types of messages this account deals with to type.
See also messageType().
Sets the name of the account for display purposes to str.
See also name().
Sets the signature text configured for the account to str.
See also signature().
Sets the folder configured for the standard folder role folder for this account to folderId.
See also standardFolder().
Sets the status value for the account to newStatus.
See also status() and statusMask().
Sets the status flags indicated in mask to set.
See also status() and statusMask().
Returns the signature text configured for the account.
See also setSignature().
Returns the folder configured for the standard folder role folder for this account, if there is one.
See also setStandardFolder().
Returns the map of standard folders configured for this account.
See also standardFolder() and setStandardFolder().
Returns the status value for the account.
See also setStatus() and statusMask().
Returns the status bitmask needed to test the result of QMailAccount::status() against the QMailAccount status flag registered with the identifier flagName.
See also status() and QMailStore::accountStatusMask().
Assigns the value of this account to the account other
The status mask needed for testing the value of the registered status flag named "AppendSignature" against the result of QMailAccount::status().
This flag indicates that an account has been configured to append a signature block to outgoing messages.
The status mask needed for testing the value of the registered status flag named "CanCreateFolders" against the result of QMailAccount::status().
This flag indicates that top level folders can be created for the account.
See also QMailStorageAction::onlineCreateFolder() and QMailFolder::ChildCreationPermitted.
The status mask needed for testing the value of the registered status flag named "CanReferenceExternalData" against the result of QMailAccount::status().
This flag indicates that the account can contain messages that reference data in other messages.
See also QMailMessagePart::setReference().
The status mask needed for testing the value of the registered status flag named "CanRetrieve" against the result of QMailAccount::status().
This flag indicates that the account has been sufficiently configured that an attempt to retrieve messages may be performed.
The status mask needed for testing the value of the registered status flag named "CanSearchOnServer" against the result of QMailAccount::status().
This flag indicates that the remote server associated with the account supports server based searching.
See also QMailSearchAction::searchMessages().
The status mask needed for testing the value of the registered status flag named "CanTransmit" against the result of QMailAccount::status().
This flag indicates that the account has been sufficiently configured that an attempt to transmit messages may be performed.
The status mask needed for testing the value of the registered status flag named "CanTransmitViaReference" against the result of QMailAccount::status().
This flag indicates that the account can be used to transmit messages that contain references.
See also QMailMessagePart::setReference().
The status mask needed for testing the value of the registered status flag named "Enabled" against the result of QMailAccount::status().
This flag indicates that the account has been marked as suitable for use by the messaging server.
The status mask needed for testing the value of the registered status flag named "MessageSink" against the result of QMailAccount::status().
This flag indicates that the account has been configured to act as a transmitter of outgoing messages.
The status mask needed for testing the value of the registered status flag named "MessageSink" against the result of QMailAccount::status().
This flag indicates that the account has been configured to act as a source of incoming messages.
The status mask needed for testing the value of the registered status flag named "PreferredSender" against the result of QMailAccount::status().
This flag indicates that the account is the user's preferred account for sending the type of message that the account creates.
See also QMailAccount::messageType().
The status mask needed for testing the value of the registered status flag named "SynchronizationEnabled" against the result of QMailAccount::status().
This flag indicates that an account should be synchronized against an external message source.
The status mask needed for testing the value of the registered status flag named "Synchronized" against the result of QMailAccount::status().
This flag indicates that an account has been synchronized by a synchronization operation.
The status mask needed for testing the value of the registered status flag named "UseSmartReply" against the result of QMailAccount::status().
This flag indicates that the account uses 'Smart Reply', a technique in which the server will automatically append the text of the replied-to message, and as such does not need to be done manually.
The status mask needed for testing the value of the registered status flag named "UserEditable" against the result of QMailAccount::status().
This flag indicates that the account's configuration may be modified by the user.
The status mask needed for testing the value of the registered status flag named "UserRemovable" against the result of QMailAccount::status().
This flag indicates that the account may be removed by the user.
Copyright © 2010 QtSoftware | Messaging Framework |