Represents a set of messages, designated either by their sequence number, or by their UID (but not both).
Following is example code to designate messages by their number:
Or, to designate messages by their UID, use:
◆ ~messageSet()
◆ messageSet()
◆ addRange()
Adds the specified range to this set.
The type of message range (either number or UID) must match the type of the ranges already contained in this set (ie. it's not possible to have a message set which contains both number ranges and UID ranges).
- Parameters
-
- Exceptions
-
std::invalid_argument | exception if the range type does not match the type of the ranges in this set |
References messageRange::clone().
◆ byNumber() [1/3]
Constructs a new message set and initializes it with a range of messages represented by their sequence number.
- Parameters
-
first | number of the first message in the range (numbering starts at 1, not 0) |
last | number of the last message in the range, or use the special value -1 to designate the last message in the folder |
- Returns
- new message set
◆ byNumber() [2/3]
Constructs a new message set and initializes it with a single message represented by its sequence number.
- Parameters
-
number | message number (numbering starts at 1, not 0) |
- Returns
- new message set
◆ byNumber() [3/3]
Constructs a new message set and initializes it with a possibly unsorted list of messages represented by their sequence number.
Please note that numbering starts at 1, not 0.
The function tries to group consecutive message numbers into ranges to reduce the size of the resulting set.
For example, given the list "1,2,3,4,5,7,8,13,15,16,17" it will result in the following ranges: "1:5,7:8,13,15:17".
- Parameters
-
numbers | a vector containing numbers of the messages |
- Returns
- new message set
◆ byUID() [1/3]
Constructs a new message set and initializes it with a range of messages represented by their sequence number.
- Parameters
-
first | UID of the first message in the range |
last | UID of the last message in the range, or use the special value '*' to designate the last message in the folder |
- Returns
- new message set
◆ byUID() [2/3]
Constructs a new message set and initializes it with a single message represented by its UID.
- Parameters
-
- Returns
- new message set
◆ byUID() [3/3]
Constructs a new message set and initializes it with a possibly unsorted list of messages represented by their UID.
For UIDs that actually are numbers (this is the case for IMAP), the function tries to group consecutive UIDs into ranges to reduce the size of the resulting set.
For example, given the list "1,2,3,4,5,7,8,13,15,16,17" it will result in the following ranges: "1:5,7:8,13,15:17".
- Parameters
-
uids | a vector containing UIDs of the messages |
- Returns
- new message set
References stringUtils::toString().
◆ empty()
Constructs an empty set.
- Returns
- new empty message set
◆ enumerate()
Enumerates this set with the specified enumerator.
- Parameters
-
en | enumerator that will receive the method calls while enumerating the ranges in this set |
◆ getRangeAt()
Returns the message range at the specified index.
- Parameters
-
- Returns
- a reference to the message range at the specified index
◆ getRangeCount()
size_t getRangeCount |
( |
| ) |
const |
Returns the number of ranges contained in this set.
- Returns
- range count
◆ isEmpty()
◆ isNumberSet()
bool isNumberSet |
( |
| ) |
const |
Returns whether this set references messages by their sequence number.
- Returns
- true if this set references messages by their sequence number, or false otherwise
References messageSet::isEmpty().
◆ isUIDSet()
Returns whether this set references messages by their UID.
- Returns
- true if this set references messages by their UID, or false otherwise
References messageSet::isEmpty().
The documentation for this class was generated from the following files: