MessageTransaction

Since: BlackBerry 10.0.0

#include <bb/pim/message/MessageTransaction>

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

The MessageTransaction class represents an action that can take place on a particular message in the message database.

For example, messages can be added to, removed from, or updated in the message database, and you can use this class to determine the type of change that a particular transaction represents. You can also use this class to synchronize any changes between your app's local cache of transactions and the message database.


Overview

Public Types Index

enum Type

Unknown =0, Add = 1, Update = 2, Delete = 3

Public Functions Index

MessageTransaction ()
MessageTransaction (const MessageTransaction &other)
MessageTransaction (MessageTransactionPrivate *messageTransactionPrivate)
~MessageTransaction ()
bb::pim::account::AccountKeyaccountId () const
ConversationKeyconversationId () const
FolderKeyfolderId () const
bb::pim::message::TransactionKeyid () const
boolisValid () const
MessageKeymessageId () const
MessageTransaction &operator= (const MessageTransaction &other)
MessageTransaction::Typetype () const

Public Types

Type

An enumeration of possible message transaction types.

Since:

BlackBerry 10.0.0

Unknown =0

Indicates an unknown transaction type.

Add = 1

Indicates that a message was added.

Since:

BlackBerry 10.0.0

Update = 2

Indicates that a message was updated.

Since:

BlackBerry 10.0.0

Delete = 3

Indicates that a message was deleted.

Since:

BlackBerry 10.0.0

Public Functions

MessageTransaction ()

Constructs a new MessageTransaction.

Since:

BlackBerry 10.0.0

MessageTransaction (

Copy constructor.

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

Parameters
other

The MessageTransaction to be copied.

Since:

BlackBerry 10.0.0

MessageTransaction (
  • MessageTransactionPrivate *messageTransactionPrivate)

Constructs a new MessageTransaction using the provided MessageTransactionPrivate object.

Parameters
messageTransactionPrivate

The MessageTransactionPrivate object to use to construct the MessageTransaction.

Since:

BlackBerry 10.0.0

~MessageTransaction ()

Destructor.

Since:

BlackBerry 10.0.0

bb::pim::account::AccountKey accountId ()

Returns the account ID of this MessageTransaction.

Return:

The account ID as an AccountKey object.

Since:

BlackBerry 10.0.0

ConversationKey conversationId ()

Returns the conversation ID of this MessageTransaction.

Return:

The conversation ID as a ConversationKey object.

Since:

BlackBerry 10.0.0

FolderKey folderId ()

Returns the folder ID of this MessageTransaction.

Return:

The folder ID as a FolderKey object.

Since:

BlackBerry 10.0.0

bb::pim::message::TransactionKey id ()

Returns the transaction ID of this MessageTransaction.

Return:

The transaction ID as a TransactionKey object.

Since:

BlackBerry 10.0.0

bool isValid ()

Indicates whether this MessageTransaction is a valid transaction.

Return:

true if this MessageTransaction is valid, false otherwise.

Since:

BlackBerry 10.0.0

MessageKey messageId ()

Returns the message ID of this MessageTransaction.

Return:

The message ID as a MessageKey object.

Since:

BlackBerry 10.0.0

MessageTransaction & operator= (

Assignment operator.

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

Parameters
other

The MessageTransaction from which to copy all values.

Return:

A MessageTransaction with all copied data.

Since:

BlackBerry 10.0.0

MessageTransaction::Type type ()

Returns the type of transaction that this MessageTransaction represents.

You can use this function to determine if the transaction was a message addition, update, or deletion.

Return:

The transaction type as a value from the MessageTransaction::Type enumeration.

Since:

BlackBerry 10.0.0

Last modified: 2014-06-24



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

comments powered by Disqus