summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/abstractmail.cpp
authoralwin <alwin>2003-12-20 13:36:34 (UTC)
committer alwin <alwin>2003-12-20 13:36:34 (UTC)
commitadb369c28cac7600b3912d6a3fdb645f1b1d571d (patch) (side-by-side diff)
tree554fc2f00a3ea97aad6ef0382e4cc1aec3def070 /noncore/net/mail/libmailwrapper/abstractmail.cpp
parentd9ffcee06ec97f4a9e00ff0a9071d7a58e5075a1 (diff)
downloadopie-adb369c28cac7600b3912d6a3fdb645f1b1d571d.zip
opie-adb369c28cac7600b3912d6a3fdb645f1b1d571d.tar.gz
opie-adb369c28cac7600b3912d6a3fdb645f1b1d571d.tar.bz2
fetching attachments from a pop3mail works.
this moment the whole message will be hold in memory until I have an idea for a clean(!) filebased cache which will not get to large. Thats why the biggest pop3 mail we can fetch is 5MB, this should be enough.
Diffstat (limited to 'noncore/net/mail/libmailwrapper/abstractmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/abstractmail.cpp15
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
@@ -4,6 +4,8 @@
#include "mailtypes.h"
#include <qstring.h>
+#include <qfile.h>
+#include <qtextstream.h>
#include <stdlib.h>
#include <libetpan/mailmime_content.h>
@@ -66,3 +68,16 @@ QString AbstractMail::convert_String(const char*text)
}
return QString(text);
}
+
+/* cp & paste from launcher */
+QString AbstractMail::gen_attachment_id()
+{
+ QFile file( "/proc/sys/kernel/random/uuid" );
+ if (!file.open(IO_ReadOnly ) )
+ return QString::null;
+
+ QTextStream stream(&file);
+
+ return "{" + stream.read().stripWhiteSpace() + "}";
+}
+