#include "CallBack.h"
#include <stdio.h>
#include <stdlib.h>
Go to the source code of this file.
Data Structures | |
struct | _cb_list |
Typedefs | |
typedef struct _cb_list | CB_LIST |
typedef struct _cb_list * | PCB_LIST |
Functions | |
void | RegisterHTTPCallBack (unsigned int cbType, HTTP_IO_REQUEST_CALLBACK cb) |
This function Registers an HTTP Callback Handler and is called from external plugins. | |
int | RemoveHTTPCallBack (unsigned int cbType, HTTP_IO_REQUEST_CALLBACK cb) |
This function unregisters a previously loaded Callback. | |
int | DoCallBack (int cbType, HTTPHANDLE HTTPHandle, PHTTP_DATA *request, PHTTP_DATA *response) |
CallBack Dispatcher. This function is called from the HTTPCore Module ( SendRawHttpRequest() ) and will send http information against registered callbacks. | |
Variables | |
static PCB_LIST | CBList = NULL |
static unsigned int | CBItems = 0 |
int DoCallBack | ( | int | cbType, | |
HTTPHANDLE | HTTPHandle, | |||
PHTTP_DATA * | request, | |||
PHTTP_DATA * | response | |||
) |
CallBack Dispatcher. This function is called from the HTTPCore Module ( SendRawHttpRequest() ) and will send http information against registered callbacks.
cbType | CallBack Source Type. Valid options are CBTYPE_CLIENT_REQUEST , CBTYPE_CLIENT_RESPONSE , CBTYPE_BROWSER_REQUEST , CBTYPE_SERVER_RESPONSE | |
HTTPHandle | HTTP Connection Handle with information about remote target (like ip address, port, ssl, protocol version,...) | |
request | struct containing all information related to the HTTP Request. | |
response | struct containing information about http reponse. This parameter could be NULL if the callback type is CBTYPE_CLIENT_REQUEST or CBTYPE_CLIENT_RESPONSE because request was not send yet. |
Definition at line 78 of file CallBack.cpp.
References _cb_list::cb, CBItems, CBRET_STATUS_CANCEL_REQUEST, CBRET_STATUS_NEXT_CB_BLOCK, and CBRET_STATUS_NEXT_CB_CONTINUE.
void RegisterHTTPCallBack | ( | unsigned int | cbType, | |
HTTP_IO_REQUEST_CALLBACK | cb | |||
) |
This function Registers an HTTP Callback Handler and is called from external plugins.
cbType | CallBack Type. Valid options are CBTYPE_CLIENT_REQUEST , CBTYPE_CLIENT_RESPONSE , CBTYPE_BROWSER_REQUEST , CBTYPE_SERVER_RESPONSE. Use CBTYPE_CALLBACK_ALL to match every possible callback (including undefined ones). | |
cb | CallBack Address. This is the Address of the CallBack Function that will receive HTTP parameters. |
Definition at line 31 of file CallBack.cpp.
References _cb_list::cb, CBItems, and _cb_list::cbType.
int RemoveHTTPCallBack | ( | unsigned int | cbType, | |
HTTP_IO_REQUEST_CALLBACK | cb | |||
) |
This function unregisters a previously loaded Callback.
cbType | CallBack Type. Valid options are CBTYPE_CLIENT_REQUEST , CBTYPE_CLIENT_RESPONSE , CBTYPE_BROWSER_REQUEST , CBTYPE_SERVER_RESPONSE or CBTYPE_CALLBACK_ALL to match every possible callback | |
cb | CallBack Address. This is the Address of the CallBack Function that was receiving HTTP parameters. |
Definition at line 46 of file CallBack.cpp.
References _cb_list::cb, and CBItems.
unsigned int CBItems = 0 [static] |
Definition at line 19 of file CallBack.cpp.
Referenced by DoCallBack(), RegisterHTTPCallBack(), and RemoveHTTPCallBack().
Definition at line 18 of file CallBack.cpp.