Public Member Functions | Static Public Member Functions

cygnal::CRcInitFile Class Reference

#include <crc.h>

Inheritance diagram for cygnal::CRcInitFile:
gnash::RcInitFile gnash::RcInitFile

List of all members.

Public Member Functions

 CRcInitFile ()
 Construct only by getDefaultInstance().
 ~CRcInitFile ()
 Never destroy (TODO: add a destroyDefaultInstance).
bool loadFiles ()
 Load all the configuration files. This includes parsing the default .gnashrc file for Gnash settings that control the swf parser and virtual machine. These setting can be overridden in the .cygnalrc file, plus the Cygnal specific file has options only used by Cygnal.
bool parseFile (const std::string &filespec)
 Parse and load configuration file.
int getPortOffset ()
 Accessors.
void setPortOffset (int x)
int getFDThread ()
 Get the number of file descriptors per thread.
void setFDThread (int x)
 Set the number of file descriptors per thread.
bool getTestingFlag ()
 Get the special testing output option.
void setTestingFlag (bool x)
 Set the special testing output option.
bool getThreadingFlag ()
 Get the flag for whether to enable threading.
void setThreadingFlag (bool x)
 Set the flag for whether to enable threading.
bool getNetDebugFlag () const
 Get the flag for whether to enable internal debugging messages.
void setNetDebugFlag (bool x)
 Set the flag for whether to enable internal debugging messages.
bool getAdminFlag () const
 Get the flag for whether to enable the administration thread.
void setAdminFlag (bool x)
 Set the flag for whether to enable the administration thread.
void setDocumentRoot (const std::string &x)
std::string getDocumentRoot ()
void setCgiRoot (const std::string &x)
std::string getCgiRoot ()
const std::string & getRootCert () const
 Get the Root SSL certificate.
void setRootCert (const std::string &value)
 Set the Root SSL certificate.
const std::string & getCertFile () const
 Get the Client SSL certificate.
void setCertFile (const std::string &value)
 Set the Client SSL certificate.
const std::string & getCertDir () const
 Get the directory for client SSL certificates.
void setCertDir (const std::string &value)
 Set the directory for client SSL certificates.
void dump () const
 Dump the internal data of this class in a human readable form.
void dump (std::ostream &os) const
 Dump the internal data of this class in a human readable form.
 CRcInitFile ()
 Construct only by getDefaultInstance().
 ~CRcInitFile ()
 Never destroy (TODO: add a destroyDefaultInstance).
bool loadFiles ()
 Load all the configuration files. This includes parsing the default .gnashrc file for Gnash settings that control the swf parser and virtual machine. These setting can be overridden in the .cygnalrc file, plus the Cygnal specific file has options only used by Cygnal.
bool parseFile (const std::string &filespec)
 Parse and load configuration file.
int getPortOffset ()
 Accessors.
void setPortOffset (int x)
int getFDThread ()
 Get the number of file descriptors per thread.
void setFDThread (int x)
 Set the number of file descriptors per thread.
bool getTestingFlag ()
 Get the special testing output option.
void setTestingFlag (bool x)
 Set the special testing output option.
bool getThreadingFlag ()
 Get the flag for whether to enable threading.
void setThreadingFlag (bool x)
 Set the flag for whether to enable threading.
bool getNetDebugFlag () const
 Get the flag for whether to enable internal debugging messages.
void setNetDebugFlag (bool x)
 Set the flag for whether to enable internal debugging messages.
bool getAdminFlag () const
 Get the flag for whether to enable the administration thread.
void setAdminFlag (bool x)
 Set the flag for whether to enable the administration thread.
void setDocumentRoot (const std::string &x)
std::string getDocumentRoot ()
void setCgiRoot (const std::string &x)
std::string getCgiRoot ()
const std::string & getRootCert () const
 Get the Root SSL certificate.
void setRootCert (const std::string &value)
 Set the Root SSL certificate.
const std::string & getCertFile () const
 Get the Client SSL certificate.
void setCertFile (const std::string &value)
 Set the Client SSL certificate.
const std::string & getCertDir () const
 Get the directory for client SSL certificates.
void setCertDir (const std::string &value)
 Set the directory for client SSL certificates.
void dump () const
 Dump the internal data of this class in a human readable form.
void dump (std::ostream &os) const

Static Public Member Functions

static CRcInitFilegetDefaultInstance ()
 Return the default instance of RC file,.
static CRcInitFilegetDefaultInstance ()
 Return the default instance of RC file,.

Detailed Description

This class handles reading values from the Cygnal configuration file, .cygnalrc, and into a form we can use in Cygnal.


Constructor & Destructor Documentation

cygnal::CRcInitFile::CRcInitFile (  ) 

Construct only by getDefaultInstance().

References loadFiles().

cygnal::CRcInitFile::~CRcInitFile (  ) 

Never destroy (TODO: add a destroyDefaultInstance).

cygnal::CRcInitFile::CRcInitFile (  ) 

Construct only by getDefaultInstance().

cygnal::CRcInitFile::~CRcInitFile (  ) 

Never destroy (TODO: add a destroyDefaultInstance).


Member Function Documentation

void cygnal::CRcInitFile::dump (  )  const [inline]

Dump the internal data of this class in a human readable form.

Remarks:
This should only be used for debugging purposes.

References dump().

Referenced by dump(), main(), and cygnal::operator<<().

void cygnal::CRcInitFile::dump ( std::ostream &  os  )  const

Dump the internal data of this class in a human readable form.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Remarks:
This should only be used for debugging purposes.

References gnash::RcInitFile::_actionDump, gnash::RcInitFile::_parserDump, gnash::RcInitFile::_verboseASCodingErrors, and gnash::RcInitFile::_verbosity.

void cygnal::CRcInitFile::dump (  )  const [inline]

Dump the internal data of this class in a human readable form.

Remarks:
This should only be used for debugging purposes.

References dump().

Referenced by dump().

void cygnal::CRcInitFile::dump ( std::ostream &  os  )  const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

bool cygnal::CRcInitFile::getAdminFlag (  )  const [inline]

Get the flag for whether to enable the administration thread.

bool cygnal::CRcInitFile::getAdminFlag (  )  const [inline]

Get the flag for whether to enable the administration thread.

Referenced by main().

const std::string& cygnal::CRcInitFile::getCertDir (  )  const [inline]

Get the directory for client SSL certificates.

Reimplemented from gnash::RcInitFile.

const std::string& cygnal::CRcInitFile::getCertDir (  )  const [inline]

Get the directory for client SSL certificates.

Reimplemented from gnash::RcInitFile.

const std::string& cygnal::CRcInitFile::getCertFile (  )  const [inline]

Get the Client SSL certificate.

Reimplemented from gnash::RcInitFile.

const std::string& cygnal::CRcInitFile::getCertFile (  )  const [inline]

Get the Client SSL certificate.

Reimplemented from gnash::RcInitFile.

std::string cygnal::CRcInitFile::getCgiRoot (  )  [inline]

Referenced by connection_handler().

std::string cygnal::CRcInitFile::getCgiRoot (  )  [inline]
CRcInitFile & cygnal::CRcInitFile::getDefaultInstance (  )  [static]

Return the default instance of RC file,.

Reimplemented from gnash::RcInitFile.

static CRcInitFile& cygnal::CRcInitFile::getDefaultInstance (  )  [static]

Return the default instance of RC file,.

Reimplemented from gnash::RcInitFile.

std::string cygnal::CRcInitFile::getDocumentRoot (  )  [inline]
std::string cygnal::CRcInitFile::getDocumentRoot (  )  [inline]

Reimplemented from gnash::RcInitFile.

int cygnal::CRcInitFile::getFDThread (  )  [inline]

Get the number of file descriptors per thread.

int cygnal::CRcInitFile::getFDThread (  )  [inline]

Get the number of file descriptors per thread.

Referenced by connection_handler(), and main().

bool cygnal::CRcInitFile::getNetDebugFlag (  )  const [inline]

Get the flag for whether to enable internal debugging messages.

bool cygnal::CRcInitFile::getNetDebugFlag (  )  const [inline]

Get the flag for whether to enable internal debugging messages.

int cygnal::CRcInitFile::getPortOffset (  )  [inline]

Accessors.

Get the port offset.

Referenced by main().

int cygnal::CRcInitFile::getPortOffset (  )  [inline]

Accessors.

Get the port offset.

const std::string& cygnal::CRcInitFile::getRootCert (  )  const [inline]

Get the Root SSL certificate.

Reimplemented from gnash::RcInitFile.

const std::string& cygnal::CRcInitFile::getRootCert (  )  const [inline]

Get the Root SSL certificate.

Reimplemented from gnash::RcInitFile.

bool cygnal::CRcInitFile::getTestingFlag (  )  [inline]

Get the special testing output option.

Referenced by main().

bool cygnal::CRcInitFile::getTestingFlag (  )  [inline]

Get the special testing output option.

bool cygnal::CRcInitFile::getThreadingFlag (  )  [inline]

Get the flag for whether to enable threading.

bool cygnal::CRcInitFile::getThreadingFlag (  )  [inline]

Get the flag for whether to enable threading.

Referenced by connection_handler(), and main().

bool cygnal::CRcInitFile::loadFiles (  ) 

Load all the configuration files. This includes parsing the default .gnashrc file for Gnash settings that control the swf parser and virtual machine. These setting can be overridden in the .cygnalrc file, plus the Cygnal specific file has options only used by Cygnal.

Reimplemented from gnash::RcInitFile.

References parseFile().

Referenced by CRcInitFile().

bool cygnal::CRcInitFile::loadFiles (  ) 

Load all the configuration files. This includes parsing the default .gnashrc file for Gnash settings that control the swf parser and virtual machine. These setting can be overridden in the .cygnalrc file, plus the Cygnal specific file has options only used by Cygnal.

Reimplemented from gnash::RcInitFile.

bool cygnal::CRcInitFile::parseFile ( const std::string &  filespec  ) 

Parse and load configuration file.

Parameters:
filespec The path and file name of the disk file to parse.
Returns:
True if the file was parsed sucessfully, false if not.
Parameters:
filespec The path and file name of the disk file to parse.
Returns:
True if the file was parsed successfully, false if not.

Reimplemented from gnash::RcInitFile.

References _, gnash::RcInitFile::expandPath(), gnash::RcInitFile::extractNumber(), gnash::RcInitFile::extractSetting(), name, position, setAdminFlag(), setCgiRoot(), gnash::RcInitFile::setDebugLog(), setDocumentRoot(), setFDThread(), setNetDebugFlag(), setPortOffset(), setTestingFlag(), setThreadingFlag(), gnash::RcInitFile::useActionDump(), gnash::RcInitFile::useParserDump(), and gnash::RcInitFile::verbosityLevel().

Referenced by loadFiles(), and main().

bool cygnal::CRcInitFile::parseFile ( const std::string &  filespec  ) 

Parse and load configuration file.

Parameters:
filespec The path and file name of the disk file to parse.
Returns:
True if the file was parsed successfully, false if not.

Reimplemented from gnash::RcInitFile.

void cygnal::CRcInitFile::setAdminFlag ( bool  x  )  [inline]

Set the flag for whether to enable the administration thread.

void cygnal::CRcInitFile::setAdminFlag ( bool  x  )  [inline]

Set the flag for whether to enable the administration thread.

Referenced by parseFile().

void cygnal::CRcInitFile::setCertDir ( const std::string &  value  )  [inline]

Set the directory for client SSL certificates.

Reimplemented from gnash::RcInitFile.

void cygnal::CRcInitFile::setCertDir ( const std::string &  value  )  [inline]

Set the directory for client SSL certificates.

Reimplemented from gnash::RcInitFile.

void cygnal::CRcInitFile::setCertFile ( const std::string &  value  )  [inline]

Set the Client SSL certificate.

Reimplemented from gnash::RcInitFile.

void cygnal::CRcInitFile::setCertFile ( const std::string &  value  )  [inline]

Set the Client SSL certificate.

Reimplemented from gnash::RcInitFile.

void cygnal::CRcInitFile::setCgiRoot ( const std::string &  x  )  [inline]

Referenced by parseFile().

void cygnal::CRcInitFile::setCgiRoot ( const std::string &  x  )  [inline]
void cygnal::CRcInitFile::setDocumentRoot ( const std::string &  x  )  [inline]

Reimplemented from gnash::RcInitFile.

Referenced by main(), and parseFile().

void cygnal::CRcInitFile::setDocumentRoot ( const std::string &  x  )  [inline]

Reimplemented from gnash::RcInitFile.

void cygnal::CRcInitFile::setFDThread ( int  x  )  [inline]

Set the number of file descriptors per thread.

void cygnal::CRcInitFile::setFDThread ( int  x  )  [inline]

Set the number of file descriptors per thread.

Referenced by parseFile().

void cygnal::CRcInitFile::setNetDebugFlag ( bool  x  )  [inline]

Set the flag for whether to enable internal debugging messages.

Referenced by parseFile().

void cygnal::CRcInitFile::setNetDebugFlag ( bool  x  )  [inline]

Set the flag for whether to enable internal debugging messages.

void cygnal::CRcInitFile::setPortOffset ( int  x  )  [inline]
void cygnal::CRcInitFile::setPortOffset ( int  x  )  [inline]

Referenced by main(), and parseFile().

void cygnal::CRcInitFile::setRootCert ( const std::string &  value  )  [inline]

Set the Root SSL certificate.

Reimplemented from gnash::RcInitFile.

void cygnal::CRcInitFile::setRootCert ( const std::string &  value  )  [inline]

Set the Root SSL certificate.

Reimplemented from gnash::RcInitFile.

void cygnal::CRcInitFile::setTestingFlag ( bool  x  )  [inline]

Set the special testing output option.

Referenced by main(), and parseFile().

void cygnal::CRcInitFile::setTestingFlag ( bool  x  )  [inline]

Set the special testing output option.

void cygnal::CRcInitFile::setThreadingFlag ( bool  x  )  [inline]

Set the flag for whether to enable threading.

void cygnal::CRcInitFile::setThreadingFlag ( bool  x  )  [inline]

Set the flag for whether to enable threading.

Referenced by main(), and parseFile().


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