Diffstat (limited to 'noncore/net/mail/abstractmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/abstractmail.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/noncore/net/mail/abstractmail.cpp b/noncore/net/mail/abstractmail.cpp index 7380c31..0bb2525 100644 --- a/noncore/net/mail/abstractmail.cpp +++ b/noncore/net/mail/abstractmail.cpp | |||
@@ -1,13 +1,34 @@ | |||
1 | #include "abstractmail.h" | 1 | #include "abstractmail.h" |
2 | #include "imapwrapper.h" | 2 | #include "imapwrapper.h" |
3 | #include "pop3wrapper.h" | 3 | #include "pop3wrapper.h" |
4 | 4 | ||
5 | #include <qstring.h> | ||
6 | #include <stdlib.h> | ||
7 | #include <libetpan/mailmime_content.h> | ||
8 | |||
5 | AbstractMail* AbstractMail::getWrapper(IMAPaccount *a) | 9 | AbstractMail* AbstractMail::getWrapper(IMAPaccount *a) |
6 | { | 10 | { |
7 | return new IMAPwrapper(a); | 11 | return new IMAPwrapper(a); |
8 | } | 12 | } |
9 | 13 | ||
10 | AbstractMail* AbstractMail::getWrapper(POP3account *a) | 14 | AbstractMail* AbstractMail::getWrapper(POP3account *a) |
11 | { | 15 | { |
12 | return new POP3wrapper(a); | 16 | return new POP3wrapper(a); |
13 | } | 17 | } |
18 | |||
19 | QString AbstractMail::decode_quoted_printable(const char*text) | ||
20 | { | ||
21 | char*result_text; | ||
22 | size_t index = 0; | ||
23 | QString result = ""; | ||
24 | /* reset for recursive use! */ | ||
25 | size_t target_length = 0; | ||
26 | result_text = 0; | ||
27 | int err = mailmime_quoted_printable_body_parse(text,strlen(text), | ||
28 | &index,&result_text,&target_length,0); | ||
29 | if (result_text) { | ||
30 | result = result_text; | ||
31 | free(result_text); | ||
32 | } | ||
33 | return result; | ||
34 | } | ||