Home · All Classes · Grouped Classes · Annotated · Functions

QMailStore Class Reference

The QMailStore class represents the main interface for storage and retrieval of messages and folders on the message store. More...

    #include <QMailStore>

This class is under development and is subject to change.

Inherits QObject.

Public Types

Public Functions

Signals

Static Public Members

Additional Inherited Members


Detailed Description

The QMailStore class represents the main interface for storage and retrieval of messages and folders on the message store.

The QMailStore class is accessed through a singleton interface and provides functions for adding, updating and deleting of QMailFolders and QMailMessages on the message store.

QMailStore also provides functions for querying and counting of QMailFolders and QMailMessages when used in conjunction with QMailMessageKey and QMailFolderKey classes.

See also QMailMessage, QMailFolder, QMailMessageKey, and QMailFolderKey.


Member Type Documentation

enum QMailStore::ReturnOption

This enum defines the message header return option for QMailStore::messageHeaders()

ConstantValueDescription
QMailStore::ReturnAll0Return all message headers that match the selection criteria, including duplicates.
QMailStore::ReturnDistinct1Return distinct message headers that match the selection criteria, excluding duplicates.


Member Function Documentation

QMailStore::~QMailStore ()   [virtual]

Destroys this QMailStore object.

bool QMailStore::addFolder ( QMailFolder * a )

Adds a new QMailFolder object a into the message store, performing respective integrity checks. Returns true if the operation completed successfully, false otherwise.

bool QMailStore::addMessage ( QMailMessage * m )

Adds a new QMailMessage object m into the message store, performing respective integrity checks. Returns true if the operation completed successfully, false otherwise.

int QMailStore::countFolders ( const QMailFolderKey & key = QMailFolderKey() ) const

Returns the count of the number of folders which pass the filtering criteria defined in QMailFolderKey key. If key is empty a count of all folders is returned.

int QMailStore::countMessages ( const QMailMessageKey & key = QMailMessageKey() ) const

Returns the count of the number of messages which pass the filtering criteria defined in QMailMessageKey key. If key is empty a count of all messages is returned.

QMailFolder QMailStore::folder ( const QMailId & id ) const

Returns the QMailFolder defined by a QMailId id from the message store.

void QMailStore::foldersAdded ( const QMailIdList & ids )   [signal]

Signal that is emitted when the folders in the list ids are added to the mail store.

See also foldersRemoved() and foldersUpdated().

void QMailStore::foldersRemoved ( const QMailIdList & ids )   [signal]

Signal that is emitted when the folders in the list ids are removed from the mail store.

See also foldersAdded() and foldersUpdated().

void QMailStore::foldersUpdated ( const QMailIdList & ids )   [signal]

Signal that is emitted when the folders in the list ids are updated within the mail store.

See also foldersAdded() and foldersRemoved().

QMailStore * QMailStore::instance ()   [static]

Returns an instance of the QMailStore object.

QMailMessage QMailStore::message ( const QMailId & id ) const

Returns the QMailMessage defined by a QMailId id from the message store.

QMailMessage QMailStore::message ( const QString & uid, const QString & account ) const

This is an overloaded member function, provided for convenience.

Returns the QMailMessage defined by the unique identifier uid from the account account.

QMailMessage QMailStore::messageHeader ( const QMailId & id ) const

Returns the QMailMessage header defined by a QMailId id from the message store.

QMailMessage QMailStore::messageHeader ( const QString & uid, const QString & account ) const

This is an overloaded member function, provided for convenience.

Returns the QMailMessage header defined by the unique identifier uid from the account account.

QMailMessageList QMailStore::messageHeaders ( const QMailMessageKey & key, const QMailMessageKey::Properties & properties, const ReturnOption & option = ReturnAll ) const

Retrieves a list of message headers containing data defined by properties for messages which pass the criteria defined by key. If option is ReturnAll then duplicate headers are included in the list; otherwise duplicate headers are excluded from the returned list.

Returns a list of headers if successfully completed, or an empty list for an error or no data.

void QMailStore::messagesAdded ( const QMailIdList & ids )   [signal]

Signal that is emitted when the messages in the list ids are added to the mail store.

See also messagesRemoved() and messagesUpdated().

void QMailStore::messagesRemoved ( const QMailIdList & ids )   [signal]

Signal that is emitted when the messages in the list ids are removed from the mail store.

See also messagesAdded() and messagesUpdated().

void QMailStore::messagesUpdated ( const QMailIdList & ids )   [signal]

Signal that is emitted when the messages in the list ids are updated within the mail store.

See also messagesAdded() and messagesRemoved().

QMailIdList QMailStore::queryFolders ( const QMailFolderKey & key = QMailFolderKey(), const QMailFolderSortKey & sortKey = QMailFolderSortKey() ) const

Returns the QMailIds of folders in the message store. If key is not empty only folders matching the parameters set by key will be returned, otherwise all folder identifiers will be returned. If sortKey is not empty, the identifiers will be sorted by the parameters set by sortKey.

QMailIdList QMailStore::queryMessages ( const QMailMessageKey & key = QMailMessageKey(), const QMailMessageSortKey & sortKey = QMailMessageSortKey() ) const

Returns the QMailIds of messages in the message store. If key is not empty only messages matching the parameters set by key will be returned, otherwise all message identifiers will be returned. If sortKey is not empty, the identifiers will be sorted by the parameters set by sortKey.

bool QMailStore::removeFolder ( const QMailId & id )

Removes a QMailFolder with QMailId id from the message store. This action also removes the sub-folder and messages of the folder. Returns true if the operation completed successfully, false otherwise.

bool QMailStore::removeMessage ( const QMailId & id )

Removes a QMailMessage with QMailId id from the message store. Returns true if the operation completed successfully, false otherwise.

int QMailStore::sizeOfMessages ( const QMailMessageKey & key = QMailMessageKey() ) const

Returns the total size of the messages which pass the filtering criteria defined in QMailMessageKey key. If key is empty the total size of all messages is returned.

bool QMailStore::updateFolder ( QMailFolder * f )

Updates the existing QMailFolder f on the message store. Returns true if the operation completed successfully, false otherwise.

bool QMailStore::updateMessage ( QMailMessage * m )

Updates the existing QMailMessage m on the message store. Returns true if the operation completed successfully, or false otherwise.

bool QMailStore::updateMessages ( const QMailMessageKey & key, const QMailMessageKey::Properties & properties, const QMailMessage & data )

Updates the message properties defined in properties with data contained in the message data for all messages which pass the criteria defined by the QMailMessageKey key. Returns true if the operation completed successfully, or false otherwise.

bool QMailStore::updateMessages ( const QMailMessageKey & key, const QMailMessage::Status status, bool set )

This is an overloaded member function, provided for convenience.

Updates message status flags with status according to set for messages which pass the criteria defined in the QMailMessageKey key. Returns true if the operation completed successfully, or false otherwise.


Copyright © 2008 Nokia Trademarks
Qtopia 4.3.3