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 #ifndef INCL_DEVICE_CONFIG
00036 #define INCL_DEVICE_CONFIG
00037
00039 #include "base/fscapi.h"
00040 #include "spds/constants.h"
00041 #include "syncml/core/VerDTD.h"
00042 #include "base/Log.h"
00043 #include "base/globalsdef.h"
00044 #include "base/util/ArrayList.h"
00045 #include "syncml/core/DataStore.h"
00046
00047 BEGIN_NAMESPACE
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057 class DeviceConfig {
00058
00059 private:
00060
00061 char* man ;
00062 char* mod ;
00063 char* oem ;
00064 char* fwv ;
00065 char* swv ;
00066 char* hwv ;
00067 char* devID ;
00068 char* devType ;
00069 char* dsV ;
00070 bool utc ;
00071 bool loSupport ;
00072 bool nocSupport ;
00073 LogLevel logLevel ;
00074 unsigned int maxObjSize ;
00075 char* devInfHash ;
00076
00077
00078 int smartSlowSync;
00079 int multipleEmailAccount;
00080
00081 char* verDTD;
00082 bool sendDevInfo;
00083
00084
00085 bool forceServerDevInfo;
00086 char* serverLastSyncURL;
00087 ArrayList* dataStores;
00088
00089 bool mediaHttpUpload;
00090 char* noFieldLevelReplace;
00091
00096 unsigned int dirty;
00097
00098
00106 void set(char* * buf, const char* v);
00107
00108 public:
00109
00110 DeviceConfig();
00111 DeviceConfig(DeviceConfig& s);
00112 ~DeviceConfig();
00113
00114
00126 const char* getMan() const ;
00127 void setMan(const char* v) ;
00128
00129 const char* getMod() const ;
00130 void setMod(const char* v) ;
00131
00132 const char* getOem() const ;
00133 void setOem(const char* v) ;
00134
00135 const char* getFwv() const ;
00136 void setFwv(const char* v) ;
00137
00138 const char* getSwv() const ;
00139 void setSwv(const char* v) ;
00140
00141 const char* getHwv() const ;
00142 void setHwv(const char* v) ;
00143
00144 const char* getDevID() const ;
00145 void setDevID(const char* v) ;
00146
00147 const char* getDevType() const ;
00148 void setDevType(const char* v) ;
00149
00150 const char* getDsV() const ;
00151 void setDsV(const char* v) ;
00152
00153 bool getUtc() const ;
00154 void setUtc(bool v) ;
00155
00156 bool getLoSupport() const ;
00157 void setLoSupport(bool v) ;
00158
00159 bool getNocSupport() const ;
00160 void setNocSupport(bool v) ;
00161
00162 LogLevel getLogLevel() const ;
00163 void setLogLevel(LogLevel v) ;
00164
00165 unsigned int getMaxObjSize() const ;
00166 void setMaxObjSize(unsigned int v) ;
00167
00168 const char* getDevInfHash() const ;
00169 void setDevInfHash(const char *v) ;
00170
00171 int getSmartSlowSync() const;
00172 void setSmartSlowSync(int v);
00173
00174 int getMultipleEmailAccount() const;
00175 void setMultipleEmailAccount(int v);
00176
00177 const char* getVerDTD() const ;
00178 void setVerDTD(const char* v) ;
00179
00180 bool getSendDevInfo() const ;
00181 void setSendDevInfo(bool) ;
00182
00183 bool getForceServerDevInfo() const ;
00184 void setForceServerDevInfo(bool) ;
00185
00186 const char* getServerLastSyncURL() const;
00187 void setServerLastSyncURL(const char *v);
00188
00189 bool getMediaHttpUpload() const;
00190 void setMediaHttpUpload(bool v);
00191
00192 const char* getNoFieldLevelReplace() const;
00193 void setNoFieldLevelReplace(const char *v);
00194
00201 void setDataStores(const ArrayList* dataStores);
00202
00209 void resetDataStores();
00210
00215 const ArrayList* getDataStores() const;
00216
00218 void addDataStore(DataStore* dataStore);
00219
00224 DataStore* getDataStore(const char* sourceRef);
00225
00227 unsigned int getDirty() const;
00228
00230 bool isDirty(const unsigned int flags);
00231
00233 void setDirty(const unsigned int flags);
00234
00241 void assign(const DeviceConfig& s);
00242
00243
00244
00245
00246 DeviceConfig& operator = (const DeviceConfig& dc) {
00247 assign(dc);
00248 return *this;
00249 }
00250 };
00251
00252
00253 END_NAMESPACE
00254
00256 #endif