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

urlmon: Move some HttpProtocol variables to generic Protocol object.

parent b105b084
/* /*
* Copyright 2002 Huw D M Davies for CodeWeavers * Copyright 2002 Huw D M Davies for CodeWeavers
* Copyright 2009 Jacek Caban for CodeWeavers
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -30,6 +31,7 @@ ...@@ -30,6 +31,7 @@
#include "winuser.h" #include "winuser.h"
#include "ole2.h" #include "ole2.h"
#include "urlmon.h" #include "urlmon.h"
#include "wininet.h"
#include "wine/unicode.h" #include "wine/unicode.h"
...@@ -50,7 +52,8 @@ static inline void URLMON_LockModule(void) { InterlockedIncrement( &URLMON_refCo ...@@ -50,7 +52,8 @@ static inline void URLMON_LockModule(void) { InterlockedIncrement( &URLMON_refCo
static inline void URLMON_UnlockModule(void) { InterlockedDecrement( &URLMON_refCount ); } static inline void URLMON_UnlockModule(void) { InterlockedDecrement( &URLMON_refCount ); }
#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field)) #define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl))) #define DEFINE_THIS2(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,ifc)))
#define DEFINE_THIS(cls,ifc,iface) DEFINE_THIS2(cls,lp ## ifc ## Vtbl,iface)
typedef struct typedef struct
{ {
...@@ -76,6 +79,25 @@ HRESULT bind_to_object(IMoniker *mon, LPCWSTR url, IBindCtx *pbc, REFIID riid, v ...@@ -76,6 +79,25 @@ HRESULT bind_to_object(IMoniker *mon, LPCWSTR url, IBindCtx *pbc, REFIID riid, v
HRESULT create_binding_protocol(LPCWSTR url, BOOL from_urlmon, IInternetProtocol **protocol); HRESULT create_binding_protocol(LPCWSTR url, BOOL from_urlmon, IInternetProtocol **protocol);
void set_binding_sink(IInternetProtocol *bind_protocol, IInternetProtocolSink *sink); void set_binding_sink(IInternetProtocol *bind_protocol, IInternetProtocolSink *sink);
typedef struct {
IInternetProtocol *protocol;
IInternetProtocolSink *protocol_sink;
DWORD bindf;
BINDINFO bind_info;
HINTERNET internet;
HINTERNET request;
DWORD flags;
HANDLE lock;
ULONG current_position;
ULONG content_length;
ULONG available_bytes;
LONG priority;
} Protocol;
static inline void *heap_alloc(size_t len) static inline void *heap_alloc(size_t len)
{ {
return HeapAlloc(GetProcessHeap(), 0, len); return HeapAlloc(GetProcessHeap(), 0, len);
......
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