Diffstat (limited to 'noncore/net/mail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.h | 12 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/genericwrapper.h | 3 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 15 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.h | 5 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/libmailwrapper.pro | 16 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/pop3wrapper.cpp | 8 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/pop3wrapper.h | 4 |
7 files changed, 46 insertions, 17 deletions
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.h b/noncore/net/mail/libmailwrapper/abstractmail.h index ca9caed..a070fb0 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.h +++ b/noncore/net/mail/libmailwrapper/abstractmail.h | |||
@@ -31,6 +31,7 @@ public: | |||
31 | virtual void answeredMail(const RecMail&mail)=0; | 31 | virtual void answeredMail(const RecMail&mail)=0; |
32 | virtual void cleanMimeCache(){}; | 32 | virtual int deleteAllMail(const Folder*)=0; |
33 | virtual int deleteAllMail(const Folder*){return 1;} | 33 | virtual int deleteMbox(const Folder*)=0; |
34 | virtual int deleteMbox(const Folder*){return 1;} | 34 | virtual void storeMessage(const char*msg,size_t length, const QString&folder)=0; |
35 | 35 | ||
36 | virtual void cleanMimeCache(){}; | ||
36 | /* mail box methods */ | 37 | /* mail box methods */ |
@@ -41,3 +42,4 @@ public: | |||
41 | virtual int createMbox(const QString&,const Folder*parentfolder=0,const QString& delemiter="/",bool getsubfolder=false); | 42 | virtual int createMbox(const QString&,const Folder*parentfolder=0,const QString& delemiter="/",bool getsubfolder=false); |
42 | 43 | virtual void logout()=0; | |
44 | |||
43 | static AbstractMail* getWrapper(IMAPaccount *a); | 45 | static AbstractMail* getWrapper(IMAPaccount *a); |
diff --git a/noncore/net/mail/libmailwrapper/genericwrapper.h b/noncore/net/mail/libmailwrapper/genericwrapper.h index 32b75c8..1d65c0a 100644 --- a/noncore/net/mail/libmailwrapper/genericwrapper.h +++ b/noncore/net/mail/libmailwrapper/genericwrapper.h | |||
@@ -37,2 +37,5 @@ public: | |||
37 | virtual void cleanMimeCache(); | 37 | virtual void cleanMimeCache(); |
38 | virtual int deleteMbox(const Folder*){return 1;} | ||
39 | virtual void logout(){}; | ||
40 | virtual void storeMessage(const char*msg,size_t length, const QString&folder){}; | ||
38 | 41 | ||
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index f1d42c2..0c1e05e 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp | |||
@@ -49,4 +49,4 @@ void IMAPwrapper::login() | |||
49 | // ok | 49 | // ok |
50 | user = strdup( login.getUser().latin1() ); | 50 | user = login.getUser().latin1(); |
51 | pass = strdup( login.getPassword().latin1() ); | 51 | pass = login.getPassword().latin1(); |
52 | } else { | 52 | } else { |
@@ -976 +976,12 @@ void IMAPwrapper::statusFolder(folderStat&target_stat,const QString & mailbox) | |||
976 | } | 976 | } |
977 | |||
978 | void IMAPwrapper::storeMessage(const char*msg,size_t length, const QString&folder) | ||
979 | { | ||
980 | login(); | ||
981 | if (!m_imap) return; | ||
982 | if (!msg) return; | ||
983 | int r = mailimap_append(m_imap,(char*)folder.latin1(),0,0,msg,length); | ||
984 | if (r != MAILIMAP_NO_ERROR) { | ||
985 | Global::statusMessage("Error storing mail!"); | ||
986 | } | ||
987 | } | ||
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.h b/noncore/net/mail/libmailwrapper/imapwrapper.h index 8f5a2b5..a97f12d 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.h +++ b/noncore/net/mail/libmailwrapper/imapwrapper.h | |||
@@ -32,2 +32,3 @@ public: | |||
32 | virtual int deleteAllMail(const Folder*folder); | 32 | virtual int deleteAllMail(const Folder*folder); |
33 | virtual void storeMessage(const char*msg,size_t length, const QString&folder); | ||
33 | 34 | ||
@@ -42,3 +43,4 @@ public: | |||
42 | static void imap_progress( size_t current, size_t maximum ); | 43 | static void imap_progress( size_t current, size_t maximum ); |
43 | 44 | ||
45 | virtual void logout(); | ||
44 | protected: | 46 | protected: |
@@ -46,3 +48,2 @@ protected: | |||
46 | void login(); | 48 | void login(); |
47 | void logout(); | ||
48 | 49 | ||
diff --git a/noncore/net/mail/libmailwrapper/libmailwrapper.pro b/noncore/net/mail/libmailwrapper/libmailwrapper.pro index 4b4a4f1..18583bb 100644 --- a/noncore/net/mail/libmailwrapper/libmailwrapper.pro +++ b/noncore/net/mail/libmailwrapper/libmailwrapper.pro | |||
@@ -11,5 +11,6 @@ HEADERS = mailwrapper.h \ | |||
11 | mboxwrapper.h \ | 11 | mboxwrapper.h \ |
12 | settings.h \ | 12 | settings.h \ |
13 | logindialog.h \ | 13 | logindialog.h \ |
14 | sendmailprogress.h | 14 | sendmailprogress.h \ |
15 | statusmail.h | ||
15 | 16 | ||
@@ -23,8 +24,9 @@ SOURCES = imapwrapper.cpp \ | |||
23 | mboxwrapper.cpp \ | 24 | mboxwrapper.cpp \ |
24 | settings.cpp \ | 25 | settings.cpp \ |
25 | logindialog.cpp \ | 26 | logindialog.cpp \ |
26 | sendmailprogress.cpp | 27 | sendmailprogress.cpp \ |
28 | statusmail.cpp | ||
27 | 29 | ||
28 | INTERFACES = logindialogui.ui \ | 30 | INTERFACES = logindialogui.ui \ |
29 | sendmailprogressui.ui | 31 | sendmailprogressui.ui |
30 | 32 | ||
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp index d76d82a..b4eca6f 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp | |||
@@ -229 +229,9 @@ void POP3wrapper::statusFolder(folderStat&target_stat,const QString&) | |||
229 | } | 229 | } |
230 | |||
231 | void POP3wrapper::fetchRawBody(const RecMail&mail,char**target,size_t*length) | ||
232 | { | ||
233 | mailmessage * mailmsg = 0; | ||
234 | int err = mailsession_get_message(m_folder->fld_session, mail.getNumber(), &mailmsg); | ||
235 | err = mailmessage_fetch(mailmsg,target,length); | ||
236 | if (mailmsg) mailmessage_free(mailmsg); | ||
237 | } | ||
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.h b/noncore/net/mail/libmailwrapper/pop3wrapper.h index 536cadc..9cba101 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.h +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.h | |||
@@ -28,2 +28,5 @@ public: | |||
28 | virtual RecBody fetchBody( const RecMail &mail ); | 28 | virtual RecBody fetchBody( const RecMail &mail ); |
29 | virtual void fetchRawBody(const RecMail&mail,char**target,size_t*length); | ||
30 | virtual void logout(); | ||
31 | |||
29 | static void pop3_progress( size_t current, size_t maximum ); | 32 | static void pop3_progress( size_t current, size_t maximum ); |
@@ -32,3 +35,2 @@ protected: | |||
32 | void login(); | 35 | void login(); |
33 | void logout(); | ||
34 | POP3account *account; | 36 | POP3account *account; |