Diffstat (limited to 'noncore/net/mail/libmailwrapper/imapwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index e29a0a0..3b3be0f 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp | |||
@@ -263,23 +263,22 @@ void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target ) | |||
263 | } else { | 263 | } else { |
264 | Global::statusMessage(tr("Error fetching headers: %1").arg(m_imap->imap_response)); | 264 | Global::statusMessage(tr("Error fetching headers: %1").arg(m_imap->imap_response)); |
265 | } | 265 | } |
266 | if (result) mailimap_fetch_list_free(result); | 266 | if (result) mailimap_fetch_list_free(result); |
267 | } | 267 | } |
268 | 268 | ||
269 | QList<Folder>* IMAPwrapper::listFolders() | 269 | QValueList<Opie::osmart_pointer<Folder> >* IMAPwrapper::listFolders() |
270 | { | 270 | { |
271 | const char *path, *mask; | 271 | const char *path, *mask; |
272 | int err = MAILIMAP_NO_ERROR; | 272 | int err = MAILIMAP_NO_ERROR; |
273 | clist *result = 0; | 273 | clist *result = 0; |
274 | clistcell *current = 0; | 274 | clistcell *current = 0; |
275 | clistcell*cur_flag = 0; | 275 | clistcell*cur_flag = 0; |
276 | mailimap_mbx_list_flags*bflags = 0; | 276 | mailimap_mbx_list_flags*bflags = 0; |
277 | 277 | ||
278 | QList<Folder> * folders = new QList<Folder>(); | 278 | QValueList<FolderP>* folders = new QValueList<FolderP>(); |
279 | folders->setAutoDelete( false ); | ||
280 | login(); | 279 | login(); |
281 | if (!m_imap) { | 280 | if (!m_imap) { |
282 | return folders; | 281 | return folders; |
283 | } | 282 | } |
284 | 283 | ||
285 | /* | 284 | /* |
@@ -963,13 +962,13 @@ encodedString* IMAPwrapper::fetchDecodedPart(const RecMail&mail,const RecPart&pa | |||
963 | 962 | ||
964 | encodedString* IMAPwrapper::fetchRawPart(const RecMail&mail,const RecPart&part) | 963 | encodedString* IMAPwrapper::fetchRawPart(const RecMail&mail,const RecPart&part) |
965 | { | 964 | { |
966 | return fetchRawPart(mail,part.Positionlist(),false); | 965 | return fetchRawPart(mail,part.Positionlist(),false); |
967 | } | 966 | } |
968 | 967 | ||
969 | int IMAPwrapper::deleteAllMail(const Folder*folder) | 968 | int IMAPwrapper::deleteAllMail(const FolderP&folder) |
970 | { | 969 | { |
971 | login(); | 970 | login(); |
972 | if (!m_imap) { | 971 | if (!m_imap) { |
973 | return 0; | 972 | return 0; |
974 | } | 973 | } |
975 | mailimap_flag_list*flist; | 974 | mailimap_flag_list*flist; |
@@ -1004,13 +1003,13 @@ int IMAPwrapper::deleteAllMail(const Folder*folder) | |||
1004 | return 0; | 1003 | return 0; |
1005 | } | 1004 | } |
1006 | qDebug("Delete successfull %s",m_imap->imap_response); | 1005 | qDebug("Delete successfull %s",m_imap->imap_response); |
1007 | return 1; | 1006 | return 1; |
1008 | } | 1007 | } |
1009 | 1008 | ||
1010 | int IMAPwrapper::createMbox(const QString&folder,const Folder*parentfolder,const QString& delemiter,bool getsubfolder) | 1009 | int IMAPwrapper::createMbox(const QString&folder,const FolderP&parentfolder,const QString& delemiter,bool getsubfolder) |
1011 | { | 1010 | { |
1012 | if (folder.length()==0) return 0; | 1011 | if (folder.length()==0) return 0; |
1013 | login(); | 1012 | login(); |
1014 | if (!m_imap) {return 0;} | 1013 | if (!m_imap) {return 0;} |
1015 | QString pre = account->getPrefix(); | 1014 | QString pre = account->getPrefix(); |
1016 | if (delemiter.length()>0 && pre.findRev(delemiter)!=pre.length()-1) { | 1015 | if (delemiter.length()>0 && pre.findRev(delemiter)!=pre.length()-1) { |
@@ -1034,13 +1033,13 @@ int IMAPwrapper::createMbox(const QString&folder,const Folder*parentfolder,const | |||
1034 | Global::statusMessage(tr("%1").arg(m_imap->imap_response)); | 1033 | Global::statusMessage(tr("%1").arg(m_imap->imap_response)); |
1035 | return 0; | 1034 | return 0; |
1036 | } | 1035 | } |
1037 | return 1; | 1036 | return 1; |
1038 | } | 1037 | } |
1039 | 1038 | ||
1040 | int IMAPwrapper::deleteMbox(const Folder*folder) | 1039 | int IMAPwrapper::deleteMbox(const FolderP&folder) |
1041 | { | 1040 | { |
1042 | if (!folder) return 0; | 1041 | if (!folder) return 0; |
1043 | login(); | 1042 | login(); |
1044 | if (!m_imap) {return 0;} | 1043 | if (!m_imap) {return 0;} |
1045 | int res = mailimap_delete(m_imap,folder->getName()); | 1044 | int res = mailimap_delete(m_imap,folder->getName()); |
1046 | if (res != MAILIMAP_NO_ERROR) { | 1045 | if (res != MAILIMAP_NO_ERROR) { |
@@ -1120,13 +1119,14 @@ encodedString* IMAPwrapper::fetchRawBody(const RecMail&mail) | |||
1120 | { | 1119 | { |
1121 | // dummy | 1120 | // dummy |
1122 | QValueList<int> path; | 1121 | QValueList<int> path; |
1123 | return fetchRawPart(mail,path,false); | 1122 | return fetchRawPart(mail,path,false); |
1124 | } | 1123 | } |
1125 | 1124 | ||
1126 | void IMAPwrapper::mvcpAllMails(Folder*fromFolder,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) | 1125 | void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder, |
1126 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) | ||
1127 | { | 1127 | { |
1128 | if (targetWrapper != this) { | 1128 | if (targetWrapper != this) { |
1129 | AbstractMail::mvcpAllMails(fromFolder,targetFolder,targetWrapper,moveit); | 1129 | AbstractMail::mvcpAllMails(fromFolder,targetFolder,targetWrapper,moveit); |
1130 | qDebug("Using generic"); | 1130 | qDebug("Using generic"); |
1131 | return; | 1131 | return; |
1132 | } | 1132 | } |