NetBurner 3.5.0
PDF Version
 
CallBackFunctionPageHandler Class Reference

Implements the HtmlPageHandler class as a function pointer callback for GET requests. More...

#include <http.h>

Inherits HtmlPageHandler.

Public Member Functions

virtual int ProcessRaw (int sock, HTTP_Request &pdt)
 This class will do a callback with data for each request to the specified url.
 
 CallBackFunctionPageHandler (const char *pUrl, http_gethandlerfunc *pFunction, HTTP_RequestTypes reqType=tGet, int accessGroup=0, bool beforeFiles=false)
 Constructor for HTTP GET callback function.
 
 CallBackFunctionPageHandler (const char *pUrl, http_gethandlerfunc *pFunction, http_matchhandlerfunc *pMatchFunction, HTTP_RequestTypes reqType=tGet, int accessGroup=0, bool beforeFiles=false)
 Constructor for HTTP GET callback function, includes option for function to match the requested name.
 
- Public Member Functions inherited from HtmlPageHandler
 HtmlPageHandler (const char *url, HTTP_RequestTypes rt=tGet, int accessGroup=0, bool Before_Files=false)
 Register handler.
 
int GetGroup ()
 Returns access group setting.
 

Additional Inherited Members

- Protected Member Functions inherited from HtmlPageHandler
void InsertSort (HtmlPageHandler *&ph)
 Insert sort.
 
int SortValue (HtmlPageHandler *pv)
 Returns the value of the sort compare: -1, 0, 1.
 
- Protected Attributes inherited from HtmlPageHandler
HtmlPageHandlerm_pNextHandler
 Pointer to next page handle object.
 
const char * m_pUrlName
 Pointer to URL. Performs a length match, an empty string matches everything.
 
int m_access_group
 The access group for this request see CheckHttpAccess.
 
HTTP_RequestTypes m_requestTypes
 Type of request, HTTP_RequestTypes.
 

Detailed Description

Implements the HtmlPageHandler class as a function pointer callback for GET requests.

Constructor & Destructor Documentation

◆ CallBackFunctionPageHandler() [1/2]

CallBackFunctionPageHandler::CallBackFunctionPageHandler ( const char * pUrl,
http_gethandlerfunc * pFunction,
HTTP_RequestTypes reqType = tGet,
int accessGroup = 0,
bool beforeFiles = false )
inline

Constructor for HTTP GET callback function.

Parameters
pUrlPointer to the URL to intercept from normal system processing
pFunctionPointer to the function to call for the requested URL
reqTypeOptional type of request to intercept, HTTP_RequestTypes. Default is tGet
accessGroupOptional password group access level. Default is 0 = no password
beforeFilesOptional parameter to specify a check for just a name, or the name of an actual file in the system. true = intercept before checking for a file of the same name false = check for any files of the requested name before intercepting

◆ CallBackFunctionPageHandler() [2/2]

CallBackFunctionPageHandler::CallBackFunctionPageHandler ( const char * pUrl,
http_gethandlerfunc * pFunction,
http_matchhandlerfunc * pMatchFunction,
HTTP_RequestTypes reqType = tGet,
int accessGroup = 0,
bool beforeFiles = false )
inline

Constructor for HTTP GET callback function, includes option for function to match the requested name.

Parameters
pUrlPointer to the URL to intercept from normal system processing
pFunctionPointer to the function to call for the requested URL
pMatchFunctionPointer to function to perform the match check
reqTypeOptional type of request to intercept, HTTP_RequestTypes. Default is tGet
accessGroupOptional parameter to set a password group access level. Default is 0 = no password.
beforeFilesOptional parameter to process a file name before checking for a compiled-in file of the same name. Default is false = check for any files of the requested name before intercepting

Member Function Documentation

◆ ProcessRaw()

virtual int CallBackFunctionPageHandler::ProcessRaw ( int sock,
HTTP_Request & pd )
inlinevirtual

This class will do a callback with data for each request to the specified url.

Returns
0 if the request was not processed.

Implements HtmlPageHandler.


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