summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/genericwrapper.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/mail/libmailwrapper/genericwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/genericwrapper.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/net/mail/libmailwrapper/genericwrapper.cpp b/noncore/net/mail/libmailwrapper/genericwrapper.cpp
index 6c8a5a1..ee2c8cd 100644
--- a/noncore/net/mail/libmailwrapper/genericwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/genericwrapper.cpp
@@ -322,41 +322,41 @@ QString Genericwrapper::parseMailboxList( mailimf_mailbox_list *list )
if ( !first ) {
result.append( "," );
} else {
first = false;
}
result.append( parseMailbox( box ) );
}
return result;
}
-encodedString* Genericwrapper::fetchDecodedPart(const RecMail&,const RecPart&part)
+encodedString* Genericwrapper::fetchDecodedPart(const RecMailP&,const RecPart&part)
{
QMap<QString,encodedString*>::ConstIterator it = bodyCache.find(part.Identifier());
if (it==bodyCache.end()) return new encodedString();
encodedString*t = decode_String(it.data(),part.Encoding());
return t;
}
-encodedString* Genericwrapper::fetchRawPart(const RecMail&mail,const RecPart&part)
+encodedString* Genericwrapper::fetchRawPart(const RecMailP&mail,const RecPart&part)
{
QMap<QString,encodedString*>::ConstIterator it = bodyCache.find(part.Identifier());
if (it==bodyCache.end()) return new encodedString();
encodedString*t = it.data();
return t;
}
-QString Genericwrapper::fetchTextPart(const RecMail&mail,const RecPart&part)
+QString Genericwrapper::fetchTextPart(const RecMailP&mail,const RecPart&part)
{
encodedString*t = fetchDecodedPart(mail,part);
QString text=t->Content();
delete t;
return text;
}
void Genericwrapper::cleanMimeCache()
{
QMap<QString,encodedString*>::Iterator it = bodyCache.begin();
for (;it!=bodyCache.end();++it) {
encodedString*t = it.data();
@@ -378,25 +378,25 @@ QStringList Genericwrapper::parseInreplies(mailimf_in_reply_to * in_replies)
h.remove(0,1);
}
while (h.length()>0 && h[h.length()-1]=='>') {
h.remove(h.length()-1,1);
}
if (h.length()>0) {
res.append(h);
}
}
return res;
}
-void Genericwrapper::parseList(QList<RecMail> &target,mailsession*session,const QString&mailbox,bool mbox_as_to)
+void Genericwrapper::parseList(QValueList<Opie::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to)
{
int r;
mailmessage_list * env_list = 0;
r = mailsession_get_messages_list(session,&env_list);
if (r != MAIL_NO_ERROR) {
qDebug("Error message list");
return;
}
r = mailsession_get_envelopes_list(session, env_list);
if (r != MAIL_NO_ERROR) {
qDebug("Error filling message list");
if (env_list) {
@@ -406,25 +406,25 @@ void Genericwrapper::parseList(QList<RecMail> &target,mailsession*session,const
}
mailimf_references * refs = 0;
mailimf_in_reply_to * in_replies = 0;
uint32_t i = 0;
for(; i < carray_count(env_list->msg_tab) ; ++i) {
mailmessage * msg;
QBitArray mFlags(7);
msg = (mailmessage*)carray_get(env_list->msg_tab, i);
if (msg->msg_fields == NULL) {
//qDebug("could not fetch envelope of message %i", i);
continue;
}
- RecMail * mail = new RecMail();
+ RecMailP mail = new RecMail();
mail->setWrapper(this);
mail_flags * flag_result = 0;
r = mailmessage_get_flags(msg,&flag_result);
if (r == MAIL_ERROR_NOT_IMPLEMENTED) {
mFlags.setBit(FLAG_SEEN);
}
mailimf_single_fields single_fields;
mailimf_single_fields_init(&single_fields, msg->msg_fields);
mail->setMsgsize(msg->msg_size);
mail->setFlags(mFlags);
mail->setMbox(mailbox);
mail->setNumber(msg->msg_index);