MessageUpdate

Since: BlackBerry 10.0.0

#include <bb/pim/message/MessageUpdate>

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

The MessageUpdate class represents a change or update to a message.

You can use a MessageUpdate object to apply a change or update to an existing message that your app retrieved from the MessageService. You can listen for updates to messages from the MessageService (for example, by listening for the MessageService::messageUpdated() signal), and then use the provided MessageUpdate object to update your app's local copy of the message.

To update a message, you can call Message::apply(). In this way, you can keep your app's local copy of a message in sync with the server's copy.


Overview

Public Types Index

Public Functions Index

MessageUpdate ()
MessageUpdate (const MessageUpdate &other)
MessageUpdate (MessageUpdatePrivate *messageUpdatePrivate)
~MessageUpdate ()
boolcontains (MessageUpdate::Type type) const
voidinsert (MessageUpdate::Type type, const QVariant &value)
boolisValid ()
MessageUpdate &operator= (const MessageUpdate &other)
const QVariantvalue (MessageUpdate::Type type) const

Public Types

Type

An enumeration of supported types of message updates.

Since:

BlackBerry 10.0.0

None = 1
Read = 2

Indicates that the read status of the message has been updated.

Since:

BlackBerry 10.0.0

Flagged = 3

Indicates that the flagged status of the message has been updated.

Since:

BlackBerry 10.0.0

FolderChanged = 4

Indicates that the folder that the message is contained in has been updated.

Since:

BlackBerry 10.0.0

StatusChanged = 5

Indicates that the transmission status of the message has been updated.

Since:

BlackBerry 10.0.0

ReplyStateChanged = 6

Indicates that the reply state of the message has been updated.

Since:

BlackBerry 10.2.0

ReplyStateTimeChanged = 7

Indicates that the reply state time of the message has been updated.

Since:

BlackBerry 10.2.0

Public Functions

MessageUpdate ()

Constructs a new MessageUpdate.

Since:

BlackBerry 10.0.0

MessageUpdate (

Copy constructor.

This function constructs a MessageUpdate containing exactly the same values as the provided MessageUpdate.

Parameters
other

The MessageUpdate to be copied.

Since:

BlackBerry 10.0.0

MessageUpdate (
  • MessageUpdatePrivate *messageUpdatePrivate)

Constructs a MessageUpdate with the provided private message update information.

This constructor creates a MessageUpdate by using a d_ptr to private message update information.

Parameters
messageUpdatePrivate

The private message update information to use.

Since:

BlackBerry 10.0.0

~MessageUpdate ()

Destructor.

Since:

BlackBerry 10.0.0

bool contains (

Indicates whether this MessageUpdate includes the provided type of update.

For example, you can use this function to determine if this MessageUpdate includes an update to read status by calling the function with MessageUpdate::Read as the argument.

Parameters
type

The type of message update to query for.

Return:

true if this MessageUpdate includes the provided type of update, false otherwise.

Since:

BlackBerry 10.0.0

void insert (

Inserts an update value for the provided type into this MessageUpdate.

Parameters
type

The type of message update to insert the value for.

value

The value to insert.

Since:

BlackBerry 10.0.0

bool isValid ()

Indicates whether this MessageUpdate is valid.

Return:

true if this MessageUpdate is valid, false otherwise.

Since:

BlackBerry 10.0.0

MessageUpdate & operator= (

Assignment operator.

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

Parameters
other

The MessageUpdate from which to copy all values.

Return:

A MessageUpdate with all copied data.

Since:

BlackBerry 10.0.0

const QVariant value (

Retrieves the value that's associated with the provided update type in this MessageUpdate.

Parameters
type

The type of message update to retrieve the value for.

Return:

The value of the provided type of message update.

Since:

BlackBerry 10.0.0

Last modified: 2014-03-13

comments powered by Disqus