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

ControlProtocol Class Reference

Inheritance diagram for ControlProtocol:

Protocol List of all members.

Public Member Functions

int controlConnection (ConnectionPtr a, char *b1, char *b2, int bs1, int bs2, u_long nbtr, u_long id)
 ControlProtocol ()
virtual int loadProtocol (XmlParser *languageParser)
virtual char * registerName (char *, int len)
int sendResponse (char *, int, ConnectionPtr, int, ControlHeader &header, File *=0)
virtual ~ControlProtocol ()

Protected Member Functions

int addToErrorLog (ConnectionPtr con, string &m, ControlHeader &header)
int addToErrorLog (ConnectionPtr con, const char *b1, int bs1, ControlHeader &)
int addToLog (int retCode, ConnectionPtr con, char *b1, int bs1, ControlHeader &)
int checkAuth (ControlHeader &)
int getFile (ConnectionPtr, char *, File *in, File *out, char *b1, int bs1, ControlHeader &)
int getVersion (ConnectionPtr, File *out, char *b1, int bs1, ControlHeader &)
int killConnection (ConnectionPtr, u_long ID, File *out, char *b1, int bs1, ControlHeader &)
int putFile (ConnectionPtr, char *, File *in, File *out, char *b1, int bs1, ControlHeader &)
int showConnections (ConnectionPtr, File *out, char *b1, int bs1, ControlHeader &)
int showDynamicProtocols (ConnectionPtr, File *out, char *b1, int bs1, ControlHeader &)
int showLanguageFiles (ConnectionPtr, File *out, char *b1, int bs1, ControlHeader &)

Static Protected Attributes

char adminLogin [64] = ""
char adminPassword [64] = ""
int controlEnabled = 0

Constructor & Destructor Documentation

ControlProtocol::ControlProtocol  ) 
 

Class constructor.

ControlProtocol::~ControlProtocol  )  [virtual]
 

Destructor for the class.


Member Function Documentation

int ControlProtocol::addToErrorLog ConnectionPtr  con,
string &  m,
ControlHeader header
[protected]
 

int ControlProtocol::addToErrorLog ConnectionPtr  con,
const char *  b1,
int  bs1,
ControlHeader header
[protected]
 

Add the entry to the error log file.

int ControlProtocol::addToLog int  retCode,
ConnectionPtr  con,
char *  b1,
int  bs1,
ControlHeader header
[protected]
 

Add the entry to the log file.

int ControlProtocol::checkAuth ControlHeader header  )  [protected]
 

Check if the client is allowed to connect to. Return 1 if the client is allowed.

int ControlProtocol::controlConnection ConnectionPtr  a,
char *  b1,
char *  b2,
int  bs1,
int  bs2,
u_long  nbtr,
u_long  id
[virtual]
 

Control the connection.

Reimplemented from Protocol.

int ControlProtocol::getFile ConnectionPtr  a,
char *  fn,
File in,
File out,
char *  b1,
int  bs1,
ControlHeader header
[protected]
 

Return the requested file to the client.

int ControlProtocol::getVersion ConnectionPtr  a,
File out,
char *  b1,
int  bs1,
ControlHeader header
[protected]
 

Return the current MyServer version.

int ControlProtocol::killConnection ConnectionPtr  a,
u_long  ID,
File out,
char *  b1,
int  bs1,
ControlHeader header
[protected]
 

Kill a connection by its ID.

int ControlProtocol::loadProtocol XmlParser languageParser  )  [virtual]
 

Load the control protocol.

Reimplemented from Protocol.

int ControlProtocol::putFile ConnectionPtr  a,
char *  fn,
File in,
File out,
char *  b1,
int  bs1,
ControlHeader header
[protected]
 

Save the file on the local FS.

char * ControlProtocol::registerName char *  out,
int  len
[virtual]
 

Returns the name of the protocol. If an out buffer is defined fullfill it with the name too.

Reimplemented from Protocol.

int ControlProtocol::sendResponse char *  buffer,
int  buffersize,
ConnectionPtr  conn,
int  errID,
ControlHeader header,
File outFile = 0
 

Send the response with status=errID and the data contained in the outFile. Return nonzero on errors.

int ControlProtocol::showConnections ConnectionPtr  a,
File out,
char *  b1,
int  bs1,
ControlHeader header
[protected]
 

Show the currect active connections.

int ControlProtocol::showDynamicProtocols ConnectionPtr  a,
File out,
char *  b1,
int  bs1,
ControlHeader header
[protected]
 

List all the dynamic protocols used by the server.

int ControlProtocol::showLanguageFiles ConnectionPtr  a,
File out,
char *  b1,
int  bs1,
ControlHeader header
[protected]
 

Show all the language files that the server can use.


Member Data Documentation

char ControlProtocol::adminLogin = "" [static, protected]
 

char ControlProtocol::adminPassword = "" [static, protected]
 

int ControlProtocol::controlEnabled = 0 [static, protected]
 


Generated on Thu May 1 12:41:00 2008 for MyServer by  doxygen 1.3.9.1