From adb369c28cac7600b3912d6a3fdb645f1b1d571d Mon Sep 17 00:00:00 2001 From: alwin Date: Sat, 20 Dec 2003 13:36:34 +0000 Subject: 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. --- (limited to 'noncore/net/mail/libmailwrapper/abstractmail.cpp') 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 +#include +#include #include #include @@ -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() + "}"; +} + -- cgit v0.9.0.2