MessageUpdateFilter

Since: BlackBerry 10.0.0

#include <bb/pim/message/MessageUpdateFilter>

To link against this class, add the following line to your .pro file: LIBS += -lbbpim

The MessageUpdateFilter class lets you specify options and parameters for bulk options.

This class lets you specify options and parameters for bulk message update options, such as mark or delete, and hide. To use this class, you need to instantiate a MessageUpdateFilter object and set the priorDateTime and folderId. You can optionally set MessageUpdateFilter::OperateOnFiledMessages or MessageUpdateFilter::OperateOnSentMessages (these options are not required when specifying a folder ID for a folder operation). Once the object is created, you can pass it to the MessageService::markHidden() method.


Overview

Public Types Index

enum UpdateOperation

Unknown 0, MarkRead 1, MarkUnread 2, Delete 3, Hide 4, UnHide 5

enum UpdateOptions

OperateOnFiledMessages 1 << 0, OperateOnSentMessages 1 << 1

Public Functions Index

MessageUpdateFilter ()
MessageUpdateFilter (const MessageUpdateFilter &other)
~MessageUpdateFilter ()
MessageFolderKeygetFolderId () const
intgetOptions () const
QStringgetPriorDateTime () const
boolisPriorityInboxSearch () const
MessageUpdateFilter &operator= (const MessageUpdateFilter &other)
voidsetFolderId (MessageFolderKey folderId)
voidsetOptions (int value)
voidsetPriorDateTime (QDateTime &dateTime)
voidsetPriorityInboxSearch (bool)

Public Types

UpdateOperation

An enumeration of supported operations for bulk message processing.

Since:

BlackBerry 10.0.0

Unknown 0

Indicates an unknown operation.

MarkRead 1

Indicates a mark all as read operation.

Since:

BlackBerry 10.0.0

MarkUnread 2

Indicates a mark all as unread operation.

Since:

BlackBerry 10.0.0

Delete 3

Indicates a delete operation.

Since:

BlackBerry 10.0.0

Hide 4

Indicates a hide operation.

Since:

BlackBerry 10.0.0

UnHide 5

Indicates an unhide operation.

This operation is currently not supported.

Since:

BlackBerry 10.0.0

UpdateOptions

An enumeration of supported update filtering options.

Since:

BlackBerry 10.3.0

OperateOnFiledMessages 1 << 0

Indicates filtering on filed messages.

Since:

BlackBerry 10.3.0

OperateOnSentMessages 1 << 1

Indicates filtering on sent messages.

Since:

BlackBerry 10.3.0

Public Functions

MessageUpdateFilter ()

Constructs a new MessageUpdateFilter.

Since:

BlackBerry 10.0.0

MessageUpdateFilter (

Copy constructor.

This method constructs a MessageUpdateFilter containing exactly the same values as the provided MessageUpdateFilter.

Parameters
other

The MessageUpdateFilter to be copied.

Since:

BlackBerry 10.0.0

~MessageUpdateFilter ()

Destructor.

This method cleans up and frees data and resources for the MessageUpdateFilter.

Since:

BlackBerry 10.0.0

MessageFolderKey getFolderId ()

Gets the folder ID of the message folder that MessageUpdateFilter applies to.

Return:

The folder ID of the message folder that MessageUpdateFilter applies to.

Since:

BlackBerry 10.0.0

int getOptions ()

Gets all the options set for this MessageUpdateFilter.

This method returns the options set for this MessageUpdateFilter, as defined by MessageUpdateFilter::Options. For example, to check if OperateOnFiledMessages is set, call this method as follows:

 if (getOptions() & MessageUpdateFilter::OperateOnFiledMessages) != 0
Return:

The options that are set, as defined by MessageUpdateFilter::Options.

Since:

BlackBerry 10.0.0

QString getPriorDateTime ()

Gets the prior date and time values.

This method gets the prior date and time values used by operations using MessageUpdateFilter.

Return:

A QString object expressed in yyyy-MM-dd hh:mm:ss.zzzzzz format (for example, 2012-07-25 23:59:59.999999).

Since:

BlackBerry 10.0.0

bool isPriorityInboxSearch ()

Gets the priority inbox flag for MessageSearchFilter.

Return:

True if only priority inbox messages are operated on, false otherwise.

Since:

BlackBerry 10.2.0

MessageUpdateFilter & operator= (

Assignment operator.

This operator copies all values from the provided MessageUpdateFilter into this MessageUpdateFilter.

Parameters
other

The MessageUpdateFilter from which to copy all values.

Return:

A MessageUpdateFilter with all copied data.

Since:

BlackBerry 10.0.0

void setFolderId (
  • MessageFolderKeyfolderId)

Sets the folder ID of the message folder that MessageUpdateFilter applies to.

Parameters
folderId

The folder where the MarkPrior Or DeletePrior operation is performed.

Since:

BlackBerry 10.0.0

void setOptions (
  • intvalue)

Adds option flags to this MessageUpdateFilter.

This method sets option flags for this MessageUpdateFilter. For example, if you want to exclude filed messages, call this method as follows:

 setOptions(getOptions() | MessageUpdateFilter::OperateOnFiledMessages)
Parameters
value

The MessageUpdateFilter::Options to set.

Since:

BlackBerry 10.0.0

void setPriorDateTime (

Sets the prior date and time values.

This method sets the prior date and time values used by operations using MessageUpdateFilter.

Parameters
dateTime

The date and time representing the upperbound time limit on the bulk delete action. This is expressed in yyyy-MM-dd hh:mm:ss.zzzzzz format, for example, 2013-07-25 23:59:59.999999).

Since:

BlackBerry 10.0.0

void setPriorityInboxSearch (
  • bool)

Sets the priority inbox flag for MessageSearchFilter.

Parameters
isPriorityInboxSearch

True if only priority inbox messages are to be operated on, false otherwise.

Since:

BlackBerry 10.2.0

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus