Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Config Class Reference

#include <MNConfig.h>

List of all members.

Public Types

enum  Mode { Client, Proxy, Server, TestCachingProxy }
enum  DataPumpType {
  DataPumpUndefined = -1, MNStreamer = 1, VCStreamer, NopStreamer,
  MNDummyStreamer, SlaveDataPump
}
enum  ServerEmulationPopularity { ServerEmulationPopularityUndefined = -1, Cyclic, Zipf, Unified }
enum  ClientEmulationIPattern { ClientEmulationIPatternUndefined = -1, Constant, Poisson }

Public Member Functions

 Config (int argc, char *argv[])
 Config (const char *type)
 Config ()
 ~Config ()
bool GetPRINT_INFO (const char *filename)
bool GetPRINT_WARN (const char *filename)
bool GetPRINT_ERROR (const char *filename)
const MNStringGetCONTENTROOT ()
const MNStringGetMCAST_IF ()
const MNStringGetCACHE_DIR () const
const MNStringGetCACHE_STRATEGY ()
const MNStringGetRTSP_EOL () const
 make this fast
const MNStringGetSDP_EOL () const
 make this fast
bool GetUSE_RTSP_PROXY () const
const MNStringGetRTSP_PROXY_NAME () const
int GetRTSP_PROXY_PORT () const
int GetRTSP_SERVER_PORT () const
int GetCLIENT_BANDWIDTH () const
bool GetCLIENT_DESTINATION () const
const DataPumpGetVS () const
const ServerEmulationGetServerEmulation () const
const ClientEmulationGetClientEmulation () const
int GetCACHE_SPACE () const
Mode GetMODE () const
bool GetPATCHING_MODE () const
bool GetCACHING_MODE () const
bool GetREFLECTION_MODE () const
const GuiGetGUI () const
bool GetTFRC_REPLY () const
bool GetRTP_TCP () const
bool GetHasClientLoopbackPort () const
int GetClientLoopbackPort () const
bool GetHasClientUrl () const
const char * GetClientUrl () const
bool GetHasLogfile () const
const char * GetLogfile () const
void ExitWithUsage (const char *comment)
const bool getUseTranscoding (const string clientName="") const
const string getTransLib (const string clientName, const SDP::PayloadTypes pt) const
const int getScreenWidth (const string clientName) const
const int getScreenHeight (const string clientName) const
bool getUseDynReflection ()
const char * getDynReflectionRepositioningMode ()
int getTimeThreshold ()

Static Public Member Functions

DataPumpType translateDataPumpType (const char *e)
ClientEmulationIPattern translateCEP (const char *e)
ServerEmulationPopularity translateSEP (const char *e)

Friends

ostream & operator<< (ostream &ostr, DataPumpType t)


Detailed Description

The Config class provides configuration functions to all executables that are part of Komssys. The class can be instantiated as often as necessary, also if just one configuration variable is read in the instantiation context. This is supposed to be cheap aften the first instantiation because the class contains only static variables and requires only a short check whether it has been instiated once. The first that it is instantiated, the constructor that takes the standard Unix argument names argc and argv to evaluation the command line. Furthermore, the configuration file is parsed and the configuration values are cached. Since several executables use the same configuration class and the same configuration file, this requires several choices: The configuration file has an XML-like syntax that is described in more detail in Configuration.


Member Enumeration Documentation

enum Config::ClientEmulationIPattern
 

Enumeration values:
ClientEmulationIPatternUndefined 
Constant 
Poisson 

enum Config::DataPumpType
 

Enumeration values:
DataPumpUndefined 
MNStreamer 
VCStreamer 
NopStreamer 
MNDummyStreamer 
SlaveDataPump 

enum Config::Mode
 

Enumeration values:
Client 
Proxy 
Server 
TestCachingProxy 

enum Config::ServerEmulationPopularity
 

Enumeration values:
ServerEmulationPopularityUndefined 
Cyclic 
Zipf 
Unified 


Constructor & Destructor Documentation

Config::Config int  argc,
char *  argv[]
 

First time around Config needs the command line arguments to figure out whether client, proxy or server are running. The argc/argv constructor is used for the regular programs but it may not be useful for test code.

Config::Config const char *  type  ) 
 

A constructor for test code. Use the type parameter to determine whether you want to parse the client, proxy or server section of your configuration file.

Config::Config  ) 
 

Config::~Config  ) 
 


Member Function Documentation

void Config::ExitWithUsage const char *  comment  ) 
 

const MNString& Config::GetCACHE_DIR  )  const
 

int Config::GetCACHE_SPACE  )  const
 

The upper limit of disk space to reserve for caching in megabytes.

const MNString& Config::GetCACHE_STRATEGY  ) 
 

bool Config::GetCACHING_MODE  )  const
 

int Config::GetCLIENT_BANDWIDTH  )  const
 

bool Config::GetCLIENT_DESTINATION  )  const
 

Should the client send the destination field? This is overridden if the server is a real server. A real server will never get the destination field in the RTSP header's Transport line.

const ClientEmulation& Config::GetClientEmulation  )  const
 

int Config::GetClientLoopbackPort  )  const
 

const char* Config::GetClientUrl  )  const
 

const MNString& Config::GetCONTENTROOT  ) 
 

const char* Config::getDynReflectionRepositioningMode  ) 
 

const Gui& Config::GetGUI  )  const
 

Access the collection of GUI settings. The individual settings are kept in the Config::Gui structure for better overview.

bool Config::GetHasClientLoopbackPort  )  const
 

bool Config::GetHasClientUrl  )  const
 

bool Config::GetHasLogfile  )  const
 

const char* Config::GetLogfile  )  const
 

const MNString& Config::GetMCAST_IF  ) 
 

Mode Config::GetMODE  )  const
 

This function is a more basic Get function than most others because its value must be known before the configuration file has been read. It determines whether the configuration file is read as that of a client, proxy, server, or perhaps a test configuraition.

bool Config::GetPATCHING_MODE  )  const
 

bool Config::GetPRINT_ERROR const char *  filename  ) 
 

bool Config::GetPRINT_INFO const char *  filename  ) 
 

bool Config::GetPRINT_WARN const char *  filename  ) 
 

bool Config::GetREFLECTION_MODE  )  const
 

bool Config::GetRTP_TCP  )  const
 

const MNString& Config::GetRTSP_EOL  )  const
 

make this fast

const MNString& Config::GetRTSP_PROXY_NAME  )  const
 

int Config::GetRTSP_PROXY_PORT  )  const
 

int Config::GetRTSP_SERVER_PORT  )  const
 

const int Config::getScreenHeight const string  clientName  )  const
 

const int Config::getScreenWidth const string  clientName  )  const
 

const MNString& Config::GetSDP_EOL  )  const
 

make this fast

const ServerEmulation& Config::GetServerEmulation  )  const
 

bool Config::GetTFRC_REPLY  )  const
 

int Config::getTimeThreshold  ) 
 

const string Config::getTransLib const string  clientName,
const SDP::PayloadTypes  pt
const
 

bool Config::GetUSE_RTSP_PROXY  )  const
 

bool Config::getUseDynReflection  ) 
 

const bool Config::getUseTranscoding const string  clientName = ""  )  const
 

Access the collection of transcoding-settings. The settings are kept in the structure Config::Transcoding. added by Jens Zechlin

const DataPump& Config::GetVS  )  const
 

Access the collection of video server data pump settings. The individual settings are kept in the Config::DataPump structure for better overview.

ClientEmulationIPattern Config::translateCEP const char *  e  )  [static]
 

DataPumpType Config::translateDataPumpType const char *  e  )  [static]
 

Several keywords are allowed to specify the preferred data pump type in the server and proxy. These keywords can be given in the configuration file and also on the command line. This functions translates the keywords into the internal enum value that is much easier to handle. If the value is not legal, MNSTREAMER will be used as defaut.

ServerEmulationPopularity Config::translateSEP const char *  e  )  [static]
 


Friends And Related Function Documentation

ostream& operator<< ostream &  ostr,
DataPumpType  t
[friend]
 

Write the name of the enum value DataPumpType to the ostream


The documentation for this class was generated from the following file:
Generated on Sun Mar 6 13:35:51 2005 for Komssys by doxygen 1.3.8