ReactOS 0.4.15-dev-8102-g108db8f
ftp.c File Reference
#include "urlmon_main.h"
#include "shlwapi.h"
#include "wine/debug.h"
Include dependency graph for ftp.c:

Go to the source code of this file.

Classes

class  FtpProtocol
 

Macros

#define NO_SHLWAPI_REG
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (urlmon)
 
static FtpProtocolimpl_from_IUnknown (IUnknown *iface)
 
static FtpProtocolimpl_from_IInternetProtocolEx (IInternetProtocolEx *iface)
 
static FtpProtocolimpl_from_IInternetPriority (IInternetPriority *iface)
 
static FtpProtocolimpl_from_IWinInetHttpInfo (IWinInetHttpInfo *iface)
 
static FtpProtocolimpl_from_Protocol (Protocol *prot)
 
static HRESULT FtpProtocol_open_request (Protocol *prot, IUri *uri, DWORD request_flags, HINTERNET internet_session, IInternetBindInfo *bind_info)
 
static HRESULT FtpProtocol_end_request (Protocol *prot)
 
static HRESULT FtpProtocol_start_downloading (Protocol *prot)
 
static void FtpProtocol_close_connection (Protocol *prot)
 
static void FtpProtocol_on_error (Protocol *prot, DWORD error)
 
static HRESULT WINAPI FtpProtocolUnk_QueryInterface (IUnknown *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI FtpProtocolUnk_AddRef (IUnknown *iface)
 
static ULONG WINAPI FtpProtocolUnk_Release (IUnknown *iface)
 
static HRESULT WINAPI FtpProtocol_QueryInterface (IInternetProtocolEx *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI FtpProtocol_AddRef (IInternetProtocolEx *iface)
 
static ULONG WINAPI FtpProtocol_Release (IInternetProtocolEx *iface)
 
static HRESULT WINAPI FtpProtocol_Start (IInternetProtocolEx *iface, LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved)
 
static HRESULT WINAPI FtpProtocol_Continue (IInternetProtocolEx *iface, PROTOCOLDATA *pProtocolData)
 
static HRESULT WINAPI FtpProtocol_Abort (IInternetProtocolEx *iface, HRESULT hrReason, DWORD dwOptions)
 
static HRESULT WINAPI FtpProtocol_Terminate (IInternetProtocolEx *iface, DWORD dwOptions)
 
static HRESULT WINAPI FtpProtocol_Suspend (IInternetProtocolEx *iface)
 
static HRESULT WINAPI FtpProtocol_Resume (IInternetProtocolEx *iface)
 
static HRESULT WINAPI FtpProtocol_Read (IInternetProtocolEx *iface, void *pv, ULONG cb, ULONG *pcbRead)
 
static HRESULT WINAPI FtpProtocol_Seek (IInternetProtocolEx *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
 
static HRESULT WINAPI FtpProtocol_LockRequest (IInternetProtocolEx *iface, DWORD dwOptions)
 
static HRESULT WINAPI FtpProtocol_UnlockRequest (IInternetProtocolEx *iface)
 
static HRESULT WINAPI FtpProtocol_StartEx (IInternetProtocolEx *iface, IUri *pUri, IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE *dwReserved)
 
static HRESULT WINAPI FtpPriority_QueryInterface (IInternetPriority *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI FtpPriority_AddRef (IInternetPriority *iface)
 
static ULONG WINAPI FtpPriority_Release (IInternetPriority *iface)
 
static HRESULT WINAPI FtpPriority_SetPriority (IInternetPriority *iface, LONG nPriority)
 
static HRESULT WINAPI FtpPriority_GetPriority (IInternetPriority *iface, LONG *pnPriority)
 
static HRESULT WINAPI HttpInfo_QueryInterface (IWinInetHttpInfo *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI HttpInfo_AddRef (IWinInetHttpInfo *iface)
 
static ULONG WINAPI HttpInfo_Release (IWinInetHttpInfo *iface)
 
static HRESULT WINAPI HttpInfo_QueryOption (IWinInetHttpInfo *iface, DWORD dwOption, void *pBuffer, DWORD *pcbBuffer)
 
static HRESULT WINAPI HttpInfo_QueryInfo (IWinInetHttpInfo *iface, DWORD dwOption, void *pBuffer, DWORD *pcbBuffer, DWORD *pdwFlags, DWORD *pdwReserved)
 
HRESULT FtpProtocol_Construct (IUnknown *outer, void **ppv)
 

Variables

static const ProtocolVtbl AsyncProtocolVtbl
 
static const IUnknownVtbl FtpProtocolUnkVtbl
 
static const IInternetProtocolExVtbl FtpProtocolVtbl
 
static const IInternetPriorityVtbl FtpPriorityVtbl
 
static const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl
 

Macro Definition Documentation

◆ NO_SHLWAPI_REG

#define NO_SHLWAPI_REG

Definition at line 21 of file ftp.c.

Function Documentation

◆ FtpPriority_AddRef()

static ULONG WINAPI FtpPriority_AddRef ( IInternetPriority iface)
static

Definition at line 360 of file ftp.c.

361{
363 return IInternetProtocolEx_AddRef(&This->IInternetProtocolEx_iface);
364}
static FtpProtocol * impl_from_IInternetPriority(IInternetPriority *iface)
Definition: ftp.c:50

◆ FtpPriority_GetPriority()

static HRESULT WINAPI FtpPriority_GetPriority ( IInternetPriority iface,
LONG pnPriority 
)
static

Definition at line 382 of file ftp.c.

383{
385
386 TRACE("(%p)->(%p)\n", This, pnPriority);
387
388 *pnPriority = This->base.priority;
389 return S_OK;
390}
#define S_OK
Definition: intsafe.h:52
#define TRACE(s)
Definition: solgame.cpp:4

◆ FtpPriority_QueryInterface()

static HRESULT WINAPI FtpPriority_QueryInterface ( IInternetPriority iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 354 of file ftp.c.

355{
357 return IInternetProtocolEx_QueryInterface(&This->IInternetProtocolEx_iface, riid, ppv);
358}
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39

◆ FtpPriority_Release()

static ULONG WINAPI FtpPriority_Release ( IInternetPriority iface)
static

Definition at line 366 of file ftp.c.

367{
369 return IInternetProtocolEx_Release(&This->IInternetProtocolEx_iface);
370}

◆ FtpPriority_SetPriority()

static HRESULT WINAPI FtpPriority_SetPriority ( IInternetPriority iface,
LONG  nPriority 
)
static

Definition at line 372 of file ftp.c.

373{
375
376 TRACE("(%p)->(%d)\n", This, nPriority);
377
378 This->base.priority = nPriority;
379 return S_OK;
380}

◆ FtpProtocol_Abort()

static HRESULT WINAPI FtpProtocol_Abort ( IInternetProtocolEx iface,
HRESULT  hrReason,
DWORD  dwOptions 
)
static

Definition at line 246 of file ftp.c.

248{
250
251 TRACE("(%p)->(%08x %08x)\n", This, hrReason, dwOptions);
252
253 return protocol_abort(&This->base, hrReason);
254}
static FtpProtocol * impl_from_IInternetProtocolEx(IInternetProtocolEx *iface)
Definition: ftp.c:45
HRESULT protocol_abort(Protocol *protocol, HRESULT reason)
Definition: protocol.c:518
DWORD dwOptions
Definition: solitaire.cpp:25

◆ FtpProtocol_AddRef()

static ULONG WINAPI FtpProtocol_AddRef ( IInternetProtocolEx iface)
static

Definition at line 201 of file ftp.c.

202{
204 TRACE("(%p)\n", This);
205 return IUnknown_AddRef(This->outer);
206}

◆ FtpProtocol_close_connection()

static void FtpProtocol_close_connection ( Protocol prot)
static

Definition at line 111 of file ftp.c.

112{
113}

◆ FtpProtocol_Construct()

HRESULT FtpProtocol_Construct ( IUnknown outer,
void **  ppv 
)

Definition at line 454 of file ftp.c.

455{
457
458 TRACE("(%p %p)\n", outer, ppv);
459
461
462 ret = heap_alloc_zero(sizeof(FtpProtocol));
463
464 ret->base.vtbl = &AsyncProtocolVtbl;
465 ret->IUnknown_inner.lpVtbl = &FtpProtocolUnkVtbl;
466 ret->IInternetProtocolEx_iface.lpVtbl = &FtpProtocolVtbl;
467 ret->IInternetPriority_iface.lpVtbl = &FtpPriorityVtbl;
468 ret->IWinInetHttpInfo_iface.lpVtbl = &WinInetHttpInfoVtbl;
469 ret->ref = 1;
470 ret->outer = outer ? outer : &ret->IUnknown_inner;
471
472 *ppv = &ret->IUnknown_inner;
473 return S_OK;
474}
static const IInternetPriorityVtbl FtpPriorityVtbl
Definition: ftp.c:392
static const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl
Definition: ftp.c:446
static const ProtocolVtbl AsyncProtocolVtbl
Definition: ftp.c:120
static const IUnknownVtbl FtpProtocolUnkVtbl
Definition: ftp.c:188
static const IInternetProtocolExVtbl FtpProtocolVtbl
Definition: ftp.c:337
static void URLMON_LockModule(void)
Definition: urlmon_main.h:68
int ret

◆ FtpProtocol_Continue()

static HRESULT WINAPI FtpProtocol_Continue ( IInternetProtocolEx iface,
PROTOCOLDATA *  pProtocolData 
)
static

Definition at line 237 of file ftp.c.

238{
240
241 TRACE("(%p)->(%p)\n", This, pProtocolData);
242
243 return protocol_continue(&This->base, pProtocolData);
244}
HRESULT protocol_continue(Protocol *protocol, PROTOCOLDATA *data)
Definition: protocol.c:355

◆ FtpProtocol_end_request()

static HRESULT FtpProtocol_end_request ( Protocol prot)
static

Definition at line 91 of file ftp.c.

92{
93 return E_NOTIMPL;
94}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ FtpProtocol_LockRequest()

static HRESULT WINAPI FtpProtocol_LockRequest ( IInternetProtocolEx iface,
DWORD  dwOptions 
)
static

Definition at line 298 of file ftp.c.

299{
301
302 TRACE("(%p)->(%08x)\n", This, dwOptions);
303
304 return protocol_lock_request(&This->base);
305}
HRESULT protocol_lock_request(Protocol *protocol)
Definition: protocol.c:498

◆ FtpProtocol_on_error()

static void FtpProtocol_on_error ( Protocol prot,
DWORD  error 
)
static

Definition at line 115 of file ftp.c.

116{
117 FIXME("(%p) %d - stub\n", prot, error);
118}
#define FIXME(fmt,...)
Definition: debug.h:114
#define error(str)
Definition: mkdosfs.c:1605

◆ FtpProtocol_open_request()

static HRESULT FtpProtocol_open_request ( Protocol prot,
IUri uri,
DWORD  request_flags,
HINTERNET  internet_session,
IInternetBindInfo bind_info 
)
static

Definition at line 65 of file ftp.c.

67{
69 DWORD path_size = 0;
70 BSTR url;
72
73 hres = IUri_GetAbsoluteUri(uri, &url);
74 if(FAILED(hres))
75 return hres;
76
78 if(SUCCEEDED(hres)) {
79 This->base.request = InternetOpenUrlW(internet_session, url, NULL, 0,
81 (DWORD_PTR)&This->base);
82 if (!This->base.request && GetLastError() != ERROR_IO_PENDING) {
83 WARN("InternetOpenUrl failed: %d\n", GetLastError());
84 hres = INET_E_RESOURCE_NOT_FOUND;
85 }
86 }
88 return hres;
89}
#define WARN(fmt,...)
Definition: debug.h:115
#define ERROR_IO_PENDING
Definition: dderror.h:15
#define NULL
Definition: types.h:112
OLECHAR * BSTR
Definition: compat.h:2293
HRESULT WINAPI UrlUnescapeW(LPWSTR pszUrl, LPWSTR pszUnescaped, LPDWORD pcchUnescaped, DWORD dwFlags)
Definition: url.c:1367
static FtpProtocol * impl_from_Protocol(Protocol *prot)
Definition: ftp.c:60
static HINTERNET internet_session
Definition: protocol.c:288
HINTERNET WINAPI InternetOpenUrlW(HINTERNET hInternet, LPCWSTR lpszUrl, LPCWSTR lpszHeaders, DWORD dwHeadersLength, DWORD dwFlags, DWORD_PTR dwContext)
Definition: internet.c:3722
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
static const WCHAR url[]
Definition: encode.c:1432
HRESULT hres
Definition: protocol.c:465
const char * uri
Definition: sec_mgr.c:1588
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define URL_UNESCAPE_INPLACE
Definition: shlwapi.h:1224
uint32_t DWORD_PTR
Definition: typedefs.h:65
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define INTERNET_FLAG_PASSIVE
Definition: wininet.h:65
#define INTERNET_FLAG_EXISTING_CONNECT
Definition: wininet.h:63

◆ FtpProtocol_QueryInterface()

static HRESULT WINAPI FtpProtocol_QueryInterface ( IInternetProtocolEx iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 194 of file ftp.c.

195{
197 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
198 return IUnknown_QueryInterface(This->outer, riid, ppv);
199}
#define debugstr_guid
Definition: kernel32.h:35

◆ FtpProtocol_Read()

static HRESULT WINAPI FtpProtocol_Read ( IInternetProtocolEx iface,
void pv,
ULONG  cb,
ULONG pcbRead 
)
static

Definition at line 280 of file ftp.c.

282{
284
285 TRACE("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead);
286
287 return protocol_read(&This->base, pv, cb, pcbRead);
288}
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33
static int protocol_read
Definition: htmldoc.c:205

◆ FtpProtocol_Release()

static ULONG WINAPI FtpProtocol_Release ( IInternetProtocolEx iface)
static

Definition at line 208 of file ftp.c.

209{
211 TRACE("(%p)\n", This);
212 return IUnknown_Release(This->outer);
213}

◆ FtpProtocol_Resume()

static HRESULT WINAPI FtpProtocol_Resume ( IInternetProtocolEx iface)
static

Definition at line 273 of file ftp.c.

274{
276 FIXME("(%p)\n", This);
277 return E_NOTIMPL;
278}

◆ FtpProtocol_Seek()

static HRESULT WINAPI FtpProtocol_Seek ( IInternetProtocolEx iface,
LARGE_INTEGER  dlibMove,
DWORD  dwOrigin,
ULARGE_INTEGER plibNewPosition 
)
static

Definition at line 290 of file ftp.c.

292{
294 FIXME("(%p)->(%d %d %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
295 return E_NOTIMPL;
296}
struct _LARGE_INTEGER::@2299 u

◆ FtpProtocol_Start()

static HRESULT WINAPI FtpProtocol_Start ( IInternetProtocolEx iface,
LPCWSTR  szUrl,
IInternetProtocolSink pOIProtSink,
IInternetBindInfo pOIBindInfo,
DWORD  grfPI,
HANDLE_PTR  dwReserved 
)
static

Definition at line 215 of file ftp.c.

218{
220 IUri *uri;
222
223 TRACE("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink,
224 pOIBindInfo, grfPI, dwReserved);
225
226 hres = CreateUri(szUrl, 0, 0, &uri);
227 if(FAILED(hres))
228 return hres;
229
230 hres = IInternetProtocolEx_StartEx(&This->IInternetProtocolEx_iface, uri, pOIProtSink,
231 pOIBindInfo, grfPI, (HANDLE*)dwReserved);
232
233 IUri_Release(uri);
234 return hres;
235}
HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IUri **ppURI)
Definition: uri.c:5700
#define debugstr_w
Definition: kernel32.h:32
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95

◆ FtpProtocol_start_downloading()

static HRESULT FtpProtocol_start_downloading ( Protocol prot)
static

Definition at line 96 of file ftp.c.

97{
99 DWORD size;
100 BOOL res;
101
102 res = FtpGetFileSize(This->base.request, &size);
103 if(res)
104 This->base.content_length = size;
105 else
106 WARN("FtpGetFileSize failed: %d\n", GetLastError());
107
108 return S_OK;
109}
DWORD WINAPI FtpGetFileSize(HINTERNET hFile, LPDWORD lpdwFileSizeHigh)
Definition: ftp.c:1757
unsigned int BOOL
Definition: ntddk_ex.h:94
GLsizeiptr size
Definition: glext.h:5919
GLuint res
Definition: glext.h:9613

◆ FtpProtocol_StartEx()

static HRESULT WINAPI FtpProtocol_StartEx ( IInternetProtocolEx iface,
IUri pUri,
IInternetProtocolSink pOIProtSink,
IInternetBindInfo pOIBindInfo,
DWORD  grfPI,
HANDLE dwReserved 
)
static

Definition at line 316 of file ftp.c.

319{
321 DWORD scheme = 0;
323
324 TRACE("(%p)->(%p %p %p %08x %p)\n", This, pUri, pOIProtSink,
325 pOIBindInfo, grfPI, dwReserved);
326
327 hres = IUri_GetScheme(pUri, &scheme);
328 if(FAILED(hres))
329 return hres;
331 return MK_E_SYNTAX;
332
333 return protocol_start(&This->base, (IInternetProtocol*)&This->IInternetProtocolEx_iface, pUri,
334 pOIProtSink, pOIBindInfo);
335}
#define protocol_start(p, u, e)
Definition: protocol.c:303
DWORD scheme
@ URL_SCHEME_FTP
Definition: shlwapi.h:1147
#define MK_E_SYNTAX
Definition: winerror.h:2785

◆ FtpProtocol_Suspend()

static HRESULT WINAPI FtpProtocol_Suspend ( IInternetProtocolEx iface)
static

Definition at line 266 of file ftp.c.

267{
269 FIXME("(%p)\n", This);
270 return E_NOTIMPL;
271}

◆ FtpProtocol_Terminate()

static HRESULT WINAPI FtpProtocol_Terminate ( IInternetProtocolEx iface,
DWORD  dwOptions 
)
static

Definition at line 256 of file ftp.c.

257{
259
260 TRACE("(%p)->(%08x)\n", This, dwOptions);
261
263 return S_OK;
264}
void protocol_close_connection(Protocol *protocol)
Definition: protocol.c:531

◆ FtpProtocol_UnlockRequest()

static HRESULT WINAPI FtpProtocol_UnlockRequest ( IInternetProtocolEx iface)
static

Definition at line 307 of file ftp.c.

308{
310
311 TRACE("(%p)\n", This);
312
313 return protocol_unlock_request(&This->base);
314}
HRESULT protocol_unlock_request(Protocol *protocol)
Definition: protocol.c:506

◆ FtpProtocolUnk_AddRef()

static ULONG WINAPI FtpProtocolUnk_AddRef ( IUnknown iface)
static

Definition at line 163 of file ftp.c.

164{
167 TRACE("(%p) ref=%d\n", This, ref);
168 return ref;
169}
#define InterlockedIncrement
Definition: armddk.h:53
static FtpProtocol * impl_from_IUnknown(IUnknown *iface)
Definition: ftp.c:40
long LONG
Definition: pedump.c:60
Definition: send.c:48

◆ FtpProtocolUnk_QueryInterface()

static HRESULT WINAPI FtpProtocolUnk_QueryInterface ( IUnknown iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 128 of file ftp.c.

129{
131
133 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
134 *ppv = &This->IUnknown_inner;
135 }else if(IsEqualGUID(&IID_IInternetProtocolRoot, riid)) {
136 TRACE("(%p)->(IID_IInternetProtocolRoot %p)\n", This, ppv);
137 *ppv = &This->IInternetProtocolEx_iface;
138 }else if(IsEqualGUID(&IID_IInternetProtocol, riid)) {
139 TRACE("(%p)->(IID_IInternetProtocol %p)\n", This, ppv);
140 *ppv = &This->IInternetProtocolEx_iface;
141 }else if(IsEqualGUID(&IID_IInternetProtocolEx, riid)) {
142 TRACE("(%p)->(IID_IInternetProtocolEx %p)\n", This, ppv);
143 *ppv = &This->IInternetProtocolEx_iface;
144 }else if(IsEqualGUID(&IID_IInternetPriority, riid)) {
145 TRACE("(%p)->(IID_IInternetPriority %p)\n", This, ppv);
146 *ppv = &This->IInternetPriority_iface;
147 }else if(IsEqualGUID(&IID_IWinInetInfo, riid)) {
148 TRACE("(%p)->(IID_IWinInetInfo %p)\n", This, ppv);
149 *ppv = &This->IWinInetHttpInfo_iface;
150 }else if(IsEqualGUID(&IID_IWinInetHttpInfo, riid)) {
151 TRACE("(%p)->(IID_IWinInetHttpInfo %p)\n", This, ppv);
152 *ppv = &This->IWinInetHttpInfo_iface;
153 }else {
154 *ppv = NULL;
155 WARN("not supported interface %s\n", debugstr_guid(riid));
156 return E_NOINTERFACE;
157 }
158
159 IUnknown_AddRef((IUnknown*)*ppv);
160 return S_OK;
161}
const GUID IID_IUnknown
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ FtpProtocolUnk_Release()

static ULONG WINAPI FtpProtocolUnk_Release ( IUnknown iface)
static

Definition at line 171 of file ftp.c.

172{
175
176 TRACE("(%p) ref=%d\n", This, ref);
177
178 if(!ref) {
181
183 }
184
185 return ref;
186}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedDecrement
Definition: armddk.h:52
static void URLMON_UnlockModule(void)
Definition: urlmon_main.h:69

◆ HttpInfo_AddRef()

static ULONG WINAPI HttpInfo_AddRef ( IWinInetHttpInfo iface)
static

Definition at line 406 of file ftp.c.

407{
409 return IInternetProtocolEx_AddRef(&This->IInternetProtocolEx_iface);
410}
static FtpProtocol * impl_from_IWinInetHttpInfo(IWinInetHttpInfo *iface)
Definition: ftp.c:54

◆ HttpInfo_QueryInfo()

static HRESULT WINAPI HttpInfo_QueryInfo ( IWinInetHttpInfo iface,
DWORD  dwOption,
void pBuffer,
DWORD pcbBuffer,
DWORD pdwFlags,
DWORD pdwReserved 
)
static

Definition at line 432 of file ftp.c.

434{
436 TRACE("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved);
437
438 if(!This->base.request)
439 return E_FAIL;
440
441 if(!HttpQueryInfoW(This->base.request, dwOption, pBuffer, pcbBuffer, pdwFlags))
442 return S_FALSE;
443 return S_OK;
444}
#define E_FAIL
Definition: ddrawi.h:102
BOOL WINAPI HttpQueryInfoW(HINTERNET hHttpRequest, DWORD dwInfoLevel, LPVOID lpBuffer, LPDWORD lpdwBufferLength, LPDWORD lpdwIndex)
Definition: http.c:3870
PVOID pBuffer
_Reserved_ DWORD * pdwReserved
Definition: wincrypt.h:4254
#define S_FALSE
Definition: winerror.h:2357

◆ HttpInfo_QueryInterface()

static HRESULT WINAPI HttpInfo_QueryInterface ( IWinInetHttpInfo iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 400 of file ftp.c.

401{
403 return IInternetProtocolEx_QueryInterface(&This->IInternetProtocolEx_iface, riid, ppv);
404}

◆ HttpInfo_QueryOption()

static HRESULT WINAPI HttpInfo_QueryOption ( IWinInetHttpInfo iface,
DWORD  dwOption,
void pBuffer,
DWORD pcbBuffer 
)
static

Definition at line 418 of file ftp.c.

420{
422 TRACE("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer);
423
424 if(!This->base.request)
425 return E_FAIL;
426
427 if(!InternetQueryOptionW(This->base.request, dwOption, pBuffer, pcbBuffer))
428 return S_FALSE;
429 return S_OK;
430}
BOOL WINAPI InternetQueryOptionW(HINTERNET hInternet, DWORD dwOption, LPVOID lpBuffer, LPDWORD lpdwBufferLength)
Definition: internet.c:2697

◆ HttpInfo_Release()

static ULONG WINAPI HttpInfo_Release ( IWinInetHttpInfo iface)
static

Definition at line 412 of file ftp.c.

413{
415 return IInternetProtocolEx_Release(&This->IInternetProtocolEx_iface);
416}

◆ impl_from_IInternetPriority()

static FtpProtocol * impl_from_IInternetPriority ( IInternetPriority iface)
inlinestatic

Definition at line 50 of file ftp.c.

51{
52 return CONTAINING_RECORD(iface, FtpProtocol, IInternetPriority_iface);
53}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by FtpPriority_AddRef(), FtpPriority_GetPriority(), FtpPriority_QueryInterface(), FtpPriority_Release(), and FtpPriority_SetPriority().

◆ impl_from_IInternetProtocolEx()

◆ impl_from_IUnknown()

static FtpProtocol * impl_from_IUnknown ( IUnknown iface)
inlinestatic

Definition at line 40 of file ftp.c.

41{
42 return CONTAINING_RECORD(iface, FtpProtocol, IUnknown_inner);
43}

Referenced by FtpProtocolUnk_AddRef(), FtpProtocolUnk_QueryInterface(), and FtpProtocolUnk_Release().

◆ impl_from_IWinInetHttpInfo()

static FtpProtocol * impl_from_IWinInetHttpInfo ( IWinInetHttpInfo iface)
inlinestatic

Definition at line 54 of file ftp.c.

56{
57 return CONTAINING_RECORD(iface, FtpProtocol, IWinInetHttpInfo_iface);
58}

Referenced by HttpInfo_AddRef(), HttpInfo_QueryInfo(), HttpInfo_QueryInterface(), HttpInfo_QueryOption(), and HttpInfo_Release().

◆ impl_from_Protocol()

static FtpProtocol * impl_from_Protocol ( Protocol prot)
inlinestatic

Definition at line 60 of file ftp.c.

61{
62 return CONTAINING_RECORD(prot, FtpProtocol, base);
63}

Referenced by FtpProtocol_open_request(), and FtpProtocol_start_downloading().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( urlmon  )

Variable Documentation

◆ AsyncProtocolVtbl

const ProtocolVtbl AsyncProtocolVtbl
static
Initial value:
= {
}
static HRESULT FtpProtocol_open_request(Protocol *prot, IUri *uri, DWORD request_flags, HINTERNET internet_session, IInternetBindInfo *bind_info)
Definition: ftp.c:65
static void FtpProtocol_close_connection(Protocol *prot)
Definition: ftp.c:111
static HRESULT FtpProtocol_start_downloading(Protocol *prot)
Definition: ftp.c:96
static void FtpProtocol_on_error(Protocol *prot, DWORD error)
Definition: ftp.c:115
static HRESULT FtpProtocol_end_request(Protocol *prot)
Definition: ftp.c:91

Definition at line 120 of file ftp.c.

Referenced by FtpProtocol_Construct().

◆ FtpPriorityVtbl

const IInternetPriorityVtbl FtpPriorityVtbl
static
Initial value:
= {
}
static ULONG WINAPI FtpPriority_Release(IInternetPriority *iface)
Definition: ftp.c:366
static ULONG WINAPI FtpPriority_AddRef(IInternetPriority *iface)
Definition: ftp.c:360
static HRESULT WINAPI FtpPriority_SetPriority(IInternetPriority *iface, LONG nPriority)
Definition: ftp.c:372
static HRESULT WINAPI FtpPriority_GetPriority(IInternetPriority *iface, LONG *pnPriority)
Definition: ftp.c:382
static HRESULT WINAPI FtpPriority_QueryInterface(IInternetPriority *iface, REFIID riid, void **ppv)
Definition: ftp.c:354

Definition at line 392 of file ftp.c.

Referenced by FtpProtocol_Construct().

◆ FtpProtocolUnkVtbl

const IUnknownVtbl FtpProtocolUnkVtbl
static
Initial value:
= {
}
static HRESULT WINAPI FtpProtocolUnk_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
Definition: ftp.c:128
static ULONG WINAPI FtpProtocolUnk_AddRef(IUnknown *iface)
Definition: ftp.c:163
static ULONG WINAPI FtpProtocolUnk_Release(IUnknown *iface)
Definition: ftp.c:171

Definition at line 188 of file ftp.c.

Referenced by FtpProtocol_Construct().

◆ FtpProtocolVtbl

const IInternetProtocolExVtbl FtpProtocolVtbl
static
Initial value:
= {
}
static HRESULT WINAPI FtpProtocol_Start(IInternetProtocolEx *iface, LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved)
Definition: ftp.c:215
static HRESULT WINAPI FtpProtocol_Read(IInternetProtocolEx *iface, void *pv, ULONG cb, ULONG *pcbRead)
Definition: ftp.c:280
static HRESULT WINAPI FtpProtocol_Abort(IInternetProtocolEx *iface, HRESULT hrReason, DWORD dwOptions)
Definition: ftp.c:246
static HRESULT WINAPI FtpProtocol_Terminate(IInternetProtocolEx *iface, DWORD dwOptions)
Definition: ftp.c:256
static HRESULT WINAPI FtpProtocol_Seek(IInternetProtocolEx *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
Definition: ftp.c:290
static ULONG WINAPI FtpProtocol_Release(IInternetProtocolEx *iface)
Definition: ftp.c:208
static ULONG WINAPI FtpProtocol_AddRef(IInternetProtocolEx *iface)
Definition: ftp.c:201
static HRESULT WINAPI FtpProtocol_Continue(IInternetProtocolEx *iface, PROTOCOLDATA *pProtocolData)
Definition: ftp.c:237
static HRESULT WINAPI FtpProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUri, IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE *dwReserved)
Definition: ftp.c:316
static HRESULT WINAPI FtpProtocol_Resume(IInternetProtocolEx *iface)
Definition: ftp.c:273
static HRESULT WINAPI FtpProtocol_UnlockRequest(IInternetProtocolEx *iface)
Definition: ftp.c:307
static HRESULT WINAPI FtpProtocol_LockRequest(IInternetProtocolEx *iface, DWORD dwOptions)
Definition: ftp.c:298
static HRESULT WINAPI FtpProtocol_Suspend(IInternetProtocolEx *iface)
Definition: ftp.c:266
static HRESULT WINAPI FtpProtocol_QueryInterface(IInternetProtocolEx *iface, REFIID riid, void **ppv)
Definition: ftp.c:194

Definition at line 337 of file ftp.c.

Referenced by FtpProtocol_Construct().

◆ WinInetHttpInfoVtbl

const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl
static
Initial value:
= {
}
static HRESULT WINAPI HttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD dwOption, void *pBuffer, DWORD *pcbBuffer)
Definition: ftp.c:418
static ULONG WINAPI HttpInfo_Release(IWinInetHttpInfo *iface)
Definition: ftp.c:412
static HRESULT WINAPI HttpInfo_QueryInterface(IWinInetHttpInfo *iface, REFIID riid, void **ppv)
Definition: ftp.c:400
static ULONG WINAPI HttpInfo_AddRef(IWinInetHttpInfo *iface)
Definition: ftp.c:406
static HRESULT WINAPI HttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption, void *pBuffer, DWORD *pcbBuffer, DWORD *pdwFlags, DWORD *pdwReserved)
Definition: ftp.c:432

Definition at line 446 of file ftp.c.

Referenced by FtpProtocol_Construct().