00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef INCL_MAIL_SYNC_SOURCE_CONFIG
00039 #define INCL_MAIL_SYNC_SOURCE_CONFIG
00040
00042 #include "base/fscapi.h"
00043 #include "spds/constants.h"
00044 #include "spds/SyncSourceConfig.h"
00045 #include "base/globalsdef.h"
00046 #include "mail/MailAccount.h"
00047
00048 BEGIN_NAMESPACE
00049
00050 class MailSyncSourceConfig : public SyncSourceConfig {
00051
00052 private:
00053
00061 int downloadAge;
00062
00070 int bodySize;
00071
00079 int attachSize;
00080
00081
00082
00083
00084 int inbox;
00085 int outbox;
00086 int draft;
00087 int trash;
00088 int sent;
00089
00090
00091
00092
00093 int schedule;
00094
00095
00096
00097
00098 ArrayList mailAccounts;
00099
00100 public:
00101
00102
00103
00104
00105 MailSyncSourceConfig();
00106
00107
00108
00109
00110 MailSyncSourceConfig(MailSyncSourceConfig& c);
00111
00112
00113
00114
00115 ~MailSyncSourceConfig();
00116
00117
00118
00119
00120
00121
00122 void setDownloadAge(int age);
00123
00124
00125
00126
00127 int getDownloadAge() const;
00128
00129
00130
00131
00132
00133
00134 void setBodySize(int size);
00135
00136
00137
00138
00139 int getBodySize() const;
00140
00141
00142
00143
00144
00145
00146 void setAttachSize(int size);
00147
00148
00149
00150
00151 int getAttachSize() const;
00152
00153
00154 void setInbox(int v);
00155
00156 int getInbox() const;
00157
00158 void setOutbox(int v);
00159
00160 int getOutbox() const;
00161
00162 void setDraft(int v);
00163
00164 int getDraft() const;
00165
00166 void setTrash(int v);
00167
00168 int getTrash() const;
00169
00170 void setSent(int v);
00171
00172 int getSent() const;
00173
00174 void setSchedule(int v);
00175
00176 int getSchedule() const;
00177
00181 bool addMailAccount(const MailAccount& account);
00182
00186 bool delMailAccount(const char* accountName);
00187
00191 bool modifyMailAccount(const MailAccount& account);
00192
00199 bool setDeletedMailAccount(const char* accountName);
00200
00208 bool setToBeCleanedFlag(const char* accountName, bool tobecleaned);
00209
00213 const ArrayList& getMailAccounts() const { return mailAccounts; }
00214 void setMailAccounts(const ArrayList& ma) { mailAccounts = ma;}
00215
00219 MailSyncSourceConfig& operator = (const MailSyncSourceConfig& mssc) {
00220 assign(mssc);
00221 return *this;
00222 }
00223
00229 void assign(const MailSyncSourceConfig& sc);
00230
00231 StringBuffer print();
00232 };
00233
00234
00235 END_NAMESPACE
00236
00238 #endif