Conversation

Since: BlackBerry 10.0.0

#include <bb/pim/message/Conversation>

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

The Conversation class represents a conversation between message recipients.

A conversation is a set of related messages between recipients. By using the Conversation class, you can retrieve information such as conversation subject, participants, and the most recent message in the conversation. You can use this information to display a conversation in a custom interface that you create yourself (for example, an interface that's similar to BBM).

You can also use the MessageService to retrieve conversation information. For example, you can retrieve a list of conversations by calling MessageService::conversations(), or retrieve a list of just conversation IDs by calling MessageService::conversationKeys().


Overview

Public Functions Index

Conversation ()
Conversation (const Conversation &other)
Conversation (ConversationPrivate *conversationPrivate)
~Conversation ()
bb::pim::account::AccountKeyaccountId () const
voidapply (const ConversationUpdate &data)
QList< FolderKey >folderIds () const
ConversationKeyid () const
boolisHidden () const BB_DEPRECATED
boolisLevelOneAlert () const
boolisPriorityInbox () const
boolisValid () const
MessageKeylatestMessageId () const
intmessageCount () const
MessageRightsmessageRights () const
QStringmimeType () const
QStringname () const
Conversation &operator= (const Conversation &other)
QList< MessageContact >participants () const
MessageReplyState::TypereplyState () const
QDateTimereplyStateTimestamp () const
QStringsourceId () const
ConversationStatus::Typesstatus () const
QStringsubject () const
QStringsummary () const
QDateTimetimeStamp () const
longtransmissionStatus () const
intunreadMessageCount () const

Public Functions

Conversation ()

Constructs a new Conversation.

Since:

BlackBerry 10.0.0

Conversation (

Copy constructor.

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

Parameters
other

The Conversation to be copied.

Since:

BlackBerry 10.0.0

Conversation (
  • ConversationPrivate *conversationPrivate)

Constructs a Conversation with the provided private conversation information.

This constructor creates a Conversation by using a d_ptr to private conversation information.

Parameters
conversationPrivate

The private conversation information to use.

Since:

BlackBerry 10.0.0

~Conversation ()

Destructor.

Since:

BlackBerry 10.0.0

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

Retrieves the account ID of this Conversation.

You can use this ID to determine which account the conversation belongs to.

Return:

The conversation's account ID.

Since:

BlackBerry 10.0.0

void apply (

Applies the provided conversation update to this Conversation.

This update is triggered by user interaction such as reading or flagging a message in the conversation. The ConversationUpdate class includes information for a particular update of a conversation.

Parameters
data

The conversation update to apply.

Since:

BlackBerry 10.0.0

QList< FolderKey > folderIds ()

Retrieves the list of folder IDs for this Conversation.

The folder IDs are based on the folder ID of each message in the conversation (in no particular order).

For example, consider a conversation that consists of messages from the following folders:
  • inbox

  • inbox

  • sent

  • inbox

In this case, this function returns a QList with two folder IDs: inbox and sent.

Return:

The conversation's folder IDs.

Since:

BlackBerry 10.0.0

ConversationKey id ()

Retrieves the ID of this Conversation.

This ID is unique per account.

Return:

The conversation's ID.

Since:

BlackBerry 10.0.0

bool isHidden ()

This function has been deprecated.

Indicates whether this Conversation is hidden. You can use this function to determine whether or not a Conversation that's returned from the message service is hidden.

Deprecated

BlackBerry 10.3.1. Conversation with all HIDDEN messages (a.k.a. deleted only on a device) is effectively a conversation with no messages. Conversation is no longer valid and Conversation.isValid() call returns False in that case.

Return:

True if this Conversation is hidden, false otherwise.

Since:

BlackBerry 10.3.0

bool isLevelOneAlert ()

Indicates whether this Conversation is flagged as a level one alert.

You can use this function to determine whether or not a Conversation that's returned from the message service is flagged as level one alert.

Return:

True if this Conversation is flagged as a level one alert, false otherwise.

Since:

BlackBerry 10.3.0

bool isPriorityInbox ()

Indicates whether this Conversation should be in the priority inbox.

You can use this function to determine whether or not a conversation that's returned from the message service should be in the priority inbox.

Return:

true if this Conversation should be in the priority inbox, false otherwise.

Since:

BlackBerry 10.2.0

bool isValid ()

Indicates whether this Conversation is valid.

Return:

true if this Conversation is valid, false otherwise.

Since:

BlackBerry 10.0.0

MessageKey latestMessageId ()

Retrieves the ID of the most recent message in this Conversation.

Return:

The ID of the most recent message in the conversation.

Since:

BlackBerry 10.0.0

int messageCount ()

Retrieves the number of messages in this Conversation.

Return:

The number of messages in the conversation.

Since:

BlackBerry 10.0.0

MessageRights messageRights ()

Retrieves the message rights of this Conversation.

This function returns the message permissions or rights as a MessageRights object.

Return:

The message rights object.

Since:

BlackBerry 10.3.0

QString mimeType ()

Retrieves the MIME type of this Conversation.

Return:

The conversation's MIME type, as a QString.

Since:

BlackBerry 10.0.0

QString name ()

Retrieves the name of this Conversation.

Return:

The conversation's name.

Since:

BlackBerry 10.0.0

Conversation & operator= (

Assignment operator.

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

Parameters
other

The Conversation from which to copy all values.

Return:

A Conversation with all copied data.

Since:

BlackBerry 10.0.0

QList< MessageContact > participants ()

Retrieves a list of the participants in this Conversation.

Return:

A list of the conversation's participants.

Since:

BlackBerry 10.0.0

MessageReplyState::Type replyState ()

Retrieves the reply state of this Conversation.

The reply state of a conversation is represented by the MessageReplyState::Type enumeration and includes values such as Replied and Forwarded. For conversations, the reply state is the reply state value of the most recent inbound Message in the conversation.

Return:

The conversation reply state.

Since:

BlackBerry 10.2.0

QDateTime replyStateTimestamp ()

Retrieves the reply state timestamp of this Conversation.

The reply state timestamp indicates when the most recent inbound Message in the conversation was last replied to or forwarded.

Return:

The conversation reply state timestamp.

Since:

BlackBerry 10.2.0

QString sourceId ()

Retrieves the source ID of this Conversation.

This ID is the identifier that's supplied by the provider of the conversation.

Return:

The conversation's source ID.

Since:

BlackBerry 10.0.0

ConversationStatus::Types status ()

Retrieves a bitmask representing the status of this Conversation.

The ConversationStatus class includes the possible flags for the status of a conversation.

Return:

A bitmask representing the status of the conversation.

Since:

BlackBerry 10.0.0

QString subject ()

Retrieves the subject of this Conversation.

Return:

The conversation's subject.

Since:

BlackBerry 10.0.0

QString summary ()

Retrieves the summary of this Conversation.

Return:

The conversation's summary.

Since:

BlackBerry 10.0.0

QDateTime timeStamp ()

Retrieves the timestamp of this Conversation.

Return:

The conversation's timestamp.

Since:

BlackBerry 10.0.0

long transmissionStatus ()

Retrieves the raw transmission status of this Conversation.

Note that this is the status of the latest message in the conversation, coming from the data store.

Return:

The conversation's raw transmission status.

Since:

BlackBerry 10.0.0

int unreadMessageCount ()

Retrieves the number of unread messages in this Conversation.

Return:

The number of unread messages in the conversation.

Since:

BlackBerry 10.0.0

Last modified: 2014-09-30



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

comments powered by Disqus