summaryrefslogtreecommitdiff
path: root/noncore/net/mail/imapwrapper.cpp
authoralwin <alwin>2003-12-13 20:39:07 (UTC)
committer alwin <alwin>2003-12-13 20:39:07 (UTC)
commit85444223acfafd9d7955032b2cbdad3279ba27ad (patch) (unidiff)
tree444063490a58ffc7ca085219827a577ad6213442 /noncore/net/mail/imapwrapper.cpp
parentd161cb46c21ae6a9e9f74dc60fb6ac6ac8e62f1b (diff)
downloadopie-85444223acfafd9d7955032b2cbdad3279ba27ad.zip
opie-85444223acfafd9d7955032b2cbdad3279ba27ad.tar.gz
opie-85444223acfafd9d7955032b2cbdad3279ba27ad.tar.bz2
imap/pop3 wrapper uses base virtual class so we can forward the pointer
independend of its later use. ToDo: find a more general interface for it
Diffstat (limited to 'noncore/net/mail/imapwrapper.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/imapwrapper.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/net/mail/imapwrapper.cpp b/noncore/net/mail/imapwrapper.cpp
index 48e476b..e5eb335 100644
--- a/noncore/net/mail/imapwrapper.cpp
+++ b/noncore/net/mail/imapwrapper.cpp
@@ -3,12 +3,13 @@
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()
@@ -136,20 +137,20 @@ void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target )
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