diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-03-02 11:54:55 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-03-02 11:54:55 +0100 |
commit | ee5dfc0878059a48fdff7ca16b0aa69a652414d5 (patch) | |
tree | ac57d2df7aa1344462be2638269875672b7250f0 /examples/imapresource/imapserverproxy.cpp | |
parent | cd3f995fe28d4b8e61137692672ebd3436f651f0 (diff) | |
download | sink-ee5dfc0878059a48fdff7ca16b0aa69a652414d5.tar.gz sink-ee5dfc0878059a48fdff7ca16b0aa69a652414d5.zip |
Subscribe to mailboxes we create in tests
Diffstat (limited to 'examples/imapresource/imapserverproxy.cpp')
-rw-r--r-- | examples/imapresource/imapserverproxy.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/imapresource/imapserverproxy.cpp b/examples/imapresource/imapserverproxy.cpp index 08001d9..ce379de 100644 --- a/examples/imapresource/imapserverproxy.cpp +++ b/examples/imapresource/imapserverproxy.cpp | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <KIMAP2/CapabilitiesJob> | 32 | #include <KIMAP2/CapabilitiesJob> |
33 | #include <KIMAP2/SearchJob> | 33 | #include <KIMAP2/SearchJob> |
34 | #include <KIMAP2/GetMetaDataJob> | 34 | #include <KIMAP2/GetMetaDataJob> |
35 | #include <KIMAP2/SubscribeJob> | ||
35 | 36 | ||
36 | #include <KCoreAddons/KJob> | 37 | #include <KCoreAddons/KJob> |
37 | 38 | ||
@@ -321,6 +322,13 @@ KAsync::Job<void> ImapServerProxy::create(const QString &mailbox) | |||
321 | return runJob(create); | 322 | return runJob(create); |
322 | } | 323 | } |
323 | 324 | ||
325 | KAsync::Job<void> ImapServerProxy::subscribe(const QString &mailbox) | ||
326 | { | ||
327 | auto job = new KIMAP2::SubscribeJob(mSession); | ||
328 | job->setMailBox(mailbox); | ||
329 | return runJob(job); | ||
330 | } | ||
331 | |||
324 | KAsync::Job<void> ImapServerProxy::rename(const QString &mailbox, const QString &newMailbox) | 332 | KAsync::Job<void> ImapServerProxy::rename(const QString &mailbox, const QString &newMailbox) |
325 | { | 333 | { |
326 | auto rename = new KIMAP2::RenameJob(mSession); | 334 | auto rename = new KIMAP2::RenameJob(mSession); |