00001 #ifndef __HTTP_CALLBACK__
00002 #define __HTTP_CALLBACK__
00003
00004 #include "HTTP.h"
00005 #include <stdio.h>
00006
00007
00008
00009 #ifdef __WIN32__RELEASE__
00010 #include <windows.h>
00011
00012
00013 typedef int (__stdcall *HTTP_IO_REQUEST_CALLBACK) (
00014 int cbType,
00015 HTTPHANDLE HTTPHandle,
00016 PHTTP_DATA *request,
00017 PHTTP_DATA *response);
00018 #else
00019 typedef int (*HTTP_IO_REQUEST_CALLBACK) (int cbType, HTTPHANDLE HTTPHandle,PHTTP_DATA* request,PHTTP_DATA* response);
00020 #endif
00021
00022
00023
00024
00025 #define CBTYPE_CLIENT_REQUEST 0x01 //OUTGOING HTTP Request Generated by FHScan Core API
00026 #define CBTYPE_CLIENT_RESPONSE 0x02 //INCOMING HTTP Response returned by FHScan Core API to the caller
00027
00028
00029
00030 #define CBTYPE_PROXY_REQUEST 0x04 //Request generated by the HTTP Client (Browser) or FHScan Core API against a PROXY Server
00031 #define CBTYPE_PROXY_RESPONSE 0x08 //Response returned by the HTTP PROXY Server
00032 #define CBTYPE_CALLBACK_ALL 0xFFFFFFFF
00033 #define CBTYPE_UNKNOWN_CALLBACK 0xFFFFFFF0
00034
00035
00036
00037 #define CBRET_STATUS_NEXT_CB_CONTINUE 0
00038 #define CBRET_STATUS_NEXT_CB_BLOCK 1
00039 #define CBRET_STATUS_CANCEL_REQUEST 2
00040
00041
00042
00043 void RegisterHTTPCallBack(unsigned int cbType, HTTP_IO_REQUEST_CALLBACK cb);
00044 int RemoveHTTPCallBack(unsigned int cbType, HTTP_IO_REQUEST_CALLBACK cb);
00045 int DoCallBack(
00046 int cbType,
00047 HTTPHANDLE HTTPHandle,
00048 PHTTP_DATA *request,
00049 PHTTP_DATA *response);
00050
00051 #endif