Diffstat (limited to 'noncore/net/mail/mboxwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/mboxwrapper.cpp | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/noncore/net/mail/mboxwrapper.cpp b/noncore/net/mail/mboxwrapper.cpp index 7581715..8117cef 100644 --- a/noncore/net/mail/mboxwrapper.cpp +++ b/noncore/net/mail/mboxwrapper.cpp | |||
@@ -1,9 +1,9 @@ | |||
1 | #include "mboxwrapper.h" | 1 | #include "mboxwrapper.h" |
2 | #include "mailtypes.h" | 2 | #include "mailtypes.h" |
3 | #include "mailwrapper.h" | 3 | #include "mailwrapper.h" |
4 | #include "libetpan/libetpan.h" | 4 | #include <libetpan/libetpan.h> |
5 | #include "libetpan/mailstorage.h" | 5 | #include <libetpan/mailstorage.h> |
6 | #include <qdir.h> | 6 | #include <qdir.h> |
7 | 7 | ||
8 | MBOXwrapper::MBOXwrapper(const QString & mbox_dir) | 8 | MBOXwrapper::MBOXwrapper(const QString & mbox_dir) |
9 | : Genericwrapper(),MBOXPath(mbox_dir) | 9 | : Genericwrapper(),MBOXPath(mbox_dir) |
@@ -66,9 +66,8 @@ void MBOXwrapper::listMessages(const QString & mailbox, QList<RecMail> &target ) | |||
66 | mail->setWrapper(this); | 66 | mail->setWrapper(this); |
67 | mail_flags * flag_result = 0; | 67 | mail_flags * flag_result = 0; |
68 | r = mailmessage_get_flags(msg,&flag_result); | 68 | r = mailmessage_get_flags(msg,&flag_result); |
69 | if (r == MAIL_ERROR_NOT_IMPLEMENTED) { | 69 | if (r == MAIL_ERROR_NOT_IMPLEMENTED) { |
70 | qDebug("flag fetching not implemented"); | ||
71 | mFlags.setBit(FLAG_SEEN); | 70 | mFlags.setBit(FLAG_SEEN); |
72 | } | 71 | } |
73 | mailimf_single_fields single_fields; | 72 | mailimf_single_fields single_fields; |
74 | mailimf_single_fields_init(&single_fields, msg->msg_fields); | 73 | mailimf_single_fields_init(&single_fields, msg->msg_fields); |
@@ -196,4 +195,25 @@ RecBody MBOXwrapper::fetchBody( const RecMail &mail ) | |||
196 | void MBOXwrapper::mbox_progress( size_t current, size_t maximum ) | 195 | void MBOXwrapper::mbox_progress( size_t current, size_t maximum ) |
197 | { | 196 | { |
198 | qDebug("MBOX %i von %i",current,maximum); | 197 | qDebug("MBOX %i von %i",current,maximum); |
199 | } | 198 | } |
199 | |||
200 | void MBOXwrapper::createFolder(const QString&) | ||
201 | { | ||
202 | } | ||
203 | |||
204 | void MBOXwrapper::storeMessage(const char*msg,size_t length, const QString&folder) | ||
205 | { | ||
206 | QString p = MBOXPath+"/"; | ||
207 | p+=folder; | ||
208 | mailmbox_folder*f = 0; | ||
209 | int r = mailmbox_init(p.latin1(),0,1,0,&f); | ||
210 | if (r != MAIL_NO_ERROR) { | ||
211 | qDebug("Error init folder"); | ||
212 | return; | ||
213 | } | ||
214 | r = mailmbox_append_message(f,msg,length); | ||
215 | if (r != MAIL_NO_ERROR) { | ||
216 | qDebug("Error writing message folder"); | ||
217 | } | ||
218 | mailmbox_done(f); | ||
219 | } | ||