KIMAP Library
#include <fetchjob.h>
Inherits KIMAP::Job.
Classes | |
class | FetchScope |
Signals | |
void | headersReceived (const QString &mailBox, const QMap< qint64, qint64 > &uids, const QMap< qint64, qint64 > &sizes, const QMap< qint64, KIMAP::MessageFlags > &flags, const QMap< qint64, KIMAP::MessagePtr > &messages) |
void | messagesReceived (const QString &mailBox, const QMap< qint64, qint64 > &uids, const QMap< qint64, KIMAP::MessagePtr > &messages) |
void | partsReceived (const QString &mailBox, const QMap< qint64, qint64 > &uids, const QMap< qint64, KIMAP::MessageParts > &parts) |
Public Member Functions | |
FetchJob (Session *session) | |
KIMAP_DEPRECATED QMap< qint64, MessageFlags > | flags () const |
bool | isUidBased () const |
KIMAP_DEPRECATED QMap< qint64, MessagePtr > | messages () const |
KIMAP_DEPRECATED QMap< qint64, MessageParts > | parts () const |
FetchScope | scope () const |
ImapSet | sequenceSet () const |
void | setScope (const FetchScope &scope) |
void | setSequenceSet (const ImapSet &set) |
void | setUidBased (bool uidBased) |
KIMAP_DEPRECATED QMap< qint64, qint64 > | sizes () const |
KIMAP_DEPRECATED QMap< qint64, qint64 > | uids () const |
Protected Member Functions | |
virtual void | doStart () |
virtual void | handleResponse (const Message &response) |
Detailed Description
Fetch message data from the server.
All data is returned using the signals, so you need to connect to the relevant signal (or all of them) before starting the job.
This job will always use BODY.PEEK rather than BODY to fetch message content, so it will not set the flag.
This job can only be run when the session is in the selected state.
Definition at line 56 of file fetchjob.h.
Member Function Documentation
QMap< qint64, MessageFlags > FetchJob::flags | ( | ) | const |
- Deprecated:
- returns an empty map; use the signals instead
Definition at line 155 of file fetchjob.cpp.
|
signal |
Provides header and message results.
This signal will be emitted if the requested scope mode was FetchScope::Full, FetchScope::Flags or FetchScope::Headers with no parts specified
This signal may be emitted any number of times before the result() signal is emitted. The result() signal will only be emitted once all results have been reported via one of the signals.
Note that, depending on the scope, some of the parameters of this signal may be empty maps.
- Parameters
-
mailBox the name of the mailbox the fetch job was executed on uids a map from message sequence numbers to message UIDs; this will always be populated sizes a map from message sequence numbers to message sizes (sizes are in octets and refer to the transfer encoding of the message); populated if the scope is FetchScope::Full or FetchScope::Headers flags a map from message sequence numbers to message flags; populated if the scope is FetchScope::Flags, FetchScope::Full of FetchScope::Headers messages a map from message sequence numbers to message contents (including headers); populated if the scope is FetchScope::Full, FetchScope::Headers or FetchScope::Structure
bool FetchJob::isUidBased | ( | ) | const |
How to interpret the sequence set.
- Returns
- if
true
the result of sequenceSet() should be interpreted as UIDs, iffalse
it should be interpreted as sequence numbers
Definition at line 127 of file fetchjob.cpp.
QMap< qint64, MessagePtr > FetchJob::messages | ( | ) | const |
- Deprecated:
- returns an empty map; use the signals instead
Definition at line 145 of file fetchjob.cpp.
|
signal |
Provides header and message results.
This signal will be emitted if the requested scope mode was FetchScope::Content or FetchScope::Headers with no parts specified or FetchScope::Structure.
This signal may be emitted any number of times before the result() signal is emitted. The result() signal will only be emitted once all results have been reported via one of the signals.
- Parameters
-
mailBox the name of the mailbox the fetch job was executed on uids a map from message sequence numbers to message UIDs messages a map from message sequence numbers to message contents
QMap< qint64, MessageParts > FetchJob::parts | ( | ) | const |
- Deprecated:
- returns an empty map; use the signals instead
Definition at line 150 of file fetchjob.cpp.
|
signal |
Provides header and message results.
This signal will be emitted if the requested scope mode was FetchScope::Content or FetchScope::Headers with specified parts.
This signal may be emitted any number of times before the result() signal is emitted. The result() signal will only be emitted once all results have been reported via one of the signals.
- Parameters
-
mailBox the name of the mailbox the fetch job was executed on uids a map from message sequence numbers to message UIDs parts a map from message sequence numbers to message part collections
FetchJob::FetchScope FetchJob::scope | ( | ) | const |
Specifies what data will be fetched.
Definition at line 139 of file fetchjob.cpp.
ImapSet FetchJob::sequenceSet | ( | ) | const |
The messages that will be fetched.
Definition at line 115 of file fetchjob.cpp.
void FetchJob::setScope | ( | const FetchScope & | scope | ) |
Sets what data should be fetched.
The default scope is FetchScope::Content (all content parts).
- Parameters
-
scope a FetchScope object describing what data should be fetched
Definition at line 133 of file fetchjob.cpp.
void FetchJob::setSequenceSet | ( | const ImapSet & | set | ) |
Set which messages to fetch data for.
If sequence numbers are given, isUidBased() should be false. If UIDs are given, isUidBased() should be true.
- Parameters
-
set the sequence numbers or UIDs of the messages to fetch data for
Definition at line 108 of file fetchjob.cpp.
void FetchJob::setUidBased | ( | bool | uidBased | ) |
Set how the sequence set should be interpreted.
- Parameters
-
uidBased if true
the argument to setSequenceSet will be interpreted as UIDs, iffalse
it will be interpreted as sequence numbers
Definition at line 121 of file fetchjob.cpp.
QMap< qint64, qint64 > FetchJob::sizes | ( | ) | const |
- Deprecated:
- returns an empty map; use the signals instead
Definition at line 160 of file fetchjob.cpp.
QMap< qint64, qint64 > FetchJob::uids | ( | ) | const |
- Deprecated:
- returns an empty map; use the signals instead
Definition at line 165 of file fetchjob.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.