author | alwin <alwin> | 2003-12-20 13:36:34 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-20 13:36:34 (UTC) |
commit | adb369c28cac7600b3912d6a3fdb645f1b1d571d (patch) (side-by-side diff) | |
tree | 554fc2f00a3ea97aad6ef0382e4cc1aec3def070 /noncore/net/mail/abstractmail.cpp | |
parent | d9ffcee06ec97f4a9e00ff0a9071d7a58e5075a1 (diff) | |
download | opie-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/abstractmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/abstractmail.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/noncore/net/mail/abstractmail.cpp b/noncore/net/mail/abstractmail.cpp index 3d76c96..626b9aa 100644 --- a/noncore/net/mail/abstractmail.cpp +++ b/noncore/net/mail/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() + "}"; +} + |