source: trunk/src/wininet/internet.h@ 2912

Last change on this file since 2912 was 2624, checked in by sandervl, 26 years ago

Ported Corel wininet Wine version

File size: 2.5 KB
Line 
1#ifndef _WINE_INTERNET_H_
2#define _WINE_INTERNET_H_
3
4#ifdef __WIN32OS2__
5#define close closesocket
6typedef int socklen_t;
7
8#include <time.h>
9
10#endif
11
12typedef enum
13{
14 WH_HINIT,
15 WH_HFTPSESSION,
16 WH_HGOPHERSESSION,
17 WH_HHTTPSESSION,
18 WH_HHTTPREQ,
19 WH_HFILE,
20 WH_HFINDNEXT,
21} WH_TYPE;
22
23typedef struct _WININETHANDLEHEADER
24{
25 WH_TYPE htype;
26 DWORD dwFlags;
27 DWORD dwContext;
28 struct _WININETHANDLEHEADER *lpwhparent;
29} WININETHANDLEHEADER, *LPWININETHANDLEHEADER;
30
31
32typedef struct
33{
34 WININETHANDLEHEADER hdr;
35 LPSTR lpszAgent;
36 LPSTR lpszProxy;
37 LPSTR lpszProxyBypass;
38 DWORD dwAccessType;
39 INTERNET_STATUS_CALLBACK lpfnStatusCB;
40} WININETAPPINFOA, *LPWININETAPPINFOA;
41
42
43typedef struct
44{
45 WININETHANDLEHEADER hdr;
46 LPSTR lpszServerName;
47 LPSTR lpszUserName;
48 INTERNET_PORT nServerPort;
49 struct sockaddr_in socketAddress;
50 struct hostent *phostent;
51} WININETHTTPSESSIONA, *LPWININETHTTPSESSIONA;
52
53
54typedef struct
55{
56 WININETHANDLEHEADER hdr;
57 LPSTR lpszPath;
58 LPSTR lpszReferrer;
59 LPSTR lpszAcceptTypes;
60 LPSTR lpszVerb;
61 LPSTR lpszHostName;
62 LPSTR lpszRedirect;
63 int nSocketFD;
64 int statusCode;
65 int contentLength;
66 time_t nSystemTime;
67} WININETHTTPREQA, *LPWININETHTTPREQA;
68
69
70typedef struct
71{
72 WININETHANDLEHEADER hdr;
73 int sndSocket;
74 int lstnSocket;
75 struct sockaddr_in socketAddress;
76 struct sockaddr_in lstnSocketAddress;
77 struct hostent *phostent;
78 LPSTR lpszPassword;
79 LPSTR lpszUserName;
80 LPSTR lpszResponseBuffer;
81} WININETFTPSESSIONA, *LPWININETFTPSESSIONA;
82
83
84typedef struct
85{
86 WININETHANDLEHEADER hdr;
87 int nDataSocket;
88} WININETFILE, *LPWININETFILE;
89
90
91typedef struct
92{
93 BOOL bIsDirectory;
94 LPSTR lpszName;
95 DWORD nSize;
96 struct tm tmLastModified;
97 unsigned short permissions;
98} FILEPROPERTIESA, *LPFILEPROPERTIESA;
99
100
101typedef struct
102{
103 WININETHANDLEHEADER hdr;
104 int index;
105 DWORD size;
106 LPFILEPROPERTIESA lpafp;
107} WININETFINDNEXTA, *LPWININETFINDNEXTA;
108
109time_t ConvertTimeString(LPCSTR asctime);
110
111HINTERNET FTP_Connect(HINTERNET hInterent, LPCSTR lpszServerName,
112 INTERNET_PORT nServerPort, LPCSTR lpszUserName,
113 LPCSTR lpszPassword, DWORD dwFlags, DWORD dwContext);
114
115BOOL GetAddress(LPCSTR lpszServerName, INTERNET_PORT nServerPort,
116 struct hostent **phe, struct sockaddr_in *psa);
117
118int WriteDataToStream(int nDataSocket, LPCVOID Buffer, DWORD BytesToWrite);
119int ReadDataFromStream(int nDataSocket, LPVOID Buffer, DWORD BytesToRead);
120BOOL FTP_CloseSessionHandle(LPWININETFTPSESSIONA lpwfs);
121BOOL FTP_CloseFindNextHandle(LPWININETFINDNEXTA lpwfn);
122
123#endif /* _WINE_INTERNET_H_ */
Note: See TracBrowser for help on using the repository browser.