ReactOS  0.4.14-dev-317-g96040ec
internet.h
Go to the documentation of this file.
1 /*
2  * Wininet
3  *
4  * Copyright 1999 Corel Corporation
5  *
6  * Ulrich Czekalla
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21  */
22 
23 #ifndef _WINE_INTERNET_H_
24 #define _WINE_INTERNET_H_
25 
26 #include "wine/unicode.h"
27 #include "wine/heap.h"
28 #include "wine/list.h"
29 
30 #include <time.h>
31 
32 #include "winineti.h"
33 
35 
36 typedef struct {
41  int addr_len;
42  char addr_str[INET6_ADDRSTRLEN];
43 
45  const WCHAR *host_port;
47 
49 
52 
53  struct list entry;
54  struct list conn_pool;
55 } server_t;
56 
59 
60 typedef enum {
66 
67 /* used for netconnection.c stuff */
68 typedef struct
69 {
70  int socket;
71  BOOL secure;
73  CtxtHandle ssl_ctx;
74  SecPkgContext_StreamSizes ssl_sizes;
76  char *ssl_buf;
77  char *extra_buf;
78  size_t extra_len;
79  char *peek_msg;
80  char *peek_msg_mem;
81  size_t peek_len;
84 
87  struct list pool_entry;
88 } netconn_t;
89 
92 
93 static inline void * __WINE_ALLOC_SIZE(2) heap_realloc_zero(void *mem, size_t len)
94 {
96 }
97 
99 {
100  LPWSTR ret = NULL;
101 
102  if(str) {
103  DWORD size;
104 
105  size = (strlenW(str)+1)*sizeof(WCHAR);
106  ret = heap_alloc(size);
107  if(ret)
108  memcpy(ret, str, size);
109  }
110 
111  return ret;
112 }
113 
114 static inline char *heap_strdupA(const char *str)
115 {
116  char *ret = NULL;
117 
118  if(str) {
119  DWORD size = strlen(str)+1;
120 
121  ret = heap_alloc(size);
122  if(ret)
123  memcpy(ret, str, size);
124  }
125 
126  return ret;
127 }
128 
129 static inline LPWSTR heap_strndupW(LPCWSTR str, UINT max_len)
130 {
131  LPWSTR ret;
132  UINT len;
133 
134  if(!str)
135  return NULL;
136 
137  for(len=0; len<max_len; len++)
138  if(str[len] == '\0')
139  break;
140 
141  ret = heap_alloc(sizeof(WCHAR)*(len+1));
142  if(ret) {
143  memcpy(ret, str, sizeof(WCHAR)*len);
144  ret[len] = '\0';
145  }
146 
147  return ret;
148 }
149 
150 static inline WCHAR *heap_strndupAtoW(const char *str, int len_a, DWORD *len_w)
151 {
152  WCHAR *ret = NULL;
153 
154  if(str) {
155  size_t len;
156  if(len_a < 0) len_a = strlen(str);
157  len = MultiByteToWideChar(CP_ACP, 0, str, len_a, NULL, 0);
158  ret = heap_alloc((len+1)*sizeof(WCHAR));
159  if(ret) {
160  MultiByteToWideChar(CP_ACP, 0, str, len_a, ret, len);
161  ret[len] = 0;
162  *len_w = len;
163  }
164  }
165 
166  return ret;
167 }
168 
169 static inline WCHAR *heap_strdupAtoW(const char *str)
170 {
171  LPWSTR ret = NULL;
172 
173  if(str) {
174  DWORD len;
175 
176  len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
177  ret = heap_alloc(len*sizeof(WCHAR));
178  if(ret)
179  MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
180  }
181 
182  return ret;
183 }
184 
185 static inline char *heap_strdupWtoA(LPCWSTR str)
186 {
187  char *ret = NULL;
188 
189  if(str) {
191  ret = heap_alloc(size);
192  if(ret)
194  }
195 
196  return ret;
197 }
198 
199 typedef struct {
200  const WCHAR *str;
201  size_t len;
202 } substr_t;
203 
204 static inline substr_t substr(const WCHAR *str, size_t len)
205 {
206  substr_t r = {str, len};
207  return r;
208 }
209 
210 static inline substr_t substrz(const WCHAR *str)
211 {
212  return substr(str, strlenW(str));
213 }
214 
216 {
217  dataA->dwFileAttributes = dataW->dwFileAttributes;
218  dataA->ftCreationTime = dataW->ftCreationTime;
219  dataA->ftLastAccessTime = dataW->ftLastAccessTime;
220  dataA->ftLastWriteTime = dataW->ftLastWriteTime;
221  dataA->nFileSizeHigh = dataW->nFileSizeHigh;
222  dataA->nFileSizeLow = dataW->nFileSizeLow;
223  dataA->dwReserved0 = dataW->dwReserved0;
224  dataA->dwReserved1 = dataW->dwReserved1;
225  WideCharToMultiByte(CP_ACP, 0, dataW->cFileName, -1,
226  dataA->cFileName, sizeof(dataA->cFileName),
227  NULL, NULL);
229  dataA->cAlternateFileName, sizeof(dataA->cAlternateFileName),
230  NULL, NULL);
231 }
232 
233 typedef enum
234 {
242 } WH_TYPE;
243 
244 #define INET_OPENURL 0x0001
245 #define INET_CALLBACKW 0x0002
246 
247 typedef struct
248 {
254 } req_file_t;
255 
257 
258 typedef struct {
259  void (*Destroy)(object_header_t*);
260  void (*CloseConnection)(object_header_t*);
261  DWORD (*QueryOption)(object_header_t*,DWORD,void*,DWORD*,BOOL);
262  DWORD (*SetOption)(object_header_t*,DWORD,void*,DWORD);
265  DWORD (*QueryDataAvailable)(object_header_t*,DWORD*,DWORD,DWORD_PTR);
267  DWORD (*LockRequestFile)(object_header_t*,req_file_t**);
268 } object_vtbl_t;
269 
270 #define INTERNET_HANDLE_IN_USE 1
271 
272 struct _object_header_t
273 {
275  const object_vtbl_t *vtbl;
283  LONG refs;
286  struct list entry;
287  struct list children;
288 };
289 
290 typedef struct
291 {
300 } appinfo_t;
301 
302 typedef struct
303 {
306  LPWSTR hostName; /* the final destination of the request */
309  INTERNET_PORT hostPort; /* the final destination port of the request */
314 
315 #define HDR_ISREQUEST 0x0001
316 #define HDR_COMMADELIMITED 0x0002
317 #define HDR_SEMIDELIMITED 0x0004
318 
319 typedef struct
320 {
326 
327 
328 struct HttpAuthInfo;
329 
331 
332 typedef struct {
334 } data_stream_t;
335 
336 typedef struct {
341 
342 #define READ_BUFFER_SIZE 8192
343 
344 typedef struct
345 {
362 
363  CRITICAL_SECTION headers_section; /* section to protect the headers array */
366 
373 
374  CRITICAL_SECTION read_section; /* section to protect the following fields */
375  DWORD contentLength; /* total number of bytes to be read */
376  BOOL read_gzip; /* are we reading in gzip mode? */
377  DWORD read_pos; /* current read position in read_buf */
378  DWORD read_size; /* valid data size in read_buf */
379  BYTE read_buf[READ_BUFFER_SIZE]; /* buffer for already read but not returned data */
380 
384 
387 
389 {
392 };
393 
395 
400 
403 
405 
406 HINTERNET FTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName,
407  INTERNET_PORT nServerPort, LPCWSTR lpszUserName,
409  DWORD dwInternalFlags) DECLSPEC_HIDDEN;
410 
412  INTERNET_PORT nServerPort, LPCWSTR lpszUserName,
414  DWORD dwInternalFlags, HINTERNET*) DECLSPEC_HIDDEN;
415 
417 
420 
425 
427  DWORD dwInternetStatus, LPVOID lpvStatusInfo,
428  DWORD dwStatusInfoLength) DECLSPEC_HIDDEN;
430 
433 void NETCON_unload(void) DECLSPEC_HIDDEN;
435 DWORD NETCON_send(netconn_t *connection, const void *msg, size_t len, int flags,
436  int *sent /* out */) DECLSPEC_HIDDEN;
437 DWORD NETCON_recv(netconn_t*,void*,size_t,BOOL,int*) DECLSPEC_HIDDEN;
442 int sock_send(int fd, const void *msg, size_t len, int flags) DECLSPEC_HIDDEN;
443 int sock_recv(int fd, void *msg, size_t len, int flags) DECLSPEC_HIDDEN;
444 
446 
449 
450 static inline req_file_t *req_file_addref(req_file_t *req_file)
451 {
452  InterlockedIncrement(&req_file->ref);
453  return req_file;
454 }
455 
457 void free_urlcache(void) DECLSPEC_HIDDEN;
458 void free_cookie(void) DECLSPEC_HIDDEN;
459 
460 void init_winsock(void) DECLSPEC_HIDDEN;
461 
462 #define MAX_REPLY_LEN 0x5B4
463 
464 /* Used for debugging - maybe need to be shared in the Wine debugging code ? */
465 typedef struct
466 {
468  const char* name;
470 
471 /* Undocumented security flags */
472 #define _SECURITY_FLAG_CERT_REV_FAILED 0x00800000
473 #define _SECURITY_FLAG_CERT_INVALID_CA 0x01000000
474 #define _SECURITY_FLAG_CERT_INVALID_CN 0x02000000
475 #define _SECURITY_FLAG_CERT_INVALID_DATE 0x04000000
476 
477 #define _SECURITY_ERROR_FLAGS_MASK \
478  (_SECURITY_FLAG_CERT_REV_FAILED \
479  |_SECURITY_FLAG_CERT_INVALID_CA \
480  |_SECURITY_FLAG_CERT_INVALID_CN \
481  |_SECURITY_FLAG_CERT_INVALID_DATE)
482 
483 #endif /* _WINE_INTERNET_H_ */
static void * __WINE_ALLOC_SIZE(2) heap_realloc_zero(void *mem
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:382
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
void * alloc_object(object_header_t *, const object_vtbl_t *, size_t) DECLSPEC_HIDDEN
Definition: internet.c:112
DWORD nFileSizeHigh
Definition: winbase.h:915
DWORD dwReserved1
Definition: winbase.h:906
BOOL is_https
Definition: internet.h:39
int sock_send(int fd, const void *msg, size_t len, int flags) DECLSPEC_HIDDEN
char hdr[14]
Definition: iptest.cpp:33
DWORD connect_timeout
Definition: internet.h:354
FILETIME last_modified
Definition: internet.h:367
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
SOCKET WSAAPI socket(IN INT af, IN INT type, IN INT protocol)
Definition: socklife.c:143
CHAR cFileName[MAX_PATH]
Definition: winbase.h:907
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define DWORD_PTR
Definition: treelist.c:76
#define WideCharToMultiByte
Definition: compat.h:101
DWORD INTERNET_AsyncCall(task_header_t *) DECLSPEC_HIDDEN
Definition: internet.c:3801
DWORD INET_QueryOption(object_header_t *, DWORD, void *, DWORD *, BOOL) DECLSPEC_HIDDEN
Definition: internet.c:2533
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
http_session_t * session
Definition: internet.h:347
netconn_stream_t netconn_stream
Definition: internet.h:382
FILETIME ftLastAccessTime
Definition: winbase.h:901
static substr_t substrz(const WCHAR *str)
Definition: internet.h:210
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
LONG ref
Definition: internet.h:48
INTERNET_PORT hostPort
Definition: internet.h:309
WORD wCount
Definition: internet.h:324
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
LONG ref
Definition: internet.h:249
DWORD NETCON_send(netconn_t *connection, const void *msg, size_t len, int flags, int *sent) DECLSPEC_HIDDEN
#define CP_ACP
Definition: compat.h:99
server_t * proxy
Definition: internet.h:349
static char * heap_strdupWtoA(LPCWSTR str)
Definition: internet.h:185
WCHAR * INTERNET_FindProxyForProtocol(LPCWSTR szProxy, LPCWSTR proto) DECLSPEC_HIDDEN
Definition: internet.c:393
VOID(CALLBACK * INTERNET_STATUS_CALLBACK)(_In_ HINTERNET, _In_opt_ DWORD_PTR, _In_ DWORD, _In_opt_ LPVOID, _In_ DWORD)
Definition: wininet.h:859
DWORD connect_timeout
Definition: internet.h:310
void INTERNET_SetLastError(DWORD dwError) DECLSPEC_HIDDEN
Definition: internet.c:3723
LPWSTR userName
Definition: internet.h:307
static req_file_t * req_file_addref(req_file_t *req_file)
Definition: internet.h:450
BOOL NETCON_is_alive(netconn_t *) DECLSPEC_HIDDEN
struct list children
const CERT_CHAIN_CONTEXT * cert_chain
Definition: internet.h:51
LPSTR INTERNET_GetResponseBuffer(void) DECLSPEC_HIDDEN
Definition: internet.c:3823
WCHAR cAlternateFileName[14]
Definition: winbase.h:920
DWORD dwReserved0
Definition: winbase.h:905
#define INTERNET_HANDLE_TYPE_CONNECT_GOPHER
Definition: wininet.h:804
FILETIME expires
Definition: internet.h:370
_In_opt_ LPSTR _In_opt_ LPSTR lpszPassword
Definition: winbase.h:2658
DWORD nFileSizeLow
Definition: winbase.h:904
static int fd
Definition: io.c:51
void * alloc_async_task(object_header_t *, async_task_proc_t, size_t) DECLSPEC_HIDDEN
Definition: internet.c:3780
#define INET6_ADDRSTRLEN
Definition: request.c:1491
void(* async_task_proc_t)(task_header_t *)
Definition: internet.h:386
int NETCON_GetCipherStrength(netconn_t *) DECLSPEC_HIDDEN
static char * heap_strdupA(const char *str)
Definition: internet.h:114
char * LPSTR
Definition: xmlstorage.h:182
object_header_t * WININET_AddRef(object_header_t *info) DECLSPEC_HIDDEN
Definition: internet.c:178
BOOL collect_connections(collect_type_t) DECLSPEC_HIDDEN
Definition: http.c:313
#define BOOL
Definition: nt_native.h:43
_Check_return_ _CRTIMP char *__cdecl asctime(_In_ const struct tm *_Tm)
#define DWORD
Definition: nt_native.h:44
DWORD create_req_file(const WCHAR *, req_file_t **) DECLSPEC_HIDDEN
Definition: internet.c:3874
LPWSTR proxyUsername
Definition: internet.h:296
VOID INTERNET_SendCallback(object_header_t *hdr, DWORD_PTR dwContext, DWORD dwInternetStatus, LPVOID lpvStatusInfo, DWORD dwStatusInfoLength) DECLSPEC_HIDDEN
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
DWORD_PTR dwContext
Definition: internet.h:279
unsigned read_buf(z_streamp strm, Bytef *buf, unsigned size)
Definition: deflate.c:1167
struct HTTPHEADERW * LPHTTPHEADERW
LPWSTR hostName
Definition: internet.h:306
static WCHAR * heap_strdupAtoW(const char *str)
Definition: internet.h:169
void free_urlcache(void) DECLSPEC_HIDDEN
Definition: urlcache.c:4054
WORD INTERNET_PORT
Definition: winhttp.h:38
FILETIME ftCreationTime
Definition: winbase.h:900
BOOL keep_alive
Definition: internet.h:85
void close_netconn(netconn_t *) DECLSPEC_HIDDEN
DWORD NETCON_recv(netconn_t *, void *, size_t, BOOL, int *) DECLSPEC_HIDDEN
HTTPHEADERW * custHeaders
Definition: internet.h:364
DWORD nFileSizeLow
Definition: winbase.h:916
INTERNET_PORT port
Definition: internet.h:38
DWORD INET_SetOption(object_header_t *, DWORD, void *, DWORD) DECLSPEC_HIDDEN
Definition: internet.c:2632
static LPWSTR heap_strndupW(LPCWSTR str, UINT max_len)
Definition: internet.h:129
HMODULE WININET_hModule
Definition: internet.c:77
const WCHAR * canon_host_port
Definition: internet.h:46
DWORD64 keep_until
Definition: internet.h:86
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
BOOL GetAddress(const WCHAR *, INTERNET_PORT, SOCKADDR *, int *, char *) DECLSPEC_HIDDEN
Definition: utility.c:133
struct HttpAuthInfo * authInfo
Definition: internet.h:371
DWORD accessType
Definition: internet.h:298
req_file_t * req_file
Definition: internet.h:369
WH_TYPE
Definition: internet.h:233
object_header_t hdr
Definition: internet.h:346
const WCHAR * str
DWORD INTERNET_GetLastError(void) DECLSPEC_HIDDEN
Definition: internet.c:3744
DWORD receive_timeout
Definition: internet.h:312
appinfo_t * appInfo
Definition: internet.h:305
void free_netconn(netconn_t *) DECLSPEC_HIDDEN
smooth NULL
Definition: ftsmooth.c:416
LPWSTR version
Definition: internet.h:357
DWORD security_flags
Definition: internet.h:82
LPWSTR statusText
Definition: internet.h:359
HANDLE file_handle
Definition: internet.h:250
data_stream_t data_stream
Definition: internet.h:337
DWORD nCustHeaders
Definition: internet.h:365
netconn_t * netconn
Definition: internet.h:352
DWORD NETCON_set_timeout(netconn_t *connection, BOOL send, DWORD value) DECLSPEC_HIDDEN
time_t ConvertTimeString(LPCWSTR asctime) DECLSPEC_HIDDEN
Definition: utility.c:49
#define READ_BUFFER_SIZE
Definition: internet.h:342
LPWSTR proxyPassword
Definition: internet.h:297
void free_cookie(void) DECLSPEC_HIDDEN
Definition: cookie.c:1263
DWORD bytesWritten
Definition: internet.h:361
data_stream_t * data_stream
Definition: internet.h:381
BOOL init_urlcache(void) DECLSPEC_HIDDEN
Definition: urlcache.c:4036
GLsizeiptr size
Definition: glext.h:5919
DWORD get_cookie_header(const WCHAR *, const WCHAR *, WCHAR **) DECLSPEC_HIDDEN
Definition: cookie.c:640
#define GetProcessHeap()
Definition: compat.h:395
DWORD send_timeout
Definition: internet.h:311
LPWSTR verb
Definition: internet.h:351
BOOL is_blocking
Definition: internet.h:72
__wchar_t WCHAR
Definition: xmlstorage.h:180
LPCVOID NETCON_GetCert(netconn_t *connection) DECLSPEC_HIDDEN
object_header_t hdr
Definition: internet.h:304
DWORD HTTP_Connect(appinfo_t *, LPCWSTR, INTERNET_PORT nServerPort, LPCWSTR lpszUserName, LPCWSTR lpszPassword, DWORD dwFlags, DWORD_PTR dwContext, DWORD dwInternalFlags, HINTERNET *) DECLSPEC_HIDDEN
Definition: http.c:5806
INT WSAAPI send(IN SOCKET s, IN CONST CHAR FAR *buf, IN INT len, IN INT flags)
Definition: send.c:23
HINTERNET FTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, INTERNET_PORT nServerPort, LPCWSTR lpszUserName, LPCWSTR lpszPassword, DWORD dwFlags, DWORD_PTR dwContext, DWORD dwInternalFlags) DECLSPEC_HIDDEN
Definition: ftp.c:2425
struct list entry
DWORD set_cookie(substr_t, substr_t, substr_t, substr_t, DWORD) DECLSPEC_HIDDEN
Definition: cookie.c:906
FILETIME ftLastWriteTime
Definition: winbase.h:902
DWORD security_flags
Definition: internet.h:50
unsigned short WORD
Definition: ntddk_ex.h:93
#define INTERNET_HANDLE_TYPE_FTP_FILE
Definition: wininet.h:808
unsigned long DWORD
Definition: ntddk_ex.h:95
const WCHAR * host_port
Definition: internet.h:45
WCHAR cFileName[MAX_PATH]
Definition: winbase.h:919
BOOL is_committed
Definition: internet.h:253
DWORD read_size
Definition: internet.h:378
GLbitfield flags
Definition: glext.h:7161
DWORD create_netconn(BOOL, server_t *, DWORD, BOOL, DWORD, netconn_t **) DECLSPEC_HIDDEN
LPWSTR proxy
Definition: internet.h:294
const object_vtbl_t * vtbl
server_t * get_server(substr_t, INTERNET_PORT, BOOL, BOOL) DECLSPEC_HIDDEN
Definition: http.c:276
FILETIME ftLastWriteTime
Definition: winbase.h:914
DWORD dwFileAttributes
Definition: winbase.h:899
object_header_t * hdr
Definition: internet.h:391
DWORD security_flags
Definition: internet.h:353
int ret
DWORD send_timeout
Definition: internet.h:355
GLenum const GLvoid * addr
Definition: glext.h:9621
Definition: msg.h:34
const WCHAR * str
Definition: internet.h:200
collect_type_t
Definition: internet.h:60
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
uint32_t entry
Definition: isohybrid.c:63
DWORD connect_timeout
Definition: internet.h:299
static void WININET_find_data_WtoA(LPWIN32_FIND_DATAW dataW, LPWIN32_FIND_DATAA dataA)
Definition: internet.h:215
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
unsigned char BYTE
Definition: mem.h:68
WCHAR * name
Definition: internet.h:37
FILETIME ftLastAccessTime
Definition: winbase.h:913
#define INTERNET_HANDLE_TYPE_CONNECT_FTP
Definition: wininet.h:803
Definition: _list.h:228
uint32_t DWORD_PTR
Definition: typedefs.h:63
LPWSTR lpszField
Definition: internet.h:321
HINTERNET hInternet
Definition: internet.h:276
const data_stream_vtbl_t * vtbl
Definition: internet.h:333
const char * name
Definition: internet.h:468
DWORD content_read
Definition: internet.h:339
#define INTERNET_HANDLE_TYPE_HTTP_REQUEST
Definition: wininet.h:814
server_t * server
Definition: internet.h:348
DWORD dwReserved0
Definition: winbase.h:917
void server_release(server_t *) DECLSPEC_HIDDEN
Definition: http.c:229
HANDLE hCacheFile
Definition: internet.h:368
DWORD status_code
Definition: internet.h:358
BOOL mask_errors
Definition: internet.h:83
DWORD contentLength
Definition: internet.h:375
HMODULE WININET_hModule DECLSPEC_HIDDEN
object_header_t hdr
Definition: internet.h:292
DWORD dwInternalFlags
Definition: internet.h:282
DWORD dwReserved1
Definition: winbase.h:918
#define InterlockedIncrement
Definition: armddk.h:53
uint64_t DWORD64
Definition: typedefs.h:65
DWORD read_pos
Definition: internet.h:377
BOOL is_valid_netconn(netconn_t *) DECLSPEC_HIDDEN
__kernel_time_t time_t
Definition: linux.h:252
WORD wFlags
Definition: internet.h:323
async_task_proc_t proc
Definition: internet.h:390
#define HeapReAlloc
Definition: compat.h:393
int sock_recv(int fd, void *msg, size_t len, int flags) DECLSPEC_HIDDEN
DWORD receive_timeout
Definition: internet.h:356
unsigned int UINT
Definition: ndis.h:50
DWORD dwFileAttributes
Definition: winbase.h:911
struct HttpAuthInfo * proxyAuthInfo
Definition: internet.h:372
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define MultiByteToWideChar
Definition: compat.h:100
CRITICAL_SECTION read_section
Definition: internet.h:374
size_t len
Definition: internet.h:201
#define msg(x)
Definition: auth_time.c:54
Definition: mem.c:156
CONST void * LPCVOID
Definition: windef.h:191
BOOL read_gzip
Definition: internet.h:376
void req_file_release(req_file_t *) DECLSPEC_HIDDEN
Definition: internet.c:3901
BOOL WININET_Release(object_header_t *info) DECLSPEC_HIDDEN
Definition: internet.c:220
int addr_len
Definition: internet.h:41
DWORD nFileSizeHigh
Definition: winbase.h:903
WCHAR * scheme_host_port
Definition: internet.h:44
unsigned int ULONG
Definition: retypes.h:1
WCHAR * file_name
Definition: internet.h:251
void NETCON_unload(void) DECLSPEC_HIDDEN
INTERNET_STATUS_CALLBACK lpfnStatusCB
Definition: internet.h:285
static WCHAR * heap_strndupAtoW(const char *str, int len_a, DWORD *len_w)
Definition: internet.h:150
LPWSTR lpszValue
Definition: internet.h:322
static substr_t substr(const WCHAR *str, size_t len)
Definition: internet.h:204
WCHAR * url
Definition: internet.h:252
WCHAR * LPWSTR
Definition: xmlstorage.h:184
FILETIME ftCreationTime
Definition: winbase.h:912
LPWSTR password
Definition: internet.h:308
void server_addref(server_t *) DECLSPEC_HIDDEN
Definition: http.c:224
#define INTERNET_HANDLE_TYPE_INTERNET
Definition: wininet.h:802
BOOL WINAPI ReadFile(IN HANDLE hFile, IN LPVOID lpBuffer, IN DWORD nNumberOfBytesToRead, OUT LPDWORD lpNumberOfBytesRead OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:123
LPWSTR agent
Definition: internet.h:293
server_t * server
Definition: internet.h:75
LPWSTR proxyBypass
Definition: internet.h:295
object_header_t * get_handle_object(HINTERNET hinternet) DECLSPEC_HIDDEN
Definition: internet.c:185
WH_TYPE htype
Definition: internet.h:274
#define INTERNET_HANDLE_TYPE_CONNECT_HTTP
Definition: wininet.h:805
static LPWSTR heap_strdupW(LPCWSTR str)
Definition: internet.h:98
CRITICAL_SECTION headers_section
Definition: internet.h:363
DWORD NETCON_secure_connect(netconn_t *, server_t *) DECLSPEC_HIDDEN
CHAR cAlternateFileName[14]
Definition: winbase.h:908
void init_winsock(void) DECLSPEC_HIDDEN
DWORD bytesToWrite
Definition: internet.h:360
#define INTERNET_HANDLE_TYPE_FTP_FIND
Definition: wininet.h:806
static void size_t len
Definition: internet.h:94
DWORD content_length
Definition: internet.h:338
LPWSTR path
Definition: internet.h:350