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
00095 unsigned int dirty;
00096
00097
00105 void set(char* * buf, const char* v);
00106
00107 public:
00108
00109 DeviceConfig();
00110 DeviceConfig(DeviceConfig& s);
00111 ~DeviceConfig();
00112
00113
00125 const char* getMan() const ;
00126 void setMan(const char* v) ;
00127
00128 const char* getMod() const ;
00129 void setMod(const char* v) ;
00130
00131 const char* getOem() const ;
00132 void setOem(const char* v) ;
00133
00134 const char* getFwv() const ;
00135 void setFwv(const char* v) ;
00136
00137 const char* getSwv() const ;
00138 void setSwv(const char* v) ;
00139
00140 const char* getHwv() const ;
00141 void setHwv(const char* v) ;
00142
00143 const char* getDevID() const ;
00144 void setDevID(const char* v) ;
00145
00146 const char* getDevType() const ;
00147 void setDevType(const char* v) ;
00148
00149 const char* getDsV() const ;
00150 void setDsV(const char* v) ;
00151
00152 bool getUtc() const ;
00153 void setUtc(bool v) ;
00154
00155 bool getLoSupport() const ;
00156 void setLoSupport(bool v) ;
00157
00158 bool getNocSupport() const ;
00159 void setNocSupport(bool v) ;
00160
00161 LogLevel getLogLevel() const ;
00162 void setLogLevel(LogLevel v) ;
00163
00164 unsigned int getMaxObjSize() const ;
00165 void setMaxObjSize(unsigned int v) ;
00166
00167 const char* getDevInfHash() const ;
00168 void setDevInfHash(const char *v) ;
00169
00170 int getSmartSlowSync() const;
00171 void setSmartSlowSync(int v);
00172
00173 int getMultipleEmailAccount() const;
00174 void setMultipleEmailAccount(int v);
00175
00176 const char* getVerDTD() const ;
00177 void setVerDTD(const char* v) ;
00178
00179 bool getSendDevInfo() const ;
00180 void setSendDevInfo(bool) ;
00181
00182 bool getForceServerDevInfo() const ;
00183 void setForceServerDevInfo(bool) ;
00184
00185 const char* getServerLastSyncURL() const;
00186 void setServerLastSyncURL(const char *v);
00187
00188 bool getMediaHttpUpload() const;
00189 void setMediaHttpUpload(bool v);
00190
00197 void setDataStores(const ArrayList* dataStores);
00198
00205 void resetDataStores();
00206
00211 const ArrayList* getDataStores() const;
00212
00214 void addDataStore(DataStore* dataStore);
00215
00220 DataStore* getDataStore(const char* sourceRef);
00221
00223 unsigned int getDirty() const;
00224
00226 bool isDirty(const unsigned int flags);
00227
00229 void setDirty(const unsigned int flags);
00230
00237 void assign(const DeviceConfig& s);
00238
00239
00240
00241
00242 DeviceConfig& operator = (const DeviceConfig& dc) {
00243 assign(dc);
00244 return *this;
00245 }
00246 };
00247
00248
00249 END_NAMESPACE
00250
00252 #endif