MessageFolder

Since: BlackBerry 10.0.0

#include <bb/pim/message/MessageFolder>

The MessageFolder class represents a folder to store messages.

This class provides a way to identify a folder within an account (for example, "Inbox", "Sent", and so on). You can create new folders to store specific types of messages.

You can use the MessageService to perform operations on message folders. For example, you can add a new message folder by calling MessageService::addMessageFolder(), and you can rename an existing folder by calling MessageService::renameMessageFolder().

See also:

Message


Overview

Public Types Index

enum Type

Unknown =0, Inbox = 1, Outbox = 2, Drafts = 3, Sent = 4, Trash = 5, Other = 6

Public Functions Index

MessageFolder ()
MessageFolder (const MessageFolder &other)
MessageFolder (MessageFolderKey parentId, MessageFolderKey folderId, const QString &folderName, MessageFolder::Type type)
MessageFolder (MessageFolderPrivate *messageFolderPrivate)
~MessageFolder ()
MessageFolderKeyid () const
boolisValid () const
QStringname () const
MessageFolder &operator= (const MessageFolder &other)
MessageFolderKeyparentId () const
boolsyncConfig () const
MessageFolder::Typetype () const

Public Types

Type

An enumeration of supported folder types.

These enumeration values identify folder types, such as "Inbox" and "Sent".

Since:

BlackBerry 10.0.0

Unknown =0

Indicates an unknown folder type.

Inbox = 1

Indicates the Inbox folder type.

Since:

BlackBerry 10.0.0

Outbox = 2

Indicates the Outbox folder type.

Since:

BlackBerry 10.0.0

Drafts = 3

Indicates the Drafts folder type.

Since:

BlackBerry 10.0.0

Sent = 4

Indicates the Sent folder type.

Since:

BlackBerry 10.0.0

Trash = 5

Indicates the Trash folder type.

Since:

BlackBerry 10.0.0

Other = 6

Indicates the Other folder type.

Since:

BlackBerry 10.0.0

Public Functions

MessageFolder ()

Constructs a new MessageFolder.

Since:

BlackBerry 10.0.0

MessageFolder (

Copy constructor.

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

Parameters
other

The MessageFolder to be copied.

Since:

BlackBerry 10.0.0

MessageFolder (

Constructs a folder with the provided parent ID, folder ID, folder name, and type.

Parameters
parentId

The ID of the parent folder.

folderId

The ID of the folder to construct.

folderName

The name of the folder.

type

The type of folder (for example, "Inbox", "Drafts", and so on).

Since:

BlackBerry 10.0.0

MessageFolder (
  • MessageFolderPrivate *messageFolderPrivate)

Constructs a new MessageFolder using the provided MessageFolderPrivate object.

Parameters
messageFolderPrivate

The MessageFolderPrivate object to use to construct the MessageFolder.

Since:

BlackBerry 10.0.0

~MessageFolder ()

Destructor.

Since:

BlackBerry 10.0.0

MessageFolderKey id ()

Retrieves the ID of this MessageFolder.

You can use this ID to access messages within this message folder. This ID is unique per account.

Return:

The message folder's ID.

Since:

BlackBerry 10.0.0

bool isValid ()

Indicates whether this MessageFolder is valid.

Return:

true if this MessageFolder is valid, false otherwise.

Since:

BlackBerry 10.0.0

QString name ()

Retrieves the name of this MessageFolder.

Return:

The message folder's name.

Since:

BlackBerry 10.0.0

MessageFolder & operator= (

Assignment operator.

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

Parameters
other

The MessageFolder from which to copy all values.

Return:

A MessageFolder with all copied data.

Since:

BlackBerry 10.0.0

MessageFolderKey parentId ()

Retrieves the ID of the parent folder of this MessageFolder.

You can use the parent folder ID to set up a tree view of message folders in your app.

Return:

The message folder's parent folder ID.

Since:

BlackBerry 10.0.0

bool syncConfig ()

Indicates the current sync configuration of this MessageFolder.

Return:

true if sync is enabled, false if sync is disabled.

Since:

BlackBerry 10.0.0

MessageFolder::Type type ()

Retrieves the type of this MessageFolder.

This function returns the type as an enumeration value in the MessageFolder::Type enumeration, and includes values such as "Inbox" and "Drafts".

Return:

The message folder's type.

Since:

BlackBerry 10.0.0

Last modified: 2014-06-24



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

comments powered by Disqus