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
00045 BEGIN_NAMESPACE
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 class DeviceConfig {
00056
00057 private:
00058
00059 char* man ;
00060 char* mod ;
00061 char* oem ;
00062 char* fwv ;
00063 char* swv ;
00064 char* hwv ;
00065 char* devID ;
00066 char* devType ;
00067 char* dsV ;
00068 bool utc ;
00069 bool loSupport ;
00070 bool nocSupport ;
00071 LogLevel logLevel ;
00072 unsigned int maxObjSize ;
00073 char* devInfHash ;
00074
00075
00076
00077
00078 int smartSlowSync;
00079
00080 char* verDTD;
00081 bool sendDevInfo;
00082 bool forceServerDevInfo;
00083 char* serverLastSyncURL;
00084
00092 void set(char* * buf, const char* v);
00093
00094
00095 public:
00096
00097 DeviceConfig();
00098 DeviceConfig(DeviceConfig& s);
00099 ~DeviceConfig();
00100
00101
00113 const char* getMan() const ;
00114 void setMan(const char* v) ;
00115
00116 const char* getMod() const ;
00117 void setMod(const char* v) ;
00118
00119 const char* getOem() const ;
00120 void setOem(const char* v) ;
00121
00122 const char* getFwv() const ;
00123 void setFwv(const char* v) ;
00124
00125 const char* getSwv() const ;
00126 void setSwv(const char* v) ;
00127
00128 const char* getHwv() const ;
00129 void setHwv(const char* v) ;
00130
00131 const char* getDevID() const ;
00132 void setDevID(const char* v) ;
00133
00134 const char* getDevType() const ;
00135 void setDevType(const char* v) ;
00136
00137 const char* getDsV() const ;
00138 void setDsV(const char* v) ;
00139
00140 bool getUtc() const ;
00141 void setUtc(bool v) ;
00142
00143 bool getLoSupport() const ;
00144 void setLoSupport(bool v) ;
00145
00146 bool getNocSupport() const ;
00147 void setNocSupport(bool v) ;
00148
00149 LogLevel getLogLevel() const ;
00150 void setLogLevel(LogLevel v) ;
00151
00152 unsigned int getMaxObjSize() const ;
00153 void setMaxObjSize(unsigned int v) ;
00154
00155 const char* getDevInfHash() const ;
00156 void setDevInfHash(const char *v) ;
00157
00158 int getSmartSlowSync() const;
00159 void setSmartSlowSync(int v);
00160
00161 const char* getVerDTD() const ;
00162 void setVerDTD(const char* v) ;
00163
00164 bool getSendDevInfo() const ;
00165 void setSendDevInfo(bool) ;
00166
00167 bool getForceServerDevInfo() const ;
00168 void setForceServerDevInfo(bool) ;
00169
00170 const char* getServerLastSyncURL() const;
00171 void setServerLastSyncURL(const char *v);
00172
00173
00180 void assign(const DeviceConfig& s);
00181
00182
00183
00184
00185 DeviceConfig& operator = (const DeviceConfig& dc) {
00186 assign(dc);
00187 return *this;
00188 }
00189 };
00190
00191
00192 END_NAMESPACE
00193
00195 #endif