summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/pop3wrapper.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/libmailwrapper/pop3wrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/pop3wrapper.cpp21
1 files changed, 19 insertions, 2 deletions
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,4 +1,5 @@
+// CHANGED 2004-09-31 Lutz Rogowski
#include <stdlib.h>
#include "pop3wrapper.h"
#include "mailtypes.h"
#include "logindialog.h"
@@ -95,16 +96,16 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) {
return body;
}
-void POP3wrapper::listMessages(const QString &, QValueList<Opie::Core::OSmartPointer<RecMail> > &target )
+void POP3wrapper::listMessages(const QString &, QValueList<Opie::Core::OSmartPointer<RecMail> > &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));
}
void POP3wrapper::login()
@@ -191,8 +192,24 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* POP3wrapper::listFolders() {
folders->append(inb);
return folders;
}
+void POP3wrapper::deleteMailList(QValueList<RecMailP>&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)
return;