Jacek Caban : urlmon: Added Switch implementation.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu May 25 14:18:29 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 8b69bf72da5f94ba9385e8e43ce83e3e417a4185
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=8b69bf72da5f94ba9385e8e43ce83e3e417a4185
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu May 25 18:39:26 2006 +0200
urlmon: Added Switch implementation.
---
dlls/urlmon/binding.c | 30 ++++++++++++++++++++++++++++--
1 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c
index bc43174..859057f 100644
--- a/dlls/urlmon/binding.c
+++ b/dlls/urlmon/binding.c
@@ -78,6 +78,7 @@ #define SERVPROV(x) ((IServiceProvider*
#define STREAM(x) ((IStream*) &(x)->lpStreamVtbl)
#define WM_MK_ONPROGRESS (WM_USER+100)
+#define WM_MK_CONTINUE (WM_USER+101)
typedef struct {
Binding *binding;
@@ -87,6 +88,11 @@ typedef struct {
LPWSTR status_text;
} on_progress_data;
+typedef struct {
+ Binding *binding;
+ PROTOCOLDATA *data;
+} switch_data;
+
static LRESULT WINAPI notif_wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch(msg) {
@@ -104,6 +110,15 @@ static LRESULT WINAPI notif_wnd_proc(HWN
return 0;
}
+ case WM_MK_CONTINUE: {
+ switch_data *data = (switch_data*)lParam;
+
+ IInternetProtocol_Continue(data->binding->protocol, data->data);
+
+ IBinding_Release(BINDING(data->binding));
+ HeapFree(GetProcessHeap(), 0, data);
+ return 0;
+ }
}
return DefWindowProcW(hwnd, msg, wParam, lParam);
@@ -631,8 +646,19 @@ static HRESULT WINAPI InternetProtocolSi
PROTOCOLDATA *pProtocolData)
{
Binding *This = PROTSINK_THIS(iface);
- FIXME("(%p)->(%p)\n", This, pProtocolData);
- return E_NOTIMPL;
+ switch_data *data;
+
+ TRACE("(%p)->(%p)\n", This, pProtocolData);
+
+ data = HeapAlloc(GetProcessHeap(), 0, sizeof(switch_data));
+
+ IBinding_AddRef(BINDING(This));
+ data->binding = This;
+ data->data = pProtocolData;
+
+ PostMessageW(This->notif_hwnd, WM_MK_CONTINUE, 0, (LPARAM)data);
+
+ return S_OK;
}
static HRESULT WINAPI InternetProtocolSink_ReportProgress(IInternetProtocolSink *iface,
More information about the wine-cvs
mailing list