Message
#include <bb/pim/message/Message>
To link against this class, add the following line to your .pro file: LIBS += -lbbpim
The Message class represents information about a message, such as subject, sender and recipient contacts, and status.
This class represents data that's commonly associated with a message. You can manipulate Message objects by using the MessageService class. For example, you can retrieve a specific message in the messages database by calling MessageService::message() and specifying the account ID and message ID of the message you want. Or, you can retrieve a list of messages that fit a set of criteria by calling MessageService::messages().
You can use the Message class to create a new message in your app and populate it with information. You can then send the message by calling MessageService::send().
BlackBerry 10.0.0
Public Functions Index
Public Functions
Copy constructor.
This function constructs a Message containing exactly the same values as the provided Message.
| Parameters | |
|---|---|
| other |
The Message to be copied. |
BlackBerry 10.0.0
Message &
Assignment operator.
This operator copies all values from the provided Message into this Message.
| Parameters | |
|---|---|
| other |
The Message from which to copy all values. |
A Message with all copied data.
BlackBerry 10.0.0
Constructs a Message with the provided private message information.
This constructor creates a Message by using a d_ptr to private message information.
| Parameters | |
|---|---|
| messagePrivate |
The private message information to use. |
BlackBerry 10.0.0
Destructor.
BlackBerry 10.0.0
MessageKey
Retrieves the message ID of this Message.
You can use this ID to retrieve a specific Message using the MessageService. This ID is unique per account.
The message ID as a qint64 value.
BlackBerry 10.0.0
MessageFolderKey
Retrieves the folder ID of this Message.
This ID indicates the folder that this message belongs to. This ID is unique per account.
The folder ID as a qint64 value.
BlackBerry 10.0.0
bb::pim::account::AccountKey
Retrieves the account ID of this Message.
This ID indicates the account that this message belongs to.
The account ID as a qint64 value.
BlackBerry 10.0.0
ConversationKey
Retrieves the conversation ID of this Message.
This ID indicates the Conversation that this message belongs to. This ID is unique per account.
The conversation ID as a QString.
BlackBerry 10.0.0
QString
Retrieves the subject of this Message.
The message subject.
BlackBerry 10.0.0
QDateTime
Retrieves the device timestamp of this Message.
This function returns the time that the message data was created on the device.
The device timestamp.
BlackBerry 10.0.0
QDateTime
Retrieves the server timestamp of this Message.
This function returns the time the message data was sent to the server. This value is not valid for outbound messages.
The server timestamp.
BlackBerry 10.0.0
MessagePriority::Type
Retrieves the priority of this Message.
The priority of a message is represented by the MessagePriority::Type enumeration and includes values such as "Low" and "High".
The message priority.
BlackBerry 10.0.0
MessageStatus::Types
Retrieves the status of this Message.
The status of a message is represented by the MessageStatus::Type enumeration and includes values such as "Read" and "Draft". The status can be a bit flag that represents multiple statuses.
The message status.
BlackBerry 10.0.0
long
Retrieves the transmission status of this Message.
The transmission status of a message is represented by the MessageTransmissionStatus::Type enumeration and includes values such as "Pending" and "Sent". The transmission status can be a bit flag that represents multiple statuses.
The message transmission status.
BlackBerry 10.0.0
bool
Indicates whether this Message is an inbound message.
You can use this information to determine the actions that can be applied to the message (such as "Reply").
true if the message is an inbound message, false otherwise.
BlackBerry 10.0.0
bool
Indicates whether this Message is a draft message.
You can use this information to determine the actions that can be applied to the message.
true if the message is a draft message, false otherwise.
BlackBerry 10.0.0
bool
Indicates whether this Message is filed.
true if the message is filed, false otherwise.
BlackBerry 10.0.0
bool
Indicates whether this Message is flagged.
true if the message is flagged, false otherwise.
BlackBerry 10.0.0
bool
Indicates whether this Message has been sent successfully.
true if the message has been sent successfully, false otherwise.
BlackBerry 10.0.0
int
Retrieves the number of recipients in the recipient list for this Message.
You can use this information to determine how to display message recipients in your app (for example, in a message view).
The number of recipients.
BlackBerry 10.0.0
int
Retrieves the number of attachments for this Message.
You can use this information to determine how to display message attachments in your app (for example, in a message view).
The number of attachments.
BlackBerry 10.0.0
MessageContact
Retrieves the sender of this Message.
This function returns the sender as a MessageContact. You can use this information to reply to the message.
The sender of the message.
BlackBerry 10.0.0
MessageBody
Retrieves the body of this Message.
This function returns the body as a MessageBody. You can use this information to display the contents of the message. You can choose to load the actual content of the body lazily when MessageBody::data() is called.
| Parameters | |
|---|---|
| type |
The type of message body to return (either plain text or HTML). |
The body of the message.
BlackBerry 10.0.0
QList< MessageContact >
Retrieves the list of recipients of this Message.
This function returns the list of recipients as a QList of MessageContact objects. You can use this information to implement a "Reply All" action for the message.
The list of recipients.
BlackBerry 10.0.0
MessageContact
Retrieves the recipient at the provided index in the recipient list of this Message.
| Parameters | |
|---|---|
| index |
The index of the recipient to retrieve. |
The recipient at the provided index.
BlackBerry 10.0.0
QList< Attachment >
Retrieves the list of attachments of this Message.
This function returns the list of attachments as a QList of Attachment objects. You can use this information to download or view attachments of the message. You can choose to load the actual content of the attachment lazily when Attachment::data() is called
The list of attachments.
BlackBerry 10.0.0
Attachment
Retrieves the attachment at the provided index in the attachment list of this Message.
| Parameters | |
|---|---|
| index |
The index of the attachment to retrieve. |
The attachment at the provided index.
BlackBerry 10.0.0
QList< StatusReport >
Retrieves the list of status reports for this Message.
This function returns the list of status reports as a QList of StatusReport objects. You can use this information to check the delivery status for each recipient of the message.
The list of status reports.
BlackBerry 10.0.0
MessageFlag
Retrieves the follow-up flag for this Message.
The follow-up flag.
BlackBerry 10.0.0
void
Applies the specified update to this Message.
You can use this function to keep the copy of a message in your app current with any service-side updates. After you retrieve the message from the message service, you should listen for any updates to the message (for example, by using the MessageService::messageUpdated() signal). If any change in message state occurs, you should apply the corresponding message update to your app's copy of the message using this function.
| Parameters | |
|---|---|
| data |
The message update to apply. |
BlackBerry 10.0.0
QString
Retrieves the source ID of this Message.
This ID is a unique ID that might be provided by the server (for example, an email server).
The source ID.
BlackBerry 10.0.0
MessageContact
Retrieves the reply-to contact of this Message.
The reply-to contact.
BlackBerry 10.0.0
MessageClass::Type
Retrieves the class type of this Message.
This function returns the class type as a value in the MessageClass::Type enumeration. You can use this information to determine if the message is of a specific class type (for example, a meeting invitation).
The class type.
BlackBerry 10.0.0
QString
Retrieves the error details that are associated with this Message.
This function returns error details that are associated with the message when the message transmission fails. You can use this information to determine what type of error occurred and handle it appropriately.
The error details.
BlackBerry 10.0.0
QString
Retrieves the references sync ID that's associated with this Message.
You can use this information to create a smart reply for the message.
The references sync ID.
BlackBerry 10.0.0
bool
Indicates whether this Message has attachments.
You can use this function to determine if a list of messages returned by the MessageService has attachments. To retrieve the full list of attachments for a specific message, you can call MessageService::message().
true if the message has attachments, false otherwise.
BlackBerry 10.0.0
bool
Indicates whether this Message is valid.
You can use this function to determine whether a message that's returned from the message service is valid. A message that doesn't have an ID is considered invalid.
true if this Message is valid, false otherwise.
BlackBerry 10.0.0
MessageKey
Returns orginal message id.
original message id as MessageKey
BlackBerry 10.0.0