59 *
ppv = &
This->IBindStatusCallback_iface;
61 TRACE(
"(%p)->(IID_IBindStatusCallback, %p)\n",
This,
ppv);
62 *
ppv = &
This->IBindStatusCallback_iface;
65 *
ppv = &
This->IServiceProvider_iface;
96 IBindStatusCallback_Release(
This->callback);
98 IBinding_Release(
This->binding);
118 IBinding_AddRef(pbind);
119 This->binding = pbind;
150 IBinding_Abort(
This->binding);
152 FIXME(
"No binding, not sure what to do!\n");
164 TRACE(
"%p)->(%u %u %u %s)\n",
This, ulProgress, ulProgressMax, ulStatusCode,
167 switch(ulStatusCode) {
168 case BINDSTATUS_CONNECTING:
169 case BINDSTATUS_BEGINDOWNLOADDATA:
170 case BINDSTATUS_DOWNLOADINGDATA:
171 case BINDSTATUS_ENDDOWNLOADDATA:
172 case BINDSTATUS_SENDINGREQUEST:
173 case BINDSTATUS_MIMETYPEAVAILABLE:
177 case BINDSTATUS_CACHEFILENAMEAVAILABLE:
182 case BINDSTATUS_FINDINGRESOURCE:
186 FIXME(
"Unsupported status %u\n", ulStatusCode);
200 if(
This->file_name) {
201 if(
This->cache_file) {
208 FIXME(
"No cache file\n");
212 if(
This->onstop_proc)
214 else if(
This->callback)
215 IBindStatusCallback_OnStopBinding(
This->callback, hresult, szError);
218 IBinding_Release(
This->binding);
226 DWORD *grfBINDF, BINDINFO *pbindinfo)
231 TRACE(
"(%p)->(%p %p)\n",
This, grfBINDF, pbindinfo);
237 memset(&bindinfo, 0,
sizeof(bindinfo));
238 bindinfo.cbSize =
sizeof(bindinfo);
240 hres = IBindStatusCallback_GetBindInfo(
This->callback, &
bindf, &bindinfo);
245 *grfBINDF = BINDF_PULLDATA | BINDF_NEEDFILE | (
bindf & BINDF_ENFORCERESTRICTED) |
This->bindf;
254 TRACE(
"(%p)->(%08x %d %p %p)\n",
This, grfBSCF,
dwSize, pformatetc, pstgmed);
285 return IBindStatusCallback_QueryInterface(&
This->IBindStatusCallback_iface,
riid,
ppv);
291 return IBindStatusCallback_AddRef(&
This->IBindStatusCallback_iface);
297 return IBindStatusCallback_Release(&
This->IBindStatusCallback_iface);
316 hres = IBindStatusCallback_QueryInterface(
This->callback, &IID_IServiceProvider, (
void**)&serv_prov);
318 hres = IServiceProvider_QueryService(serv_prov, guidService,
riid,
ppv);
319 IServiceProvider_Release(serv_prov);
337 ret = heap_alloc_zero(
sizeof(*
ret));
347 if(!
ret->file_name) {
354 IBindStatusCallback_AddRef(
callback);
371 IBindStatusCallback_Release(&
callback->IBindStatusCallback_iface);
389 dwl_bsc->
bindf = BINDF_ASYNCHRONOUS;
398 IBindCtx_Release(bindctx);
403 IMoniker_Release(mon);
404 IBindCtx_Release(bindctx);
406 IUnknown_Release(unk);
439 FIXME(
"pCaller not supported\n");
446 IBindStatusCallback_Release(&
callback->IBindStatusCallback_iface);
452 IBindCtx_Release(bindctx);
457 IMoniker_Release(mon);
458 IBindCtx_Release(bindctx);
461 IUnknown_Release(unk);
483 LPBINDSTATUSCALLBACK lpfnCB)
static WCHAR * heap_strdupAtoW(const char *str)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static WCHAR * heap_strdupW(const WCHAR *str)
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
GLboolean GLboolean GLboolean b
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static IPrintDialogCallback callback
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
#define IsEqualGUID(rguid1, rguid2)
IBindStatusCallback IBindStatusCallback_iface
stop_cache_binding_proc_t onstop_proc
IServiceProvider IServiceProvider_iface
IBindStatusCallback * callback
#define CONTAINING_RECORD(address, type, field)
HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk)
HRESULT WINAPI CreateURLMonikerEx2(IMoniker *pmkContext, IUri *pUri, IMoniker **ppmk, DWORD dwFlags)
HRESULT wrap_callback(IBindStatusCallback *bsc, IBindStatusCallback **ret_iface)
HRESULT WINAPI CreateAsyncBindCtx(DWORD reserved, IBindStatusCallback *callback, IEnumFORMATETC *format, IBindCtx **pbind)
void WINAPI ReleaseBindInfo(BINDINFO *pbindinfo)
HRESULT(* stop_cache_binding_proc_t)(void *, const WCHAR *, HRESULT, const WCHAR *)
static ULONG WINAPI DownloadBSC_AddRef(IBindStatusCallback *iface)
static DownloadBSC * impl_from_IServiceProvider(IServiceProvider *iface)
HRESULT WINAPI URLDownloadToFileA(LPUNKNOWN pCaller, LPCSTR szURL, LPCSTR szFileName, DWORD dwReserved, LPBINDSTATUSCALLBACK lpfnCB)
static HRESULT on_progress(DownloadBSC *This, ULONG progress, ULONG progress_max, ULONG status_code, LPCWSTR status_text)
static HRESULT WINAPI DownloadBSC_OnDataAvailable(IBindStatusCallback *iface, DWORD grfBSCF, DWORD dwSize, FORMATETC *pformatetc, STGMEDIUM *pstgmed)
static HRESULT WINAPI DownloadBSC_GetPriority(IBindStatusCallback *iface, LONG *pnPriority)
static HRESULT WINAPI DownloadBSC_GetBindInfo(IBindStatusCallback *iface, DWORD *grfBINDF, BINDINFO *pbindinfo)
static ULONG WINAPI DownloadBSC_Release(IBindStatusCallback *iface)
static HRESULT WINAPI DownloadBSC_OnLowResource(IBindStatusCallback *iface, DWORD reserved)
static DownloadBSC * impl_from_IBindStatusCallback(IBindStatusCallback *iface)
static const IBindStatusCallbackVtbl BindStatusCallbackVtbl
HRESULT create_default_callback(IBindStatusCallback **ret)
static HRESULT WINAPI DownloadBSC_QueryInterface(IBindStatusCallback *iface, REFIID riid, void **ppv)
static ULONG WINAPI DwlServiceProvider_Release(IServiceProvider *iface)
static HRESULT WINAPI DwlServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv)
HRESULT WINAPI URLDownloadToFileW(LPUNKNOWN pCaller, LPCWSTR szURL, LPCWSTR szFileName, DWORD dwReserved, LPBINDSTATUSCALLBACK lpfnCB)
static HRESULT WINAPI DownloadBSC_OnStopBinding(IBindStatusCallback *iface, HRESULT hresult, LPCWSTR szError)
static ULONG WINAPI DwlServiceProvider_AddRef(IServiceProvider *iface)
static HRESULT DownloadBSC_Create(IBindStatusCallback *callback, LPCWSTR file_name, DownloadBSC **ret_callback)
static HRESULT WINAPI DownloadBSC_OnProgress(IBindStatusCallback *iface, ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
static HRESULT WINAPI DwlServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
static HRESULT WINAPI DownloadBSC_OnStartBinding(IBindStatusCallback *iface, DWORD dwReserved, IBinding *pbind)
static HRESULT WINAPI DownloadBSC_OnObjectAvailable(IBindStatusCallback *iface, REFIID riid, IUnknown *punk)
HRESULT download_to_cache(IUri *uri, stop_cache_binding_proc_t proc, void *ctx, IBindStatusCallback *callback)
static const IServiceProviderVtbl ServiceProviderVtbl
DWORD WINAPI GetLastError(void)