author | alwin <alwin> | 2003-12-21 21:33:49 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-21 21:33:49 (UTC) |
commit | 6e7358f954618d8fdbbe852df7df862c3c132bbd (patch) (unidiff) | |
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 @@ | |||
1 | #ifndef __GENERIC_WRAPPER_H | ||
2 | #define __GENERIC_WRAPPER_H | ||
3 | |||
4 | #include "abstractmail.h" | ||
5 | #include <qmap.h> | ||
6 | #include <qstring.h> | ||
7 | #include <libetpan/clist.h> | ||
8 | |||
9 | class RecMail; | ||
10 | class RecBody; | ||
11 | class encodedString; | ||
12 | struct mailpop3; | ||
13 | struct mailmessage; | ||
14 | struct mailmime; | ||
15 | struct mailmime_mechanism; | ||
16 | struct mailimf_mailbox_list; | ||
17 | struct mailimf_mailbox; | ||
18 | struct mailimf_date_time; | ||
19 | struct mailimf_group; | ||
20 | struct mailimf_address_list; | ||
21 | |||
22 | /* this class hold just the funs shared between | ||
23 | * mbox and pop3 (later mh, too) mail access. | ||
24 | * it is not desigend to make a instance of it! | ||
25 | */ | ||
26 | class Genericwrapper : public AbstractMail | ||
27 | { | ||
28 | Q_OBJECT | ||
29 | public: | ||
30 | Genericwrapper(); | ||
31 | virtual ~Genericwrapper(); | ||
32 | |||
33 | virtual encodedString* fetchDecodedPart(const RecMail&mail,const RecPart&part); | ||
34 | virtual encodedString* fetchRawPart(const RecMail&mail,const RecPart&part); | ||
35 | virtual QString fetchTextPart(const RecMail&mail,const RecPart&part); | ||
36 | virtual void cleanMimeCache(); | ||
37 | |||
38 | protected: | ||
39 | RecMail *parseHeader( const char *header ); | ||
40 | RecBody parseMail( mailmessage * msg ); | ||
41 | QString parseMailboxList( mailimf_mailbox_list *list ); | ||
42 | QString parseMailbox( mailimf_mailbox *box ); | ||
43 | QString parseGroup( mailimf_group *group ); | ||
44 | QString parseAddressList( mailimf_address_list *list ); | ||
45 | QString parseDateTime( mailimf_date_time *date ); | ||
46 | |||
47 | void traverseBody(RecBody&target,mailmessage*message,mailmime*mime,unsigned int current_rek=0); | ||
48 | static void fillSingleBody(RecPart&target,mailmessage*message,mailmime*mime); | ||
49 | static void fillParameters(RecPart&target,clist*parameters); | ||
50 | static QString getencoding(mailmime_mechanism*aEnc); | ||
51 | |||
52 | POP3account *account; | ||
53 | mailpop3 *m_pop3; | ||
54 | QString msgTempName; | ||
55 | unsigned int last_msg_id; | ||
56 | QMap<QString,encodedString*> bodyCache; | ||
57 | }; | ||
58 | |||
59 | #endif | ||