Commit c41bcd89 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

urlmon: Added IInternetProtocolSink interface stub implementation to MimeFilter object.

parent 11a6f353
...@@ -22,12 +22,14 @@ ...@@ -22,12 +22,14 @@
WINE_DEFAULT_DEBUG_CHANNEL(urlmon); WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef struct { typedef struct {
const IInternetProtocolVtbl *lpIInternetProtocolVtbl; const IInternetProtocolVtbl *lpIInternetProtocolVtbl;
const IInternetProtocolSinkVtbl *lpIInternetProtocolSinkVtbl;
LONG ref; LONG ref;
} MimeFilter; } MimeFilter;
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpIInternetProtocolVtbl) #define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpIInternetProtocolVtbl)
#define PROTOCOLSINK(x) ((IInternetProtocolSink*) &(x)->lpIInternetProtocolSinkVtbl)
#define PROTOCOL_THIS(iface) DEFINE_THIS(MimeFilter, IInternetProtocol, iface) #define PROTOCOL_THIS(iface) DEFINE_THIS(MimeFilter, IInternetProtocol, iface)
...@@ -45,6 +47,9 @@ static HRESULT WINAPI MimeFilterProtocol_QueryInterface(IInternetProtocol *iface ...@@ -45,6 +47,9 @@ static HRESULT WINAPI MimeFilterProtocol_QueryInterface(IInternetProtocol *iface
}else if(IsEqualGUID(&IID_IInternetProtocol, riid)) { }else if(IsEqualGUID(&IID_IInternetProtocol, riid)) {
TRACE("(%p)->(IID_IInternetProtocol %p)\n", This, ppv); TRACE("(%p)->(IID_IInternetProtocol %p)\n", This, ppv);
*ppv = PROTOCOL(This); *ppv = PROTOCOL(This);
}else if(IsEqualGUID(&IID_IInternetProtocolSink, riid)) {
TRACE("(%p)->(IID_IInternetProtocolSink %p)\n", This, ppv);
*ppv = PROTOCOLSINK(This);
} }
if(*ppv) { if(*ppv) {
...@@ -174,6 +179,71 @@ static const IInternetProtocolVtbl MimeFilterProtocolVtbl = { ...@@ -174,6 +179,71 @@ static const IInternetProtocolVtbl MimeFilterProtocolVtbl = {
MimeFilterProtocol_UnlockRequest MimeFilterProtocol_UnlockRequest
}; };
#define PROTSINK_THIS(iface) DEFINE_THIS(MimeFilter, IInternetProtocolSink, iface)
static HRESULT WINAPI MimeFilterSink_QueryInterface(IInternetProtocolSink *iface,
REFIID riid, void **ppv)
{
MimeFilter *This = PROTSINK_THIS(iface);
return IInternetProtocol_QueryInterface(PROTOCOL(This), riid, ppv);
}
static ULONG WINAPI MimeFilterSink_AddRef(IInternetProtocolSink *iface)
{
MimeFilter *This = PROTSINK_THIS(iface);
return IInternetProtocol_AddRef(PROTOCOL(This));
}
static ULONG WINAPI MimeFilterSink_Release(IInternetProtocolSink *iface)
{
MimeFilter *This = PROTSINK_THIS(iface);
return IInternetProtocol_Release(PROTOCOL(This));
}
static HRESULT WINAPI MimeFilterSink_Switch(IInternetProtocolSink *iface,
PROTOCOLDATA *pProtocolData)
{
MimeFilter *This = PROTSINK_THIS(iface);
FIXME("(%p)->(%p)\n", This, pProtocolData);
return E_NOTIMPL;
}
static HRESULT WINAPI MimeFilterSink_ReportProgress(IInternetProtocolSink *iface,
ULONG ulStatusCode, LPCWSTR szStatusText)
{
MimeFilter *This = PROTSINK_THIS(iface);
FIXME("(%p)->(%u %s)\n", This, ulStatusCode, debugstr_w(szStatusText));
return E_NOTIMPL;
}
static HRESULT WINAPI MimeFilterSink_ReportData(IInternetProtocolSink *iface,
DWORD grfBSCF, ULONG ulProgress, ULONG ulProgressMax)
{
MimeFilter *This = PROTSINK_THIS(iface);
FIXME("(%p)->(%d %u %u)\n", This, grfBSCF, ulProgress, ulProgressMax);
return E_NOTIMPL;
}
static HRESULT WINAPI MimeFilterSink_ReportResult(IInternetProtocolSink *iface,
HRESULT hrResult, DWORD dwError, LPCWSTR szResult)
{
MimeFilter *This = PROTSINK_THIS(iface);
FIXME("(%p)->(%08x %d %s)\n", This, hrResult, dwError, debugstr_w(szResult));
return E_NOTIMPL;
}
#undef PROTSINK_THIS
static const IInternetProtocolSinkVtbl InternetProtocolSinkVtbl = {
MimeFilterSink_QueryInterface,
MimeFilterSink_AddRef,
MimeFilterSink_Release,
MimeFilterSink_Switch,
MimeFilterSink_ReportProgress,
MimeFilterSink_ReportData,
MimeFilterSink_ReportResult
};
HRESULT MimeFilter_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) HRESULT MimeFilter_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
{ {
MimeFilter *ret; MimeFilter *ret;
...@@ -184,7 +254,8 @@ HRESULT MimeFilter_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) ...@@ -184,7 +254,8 @@ HRESULT MimeFilter_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
ret = heap_alloc_zero(sizeof(MimeFilter)); ret = heap_alloc_zero(sizeof(MimeFilter));
ret->lpIInternetProtocolVtbl = &MimeFilterProtocolVtbl; ret->lpIInternetProtocolVtbl = &MimeFilterProtocolVtbl;
ret->lpIInternetProtocolSinkVtbl = &InternetProtocolSinkVtbl;
ret->ref = 1; ret->ref = 1;
*ppobj = PROTOCOL(ret); *ppobj = PROTOCOL(ret);
......
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