From 3f5c51234c8068f3d4826a2a0066648ace21a19f Mon Sep 17 00:00:00 2001 From: zautrix Date: Tue, 31 Aug 2004 21:01:18 +0000 Subject: Enhancements of kopiemail --- (limited to 'kmicromail/libmailwrapper/pop3wrapper.cpp') diff --git a/kmicromail/libmailwrapper/pop3wrapper.cpp b/kmicromail/libmailwrapper/pop3wrapper.cpp index e5d083a..7a84b30 100644 --- a/kmicromail/libmailwrapper/pop3wrapper.cpp +++ b/kmicromail/libmailwrapper/pop3wrapper.cpp @@ -1,3 +1,4 @@ +// CHANGED 2004-09-31 Lutz Rogowski #include #include "pop3wrapper.h" #include "mailtypes.h" @@ -96,14 +97,14 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) { return body; } -void POP3wrapper::listMessages(const QString &, QValueList > &target ) +void POP3wrapper::listMessages(const QString &, QValueList > &target, int maxSizeInKb ) { login(); if (!m_pop3) return; uint32_t res_messages,res_recent,res_unseen; mailsession_status_folder(m_pop3->sto_session,"INBOX",&res_messages,&res_recent,&res_unseen); - parseList(target,m_pop3->sto_session,"INBOX"); + parseList(target,m_pop3->sto_session,"INBOX", false, maxSizeInKb); Global::statusMessage( tr("Mailbox contains %1 mail(s)").arg(res_messages)); } @@ -192,6 +193,22 @@ QValueList >* POP3wrapper::listFolders() { return folders; } +void POP3wrapper::deleteMailList(QValueList&target) +{ + login(); + if (!m_pop3) + return; + int iii = 0; + int count = target.count(); + while (iii < count ) { + RecMailP mail = (*target.at( iii )); + int err = mailsession_remove_message(m_pop3->sto_session,mail->getNumber()); + if (err != MAIL_NO_ERROR) { + Global::statusMessage(tr("error deleting mail")); + } + ++iii; + } +} void POP3wrapper::deleteMail(const RecMailP&mail) { login(); if (!m_pop3) -- cgit v0.9.0.2