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)
Note:

The message rights value is a bit mask that represents multiple rights.

See also:

Message


Overview

Public Types Index

Public Functions Index

MessageRights ()
MessageRights (const MessageRights &other)
MessageRights (MessageRightsPrivate *messageRightsPrivate)
~MessageRights ()
boolisValid () const
MessageRights &operator= (const MessageRights &other)
booloperator== (const MessageRights &other) const
MessageRights::Typesrights () const
QDateTimerightsContentExpiryDate () const
QStringrightsTemplateId () const
QStringrightsTemplateInfoDescription () const
QStringrightsTemplateInfoName () const

Public Types

Type

An enumeration of supported message rights and permissions.

Since:

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

MessageRights ()

Constructs a new MessageRights.

Since:

BlackBerry 10.3.0

MessageRights (

Copy constructor.

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

Parameters
other

The MessageRights to be copied.

Since:

BlackBerry 10.3.0

MessageRights (
  • MessageRightsPrivate *messageRightsPrivate)

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.

Since:

BlackBerry 10.3.0

~MessageRights ()

Destructor.

Since:

BlackBerry 10.3.0

bool isValid ()

Indicates whether this MessageRights is valid.

Return:

True if this MessageRights is valid, false otherwise.

Since:

BlackBerry 10.3.0

MessageRights & operator= (

Assignment operator.

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

Parameters
other

The MessageRights from which to copy all values.

Return:

A MessageRights with all copied data.

Since:

BlackBerry 10.3.0

bool operator== (

Equality operator.

This operator indicates whether this MessageRights has the same values as the provided MessageRights.

Parameters
other

The MessageRights to compare values with.

Return:

True if the MessageRights objects are considered equal, false otherwise.

Since:

BlackBerry 10.3.0

MessageRights::Types rights ()

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.

Return:

A bit mask that represents multiple permissions.

Since:

BlackBerry 10.3.0

QDateTime rightsContentExpiryDate ()

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.

Return:

The content expiry timestamp.

Since:

BlackBerry 10.3.0

QString rightsTemplateId ()

Retrieves the rights policy template ID representing this MessageRights.

This function returns a string that identifies the rights policy template.

Return:

The string that identifies the rights policy template ID for this MessageRights, or an empty string if there isn't one.

Since:

BlackBerry 10.3.0

QString rightsTemplateInfoDescription ()

Retrieves the description of the rights policy template representing this MessageRights.

This function returns the description of the rights policy template for this MessageRights.

Return:

The description of the rights policy template representing this MessageRights, an empty string if there isn't one.

Since:

BlackBerry 10.3.0

QString rightsTemplateInfoName ()

Retrieves the name of the rights policy template representing this MessageRights.

This function returns the name of the rights policy template for this MessageRights.

Return:

The name of the rights policy template representing this MessageRights, an empty string if there isn't one.

Since:

BlackBerry 10.3.0

Last modified: 2014-09-30



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

comments powered by Disqus