20 #ifndef KIMAP_FETCHJOB_H 21 #define KIMAP_FETCHJOB_H 23 #include "kimap_export.h" 28 #include "kmime/kmime_content.h" 29 #include "kmime/kmime_message.h" 31 #include <boost/shared_ptr.hpp> 37 class FetchJobPrivate;
39 typedef boost::shared_ptr<KMime::Content> ContentPtr;
40 typedef QMap<QByteArray, ContentPtr> MessageParts;
42 typedef boost::shared_ptr<KMime::Message> MessagePtr;
43 typedef QList<QByteArray> MessageFlags;
45 typedef QPair<QByteArray, QVariant> MessageAttribute;
63 friend class SessionPrivate;
179 explicit FetchJob( Session *session );
190 void setSequenceSet(
const ImapSet &set );
203 void setUidBased(
bool uidBased);
211 bool isUidBased()
const;
239 void setGmailExtensionsEnabled(
bool enabled);
247 bool setGmailExtensionsEnabled()
const;
251 KIMAP_DEPRECATED QMap<qint64, MessagePtr> messages()
const;
253 KIMAP_DEPRECATED QMap<qint64, MessageParts> parts()
const;
255 KIMAP_DEPRECATED QMap<qint64, MessageFlags> flags()
const;
257 KIMAP_DEPRECATED QMap<qint64, qint64> sizes()
const;
259 KIMAP_DEPRECATED QMap<qint64, qint64> uids()
const;
292 void headersReceived(
const QString &mailBox,
293 const QMap<qint64, qint64> &uids,
294 const QMap<qint64, qint64> &sizes,
295 const QMap<qint64, KIMAP::MessageFlags> &flags,
296 const QMap<qint64, KIMAP::MessagePtr> &messages );
323 void headersReceived(
const QString &mailBox,
324 const QMap<qint64, qint64> &uids,
325 const QMap<qint64, qint64> &sizes,
326 const QMap<qint64, KIMAP::MessageAttribute > &attrs,
327 const QMap<qint64, KIMAP::MessageFlags> &flags,
328 const QMap<qint64, KIMAP::MessagePtr> &messages );
348 void messagesReceived(
const QString &mailBox,
349 const QMap<qint64, qint64> &uids,
350 const QMap<qint64, KIMAP::MessagePtr> &messages );
368 void messagesReceived(
const QString &mailBox,
369 const QMap<qint64, qint64> &uids,
370 const QMap<qint64, KIMAP::MessageAttribute > &attrs,
371 const QMap<qint64, KIMAP::MessagePtr> &messages );
389 void partsReceived(
const QString &mailBox,
390 const QMap<qint64, qint64> &uids,
391 const QMap<qint64, KIMAP::MessageParts> &parts );
407 void partsReceived(
const QString &mailBox,
408 const QMap<qint64, qint64> &uids,
409 const QMap<qint64, KIMAP::MessageAttribute > &attrs,
410 const QMap<qint64, KIMAP::MessageParts> &parts );
413 virtual void doStart();
414 virtual void handleResponse(
const Message &response);
417 Q_PRIVATE_SLOT( d_func(),
void emitPendings() )
Mode
Used to indicate what part of the message should be fetched.
Fetch the message content (the UID is also fetched)
QList< QByteArray > parts
Specify which message parts to operate on.
quint64 changedSince
Specify to fetch only items with mod-sequence higher then changedSince.
Fetch the complete message.
Fetch the MIME message body structure (the UID is also fetched)
Mode mode
Specify what message data should be fetched.
Fetch RFC-2822 or MIME message headers.
Fetch message data from the server.
Fetch the message MIME headers and the content of parts specified in the parts field.
Fetch the message flags (the UID is also fetched)
Represents a set of natural numbers (1-> ) in a as compact as possible form.
Used to indicate what message data should be fetched.