xref: /reactos/dll/win32/wininet/gopher.c (revision 84344399)
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 
32 WINE_DEFAULT_DEBUG_CHANNEL(wininet);
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  */
53 BOOL WINAPI GopherCreateLocatorA(
54  LPCSTR        lpszHost,
55  INTERNET_PORT nServerPort,
56  LPCSTR        lpszDisplayString,
57  LPCSTR        lpszSelectorString,
58  DWORD         dwGopherType,
59  LPSTR         lpszLocator,
60  LPDWORD       lpdwBufferLength
61 )
62 {
63     FIXME("stub\n");
64     return FALSE;
65 }
66 
67 /***********************************************************************
68  *           GopherCreateLocatorW (WININET.@)
69  *
70  * See GopherCreateLocatorA.
71  */
72 BOOL WINAPI GopherCreateLocatorW(
73  LPCWSTR       lpszHost,
74  INTERNET_PORT nServerPort,
75  LPCWSTR       lpszDisplayString,
76  LPCWSTR       lpszSelectorString,
77  DWORD         dwHopherType,
78  LPWSTR        lpszLocator,
79  LPDWORD       lpdwBufferLength
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  */
105 HINTERNET WINAPI GopherFindFirstFileA(
106  HINTERNET hConnect,
107  LPCSTR    lpszLocator,
108  LPCSTR    lpszSearchString,
109  LPGOPHER_FIND_DATAA
110            lpFindData,
111  DWORD     dwFlags,
112  DWORD_PTR dwContext
113 )
114 {
115     FIXME("stub\n");
116     return NULL;
117 }
118 
119 /***********************************************************************
120  *           GopherFindFirstFileW (WININET.@)
121  *
122  * See GopherFindFirstFileA.
123  */
124 HINTERNET WINAPI GopherFindFirstFileW(
125  HINTERNET hConnect,
126  LPCWSTR   lpszLocator,
127  LPCWSTR   lpszSearchString,
128  LPGOPHER_FIND_DATAW
129            lpFindData,
130  DWORD     dwFlags,
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  */
147 BOOL WINAPI GopherGetAttributeA(
148  HINTERNET hConnect,
149  LPCSTR    lpszLocator,
150  LPCSTR    lpszAttributeName,
151  LPBYTE    lpBuffer,
152  DWORD     dwBufferLength,
153  LPDWORD   lpdwCharactersReturned,
154  GOPHER_ATTRIBUTE_ENUMERATORA
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  */
168 BOOL WINAPI GopherGetAttributeW(
169  HINTERNET hConnect,
170  LPCWSTR   lpszLocator,
171  LPCWSTR   lpszAttributeName,
172  LPBYTE    lpBuffer,
173  DWORD     dwBufferLength,
174  LPDWORD   lpdwCharactersReturned,
175  GOPHER_ATTRIBUTE_ENUMERATORW
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  */
197 BOOL 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  */
208 BOOL 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  */
230 HINTERNET WINAPI GopherOpenFileA(
231  HINTERNET hConnect,
232  LPCSTR    lpszLocator,
233  LPCSTR    lpszView,
234  DWORD     dwFlags,
235  DWORD_PTR dwContext
236 )
237 {
238     FIXME("stub\n");
239     return NULL;
240 }
241 
242 /***********************************************************************
243  *           GopherOpenFileW (WININET.@)
244  *
245  * See GopherOpenFileA.
246  */
247 HINTERNET WINAPI GopherOpenFileW(
248  HINTERNET hConnect,
249  LPCWSTR   lpszLocator,
250  LPCWSTR   lpszView,
251  DWORD     dwFlags,
252  DWORD_PTR dwContext
253 )
254 {
255     FIXME("stub\n");
256     return NULL;
257 }
258