00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00029 #ifndef _ER_REG_XML_H_
00030 #define _ER_REG_XML_H_
00031
00032 #include "erreglog.h"
00033
00034 #include <libermanifest/ermanifest.h>
00035
00036 #include "erregapidefs.h"
00037 #include "erregtypes.h"
00038 #include "erregxsd.h"
00039
00041 #define EL_REGISTRY_ROOT "iLiadRegistry"
00042
00043 #define EL_VERSION "version"
00044 #define EL_USER_PROFILE "userProfile"
00045 #define EL_USER_SETTING "userSetting"
00046
00047 #define EL_PC_PROFILES "pcProfileList"
00048 #define EL_PC_PROFILE "pcProfile"
00049
00050 #define EL_AUTO_CONNECT "autoConnect"
00051 #define EL_BACKGOUND "background"
00052 #define EL_TIMED_IDS "timedIds"
00053 #define EL_ENABLE_TIMEDIDS "enable"
00054 #define EL_TIMESET "timeSet"
00055 #define EL_TIME "time"
00056 #define EL_ENABLE_SWUPDATE "swUpdate"
00057 #define EL_ENABLE_SWITCHOFF "switchOff"
00058
00059 #define EL_CATEGORIES "categories"
00060 #define EL_CATEGORY "category"
00061 #define EL_SORT "sort"
00062
00063 #define EL_LASTREADS "lastReads"
00064 #define EL_LASTREAD "lastRead"
00065
00066 #define EL_APPLICATIONS "applications"
00067 #define EL_APPLICATION "application"
00068 #define EL_SUPPORT_FORMAT "supportFormat"
00069 #define EL_ARG_MASK "argMask"
00070
00071 #define EL_EXTENSION_INFOS "extensionInfos"
00072 #define EL_EXTENSION_INFO "extensionInfo"
00073
00074 #define EL_START_UP "startup"
00075
00076 #define EL_NETWORK_PROFILES "networkProfileList"
00077 #define EL_NETWORK_PROFILE "networkProfile"
00078 #define EL_WLAN_DETAILS "wlanDetails"
00079 #define EL_DIALUP_DETAILS "dialupDetails"
00080 #define EL_IP_STATIC_DETAILS "ipStaticDetails"
00081 #define EL_PROXY_DETAILS "proxyDetails"
00082 #define EL_LAST_CONNECT "lastConnect"
00083
00084 #define EL_TOOLBAR_ICONS "toolbarIcons"
00085 #define EL_TOOLBAR_ICON "toolbarIcon"
00086
00088 #define EL_REGISTRY "registry"
00089
00090 #define EL_NAME "name"
00091 #define EL_EMAIL "email"
00092 #define EL_PASSWORD "password"
00093 #define EL_REDIRECT_URL "redirectUrl"
00094
00095 #define EL_LANGUAGE "language"
00096
00097 #define EL_SOUND "sound"
00098 #define EL_ENABLE "enable"
00099 #define EL_VOLUME "volume"
00100
00101 #define EL_KEY_BUFFERING "keyBuffering"
00102 #define EL_NUMBER_OF_KEYS "numberOfKeys"
00103
00104 #define EL_FLIPBAR_DIRECTION "flipbarDirection"
00105 #define EL_LONG_KP_TIMEOUT "longKeyPressTimeout"
00106
00107 #define EL_PROFILE_NAME "profileName"
00108
00109 #define EL_PC_NAME "pcName"
00110 #define EL_SHARE_NAME "shareName"
00111 #define EL_USER_NAME "userName"
00112 #define EL_WORKGROUP "workgroup"
00113
00114 #define EL_SERVER_TYPE "serverType"
00115 #define EL_INTERVAL "interval"
00116
00117 #define EL_LOCATION "location"
00118 #define EL_SORT_ASCENDING "ascending"
00119 #define EL_SORT_FIELD_TYPE "field"
00120
00121 #define EL_EXPORT_MEMORYTYPE "usbExport"
00122
00123 #define EL_DOCUMENT_PATH "documentPath"
00124 #define EL_MANIFEST_PATH "manifestPath"
00125 #define EL_EXT_NAME "extName"
00126 #define EL_POSITION "position"
00127
00128 #define EL_APP_CATEGORY "appCategory"
00129 #define EL_X_RES_NAME "xResourceName"
00130 #define EL_IPC_CHANNEL "ipcChannel"
00131 #define EL_APP_ICON_PATH "appIconPath"
00132 #define EL_EXECUTE "execute"
00133
00134 #define EL_ASSOCIATE_APP "associateApp"
00135 #define EL_ASSOCIATE_ORDER "associateOrder"
00136 #define EL_EXT_ICON "extIcon"
00137
00138 #define EL_BEHAVIOUR "behaviour"
00139
00140 #define EL_NETWORK_TYPE "networkType"
00141
00142 #define EL_WLAN_SSID "wlanSsid"
00143 #define EL_WLAN_ENCRYPTION_TYPE "wlanEncryptionType"
00144 #define EL_WLAN_ENCRYPTION_KEY "wlanEncryptionKey"
00145 #define EL_WLAN_MODE "wlanMode"
00146 #define EL_WLAN_CHANNEL "wlanChannel"
00147 #define EL_WLAN_BROADCAST "wlanBroadcast"
00148
00149
00150
00151 #define EL_DIALUP_PHONE "dialupPhone"
00152 #define EL_DIALUP_USER "dialupUser"
00153 #define EL_DIALUP_PASSWORD "dialupPassword"
00154
00155 #define EL_USE_DHCP "useDhcp"
00156 #define EL_IP_ADDRESS "ipAddress"
00157 #define EL_IP_NETMASK "ipNetmask"
00158 #define EL_IP_DNS "ipNameServer"
00159 #define EL_IP_GATEWAY "ipGateway"
00160
00161 #define EL_USE_PROXY "useProxy"
00162 #define EL_PROXY_SERVER "server"
00163 #define EL_PROXY_PORT "port"
00164
00165 #define EL_TIMESTAMP "timestamp"
00166
00167 #define EL_PROFILE_CONNECTED_IDS "profileConnectedIDS"
00168 #define EL_PROFILE_CONNECTED_PC "profileConnectedPC"
00169 #define EL_MANUAL_CONNECT_TYPE "manualConnectType"
00170
00171 #define EL_AUTO_CONNECT_WLAN "autoConnectWlan"
00172
00173 #define EL_ICON_BASE_PATH "iconBasePath"
00174 #define EL_ICON_FILE_NAME "iconFileName"
00175
00176 #define EL_ICON_BASE_PATH "iconBasePath"
00177 #define EL_ICON_FILE_NAME "iconFileName"
00178
00180 #define ATTR_PROFILE_ID "profileID"
00181 #define ATTR_TYPE "type"
00182 #define ATTR_NAME "name"
00183 #define ATTR_ID "id"
00184
00186 #define IDS "IDS"
00187 #define PC "PC"
00188
00189
00190 #define SPECIFIC_DOCUMENT "SPECIFIC_DOCUMENT"
00191 #define REFERENCE_MATERIALS "REFERENCE_MATERIALS"
00192 #define LAST_READ_DOCUMENT "LAST_READ_DOCUMENT"
00193 #define RECENT_DOCUMENTS "RECENT_DOCUMENTS"
00194 #define DEVICE_MANAGER "DEVICE_MANAGER"
00195 #define NEWS_FOLDER "NEWS_FOLDER"
00196 #define BOOKS_FOLDER "BOOKS_FOLDER"
00197 #define DOCS_FOLDER "DOCS_FOLDER"
00198 #define NOTES_FOLDER "NOTES_FOLDER"
00199
00200 #define WIRED "WIRED"
00201 #define WIRELESS "WIRELESS"
00202 #define DIALUP "DIALUP"
00203
00204 #define ENCR_NONE "ENCR_NONE"
00205 #define ENCR_WEP "ENCR_WEP"
00206 #define ENCR_WPA "ENCR_WPA"
00207
00208 #define INFRASTRUCTURE "INFRASTRUCTURE"
00209 #define ADHOC "ADHOC"
00210
00212 #define EL_CONFIG_ROOT "iLiadConfig"
00213
00214 #define EL_DEVICE_DETAILS "deviceDetails"
00215 #define EL_SOFTWARE "software"
00216 #define EL_BUILD_NAME "buildName"
00217 #define EL_BUILD_NUM "buildNum"
00218 #define EL_MAC_OF_WIRED "macOfWired"
00219 #define EL_MAC_OF_WIRELESS "macOfWireless"
00220 #define EL_PUBLIC_KEY "publicKey"
00221
00222 #define BUF_LEN 1024
00223
00224 typedef struct
00225 {
00226 char *version;
00227 char *userProfile;
00228 char *userSetting;
00229 char *pcProfiles;
00230 char *pcProfile;
00231 char *autoConnect;
00232 char *category;
00233 char *usbExport;
00234 char *lastRead;
00235 char *application;
00236 char *extensionInfos;
00237 char *extensionInfo;
00238 char *startup;
00239 char *networkProfiles;
00240 char *networkProfile;
00241 char *lastConnect;
00242 char *autoConnectWlan;
00243 char *toolbarIcons;
00244 char *toolbarIcon;
00245 char *deviceDetails;
00246 } xpathList_t;
00247
00248 typedef struct
00249 {
00250 regSection_t section;
00251 gboolean changed;
00252 erManifest xmlCxt;
00253 regSchema_t xsdCxt;
00254 xpathList_t *xpaths;
00255 } regRegistry_t;
00256
00258
00259 #ifdef __cplusplus
00260 extern "C"
00261 {
00262 #endif
00263
00264 gboolean regValidate(regRegistry_t* pRegistry);
00265
00266 regRegistry_t *regParseFiles(const char *szXmlFile, const char *szXsdFile);
00267 gboolean regStore(regRegistry_t* pRegistry, const char *szFilename);
00268 void regDestroy(regRegistry_t *pRegistry);
00269
00270 regVersion_t *regGetVersion(const regRegistry_t *pRegistry);
00271 gboolean regSetVersion(const regVersion_t *theVersion, regRegistry_t *pRegistry);
00272
00273 regUserProfile_t *regGetUserProfile(const regRegistry_t *pRegistry);
00274 gboolean regSetUserProfile(const regUserProfile_t *theUserProfile, regRegistry_t *pRegistry);
00275
00276 regUserSetting_t *regGetUserSetting(const regRegistry_t *pRegistry);
00277 gboolean regSetUserSetting(const regUserSetting_t *theUserSetting, regRegistry_t *pRegistry);
00278
00279 regPCConfig_t *regGetPCConfig(const regRegistry_t *pRegistry);
00280 gboolean regSetPCConfig(const regPCConfig_t *thePCConfig, regRegistry_t *pRegistry);
00281
00282 regPCProfile_t *regGetPCProfile(const char *ID, const regRegistry_t *pRegistry);
00283 gboolean regSetPCProfile(const char *ID, const regPCProfile_t *thePCProfile, regRegistry_t *pRegistry);
00284
00285 gboolean regRemovePCProfile(const char *ID, regRegistry_t *pRegistry);
00286 gboolean regRemovePCConfig(regRegistry_t *pRegistry);
00287
00288 void regGetPCProfiles(regPCConfig_t **pPCConfig, regPCProfile_t *** pPCs, const regRegistry_t* pRegistry);
00289 gboolean regSetPCProfiles(const regPCConfig_t *pPCConfig, const regPCProfile_t **pPCs, regRegistry_t* pRegistry);
00290
00291 regAutoConnect_t *regGetAutoConnect(const regRegistry_t *pRegistry);
00292 gboolean regSetAutoConnect(const regAutoConnect_t *theAutoConnect, regRegistry_t *pRegistry);
00293
00294 regTimedIds_t *regGetTimedIds(const regRegistry_t *pRegistry);
00295 gboolean regSetTimedIds(regTimedIds_t *theTimedIds, regRegistry_t *pRegistry);
00296
00297 regContentCategory_t *regGetContentCategory(const char *ID, const regRegistry_t *pRegistry);
00298 gboolean regSetContentCategory(const char *ID, const regContentCategory_t *theContentCategory, regRegistry_t *pRegistry);
00299
00300 regExportMemType_t *regGetExportMemType(const regRegistry_t *pRegistry);
00301 gboolean regSetExportMemType(const regExportMemType_t *theExportMemType, regRegistry_t *pRegistry);
00302
00303 regLastRead_t *regGetLastRead(const char *ID, regRegistry_t *pRegistry);
00304 gboolean regSetLastRead(const char *ID, const regLastRead_t *theLastRead, regRegistry_t *pRegistry);
00305
00306 regUserAppList_t *regGetUserAppList(const regRegistry_t *pRegistry);
00307 regUserApp_t *regGetUserApp(const char *uaID, const regRegistry_t *pRegistry);
00308 gboolean regSetUserApp(const char *uaID, const regUserApp_t *theUserApp, regRegistry_t *pRegistry);
00309
00310 regExtInfoList_t *regGetExtInfoList(const char *extension, const regRegistry_t * pRegistry);
00311
00312
00313 regStartUp_t *regGetStartUp(const regRegistry_t* pRegistry);
00314 gboolean regSetStartUp(const regStartUp_t* theStartUp, regRegistry_t* pRegistry);
00315
00316 regNetworkConfig_t *regGetNetworkConfig(const regRegistry_t *pRegistry);
00317 gboolean regSetNetworkConfig(const regNetworkConfig_t *theNetworkConfig, regRegistry_t *pRegistry);
00318
00319 regNetworkProfile_t *regGetNetworkProfile(const char *ID, const regRegistry_t *pRegistry);
00320 gboolean regSetNetworkProfile(const char *ID, const regNetworkProfile_t *theNetworkProfile, regRegistry_t *pRegistry);
00321
00322 gboolean regRemoveTimeSet(regRegistry_t *pRegistry);
00323 gboolean regRemoveNetworkProfile(const char *ID, regRegistry_t *pRegistry);
00324 gboolean regRemoveNetworkConfig(regRegistry_t *pRegistry);
00325
00326 void regGetNetworkProfiles(regNetworkConfig_t **pNetworkConfig, regNetworkProfile_t *** pNetworks, const regRegistry_t* pRegistry);
00327 gboolean regSetNetworkProfiles(const regNetworkConfig_t *pNetworkConfig, const regNetworkProfile_t **pNetworks, regRegistry_t* pRegistry);
00328
00329 regLastConnect_t *regGetLastConnect(const regRegistry_t* pRegistry);
00330 gboolean regSetLastConnect(const regLastConnect_t* theLastConnect, regRegistry_t* pRegistry);
00331
00332 gboolean regGetAutoConnectWlan(const regRegistry_t *pRegistry);
00333 gboolean regSetAutoConnectWlan(const gboolean enable, regRegistry_t *pRegistry);
00334
00335 regIconSet_t *regGetIconSet(const regRegistry_t *pRegistry);
00336
00337 deviceDetails_t* regGetDeviceDetails(const regRegistry_t *pRegistry);
00338 gboolean regSetDeviceDetails(const deviceDetails_t* theDeviceDetails, regRegistry_t* pRegistry);
00339
00340 #ifdef __cplusplus
00341 }
00342 #endif
00343
00344 #endif // _ER_REG_XML_H_