CVSConfig Class Reference

CVSConfig class: Contains and manages entries of config file. More...

#include <CVSConfig.h>

List of all members.

Public Member Functions

 CVSConfig (Glib::ustring &)
 Constructor.
 ~CVSConfig ()
 Destructor.
Glib::ustring getCfgFile (void)
 Returns the config file.
int newConfigFile (Glib::ustring &)
 Set new config file.
Glib::ustring getServerName (void)
 Return name of server.
int newServerName (Glib::ustring &)
 Set new server name.
repoDatagetReposData (unsigned int &)
 Return repository data.

Private Member Functions

int initConfig (void)
 Initialize configuration data.
int loadConfig (void)
 (Re-)Load the configuration

Private Attributes

Parserm_cvsParser
 Parser to actually read the configuration file.
Glib::ustring m_configFile
 Filename of CVSNT configuration file.
Glib::ustring m_serverName
 Name of server (for mDNS publishing) as given by the user.
unsigned int m_numRepos
 Number of repositories in config file.
repoDatam_repositories
 Data about all defined repositories.


Detailed Description

CVSConfig class: Contains and manages entries of config file.

This class contains all entries


Constructor & Destructor Documentation

CVSConfig::CVSConfig ( Glib::ustring &  cfgFile  ) 

Constructor.

The constructor for the configuration class. It exspects a CVSNT configuration file

Parameters:
[in] cfgFile Configuration file

CVSConfig::~CVSConfig (  ) 

Destructor.

The destructor cleans up the used memory


Member Function Documentation

int CVSConfig::initConfig ( void   )  [private]

Initialize configuration data.

This function initializes all configuration data of the class and therefore also for the given file

Return values:
NO_ERROR Successfully initialized

int CVSConfig::loadConfig ( void   )  [private]

(Re-)Load the configuration

This function loads or reloads a configuration from a given file

Return values:
NO_ERROR Configuration successfully loaded
COULD_NOT_OPEN_FILE The configuration file could not be opened for whatever reason

Todo:
Error message in case it does not exist

Todo:
Error message in case it does not exist

Glib::ustring CVSConfig::getCfgFile ( void   ) 

Returns the config file.

This function returnes the filename of the current configuration file

Returns:
Config filename

int CVSConfig::newConfigFile ( Glib::ustring &  cfgFile  ) 

Set new config file.

Set filename for new configuration file

Return values:
NO_ERROR Configuration filename successfully set
Remarks:
The new configuration will be loaded
See also:
loadConfig

Glib::ustring CVSConfig::getServerName ( void   ) 

Return name of server.

This method returns the name of the server that is published via mDNS together with the published repositories. It is either the name provided in the configuration file or (if not specified) the hostname

Returns:
Servername for publishing

int CVSConfig::newServerName ( Glib::ustring &  newSrvName  ) 

Set new server name.

This method sets the new server name (from the UI)

Parameters:
[in] newSrvName Name of the server
Return values:
NO_ERROR New server name successfully set

repoData * CVSConfig::getReposData ( unsigned int &  nRepos  ) 

Return repository data.

This method returns the repository data. The returned value is a pointer to an array of structs. The function parameter contains the number of entries in the array

Parameters:
[out] nRepos Number of repositories in returned array
Returns:
Pointer/Array of repository data structs


Member Data Documentation

Parser* CVSConfig::m_cvsParser [private]

Parser to actually read the configuration file.

Glib::ustring CVSConfig::m_configFile [private]

Filename of CVSNT configuration file.

Glib::ustring CVSConfig::m_serverName [private]

Name of server (for mDNS publishing) as given by the user.

unsigned int CVSConfig::m_numRepos [private]

Number of repositories in config file.

repoData* CVSConfig::m_repositories [private]

Data about all defined repositories.


The documentation for this class was generated from the following files:
Generated on Sun Aug 19 10:06:09 2007 for cvsntLCP by  doxygen 1.5.3