|  | Home |

# QMailMessageKey Class Reference

The QMailMessageKey class defines the parameters used for querying a subset of all available messages from the mail store. More...

        #include <QMailMessageKey>

This class is under development and is subject to change.

- List of all members, including inherited members

## Public Types

typedef | ArgumentType
flags | Properties
enum | Property { Id, Type, ParentFolderId, Sender, ..., RfcId }

## Public Functions

| QMailMessageKey ()
| QMailMessageKey ( const QMailMessageKey & other )
virtual | ~QMailMessageKey ()
const QList<ArgumentType> & | arguments () const
QMailKey::Combiner | combiner () const
void | deserialize ( Stream & stream )
void | deserialize ( QDataStream & stream )
bool | isEmpty () const
bool | isNegated () const
bool | isNonMatching () const
void | serialize ( Stream & stream ) const
void | serialize ( QDataStream & stream ) const
const QList<QMailMessageKey> & | subKeys () const
| operator QVariant () const
bool | operator!= ( const QMailMessageKey & other ) const
QMailMessageKey | operator& ( const QMailMessageKey & other ) const
const QMailMessageKey & | operator&= ( const QMailMessageKey & other )
const QMailMessageKey & | operator= ( const QMailMessageKey & other )
bool | operator== ( const QMailMessageKey & other ) const
QMailMessageKey | operator| ( const QMailMessageKey & other ) const
const QMailMessageKey & | operator|= ( const QMailMessageKey & other )
QMailMessageKey | operator~ () const

## Static Public Members

QMailMessageKey | ancestorFolderIds ( const QMailFolderId & id, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | ancestorFolderIds ( const QMailFolderIdList & ids, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | ancestorFolderIds ( const QMailFolderKey & key, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | contentIdentifier ( const QString & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | contentIdentifier ( const QString & value, QMailDataComparator::InclusionComparator cmp )
QMailMessageKey | contentScheme ( const QString & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | contentScheme ( const QString & value, QMailDataComparator::InclusionComparator cmp )
QMailMessageKey | contentType ( QMailMessageMetaDataFwd::ContentType type, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | contentType ( const QList<QMailMessageMetaDataFwd::ContentType> & types, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | conversation ( const QMailMessageId & id )
QMailMessageKey | conversation ( const QMailMessageIdList & ids )
QMailMessageKey | conversation ( const QMailMessageKey & key )
QMailMessageKey | copyServerUid ( const QString & uid, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | copyServerUid ( const QString & uid, QMailDataComparator::InclusionComparator cmp )
QMailMessageKey | copyServerUid ( const QStringList & uids, QMailDataComparator::InclusionComparator cmp )
QMailMessageKey | customField ( const QString & name, QMailDataComparator::PresenceComparator cmp = QMailDataComparator::Present )
QMailMessageKey | customField ( const QString & name, const QString & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | customField ( const QString & name, const QString & value, QMailDataComparator::InclusionComparator cmp )
QMailMessageKey | id ( const QMailMessageId & id, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | id ( const QMailMessageIdList & ids, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | id ( const QMailMessageKey & key, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | inResponseTo ( const QMailMessageId & id, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | inResponseTo ( const QMailMessageIdList & ids, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | inResponseTo ( const QMailMessageKey & key, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | listId ( const QString & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | listId ( const QString & value, QMailDataComparator::InclusionComparator cmp )
QMailMessageKey | messageType ( QMailMessageMetaDataFwd::MessageType type, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | messageType ( int type, QMailDataComparator::InclusionComparator cmp )
QMailMessageKey | nonMatchingKey ()
QMailMessageKey | parentAccountId ( const QMailAccountId & id, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | parentAccountId ( const QMailAccountIdList & ids, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | parentAccountId ( const QMailAccountKey & key, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | parentFolderId ( const QMailFolderId & id, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | parentFolderId ( const QMailFolderIdList & ids, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | parentFolderId ( const QMailFolderKey & key, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | parentThreadId ( const QMailThreadId & id, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | parentThreadId ( const QMailThreadIdList & ids, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | parentThreadId ( const QMailThreadKey & key, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | previousParentFolderId ( const QMailFolderId & id, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | previousParentFolderId ( const QMailFolderIdList & ids, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | previousParentFolderId ( const QMailFolderKey & key, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | receptionTimeStamp ( const QDateTime & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | receptionTimeStamp ( const QDateTime & value, QMailDataComparator::RelationComparator cmp )
QMailMessageKey | recipients ( const QString & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | recipients ( const QString & value, QMailDataComparator::InclusionComparator cmp )
QMailMessageKey | responseType ( QMailMessageMetaDataFwd::ResponseType type, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | responseType ( const QList<QMailMessageMetaDataFwd::ResponseType> & types, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | restoreFolderId ( const QMailFolderId & id, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | restoreFolderId ( const QMailFolderIdList & ids, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | restoreFolderId ( const QMailFolderKey & key, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | rfcId ( const QString & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | rfcId ( const QString & value, QMailDataComparator::InclusionComparator cmp )
QMailMessageKey | sender ( const QString & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | sender ( const QString & value, QMailDataComparator::InclusionComparator cmp )
QMailMessageKey | sender ( const QString & value, QMailDataComparator::RelationComparator cmp )
QMailMessageKey | sender ( const QStringList & values, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | serverUid ( const QString & uid, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | serverUid ( const QString & uid, QMailDataComparator::InclusionComparator cmp )
QMailMessageKey | serverUid ( const QStringList & uids, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | size ( int value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | size ( int value, QMailDataComparator::RelationComparator cmp )
QMailMessageKey | status ( quint64 mask, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | status ( quint64 value, QMailDataComparator::EqualityComparator cmp )
QMailMessageKey | subject ( const QString & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | subject ( const QString & value, QMailDataComparator::InclusionComparator cmp )
QMailMessageKey | subject ( const QStringList & values, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes )
QMailMessageKey | timeStamp ( const QDateTime & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal )
QMailMessageKey | timeStamp ( const QDateTime & value, QMailDataComparator::RelationComparator cmp )

## Detailed Description

The QMailMessageKey class defines the parameters used for querying a subset of all available messages from the mail store.

A QMailMessageKey is composed of a message property, an optional comparison operator and a comparison value. The QMailMessageKey class is used in conjunction with the QMailStore::queryMessages() and QMailStore::countMessages() functions to filter results which meet the criteria defined by the key.

QMailMessageKeys can be combined using the logical operators (&), (|) and (~) to create more refined queries.

For example:

To create a query for all messages sent from "joe@user.com" with subject "meeting":

        QMailMessageKey subjectKey(QMailMessageKey::subject("meeting"));
        QMailMessageKey senderKey(QMailMessageKey::sender("joe@user.com"));
        QMailMessageIdList results = QMailStore::instance()->queryMessages(subjectKey & senderKey);

To query all unread messages from a specific folder:

        QMailMessageIdList unreadMessagesInFolder(const QMailFolderId& folderId)
        {
            QMailMessageKey parentFolderKey(QMailMessageKey::parentFolderId(folderId));
            QMailMessageKey unreadKey(QMailMessageKey::status(QMailMessage::Read, QMailDataComparator::Excludes));

            return QMailStore::instance()->queryMessages(parentFolderKey & unreadKey);
        }

See also QMailStore and QMailMessage.

## Member Type Documentation

### typedef QMailMessageKey::ArgumentType

Defines the type used to represent a single criterion of a message filter.

Synonym for QMailKeyArgument<QMailMessageKey::Property>.

### enum QMailMessageKey::Property
flags QMailMessageKey::Properties

This enum type describes the data query properties of a QMailMessage.

Constant | Value | Description
--- | --- | ---
`QMailMessageKey::Id` | `( 1<<0 )` | The ID of the message.
`QMailMessageKey::Type` | `( 1<<1 )` | The type of the message.
`QMailMessageKey::ParentFolderId` | `( 1<<2 )` | The parent folder ID this message is contained in.
`QMailMessageKey::Sender` | `( 1<<3 )` | The message sender address string.
`QMailMessageKey::Recipients` | `( 1<<4 )` | The message recipient address string.
`QMailMessageKey::Subject` | `( 1<<5 )` | The message subject string.
`QMailMessageKey::TimeStamp` | `( 1<<6 )` | The message origination timestamp.
`QMailMessageKey::ReceptionTimeStamp` | `( 1<<9 )` | The message reception timestamp.
`QMailMessageKey::Status` | `( 1<<7 )` | The message status flags.
`QMailMessageKey::Conversation` | `( 1<<8 )` | The set of related messages containing the specified message. This is deprecated, use QMailThreads instead.
`QMailMessageKey::ServerUid` | `( 1<<10 )` | The IMAP server UID of the message.
`QMailMessageKey::Size` | `( 1<<11 )` | The size of the message.
`QMailMessageKey::ParentAccountId` | `( 1<<12 )` | The ID of the account the message was downloaded from.
`QMailMessageKey::AncestorFolderIds` | `( 1<<13 )` | The set of IDs of folders which are direct or indirect parents of this message.
`QMailMessageKey::ContentType` | `( 1<<14 )` | The type of data contained within the message.
`QMailMessageKey::PreviousParentFolderId` | `( 1<<15 )` | The parent folder ID this message was contained in, prior to moving to the current parent folder.
`QMailMessageKey::ContentScheme` | `( 1<<16 )` | The scheme used to store the content of the message.
`QMailMessageKey::ContentIdentifier` | `( 1<<17 )` | The identifier used to store the content of the message.
`QMailMessageKey::InResponseTo` | `( 1<<18 )` | The identifier of the other message that the message was created in response to.
`QMailMessageKey::ResponseType` | `( 1<<19 )` | The type of response that the message was created as.
`QMailMessageKey::Custom` | `( 1<<20 )` | The custom fields of the message.
`QMailMessageKey::CopyServerUid` | `( 1<<21 )` | The serveruid this message is a copy of
`QMailMessageKey::RestoreFolderId` | `( 1<<22 )` | The folderId this message could be untrashed to
`QMailMessageKey::ListId` | `( 1<<23 )` | The list-id-namespace of this message
`QMailMessageKey::ParentThreadId` | `( 1<<26 )` | The threadId of the thread (conversation) this message is in.
`QMailMessageKey::Preview` | `( 1<<25 )` | The preview text for this message. Normally upto 280 characters of the beginning text of the message.
`QMailMessageKey::RfcId` | `( 1<<24 )` | The message rfcId, that is the message-id header field value.

The Properties type is a typedef for QFlags<Property>. It stores an OR combination of Property values.

## Member Function Documentation

### QMailMessageKey::QMailMessageKey ()

Creates a QMailMessageKey without specifying matching parameters.

A default-constructed key (one for which isEmpty() returns true) matches all messages.

See also isEmpty().

### QMailMessageKey::QMailMessageKey ( const QMailMessageKey & other )

Creates a copy of the QMailMessageKey other.

### QMailMessageKey::~QMailMessageKey () `[virtual]`

Destroys the QMailMessageKey

### QMailMessageKey QMailMessageKey::ancestorFolderIds ( const QMailFolderId & id, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose ancestor folders' identifiers contain id, according to cmp.

See also QMailMessage::parentFolderId().

### QMailMessageKey QMailMessageKey::ancestorFolderIds ( const QMailFolderIdList & ids, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose ancestor folders' identifiers contain a member of ids, according to cmp.

See also QMailMessage::parentFolderId().

### QMailMessageKey QMailMessageKey::ancestorFolderIds ( const QMailFolderKey & key, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose ancestor folders' identifiers contain a member of the set yielded by key, according to cmp.

See also QMailMessage::parentFolderId().

### const QList<ArgumentType> & QMailMessageKey::arguments () const

Returns the list of arguments to this QMailMessageKey.

### QMailKey::Combiner QMailMessageKey::combiner () const

Returns the combiner used to combine arguments or sub keys of this QMailMessageKey.

### QMailMessageKey QMailMessageKey::contentIdentifier ( const QString & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose content identifier matches value, according to cmp.

See also QMailMessage::contentIdentifier().

### QMailMessageKey QMailMessageKey::contentIdentifier ( const QString & value, QMailDataComparator::InclusionComparator cmp ) `[static]`

Returns a key matching messages whose content identifier matches the substring value, according to cmp.

See also QMailMessage::contentIdentifier().

### QMailMessageKey QMailMessageKey::contentScheme ( const QString & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose content scheme matches value, according to cmp.

See also QMailMessage::contentScheme().

### QMailMessageKey QMailMessageKey::contentScheme ( const QString & value, QMailDataComparator::InclusionComparator cmp ) `[static]`

Returns a key matching messages whose content scheme matches the substring value, according to cmp.

See also QMailMessage::contentScheme().

### QMailMessageKey QMailMessageKey::contentType ( QMailMessageMetaDataFwd::ContentType type, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose content type matches type, according to cmp.

See also QMailMessage::content().

### QMailMessageKey QMailMessageKey::contentType ( const QList<QMailMessageMetaDataFwd::ContentType> & types, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose content type is a member of types, according to cmp.

See also QMailMessage::content().

### QMailMessageKey QMailMessageKey::conversation ( const QMailMessageId & id ) `[static]`

Returns a key matching messages that are participants in the conversation containing the message identified by id. This is deprecated. Use QMailThread's instead.

See also QMailMessage::parentThreadId().

### QMailMessageKey QMailMessageKey::conversation ( const QMailMessageIdList & ids ) `[static]`

Returns a key matching messages that are participants in any of the conversations containing the messages whose identifiers are members of ids. This is deprecated. Use QMailThread's instead.

See also QMailMessage::parentThreadId().

### QMailMessageKey QMailMessageKey::conversation ( const QMailMessageKey & key ) `[static]`

Returns a key matching messages that are participants in any of the conversations containing the messages whose identifiers are members of the set yielded by key. This is deprecated. Use QMailThread's instead.

See also QMailMessage::parentThreadId().

### QMailMessageKey QMailMessageKey::copyServerUid ( const QString & uid, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose copyServerUid matches uid, according to cmp.

See also QMailMessage::copyServerUid().

### QMailMessageKey QMailMessageKey::copyServerUid ( const QString & uid, QMailDataComparator::InclusionComparator cmp ) `[static]`

Returns a key matching messages whose copyServerUid matches the substring uid, according to cmp.

See also QMailMessage::copyServerUid().

### QMailMessageKey QMailMessageKey::copyServerUid ( const QStringList & uids, QMailDataComparator::InclusionComparator cmp ) `[static]`

Returns a key matching messages whose serverUid is a member of uids, according to cmp.

See also QMailMessage::copyServerUid().

### QMailMessageKey QMailMessageKey::customField ( const QString & name, QMailDataComparator::PresenceComparator cmp = QMailDataComparator::Present ) `[static]`

Returns a key matching messages that possess a custom field with the name name, according to cmp.

See also QMailMessage::customField().

### QMailMessageKey QMailMessageKey::customField ( const QString & name, const QString & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages that possess a custom field with the name name, whose value matches value, according to cmp.

See also QMailMessage::customField().

### QMailMessageKey QMailMessageKey::customField ( const QString & name, const QString & value, QMailDataComparator::InclusionComparator cmp ) `[static]`

Returns a key matching messages that possess a custom field with the name name, whose value matches the substring value, according to cmp.

See also QMailMessage::customField().

### void QMailMessageKey::deserialize ( Stream & stream )

Reads the contents of a QMailMessageKey from stream.

### void QMailMessageKey::deserialize ( QDataStream & stream )

### QMailMessageKey QMailMessageKey::id ( const QMailMessageId & id, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose identifier matches id, according to cmp.

See also QMailMessage::id().

### QMailMessageKey QMailMessageKey::id ( const QMailMessageIdList & ids, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose identifier is a member of ids, according to cmp.

See also QMailMessage::id().

### QMailMessageKey QMailMessageKey::id ( const QMailMessageKey & key, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose identifier is a member of the set yielded by key, according to cmp.

See also QMailMessage::id().

### QMailMessageKey QMailMessageKey::inResponseTo ( const QMailMessageId & id, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose precursor message's identifier matches id, according to cmp.

See also QMailMessage::inResponseTo().

### QMailMessageKey QMailMessageKey::inResponseTo ( const QMailMessageIdList & ids, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose precursor message's identifier is a member of ids, according to cmp.

See also QMailMessage::inResponseTo().

### QMailMessageKey QMailMessageKey::inResponseTo ( const QMailMessageKey & key, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose precursor message's identifier is a member of the set yielded by key, according to cmp.

See also QMailMessage::inResponseTo().

### bool QMailMessageKey::isEmpty () const

Returns true if the key remains empty after default construction; otherwise returns false.

An empty key matches all messages.

The result of combining an empty key with a non-empty key is the original non-empty key. This is true regardless of whether the combination is formed by an AND or an OR operation.

The result of combining two empty keys is an empty key.

See also isNonMatching().

### bool QMailMessageKey::isNegated () const

Returns true if the key's criteria should be negated in application.

### bool QMailMessageKey::isNonMatching () const

Returns true if the key is a non-matching key; otherwise returns false.

A non-matching key does not match any messages.

The result of ANDing a non-matching key with a matching key is a non-matching key. The result of ORing a non-matching key with a matching key is the original matching key.

The result of combining two non-matching keys is a non-matching key.

See also nonMatchingKey() and isEmpty().

### QMailMessageKey QMailMessageKey::listId ( const QString & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose list identifier matches value, according to cmp.

See also QMailMessage::listId().

### QMailMessageKey QMailMessageKey::listId ( const QString & value, QMailDataComparator::InclusionComparator cmp ) `[static]`

Returns a key matching messages whose list identifier matches the substring value, according to cmp.

See also QMailMessage::listId().

### QMailMessageKey QMailMessageKey::messageType ( QMailMessageMetaDataFwd::MessageType type, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose messageType matches type, according to cmp.

See also QMailMessage::messageType().

### QMailMessageKey QMailMessageKey::messageType ( int type, QMailDataComparator::InclusionComparator cmp ) `[static]`

Returns a key matching accounts whose messageType is a bitwise match to type, according to cmp.

See also QMailMessage::messageType().

### QMailMessageKey QMailMessageKey::nonMatchingKey () `[static]`

Returns a key that does not match any messages (unlike an empty key).

See also isNonMatching() and isEmpty().

### QMailMessageKey QMailMessageKey::parentAccountId ( const QMailAccountId & id, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose parent account's identifier matches id, according to cmp.

See also QMailMessage::parentAccountId().

### QMailMessageKey QMailMessageKey::parentAccountId ( const QMailAccountIdList & ids, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose parent account's identifier is a member of ids, according to cmp.

See also QMailMessage::parentAccountId().

### QMailMessageKey QMailMessageKey::parentAccountId ( const QMailAccountKey & key, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose parent account's identifier is a member of the set yielded by key, according to cmp.

See also QMailMessage::parentAccountId().

### QMailMessageKey QMailMessageKey::parentFolderId ( const QMailFolderId & id, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose parent folder's identifier matches id, according to cmp.

See also QMailMessage::parentFolderId().

### QMailMessageKey QMailMessageKey::parentFolderId ( const QMailFolderIdList & ids, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose parent folder's identifier is a member of ids, according to cmp.

See also QMailMessage::parentFolderId().

### QMailMessageKey QMailMessageKey::parentFolderId ( const QMailFolderKey & key, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose parent folder's identifier is a member of the set yielded by key, according to cmp.

See also QMailMessage::parentFolderId().

### QMailMessageKey QMailMessageKey::parentThreadId ( const QMailThreadId & id, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose parent thread identifier matches id, according to cmp.

### QMailMessageKey QMailMessageKey::parentThreadId ( const QMailThreadIdList & ids, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose thread is a member of ids, according to cmp.

### QMailMessageKey QMailMessageKey::parentThreadId ( const QMailThreadKey & key, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose thread matched key, according to cmp.

### QMailMessageKey QMailMessageKey::previousParentFolderId ( const QMailFolderId & id, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose previous parent folder's identifier matches id, according to cmp.

See also QMailMessage::previousParentFolderId().

### QMailMessageKey QMailMessageKey::previousParentFolderId ( const QMailFolderIdList & ids, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose previous parent folder's identifier is a member of ids, according to cmp.

See also QMailMessage::previousParentFolderId().

### QMailMessageKey QMailMessageKey::previousParentFolderId ( const QMailFolderKey & key, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose previous parent folder's identifier is a member of the set yielded by key, according to cmp.

See also QMailMessage::previousParentFolderId().

### QMailMessageKey QMailMessageKey::receptionTimeStamp ( const QDateTime & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose reception timestamp matches value, according to cmp.

See also QMailMessage::receivedDate().

### QMailMessageKey QMailMessageKey::receptionTimeStamp ( const QDateTime & value, QMailDataComparator::RelationComparator cmp ) `[static]`

Returns a key matching messages whose reception timestamp has the relation to value that is specified by cmp.

See also QMailMessage::receivedDate().

### QMailMessageKey QMailMessageKey::recipients ( const QString & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose recipients include value, according to cmp.

See also QMailMessage::to(), QMailMessage::cc(), and QMailMessage::bcc().

### QMailMessageKey QMailMessageKey::recipients ( const QString & value, QMailDataComparator::InclusionComparator cmp ) `[static]`

Returns a key matching messages whose recipients include the substring value, according to cmp.

See also QMailMessage::to(), QMailMessage::cc(), and QMailMessage::bcc().

### QMailMessageKey QMailMessageKey::responseType ( QMailMessageMetaDataFwd::ResponseType type, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose response type matches type, according to cmp.

See also QMailMessage::responseType().

### QMailMessageKey QMailMessageKey::responseType ( const QList<QMailMessageMetaDataFwd::ResponseType> & types, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose response type is a member of types, according to cmp.

See also QMailMessage::responseType().

### QMailMessageKey QMailMessageKey::restoreFolderId ( const QMailFolderId & id, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose restore folder identifier's matches id, according to cmp.

See also QMailMessage::restoreFolderId().

### QMailMessageKey QMailMessageKey::restoreFolderId ( const QMailFolderIdList & ids, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose restore folder's identifier is a member of ids, according to cmp.

See also QMailMessage::previousParentFolderId().

### QMailMessageKey QMailMessageKey::restoreFolderId ( const QMailFolderKey & key, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose previous parent folder's identifier is a member of the set yielded by key, according to cmp.

See also QMailMessage::previousParentFolderId().

### QMailMessageKey QMailMessageKey::rfcId ( const QString & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose rfc identifier matches value, according to cmp.

See also QMailMessage::rfcId().

### QMailMessageKey QMailMessageKey::rfcId ( const QString & value, QMailDataComparator::InclusionComparator cmp ) `[static]`

Returns a key matching messages whose content identifier matches the substring value, according to cmp.

See also QMailMessage::rfcId().

### QMailMessageKey QMailMessageKey::sender ( const QString & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose sender matches value, according to cmp.

See also QMailMessage::from().

### QMailMessageKey QMailMessageKey::sender ( const QString & value, QMailDataComparator::InclusionComparator cmp ) `[static]`

Returns a key matching messages whose sender matches the substring value, according to cmp.

See also QMailMessage::from().

### QMailMessageKey QMailMessageKey::sender ( const QString & value, QMailDataComparator::RelationComparator cmp ) `[static]`

Return a key matching messages whose sender is alphabetically matches

Constant | Value | Description
--- | --- | ---
`QMailMessageKey::according` | ? | to `\cmp`

### QMailMessageKey QMailMessageKey::sender ( const QStringList & values, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose sender is a member of values, according to cmp.

See also QMailMessage::from().

### void QMailMessageKey::serialize ( Stream & stream ) const

Writes the contents of a QMailMessageKey to a stream.

### void QMailMessageKey::serialize ( QDataStream & stream ) const

### QMailMessageKey QMailMessageKey::serverUid ( const QString & uid, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose serverUid matches uid, according to cmp.

See also QMailMessage::serverUid().

### QMailMessageKey QMailMessageKey::serverUid ( const QString & uid, QMailDataComparator::InclusionComparator cmp ) `[static]`

Returns a key matching messages whose serverUid matches the substring uid, according to cmp.

See also QMailMessage::serverUid().

### QMailMessageKey QMailMessageKey::serverUid ( const QStringList & uids, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose serverUid is a member of uids, according to cmp.

See also QMailMessage::serverUid().

### QMailMessageKey QMailMessageKey::size ( int value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose size matches value, according to cmp.

See also QMailMessage::size().

### QMailMessageKey QMailMessageKey::size ( int value, QMailDataComparator::RelationComparator cmp ) `[static]`

Returns a key matching messages whose size has the relation to value that is specified by cmp.

See also QMailMessage::size().

### QMailMessageKey QMailMessageKey::status ( quint64 mask, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose status is a bitwise match to mask, according to cmp.

See also QMailMessage::status().

### QMailMessageKey QMailMessageKey::status ( quint64 value, QMailDataComparator::EqualityComparator cmp ) `[static]`

Returns a key matching messages whose status matches value, according to cmp.

See also QMailMessage::status().

### const QList<QMailMessageKey> & QMailMessageKey::subKeys () const

Returns the list of sub keys held by this QMailMessageKey.

### QMailMessageKey QMailMessageKey::subject ( const QString & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose subject matches value, according to cmp.

See also QMailMessage::subject().

### QMailMessageKey QMailMessageKey::subject ( const QString & value, QMailDataComparator::InclusionComparator cmp ) `[static]`

Returns a key matching messages whose subject matches the substring value, according to cmp.

See also QMailMessage::subject().

### QMailMessageKey QMailMessageKey::subject ( const QStringList & values, QMailDataComparator::InclusionComparator cmp = QMailDataComparator::Includes ) `[static]`

Returns a key matching messages whose subject is a member of values, according to cmp.

See also QMailMessage::subject().

### QMailMessageKey QMailMessageKey::timeStamp ( const QDateTime & value, QMailDataComparator::EqualityComparator cmp = QMailDataComparator::Equal ) `[static]`

Returns a key matching messages whose timestamp matches value, according to cmp.

See also QMailMessage::date().

### QMailMessageKey QMailMessageKey::timeStamp ( const QDateTime & value, QMailDataComparator::RelationComparator cmp ) `[static]`

Returns a key matching messages whose timestamp has the relation to value that is specified by cmp.

See also QMailMessage::date().

### QMailMessageKey::operator QVariant () const

Returns the QVariant representation of this QMailMessageKey.

### bool QMailMessageKey::operator!= ( const QMailMessageKey & other ) const

Returns `true` if the value of this key is not the same as the key other. Returns `false` otherwise.

### QMailMessageKey QMailMessageKey::operator& ( const QMailMessageKey & other ) const

Returns a key that is the logical AND of this key and the value of key other.

### const QMailMessageKey & QMailMessageKey::operator&= ( const QMailMessageKey & other )

Performs a logical AND with this key and the key other and assigns the result to this key.

### const QMailMessageKey & QMailMessageKey::operator= ( const QMailMessageKey & other )

Assign the value of the QMailMessageKey other to this.

### bool QMailMessageKey::operator== ( const QMailMessageKey & other ) const

Returns `true` if the value of this key is the same as the key other. Returns `false` otherwise.

### QMailMessageKey QMailMessageKey::operator| ( const QMailMessageKey & other ) const

Returns a key that is the logical OR of this key and the value of key other.

### const QMailMessageKey & QMailMessageKey::operator|= ( const QMailMessageKey & other )

Performs a logical OR with this key and the key other and assigns the result to this key.

### QMailMessageKey QMailMessageKey::operator~ () const

Returns a key that is the logical NOT of the value of this key.

If this key is empty, the result will be a non-matching key; if this key is non-matching, the result will be an empty key.

See also isEmpty() and isNonMatching().