Diffstat (limited to 'noncore/net/mail/libmailwrapper/abstractmail.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.h b/noncore/net/mail/libmailwrapper/abstractmail.h index d377452..d911468 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.h +++ b/noncore/net/mail/libmailwrapper/abstractmail.h | |||
@@ -1,61 +1,65 @@ | |||
1 | #ifndef __abstract_mail_ | 1 | #ifndef __abstract_mail_ |
2 | #define __abstract_mail_ | 2 | #define __abstract_mail_ |
3 | 3 | ||
4 | #include "maildefines.h" | 4 | #include "maildefines.h" |
5 | 5 | ||
6 | #include <qobject.h> | ||
7 | #include "settings.h" | 6 | #include "settings.h" |
8 | 7 | ||
8 | #include <qobject.h> | ||
9 | #include <opie2/osmart_pointer.h> | ||
10 | |||
9 | class RecMail; | 11 | class RecMail; |
10 | class RecBody; | 12 | class RecBody; |
11 | class RecPart; | 13 | class RecPart; |
12 | class IMAPwrapper; | 14 | class IMAPwrapper; |
13 | class POP3wrapper; | 15 | class POP3wrapper; |
14 | class Folder; | 16 | class Folder; |
15 | class encodedString; | 17 | class encodedString; |
16 | struct folderStat; | 18 | struct folderStat; |
17 | 19 | ||
18 | class AbstractMail:public QObject | 20 | class AbstractMail:public QObject |
19 | { | 21 | { |
20 | Q_OBJECT | 22 | Q_OBJECT |
21 | public: | 23 | public: |
22 | AbstractMail(){}; | 24 | AbstractMail(){}; |
23 | virtual ~AbstractMail(){} | 25 | virtual ~AbstractMail(){} |
24 | virtual QList<Folder>* listFolders()=0; | 26 | virtual QValueList<Opie::osmart_pointer<Folder> >* listFolders()=0; |
25 | virtual void listMessages(const QString & mailbox,QList<RecMail>&target )=0; | 27 | virtual void listMessages(const QString & mailbox,QList<RecMail>&target )=0; |
26 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX")=0; | 28 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX")=0; |
27 | virtual RecBody fetchBody(const RecMail&mail)=0; | 29 | virtual RecBody fetchBody(const RecMail&mail)=0; |
28 | virtual QString fetchTextPart(const RecMail&mail,const RecPart&part)=0; | 30 | virtual QString fetchTextPart(const RecMail&mail,const RecPart&part)=0; |
29 | virtual encodedString* fetchDecodedPart(const RecMail&mail,const RecPart&part)=0; | 31 | virtual encodedString* fetchDecodedPart(const RecMail&mail,const RecPart&part)=0; |
30 | virtual encodedString* fetchRawPart(const RecMail&mail,const RecPart&part)=0; | 32 | virtual encodedString* fetchRawPart(const RecMail&mail,const RecPart&part)=0; |
31 | virtual encodedString* fetchRawBody(const RecMail&mail)=0; | 33 | virtual encodedString* fetchRawBody(const RecMail&mail)=0; |
32 | 34 | ||
33 | virtual void deleteMail(const RecMail&mail)=0; | 35 | virtual void deleteMail(const RecMail&mail)=0; |
34 | virtual void answeredMail(const RecMail&mail)=0; | 36 | virtual void answeredMail(const RecMail&mail)=0; |
35 | virtual int deleteAllMail(const Folder*)=0; | 37 | virtual int deleteAllMail(const Opie::osmart_pointer<Folder>&)=0; |
36 | virtual void deleteMails(const QString & FolderName,QList<RecMail> &target); | 38 | virtual void deleteMails(const QString & FolderName,QList<RecMail> &target); |
37 | virtual int deleteMbox(const Folder*)=0; | 39 | virtual int deleteMbox(const Opie::osmart_pointer<Folder>&)=0; |
38 | virtual void storeMessage(const char*msg,size_t length, const QString&folder)=0; | 40 | virtual void storeMessage(const char*msg,size_t length, const QString&folder)=0; |
39 | 41 | ||
40 | virtual void mvcpAllMails(Folder*fromFolder,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); | 42 | virtual void mvcpAllMails(const Opie::osmart_pointer<Folder>&fromFolder, |
43 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); | ||
41 | virtual void mvcpMail(const RecMail&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); | 44 | virtual void mvcpMail(const RecMail&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); |
42 | 45 | ||
43 | virtual void cleanMimeCache(){}; | 46 | virtual void cleanMimeCache(){}; |
44 | /* mail box methods */ | 47 | /* mail box methods */ |
45 | /* parameter is the box to create. | 48 | /* parameter is the box to create. |
46 | * if the implementing subclass has prefixes, | 49 | * if the implementing subclass has prefixes, |
47 | * them has to be appended automatic. | 50 | * them has to be appended automatic. |
48 | */ | 51 | */ |
49 | virtual int createMbox(const QString&,const Folder*parentfolder=0,const QString& delemiter="/",bool getsubfolder=false); | 52 | virtual int createMbox(const QString&,const Opie::osmart_pointer<Folder>&parentfolder=0, |
53 | const QString& delemiter="/",bool getsubfolder=false); | ||
50 | virtual void logout()=0; | 54 | virtual void logout()=0; |
51 | 55 | ||
52 | static AbstractMail* getWrapper(IMAPaccount *a); | 56 | static AbstractMail* getWrapper(IMAPaccount *a); |
53 | static AbstractMail* getWrapper(POP3account *a); | 57 | static AbstractMail* getWrapper(POP3account *a); |
54 | static AbstractMail* getWrapper(NNTPaccount *a); | 58 | static AbstractMail* getWrapper(NNTPaccount *a); |
55 | /* mbox only! */ | 59 | /* mbox only! */ |
56 | static AbstractMail* getWrapper(const QString&a,const QString&name="Local Folders"); | 60 | static AbstractMail* getWrapper(const QString&a,const QString&name="Local Folders"); |
57 | static AbstractMail* getWrapper(Account*a); | 61 | static AbstractMail* getWrapper(Account*a); |
58 | 62 | ||
59 | static QString defaultLocalfolder(); | 63 | static QString defaultLocalfolder(); |
60 | static QString draftFolder(); | 64 | static QString draftFolder(); |
61 | 65 | ||