Planeshift
Config Class Reference

Holds an updater configuration file. More...

#include <updaterconfig.h>

Public Member Functions

 Config ()
 
csRefArray< ClientVersion > & GetClientVersions ()
 Get clientVersions list. More...
 
const char * GetGeneric () const
 
MirrorGetMirror (uint mirrorNumber)
 
csRefArray< Mirror > & GetMirrors ()
 Get mirrors. More...
 
const char * GetPlatform () const
 Get our platform string. More...
 
csArray< MirrorGetRepairMirrors ()
 
float GetUpdaterVersionLatest () const
 Get latest updater version. More...
 
unsigned int GetUpdaterVersionLatestMajor () const
 Get latest updater major version. More...
 
const char * GetUpdaterVersionLatestMD5 () const
 Get latest updater version md5sum. More...
 
unsigned int GetUpdaterVersionLatestMinor () const
 Get latest updater minor version. More...
 
bool Initialize (iDocumentNode *node)
 Init a xml config file. More...
 
bool IsActive () const
 Get whether the updater mirror is active. More...
 
bool LoadMirrors (iDocumentNode *node)
 Loads mirrors from an xml formatted entry. More...
 

Detailed Description

Holds an updater configuration file.

Definition at line 131 of file updaterconfig.h.

Constructor & Destructor Documentation

Config::Config ( )

Member Function Documentation

csRefArray<ClientVersion>& Config::GetClientVersions ( )
inline

Get clientVersions list.

Definition at line 147 of file updaterconfig.h.

const char* Config::GetGeneric ( ) const
inline

Definition at line 173 of file updaterconfig.h.

Mirror* Config::GetMirror ( uint  mirrorNumber)
csRefArray<Mirror>& Config::GetMirrors ( )
inline

Get mirrors.

Definition at line 142 of file updaterconfig.h.

const char* Config::GetPlatform ( ) const

Get our platform string.

csArray<Mirror> Config::GetRepairMirrors ( )
float Config::GetUpdaterVersionLatest ( ) const
inline

Get latest updater version.

Definition at line 178 of file updaterconfig.h.

unsigned int Config::GetUpdaterVersionLatestMajor ( ) const
inline

Get latest updater major version.

Returns
An unsigned int with the major version

Definition at line 184 of file updaterconfig.h.

const char* Config::GetUpdaterVersionLatestMD5 ( ) const
inline

Get latest updater version md5sum.

Definition at line 193 of file updaterconfig.h.

unsigned int Config::GetUpdaterVersionLatestMinor ( ) const
inline

Get latest updater minor version.

Returns
An unsigned int with the minor version

Definition at line 190 of file updaterconfig.h.

bool Config::Initialize ( iDocumentNode *  node)

Init a xml config file.

bool Config::IsActive ( ) const
inline

Get whether the updater mirror is active.

Definition at line 196 of file updaterconfig.h.

bool Config::LoadMirrors ( iDocumentNode *  node)

Loads mirrors from an xml formatted entry.

Eg:

 <mirrors>
     <mirror id="1" name="Mirror1" url="http://www.mirror1.com/updaterdir" />
     <mirror id="2" name="Mirror2" url="http://www.mirror2.com/updaterdir" />
 </mirrors>
Parameters
nodeThe reference to the main node of an xml document containing the mirror list.
Returns
FALSE if the mirrors entry was not found or no mirrors were added during the parsing.

The documentation for this class was generated from the following file: