Diffstat (limited to 'kmicromail/libmailwrapper/abstractmail.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/libmailwrapper/abstractmail.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/kmicromail/libmailwrapper/abstractmail.h b/kmicromail/libmailwrapper/abstractmail.h index 2069ca1..f606b1f 100644 --- a/kmicromail/libmailwrapper/abstractmail.h +++ b/kmicromail/libmailwrapper/abstractmail.h | |||
@@ -1,81 +1,83 @@ | |||
1 | // CHANGED 2004-09-31 Lutz Rogowski | 1 | // CHANGED 2004-09-31 Lutz Rogowski |
2 | #ifndef __abstract_mail_ | 2 | #ifndef __abstract_mail_ |
3 | #define __abstract_mail_ | 3 | #define __abstract_mail_ |
4 | 4 | ||
5 | #include "maildefines.h" | 5 | #include "maildefines.h" |
6 | 6 | ||
7 | #include "settings.h" | 7 | #include "settings.h" |
8 | 8 | ||
9 | #include <qobject.h> | 9 | #include <qobject.h> |
10 | //Added by qt3to4: | ||
11 | #include <Q3ValueList> | ||
10 | #include <opie2/osmartpointer.h> | 12 | #include <opie2/osmartpointer.h> |
11 | #include "mailtypes.h" | 13 | #include "mailtypes.h" |
12 | 14 | ||
13 | 15 | ||
14 | #include "mailwrapper.h" | 16 | #include "mailwrapper.h" |
15 | 17 | ||
16 | class IMAPwrapper; | 18 | class IMAPwrapper; |
17 | class POP3wrapper; | 19 | class POP3wrapper; |
18 | class Folder; | 20 | class Folder; |
19 | class encodedString; | 21 | class encodedString; |
20 | struct folderStat; | 22 | struct folderStat; |
21 | 23 | ||
22 | class AbstractMail:public QObject | 24 | class AbstractMail:public QObject |
23 | { | 25 | { |
24 | Q_OBJECT | 26 | Q_OBJECT |
25 | public: | 27 | public: |
26 | AbstractMail(){}; | 28 | AbstractMail(){}; |
27 | virtual ~AbstractMail(){} | 29 | virtual ~AbstractMail(){} |
28 | virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders()=0; | 30 | virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders()=0; |
29 | virtual void listMessages(const QString & mailbox,QValueList<RecMailP>&target, int sizeInKb = 0 )=0; | 31 | virtual void listMessages(const QString & mailbox,Q3ValueList<RecMailP>&target, int sizeInKb = 0 )=0; |
30 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX")=0; | 32 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX")=0; |
31 | virtual RecBodyP fetchBody(const RecMailP&mail)=0; | 33 | virtual RecBodyP fetchBody(const RecMailP&mail)=0; |
32 | virtual QString fetchTextPart(const RecMailP&mail,const RecPartP&part)=0; | 34 | virtual QString fetchTextPart(const RecMailP&mail,const RecPartP&part)=0; |
33 | virtual encodedString* fetchDecodedPart(const RecMailP&mail,const RecPartP&part)=0; | 35 | virtual encodedString* fetchDecodedPart(const RecMailP&mail,const RecPartP&part)=0; |
34 | virtual encodedString* fetchRawPart(const RecMailP&mail,const RecPartP&part)=0; | 36 | virtual encodedString* fetchRawPart(const RecMailP&mail,const RecPartP&part)=0; |
35 | virtual encodedString* fetchRawBody(const RecMailP&mail)=0; | 37 | virtual encodedString* fetchRawBody(const RecMailP&mail)=0; |
36 | 38 | ||
37 | virtual void deleteMail(const RecMailP&mail)=0; | 39 | virtual void deleteMail(const RecMailP&mail)=0; |
38 | virtual void deleteMailList(const QValueList<RecMailP>&target); | 40 | virtual void deleteMailList(const Q3ValueList<RecMailP>&target); |
39 | virtual void answeredMail(const RecMailP&mail)=0; | 41 | virtual void answeredMail(const RecMailP&mail)=0; |
40 | virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&)=0; | 42 | virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&)=0; |
41 | virtual void deleteMails(const QString & FolderName,const QValueList<Opie::Core::OSmartPointer<RecMail> >&target); | 43 | virtual void deleteMails(const QString & FolderName,const Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&target); |
42 | virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&)=0; | 44 | virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&)=0; |
43 | virtual void storeMessage(const char*msg,size_t length, const QString&folder)=0; | 45 | virtual void storeMessage(const char*msg,size_t length, const QString&folder)=0; |
44 | void downloadNewMails(const FolderP&fromFolder,AbstractMail*targetWrapper ); | 46 | void downloadNewMails(const FolderP&fromFolder,AbstractMail*targetWrapper ); |
45 | virtual void mvcpAllMails(const Opie::Core::OSmartPointer<Folder>&fromFolder, | 47 | virtual void mvcpAllMails(const Opie::Core::OSmartPointer<Folder>&fromFolder, |
46 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int sizeInKb = 0); | 48 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int sizeInKb = 0); |
47 | virtual void mvcpMailList(const QValueList<RecMailP>& t, | 49 | virtual void mvcpMailList(const Q3ValueList<RecMailP>& t, |
48 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); | 50 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); |
49 | virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); | 51 | virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); |
50 | 52 | ||
51 | virtual void cleanMimeCache(){}; | 53 | virtual void cleanMimeCache(){}; |
52 | /* mail box methods */ | 54 | /* mail box methods */ |
53 | /* parameter is the box to create. | 55 | /* parameter is the box to create. |
54 | * if the implementing subclass has prefixes, | 56 | * if the implementing subclass has prefixes, |
55 | * them has to be appended automatic. | 57 | * them has to be appended automatic. |
56 | */ | 58 | */ |
57 | virtual int createMbox(const QString&,const Opie::Core::OSmartPointer<Folder>&parentfolder=0, | 59 | virtual int createMbox(const QString&,const Opie::Core::OSmartPointer<Folder>&parentfolder=0, |
58 | const QString& delemiter="/",bool getsubfolder=false); | 60 | const QString& delemiter="/",bool getsubfolder=false); |
59 | virtual void logout()=0; | 61 | virtual void logout()=0; |
60 | 62 | ||
61 | virtual Account* getAccount() = 0; | 63 | virtual Account* getAccount() = 0; |
62 | 64 | ||
63 | static AbstractMail* getWrapper(IMAPaccount *a); | 65 | static AbstractMail* getWrapper(IMAPaccount *a); |
64 | static AbstractMail* getWrapper(POP3account *a); | 66 | static AbstractMail* getWrapper(POP3account *a); |
65 | static AbstractMail* getWrapper(NNTPaccount *a); | 67 | static AbstractMail* getWrapper(NNTPaccount *a); |
66 | /* mbox only! */ | 68 | /* mbox only! */ |
67 | static AbstractMail* getWrapper(const QString&a,const QString&name="Local Folders"); | 69 | static AbstractMail* getWrapper(const QString&a,const QString&name="Local Folders"); |
68 | static AbstractMail* getWrapper(Account*a); | 70 | static AbstractMail* getWrapper(Account*a); |
69 | 71 | ||
70 | static QString defaultLocalfolder(); | 72 | static QString defaultLocalfolder(); |
71 | static QString draftFolder(); | 73 | static QString draftFolder(); |
72 | 74 | ||
73 | virtual MAILLIB::ATYPE getType()const=0; | 75 | virtual MAILLIB::ATYPE getType()const=0; |
74 | virtual const QString&getName()const=0; | 76 | virtual const QString&getName()const=0; |
75 | 77 | ||
76 | protected: | 78 | protected: |
77 | static encodedString*decode_String(const encodedString*text,const QString&enc); | 79 | static encodedString*decode_String(const encodedString*text,const QString&enc); |
78 | static QString convert_String(const char*text); | 80 | static QString convert_String(const char*text); |
79 | static QString gen_attachment_id(); | 81 | static QString gen_attachment_id(); |
80 | }; | 82 | }; |
81 | #endif | 83 | #endif |