ReactOS 0.4.15-dev-8131-g4988de4
gopher.c
Go to the documentation of this file.
1#ifdef __REACTOS__
2#include "precomp.h"
3#else/*
4 * WININET - Gopher implementation
5 *
6 * Copyright 2003 Kirill Smelkov
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#include <stdarg.h>
24
25#include "windef.h"
26#include "winbase.h"
27#include "wininet.h"
28
29#include "wine/debug.h"
30#endif /* defined(__REACTOS__) */
31
33
34/***********************************************************************
35 * GopherCreateLocatorA (WININET.@)
36 *
37 * Create a Gopher locator string from its component parts
38 *
39 * PARAMS
40 * lpszHost [I] host name
41 * nServerPort [I] port in host byteorder or INTERNET_INVALID_PORT_NUMBER for default
42 * lpszDisplayString [I] document/directory to display (NULL - default directory)
43 * lpszSelectorString [I] selector string for server (NULL - none)
44 * dwGopherType [I] selector type (see GOPHER_TYPE_xxx)
45 * lpszLocator [O] buffer for locator string
46 * lpdwBufferLength [I] locator buffer length
47 *
48 * RETURNS
49 * TRUE on success
50 * FALSE on failure
51 *
52 */
54 LPCSTR lpszHost,
55 INTERNET_PORT nServerPort,
56 LPCSTR lpszDisplayString,
57 LPCSTR lpszSelectorString,
58 DWORD dwGopherType,
59 LPSTR lpszLocator,
61)
62{
63 FIXME("stub\n");
64 return FALSE;
65}
66
67/***********************************************************************
68 * GopherCreateLocatorW (WININET.@)
69 *
70 * See GopherCreateLocatorA.
71 */
73 LPCWSTR lpszHost,
74 INTERNET_PORT nServerPort,
75 LPCWSTR lpszDisplayString,
76 LPCWSTR lpszSelectorString,
77 DWORD dwHopherType,
78 LPWSTR lpszLocator,
80)
81{
82 FIXME("stub\n");
83 return FALSE;
84}
85
86/***********************************************************************
87 * GopherFindFirstFileA (WININET.@)
88 *
89 * Create a session and locate the requested documents
90 *
91 * PARAMS
92 * hConnect [I] Handle to a Gopher session returned by InternetConnect
93 * lpszLocator [I] - address of a string containing the name of the item to locate.
94 * - Locator created by the GopherCreateLocator function.
95 * lpszSearchString [I] what to search for if this request is to an index server.
96 * Otherwise, this parameter should be NULL.
97 * lpFindData [O] retrieved information
98 * dwFlags [I] INTERNET_FLAG_{HYPERLINK, NEED_FILE, NO_CACHE_WRITE, RELOAD, RESYNCHRONIZE}
99 * dwContext [I] application private value
100 *
101 * RETURNS
102 * HINTERNET handle on success
103 * NULL on error
104 */
106 HINTERNET hConnect,
107 LPCSTR lpszLocator,
108 LPCSTR lpszSearchString,
110 lpFindData,
112 DWORD_PTR dwContext
113)
114{
115 FIXME("stub\n");
116 return NULL;
117}
118
119/***********************************************************************
120 * GopherFindFirstFileW (WININET.@)
121 *
122 * See GopherFindFirstFileA.
123 */
125 HINTERNET hConnect,
126 LPCWSTR lpszLocator,
127 LPCWSTR lpszSearchString,
129 lpFindData,
131 DWORD_PTR dwContext
132)
133{
134 FIXME("stub\n");
135 return NULL;
136}
137
138/***********************************************************************
139 * GopherGetAttributeA (WININET.@)
140 *
141 * Retrieves the specific attribute information from the server.
142 *
143 * RETURNS
144 * TRUE on success
145 * FALSE on failure
146 */
148 HINTERNET hConnect,
149 LPCSTR lpszLocator,
150 LPCSTR lpszAttributeName,
152 DWORD dwBufferLength,
153 LPDWORD lpdwCharactersReturned,
155 lpfnEnumerator,
156 DWORD_PTR dwContext
157)
158{
159 FIXME("stub\n");
160 return FALSE;
161}
162
163/***********************************************************************
164 * GopherGetAttributeW (WININET.@)
165 *
166 * See GopherGetAttributeA.
167 */
169 HINTERNET hConnect,
170 LPCWSTR lpszLocator,
171 LPCWSTR lpszAttributeName,
173 DWORD dwBufferLength,
174 LPDWORD lpdwCharactersReturned,
176 lpfnEnumerator,
177 DWORD_PTR dwContext
178)
179{
180 FIXME("stub\n");
181 return FALSE;
182}
183
184/***********************************************************************
185 * GopherGetLocatorTypeA (WININET.@)
186 *
187 * Parses a Gopher locator and determines its attributes.
188 *
189 * PARAMS
190 * lpszLocator [I] Address of the Gopher locator string to parse
191 * lpdwGopherType [O] destination for bitmasked type of locator
192 *
193 * RETURNS
194 * TRUE on success
195 * FALSE on failure
196 */
197BOOL WINAPI GopherGetLocatorTypeA(LPCSTR lpszLocator, LPDWORD lpdwGopherType)
198{
199 FIXME("stub\n");
200 return FALSE;
201}
202
203/***********************************************************************
204 * GopherGetLocatorTypeW (WININET.@)
205 *
206 * See GopherGetLocatorTypeA.
207 */
208BOOL WINAPI GopherGetLocatorTypeW(LPCWSTR lpszLocator, LPDWORD lpdwGopherType)
209{
210 FIXME("stub\n");
211 return FALSE;
212}
213
214/***********************************************************************
215 * GopherOpenFileA (WININET.@)
216 *
217 * Begins reading a Gopher data file from a Gopher server.
218 *
219 * PARAMS
220 * hConnect [I] handle to a Gopher session
221 * lpszLocator [I] file locator
222 * lpszView [I] file view (or default if NULL)
223 * dwFlags [I] INTERNET_FLAG_{HYPERLINK, NEED_FILE, NO_CACHE_WRITE, RELOAD, RESYNCHRONIZE}
224 * dwContext [I] application private value
225 *
226 * RETURNS
227 * handle on success
228 * NULL on error
229 */
231 HINTERNET hConnect,
232 LPCSTR lpszLocator,
233 LPCSTR lpszView,
235 DWORD_PTR dwContext
236)
237{
238 FIXME("stub\n");
239 return NULL;
240}
241
242/***********************************************************************
243 * GopherOpenFileW (WININET.@)
244 *
245 * See GopherOpenFileA.
246 */
248 HINTERNET hConnect,
249 LPCWSTR lpszLocator,
250 LPCWSTR lpszView,
252 DWORD_PTR dwContext
253)
254{
255 FIXME("stub\n");
256 return NULL;
257}
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: debug.h:114
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:175
#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
uint32_t DWORD_PTR
Definition: typedefs.h:65
unsigned char * LPBYTE
Definition: typedefs.h:53
uint32_t * LPDWORD
Definition: typedefs.h:59
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
#define WINAPI
Definition: msvc.h:6
WORD INTERNET_PORT
Definition: winhttp.h:38
_In_ _In_opt_ _Out_writes_bytes_to_opt_ lpdwBufferLength _Inout_ LPDWORD lpdwBufferLength
Definition: winhttp.h:675
BOOL WINAPI GopherCreateLocatorA(LPCSTR lpszHost, INTERNET_PORT nServerPort, LPCSTR lpszDisplayString, LPCSTR lpszSelectorString, DWORD dwGopherType, LPSTR lpszLocator, LPDWORD lpdwBufferLength)
Definition: gopher.c:53
BOOL WINAPI GopherGetLocatorTypeW(LPCWSTR lpszLocator, LPDWORD lpdwGopherType)
Definition: gopher.c:208
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:168
HINTERNET WINAPI GopherFindFirstFileA(HINTERNET hConnect, LPCSTR lpszLocator, LPCSTR lpszSearchString, LPGOPHER_FIND_DATAA lpFindData, DWORD dwFlags, DWORD_PTR dwContext)
Definition: gopher.c:105
HINTERNET WINAPI GopherFindFirstFileW(HINTERNET hConnect, LPCWSTR lpszLocator, LPCWSTR lpszSearchString, LPGOPHER_FIND_DATAW lpFindData, DWORD dwFlags, DWORD_PTR dwContext)
Definition: gopher.c:124
BOOL WINAPI GopherGetLocatorTypeA(LPCSTR lpszLocator, LPDWORD lpdwGopherType)
Definition: gopher.c:197
HINTERNET WINAPI GopherOpenFileA(HINTERNET hConnect, LPCSTR lpszLocator, LPCSTR lpszView, DWORD dwFlags, DWORD_PTR dwContext)
Definition: gopher.c:230
HINTERNET WINAPI GopherOpenFileW(HINTERNET hConnect, LPCWSTR lpszLocator, LPCWSTR lpszView, DWORD dwFlags, DWORD_PTR dwContext)
Definition: gopher.c:247
BOOL WINAPI GopherCreateLocatorW(LPCWSTR lpszHost, INTERNET_PORT nServerPort, LPCWSTR lpszDisplayString, LPCWSTR lpszSelectorString, DWORD dwHopherType, LPWSTR lpszLocator, LPDWORD lpdwBufferLength)
Definition: gopher.c:72
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:147
#define GOPHER_ATTRIBUTE_ENUMERATORA
Definition: wininet_test.h:35
#define GOPHER_ATTRIBUTE_ENUMERATORW
Definition: wininet_test.h:36
const char * LPCSTR
Definition: xmlstorage.h:183
char * LPSTR
Definition: xmlstorage.h:182
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185