summaryrefslogtreecommitdiffstats
path: root/examples/imapresource/imapserverproxy.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/imapresource/imapserverproxy.h')
-rw-r--r--examples/imapresource/imapserverproxy.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/examples/imapresource/imapserverproxy.h b/examples/imapresource/imapserverproxy.h
index 58c49a2..0d70ba5 100644
--- a/examples/imapresource/imapserverproxy.h
+++ b/examples/imapresource/imapserverproxy.h
@@ -61,6 +61,7 @@ namespace FolderFlags
61 extern const char* Junk; 61 extern const char* Junk;
62 extern const char* Flagged; 62 extern const char* Flagged;
63 extern const char* All; 63 extern const char* All;
64 extern const char* Drafts;
64} 65}
65 66
66namespace Capabilities 67namespace Capabilities
@@ -79,6 +80,8 @@ struct Message {
79 bool fullPayload; 80 bool fullPayload;
80}; 81};
81 82
83bool flagsContain(const QByteArray &f, const QByteArrayList &flags);
84
82struct Folder { 85struct Folder {
83 Folder() = default; 86 Folder() = default;
84 Folder(const QString &path, const QString &ns, const QChar &separator, bool noselect_, bool subscribed_, const QByteArrayList &flags_) 87 Folder(const QString &path, const QString &ns, const QChar &separator, bool noselect_, bool subscribed_, const QByteArrayList &flags_)
@@ -226,11 +229,6 @@ private:
226}; 229};
227 230
228class ImapServerProxy { 231class ImapServerProxy {
229 KIMAP2::Session *mSession;
230 QStringList mCapabilities;
231 Namespaces mNamespaces;
232
233
234public: 232public:
235 ImapServerProxy(const QString &serverUrl, int port, SessionCache *sessionCache = nullptr); 233 ImapServerProxy(const QString &serverUrl, int port, SessionCache *sessionCache = nullptr);
236 234
@@ -280,9 +278,14 @@ public:
280 KAsync::Job<QVector<qint64>> fetchUids(const Folder &folder); 278 KAsync::Job<QVector<qint64>> fetchUids(const Folder &folder);
281 279
282private: 280private:
281 bool isGmail() const;
282
283 QString getNamespace(const QString &name); 283 QString getNamespace(const QString &name);
284 QObject mGuard; 284 QObject mGuard;
285 SessionCache *mSessionCache; 285 SessionCache *mSessionCache;
286 KIMAP2::Session *mSession;
287 QStringList mCapabilities;
288 Namespaces mNamespaces;
286}; 289};
287 290
288} 291}