20 #ifndef __UPDATERCONFIG_H__    21 #define __UPDATERCONFIG_H__    23 #include <csutil/csstring.h>    24 #include <cstool/initapp.h>    25 #include <csutil/cfgmgr.h>    26 #include <csutil/cfgfile.h>    27 #include <iutil/document.h>    31 #define CONFIG_FILENAME "/this/pslaunch.cfg"    32 #define UPDATERINFO_FILENAME "/planeshift/userdata/updaterinfo.xml"    33 #define UPDATERINFO_CURRENT_FILENAME "/this/updaterinfo.xml"    34 #define INTEGRITY_ZIPNAME "/this/integrity.zip"    35 #define SERVERS_FILENAME "/planeshift/userdata/updateservers.xml"    36 #define SERVERS_CURRENT_FILENAME "/this/updateservers.xml"    37 #define UPDATE_CACHE_DIR "/planeshift/userdata/updatecache"    38 #define FALLBACK_SERVER "http://www.planeshift.it/"   106     void SetMD5Sum(
const char* md5sum) { this->md5sum = md5sum; }
   117     csString genericmd5sum;
   136     Mirror* GetMirror(uint mirrorNumber);
   137     csArray<Mirror> GetRepairMirrors();
   161     bool LoadMirrors(iDocumentNode* node);
   171     const char* GetPlatform() 
const;
   200     float updaterVersionLatest;
   203     unsigned int updaterVersionLatestMajor;
   206     unsigned int updaterVersionLatestMinor;
   209     csString updaterVersionLatestMD5;
   212     csRefArray<Mirror> mirrors;
   215     csRefArray<ClientVersion> clientVersions;
   224     UpdaterConfig(csStringArray& args, iObjectRegistry* _object_reg, iVFS* _vfs);
   336     static iObjectRegistry* object_reg;
   339     csRef<iConfigManager> configManager;
   342     csRef<iConfigFile> configFile;
   354 #endif // __UPDATERCONFIG_H__ const char * GetBaseURL() const 
 
bool IsRepair() const 
Returns if the server is a server supporting repair. 
 
Proxy GetProxy()
Returns the proxy struct. 
 
const char * GetNewMirrorAddress() const 
Returns the new mirror address. 
 
void SetName(const char *name)
 
iConfigFile * GetConfigFile() const 
Returns the configfile for the app. 
 
bool WasCleanUpdate() const 
Returns true if the last update was successful. 
 
csRefArray< ClientVersion > & GetClientVersions()
Get clientVersions list. 
 
const char * GetName() const 
 
void SetGenericMD5Sum(const char *genericmd5sum)
 
bool IsUpdateEnabled() const 
True if we want to use the updater. 
 
Holds an updater configuration file. 
 
bool SwitchMirror() const 
Returns true if a mirror switch needs to be done. 
 
unsigned int GetUpdaterVersionLatestMajor() const 
Get latest updater major version. 
 
const char * GetGenericMD5Sum() const 
 
void SetName(const char *name)
 
bool RepairFailed() const 
Returns true if we want to perform a repair when files fail after an update. 
 
bool CheckForIntegrity() const 
Returns true if a integrity check (repair) needs to be done. 
 
void SetBaseURL(const char *baseURL)
 
void SetMD5Sum(const char *md5sum)
 
bool repair
Holds if this is a repair server. 
 
const char * GetMD5Sum() const 
 
const char * GetName() const 
 
bool KeepingRepaired() const 
Returns true if we want a repair to keep the old file (*.bak). 
 
const char * GetGeneric() const 
 
void void Initialize(iObjectRegistry *object_reg)
 
void SetBaseURL(csString url)
 
float GetUpdaterVersionLatest() const 
Get latest updater version. 
 
unsigned int GetUpdaterVersionLatestMinor() const 
Get latest updater minor version. 
 
bool IsActive() const 
Get whether the updater mirror is active. 
 
const char * GetUpdaterVersionLatestMD5() const 
Get latest updater version md5sum. 
 
void SetIsRepair(const bool repair)
Sets if the current server supports repair. 
 
bool RepairingInZip() const 
Returns true if we want to do in-zip repairs. 
 
int IsSelfUpdating() const 
Returns true if the updater is self updating. 
 
bool UpdatePlatform() const 
Returns true if we want the updater to update platform specific files. 
 
void SetSelfUpdating(bool t)
 
unsigned int GetID() const 
 
Config * GetCurrentConfig() const 
Returns the current/old config from updaterinfo.xml. 
 
Config * GetNewConfig() const 
Returns the new/downloaded config from updaterinfo.xml. 
 
csRefArray< Mirror > & GetMirrors()
Get mirrors.