MessageFilter
Since: BlackBerry 10.0.0
#include <bb/pim/message/MessageFilter>
To link against this class, add the following line to your .pro file: LIBS += -lbbpim
The MessageFilter class lets you filter lists of messages based on key-value pairs.
You can use this class to specify a set of criteria for messages, and then apply those criteria when you retrieve messages using the MessageService. For example, you can specify that you want to retrieve a list of messages in ascending order, with a particular set of participants and a maximum of 20 results. Then, you can call MessageService::messages() and provide the filter as a parameter to retrieve the messages.
Overview
Public Static Attributes Index
Public Functions Index
MessageFilter () | |
~MessageFilter () | |
bool | contains (const QString &key) const |
void | insert (const QString &key, const QVariant &value) |
const QVariant | value (const QString &key) const |
Public Static Attributes
const QString
Represents the ascending key.
This key specifies whether the list of messages returned is in ascending order. This key is valid for use with SMS/MMS accounts.
BlackBerry 10.0.0
const QString
Represents the broadcast key.
This key filters the list of messages based on whether the messages have been broadcasted. This key is valid for use with SMS/MMS accounts.
BlackBerry 10.0.0
const QString
Represents the contact ID key.
This key filters the list of messages based on the contact ID of the message contact for each message. This key is valid for use with SMS/MMS accounts.
BlackBerry 10.0.0
const QString
Represents the conversation ID key.
This key filters the list of messages based on the conversation that each message belongs to. This key is valid for use for SMS/MMS accounts.
BlackBerry 10.0.0
const QString
Represents the message ID key.
This key filters the list of messages based on the message ID of each message. This key is valid for non-SMS/MMS accounts that are part of the core PIM APIs.
BlackBerry 10.0.0
const QString
Represents the messages with IDs key.
This key filters the list of messages based on the list of message IDs. This key is valid for non-SMS/MMS accounts that are part of the core PIM APIs.
BlackBerry 10.0.0
const QString
Represents the offset key.
This key filters the list of messages based on an offset value. This key is valid for use with SMS/MMS accounts.
BlackBerry 10.0.0
const QString
Represents the participants key.
This key filters the list of messages based on the participants. This key is valid for use with SMS/MMS accounts.
BlackBerry 10.0.0
const QString
Represents the quantity key.
You can use this key to limit the number of messages or conversations that are returned from the MessageService.
BlackBerry 10.0.0
const QString
Represents the transmission status key.
This key filters the list of messages based on their transmission statuses. This key is valid for use with SMS/MMS accounts.
BlackBerry 10.0.0
Public Functions
Destructor.
BlackBerry 10.0.0
bool
Indicates whether this MessageFilter has a value for the provided key.
The provided key should be one of the constants defined in this class (such as MessageFilter::AnchorId, MessageFilter::Quantity, and so on).
Parameters | |
---|---|
key |
The key to search for. |
true if this MessageFilter has a value for the provided key, false otherwise.
BlackBerry 10.0.0
void
Inserts a filter criterion with the provided key and value.
The provided key should be one of the constants defined in this class (such as MessageFilter::AnchorId, MessageFilter::Quantity, and so on). The provided value should be a QVariant that wraps the desired value for the key. For example, the value for the Quantity key could be set as QVariant("10").
Parameters | |
---|---|
key |
The key to set the value for. |
value |
The value to set for the key. |
BlackBerry 10.0.0
const QVariant
Retrieves the value of the provided key.
The provided key should be one of the constants defined in this class (such as MessageFilter::AnchorId, MessageFilter::Quantity, and so on). The returned value is a QVariant that wraps the value that's associated with the provided key.
Parameters | |
---|---|
key |
The key to search for. |
The value of the provided key.
BlackBerry 10.0.0