explorer: Use a different return value to indicate that the x11 system tray is not...
[wine.git] / include / winhttp.h
blobef2caff8ec0bdccddb383c17d0aa81e40d4f4e20
1 /*
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
22 #define WINHTTPAPI
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
63 #define ERROR_WINHTTP_AUTODETECTION_FAILED (WINHTTP_ERROR_BASE + 180)
65 typedef struct
67 DWORD dwStructSize;
68 LPWSTR lpszScheme;
69 DWORD dwSchemeLength;
70 INTERNET_SCHEME nScheme;
71 LPWSTR lpszHostName;
72 DWORD dwHostNameLength;
73 INTERNET_PORT nPort;
74 LPWSTR lpszUserName;
75 DWORD dwUserNameLength;
76 LPWSTR lpszPassword;
77 DWORD dwPasswordLength;
78 LPWSTR lpszUrlPath;
79 DWORD dwUrlPathLength;
80 LPWSTR lpszExtraInfo;
81 DWORD dwExtraInfoLength;
82 } URL_COMPONENTS, *LPURL_COMPONENTS;
83 typedef URL_COMPONENTS URL_COMPONENTSW;
84 typedef LPURL_COMPONENTS LPURL_COMPONENTSW;
86 typedef struct
88 DWORD_PTR dwResult;
89 DWORD dwError;
90 } WINHTTP_ASYNC_RESULT, *LPWINHTTP_ASYNC_RESULT;
92 typedef struct
94 FILETIME ftExpiry;
95 FILETIME ftStart;
96 LPWSTR lpszSubjectInfo;
97 LPWSTR lpszIssuerInfo;
98 LPWSTR lpszProtocolName;
99 LPWSTR lpszSignatureAlgName;
100 LPWSTR lpszEncryptionAlgName;
101 DWORD dwKeySize;
102 } WINHTTP_CERTIFICATE_INFO;
104 typedef struct
106 DWORD dwAccessType;
107 LPCWSTR lpszProxy;
108 LPCWSTR lpszProxyBypass;
109 } WINHTTP_PROXY_INFO, *LPWINHTTP_PROXY_INFO;
110 typedef WINHTTP_PROXY_INFO WINHTTP_PROXY_INFOW;
111 typedef LPWINHTTP_PROXY_INFO LPWINHTTP_PROXY_INFOW;
113 typedef struct
115 BOOL fAutoDetect;
116 LPWSTR lpszAutoConfigUrl;
117 LPWSTR lpszProxy;
118 LPWSTR lpszProxyBypass;
119 } WINHTTP_CURRENT_USER_IE_PROXY_CONFIG;
121 typedef VOID (CALLBACK *WINHTTP_STATUS_CALLBACK)(HINTERNET,DWORD_PTR,DWORD,LPVOID,DWORD);
123 typedef struct
125 DWORD dwFlags;
126 DWORD dwAutoDetectFlags;
127 LPCWSTR lpszAutoConfigUrl;
128 LPVOID lpvReserved;
129 DWORD dwReserved;
130 BOOL fAutoLogonIfChallenged;
131 } WINHTTP_AUTOPROXY_OPTIONS;
133 typedef struct
135 DWORD dwMajorVersion;
136 DWORD dwMinorVersion;
137 } HTTP_VERSION_INFO, *LPHTTP_VERSION_INFO;
140 #ifdef __cplusplus
141 extern "C" {
142 #endif
144 BOOL WINAPI WinHttpAddRequestHeaders(HINTERNET,LPCWSTR,DWORD,DWORD);
145 BOOL WINAPI WinHttpDetectAutoProxyConfigUrl(DWORD,LPWSTR*);
146 BOOL WINAPI WinHttpCheckPlatform(void);
147 BOOL WINAPI WinHttpCloseHandle(HINTERNET);
148 HINTERNET WINAPI WinHttpConnect(HINTERNET,LPCWSTR,INTERNET_PORT,DWORD);
149 BOOL WINAPI WinHttpCrackUrl(LPCWSTR,DWORD,DWORD,LPURL_COMPONENTS);
150 BOOL WINAPI WinHttpCreateUrl(LPURL_COMPONENTS,DWORD,LPWSTR,LPDWORD);
151 BOOL WINAPI WinHttpGetDefaultProxyConfiguration(WINHTTP_PROXY_INFO*);
152 BOOL WINAPI WinHttpGetIEProxyConfigForCurrentUser(WINHTTP_CURRENT_USER_IE_PROXY_CONFIG* config);
153 BOOL WINAPI WinHttpGetProxyForUrl(HINTERNET,LPCWSTR,WINHTTP_AUTOPROXY_OPTIONS*,WINHTTP_PROXY_INFO*);
154 HINTERNET WINAPI WinHttpOpen(LPCWSTR,DWORD,LPCWSTR,LPCWSTR,DWORD);
155 HINTERNET WINAPI WinHttpOpenRequest(HINTERNET,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,DWORD);
156 BOOL WINAPI WinHttpQueryAuthParams(HINTERNET,DWORD,LPVOID*);
157 BOOL WINAPI WinHttpQueryAuthSchemes(HINTERNET,LPDWORD,LPDWORD,LPDWORD);
158 BOOL WINAPI WinHttpQueryDataAvailable(HINTERNET,LPDWORD);
159 BOOL WINAPI WinHttpQueryHeaders(HINTERNET,DWORD,LPCWSTR,LPVOID,LPDWORD,LPDWORD);
160 BOOL WINAPI WinHttpReadData(HINTERNET,LPVOID,DWORD,LPDWORD);
161 BOOL WINAPI WinHttpReceiveResponse(HINTERNET,LPVOID);
162 BOOL WINAPI WinHttpSendRequest(HINTERNET,LPCWSTR,DWORD,LPVOID,DWORD,DWORD,DWORD_PTR);
163 BOOL WINAPI WinHttpSetDefaultProxyConfiguration(WINHTTP_PROXY_INFO*);
164 BOOL WINAPI WinHttpSetCredentials(HINTERNET,DWORD,DWORD,LPCWSTR,LPCWSTR,LPVOID);
165 BOOL WINAPI WinHttpSetOption(HINTERNET,DWORD,LPVOID,DWORD);
166 WINHTTP_STATUS_CALLBACK WINAPI WinHttpSetStatusCallback(HINTERNET,WINHTTP_STATUS_CALLBACK,DWORD,DWORD_PTR);
167 BOOL WINAPI WinHttpSetTimeouts(HINTERNET,int,int,int,int);
168 BOOL WINAPI WinHttpTimeFromSystemTime(CONST SYSTEMTIME *,LPWSTR);
169 BOOL WINAPI WinHttpTimeToSystemTime(LPCWSTR,SYSTEMTIME*);
170 BOOL WINAPI WinHttpWriteData(HINTERNET,LPCVOID,DWORD,LPDWORD);
172 #ifdef __cplusplus
174 #endif
176 #endif /* __WINE_WINHTTP_H */