![]() |
Home | ![]() |
The QMailFolder class represents a folder for mail messages in the mail store. More...
#include <QMailFolder>
This class is under development and is subject to change.
Inherits QMailFolderFwd.
enum | StandardFolder { InboxFolder, OutboxFolder, DraftsFolder, SentFolder, TrashFolder, JunkFolder } |
QMailFolder () | |
QMailFolder ( const QString & path, const QMailFolderId & parentFolderId = QMailFolderId(), const QMailAccountId & parentAccountId = QMailAccountId() ) | |
QMailFolder ( const QMailFolderId & id ) | |
QMailFolder ( const QMailFolder & other ) | |
virtual | ~QMailFolder () |
QString | customField ( const QString & name ) const |
const QMap<QString, QString> & | customFields () const |
QString | displayName () const |
QMailFolderId | id () const |
QMailAccountId | parentAccountId () const |
QMailFolderId | parentFolderId () const |
QString | path () const |
void | removeCustomField ( const QString & name ) |
uint | serverCount () const |
uint | serverUndiscoveredCount () const |
uint | serverUnreadCount () const |
void | setCustomField ( const QString & name, const QString & value ) |
void | setCustomFields ( const QMap<QString, QString> & fields ) |
void | setDisplayName ( const QString & displayName ) |
void | setId ( const QMailFolderId & id ) |
void | setParentAccountId ( const QMailAccountId & id ) |
void | setParentFolderId ( const QMailFolderId & id ) |
void | setPath ( const QString & path ) |
void | setServerCount ( uint count ) |
void | setServerUndiscoveredCount ( uint count ) |
void | setServerUnreadCount ( uint count ) |
void | setStatus ( quint64 newStatus ) |
void | setStatus ( quint64 mask, bool set ) |
quint64 | status () const |
QMailFolder & | operator= ( const QMailFolder & other ) |
const quint64 & | ChildCreationPermitted |
const quint64 & | DeletionPermitted |
const quint64 & | Drafts |
const quint64 & | Incoming |
const quint64 & | Junk |
const quint64 & | MessagesPermitted |
const quint64 & | NonMail |
const quint64 & | Outgoing |
const quint64 & | PartialContent |
const quint64 & | Removed |
const quint64 & | RenamePermitted |
const quint64 & | Sent |
const quint64 & | SynchronizationEnabled |
const quint64 & | Synchronized |
const quint64 & | Trash |
quint64 | statusMask ( const QString & flagName ) |
The QMailFolder class represents a folder for mail messages in the mail store.
QMailFolder represents a folder of mail messages, either defined internally for application use, or to represent a folder object held by an external message service, such as an IMAP account.
A QMailFolder object has an optional parent of the same type, allowing folders to be arranged in tree structures. Messages may be associated with folders, allowing for simple classification and access by their parentFolderId property.
See also QMailMessage and QMailStore::folder().
This enum type describes the standard folders pertinent to many account types.
Constant | Value | Description |
---|---|---|
QMailFolder::InboxFolder | 1 | Represents the standard inbox folder. |
QMailFolder::OutboxFolder | 2 | Represents the standard outbox folder. |
QMailFolder::DraftsFolder | 3 | Represents the standard drafts folder. |
QMailFolder::SentFolder | 4 | Represents the standard sent folder. |
QMailFolder::TrashFolder | 5 | Represents the standard trash folder. |
QMailFolder::JunkFolder | 6 | Represents the standard junk folder. |
Constructor that creates an empty and invalid QMailFolder. An empty folder is one which has no path, no parent folder and no parent account. An invalid folder does not exist in the database and has an invalid id.
Creates a QMailFolder object with path path and parent folder ID parentFolderId, that is linked to a parent account parentAccountId.
Constructor that creates a QMailFolder by loading the data from the message store as specified by the QMailFolderId id. If the folder does not exist in the message store, then this constructor will create an empty and invalid QMailFolder.
Creates a copy of the QMailFolder object other.
Destroys the QMailFolder 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 folder.
See also setCustomFields(), customField(), and setCustomField().
Returns the display name of the folder.
See also setDisplayName().
Returns the ID of the QMailFolder object. A QMailFolder with an invalid ID is one which does not yet exist on the message store.
See also setId().
Returns the id of the account which owns the folder. If the folder is not linked to an account an invalid id is returned.
See also setParentAccountId().
Returns the ID of the parent folder. This folder is a root folder if the parent ID is invalid.
See also setParentFolderId().
Returns the path of the folder.
See also setPath().
Removes the custom field named name.
See also customField() and customFields().
Returns the count of messages on the server for the folder.
The count is updated when an operation involving the folder is performed on the server, such as that requested by QMailRetrievalAction::retrieveFolderList().
See also setServerCount(), serverUnreadCount(), and serverUndiscoveredCount().
Returns the count of undiscovered messages on the server for the folder. Undiscovered messages are available at the server, but their meta data is not yet available on this client.
The count is updated when an operation involving the folder is performed on the server, such as that requested by QMailRetrievalAction::retrieveFolderList().
See also setServerUndiscoveredCount(), serverCount(), and serverUnreadCount().
Returns the count of unread messages on the server for the folder. Unread messages have not had their content displayed by any client.
The count is updated when an operation involving the folder is performed on the server, such as that requested by QMailRetrievalAction::retrieveFolderList().
See also setServerUnreadCount(), serverCount(), and serverUndiscoveredCount().
Sets the value of the custom field named name to value.
See also customField() and customFields().
Sets the folder to contain the custom fields in fields.
See also setCustomField() and customFields().
Sets the display name of this folder to displayName.
See also displayName().
Sets the ID of this folder to id
See also id().
Sets the id of the account which owns the folder to id.
See also parentAccountId().
Sets the parent folder ID to id. Warning: it is the responsibility of the application to make sure that no circular folder refernces are created.
See also parentFolderId().
Sets the path of this folder within the parent account to path.
See also path().
Sets the count of messages on the server for the folder to count.
See also serverCount(), setServerUnreadCount(), and setServerUndiscoveredCount().
Sets the count of undiscovered messages on the server for the folder to count. Undiscovered messages are available at the server, but their meta data is not yet available on this client.
See also serverUndiscoveredCount(), setServerCount(), and setServerUnreadCount().
Sets the count of unread messages on the server for the folder to count. Unread messages have not had their content displayed by any client.
See also serverUnreadCount(), setServerCount(), and setServerUndiscoveredCount().
Sets the status value for the folder to newStatus.
See also status() and statusMask().
Sets the status flags indicated in mask to set.
See also status() and statusMask().
Returns the status value for the folder.
See also setStatus() and statusMask().
Returns the status bitmask needed to test the result of QMailFolder::status() against the QMailFolder status flag registered with the identifier flagName.
See also status() and QMailStore::folderStatusMask().
Assigns the value of the QMailFolder object other to this.
The status mask needed for testing the value of the registered status flag named "ChildCreationPermitted" against the result of QMailFolder::status().
This flag indicates that creation of child folders of this folder is allowed.
The status mask needed for testing the value of the registered status flag named "DeletionPermitted" against the result of QMailFolder::status().
This flag indicates that the folder may be deleted.
The status mask needed for testing the value of the registered status flag named "Drafts" against the result of QMailFolder::status().
This flag indicates that a folder contains messages that are drafts for potential transmission.
The status mask needed for testing the value of the registered status flag named "Incoming" against the result of QMailFolder::status().
This flag indicates that a folder contains messages that are incoming from the point of view of the account owner.
The status mask needed for testing the value of the registered status flag named "Junk" against the result of QMailFolder::status().
This flag indicates that a folder contains messages that have been marked as junk.
The status mask needed for testing the value of the registered status flag named "MessagesPermitted" against the result of QMailFolder::status().
This flag indicates that the folder is allowed to contain messages.
The status mask needed for testing the value of the registered status flag named "NonMail" against the result of QMailFolder::status().
This flag indicates that the folder contains only non mail items such as calendar and/or contacts items.
The status mask needed for testing the value of the registered status flag named "Outgoing" against the result of QMailFolder::status().
This flag indicates that a folder contains messages that are outgoing from the point of view of the account owner.
The status mask needed for testing the value of the registered status flag named "PartialContent" against the result of QMailFolder::status().
This flag indicates that a folder contains a metadata record for only some of the messages known to exist at the external server.
The status mask needed for testing the value of the registered status flag named "Removed" against the result of QMailFolder::status().
This flag indicates that a folder has been removed from the external server.
The status mask needed for testing the value of the registered status flag named "RenamePermitted" against the result of QMailFolder::status().
This flag indicates that the folder may be renamed.
The status mask needed for testing the value of the registered status flag named "Sent" against the result of QMailFolder::status().
This flag indicates that a folder contains messages that were sent by the account owner.
The status mask needed for testing the value of the registered status flag named "SynchronizationEnabled" against the result of QMailFolder::status().
This flag indicates that a folder should be included during account synchronization.
The status mask needed for testing the value of the registered status flag named "Synchronized" against the result of QMailFolder::status().
This flag indicates that a folder has been synchronized during account synchronization.
The status mask needed for testing the value of the registered status flag named "Trash" against the result of QMailFolder::status().
This flag indicates that a folder contains messages that have been marked as trash.
Copyright © 2010 QtSoftware | Messaging Framework |