MessageRights
Since: BlackBerry 10.0.0
#include <bb/pim/message/MessageRights>
To link against this class, add the following line to your .pro file: LIBS += -lbbpim
The MessageRights class represents the rights and permissions for a message.
A Message can have several different permissions, and you can use this class to determine what permissions apply to a particular message. For example, you can determine if a message is allowed for edit, can be forwarded, or can be replied. Here's an example:
MessageService messageService; Message msg = messageService.message(accountId , messageId); msg.rights().testFlag(bb::pim::message::MessageRights::EditAllowed)
The message rights value is a bit mask that represents multiple rights.
Overview
Public Types Index
enum TypeEditAllowed 1 << 0, ExportAllowed 1 << 1, ExtractAllowed 1 << 2, ForwardAllowed 1 << 3, ModifyRecipientsAllowed 1 << 4, PrintAllowed 1 << 5, ProgrammaticAccessAllowed 1 << 6, ReplyAllAllowed 1 << 7, ReplyAllowed 1 << 8 |
Public Functions Index
MessageRights () | |
MessageRights (const MessageRights &other) | |
MessageRights (MessageRightsPrivate *messageRightsPrivate) | |
~MessageRights () | |
bool | isValid () const |
MessageRights & | operator= (const MessageRights &other) |
bool | operator== (const MessageRights &other) const |
MessageRights::Types | rights () const |
QDateTime | rightsContentExpiryDate () const |
QString | rightsTemplateId () const |
QString | rightsTemplateInfoDescription () const |
QString | rightsTemplateInfoName () const |
Public Types
An enumeration of supported message rights and permissions.
BlackBerry 10.3.0
- EditAllowed 1 << 0
Indicates whether the content of the original email can be modified by the user when the user forwards, replies, or replies all to the email message.
- ExportAllowed 1 << 1
Specifies whether the information rights management (IRM) protection on the e-mail message can be removed by the user.
Since:BlackBerry 10.3.0
- ExtractAllowed 1 << 2
Specifies whether the user can copy content out of the e-mail message.
Since:BlackBerry 10.0.0
- ForwardAllowed 1 << 3
Specifies whether the user can forward the e-mail message.
Since:BlackBerry 10.3.0
- ModifyRecipientsAllowed 1 << 4
Specifies whether the user can modify the recipient list when the user forwards, or replies to the e-mail message.
Since:BlackBerry 10.3.0
- PrintAllowed 1 << 5
Specifies whether the e-mail can be printed by the user.
Since:BlackBerry 10.3.0
- ProgrammaticAccessAllowed 1 << 6
Specifies whether the contents of the e-mail message can be accessed programmatically by third party applications.
Since:BlackBerry 10.3.0
- ReplyAllAllowed 1 << 7
Specifies whether the user can reply to all of the recipients of the original e-mail message.
Since:BlackBerry 10.3.0
- ReplyAllowed 1 << 8
Specifies whether the user is allowed to reply to the e-mail message.
Since:BlackBerry 10.3.0
Public Functions
Copy constructor.
This function constructs a MessageRights containing exactly the same values as the provided MessageRights.
Parameters | |
---|---|
other |
The MessageRights to be copied. |
BlackBerry 10.3.0
Constructs a MessageRights with the provided private message rights information.
This constructor creates a MessageRights by using a d_ptr to private message rights information.
Parameters | |
---|---|
messageRightsPrivate |
The private message rights information to use. |
BlackBerry 10.3.0
Destructor.
BlackBerry 10.3.0
bool
Indicates whether this MessageRights is valid.
True if this MessageRights is valid, false otherwise.
BlackBerry 10.3.0
MessageRights &
Assignment operator.
This operator copies all values from the provided MessageRights into this MessageRights.
Parameters | |
---|---|
other |
The MessageRights from which to copy all values. |
A MessageRights with all copied data.
BlackBerry 10.3.0
bool
Equality operator.
This operator indicates whether this MessageRights has the same values as the provided MessageRights.
Parameters | |
---|---|
other |
The MessageRights to compare values with. |
True if the MessageRights objects are considered equal, false otherwise.
BlackBerry 10.3.0
MessageRights::Types
Retrieves bit mask of rights permissions representing this MessageRights.
This function returns a bit mask pulling all the rights management permissions together for this message. The bit mask is represented by the MessageRights::Types enumeration and includes values such as EditAllowed and ReplyAllAllowed.
A bit mask that represents multiple permissions.
BlackBerry 10.3.0
QDateTime
Retrieves the content expiry date representing this MessageRights.
This function returns the date/time that specifies the expiration date for the license. The client purges the body and attachments of the e-mail message when this date has passed.
The content expiry timestamp.
BlackBerry 10.3.0
QString
Retrieves the rights policy template ID representing this MessageRights.
This function returns a string that identifies the rights policy template.
The string that identifies the rights policy template ID for this MessageRights, or an empty string if there isn't one.
BlackBerry 10.3.0
QString
Retrieves the description of the rights policy template representing this MessageRights.
This function returns the description of the rights policy template for this MessageRights.
The description of the rights policy template representing this MessageRights, an empty string if there isn't one.
BlackBerry 10.3.0
QString
Retrieves the name of the rights policy template representing this MessageRights.
This function returns the name of the rights policy template for this MessageRights.
The name of the rights policy template representing this MessageRights, an empty string if there isn't one.
BlackBerry 10.3.0