summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/imapwrapper.cpp
Unidiff
Diffstat (limited to 'kmicromail/libmailwrapper/imapwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/imapwrapper.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp
index 4f0c849..f73f4cc 100644
--- a/kmicromail/libmailwrapper/imapwrapper.cpp
+++ b/kmicromail/libmailwrapper/imapwrapper.cpp
@@ -3,10 +3,12 @@
3#include <libetpan/libetpan.h> 3#include <libetpan/libetpan.h>
4#include <qpe/global.h> 4#include <qpe/global.h>
5#include <qapplication.h> 5#include <qapplication.h>
6//Added by qt3to4:
7#include <Q3ValueList>
6#include "imapwrapper.h" 8#include "imapwrapper.h"
7#include "mailtypes.h" 9#include "mailtypes.h"
8#include "logindialog.h" 10#include "logindialog.h"
9#include <qprogressbar.h> 11#include <q3progressbar.h>
10#include "genericwrapper.h" 12#include "genericwrapper.h"
11#include <kglobal.h> 13#include <kglobal.h>
12 14
@@ -239,7 +241,7 @@ void IMAPwrapper::logout()
239 m_Lastmbox = ""; 241 m_Lastmbox = "";
240} 242}
241 243
242void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> > &target , int maxSizeInKb) 244void IMAPwrapper::listMessages(const QString&mailbox,Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target , int maxSizeInKb)
243{ 245{
244 246
245 int tryAgain = 1; 247 int tryAgain = 1;
@@ -320,7 +322,7 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSma
320 } 322 }
321} 323}
322 324
323QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() 325Q3ValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders()
324{ 326{
325 const char *path, *mask; 327 const char *path, *mask;
326 int err = MAILIMAP_NO_ERROR; 328 int err = MAILIMAP_NO_ERROR;
@@ -329,7 +331,7 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders()
329 clistcell*cur_flag = 0; 331 clistcell*cur_flag = 0;
330 mailimap_mbx_list_flags*bflags = 0; 332 mailimap_mbx_list_flags*bflags = 0;
331 333
332 QValueList<FolderP>* folders = new QValueList<FolderP>(); 334 Q3ValueList<FolderP>* folders = new Q3ValueList<FolderP>();
333 login(); 335 login();
334 if (!m_imap) { 336 if (!m_imap) {
335 return folders; 337 return folders;
@@ -613,7 +615,7 @@ RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail)
613 mailimap_msg_att * msg_att; 615 mailimap_msg_att * msg_att;
614 msg_att = (mailimap_msg_att*)current->data; 616 msg_att = (mailimap_msg_att*)current->data;
615 mailimap_msg_att_item*item = (mailimap_msg_att_item*)msg_att->att_list->first->data; 617 mailimap_msg_att_item*item = (mailimap_msg_att_item*)msg_att->att_list->first->data;
616 QValueList<int> path; 618 Q3ValueList<int> path;
617 body_desc = item->att_data.att_static->att_data.att_body; 619 body_desc = item->att_data.att_static->att_data.att_body;
618 traverseBody(mail,body_desc,body,0,path); 620 traverseBody(mail,body_desc,body,0,path);
619 } else { 621 } else {
@@ -664,7 +666,7 @@ QStringList IMAPwrapper::address_list_to_stringlist(clist*list)
664 return l; 666 return l;
665} 667}
666 668
667encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call) 669encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const Q3ValueList<int>&path,bool internal_call)
668{ 670{
669 encodedString*res=new encodedString; 671 encodedString*res=new encodedString;
670 int err; 672 int err;
@@ -738,7 +740,7 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueList<int
738/* current_recursion is for recursive calls. 740/* current_recursion is for recursive calls.
739 current_count means the position inside the internal loop! */ 741 current_count means the position inside the internal loop! */
740void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body, 742void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body,
741 int current_recursion,QValueList<int>recList,int current_count) 743 int current_recursion,Q3ValueList<int>recList,int current_count)
742{ 744{
743 if (!body || current_recursion>=10) { 745 if (!body || current_recursion>=10) {
744 return; 746 return;
@@ -746,7 +748,7 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t
746 switch (body->bd_type) { 748 switch (body->bd_type) {
747 case MAILIMAP_BODY_1PART: 749 case MAILIMAP_BODY_1PART:
748 { 750 {
749 QValueList<int>countlist = recList; 751 Q3ValueList<int>countlist = recList;
750 countlist.append(current_count); 752 countlist.append(current_count);
751 RecPartP currentPart = new RecPart(); 753 RecPartP currentPart = new RecPart();
752 mailimap_body_type_1part*part1 = body->bd_data.bd_body_1part; 754 mailimap_body_type_1part*part1 = body->bd_data.bd_body_1part;
@@ -799,7 +801,7 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t
799 break; 801 break;
800 case MAILIMAP_BODY_MPART: 802 case MAILIMAP_BODY_MPART:
801 { 803 {
802 QValueList<int>countlist = recList; 804 Q3ValueList<int>countlist = recList;
803 clistcell*current=0; 805 clistcell*current=0;
804 mailimap_body*current_body=0; 806 mailimap_body*current_body=0;
805 unsigned int ccount = 1; 807 unsigned int ccount = 1;
@@ -985,7 +987,7 @@ void IMAPwrapper::fillBodyFields(RecPartP&target_part,mailimap_body_fields*which
985 target_part->setEncoding(encoding); 987 target_part->setEncoding(encoding);
986 target_part->setSize(which->bd_size); 988 target_part->setSize(which->bd_size);
987} 989}
988void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target) 990void IMAPwrapper::deleteMailList(const Q3ValueList<RecMailP>&target)
989{ 991{
990 //#if 0 992 //#if 0
991 mailimap_flag_list*flist; 993 mailimap_flag_list*flist;
@@ -1005,7 +1007,7 @@ void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target)
1005 mMax = count; 1007 mMax = count;
1006 progress( i18n("Delete")); 1008 progress( i18n("Delete"));
1007 1009
1008 QProgressBar wid ( count ); 1010 Q3ProgressBar wid ( count );
1009 wid.setCaption( i18n("Deleting ...")); 1011 wid.setCaption( i18n("Deleting ..."));
1010 wid.show(); 1012 wid.show();
1011 while (iii < count ) { 1013 while (iii < count ) {
@@ -1114,7 +1116,7 @@ void IMAPwrapper::answeredMail(const RecMailP&mail)
1114 } 1116 }
1115} 1117}
1116 1118
1117QString IMAPwrapper::fetchTextPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call,const QString&enc) 1119QString IMAPwrapper::fetchTextPart(const RecMailP&mail,const Q3ValueList<int>&path,bool internal_call,const QString&enc)
1118{ 1120{
1119 QString body(""); 1121 QString body("");
1120 encodedString*res = fetchRawPart(mail,path,internal_call); 1122 encodedString*res = fetchRawPart(mail,path,internal_call);
@@ -1299,7 +1301,7 @@ const QString&IMAPwrapper::getName()const
1299encodedString* IMAPwrapper::fetchRawBody(const RecMailP&mail) 1301encodedString* IMAPwrapper::fetchRawBody(const RecMailP&mail)
1300{ 1302{
1301 // dummy 1303 // dummy
1302 QValueList<int> path; 1304 Q3ValueList<int> path;
1303 return fetchRawPart(mail,path,false); 1305 return fetchRawPart(mail,path,false);
1304} 1306}
1305 1307