urlmon: Added Abort implementation to wininet-based protocols.

This commit is contained in:
Jacek Caban 2010-10-04 14:00:17 +02:00 committed by Alexandre Julliard
parent 140f08bd42
commit 159c23e137
5 changed files with 26 additions and 6 deletions

View File

@ -186,8 +186,10 @@ static HRESULT WINAPI FtpProtocol_Abort(IInternetProtocol *iface, HRESULT hrReas
DWORD dwOptions)
{
FtpProtocol *This = PROTOCOL_THIS(iface);
FIXME("(%p)->(%08x %08x)\n", This, hrReason, dwOptions);
return E_NOTIMPL;
TRACE("(%p)->(%08x %08x)\n", This, hrReason, dwOptions);
return protocol_abort(&This->base, hrReason);
}
static HRESULT WINAPI FtpProtocol_Terminate(IInternetProtocol *iface, DWORD dwOptions)

View File

@ -161,8 +161,10 @@ static HRESULT WINAPI GopherProtocol_Abort(IInternetProtocol *iface, HRESULT hrR
DWORD dwOptions)
{
GopherProtocol *This = PROTOCOL_THIS(iface);
FIXME("(%p)->(%08x %08x)\n", This, hrReason, dwOptions);
return E_NOTIMPL;
TRACE("(%p)->(%08x %08x)\n", This, hrReason, dwOptions);
return protocol_abort(&This->base, hrReason);
}
static HRESULT WINAPI GopherProtocol_Terminate(IInternetProtocol *iface, DWORD dwOptions)

View File

@ -162,6 +162,7 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
&IID_IHttpNegotiate, (void **)&This->http_negotiate);
if (hres != S_OK) {
WARN("IServiceProvider_QueryService IID_IHttpNegotiate failed: %08x\n", hres);
IServiceProvider_Release(service_provider);
return hres;
}
@ -438,8 +439,10 @@ static HRESULT WINAPI HttpProtocol_Abort(IInternetProtocol *iface, HRESULT hrRea
DWORD dwOptions)
{
HttpProtocol *This = PROTOCOL_THIS(iface);
FIXME("(%p)->(%08x %08x)\n", This, hrReason, dwOptions);
return E_NOTIMPL;
TRACE("(%p)->(%08x %08x)\n", This, hrReason, dwOptions);
return protocol_abort(&This->base, hrReason);
}
static HRESULT WINAPI HttpProtocol_Terminate(IInternetProtocol *iface, DWORD dwOptions)

View File

@ -428,6 +428,18 @@ HRESULT protocol_unlock_request(Protocol *protocol)
return S_OK;
}
HRESULT protocol_abort(Protocol *protocol, HRESULT reason)
{
if(!protocol->protocol_sink)
return S_OK;
if(protocol->flags & FLAG_RESULT_REPORTED)
return INET_E_RESULT_DISPATCHED;
report_result(protocol, reason);
return S_OK;
}
void protocol_close_connection(Protocol *protocol)
{
protocol->vtbl->close_connection(protocol);

View File

@ -115,6 +115,7 @@ HRESULT protocol_continue(Protocol*,PROTOCOLDATA*);
HRESULT protocol_read(Protocol*,void*,ULONG,ULONG*);
HRESULT protocol_lock_request(Protocol*);
HRESULT protocol_unlock_request(Protocol*);
HRESULT protocol_abort(Protocol*,HRESULT);
void protocol_close_connection(Protocol*);
typedef struct {