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 #ifndef INCL_MAIL_ACCOUNT
00038 #define INCL_MAIL_ACCOUNT
00039
00040 #include "base/globalsdef.h"
00041 #include "base/util/ArrayList.h"
00042 #include "spds/FolderData.h"
00043 #include "base/Log.h"
00044
00045 #define VISIBLENAME "VisibleName"
00046 #define EMAILADDRESS "EmailAddress"
00047 #define PROTOCOL "Protocol"
00048 #define USERNAME "Username"
00049 #define PASSWORD "Password"
00050 #define IN_SERVER "IncomingServer"
00051 #define OUT_SERVER "OutgoingServer"
00052 #define IN_PORT "PortIn"
00053 #define OUT_PORT "PortOut"
00054 #define IN_SSL "IncomingSSL"
00055 #define OUT_SSL "OutcomingSSL"
00056 #define SIGNATURE "Signature"
00057 #define DOMAINNAME "DomainName"
00058 #define ID "ID"
00059
00063 #define ROLE_ACCOUNT "account"
00064 #define ROLE_INBOX "inbox"
00065 #define ROLE_OUTBOX "outbox"
00066 #define ROLE_DRAFT "draft"
00067 #define ROLE_SENT "sent"
00068 #define ROLE_TRASH "trash"
00069 #define ROLE_DELETED "deleted"
00070
00071 BEGIN_NAMESPACE
00072
00073 class MailAccount : public FolderData {
00074
00075
00076
00077 private:
00078 bool deleted;
00079 bool toBeCleaned;
00080 bool dirty;
00081
00082 public:
00083
00084 MailAccount() : deleted(false), toBeCleaned(false), dirty(true) {};
00085 MailAccount(const MailAccount& ma);
00086 MailAccount(const FolderData& ma);
00087 ~MailAccount(){};
00088
00089
00090
00091 const char* getVisibleName() const { return getValueByName(VISIBLENAME); }
00092 void setVisibleName(const char* xval){ setValueByName(VISIBLENAME, xval); }
00093
00094 const char* getEmailAddress() const { return getValueByName(EMAILADDRESS); }
00095 void setEmailAddress(const char* xval){ setValueByName(EMAILADDRESS, xval); }
00096
00097 const char* getProtocol() const { return getValueByName(PROTOCOL); }
00098 void setProtocol(const char* xval){ setValueByName(PROTOCOL, xval); }
00099
00100 const char* getUsername() const { return getValueByName(USERNAME); }
00101 void setUsername(const char* xval){ setValueByName(USERNAME, xval); }
00102
00103 const char* getPassword() const { return getValueByName(PASSWORD); }
00104 void setPassword(const char* xval){ setValueByName(PASSWORD, xval); }
00105
00106 const char* getInServer() const { return getValueByName(IN_SERVER); }
00107 void setInServer(const char* xval){ setValueByName(IN_SERVER, xval); }
00108
00109 const char* getOutServer() const { return getValueByName(OUT_SERVER); }
00110 void setOutServer(const char* xval){ setValueByName(OUT_SERVER, xval); }
00111
00112 const char* getInPort() const { return getValueByName(IN_PORT); }
00113 void setInPort(const char* xval){ setValueByName(IN_PORT, xval); }
00114
00115 const char* getOutPort() const { return getValueByName(OUT_PORT); }
00116 void setOutPort(const char* xval){ setValueByName(OUT_PORT, xval); }
00117
00118 const char* getInSSL() const { return getValueByName(IN_SSL); }
00119 void setInSSL(const char* xval){ setValueByName(IN_SSL, xval); }
00120
00121 const char* getOutSSL() const { return getValueByName(OUT_SSL); }
00122 void setOutSSL(const char* xval){ setValueByName(OUT_SSL, xval); }
00123
00124 const char* getSignature() const { return getValueByName(SIGNATURE); }
00125 void setSignature(const char* xval){ setValueByName(SIGNATURE, xval); }
00126
00127 const char* getDomainName() const { return getValueByName(DOMAINNAME); }
00128 void setDomainName(const char* xval){ setValueByName(DOMAINNAME, xval); }
00129
00130 bool getDeleted() const { return deleted; }
00131 void setDeleted(const bool val) { deleted = val; }
00132
00133 bool getToBeCleaned() const { return toBeCleaned; }
00134 void setToBeCleaned(bool tobecleaned) { toBeCleaned = tobecleaned; }
00135
00136 void setDirty(bool flag) { dirty = flag; }
00137 bool getDirty() const { return dirty; }
00138
00139 ArrayElement* clone() { return new MailAccount(*this); }
00140 };
00141
00142
00143 END_NAMESPACE
00144
00146 #endif