summaryrefslogtreecommitdiffstats
path: root/examples/imapresource/imapserverproxy.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-09-14 10:16:33 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-09-15 16:14:19 +0200
commit25fdab9836b1fdd248d3d36c00a96740093cd749 (patch)
treedb9df043cadf90a7c27c43bab7217afda91db023 /examples/imapresource/imapserverproxy.h
parent2bfccc6301f71db5bf45977bb2955c04fa6c1605 (diff)
downloadsink-25fdab9836b1fdd248d3d36c00a96740093cd749.tar.gz
sink-25fdab9836b1fdd248d3d36c00a96740093cd749.zip
New kimap2 syntax
Diffstat (limited to 'examples/imapresource/imapserverproxy.h')
-rw-r--r--examples/imapresource/imapserverproxy.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/examples/imapresource/imapserverproxy.h b/examples/imapresource/imapserverproxy.h
index ff87d47..e0e87d4 100644
--- a/examples/imapresource/imapserverproxy.h
+++ b/examples/imapresource/imapserverproxy.h
@@ -51,8 +51,8 @@ namespace FolderFlags
51struct Message { 51struct Message {
52 qint64 uid; 52 qint64 uid;
53 qint64 size; 53 qint64 size;
54 QPair<QByteArray, QVariant> attributes; 54 KIMAP2::MessageAttributes attributes;
55 QList<QByteArray> flags; 55 KIMAP2::MessageFlags flags;
56 KMime::Message::Ptr msg; 56 KMime::Message::Ptr msg;
57}; 57};
58 58
@@ -111,12 +111,7 @@ public:
111 KAsync::Job<void> copy(const KIMAP2::ImapSet &set, const QString &newMailbox); 111 KAsync::Job<void> copy(const KIMAP2::ImapSet &set, const QString &newMailbox);
112 KAsync::Job<QVector<qint64>> search(const KIMAP2::ImapSet &set); 112 KAsync::Job<QVector<qint64>> search(const KIMAP2::ImapSet &set);
113 113
114 typedef std::function<void(const QString &, 114 typedef std::function<void(const KIMAP2::FetchJob::Result &)> FetchCallback;
115 const QMap<qint64,qint64> &,
116 const QMap<qint64,qint64> &,
117 const QMap<qint64,KIMAP2::MessageAttribute> &,
118 const QMap<qint64,KIMAP2::MessageFlags> &,
119 const QMap<qint64,KIMAP2::MessagePtr> &)> FetchCallback;
120 115
121 KAsync::Job<void> fetch(const KIMAP2::ImapSet &set, KIMAP2::FetchJob::FetchScope scope, FetchCallback callback); 116 KAsync::Job<void> fetch(const KIMAP2::ImapSet &set, KIMAP2::FetchJob::FetchScope scope, FetchCallback callback);
122 KAsync::Job<void> fetch(const KIMAP2::ImapSet &set, KIMAP2::FetchJob::FetchScope scope, const std::function<void(const QVector<Message> &)> &callback); 117 KAsync::Job<void> fetch(const KIMAP2::ImapSet &set, KIMAP2::FetchJob::FetchScope scope, const std::function<void(const QVector<Message> &)> &callback);
@@ -138,7 +133,7 @@ public:
138 KAsync::Job<void> fetchFolders(std::function<void(const QVector<Folder> &)> callback); 133 KAsync::Job<void> fetchFolders(std::function<void(const QVector<Folder> &)> callback);
139 KAsync::Job<void> fetchMessages(const Folder &folder, std::function<void(const QVector<Message> &)> callback, std::function<void(int, int)> progress = std::function<void(int, int)>()); 134 KAsync::Job<void> fetchMessages(const Folder &folder, std::function<void(const QVector<Message> &)> callback, std::function<void(int, int)> progress = std::function<void(int, int)>());
140 KAsync::Job<void> fetchMessages(const Folder &folder, qint64 uidNext, std::function<void(const QVector<Message> &)> callback, std::function<void(int, int)> progress = std::function<void(int, int)>()); 135 KAsync::Job<void> fetchMessages(const Folder &folder, qint64 uidNext, std::function<void(const QVector<Message> &)> callback, std::function<void(int, int)> progress = std::function<void(int, int)>());
141 KAsync::Job<SelectResult> fetchFlags(const Folder &folder, qint64 changedsince, std::function<void(const QVector<Message> &)> callback); 136 KAsync::Job<SelectResult> fetchFlags(const Folder &folder, const KIMAP2::ImapSet &set, qint64 changedsince, std::function<void(const QVector<Message> &)> callback);
142 KAsync::Job<QVector<qint64>> fetchUids(const Folder &folder); 137 KAsync::Job<QVector<qint64>> fetchUids(const Folder &folder);
143 138
144private: 139private: