Commit e1c1b937 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

urlmon: Forward IWinInetHttpInfo calls to protocol implementations.

parent d55ebe0a
...@@ -762,19 +762,11 @@ static HRESULT WINAPI Binding_QueryInterface(IBinding *iface, REFIID riid, void ...@@ -762,19 +762,11 @@ static HRESULT WINAPI Binding_QueryInterface(IBinding *iface, REFIID riid, void
*ppv = &This->IWinInetHttpInfo_iface; *ppv = &This->IWinInetHttpInfo_iface;
}else if(IsEqualGUID(&IID_IWinInetHttpInfo, riid)) { }else if(IsEqualGUID(&IID_IWinInetHttpInfo, riid)) {
IWinInetHttpInfo *http_info;
HRESULT hres;
TRACE("(%p)->(IID_IWinInetHttpInfo %p)\n", This, ppv); TRACE("(%p)->(IID_IWinInetHttpInfo %p)\n", This, ppv);
if(!This->protocol->wininet_info) if(!This->protocol->wininet_http_info)
return E_NOINTERFACE; return E_NOINTERFACE;
hres = IWinInetInfo_QueryInterface(This->protocol->wininet_info, &IID_IWinInetHttpInfo, (void**)&http_info);
if(FAILED(hres))
return E_NOINTERFACE;
IWinInetHttpInfo_Release(http_info);
*ppv = &This->IWinInetHttpInfo_iface; *ppv = &This->IWinInetHttpInfo_iface;
} }
...@@ -1259,16 +1251,26 @@ static HRESULT WINAPI WinInetHttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD ...@@ -1259,16 +1251,26 @@ static HRESULT WINAPI WinInetHttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD
void *pBuffer, DWORD *pcbBuffer) void *pBuffer, DWORD *pcbBuffer)
{ {
Binding *This = impl_from_IWinInetHttpInfo(iface); Binding *This = impl_from_IWinInetHttpInfo(iface);
FIXME("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer); TRACE("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer);
return E_NOTIMPL;
if(!This->protocol->wininet_info)
return E_FAIL;
return IWinInetInfo_QueryOption(This->protocol->wininet_info,
dwOption, pBuffer, pcbBuffer);
} }
static HRESULT WINAPI WinInetHttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption, static HRESULT WINAPI WinInetHttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption,
void *pBuffer, DWORD *pcbBuffer, DWORD *pdwFlags, DWORD *pdwReserved) void *pBuffer, DWORD *pcbBuffer, DWORD *pdwFlags, DWORD *pdwReserved)
{ {
Binding *This = impl_from_IWinInetHttpInfo(iface); Binding *This = impl_from_IWinInetHttpInfo(iface);
FIXME("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved); TRACE("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved);
return E_NOTIMPL;
if(!This->protocol->wininet_http_info)
return E_FAIL;
return IWinInetHttpInfo_QueryInfo(This->protocol->wininet_http_info,
dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved);
} }
static const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl = { static const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl = {
......
...@@ -329,6 +329,8 @@ static ULONG WINAPI BindProtocol_Release(IInternetProtocolEx *iface) ...@@ -329,6 +329,8 @@ static ULONG WINAPI BindProtocol_Release(IInternetProtocolEx *iface)
if(!ref) { if(!ref) {
if(This->wininet_info) if(This->wininet_info)
IWinInetInfo_Release(This->wininet_info); IWinInetInfo_Release(This->wininet_info);
if(This->wininet_http_info)
IWinInetHttpInfo_Release(This->wininet_http_info);
if(This->protocol) if(This->protocol)
IInternetProtocol_Release(This->protocol); IInternetProtocol_Release(This->protocol);
if(This->bind_info) if(This->bind_info)
...@@ -523,8 +525,10 @@ static HRESULT WINAPI BindProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr ...@@ -523,8 +525,10 @@ static HRESULT WINAPI BindProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr
This->protocol = protocol; This->protocol = protocol;
if(urlmon_protocol) if(urlmon_protocol) {
IInternetProtocol_QueryInterface(protocol, &IID_IWinInetInfo, (void**)&This->wininet_info); IInternetProtocol_QueryInterface(protocol, &IID_IWinInetInfo, (void**)&This->wininet_info);
IInternetProtocol_QueryInterface(protocol, &IID_IWinInetHttpInfo, (void**)&This->wininet_http_info);
}
set_binding_sink(This, pOIProtSink, pOIBindInfo); set_binding_sink(This, pOIProtSink, pOIBindInfo);
......
...@@ -180,6 +180,7 @@ typedef struct { ...@@ -180,6 +180,7 @@ typedef struct {
IInternetProtocolSink *protocol_sink; IInternetProtocolSink *protocol_sink;
IServiceProvider *service_provider; IServiceProvider *service_provider;
IWinInetInfo *wininet_info; IWinInetInfo *wininet_info;
IWinInetHttpInfo *wininet_http_info;
struct { struct {
IInternetProtocol IInternetProtocol_iface; IInternetProtocol IInternetProtocol_iface;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment