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 #ifndef INCL_SYMBIAN_DEVICE_MANAGEMENT_NODE
00037 #define INCL_SYMBIAN_DEVICE_MANAGEMENT_NODE
00038
00040 #include <syncmldef.h>
00041 #include <string.h>
00042
00043 #include "base/globalsdef.h"
00044 #include "base/fscapi.h"
00045 #include "base/util/ArrayElement.h"
00046 #include "spdm/ManagementNode.h"
00047 #include "base/util/StringBuffer.h"
00048
00049
00050 BEGIN_NAMESPACE
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062 class DeviceManagementNode : public ManagementNode {
00063
00064 protected:
00065 ArrayList *lines;
00066 bool modified;
00067 char *prefix;
00068 static StringBuffer configFile;
00069
00070
00071 StringBuffer currentDir;
00072
00073
00074
00075
00076
00077 bool gotoDir(bool read);
00078
00079
00080 void returnFromDir();
00081
00082
00083 void update(bool read);
00084
00085
00086 int strnicmp( const char *a, const char *b, int len );
00087
00088
00089
00090 void initCurrentDir();
00091
00092
00093 int renameFileInCwd(const char* src, const char* dst);
00094
00095 #if defined(UPDATE_NATIVE_CONFIG)
00096
00097
00098 void pushSymbianSyncMLConfigParameter(const char* property,
00099 const char* value);
00100 #endif
00101
00102 private:
00103
00104 static StringBuffer configPath;
00105
00106 public:
00107
00108
00109
00118 DeviceManagementNode(const char* parent, const char *leafName);
00119 DeviceManagementNode(const char* fullName);
00120
00121 DeviceManagementNode(const DeviceManagementNode &other);
00122 virtual ~DeviceManagementNode();
00123
00124 static void setConfigPath(const StringBuffer &p) { configPath = p; }
00125 static const StringBuffer& getConfigPath() { return configPath; }
00126 void lookupDir();
00127
00128
00129
00130
00131
00132
00133
00134
00135 virtual char* readPropertyValue(const char* property);
00136
00137
00138
00139
00140
00141
00142
00143
00144 virtual void setPropertyValue(const char* property, const char* value);
00145
00146
00147
00148
00149 char **getChildrenNames();
00150
00151
00152
00153
00154
00155 virtual int getChildrenMaxCount();
00156
00157
00158
00159
00160
00161 virtual ArrayElement* clone();
00162
00163 static void setServerURI(const StringBuffer& server);
00164 static const StringBuffer& getServerURI();
00165
00166 static void setProfileName(const StringBuffer& name);
00167 static const StringBuffer& getProfileName();
00168
00169 static void setUID(TSmlCreatorId uid);
00170 static TSmlCreatorId getUID();
00171
00172 static void setCardURI(const StringBuffer& cardURI);
00173 static const StringBuffer& getCardURI();
00174
00175 static void setCalURI(const StringBuffer& calURI);
00176 static const StringBuffer& getCalURI();
00177
00178 static void setImapServer(const StringBuffer& imapServer);
00179 static const StringBuffer& getImapServer();
00180
00181 static void setImapPort(unsigned int imapPort);
00182 static unsigned int getImapPort();
00183
00184 static void setSmtpServer(const StringBuffer& smtpServer);
00185 static const StringBuffer& getSmtpServer();
00186
00187 static void setSmtpPort(unsigned int smtpPort);
00188 static unsigned int getSmtpPort();
00189
00190
00191
00192 const WCHAR* getFullContext() { return NULL; }
00193
00200 int deletePropertyNode(const char* node);
00201 };
00202
00203
00204 END_NAMESPACE
00205
00207 #endif