KIMAP::FetchJob::FetchScope Class
class KIMAP::FetchJob::FetchScopeUsed to indicate what message data should be fetched. More...
Public Types
| enum | Mode { Headers, Flags, Structure, Content, Full, …, HeaderAndContentBinary } |
Public Functions
Public Variables
| quint64 | changedSince |
| KIMAP::FetchJob::FetchScope::Mode | mode |
| QList<QByteArray> | parts |
| bool | qresync |
Detailed Description
This doesn't provide the same fine-grained control over what is fetched that the IMAP FETCH command normally does, but the common cases are catered for.
Member Type Documentation
enum FetchScope::Mode
Used to indicate what part of the message should be fetched.
| Constant | Value | Description |
|---|---|---|
KIMAP::FetchJob::FetchScope::Headers | 0 | Fetch RFC-2822 or MIME message headers. To fetch MIME headers for a MIME part, populate the parts field. If the RFC-2822 headers are requested (so parts is empty), the returned information is: - To, From, Message-id, References In-Reply-To, Subject and Date headers - The message size (in octets) - The internal date of the message - The message flags - The message UID |
KIMAP::FetchJob::FetchScope::Flags | 1 | Fetch the message flags (the UID is also fetched) |
KIMAP::FetchJob::FetchScope::Structure | 2 | Fetch the MIME message body structure (the UID is also fetched) |
KIMAP::FetchJob::FetchScope::Content | 3 | Fetch the message content (the UID is also fetched). To fetch only certain MIME parts (see Structure), populate the parts field. |
KIMAP::FetchJob::FetchScope::Full | 4 | Fetch the complete message. |
KIMAP::FetchJob::FetchScope::HeaderAndContent | 5 | Fetch the message MIME headers and the content of parts specified in the parts field. If parts is empty, this mode will return the full message, just like FetchScope::Content. Use case: - Start a FetchJob with the FetchScope::Structure mode to retrieve the structure of the message - Parse the structure to identify the parts that are interesting (ie: probably everything but attachments) - Start another FetchJob with FetchScope::HeaderAndContent to fetch those parts - At the request of the user, you can repeat the step above to fetch the attachments |
KIMAP::FetchJob::FetchScope::FullHeaders | 6 | Fetch message size (in octets), internal date of the message, flags, UID and all RFC822 headers. The parts field is ignored when using this scope |
KIMAP::FetchJob::FetchScope::HeaderAndContentBinary | 7 | Identical to FetchScope::HeaderAndContent but parts are fetched in BINARY format directly. |
Member Function Documentation
FetchScope::FetchScope()
Member Variable Documentation
quint64 FetchScope::changedSince
Specify to fetch only items with mod-sequence higher then changedSince.
The server must have CONDSTORE capability (RFC4551).
Default value is 0 (ignored).
KIMAP::FetchJob::FetchScope::Mode FetchScope::mode
Specify what message data should be fetched.
QList<QByteArray> FetchScope::parts
Specify which message parts to operate on.
This refers to multipart-MIME message parts or MIME-IMB encapsulated message parts.
Note that this is ignored unless mode is Headers or Content.
If mode is Headers, this sets the parts to get the MIME headers for. If this list is empty, the headers for the whole message (the RFC-2822 headers) are fetched.
If mode is Content, this sets the parts to fetch. Parts are fetched wholesale. If this list is empty, the whole message body is fetched (all MIME parts together).
bool FetchScope::qresync
Specify whether QRESYNC is supported and should be used.
When enabled, the changedSince parameter must be specified as well. The server will then also return list of messages that have been deleted from the mailbox since the specified modification sequence.
The server must have QRESYNC capability (RFC5162) and it must have explicitly been enabled via ENABLE command (see EnableJob).
QRESYNC can only be used in UID FETCH (see setUidBased())