author | alwin <alwin> | 2003-12-21 21:33:49 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-21 21:33:49 (UTC) |
commit | 6e7358f954618d8fdbbe852df7df862c3c132bbd (patch) (side-by-side diff) | |
tree | 0e2a94a0a42393b811d85172677c117517db5fd4 /noncore/net/mail/genericwrapper.h | |
parent | fafcc882ba0d797d5aa8ed7f2f8d5518ba6d2960 (diff) | |
download | opie-6e7358f954618d8fdbbe852df7df862c3c132bbd.zip opie-6e7358f954618d8fdbbe852df7df862c3c132bbd.tar.gz opie-6e7358f954618d8fdbbe852df7df862c3c132bbd.tar.bz2 |
- mbox-wrapper mostly finished
- special-folders "Local Folders" will be displayed
ToDo:
"STORE" - method for all wrapper, but mostly for mbox for
send queue.
Diffstat (limited to 'noncore/net/mail/genericwrapper.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/genericwrapper.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/noncore/net/mail/genericwrapper.h b/noncore/net/mail/genericwrapper.h new file mode 100644 index 0000000..12f6928 --- a/dev/null +++ b/noncore/net/mail/genericwrapper.h @@ -0,0 +1,59 @@ +#ifndef __GENERIC_WRAPPER_H +#define __GENERIC_WRAPPER_H + +#include "abstractmail.h" +#include <qmap.h> +#include <qstring.h> +#include <libetpan/clist.h> + +class RecMail; +class RecBody; +class encodedString; +struct mailpop3; +struct mailmessage; +struct mailmime; +struct mailmime_mechanism; +struct mailimf_mailbox_list; +struct mailimf_mailbox; +struct mailimf_date_time; +struct mailimf_group; +struct mailimf_address_list; + +/* this class hold just the funs shared between + * mbox and pop3 (later mh, too) mail access. + * it is not desigend to make a instance of it! + */ +class Genericwrapper : public AbstractMail +{ + Q_OBJECT +public: + Genericwrapper(); + virtual ~Genericwrapper(); + + virtual encodedString* fetchDecodedPart(const RecMail&mail,const RecPart&part); + virtual encodedString* fetchRawPart(const RecMail&mail,const RecPart&part); + virtual QString fetchTextPart(const RecMail&mail,const RecPart&part); + virtual void cleanMimeCache(); + +protected: + RecMail *parseHeader( const char *header ); + RecBody parseMail( mailmessage * msg ); + QString parseMailboxList( mailimf_mailbox_list *list ); + QString parseMailbox( mailimf_mailbox *box ); + QString parseGroup( mailimf_group *group ); + QString parseAddressList( mailimf_address_list *list ); + QString parseDateTime( mailimf_date_time *date ); + + void traverseBody(RecBody&target,mailmessage*message,mailmime*mime,unsigned int current_rek=0); + static void fillSingleBody(RecPart&target,mailmessage*message,mailmime*mime); + static void fillParameters(RecPart&target,clist*parameters); + static QString getencoding(mailmime_mechanism*aEnc); + + POP3account *account; + mailpop3 *m_pop3; + QString msgTempName; + unsigned int last_msg_id; + QMap<QString,encodedString*> bodyCache; +}; + +#endif |