Diffstat (limited to 'noncore/net/mail/libmailwrapper/abstractmail.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.cpp b/noncore/net/mail/libmailwrapper/abstractmail.cpp index 6bebb7b..1a26351 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.cpp +++ b/noncore/net/mail/libmailwrapper/abstractmail.cpp | |||
@@ -43,67 +43,67 @@ AbstractMail* AbstractMail::getWrapper(Account*a) | |||
43 | return new POP3wrapper((POP3account*)a); | 43 | return new POP3wrapper((POP3account*)a); |
44 | break; | 44 | break; |
45 | case MAILLIB::A_NNTP: | 45 | case MAILLIB::A_NNTP: |
46 | return new NNTPwrapper((NNTPaccount*)a); | 46 | return new NNTPwrapper((NNTPaccount*)a); |
47 | break; | 47 | break; |
48 | default: | 48 | default: |
49 | return 0; | 49 | return 0; |
50 | } | 50 | } |
51 | } | 51 | } |
52 | 52 | ||
53 | encodedString* AbstractMail::decode_String(const encodedString*text,const QString&enc) | 53 | encodedString* AbstractMail::decode_String(const encodedString*text,const QString&enc) |
54 | { | 54 | { |
55 | qDebug("Decode string start"); | 55 | odebug << "Decode string start" << oendl; |
56 | char*result_text; | 56 | char*result_text; |
57 | size_t index = 0; | 57 | size_t index = 0; |
58 | /* reset for recursive use! */ | 58 | /* reset for recursive use! */ |
59 | size_t target_length = 0; | 59 | size_t target_length = 0; |
60 | result_text = 0; | 60 | result_text = 0; |
61 | int mimetype = MAILMIME_MECHANISM_7BIT; | 61 | int mimetype = MAILMIME_MECHANISM_7BIT; |
62 | if (enc.lower()=="quoted-printable") { | 62 | if (enc.lower()=="quoted-printable") { |
63 | mimetype = MAILMIME_MECHANISM_QUOTED_PRINTABLE; | 63 | mimetype = MAILMIME_MECHANISM_QUOTED_PRINTABLE; |
64 | } else if (enc.lower()=="base64") { | 64 | } else if (enc.lower()=="base64") { |
65 | mimetype = MAILMIME_MECHANISM_BASE64; | 65 | mimetype = MAILMIME_MECHANISM_BASE64; |
66 | } else if (enc.lower()=="8bit") { | 66 | } else if (enc.lower()=="8bit") { |
67 | mimetype = MAILMIME_MECHANISM_8BIT; | 67 | mimetype = MAILMIME_MECHANISM_8BIT; |
68 | } else if (enc.lower()=="binary") { | 68 | } else if (enc.lower()=="binary") { |
69 | mimetype = MAILMIME_MECHANISM_BINARY; | 69 | mimetype = MAILMIME_MECHANISM_BINARY; |
70 | } | 70 | } |
71 | 71 | ||
72 | int err = mailmime_part_parse(text->Content(),text->Length(),&index,mimetype, | 72 | int err = mailmime_part_parse(text->Content(),text->Length(),&index,mimetype, |
73 | &result_text,&target_length); | 73 | &result_text,&target_length); |
74 | 74 | ||
75 | encodedString* result = new encodedString(); | 75 | encodedString* result = new encodedString(); |
76 | if (err == MAILIMF_NO_ERROR) { | 76 | if (err == MAILIMF_NO_ERROR) { |
77 | result->setContent(result_text,target_length); | 77 | result->setContent(result_text,target_length); |
78 | } | 78 | } |
79 | qDebug("Decode string finished"); | 79 | odebug << "Decode string finished" << oendl; |
80 | return result; | 80 | return result; |
81 | } | 81 | } |
82 | 82 | ||
83 | QString AbstractMail::convert_String(const char*text) | 83 | QString AbstractMail::convert_String(const char*text) |
84 | { | 84 | { |
85 | //size_t index = 0; | 85 | //size_t index = 0; |
86 | char*res = 0; | 86 | char*res = 0; |
87 | int err = MAILIMF_NO_ERROR; | 87 | int err = MAILIMF_NO_ERROR; |
88 | 88 | ||
89 | QString result(text); | 89 | QString result(text); |
90 | 90 | ||
91 | /* due a bug in libetpan it isn't usable this moment */ | 91 | /* due a bug in libetpan it isn't usable this moment */ |
92 | /* int err = mailmime_encoded_phrase_parse("iso-8859-1", | 92 | /* int err = mailmime_encoded_phrase_parse("iso-8859-1", |
93 | text, strlen(text),&index, "iso-8859-1",&res);*/ | 93 | text, strlen(text),&index, "iso-8859-1",&res);*/ |
94 | //qDebug("Input: %s",text); | 94 | //odebug << "Input: " << text << "" << oendl; |
95 | if (err == MAILIMF_NO_ERROR && res && strlen(res)) { | 95 | if (err == MAILIMF_NO_ERROR && res && strlen(res)) { |
96 | // result = QString(res); | 96 | // result = QString(res); |
97 | // qDebug("Res: %s, length: %i",res,strlen(res)); | 97 | // odebug << "Res: " << res << ", length: " << strlen(res) << "" << oendl; |
98 | } | 98 | } |
99 | if (res) free(res); | 99 | if (res) free(res); |
100 | return result; | 100 | return result; |
101 | } | 101 | } |
102 | 102 | ||
103 | /* cp & paste from launcher */ | 103 | /* cp & paste from launcher */ |
104 | QString AbstractMail::gen_attachment_id() | 104 | QString AbstractMail::gen_attachment_id() |
105 | { | 105 | { |
106 | QFile file( "/proc/sys/kernel/random/uuid" ); | 106 | QFile file( "/proc/sys/kernel/random/uuid" ); |
107 | if (!file.open(IO_ReadOnly ) ) | 107 | if (!file.open(IO_ReadOnly ) ) |
108 | return QString::null; | 108 | return QString::null; |
109 | 109 | ||