summaryrefslogtreecommitdiff
authoralwin <alwin>2004-01-08 21:51:32 (UTC)
committer alwin <alwin>2004-01-08 21:51:32 (UTC)
commitfb30e3e116d8616cb05b3765ae1aed5f7e96c74e (patch) (unidiff)
tree393ebb7b913c01697146ac804d980f8b8713f81a
parentb672058ac470a1b9534296fa8bc4b8725ab7913b (diff)
downloadopie-fb30e3e116d8616cb05b3765ae1aed5f7e96c74e.zip
opie-fb30e3e116d8616cb05b3765ae1aed5f7e96c74e.tar.gz
opie-fb30e3e116d8616cb05b3765ae1aed5f7e96c74e.tar.bz2
- last functions re-implemented
- small bugfix TODO: remove twice code within pop3/mh/mbox wrapper
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/mhwrapper.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/noncore/net/mail/libmailwrapper/mhwrapper.cpp b/noncore/net/mail/libmailwrapper/mhwrapper.cpp
index 85f9cf0..5adba55 100644
--- a/noncore/net/mail/libmailwrapper/mhwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/mhwrapper.cpp
@@ -68,7 +68,7 @@ void MHwrapper::listMessages(const QString & mailbox, QList<RecMail> &target )
68 } 68 }
69 QString f = buildPath(mailbox); 69 QString f = buildPath(mailbox);
70 int r = mailsession_select_folder(m_storage->sto_session,(char*)mailbox.latin1()); 70 int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1());
71 if (r!=MAIL_NO_ERROR) { 71 if (r!=MAIL_NO_ERROR) {
72 qDebug("error selecting folder!"); 72 qDebug("listMessages: error selecting folder!");
73 return; 73 return;
74 } 74 }
@@ -237,16 +237,19 @@ encodedString* MHwrapper::fetchRawBody(const RecMail&mail)
237void MHwrapper::deleteMails(const QString & mailbox,QList<RecMail> &target) 237void MHwrapper::deleteMails(const QString & mailbox,QList<RecMail> &target)
238{ 238{
239#if 0 239 QString f = buildPath(mailbox);
240 QString p = MHPath+"/"; 240 int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1());
241 p+=mailbox; 241 if (r!=MAIL_NO_ERROR) {
242 mailmbox_folder*f = 0; 242 qDebug("deleteMails: error selecting folder!");
243 int r = mailmbox_init(p.latin1(),0,1,0,&f);
244 if (r != MAIL_NO_ERROR) {
245 qDebug("Error init folder");
246 return; 243 return;
247 } 244 }
248 deleteMails(f,target); 245 RecMail*c = 0;
249 mailmbox_done(f); 246 for (unsigned int i=0; i < target.count();++i) {
250#endif 247 c = target.at(i);
248 r = mailsession_remove_message(m_storage->sto_session,c->getNumber());
249 if (r != MAIL_NO_ERROR) {
250 qDebug("error deleting mail");
251 break;
252 }
253 }
251} 254}
252 255