summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/imapwrapper.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/libmailwrapper/imapwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/imapwrapper.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp
index 48e476b..e5eb335 100644
--- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp
@@ -1,20 +1,21 @@
1 1
2#include <stdlib.h> 2#include <stdlib.h>
3 3
4#include "imapwrapper.h" 4#include "imapwrapper.h"
5#include "mailtypes.h" 5#include "mailtypes.h"
6#include <libetpan/mailimap.h> 6#include <libetpan/mailimap.h>
7 7
8IMAPwrapper::IMAPwrapper( IMAPaccount *a ) 8IMAPwrapper::IMAPwrapper( IMAPaccount *a )
9 : AbstractMail()
9{ 10{
10 account = a; 11 account = a;
11 m_imap = 0; 12 m_imap = 0;
12} 13}
13 14
14IMAPwrapper::~IMAPwrapper() 15IMAPwrapper::~IMAPwrapper()
15{ 16{
16 logout(); 17 logout();
17} 18}
18 19
19void IMAPwrapper::imap_progress( size_t current, size_t maximum ) 20void IMAPwrapper::imap_progress( size_t current, size_t maximum )
20{ 21{
@@ -130,32 +131,32 @@ void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target )
130 if (m) { 131 if (m) {
131 m->setNumber(i); 132 m->setNumber(i);
132 m->setMbox(mailbox); 133 m->setMbox(mailbox);
133 target.append(m); 134 target.append(m);
134 } 135 }
135 } 136 }
136 } else { 137 } else {
137 qDebug("Error fetching headers: %s",m_imap->imap_response); 138 qDebug("Error fetching headers: %s",m_imap->imap_response);
138 } 139 }
139 mailimap_fetch_list_free(result); 140 mailimap_fetch_list_free(result);
140} 141}
141 142
142QList<IMAPFolder>* IMAPwrapper::listFolders() 143QList<Folder>* IMAPwrapper::listFolders()
143{ 144{
144 const char *path, *mask; 145 const char *path, *mask;
145 int err = MAILIMAP_NO_ERROR; 146 int err = MAILIMAP_NO_ERROR;
146 clist *result; 147 clist *result;
147 clistcell *current; 148 clistcell *current;
148 149
149 QList<IMAPFolder> * folders = new QList<IMAPFolder>(); 150 QList<Folder> * folders = new QList<Folder>();
150 folders->setAutoDelete( true ); 151 folders->setAutoDelete( true );
151 login(); 152 login();
152 if (!m_imap) { 153 if (!m_imap) {
153 return folders; 154 return folders;
154 } 155 }
155 156
156/* 157/*
157 * First we have to check for INBOX 'cause it sometimes it's not inside the path. 158 * First we have to check for INBOX 'cause it sometimes it's not inside the path.
158 * We must not forget to filter them out in next loop! 159 * We must not forget to filter them out in next loop!
159 * it seems like ugly code. and yes - it is ugly code. but the best way. 160 * it seems like ugly code. and yes - it is ugly code. but the best way.
160 */ 161 */
161 QString temp; 162 QString temp;