Diffstat (limited to 'noncore/net/mail/libmailwrapper/genericwrapper.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/genericwrapper.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/noncore/net/mail/libmailwrapper/genericwrapper.h b/noncore/net/mail/libmailwrapper/genericwrapper.h new file mode 100644 index 0000000..12f6928 --- a/dev/null +++ b/noncore/net/mail/libmailwrapper/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 | ||