2 * Copyright (C) 2007 Francois Gouget
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_WINHTTP_H
20 #define __WINE_WINHTTP_H
23 #define BOOLAPI WINHTTPAPI BOOL WINAPI
26 typedef LPVOID HINTERNET
;
27 typedef HINTERNET
*LPHINTERNET
;
29 #define INTERNET_DEFAULT_PORT 0
30 #define INTERNET_DEFAULT_HTTP_PORT 80
31 #define INTERNET_DEFAULT_HTTPS_PORT 443
32 typedef WORD INTERNET_PORT
;
33 typedef INTERNET_PORT
*LPINTERNET_PORT
;
35 #define INTERNET_SCHEME_HTTP 1
36 #define INTERNET_SCHEME_HTTPS 2
37 typedef int INTERNET_SCHEME
, *LPINTERNET_SCHEME
;
39 /* flags for WinHttpOpen */
40 #define WINHTTP_FLAG_ASYNC 0x10000000
42 /* flags for WinHttpOpenRequest */
43 #define WINHTTP_FLAG_ESCAPE_PERCENT 0x00000004
44 #define WINHTTP_FLAG_NULL_CODEPAGE 0x00000008
45 #define WINHTTP_FLAG_ESCAPE_DISABLE 0x00000040
46 #define WINHTTP_FLAG_ESCAPE_DISABLE_QUERY 0x00000080
47 #define WINHTTP_FLAG_BYPASS_PROXY_CACHE 0x00000100
48 #define WINHTTP_FLAG_REFRESH WINHTTP_FLAG_BYPASS_PROXY_CACHE
49 #define WINHTTP_FLAG_SECURE 0x00800000
51 #define WINHTTP_ACCESS_TYPE_DEFAULT_PROXY 0
52 #define WINHTTP_ACCESS_TYPE_NO_PROXY 1
53 #define WINHTTP_ACCESS_TYPE_NAMED_PROXY 3
55 #define WINHTTP_NO_PROXY_NAME NULL
56 #define WINHTTP_NO_PROXY_BYPASS NULL
58 #define WINHTTP_NO_REFERER NULL
59 #define WINHTTP_DEFAULT_ACCEPT_TYPES NULL
61 #define WINHTTP_ERROR_BASE 12000
68 INTERNET_SCHEME nScheme
;
70 DWORD dwHostNameLength
;
73 DWORD dwUserNameLength
;
75 DWORD dwPasswordLength
;
77 DWORD dwUrlPathLength
;
79 DWORD dwExtraInfoLength
;
80 } URL_COMPONENTS
, *LPURL_COMPONENTS
;
81 typedef URL_COMPONENTS URL_COMPONENTSW
;
82 typedef LPURL_COMPONENTS LPURL_COMPONENTSW
;
88 } WINHTTP_ASYNC_RESULT
, *LPWINHTTP_ASYNC_RESULT
;
94 LPWSTR lpszSubjectInfo
;
95 LPWSTR lpszIssuerInfo
;
96 LPWSTR lpszProtocolName
;
97 LPWSTR lpszSignatureAlgName
;
98 LPWSTR lpszEncryptionAlgName
;
100 } WINHTTP_CERTIFICATE_INFO
;
106 LPCWSTR lpszProxyBypass
;
107 } WINHTTP_PROXY_INFO
, *LPWINHTTP_PROXY_INFO
;
108 typedef WINHTTP_PROXY_INFO WINHTTP_PROXY_INFOW
;
109 typedef LPWINHTTP_PROXY_INFO LPWINHTTP_PROXY_INFOW
;
114 LPWSTR lpszAutoConfigUrl
;
116 LPWSTR lpszProxyBypass
;
117 } WINHTTP_CURRENT_USER_IE_PROXY_CONFIG
;
119 typedef VOID (CALLBACK
*WINHTTP_STATUS_CALLBACK
)(HINTERNET
,DWORD_PTR
,DWORD
,LPVOID
,DWORD
);
124 DWORD dwAutoDetectFlags
;
125 LPCWSTR lpszAutoConfigUrl
;
128 BOOL fAutoLogonIfChallenged
;
129 } WINHTTP_AUTOPROXY_OPTIONS
;
133 DWORD dwMajorVersion
;
134 DWORD dwMinorVersion
;
135 } HTTP_VERSION_INFO
, *LPHTTP_VERSION_INFO
;
142 BOOL WINAPI
WinHttpAddRequestHeaders(HINTERNET
,LPCWSTR
,DWORD
,DWORD
);
143 BOOL WINAPI
WinHttpDetectAutoProxyConfigUrl(DWORD
,LPWSTR
*);
144 BOOL WINAPI
WinHttpCheckPlatform(void);
145 BOOL WINAPI
WinHttpCloseHandle(HINTERNET
);
146 HINTERNET WINAPI
WinHttpConnect(HINTERNET
,LPCWSTR
,INTERNET_PORT
,DWORD
);
147 BOOL WINAPI
WinHttpCrackUrl(LPCWSTR
,DWORD
,DWORD
,LPURL_COMPONENTS
);
148 BOOL WINAPI
WinHttpCreateUrl(LPURL_COMPONENTS
,DWORD
,LPWSTR
,LPDWORD
);
149 BOOL WINAPI
WinHttpGetDefaultProxyConfiguration(WINHTTP_PROXY_INFO
*);
150 BOOL WINAPI
WinHttpGetIEProxyConfigForCurrentUser(WINHTTP_CURRENT_USER_IE_PROXY_CONFIG
* config
);
151 BOOL WINAPI
WinHttpGetProxyForUrl(HINTERNET
,LPCWSTR
,WINHTTP_AUTOPROXY_OPTIONS
*,WINHTTP_PROXY_INFO
*);
152 HINTERNET WINAPI
WinHttpOpen(LPCWSTR
,DWORD
,LPCWSTR
,LPCWSTR
,DWORD
);
153 HINTERNET WINAPI
WinHttpOpenRequest(HINTERNET
,LPCWSTR
,LPCWSTR
,LPCWSTR
,LPCWSTR
,LPCWSTR
,DWORD
);
154 BOOL WINAPI
WinHttpQueryAuthParams(HINTERNET
,DWORD
,LPVOID
*);
155 BOOL WINAPI
WinHttpQueryAuthSchemes(HINTERNET
,LPDWORD
,LPDWORD
,LPDWORD
);
156 BOOL WINAPI
WinHttpQueryDataAvailable(HINTERNET
,LPDWORD
);
157 BOOL WINAPI
WinHttpQueryHeaders(HINTERNET
,DWORD
,LPCWSTR
,LPVOID
,LPDWORD
,LPDWORD
);
158 BOOL WINAPI
WinHttpReadData(HINTERNET
,LPVOID
,DWORD
,LPDWORD
);
159 BOOL WINAPI
WinHttpReceiveResponse(HINTERNET
,LPVOID
);
160 BOOL WINAPI
WinHttpSendRequest(HINTERNET
,LPCWSTR
,DWORD
,LPVOID
,DWORD
,DWORD
,DWORD_PTR
);
161 BOOL WINAPI
WinHttpSetDefaultProxyConfiguration(WINHTTP_PROXY_INFO
*);
162 BOOL WINAPI
WinHttpSetCredentials(HINTERNET
,DWORD
,DWORD
,LPCWSTR
,LPCWSTR
,LPVOID
);
163 BOOL WINAPI
WinHttpSetOption(HINTERNET
,DWORD
,LPVOID
,DWORD
);
164 WINHTTP_STATUS_CALLBACK WINAPI
WinHttpSetStatusCallback(HINTERNET
,WINHTTP_STATUS_CALLBACK
,DWORD
,DWORD_PTR
);
165 BOOL WINAPI
WinHttpSetTimeouts(HINTERNET
,int,int,int,int);
166 BOOL WINAPI
WinHttpTimeFromSystemTime(CONST SYSTEMTIME
*,LPWSTR
);
167 BOOL WINAPI
WinHttpTimeToSystemTime(LPCWSTR
,SYSTEMTIME
*);
168 BOOL WINAPI
WinHttpWriteData(HINTERNET
,LPCVOID
,DWORD
,LPDWORD
);
174 #endif /* __WINE_WINHTTP_H */