author | alwin <alwin> | 2004-01-02 01:12:52 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-01-02 01:12:52 (UTC) |
commit | 8bd5873a04bc8c506694d00be4111549d969fd2a (patch) (unidiff) | |
tree | 2e6f601668916e3d382dba1003b714362cb81179 /noncore/net/mail/libmailwrapper/imapwrapper.h | |
parent | 31df13e3d5eecef960e267b7ad4f7ad98fa28357 (diff) | |
download | opie-8bd5873a04bc8c506694d00be4111549d969fd2a.zip opie-8bd5873a04bc8c506694d00be4111549d969fd2a.tar.gz opie-8bd5873a04bc8c506694d00be4111549d969fd2a.tar.bz2 |
- some more usefull failure message while login
- cleaned up the code for parsing mails, use only one routine, message/rfc822 parts
are parsed, too.
Diffstat (limited to 'noncore/net/mail/libmailwrapper/imapwrapper.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.h b/noncore/net/mail/libmailwrapper/imapwrapper.h index 9b20288..e5846f8 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.h +++ b/noncore/net/mail/libmailwrapper/imapwrapper.h | |||
@@ -1,67 +1,66 @@ | |||
1 | #ifndef __IMAPWRAPPER | 1 | #ifndef __IMAPWRAPPER |
2 | #define __IMAPWRAPPER | 2 | #define __IMAPWRAPPER |
3 | 3 | ||
4 | #include <qlist.h> | 4 | #include <qlist.h> |
5 | #include "mailwrapper.h" | 5 | #include "mailwrapper.h" |
6 | #include "abstractmail.h" | 6 | #include "abstractmail.h" |
7 | #include <libetpan/clist.h> | 7 | #include <libetpan/clist.h> |
8 | 8 | ||
9 | struct mailimap; | 9 | struct mailimap; |
10 | struct mailimap_body; | ||
10 | struct mailimap_body_type_1part; | 11 | struct mailimap_body_type_1part; |
11 | struct mailimap_body_type_text; | 12 | struct mailimap_body_type_text; |
12 | struct mailimap_body_type_basic; | 13 | struct mailimap_body_type_basic; |
13 | struct mailimap_body_type_msg; | 14 | struct mailimap_body_type_msg; |
14 | struct mailimap_body_type_mpart; | 15 | struct mailimap_body_type_mpart; |
15 | struct mailimap_body_fields; | 16 | struct mailimap_body_fields; |
16 | struct mailimap_msg_att; | 17 | struct mailimap_msg_att; |
17 | class encodedString; | 18 | class encodedString; |
18 | 19 | ||
19 | class IMAPwrapper : public AbstractMail | 20 | class IMAPwrapper : public AbstractMail |
20 | { | 21 | { |
21 | Q_OBJECT | 22 | Q_OBJECT |
22 | public: | 23 | public: |
23 | IMAPwrapper( IMAPaccount *a ); | 24 | IMAPwrapper( IMAPaccount *a ); |
24 | virtual ~IMAPwrapper(); | 25 | virtual ~IMAPwrapper(); |
25 | virtual QList<Folder>* listFolders(); | 26 | virtual QList<Folder>* listFolders(); |
26 | virtual void listMessages(const QString & mailbox,QList<RecMail>&target ); | 27 | virtual void listMessages(const QString & mailbox,QList<RecMail>&target ); |
27 | 28 | ||
28 | virtual void deleteMail(const RecMail&mail); | 29 | virtual void deleteMail(const RecMail&mail); |
29 | virtual void answeredMail(const RecMail&mail); | 30 | virtual void answeredMail(const RecMail&mail); |
30 | virtual int deleteAllMail(const Folder*folder); | 31 | virtual int deleteAllMail(const Folder*folder); |
31 | 32 | ||
32 | virtual RecBody fetchBody(const RecMail&mail); | 33 | virtual RecBody fetchBody(const RecMail&mail); |
33 | virtual QString fetchTextPart(const RecMail&mail,const RecPart&part); | 34 | virtual QString fetchTextPart(const RecMail&mail,const RecPart&part); |
34 | virtual encodedString* fetchDecodedPart(const RecMail&mail,const RecPart&part); | 35 | virtual encodedString* fetchDecodedPart(const RecMail&mail,const RecPart&part); |
35 | virtual encodedString* fetchRawPart(const RecMail&mail,const RecPart&part); | 36 | virtual encodedString* fetchRawPart(const RecMail&mail,const RecPart&part); |
36 | 37 | ||
37 | virtual int createMbox(const QString&,const Folder*parentfolder=0,const QString& delemiter="/",bool getsubfolder=false); | 38 | virtual int createMbox(const QString&,const Folder*parentfolder=0,const QString& delemiter="/",bool getsubfolder=false); |
38 | virtual int deleteMbox(const Folder*folder); | 39 | virtual int deleteMbox(const Folder*folder); |
39 | 40 | ||
40 | static void imap_progress( size_t current, size_t maximum ); | 41 | static void imap_progress( size_t current, size_t maximum ); |
41 | 42 | ||
42 | protected: | 43 | protected: |
43 | RecMail*parse_list_result(mailimap_msg_att*); | 44 | RecMail*parse_list_result(mailimap_msg_att*); |
44 | void login(); | 45 | void login(); |
45 | void logout(); | 46 | void logout(); |
46 | 47 | ||
47 | virtual QString fetchTextPart(const RecMail&mail,const QValueList<int>&path,bool internal_call=false,const QString&enc=""); | 48 | virtual QString fetchTextPart(const RecMail&mail,const QValueList<int>&path,bool internal_call=false,const QString&enc=""); |
48 | virtual encodedString*fetchRawPart(const RecMail&mail,const QValueList<int>&path,bool internal_call); | 49 | virtual encodedString*fetchRawPart(const RecMail&mail,const QValueList<int>&path,bool internal_call); |
49 | 50 | ||
50 | void searchBodyText(const RecMail&mail,mailimap_body_type_1part*mailDescription,RecBody&target_body); | ||
51 | void searchBodyText(const RecMail&mail,mailimap_body_type_mpart*mailDescription,RecBody&target_body,int current_recursion=0,QValueList<int>recList=QValueList<int>()); | ||
52 | |||
53 | void fillSinglePart(RecPart&target_part,mailimap_body_type_1part*Description); | 51 | void fillSinglePart(RecPart&target_part,mailimap_body_type_1part*Description); |
54 | void fillSingleTextPart(RecPart&target_part,mailimap_body_type_text*which); | 52 | void fillSingleTextPart(RecPart&target_part,mailimap_body_type_text*which); |
55 | void fillSingleBasicPart(RecPart&target_part,mailimap_body_type_basic*which); | 53 | void fillSingleBasicPart(RecPart&target_part,mailimap_body_type_basic*which); |
56 | void fillSingleMsgPart(RecPart&target_part,mailimap_body_type_msg*which); | 54 | void fillSingleMsgPart(RecPart&target_part,mailimap_body_type_msg*which); |
55 | void traverseBody(const RecMail&mail,mailimap_body*body,RecBody&target_body,int current_recursion,QValueList<int>recList,int current_count=0); | ||
57 | 56 | ||
58 | /* just helpers */ | 57 | /* just helpers */ |
59 | static void fillBodyFields(RecPart&target_part,mailimap_body_fields*which); | 58 | static void fillBodyFields(RecPart&target_part,mailimap_body_fields*which); |
60 | static QStringList address_list_to_stringlist(clist*list); | 59 | static QStringList address_list_to_stringlist(clist*list); |
61 | 60 | ||
62 | 61 | ||
63 | IMAPaccount *account; | 62 | IMAPaccount *account; |
64 | mailimap *m_imap; | 63 | mailimap *m_imap; |
65 | }; | 64 | }; |
66 | 65 | ||
67 | #endif | 66 | #endif |