Jacek Caban : urlmon: Added IBinding::Abort implementation.

Alexandre Julliard julliard at winehq.org
Thu Oct 7 11:24:24 CDT 2010


Module: wine
Branch: master
Commit: 1db24bedfc3bfc9df6e3bfb35595e077de534af4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1db24bedfc3bfc9df6e3bfb35595e077de534af4

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Oct  6 21:35:53 2010 +0200

urlmon: Added IBinding::Abort implementation.

---

 dlls/urlmon/binding.c |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c
index 49e9ac1..8bfaf76 100644
--- a/dlls/urlmon/binding.c
+++ b/dlls/urlmon/binding.c
@@ -882,8 +882,19 @@ static ULONG WINAPI Binding_Release(IBinding *iface)
 static HRESULT WINAPI Binding_Abort(IBinding *iface)
 {
     Binding *This = BINDING_THIS(iface);
-    FIXME("(%p)\n", This);
-    return E_NOTIMPL;
+    HRESULT hres;
+
+    TRACE("(%p)\n", This);
+
+    if(This->state & BINDING_ABORTED)
+        return E_FAIL;
+
+    hres = IInternetProtocol_Abort(This->protocol, E_ABORT, ERROR_SUCCESS);
+    if(FAILED(hres))
+        return hres;
+
+    This->state |= BINDING_ABORTED;
+    return S_OK;
 }
 
 static HRESULT WINAPI Binding_Suspend(IBinding *iface)
@@ -1053,7 +1064,7 @@ static void report_data(Binding *This, DWORD bscf, ULONG progress, ULONG progres
 
     TRACE("(%p)->(%d %u %u)\n", This, bscf, progress, progress_max);
 
-    if(This->download_state == END_DOWNLOAD || (This->state & BINDING_STOPPED))
+    if(This->download_state == END_DOWNLOAD || (This->state & (BINDING_STOPPED|BINDING_ABORTED)))
         return;
 
     if(This->stgmed_buf->file != INVALID_HANDLE_VALUE)
@@ -1081,6 +1092,9 @@ static void report_data(Binding *This, DWORD bscf, ULONG progress, ULONG progres
                 BINDSTATUS_DOWNLOADINGDATA, This->url);
     }
 
+    if(This->state & (BINDING_STOPPED|BINDING_ABORTED))
+        return;
+
     if(This->to_object) {
         if(!(This->state & BINDING_OBJAVAIL)) {
             IBinding_AddRef(BINDING(This));




More information about the wine-cvs mailing list