Diffstat (limited to 'noncore/net/mail/libmailwrapper/abstractmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.cpp b/noncore/net/mail/libmailwrapper/abstractmail.cpp index 3d76c96..626b9aa 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.cpp +++ b/noncore/net/mail/libmailwrapper/abstractmail.cpp | |||
@@ -1,12 +1,14 @@ | |||
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 | #include "mailtypes.h" | 4 | #include "mailtypes.h" |
5 | 5 | ||
6 | #include <qstring.h> | 6 | #include <qstring.h> |
7 | #include <qfile.h> | ||
8 | #include <qtextstream.h> | ||
7 | #include <stdlib.h> | 9 | #include <stdlib.h> |
8 | #include <libetpan/mailmime_content.h> | 10 | #include <libetpan/mailmime_content.h> |
9 | 11 | ||
10 | AbstractMail* AbstractMail::getWrapper(IMAPaccount *a) | 12 | AbstractMail* AbstractMail::getWrapper(IMAPaccount *a) |
11 | { | 13 | { |
12 | return new IMAPwrapper(a); | 14 | return new IMAPwrapper(a); |
@@ -63,6 +65,19 @@ QString AbstractMail::convert_String(const char*text) | |||
63 | QString result(res); | 65 | QString result(res); |
64 | free(res); | 66 | free(res); |
65 | return result; | 67 | return result; |
66 | } | 68 | } |
67 | return QString(text); | 69 | return QString(text); |
68 | } | 70 | } |
71 | |||
72 | /* cp & paste from launcher */ | ||
73 | QString AbstractMail::gen_attachment_id() | ||
74 | { | ||
75 | QFile file( "/proc/sys/kernel/random/uuid" ); | ||
76 | if (!file.open(IO_ReadOnly ) ) | ||
77 | return QString::null; | ||
78 | |||
79 | QTextStream stream(&file); | ||
80 | |||
81 | return "{" + stream.read().stripWhiteSpace() + "}"; | ||
82 | } | ||
83 | |||