Planeshift
Public Member Functions

Config Class Reference

Holds an updater configuration file. More...

#include <updaterconfig.h>

List of all members.

Public Member Functions

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

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: