Diffstat (limited to 'noncore/net/mail/libmailwrapper/mboxwrapper.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/mboxwrapper.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp index 540a971..60f7507 100644 --- a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp | |||
@@ -1,20 +1,22 @@ | |||
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 <qdir.h> | 5 | #include <qdir.h> |
6 | #include <stdlib.h> | 6 | #include <stdlib.h> |
7 | #include <qpe/global.h> | 7 | #include <qpe/global.h> |
8 | 8 | ||
9 | const QString MBOXwrapper::wrapperType="MBOX"; | ||
10 | |||
9 | MBOXwrapper::MBOXwrapper(const QString & mbox_dir) | 11 | MBOXwrapper::MBOXwrapper(const QString & mbox_dir) |
10 | : Genericwrapper(),MBOXPath(mbox_dir) | 12 | : Genericwrapper(),MBOXPath(mbox_dir) |
11 | { | 13 | { |
12 | QDir dir(MBOXPath); | 14 | QDir dir(MBOXPath); |
13 | if (!dir.exists()) { | 15 | if (!dir.exists()) { |
14 | dir.mkdir(MBOXPath); | 16 | dir.mkdir(MBOXPath); |
15 | } | 17 | } |
16 | } | 18 | } |
17 | 19 | ||
18 | MBOXwrapper::~MBOXwrapper() | 20 | MBOXwrapper::~MBOXwrapper() |
19 | { | 21 | { |
20 | } | 22 | } |
@@ -313,12 +315,17 @@ void MBOXwrapper::statusFolder(folderStat&target_stat,const QString & mailbox) | |||
313 | if (!fi.exists()) { | 315 | if (!fi.exists()) { |
314 | Global::statusMessage(tr("Mailbox doesn't exist.")); | 316 | Global::statusMessage(tr("Mailbox doesn't exist.")); |
315 | return; | 317 | return; |
316 | } | 318 | } |
317 | int r = mbox_mailstorage_init(storage,(char*)p.latin1(),0,0,0); | 319 | int r = mbox_mailstorage_init(storage,(char*)p.latin1(),0,0,0); |
318 | folder = mailfolder_new( storage,(char*)p.latin1(),NULL); | 320 | folder = mailfolder_new( storage,(char*)p.latin1(),NULL); |
319 | r = mailfolder_connect(folder); | 321 | r = mailfolder_connect(folder); |
320 | r = mailsession_status_folder(folder->fld_session,(char*)mailbox.latin1(),&target_stat.message_count, | 322 | r = mailsession_status_folder(folder->fld_session,(char*)mailbox.latin1(),&target_stat.message_count, |
321 | &target_stat.message_recent,&target_stat.message_unseen); | 323 | &target_stat.message_recent,&target_stat.message_unseen); |
322 | if (folder) mailfolder_free(folder); | 324 | if (folder) mailfolder_free(folder); |
323 | if (storage) mailstorage_free(storage); | 325 | if (storage) mailstorage_free(storage); |
324 | } | 326 | } |
327 | |||
328 | const QString&MBOXwrapper::getType()const | ||
329 | { | ||
330 | return wrapperType; | ||
331 | } | ||