Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

Vhost Class Reference

List of all members.

Public Member Functions

u_long accessesLogRequestAccess (int id)
u_long accessesLogTerminateAccess (int id)
int accessesLogWrite (const char *)
void addHost (const char *, int)
void addIP (const char *, int)
void addRef ()
int areAllHostAllowed ()
int areAllIPAllowed ()
void clearHostList ()
void clearIPList ()
int freeHashedData ()
int freeSSL ()
void generateRsaKey ()
LogManagergetAccessesLog ()
FilegetAccessesLogFile ()
const char * getAccessesLogFileName ()
const char * getAccessLogOpt ()
int getDefaultPriority ()
const string & getDocumentRoot ()
const char * getHashedData (const char *name)
list< StringRegex * > * getHostList ()
list< StringRegex * > * getIpList ()
int getMaxLogSize ()
MimeManagergetMIME ()
const char * getName ()
NULL_REFERENCECB getNullRefCB ()
u_short getPort ()
VhostProtocolDatagetProtocolData ()
const char * getProtocolName ()
int getRef ()
SSL_CTX * getSSLContext ()
const string & getSystemRoot ()
u_long getThrottlingRate ()
SslContextgetVhostSSLContext ()
const char * getWarningLogOpt ()
LogManagergetWarningsLog ()
FilegetWarningsLogFile ()
const char * getWarningsLogFileName ()
int initializeSSL ()
int isHostAllowed (const char *)
int isIPAllowed (const char *)
int isMIME ()
int openLogFiles (u_long maxlogSize=0)
void removeHost (const char *)
void removeIP (const char *)
void removeRef ()
void setAccessesLogFileName (const char *n)
void setAccessLogOpt (const char *c)
void setDefaultPriority (int priority)
void setDocumentRoot (const char *n)
void setMaxLogSize (int)
void setName (const char *c)
void setNullRefCB (NULL_REFERENCECB)
void setPort (u_short p)
void setProtocolData (VhostProtocolData *data)
void setProtocolName (const char *name)
void setRef (int)
void setSystemRoot (const char *n)
void setThrottlingRate (u_long tr)
void setWarningLogOpt (const char *c)
void setWarningsLogFileName (const char *n)
 Vhost ()
u_long warningsLogRequestAccess (int id)
u_long warningsLogTerminateAccess (int id)
int warningsLogWrite (const char *)
 ~Vhost ()

Private Attributes

LogManager accessesLogFile
string accessesLogFileName
string accessLogOpt
int defaultPriority
string documentRoot
HashMap< string, string * > hashedData
list< StringRegex * > hostList
list< StringRegex * > ipList
MimeManager mimeManager
string name
NULL_REFERENCECB nullReferenceCb
u_short port
VhostProtocolDataprotocolData
string protocolName
int refCount
Mutex refMutex
SslContext sslContext
string systemRoot
u_long throttlingRate
string warningLogOpt
LogManager warningsLogFile
string warningsLogFileName

Friends

class VhostManager

Constructor & Destructor Documentation

Vhost::Vhost  ) 
 

vhost costructor

Vhost::~Vhost  ) 
 

Destroy the vhost.


Member Function Documentation

u_long Vhost::accessesLogRequestAccess int  id  ) 
 

Here threads get the permission to use the access log file.

Parameters:
id The caller thread ID.

u_long Vhost::accessesLogTerminateAccess int  id  ) 
 

Here threads release the permission to use the access log file.

Parameters:
id The caller thread ID.

int Vhost::accessesLogWrite const char *  str  ) 
 

Write to the accesses log file.

Parameters:
str The line to log.

void Vhost::addHost const char *  host,
int  isRegex
 

Add an host to the allowed host list.

Parameters:
host hostname to add.
isRegex Is the host a regex?

void Vhost::addIP const char *  ip,
int  isRegex
 

Add an IP address to the list.

Parameters:
ip The ip to add.

void Vhost::addRef  ) 
 

Increment current references counter by 1.

int Vhost::areAllHostAllowed  ) 
 

Check if all the host are allowed to the connection.

int Vhost::areAllIPAllowed  ) 
 

Check if all the IPs are allowed to the connection.

void Vhost::clearHostList  ) 
 

Clear the list of the hosts.

void Vhost::clearIPList  ) 
 

Clear the list of IPs.

int Vhost::freeHashedData  ) 
 

Clear the data dictionary.

int Vhost::freeSSL  ) 
 

Clear SSL things.

void Vhost::generateRsaKey  ) 
 

Generate the RSA key for the SSL context.

LogManager * Vhost::getAccessesLog  ) 
 

Get the log object for the accesses.

File * Vhost::getAccessesLogFile  ) 
 

Return a pointer to the file used by the accesses log.

const char* Vhost::getAccessesLogFileName  ) 
 

Get the accesses log file name.

const char* Vhost::getAccessLogOpt  ) 
 

Get the access log file options.

int Vhost::getDefaultPriority  ) 
 

const string& Vhost::getDocumentRoot  ) 
 

Get the document root.

const char * Vhost::getHashedData const char *  name  ) 
 

Get the value for name in the hash dictionary. If the data is not present it tries to get it from the Server class.

Parameters:
name The key of the hashed entry.

list<StringRegex*>* Vhost::getHostList  ) 
 

Get the list of hosts allowed.

list<StringRegex*>* Vhost::getIpList  ) 
 

List of IPs allowed by the vhost.

int Vhost::getMaxLogSize  ) 
 

Get the max size of the log files. Return 0 on success.

MimeManager * Vhost::getMIME  ) 
 

Get the MIME manager for the virtual host.

const char* Vhost::getName  ) 
 

Get the host name.

NULL_REFERENCECB Vhost::getNullRefCB  ) 
 

Get the null reference callback function used by the virtual host.

u_short Vhost::getPort  ) 
 

Return the port used by the host.

VhostProtocolData* Vhost::getProtocolData  ) 
 

Get the protocol data.

const char* Vhost::getProtocolName  ) 
 

Get the protocol name for the virtual host.

int Vhost::getRef  ) 
 

Get the references counter.

SSL_CTX * Vhost::getSSLContext  ) 
 

Get the SSL context.

const string& Vhost::getSystemRoot  ) 
 

Get the system root.

u_long Vhost::getThrottlingRate  ) 
 

Get the throttling rate for the virtual host.

SslContext* Vhost::getVhostSSLContext  ) 
 

Get a pointer to the vhost SSL context.

const char* Vhost::getWarningLogOpt  ) 
 

Get the warnings log file options.

LogManager * Vhost::getWarningsLog  ) 
 

Get the log object for the warnings.

File * Vhost::getWarningsLogFile  ) 
 

Return a pointer to the file used by the warnings log.

const char* Vhost::getWarningsLogFileName  ) 
 

Get the warnings log file name.

int Vhost::initializeSSL  ) 
 

Initialize SSL things.

int Vhost::isHostAllowed const char *  host  ) 
 

Check if an host is allowed to the connection

Parameters:
host hostname to check.

int Vhost::isIPAllowed const char *  ip  ) 
 

Check if the network is allowed to the connection(control the network by the local IP).

Parameters:
ip The IP to check.

int Vhost::isMIME  ) 
 

Check if a MIME type file is defined for the virtual host.

int Vhost::openLogFiles u_long  maxlogSize = 0  ) 
 

Open the log files for the virtual hosts.

Parameters:
maxLogSize Define a max log size for the opened files.

void Vhost::removeHost const char *  host  ) 
 

Remove the host address to the list.

Parameters:
host The hostname to remove.

void Vhost::removeIP const char *  ip  ) 
 

Remove the IP address to the list.

Parameters:
ip The ip to remove.

void Vhost::removeRef  ) 
 

Decrement current references counter by 1.

void Vhost::setAccessesLogFileName const char *  n  ) 
 

Set the accesses log file name.

void Vhost::setAccessLogOpt const char *  c  ) 
 

Set the access log file options.

void Vhost::setDefaultPriority int  priority  ) 
 

void Vhost::setDocumentRoot const char *  n  ) 
 

Set the document root.

void Vhost::setMaxLogSize int  newSize  ) 
 

Set the max size of the log files.

Parameters:
newSize The new max dimension to use for the warning log files.

void Vhost::setName const char *  c  ) 
 

Set the host name.

void Vhost::setNullRefCB NULL_REFERENCECB  cb  ) 
 

Set the null reference callback function. It is called when the reference counter for the virtual host is zero.

Parameters:
cb The null references callback function.

void Vhost::setPort u_short  p  ) 
 

Set the port used by the host.

void Vhost::setProtocolData VhostProtocolData data  ) 
 

Set the protocol data.

void Vhost::setProtocolName const char *  name  ) 
 

Set the protocol name for the virtual host.

void Vhost::setRef int  n  ) 
 

Set the reference counter for the virtual host.

Parameters:
n The new reference counter.

void Vhost::setSystemRoot const char *  n  ) 
 

Set the system root.

void Vhost::setThrottlingRate u_long  tr  ) 
 

Set the throttling rate for the virtual host.

void Vhost::setWarningLogOpt const char *  c  ) 
 

Set the warnings log file options.

void Vhost::setWarningsLogFileName const char *  n  ) 
 

Set the warnings log file name.

u_long Vhost::warningsLogRequestAccess int  id  ) 
 

Here threads get the permission to use the warnings log file.

Parameters:
id The caller thread ID.

u_long Vhost::warningsLogTerminateAccess int  id  ) 
 

Here threads release the permission to use the warnings log file.

Parameters:
id The caller thread ID.

int Vhost::warningsLogWrite const char *  str  ) 
 

Write a line to the warnings log file.

Parameters:
str The line to log.


Friends And Related Function Documentation

friend class VhostManager [friend]
 


Member Data Documentation

LogManager Vhost::accessesLogFile [private]
 

string Vhost::accessesLogFileName [private]
 

Path to the accesses log file.

string Vhost::accessLogOpt [private]
 

Additional data for log files. Defined in configuration files.

int Vhost::defaultPriority [private]
 

The default priority for the connections scheduler.

string Vhost::documentRoot [private]
 

Path to the document root.

HashMap<string, string*> Vhost::hashedData [private]
 

list<StringRegex*> Vhost::hostList [private]
 

List of hosts allowed by the vhost.

list<StringRegex*> Vhost::ipList [private]
 

List of IPs allowed by the vhost.

MimeManager Vhost::mimeManager [private]
 

string Vhost::name [private]
 

Description or name of the virtual host.

NULL_REFERENCECB Vhost::nullReferenceCb [private]
 

u_short Vhost::port [private]
 

TCP port used to listen on.

VhostProtocolData* Vhost::protocolData [private]
 

string Vhost::protocolName [private]
 

Protocol used by the vhost.

int Vhost::refCount [private]
 

How many connections are using this virtual host?

Mutex Vhost::refMutex [private]
 

SslContext Vhost::sslContext [private]
 

SSL context.

string Vhost::systemRoot [private]
 

Path to the system root.

u_long Vhost::throttlingRate [private]
 

Throttling rate to use with the virtual host.

string Vhost::warningLogOpt [private]
 

LogManager Vhost::warningsLogFile [private]
 

string Vhost::warningsLogFileName [private]
 

Path to the warnings log file.


Generated on Mon Jun 16 13:47:21 2008 for MyServer by  doxygen 1.3.9.1