diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-08-25 09:30:43 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-09-15 16:14:19 +0200 |
commit | fe6a1094ff67442e05b409bffedd6b3ca017a2c3 (patch) | |
tree | ed9e24470fd50692b21b73b91ea960c26006a0f1 /examples/imapresource/imapserverproxy.h | |
parent | b1b128bb35c91c3a8fe3c36a31ba4676ff0cd54e (diff) | |
download | sink-fe6a1094ff67442e05b409bffedd6b3ca017a2c3.tar.gz sink-fe6a1094ff67442e05b409bffedd6b3ca017a2c3.zip |
Use KIMAP2
Diffstat (limited to 'examples/imapresource/imapserverproxy.h')
-rw-r--r-- | examples/imapresource/imapserverproxy.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/examples/imapresource/imapserverproxy.h b/examples/imapresource/imapserverproxy.h index 70dfa58..9adce3d 100644 --- a/examples/imapresource/imapserverproxy.h +++ b/examples/imapresource/imapserverproxy.h | |||
@@ -22,9 +22,9 @@ | |||
22 | #include <Async/Async> | 22 | #include <Async/Async> |
23 | 23 | ||
24 | #include <KMime/KMime/KMimeMessage> | 24 | #include <KMime/KMime/KMimeMessage> |
25 | #include <KIMAP/KIMAP/ListJob> | 25 | #include <KIMAP2/ListJob> |
26 | #include <KIMAP/KIMAP/Session> | 26 | #include <KIMAP2/Session> |
27 | #include <KIMAP/KIMAP/FetchJob> | 27 | #include <KIMAP2/FetchJob> |
28 | 28 | ||
29 | namespace Imap { | 29 | namespace Imap { |
30 | 30 | ||
@@ -82,7 +82,7 @@ struct SelectResult { | |||
82 | }; | 82 | }; |
83 | 83 | ||
84 | class ImapServerProxy { | 84 | class ImapServerProxy { |
85 | KIMAP::Session *mSession; | 85 | KIMAP2::Session *mSession; |
86 | QStringList mCapabilities; | 86 | QStringList mCapabilities; |
87 | 87 | ||
88 | QSet<QString> mPersonalNamespaces; | 88 | QSet<QString> mPersonalNamespaces; |
@@ -99,36 +99,36 @@ public: | |||
99 | KAsync::Job<void> login(const QString &username, const QString &password); | 99 | KAsync::Job<void> login(const QString &username, const QString &password); |
100 | KAsync::Job<SelectResult> select(const QString &mailbox); | 100 | KAsync::Job<SelectResult> select(const QString &mailbox); |
101 | KAsync::Job<qint64> append(const QString &mailbox, const QByteArray &content, const QList<QByteArray> &flags = QList<QByteArray>(), const QDateTime &internalDate = QDateTime()); | 101 | KAsync::Job<qint64> append(const QString &mailbox, const QByteArray &content, const QList<QByteArray> &flags = QList<QByteArray>(), const QDateTime &internalDate = QDateTime()); |
102 | KAsync::Job<void> store(const KIMAP::ImapSet &set, const QList<QByteArray> &flags); | 102 | KAsync::Job<void> store(const KIMAP2::ImapSet &set, const QList<QByteArray> &flags); |
103 | KAsync::Job<void> storeFlags(const KIMAP::ImapSet &set, const QList<QByteArray> &flags); | 103 | KAsync::Job<void> storeFlags(const KIMAP2::ImapSet &set, const QList<QByteArray> &flags); |
104 | KAsync::Job<void> addFlags(const KIMAP::ImapSet &set, const QList<QByteArray> &flags); | 104 | KAsync::Job<void> addFlags(const KIMAP2::ImapSet &set, const QList<QByteArray> &flags); |
105 | KAsync::Job<void> removeFlags(const KIMAP::ImapSet &set, const QList<QByteArray> &flags); | 105 | KAsync::Job<void> removeFlags(const KIMAP2::ImapSet &set, const QList<QByteArray> &flags); |
106 | KAsync::Job<void> create(const QString &mailbox); | 106 | KAsync::Job<void> create(const QString &mailbox); |
107 | KAsync::Job<void> rename(const QString &mailbox, const QString &newMailbox); | 107 | KAsync::Job<void> rename(const QString &mailbox, const QString &newMailbox); |
108 | KAsync::Job<void> remove(const QString &mailbox); | 108 | KAsync::Job<void> remove(const QString &mailbox); |
109 | KAsync::Job<void> expunge(); | 109 | KAsync::Job<void> expunge(); |
110 | KAsync::Job<void> expunge(const KIMAP::ImapSet &set); | 110 | KAsync::Job<void> expunge(const KIMAP2::ImapSet &set); |
111 | KAsync::Job<void> copy(const KIMAP::ImapSet &set, const QString &newMailbox); | 111 | KAsync::Job<void> copy(const KIMAP2::ImapSet &set, const QString &newMailbox); |
112 | KAsync::Job<QVector<qint64>> search(const KIMAP::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 QString &, |
115 | const QMap<qint64,qint64> &, | 115 | const QMap<qint64,qint64> &, |
116 | const QMap<qint64,qint64> &, | 116 | const QMap<qint64,qint64> &, |
117 | const QMap<qint64,KIMAP::MessageAttribute> &, | 117 | const QMap<qint64,KIMAP2::MessageAttribute> &, |
118 | const QMap<qint64,KIMAP::MessageFlags> &, | 118 | const QMap<qint64,KIMAP2::MessageFlags> &, |
119 | const QMap<qint64,KIMAP::MessagePtr> &)> FetchCallback; | 119 | const QMap<qint64,KIMAP2::MessagePtr> &)> FetchCallback; |
120 | 120 | ||
121 | KAsync::Job<void> fetch(const KIMAP::ImapSet &set, KIMAP::FetchJob::FetchScope scope, FetchCallback callback); | 121 | KAsync::Job<void> fetch(const KIMAP2::ImapSet &set, KIMAP2::FetchJob::FetchScope scope, FetchCallback callback); |
122 | KAsync::Job<void> fetch(const KIMAP::ImapSet &set, KIMAP::FetchJob::FetchScope scope, const std::function<void(const QVector<Message> &)> &callback); | 122 | KAsync::Job<void> fetch(const KIMAP2::ImapSet &set, KIMAP2::FetchJob::FetchScope scope, const std::function<void(const QVector<Message> &)> &callback); |
123 | KAsync::Job<void> list(KIMAP::ListJob::Option option, const std::function<void(const QList<KIMAP::MailBoxDescriptor> &mailboxes,const QList<QList<QByteArray> > &flags)> &callback); | 123 | KAsync::Job<void> list(KIMAP2::ListJob::Option option, const std::function<void(const QList<KIMAP2::MailBoxDescriptor> &mailboxes,const QList<QList<QByteArray> > &flags)> &callback); |
124 | 124 | ||
125 | QStringList getCapabilities() const; | 125 | QStringList getCapabilities() const; |
126 | 126 | ||
127 | //Composed calls that do login etc. | 127 | //Composed calls that do login etc. |
128 | KAsync::Job<QList<qint64>> fetchHeaders(const QString &mailbox, qint64 minUid = 1); | 128 | KAsync::Job<QList<qint64>> fetchHeaders(const QString &mailbox, qint64 minUid = 1); |
129 | KAsync::Job<void> remove(const QString &mailbox, const KIMAP::ImapSet &set); | 129 | KAsync::Job<void> remove(const QString &mailbox, const KIMAP2::ImapSet &set); |
130 | KAsync::Job<void> remove(const QString &mailbox, const QByteArray &imapSet); | 130 | KAsync::Job<void> remove(const QString &mailbox, const QByteArray &imapSet); |
131 | KAsync::Job<void> move(const QString &mailbox, const KIMAP::ImapSet &set, const QString &newMailbox); | 131 | KAsync::Job<void> move(const QString &mailbox, const KIMAP2::ImapSet &set, const QString &newMailbox); |
132 | KAsync::Job<QString> createSubfolder(const QString &parentMailbox, const QString &folderName); | 132 | KAsync::Job<QString> createSubfolder(const QString &parentMailbox, const QString &folderName); |
133 | KAsync::Job<QString> renameSubfolder(const QString &mailbox, const QString &newName); | 133 | KAsync::Job<QString> renameSubfolder(const QString &mailbox, const QString &newName); |
134 | KAsync::Job<QVector<qint64>> fetchUids(const QString &mailbox); | 134 | KAsync::Job<QVector<qint64>> fetchUids(const QString &mailbox); |