Diffstat (limited to 'noncore/net/mail/libmailwrapper/abstractmail.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.h b/noncore/net/mail/libmailwrapper/abstractmail.h index 5dc4cab..dab9e10 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.h +++ b/noncore/net/mail/libmailwrapper/abstractmail.h | |||
@@ -2,50 +2,52 @@ | |||
2 | #define __abstract_mail_ | 2 | #define __abstract_mail_ |
3 | 3 | ||
4 | #include <qobject.h> | 4 | #include <qobject.h> |
5 | #include "settings.h" | 5 | #include "settings.h" |
6 | 6 | ||
7 | class RecMail; | 7 | class RecMail; |
8 | class RecBody; | 8 | class RecBody; |
9 | class RecPart; | 9 | class RecPart; |
10 | class IMAPwrapper; | 10 | class IMAPwrapper; |
11 | class POP3wrapper; | 11 | class POP3wrapper; |
12 | class Folder; | 12 | class Folder; |
13 | class encodedString; | 13 | class encodedString; |
14 | struct folderStat; | ||
14 | 15 | ||
15 | class AbstractMail:public QObject | 16 | class AbstractMail:public QObject |
16 | { | 17 | { |
17 | Q_OBJECT | 18 | Q_OBJECT |
18 | public: | 19 | public: |
19 | AbstractMail(){}; | 20 | AbstractMail(){}; |
20 | virtual ~AbstractMail(){} | 21 | virtual ~AbstractMail(){} |
21 | virtual QList<Folder>* listFolders()=0; | 22 | virtual QList<Folder>* listFolders()=0; |
22 | virtual void listMessages(const QString & mailbox,QList<RecMail>&target )=0; | 23 | virtual void listMessages(const QString & mailbox,QList<RecMail>&target )=0; |
24 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX")=0; | ||
23 | virtual RecBody fetchBody(const RecMail&mail)=0; | 25 | virtual RecBody fetchBody(const RecMail&mail)=0; |
24 | virtual QString fetchTextPart(const RecMail&mail,const RecPart&part)=0; | 26 | virtual QString fetchTextPart(const RecMail&mail,const RecPart&part)=0; |
25 | virtual encodedString* fetchDecodedPart(const RecMail&mail,const RecPart&part)=0; | 27 | virtual encodedString* fetchDecodedPart(const RecMail&mail,const RecPart&part)=0; |
26 | virtual encodedString* fetchRawPart(const RecMail&mail,const RecPart&part)=0; | 28 | virtual encodedString* fetchRawPart(const RecMail&mail,const RecPart&part)=0; |
27 | 29 | ||
28 | virtual void deleteMail(const RecMail&mail)=0; | 30 | virtual void deleteMail(const RecMail&mail)=0; |
29 | virtual void answeredMail(const RecMail&mail)=0; | 31 | virtual void answeredMail(const RecMail&mail)=0; |
30 | virtual void cleanMimeCache(){}; | 32 | virtual void cleanMimeCache(){}; |
31 | virtual int deleteAllMail(const Folder*){return 1;} | 33 | virtual int deleteAllMail(const Folder*){return 1;} |
32 | virtual int deleteMbox(const Folder*){return 1;} | 34 | virtual int deleteMbox(const Folder*){return 1;} |
33 | 35 | ||
34 | /* mail box methods */ | 36 | /* mail box methods */ |
35 | /* parameter is the box to create. | 37 | /* parameter is the box to create. |
36 | * if the implementing subclass has prefixes, | 38 | * if the implementing subclass has prefixes, |
37 | * them has to be appended automatic. | 39 | * them has to be appended automatic. |
38 | */ | 40 | */ |
39 | virtual int createMbox(const QString&,const Folder*parentfolder=0,const QString& delemiter="/",bool getsubfolder=false){return 0;} | 41 | virtual int createMbox(const QString&,const Folder*parentfolder=0,const QString& delemiter="/",bool getsubfolder=false); |
40 | 42 | ||
41 | static AbstractMail* getWrapper(IMAPaccount *a); | 43 | static AbstractMail* getWrapper(IMAPaccount *a); |
42 | static AbstractMail* getWrapper(POP3account *a); | 44 | static AbstractMail* getWrapper(POP3account *a); |
43 | /* mbox only! */ | 45 | /* mbox only! */ |
44 | static AbstractMail* getWrapper(const QString&a); | 46 | static AbstractMail* getWrapper(const QString&a); |
45 | 47 | ||
46 | protected: | 48 | protected: |
47 | static encodedString*decode_String(const encodedString*text,const QString&enc); | 49 | static encodedString*decode_String(const encodedString*text,const QString&enc); |
48 | static QString convert_String(const char*text); | 50 | static QString convert_String(const char*text); |
49 | static QString gen_attachment_id(); | 51 | static QString gen_attachment_id(); |
50 | }; | 52 | }; |
51 | #endif | 53 | #endif |