ReactOS 0.4.17-dev-1190-g4c812f4
gopher.c
Go to the documentation of this file.
1#ifdef __REACTOS__
2#include "precomp.h"
3#else
4/*
5 * WININET - Gopher implementation
6 *
7 * Copyright 2003 Kirill Smelkov
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24#include <stdarg.h>
25
26#include "windef.h"
27#include "winbase.h"
28#include "wininet.h"
29
30#include "wine/debug.h"
31#endif /* defined(__REACTOS__) */
32
34
35/***********************************************************************
36 * GopherCreateLocatorA (WININET.@)
37 *
38 * Create a Gopher locator string from its component parts
39 *
40 * PARAMS
41 * lpszHost [I] host name
42 * nServerPort [I] port in host byteorder or INTERNET_INVALID_PORT_NUMBER for default
43 * lpszDisplayString [I] document/directory to display (NULL - default directory)
44 * lpszSelectorString [I] selector string for server (NULL - none)
45 * dwGopherType [I] selector type (see GOPHER_TYPE_xxx)
46 * lpszLocator [O] buffer for locator string
47 * lpdwBufferLength [I] locator buffer length
48 *
49 * RETURNS
50 * TRUE on success
51 * FALSE on failure
52 *
53 */
55 LPCSTR lpszHost,
56 INTERNET_PORT nServerPort,
57 LPCSTR lpszDisplayString,
58 LPCSTR lpszSelectorString,
59 DWORD dwGopherType,
60 LPSTR lpszLocator,
62)
63{
64 FIXME("stub\n");
65 return FALSE;
66}
67
68/***********************************************************************
69 * GopherCreateLocatorW (WININET.@)
70 *
71 * See GopherCreateLocatorA.
72 */
74 LPCWSTR lpszHost,
75 INTERNET_PORT nServerPort,
76 LPCWSTR lpszDisplayString,
77 LPCWSTR lpszSelectorString,
78 DWORD dwHopherType,
79 LPWSTR lpszLocator,
81)
82{
83 FIXME("stub\n");
84 return FALSE;
85}
86
87/***********************************************************************
88 * GopherFindFirstFileA (WININET.@)
89 *
90 * Create a session and locate the requested documents
91 *
92 * PARAMS
93 * hConnect [I] Handle to a Gopher session returned by InternetConnect
94 * lpszLocator [I] - address of a string containing the name of the item to locate.
95 * - Locator created by the GopherCreateLocator function.
96 * lpszSearchString [I] what to search for if this request is to an index server.
97 * Otherwise, this parameter should be NULL.
98 * lpFindData [O] retrieved information
99 * dwFlags [I] INTERNET_FLAG_{HYPERLINK, NEED_FILE, NO_CACHE_WRITE, RELOAD, RESYNCHRONIZE}
100 * dwContext [I] application private value
101 *
102 * RETURNS
103 * HINTERNET handle on success
104 * NULL on error
105 */
107 HINTERNET hConnect,
108 LPCSTR lpszLocator,
109 LPCSTR lpszSearchString,
111 lpFindData,
113 DWORD_PTR dwContext
114)
115{
116 FIXME("stub\n");
117 return NULL;
118}
119
120/***********************************************************************
121 * GopherFindFirstFileW (WININET.@)
122 *
123 * See GopherFindFirstFileA.
124 */
126 HINTERNET hConnect,
127 LPCWSTR lpszLocator,
128 LPCWSTR lpszSearchString,
130 lpFindData,
132 DWORD_PTR dwContext
133)
134{
135 FIXME("stub\n");
136 return NULL;
137}
138
139/***********************************************************************
140 * GopherGetAttributeA (WININET.@)
141 *
142 * Retrieves the specific attribute information from the server.
143 *
144 * RETURNS
145 * TRUE on success
146 * FALSE on failure
147 */
149 HINTERNET hConnect,
150 LPCSTR lpszLocator,
151 LPCSTR lpszAttributeName,
153 DWORD dwBufferLength,
154 LPDWORD lpdwCharactersReturned,
156 lpfnEnumerator,
157 DWORD_PTR dwContext
158)
159{
160 FIXME("stub\n");
161 return FALSE;
162}
163
164/***********************************************************************
165 * GopherGetAttributeW (WININET.@)
166 *
167 * See GopherGetAttributeA.
168 */
170 HINTERNET hConnect,
171 LPCWSTR lpszLocator,
172 LPCWSTR lpszAttributeName,
174 DWORD dwBufferLength,
175 LPDWORD lpdwCharactersReturned,
177 lpfnEnumerator,
178 DWORD_PTR dwContext
179)
180{
181 FIXME("stub\n");
182 return FALSE;
183}
184
185/***********************************************************************
186 * GopherGetLocatorTypeA (WININET.@)
187 *
188 * Parses a Gopher locator and determines its attributes.
189 *
190 * PARAMS
191 * lpszLocator [I] Address of the Gopher locator string to parse
192 * lpdwGopherType [O] destination for bitmasked type of locator
193 *
194 * RETURNS
195 * TRUE on success
196 * FALSE on failure
197 */
198BOOL WINAPI GopherGetLocatorTypeA(LPCSTR lpszLocator, LPDWORD lpdwGopherType)
199{
200 FIXME("stub\n");
201 return FALSE;
202}
203
204/***********************************************************************
205 * GopherGetLocatorTypeW (WININET.@)
206 *
207 * See GopherGetLocatorTypeA.
208 */
209BOOL WINAPI GopherGetLocatorTypeW(LPCWSTR lpszLocator, LPDWORD lpdwGopherType)
210{
211 FIXME("stub\n");
212 return FALSE;
213}
214
215/***********************************************************************
216 * GopherOpenFileA (WININET.@)
217 *
218 * Begins reading a Gopher data file from a Gopher server.
219 *
220 * PARAMS
221 * hConnect [I] handle to a Gopher session
222 * lpszLocator [I] file locator
223 * lpszView [I] file view (or default if NULL)
224 * dwFlags [I] INTERNET_FLAG_{HYPERLINK, NEED_FILE, NO_CACHE_WRITE, RELOAD, RESYNCHRONIZE}
225 * dwContext [I] application private value
226 *
227 * RETURNS
228 * handle on success
229 * NULL on error
230 */
232 HINTERNET hConnect,
233 LPCSTR lpszLocator,
234 LPCSTR lpszView,
236 DWORD_PTR dwContext
237)
238{
239 FIXME("stub\n");
240 return NULL;
241}
242
243/***********************************************************************
244 * GopherOpenFileW (WININET.@)
245 *
246 * See GopherOpenFileA.
247 */
249 HINTERNET hConnect,
250 LPCWSTR lpszLocator,
251 LPCWSTR lpszView,
253 DWORD_PTR dwContext
254)
255{
256 FIXME("stub\n");
257 return NULL;
258}
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
_Out_ LPWSTR lpBuffer
Definition: netsh.h:68
const char * LPCSTR
Definition: typedefs.h:52
const uint16_t * LPCWSTR
Definition: typedefs.h:57
uint32_t DWORD_PTR
Definition: typedefs.h:65
unsigned char * LPBYTE
Definition: typedefs.h:53
uint16_t * LPWSTR
Definition: typedefs.h:56
uint32_t * LPDWORD
Definition: typedefs.h:59
char * LPSTR
Definition: typedefs.h:51
#define WINAPI
Definition: msvc.h:6
WORD INTERNET_PORT
Definition: winhttp.h:43
_In_ _In_opt_ _Out_writes_bytes_to_opt_ lpdwBufferLength _Inout_ LPDWORD lpdwBufferLength
Definition: winhttp.h:1018
BOOL WINAPI GopherCreateLocatorA(LPCSTR lpszHost, INTERNET_PORT nServerPort, LPCSTR lpszDisplayString, LPCSTR lpszSelectorString, DWORD dwGopherType, LPSTR lpszLocator, LPDWORD lpdwBufferLength)
Definition: gopher.c:54
BOOL WINAPI GopherGetLocatorTypeW(LPCWSTR lpszLocator, LPDWORD lpdwGopherType)
Definition: gopher.c:209
BOOL WINAPI GopherGetAttributeW(HINTERNET hConnect, LPCWSTR lpszLocator, LPCWSTR lpszAttributeName, LPBYTE lpBuffer, DWORD dwBufferLength, LPDWORD lpdwCharactersReturned, GOPHER_ATTRIBUTE_ENUMERATORW lpfnEnumerator, DWORD_PTR dwContext)
Definition: gopher.c:169
HINTERNET WINAPI GopherFindFirstFileA(HINTERNET hConnect, LPCSTR lpszLocator, LPCSTR lpszSearchString, LPGOPHER_FIND_DATAA lpFindData, DWORD dwFlags, DWORD_PTR dwContext)
Definition: gopher.c:106
HINTERNET WINAPI GopherFindFirstFileW(HINTERNET hConnect, LPCWSTR lpszLocator, LPCWSTR lpszSearchString, LPGOPHER_FIND_DATAW lpFindData, DWORD dwFlags, DWORD_PTR dwContext)
Definition: gopher.c:125
BOOL WINAPI GopherGetLocatorTypeA(LPCSTR lpszLocator, LPDWORD lpdwGopherType)
Definition: gopher.c:198
HINTERNET WINAPI GopherOpenFileA(HINTERNET hConnect, LPCSTR lpszLocator, LPCSTR lpszView, DWORD dwFlags, DWORD_PTR dwContext)
Definition: gopher.c:231
HINTERNET WINAPI GopherOpenFileW(HINTERNET hConnect, LPCWSTR lpszLocator, LPCWSTR lpszView, DWORD dwFlags, DWORD_PTR dwContext)
Definition: gopher.c:248
BOOL WINAPI GopherCreateLocatorW(LPCWSTR lpszHost, INTERNET_PORT nServerPort, LPCWSTR lpszDisplayString, LPCWSTR lpszSelectorString, DWORD dwHopherType, LPWSTR lpszLocator, LPDWORD lpdwBufferLength)
Definition: gopher.c:73
BOOL WINAPI GopherGetAttributeA(HINTERNET hConnect, LPCSTR lpszLocator, LPCSTR lpszAttributeName, LPBYTE lpBuffer, DWORD dwBufferLength, LPDWORD lpdwCharactersReturned, GOPHER_ATTRIBUTE_ENUMERATORA lpfnEnumerator, DWORD_PTR dwContext)
Definition: gopher.c:148
#define GOPHER_ATTRIBUTE_ENUMERATORA
Definition: wininet_test.h:35
#define GOPHER_ATTRIBUTE_ENUMERATORW
Definition: wininet_test.h:36