author | alwin <alwin> | 2003-12-30 00:14:47 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-30 00:14:47 (UTC) |
commit | b636d3d91e8456b22bc450b3d7f3a862b7f615a9 (patch) (unidiff) | |
tree | 2d7fe53175453a28e4e1d08496f6f611221c1936 /noncore/net/mail/genericwrapper.h | |
parent | 2ecab614a6b91658b1608c62134cd14e257e55b7 (diff) | |
download | opie-b636d3d91e8456b22bc450b3d7f3a862b7f615a9.zip opie-b636d3d91e8456b22bc450b3d7f3a862b7f615a9.tar.gz opie-b636d3d91e8456b22bc450b3d7f3a862b7f615a9.tar.bz2 |
re-worked pop3 (use the more generic interface)
shared some more functions between mbox and pop3
Diffstat (limited to 'noncore/net/mail/genericwrapper.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/genericwrapper.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/net/mail/genericwrapper.h b/noncore/net/mail/genericwrapper.h index 90c4b50..54d6ea9 100644 --- a/noncore/net/mail/genericwrapper.h +++ b/noncore/net/mail/genericwrapper.h | |||
@@ -1,57 +1,59 @@ | |||
1 | #ifndef __GENERIC_WRAPPER_H | 1 | #ifndef __GENERIC_WRAPPER_H |
2 | #define __GENERIC_WRAPPER_H | 2 | #define __GENERIC_WRAPPER_H |
3 | 3 | ||
4 | #include "abstractmail.h" | 4 | #include "abstractmail.h" |
5 | #include <qmap.h> | 5 | #include <qmap.h> |
6 | #include <qstring.h> | 6 | #include <qstring.h> |
7 | #include <libetpan/clist.h> | 7 | #include <libetpan/clist.h> |
8 | 8 | ||
9 | class RecMail; | 9 | class RecMail; |
10 | class RecBody; | 10 | class RecBody; |
11 | class encodedString; | 11 | class encodedString; |
12 | struct mailpop3; | 12 | struct mailpop3; |
13 | struct mailmessage; | 13 | struct mailmessage; |
14 | struct mailmime; | 14 | struct mailmime; |
15 | struct mailmime_mechanism; | 15 | struct mailmime_mechanism; |
16 | struct mailimf_mailbox_list; | 16 | struct mailimf_mailbox_list; |
17 | struct mailimf_mailbox; | 17 | struct mailimf_mailbox; |
18 | struct mailimf_date_time; | 18 | struct mailimf_date_time; |
19 | struct mailimf_group; | 19 | struct mailimf_group; |
20 | struct mailimf_address_list; | 20 | struct mailimf_address_list; |
21 | struct mailsession; | ||
21 | 22 | ||
22 | /* this class hold just the funs shared between | 23 | /* this class hold just the funs shared between |
23 | * mbox and pop3 (later mh, too) mail access. | 24 | * mbox and pop3 (later mh, too) mail access. |
24 | * it is not desigend to make a instance of it! | 25 | * it is not desigend to make a instance of it! |
25 | */ | 26 | */ |
26 | class Genericwrapper : public AbstractMail | 27 | class Genericwrapper : public AbstractMail |
27 | { | 28 | { |
28 | Q_OBJECT | 29 | Q_OBJECT |
29 | public: | 30 | public: |
30 | Genericwrapper(); | 31 | Genericwrapper(); |
31 | virtual ~Genericwrapper(); | 32 | virtual ~Genericwrapper(); |
32 | 33 | ||
33 | virtual encodedString* fetchDecodedPart(const RecMail&mail,const RecPart&part); | 34 | virtual encodedString* fetchDecodedPart(const RecMail&mail,const RecPart&part); |
34 | virtual encodedString* fetchRawPart(const RecMail&mail,const RecPart&part); | 35 | virtual encodedString* fetchRawPart(const RecMail&mail,const RecPart&part); |
35 | virtual QString fetchTextPart(const RecMail&mail,const RecPart&part); | 36 | virtual QString fetchTextPart(const RecMail&mail,const RecPart&part); |
36 | virtual void cleanMimeCache(); | 37 | virtual void cleanMimeCache(); |
37 | 38 | ||
38 | protected: | 39 | protected: |
39 | RecMail *parseHeader( const char *header ); | 40 | RecMail *parseHeader( const char *header ); |
40 | RecBody parseMail( mailmessage * msg ); | 41 | RecBody parseMail( mailmessage * msg ); |
41 | QString parseMailboxList( mailimf_mailbox_list *list ); | 42 | QString parseMailboxList( mailimf_mailbox_list *list ); |
42 | QString parseMailbox( mailimf_mailbox *box ); | 43 | QString parseMailbox( mailimf_mailbox *box ); |
43 | QString parseGroup( mailimf_group *group ); | 44 | QString parseGroup( mailimf_group *group ); |
44 | QString parseAddressList( mailimf_address_list *list ); | 45 | QString parseAddressList( mailimf_address_list *list ); |
45 | QString parseDateTime( mailimf_date_time *date ); | 46 | QString parseDateTime( mailimf_date_time *date ); |
46 | 47 | ||
47 | void traverseBody(RecBody&target,mailmessage*message,mailmime*mime,unsigned int current_rek=0); | 48 | 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 fillSingleBody(RecPart&target,mailmessage*message,mailmime*mime); |
49 | static void fillParameters(RecPart&target,clist*parameters); | 50 | static void fillParameters(RecPart&target,clist*parameters); |
50 | static QString getencoding(mailmime_mechanism*aEnc); | 51 | static QString getencoding(mailmime_mechanism*aEnc); |
52 | virtual void parseList(QList<RecMail> &target,mailsession*session,const QString&mailbox); | ||
51 | 53 | ||
52 | QString msgTempName; | 54 | QString msgTempName; |
53 | unsigned int last_msg_id; | 55 | unsigned int last_msg_id; |
54 | QMap<QString,encodedString*> bodyCache; | 56 | QMap<QString,encodedString*> bodyCache; |
55 | }; | 57 | }; |
56 | 58 | ||
57 | #endif | 59 | #endif |