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_WINDOWS_DEVICE_CONFIG
00036 #define INCL_WINDOWS_DEVICE_CONFIG
00037
00040 #include "spds/DeviceConfig.h"
00041 #include "defs.h"
00042
00043 using namespace Funambol;
00044
00045 class WindowsDeviceConfig : public DeviceConfig
00046 {
00047 private:
00048 bool attach;
00049 unsigned int logNum;
00050 unsigned int logSize;
00051
00052 DeviceConfig & dc;
00053
00054 public:
00055 WindowsDeviceConfig(const WindowsDeviceConfig& wdc, DeviceConfig & dc);
00056 WindowsDeviceConfig(const WindowsDeviceConfig& wdc);
00057 WindowsDeviceConfig(DeviceConfig& dc);
00058 ~WindowsDeviceConfig();
00059
00060 void setLogNum(unsigned int v)
00061 { logNum = min(max(v,MIN_LOG_FILE_SIZE),MAX_LOG_FILE_SIZE); }
00062 const unsigned int getLogNum() const
00063 { return min(max(logNum,MIN_LOG_FILE_NUM),MAX_LOG_FILE_NUM); }
00064
00065 void setLogSize(unsigned int v)
00066 { logSize = min(max(v,MIN_LOG_FILE_SIZE),MAX_LOG_FILE_SIZE); }
00067 const unsigned int getLogSize() const
00068 { return min(max(logSize,MIN_LOG_FILE_SIZE),MAX_LOG_FILE_SIZE); }
00069
00070 WindowsDeviceConfig& operator = (const WindowsDeviceConfig& dc) {
00071 assign(dc);
00072 return *this;
00073 }
00074
00075 _declspec(dllexport) void setAttach (const bool v)
00076 { attach = v; }
00077 _declspec(dllexport) const bool getAttach() const
00078 { return attach; }
00079
00080 void assign(const WindowsDeviceConfig& s) {
00081 dc.assign(s.dc);
00082 attach = s.attach;
00083 logNum = s.logNum;
00084 logSize = s.logSize;
00085 }
00086
00087 DeviceConfig & getCommonConfig() const
00088 {
00089 return dc;
00090 }
00091
00092 const char* getMan() const { return dc.getMan(); }
00093 void setMan(const char* v) { dc.setMan(v); }
00094
00095 const char* getMod() const { return dc.getMod(); }
00096 void setMod(const char* v) { dc.setMod(v); }
00097
00098 const char* getOem() const { return dc.getOem(); }
00099 void setOem(const char* v) { dc.setOem(v); }
00100
00101 const char* getFwv() const { return dc.getFwv(); }
00102 void setFwv(const char* v) { dc.setFwv(v); }
00103
00104 const char* getSwv() const { return dc.getSwv(); }
00105 void setSwv(const char* v) { dc.setSwv(v); }
00106
00107 const char* getHwv() const { return dc.getHwv(); }
00108 void setHwv(const char* v) { dc.setHwv(v); }
00109
00110 const char* getDevID() const { return dc.getDevID(); }
00111 void setDevID(const char* v) { dc.setDevID(v); }
00112
00113 const char* getDevType() const { return dc.getDevType(); }
00114 void setDevType(const char* v) { dc.setDevType(v); }
00115
00116 const char* getDsV() const { return dc.getDsV(); }
00117 void setDsV(const char* v) { dc.setDsV(v); }
00118
00119 bool getUtc() const { return dc.getUtc(); }
00120 void setUtc(bool v) { dc.setUtc(v); }
00121
00122 bool getLoSupport() const { return dc.getLoSupport(); }
00123 void setLoSupport(bool v) { dc.setLoSupport(v); }
00124
00125 bool getNocSupport() const { return dc.getNocSupport();}
00126 void setNocSupport(bool v) { dc.setNocSupport(v); }
00127
00128 LogLevel getLogLevel() const { return dc.getLogLevel(); }
00129 void setLogLevel(LogLevel v) { dc.setLogLevel(v); }
00130
00131 unsigned int getMaxObjSize() const { return dc.getMaxObjSize();}
00132 void setMaxObjSize(unsigned int v) { dc.setMaxObjSize(v); }
00133
00134 const char* getDevInfHash() const { return dc.getDevInfHash();}
00135 void setDevInfHash(const char *v) { dc.setDevInfHash(v); }
00136 };
00137
00140 #endif INCL_WINDOWS_DEVICE_CONFIG