summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/imapwrapper.cpp23
-rw-r--r--noncore/net/mail/libmailwrapper/imapwrapper.cpp23
2 files changed, 22 insertions, 24 deletions
diff --git a/noncore/net/mail/imapwrapper.cpp b/noncore/net/mail/imapwrapper.cpp
index 30eb678..853e4a2 100644
--- a/noncore/net/mail/imapwrapper.cpp
+++ b/noncore/net/mail/imapwrapper.cpp
@@ -1,16 +1,16 @@
#include <stdlib.h>
-#include <libetpan/mailimap.h>
+#include <libetpan/libetpan.h>
#include "imapwrapper.h"
#include "mailtypes.h"
#include "logindialog.h"
IMAPwrapper::IMAPwrapper( IMAPaccount *a )
: AbstractMail()
{
account = a;
m_imap = 0;
}
@@ -313,26 +313,25 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att)
if (head->env_bcc!=NULL) {
addresslist = address_list_to_stringlist(head->env_bcc->bcc_list);
m->setBcc(addresslist);
}
if (head->env_reply_to!=NULL) {
addresslist = address_list_to_stringlist(head->env_reply_to->rt_list);
if (addresslist.count()) {
m->setReplyto(addresslist.first());
}
}
m->setMsgid(QString(head->env_message_id));
} else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_INTERNALDATE) {
-#if 0
-
+#if 0
mailimap_date_time*d = item->att_data.att_static->att_data.att_internal_date;
QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec));
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);
qDebug(da.toString());
#endif
} else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) {
size = item->att_data.att_static->att_data.att_rfc822_size;
}
}
/* msg is already deleted */
if (mFlags.testBit(FLAG_DELETED) && m) {
delete m;
@@ -545,46 +544,46 @@ void IMAPwrapper::searchBodyText(const RecMail&mail,mailimap_body_type_mpart*mai
/* current_recursion is for avoiding ugly mails which has a to deep body-structure */
if (!mailDescription||current_recursion==10) {
return;
}
clistcell*current;
mailimap_body*current_body;
unsigned int count = 0;
for (current=clist_begin(mailDescription->bd_list);current!=0;current=clist_next(current)) {
/* the point in the message */
++count;
current_body = (mailimap_body*)current->data;
if (current_body->bd_type==MAILIMAP_BODY_MPART) {
- QValueList<int>clist = recList;
- clist.append(count);
- searchBodyText(mail,current_body->bd_data.bd_body_mpart,target_body,current_recursion+1,clist);
+ QValueList<int>countlist = recList;
+ countlist.append(count);
+ searchBodyText(mail,current_body->bd_data.bd_body_mpart,target_body,current_recursion+1,countlist);
} else if (current_body->bd_type==MAILIMAP_BODY_1PART){
RecPart currentPart;
fillSinglePart(currentPart,current_body->bd_data.bd_body_1part);
- QValueList<int>clist = recList;
- clist.append(count);
+ QValueList<int>countlist = recList;
+ countlist.append(count);
/* important: Check for is NULL 'cause a body can be empty! */
if (currentPart.Type()=="text" && target_body.Bodytext().isNull() ) {
- QString body_text = fetchTextPart(mail,clist,true,currentPart.Encoding());
+ QString body_text = fetchTextPart(mail,countlist,true,currentPart.Encoding());
target_body.setDescription(currentPart);
target_body.setBodytext(body_text);
} else {
QString id("");
- for (unsigned int j = 0; j < clist.count();++j) {
+ for (unsigned int j = 0; j < countlist.count();++j) {
id+=(j>0?" ":"");
- id+=QString("%1").arg(clist[j]);
+ id+=QString("%1").arg(countlist[j]);
}
qDebug("ID= %s",id.latin1());
currentPart.setIdentifier(id);
- currentPart.setPositionlist(clist);
+ currentPart.setPositionlist(countlist);
target_body.addPart(currentPart);
}
}
}
}
void IMAPwrapper::fillSinglePart(RecPart&target_part,mailimap_body_type_1part*Description)
{
if (!Description) {
return;
}
switch (Description->bd_type) {
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp
index 30eb678..853e4a2 100644
--- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp
@@ -1,16 +1,16 @@
#include <stdlib.h>
-#include <libetpan/mailimap.h>
+#include <libetpan/libetpan.h>
#include "imapwrapper.h"
#include "mailtypes.h"
#include "logindialog.h"
IMAPwrapper::IMAPwrapper( IMAPaccount *a )
: AbstractMail()
{
account = a;
m_imap = 0;
}
@@ -313,26 +313,25 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att)
if (head->env_bcc!=NULL) {
addresslist = address_list_to_stringlist(head->env_bcc->bcc_list);
m->setBcc(addresslist);
}
if (head->env_reply_to!=NULL) {
addresslist = address_list_to_stringlist(head->env_reply_to->rt_list);
if (addresslist.count()) {
m->setReplyto(addresslist.first());
}
}
m->setMsgid(QString(head->env_message_id));
} else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_INTERNALDATE) {
-#if 0
-
+#if 0
mailimap_date_time*d = item->att_data.att_static->att_data.att_internal_date;
QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec));
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);
qDebug(da.toString());
#endif
} else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) {
size = item->att_data.att_static->att_data.att_rfc822_size;
}
}
/* msg is already deleted */
if (mFlags.testBit(FLAG_DELETED) && m) {
delete m;
@@ -545,46 +544,46 @@ void IMAPwrapper::searchBodyText(const RecMail&mail,mailimap_body_type_mpart*mai
/* current_recursion is for avoiding ugly mails which has a to deep body-structure */
if (!mailDescription||current_recursion==10) {
return;
}
clistcell*current;
mailimap_body*current_body;
unsigned int count = 0;
for (current=clist_begin(mailDescription->bd_list);current!=0;current=clist_next(current)) {
/* the point in the message */
++count;
current_body = (mailimap_body*)current->data;
if (current_body->bd_type==MAILIMAP_BODY_MPART) {
- QValueList<int>clist = recList;
- clist.append(count);
- searchBodyText(mail,current_body->bd_data.bd_body_mpart,target_body,current_recursion+1,clist);
+ QValueList<int>countlist = recList;
+ countlist.append(count);
+ searchBodyText(mail,current_body->bd_data.bd_body_mpart,target_body,current_recursion+1,countlist);
} else if (current_body->bd_type==MAILIMAP_BODY_1PART){
RecPart currentPart;
fillSinglePart(currentPart,current_body->bd_data.bd_body_1part);
- QValueList<int>clist = recList;
- clist.append(count);
+ QValueList<int>countlist = recList;
+ countlist.append(count);
/* important: Check for is NULL 'cause a body can be empty! */
if (currentPart.Type()=="text" && target_body.Bodytext().isNull() ) {
- QString body_text = fetchTextPart(mail,clist,true,currentPart.Encoding());
+ QString body_text = fetchTextPart(mail,countlist,true,currentPart.Encoding());
target_body.setDescription(currentPart);
target_body.setBodytext(body_text);
} else {
QString id("");
- for (unsigned int j = 0; j < clist.count();++j) {
+ for (unsigned int j = 0; j < countlist.count();++j) {
id+=(j>0?" ":"");
- id+=QString("%1").arg(clist[j]);
+ id+=QString("%1").arg(countlist[j]);
}
qDebug("ID= %s",id.latin1());
currentPart.setIdentifier(id);
- currentPart.setPositionlist(clist);
+ currentPart.setPositionlist(countlist);
target_body.addPart(currentPart);
}
}
}
}
void IMAPwrapper::fillSinglePart(RecPart&target_part,mailimap_body_type_1part*Description)
{
if (!Description) {
return;
}
switch (Description->bd_type) {