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
boolisPriorityInbox () const
boolisValid () const
MessageKeylatestMessageId () const
intmessageCount () const
QStringmimeType () const
QStringname () const
Conversation &operator= (const Conversation &other)
QList< MessageContact >participants () 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 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.

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

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

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-03-13

comments powered by Disqus