Main Page | Class List | File List | Class Members

EHS Class Reference

EHS provides HTTP server functionality to a child class. More...

#include <EHS.h>

List of all members.

Public Types

enum  RegisterEHSResult
 Enumeration for error results for RegisterEHSResult.

enum  UnregisterEHSResult
 Enumeration for error results for UnregisterEHSResult.

enum  StartServerResult
 result codes for StartServer and StartSErver_Threaded


Public Member Functions

 EHS (EHS *ipoParent=NULL, std::string isRegisteredAs="")
void SetCertificateFile (std::string &irsCertificateFile)
 set the certificate file for use in HTTPS transactions

void SetCertificatePassphrase (std::string &irsCertificatePassphrase)
 set certificate passphrase

void SetPassphraseCallback (int(*m_ipfOverridePassphraseCallback)(char *, int, int, void *))
 sets a new passphrase callback function

void SetParent (EHS *ipoParent, std::string isRegisteredAs)
RegisterEHSResult RegisterEHS (EHS *ipoEHS, char *ipsRegisterPath)
 this associates an EHS object with this EHS object under the path ipsRegisterPath

UnregisterEHSResult UnregisterEHS (char *ipsRegisterPath)
 Unregister an EHS object from the specified path.

ResponseCode RouteRequest (HttpRequest *ipoHttpRequest, HttpResponse *ipoHttpResponse)
 this is responsible for routing a request through the EHS tree and sending the request to the final destination

virtual ResponseCode HandleRequest (HttpRequest *ipoHttpRequest, HttpResponse *ipoHttpResponse)
 This function should be defined by the subclass.

void SetSourceEHS (EHS &iroSourceEHS)
void StopServer ()
 brings down socket stuff. If StartServer_Threaded() was called it also stops that by setting the nServerStopped variable

void HandleData (int inTimeoutMilliseconds=0)
 This looks for incoming connections in EHSServer.


Public Attributes

EHSServerParameters m_oEHSServerParameters
 stores a map with server parameters


Protected Attributes

EHSMap oEHSMap
 stores path => EHSConnection pairs for path/tree traversal

EHSpoParent
 points to the EHS object this object was registered with, NULL if top level

std::string sRegisteredAs
 the string that this EHS object is regestered as

EHSServerpoEHSServer
 EHSServer object associated with this EHS object.

EHSm_poSourceEHS
 source EHS object to route requests to for data instead of processing it ourselves


Detailed Description

EHS provides HTTP server functionality to a child class.

EHS provides HTTP server functionality to a child class. The child class must inherit from it and then override HandleRequest ( ).


Constructor & Destructor Documentation

EHS::EHS EHS ipoParent = NULL,
std::string  isRegisteredAs = ""
 

Parameters:
ipoParent  parent EHS object for routing purposes
isRegisteredAs  path string for routing purposes


Member Function Documentation

void EHS::HandleData int  inTimeoutMilliseconds = 0  ) 
 

This looks for incoming connections in EHSServer.

Parameters:
inTimeoutMilliseconds  milliseconds for select timeout

EHS::RegisterEHSResult EHS::RegisterEHS EHS ipoEHS,
char *  ipsRegisterPath
 

this associates an EHS object with this EHS object under the path ipsRegisterPath

Parameters:
ipoEHS  new sibling
ipsRegisterPath  path for routing

ResponseCode EHS::RouteRequest HttpRequest ipoHttpRequest,
HttpResponse ipoHttpResponse
 

this is responsible for routing a request through the EHS tree and sending the request to the final destination

Parameters:
ipoHttpRequest  request info for service
ipoHttpResponse  response object with data to be sent back to client

void EHS::SetParent EHS ipoParent,
std::string  isRegisteredAs
 

Parameters:
ipoParent  this is the new parent
isRegisteredAs  path for routing

void EHS::SetSourceEHS EHS iroSourceEHS  ) 
 

makes this EHS object get its data from another EHS -- useful for having secure and normal connections share same data

EHS::UnregisterEHSResult EHS::UnregisterEHS char *  ipsRegisterPath  ) 
 

Unregister an EHS object from the specified path.

Parameters:
ipsRegisterPath  remove object at this path


The documentation for this class was generated from the following files:
Generated on Sat Mar 13 09:01:50 2004 for EHS - Embedded HTTP Server library by doxygen 1.3.5