Diffstat (limited to 'noncore/net/mail/libmailwrapper/imapwrapper.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index 657c2ba..35468fe 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp | |||
@@ -31,5 +31,5 @@ int IMAPwrapper::selectMbox(const QString&mbox) | |||
31 | int err = mailimap_select( m_imap, (char*)mbox.latin1()); | 31 | int err = mailimap_select( m_imap, (char*)mbox.latin1()); |
32 | if ( err != MAILIMAP_NO_ERROR ) { | 32 | if ( err != MAILIMAP_NO_ERROR ) { |
33 | qDebug("error selecting mailbox: %s",m_imap->imap_response); | 33 | odebug << "error selecting mailbox: " << m_imap->imap_response << "" << oendl; |
34 | m_Lastmbox = ""; | 34 | m_Lastmbox = ""; |
35 | return err; | 35 | return err; |
@@ -42,5 +42,5 @@ void IMAPwrapper::imap_progress( size_t current, size_t maximum ) | |||
42 | { | 42 | { |
43 | qApp->processEvents(); | 43 | qApp->processEvents(); |
44 | qDebug( "IMAP: %i of %i", current, maximum ); | 44 | odebug << "IMAP: " << current << " of " << maximum << "" << oendl; |
45 | } | 45 | } |
46 | 46 | ||
@@ -54,5 +54,5 @@ bool IMAPwrapper::start_tls(bool force_tls) | |||
54 | if (err != MAILIMAP_NO_ERROR) { | 54 | if (err != MAILIMAP_NO_ERROR) { |
55 | Global::statusMessage("error getting capabilities!"); | 55 | Global::statusMessage("error getting capabilities!"); |
56 | qDebug("error getting capabilities!"); | 56 | odebug << "error getting capabilities!" << oendl; |
57 | return false; | 57 | return false; |
58 | } | 58 | } |
@@ -75,5 +75,5 @@ bool IMAPwrapper::start_tls(bool force_tls) | |||
75 | if (err != MAILIMAP_NO_ERROR && force_tls) { | 75 | if (err != MAILIMAP_NO_ERROR && force_tls) { |
76 | Global::statusMessage(tr("Server has no TLS support!")); | 76 | Global::statusMessage(tr("Server has no TLS support!")); |
77 | qDebug("Server has no TLS support!"); | 77 | odebug << "Server has no TLS support!" << oendl; |
78 | try_tls = false; | 78 | try_tls = false; |
79 | } else { | 79 | } else { |
@@ -126,5 +126,5 @@ void IMAPwrapper::login() | |||
126 | } else { | 126 | } else { |
127 | // cancel | 127 | // cancel |
128 | qDebug( "IMAP: Login canceled" ); | 128 | odebug << "IMAP: Login canceled" << oendl; |
129 | return; | 129 | return; |
130 | } | 130 | } |
@@ -149,5 +149,5 @@ void IMAPwrapper::login() | |||
149 | 149 | ||
150 | if ( ssl ) { | 150 | if ( ssl ) { |
151 | qDebug( "using ssl" ); | 151 | odebug << "using ssl" << oendl; |
152 | err = mailimap_ssl_connect( m_imap, (char*)server, port ); | 152 | err = mailimap_ssl_connect( m_imap, (char*)server, port ); |
153 | } else { | 153 | } else { |
@@ -177,5 +177,5 @@ void IMAPwrapper::login() | |||
177 | if (force_tls && !try_tls) { | 177 | if (force_tls && !try_tls) { |
178 | Global::statusMessage(tr("Server has no TLS support!")); | 178 | Global::statusMessage(tr("Server has no TLS support!")); |
179 | qDebug("Server has no TLS support!"); | 179 | odebug << "Server has no TLS support!" << oendl; |
180 | ok = false; | 180 | ok = false; |
181 | } | 181 | } |
@@ -318,5 +318,5 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() | |||
318 | } | 318 | } |
319 | } else { | 319 | } else { |
320 | qDebug("error fetching folders: %s",m_imap->imap_response); | 320 | odebug << "error fetching folders: " << m_imap->imap_response << "" << oendl; |
321 | } | 321 | } |
322 | mailimap_list_result_free( result ); | 322 | mailimap_list_result_free( result ); |
@@ -328,5 +328,5 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() | |||
328 | path = account->getPrefix().latin1(); | 328 | path = account->getPrefix().latin1(); |
329 | if (!path) path = ""; | 329 | if (!path) path = ""; |
330 | qDebug(path); | 330 | odebug << path << oendl; |
331 | err = mailimap_list( m_imap, (char*)path, (char*)mask, &result ); | 331 | err = mailimap_list( m_imap, (char*)path, (char*)mask, &result ); |
332 | if ( err == MAILIMAP_NO_ERROR ) { | 332 | if ( err == MAILIMAP_NO_ERROR ) { |
@@ -355,5 +355,5 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() | |||
355 | } | 355 | } |
356 | } else { | 356 | } else { |
357 | qDebug("error fetching folders %s",m_imap->imap_response); | 357 | odebug << "error fetching folders " << m_imap->imap_response << "" << oendl; |
358 | } | 358 | } |
359 | if (result) mailimap_list_result_free( result ); | 359 | if (result) mailimap_list_result_free( result ); |
@@ -467,6 +467,6 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
467 | mailimap_date_time*d = item->att_data.att_static->att_data.att_internal_date; | 467 | mailimap_date_time*d = item->att_data.att_static->att_data.att_internal_date; |
468 | QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec)); | 468 | QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec)); |
469 | qDebug("%i %i %i - %i %i %i",d->dt_year,d->dt_month,d->dt_day,d->dt_hour,d->dt_min,d->dt_sec); | 469 | odebug << "" << d->dt_year << " " << d->dt_month << " " << d->dt_day << " - " << d->dt_hour << " " << d->dt_min << " " << d->dt_sec << "" << oendl; |
470 | qDebug(da.toString()); | 470 | odebug << da.toString() << oendl; |
471 | #endif | 471 | #endif |
472 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) { | 472 | } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) { |
@@ -525,5 +525,5 @@ RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail) | |||
525 | traverseBody(mail,body_desc,body,0,path); | 525 | traverseBody(mail,body_desc,body,0,path); |
526 | } else { | 526 | } else { |
527 | qDebug("error fetching body: %s",m_imap->imap_response); | 527 | odebug << "error fetching body: " << m_imap->imap_response << "" << oendl; |
528 | } | 528 | } |
529 | if (result) mailimap_fetch_list_free(result); | 529 | if (result) mailimap_fetch_list_free(result); |
@@ -637,5 +637,5 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueList<int | |||
637 | } | 637 | } |
638 | } else { | 638 | } else { |
639 | qDebug("error fetching text: %s",m_imap->imap_response); | 639 | odebug << "error fetching text: " << m_imap->imap_response << "" << oendl; |
640 | } | 640 | } |
641 | if (result) mailimap_fetch_list_free(result); | 641 | if (result) mailimap_fetch_list_free(result); |
@@ -664,5 +664,5 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t | |||
664 | id+=QString("%1").arg(countlist[j]); | 664 | id+=QString("%1").arg(countlist[j]); |
665 | } | 665 | } |
666 | qDebug("ID = %s",id.latin1()); | 666 | odebug << "ID = " << id.latin1() << "" << oendl; |
667 | currentPart->setIdentifier(id); | 667 | currentPart->setIdentifier(id); |
668 | fillSinglePart(currentPart,part1); | 668 | fillSinglePart(currentPart,part1); |
@@ -705,5 +705,5 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t | |||
705 | id+=QString("%1").arg(countlist[j]); | 705 | id+=QString("%1").arg(countlist[j]); |
706 | } | 706 | } |
707 | qDebug("ID(mpart) = %s",id.latin1()); | 707 | odebug << "ID(mpart) = " << id.latin1() << "" << oendl; |
708 | } | 708 | } |
709 | traverseBody(mail,current_body,target_body,current_recursion+1,countlist,ccount); | 709 | traverseBody(mail,current_body,target_body,current_recursion+1,countlist,ccount); |
@@ -749,5 +749,5 @@ void IMAPwrapper::fillSingleTextPart(RecPartP&target_part,mailimap_body_type_tex | |||
749 | QString sub; | 749 | QString sub; |
750 | sub = which->bd_media_text; | 750 | sub = which->bd_media_text; |
751 | qDebug("Type= text/%s",which->bd_media_text); | 751 | odebug << "Type= text/" << which->bd_media_text << "" << oendl; |
752 | target_part->setSubtype(sub.lower()); | 752 | target_part->setSubtype(sub.lower()); |
753 | target_part->setLines(which->bd_lines); | 753 | target_part->setLines(which->bd_lines); |
@@ -761,5 +761,5 @@ void IMAPwrapper::fillSingleMsgPart(RecPartP&target_part,mailimap_body_type_msg* | |||
761 | } | 761 | } |
762 | target_part->setSubtype("rfc822"); | 762 | target_part->setSubtype("rfc822"); |
763 | qDebug("Message part"); | 763 | odebug << "Message part" << oendl; |
764 | /* we set this type to text/plain */ | 764 | /* we set this type to text/plain */ |
765 | target_part->setLines(which->bd_lines); | 765 | target_part->setLines(which->bd_lines); |
@@ -820,5 +820,5 @@ void IMAPwrapper::fillSingleBasicPart(RecPartP&target_part,mailimap_body_type_ba | |||
820 | sub = ""; | 820 | sub = ""; |
821 | } | 821 | } |
822 | qDebug("Type = %s/%s",type.latin1(),sub.latin1()); | 822 | odebug << "Type = " << type.latin1() << "/" << sub.latin1() << "" << oendl; |
823 | target_part->setType(type.lower()); | 823 | target_part->setType(type.lower()); |
824 | target_part->setSubtype(sub.lower()); | 824 | target_part->setSubtype(sub.lower()); |
@@ -896,14 +896,14 @@ void IMAPwrapper::deleteMail(const RecMailP&mail) | |||
896 | 896 | ||
897 | if (err != MAILIMAP_NO_ERROR) { | 897 | if (err != MAILIMAP_NO_ERROR) { |
898 | qDebug("error deleting mail: %s",m_imap->imap_response); | 898 | odebug << "error deleting mail: " << m_imap->imap_response << "" << oendl; |
899 | return; | 899 | return; |
900 | } | 900 | } |
901 | qDebug("deleting mail: %s",m_imap->imap_response); | 901 | odebug << "deleting mail: " << m_imap->imap_response << "" << oendl; |
902 | /* should we realy do that at this moment? */ | 902 | /* should we realy do that at this moment? */ |
903 | err = mailimap_expunge(m_imap); | 903 | err = mailimap_expunge(m_imap); |
904 | if (err != MAILIMAP_NO_ERROR) { | 904 | if (err != MAILIMAP_NO_ERROR) { |
905 | qDebug("error deleting mail: %s",m_imap->imap_response); | 905 | odebug << "error deleting mail: " << m_imap->imap_response << "" << oendl; |
906 | } | 906 | } |
907 | qDebug("Delete successfull %s",m_imap->imap_response); | 907 | odebug << "Delete successfull " << m_imap->imap_response << "" << oendl; |
908 | } | 908 | } |
909 | 909 | ||
@@ -931,5 +931,5 @@ void IMAPwrapper::answeredMail(const RecMailP&mail) | |||
931 | 931 | ||
932 | if (err != MAILIMAP_NO_ERROR) { | 932 | if (err != MAILIMAP_NO_ERROR) { |
933 | qDebug("error marking mail: %s",m_imap->imap_response); | 933 | odebug << "error marking mail: " << m_imap->imap_response << "" << oendl; |
934 | return; | 934 | return; |
935 | } | 935 | } |
@@ -999,5 +999,5 @@ int IMAPwrapper::deleteAllMail(const FolderP&folder) | |||
999 | return 0; | 999 | return 0; |
1000 | } | 1000 | } |
1001 | qDebug("deleting mail: %s",m_imap->imap_response); | 1001 | odebug << "deleting mail: " << m_imap->imap_response << "" << oendl; |
1002 | /* should we realy do that at this moment? */ | 1002 | /* should we realy do that at this moment? */ |
1003 | err = mailimap_expunge(m_imap); | 1003 | err = mailimap_expunge(m_imap); |
@@ -1006,5 +1006,5 @@ int IMAPwrapper::deleteAllMail(const FolderP&folder) | |||
1006 | return 0; | 1006 | return 0; |
1007 | } | 1007 | } |
1008 | qDebug("Delete successfull %s",m_imap->imap_response); | 1008 | odebug << "Delete successfull " << m_imap->imap_response << "" << oendl; |
1009 | return 1; | 1009 | return 1; |
1010 | } | 1010 | } |
@@ -1031,5 +1031,5 @@ int IMAPwrapper::createMbox(const QString&folder,const FolderP&parentfolder,cons | |||
1031 | } | 1031 | } |
1032 | } | 1032 | } |
1033 | qDebug("Creating %s",pre.latin1()); | 1033 | odebug << "Creating " << pre.latin1() << "" << oendl; |
1034 | int res = mailimap_create(m_imap,pre.latin1()); | 1034 | int res = mailimap_create(m_imap,pre.latin1()); |
1035 | if (res != MAILIMAP_NO_ERROR) { | 1035 | if (res != MAILIMAP_NO_ERROR) { |
@@ -1090,5 +1090,5 @@ void IMAPwrapper::statusFolder(folderStat&target_stat,const QString & mailbox) | |||
1090 | } | 1090 | } |
1091 | } else { | 1091 | } else { |
1092 | qDebug("Error retrieving status"); | 1092 | odebug << "Error retrieving status" << oendl; |
1093 | } | 1093 | } |
1094 | if (status) mailimap_mailbox_data_status_free(status); | 1094 | if (status) mailimap_mailbox_data_status_free(status); |
@@ -1114,5 +1114,5 @@ MAILLIB::ATYPE IMAPwrapper::getType()const | |||
1114 | const QString&IMAPwrapper::getName()const | 1114 | const QString&IMAPwrapper::getName()const |
1115 | { | 1115 | { |
1116 | qDebug("Get name: %s",account->getAccountName().latin1()); | 1116 | odebug << "Get name: " << account->getAccountName().latin1() << "" << oendl; |
1117 | return account->getAccountName(); | 1117 | return account->getAccountName(); |
1118 | } | 1118 | } |
@@ -1130,5 +1130,5 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder, | |||
1130 | if (targetWrapper != this) { | 1130 | if (targetWrapper != this) { |
1131 | AbstractMail::mvcpAllMails(fromFolder,targetFolder,targetWrapper,moveit); | 1131 | AbstractMail::mvcpAllMails(fromFolder,targetFolder,targetWrapper,moveit); |
1132 | qDebug("Using generic"); | 1132 | odebug << "Using generic" << oendl; |
1133 | return; | 1133 | return; |
1134 | } | 1134 | } |
@@ -1149,5 +1149,5 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder, | |||
1149 | QString error_msg = tr("error copy mails: %1").arg(m_imap->imap_response); | 1149 | QString error_msg = tr("error copy mails: %1").arg(m_imap->imap_response); |
1150 | Global::statusMessage(error_msg); | 1150 | Global::statusMessage(error_msg); |
1151 | qDebug(error_msg); | 1151 | odebug << error_msg << oendl; |
1152 | return; | 1152 | return; |
1153 | } | 1153 | } |
@@ -1160,5 +1160,5 @@ void IMAPwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,Abstra | |||
1160 | { | 1160 | { |
1161 | if (targetWrapper != this) { | 1161 | if (targetWrapper != this) { |
1162 | qDebug("Using generic"); | 1162 | odebug << "Using generic" << oendl; |
1163 | AbstractMail::mvcpMail(mail,targetFolder,targetWrapper,moveit); | 1163 | AbstractMail::mvcpMail(mail,targetFolder,targetWrapper,moveit); |
1164 | return; | 1164 | return; |
@@ -1179,5 +1179,5 @@ void IMAPwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,Abstra | |||
1179 | QString error_msg = tr("error copy mail: %1").arg(m_imap->imap_response); | 1179 | QString error_msg = tr("error copy mail: %1").arg(m_imap->imap_response); |
1180 | Global::statusMessage(error_msg); | 1180 | Global::statusMessage(error_msg); |
1181 | qDebug(error_msg); | 1181 | odebug << error_msg << oendl; |
1182 | return; | 1182 | return; |
1183 | } | 1183 | } |