Home

QMailSearchAction Class Reference

The QMailSearchAction class provides the interface for identifying messages that match a set of search criteria. More...

    #include <QMailSearchAction>

This class is under development and is subject to change.

Inherits QMailServiceAction.


Public Types

enum SearchSpecification { Local, Remote }

Public Functions

QMailSearchAction ( QObject * parent = 0 )
QMailMessageIdList matchingMessageIds () const

Public Slots

virtual void cancelOperation ()
void searchMessages ( const QMailMessageKey & filter, const QString & bodyText, SearchSpecification spec, const QMailMessageSortKey & sort = QMailMessageSortKey() )

Signals

void messageIdsMatched ( const QMailMessageIdList & ids )

Additional Inherited Members


Detailed Description

The QMailSearchAction class provides the interface for identifying messages that match a set of search criteria.

QMailSearchAction provides the mechanism for messaging clients to request that the message server perform a search for messages that match the supplied search criteria. For criteria pertaining to message meta data, the message server will search within the locally held meta data. For a textual content criterion, the message server will search locally where the message content is held locally, and on the external server for messages whose content has not been retrieved (provided the external service provides a search facility).


Member Type Documentation

enum QMailSearchAction::SearchSpecification

This enum type is specify the form of search that the message server should perform.

ConstantValueDescription
QMailSearchAction::Local0Only the message data stored on the local device should be searched.
QMailSearchAction::Remote1The search should be extended to message data stored on external servers.


Member Function Documentation

QMailSearchAction::QMailSearchAction ( QObject * parent = 0 )

Constructs a new search action object with the supplied parent.

void QMailSearchAction::cancelOperation ()   [virtual slot]

Reimplemented from QMailServiceAction::cancelOperation().

Attempts to cancel the last requested search operation.

QMailMessageIdList QMailSearchAction::matchingMessageIds () const

Returns the list of message identifiers found to match the search criteria. Unless activity() returns Successful, an empty list is returned.

void QMailSearchAction::messageIdsMatched ( const QMailMessageIdList & ids )   [signal]

This signal is emitted when the messages in ids are discovered to match the criteria of the search in progress.

See also matchingMessageIds().

void QMailSearchAction::searchMessages ( const QMailMessageKey & filter, const QString & bodyText, SearchSpecification spec, const QMailMessageSortKey & sort = QMailMessageSortKey() )   [slot]

Requests that the message server identify all messages that match the criteria specified by filter. If bodyText is non-empty, identified messages must also contain the supplied text in their content.

If spec is Remote, then the external service will be requested to perform the search for messages not stored locally.

If sort is not empty, the external service will return matching messages in the ordering indicated by the sort criterion if possible.


Copyright © 2010 QtSoftware
Messaging Framework