source: Daodan/MinGW/include/httpext.h@ 1089

Last change on this file since 1089 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 2.9 KB
Line 
1/*
2 httpext.h - Header for ISAPI extensions.
3
4 This file is part of a free library for the Win32 API.
5
6 This library is distributed in the hope that it will be useful,
7 but WITHOUT ANY WARRANTY; without even the implied warranty of
8 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9*/
10
11#ifndef _HTTPEXT_H
12#define _HTTPEXT_H
13#if __GNUC__ >=3
14#pragma GCC system_header
15#endif
16
17#include <windows.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#define HSE_VERSION_MAJOR 2
24#define HSE_VERSION_MINOR 0
25#define HSE_LOG_BUFFER_LEN 80
26#define HSE_MAX_EXT_DLL_NAME_LEN 256
27#define HSE_STATUS_SUCCESS 1
28#define HSE_STATUS_SUCCESS_AND_KEEP_CONN 2
29#define HSE_STATUS_PENDING 3
30#define HSE_STATUS_ERROR 4
31#define HSE_REQ_BASE 0
32#define HSE_REQ_SEND_URL_REDIRECT_RESP 1
33#define HSE_REQ_SEND_URL 2
34#define HSE_REQ_SEND_RESPONSE_HEADER 3
35#define HSE_REQ_DONE_WITH_SESSION 4
36#define HSE_REQ_SEND_RESPONSE_HEADER_EX 1016
37#define HSE_REQ_END_RESERVED 1000
38#define HSE_TERM_ADVISORY_UNLOAD 0x00000001
39#define HSE_TERM_MUST_UNLOAD 0x00000002
40#define HSE_IO_SYNC 0x00000001
41#define HSE_IO_ASYNC 0x00000002
42#define HSE_IO_DISCONNECT_AFTER_SEND 0x00000004
43#define HSE_IO_SEND_HEADERS 0x00000008
44typedef LPVOID HCONN;
45typedef struct _HSE_VERSION_INFO {
46 DWORD dwExtensionVersion;
47 CHAR lpszExtensionDesc[HSE_MAX_EXT_DLL_NAME_LEN];
48} HSE_VERSION_INFO, *LPHSE_VERSION_INFO;
49typedef struct _EXTENSION_CONTROL_BLOCK {
50 DWORD cbSize;
51 DWORD dwVersion;
52 HCONN ConnID;
53 DWORD dwHttpStatusCode;
54 CHAR lpszLogData[HSE_LOG_BUFFER_LEN];
55 LPSTR lpszMethod;
56 LPSTR lpszQueryString;
57 LPSTR lpszPathInfo;
58 LPSTR lpszPathTranslated;
59 DWORD cbTotalBytes;
60 DWORD cbAvailable;
61 LPBYTE lpbData;
62 LPSTR lpszContentType;
63 BOOL (PASCAL *GetServerVariable)(HCONN,LPSTR,LPVOID,LPDWORD);
64 BOOL (PASCAL *WriteClient)(HCONN,LPVOID,LPDWORD,DWORD);
65 BOOL (PASCAL *ReadClient)(HCONN,LPVOID,LPDWORD);
66 BOOL (PASCAL *ServerSupportFunction)(HCONN,DWORD,LPVOID,LPDWORD,LPDWORD);
67} EXTENSION_CONTROL_BLOCK, *LPEXTENSION_CONTROL_BLOCK;
68typedef BOOL (PASCAL *PFN_GETEXTENSIONVERSION)(HSE_VERSION_INFO*);
69typedef DWORD (PASCAL *PFN_HTTPEXTENSIONPROC)(EXTENSION_CONTROL_BLOCK*);
70typedef BOOL (PASCAL *PFN_TERMINATEEXTENSION)(DWORD);
71typedef VOID (PASCAL *PFN_HSE_IO_COMPLETION)(EXTENSION_CONTROL_BLOCK*,PVOID,DWORD,DWORD);
72typedef struct _HSE_TF_INFO {
73 PFN_HSE_IO_COMPLETION pfnHseIO;
74 PVOID pContext;
75 HANDLE hFile;
76 LPCSTR pszStatusCode;
77 DWORD BytesToWrite;
78 DWORD Offset;
79 PVOID pHead;
80 DWORD HeadLength;
81 PVOID pTail;
82 DWORD TailLength;
83 DWORD dwFlags;
84} HSE_TF_INFO, *LPHSE_TF_INFO;
85typedef struct _HSE_SEND_HEADER_EX_INFO {
86 LPCSTR pszStatus;
87 LPCSTR pszHeader;
88 DWORD cchStatus;
89 DWORD cchHeader;
90 BOOL fKeepConn;
91} HSE_SEND_HEADER_EX_INFO, * LPHSE_SEND_HEADER_EX_INF;
92BOOL PASCAL GetExtensionVersion(HSE_VERSION_INFO*);
93DWORD PASCAL HttpExtensionProc(EXTENSION_CONTROL_BLOCK*);
94BOOL PASCAL TerminateExtension(DWORD);
95#ifdef __cplusplus
96}
97#endif
98#endif /* _HTTPEXT_H */
Note: See TracBrowser for help on using the repository browser.