Diffstat (limited to 'kmicromail/libmailwrapper/settings.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/libmailwrapper/settings.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kmicromail/libmailwrapper/settings.h b/kmicromail/libmailwrapper/settings.h index ba3ec89..c33c403 100644 --- a/kmicromail/libmailwrapper/settings.h +++ b/kmicromail/libmailwrapper/settings.h | |||
@@ -1,71 +1,80 @@ | |||
1 | #ifndef SETTINGS_H | 1 | #ifndef SETTINGS_H |
2 | #define SETTINGS_H | 2 | #define SETTINGS_H |
3 | 3 | ||
4 | #include "maildefines.h" | 4 | #include "maildefines.h" |
5 | 5 | ||
6 | /* OPIE */ | 6 | /* OPIE */ |
7 | 7 | ||
8 | /* QT */ | 8 | /* QT */ |
9 | #include <qobject.h> | 9 | #include <qobject.h> |
10 | #include <qlist.h> | 10 | #include <qlist.h> |
11 | #include <qdatetime.h> | ||
11 | 12 | ||
12 | class Account | 13 | class Account |
13 | { | 14 | { |
14 | 15 | ||
15 | public: | 16 | public: |
16 | Account(); | 17 | Account(); |
17 | virtual ~Account() {} | 18 | virtual ~Account() {} |
18 | 19 | ||
19 | void remove(); | 20 | void remove(); |
20 | void setAccountName( QString name ) { accountName = name; } | 21 | void setAccountName( QString name ) { accountName = name; } |
21 | const QString&getAccountName()const{ return accountName; } | 22 | const QString&getAccountName()const{ return accountName; } |
22 | MAILLIB::ATYPE getType()const{ return type; } | 23 | MAILLIB::ATYPE getType()const{ return type; } |
23 | 24 | ||
24 | void setServer(const QString&str){ server = str; } | 25 | void setServer(const QString&str){ server = str; } |
25 | const QString&getServer()const{ return server; } | 26 | const QString&getServer()const{ return server; } |
26 | 27 | ||
28 | void setLocalFolder( QString name ) { localFolder = name; } | ||
29 | const QString& getLocalFolder()const{ return localFolder; } | ||
30 | |||
27 | void setPort(const QString&str) { port = str; } | 31 | void setPort(const QString&str) { port = str; } |
28 | const QString&getPort()const{ return port; } | 32 | const QString&getPort()const{ return port; } |
29 | 33 | ||
30 | void setUser(const QString&str){ user = str; } | 34 | void setUser(const QString&str){ user = str; } |
31 | const QString&getUser()const{ return user; } | 35 | const QString&getUser()const{ return user; } |
32 | 36 | ||
33 | void setPassword(const QString&str) { password = str; } | 37 | void setPassword(const QString&str) { password = str; } |
34 | const QString&getPassword()const { return password; } | 38 | const QString&getPassword()const { return password; } |
35 | 39 | ||
36 | void setSSL( bool b ) { ssl = b; } | 40 | void setSSL( bool b ) { ssl = b; } |
37 | bool getSSL() { return ssl; } | 41 | bool getSSL() { return ssl; } |
38 | 42 | ||
39 | void setConnectionType( int x ) { connectionType = x; } | 43 | void setConnectionType( int x ) { connectionType = x; } |
40 | int ConnectionType() { return connectionType; } | 44 | int ConnectionType() { return connectionType; } |
41 | 45 | ||
46 | void setMaxMailSize( int x ) { maxMailSize = x; } | ||
47 | int getMaxMailSize() { return maxMailSize; } | ||
42 | 48 | ||
43 | void setOffline(bool b) {offline = b;} | 49 | void setOffline(bool b) {offline = b;} |
44 | bool getOffline()const{return offline;} | 50 | bool getOffline()const{return offline;} |
45 | 51 | ||
46 | virtual QString getFileName() { return accountName; } | 52 | virtual QString getFileName() { return accountName; } |
47 | virtual void read() { ; } | 53 | virtual void read() { ; } |
48 | virtual void save() { ; } | 54 | virtual void save() { ; } |
49 | 55 | ||
50 | protected: | 56 | protected: |
51 | QString accountName, server, port, user, password; | 57 | QString accountName, server, port, user, password; |
52 | bool ssl; | 58 | bool ssl; |
53 | int connectionType; | 59 | int connectionType; |
54 | bool offline; | 60 | bool offline; |
55 | MAILLIB::ATYPE type; | 61 | MAILLIB::ATYPE type; |
62 | QString localFolder; | ||
63 | int maxMailSize; | ||
64 | QDateTime lastFetch; | ||
56 | }; | 65 | }; |
57 | 66 | ||
58 | class IMAPaccount : public Account | 67 | class IMAPaccount : public Account |
59 | { | 68 | { |
60 | 69 | ||
61 | public: | 70 | public: |
62 | IMAPaccount(); | 71 | IMAPaccount(); |
63 | IMAPaccount( QString filename ); | 72 | IMAPaccount( QString filename ); |
64 | 73 | ||
65 | static QString getUniqueFileName(); | 74 | static QString getUniqueFileName(); |
66 | 75 | ||
67 | virtual void read(); | 76 | virtual void read(); |
68 | virtual void save(); | 77 | virtual void save(); |
69 | virtual QString getFileName(); | 78 | virtual QString getFileName(); |
70 | 79 | ||
71 | void setPrefix(const QString&str) {prefix=str;} | 80 | void setPrefix(const QString&str) {prefix=str;} |