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

urlmon: Use common name for IInternetProtocol and IInternetProtocolSink vtbls.

parent 638c7ac8
...@@ -78,7 +78,7 @@ typedef enum { ...@@ -78,7 +78,7 @@ typedef enum {
struct Binding { struct Binding {
const IBindingVtbl *lpBindingVtbl; const IBindingVtbl *lpBindingVtbl;
const IInternetProtocolSinkVtbl *lpInternetProtocolSinkVtbl; const IInternetProtocolSinkVtbl *lpIInternetProtocolSinkVtbl;
const IInternetBindInfoVtbl *lpInternetBindInfoVtbl; const IInternetBindInfoVtbl *lpInternetBindInfoVtbl;
const IWinInetHttpInfoVtbl *lpWinInetHttpInfoVtbl; const IWinInetHttpInfoVtbl *lpWinInetHttpInfoVtbl;
const IServiceProviderVtbl *lpServiceProviderVtbl; const IServiceProviderVtbl *lpServiceProviderVtbl;
...@@ -112,7 +112,6 @@ struct Binding { ...@@ -112,7 +112,6 @@ struct Binding {
}; };
#define BINDING(x) ((IBinding*) &(x)->lpBindingVtbl) #define BINDING(x) ((IBinding*) &(x)->lpBindingVtbl)
#define PROTSINK(x) ((IInternetProtocolSink*) &(x)->lpInternetProtocolSinkVtbl)
#define BINDINF(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl) #define BINDINF(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl)
#define INETINFO(x) ((IWinInetHttpInfo*) &(x)->lpWinInetHttpInfoVtbl) #define INETINFO(x) ((IWinInetHttpInfo*) &(x)->lpWinInetHttpInfoVtbl)
#define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl) #define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl)
...@@ -916,7 +915,7 @@ static const IBindingVtbl BindingVtbl = { ...@@ -916,7 +915,7 @@ static const IBindingVtbl BindingVtbl = {
Binding_GetBindResult Binding_GetBindResult
}; };
#define PROTSINK_THIS(iface) DEFINE_THIS(Binding, InternetProtocolSink, iface) #define PROTSINK_THIS(iface) DEFINE_THIS(Binding, IInternetProtocolSink, iface)
static HRESULT WINAPI InternetProtocolSink_QueryInterface(IInternetProtocolSink *iface, static HRESULT WINAPI InternetProtocolSink_QueryInterface(IInternetProtocolSink *iface,
REFIID riid, void **ppv) REFIID riid, void **ppv)
...@@ -1360,7 +1359,7 @@ static HRESULT Binding_Create(IMoniker *mon, Binding *binding_ctx, LPCWSTR url, ...@@ -1360,7 +1359,7 @@ static HRESULT Binding_Create(IMoniker *mon, Binding *binding_ctx, LPCWSTR url,
ret = heap_alloc_zero(sizeof(Binding)); ret = heap_alloc_zero(sizeof(Binding));
ret->lpBindingVtbl = &BindingVtbl; ret->lpBindingVtbl = &BindingVtbl;
ret->lpInternetProtocolSinkVtbl = &InternetProtocolSinkVtbl; ret->lpIInternetProtocolSinkVtbl = &InternetProtocolSinkVtbl;
ret->lpInternetBindInfoVtbl = &InternetBindInfoVtbl; ret->lpInternetBindInfoVtbl = &InternetBindInfoVtbl;
ret->lpWinInetHttpInfoVtbl = &WinInetHttpInfoVtbl; ret->lpWinInetHttpInfoVtbl = &WinInetHttpInfoVtbl;
ret->lpServiceProviderVtbl = &ServiceProviderVtbl; ret->lpServiceProviderVtbl = &ServiceProviderVtbl;
......
...@@ -33,11 +33,11 @@ typedef struct _task_header_t { ...@@ -33,11 +33,11 @@ typedef struct _task_header_t {
} task_header_t; } task_header_t;
struct BindProtocol { struct BindProtocol {
const IInternetProtocolVtbl *lpInternetProtocolVtbl; const IInternetProtocolVtbl *lpIInternetProtocolVtbl;
const IInternetBindInfoVtbl *lpInternetBindInfoVtbl; const IInternetBindInfoVtbl *lpInternetBindInfoVtbl;
const IInternetPriorityVtbl *lpInternetPriorityVtbl; const IInternetPriorityVtbl *lpInternetPriorityVtbl;
const IServiceProviderVtbl *lpServiceProviderVtbl; const IServiceProviderVtbl *lpServiceProviderVtbl;
const IInternetProtocolSinkVtbl *lpInternetProtocolSinkVtbl; const IInternetProtocolSinkVtbl *lpIInternetProtocolSinkVtbl;
const IInternetProtocolVtbl *lpIInternetProtocolHandlerVtbl; const IInternetProtocolVtbl *lpIInternetProtocolHandlerVtbl;
...@@ -70,11 +70,9 @@ struct BindProtocol { ...@@ -70,11 +70,9 @@ struct BindProtocol {
LPWSTR url; LPWSTR url;
}; };
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
#define BINDINFO(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl) #define BINDINFO(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl)
#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl) #define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl)
#define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl) #define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl)
#define PROTSINK(x) ((IInternetProtocolSink*) &(x)->lpInternetProtocolSinkVtbl)
#define PROTOCOLHANDLER(x) ((IInternetProtocol*) &(x)->lpIInternetProtocolHandlerVtbl) #define PROTOCOLHANDLER(x) ((IInternetProtocol*) &(x)->lpIInternetProtocolHandlerVtbl)
...@@ -234,7 +232,7 @@ static void mime_available(BindProtocol *This, LPCWSTR mime, BOOL verified) ...@@ -234,7 +232,7 @@ static void mime_available(BindProtocol *This, LPCWSTR mime, BOOL verified)
} }
} }
#define PROTOCOL_THIS(iface) DEFINE_THIS(BindProtocol, InternetProtocol, iface) #define PROTOCOL_THIS(iface) DEFINE_THIS(BindProtocol, IInternetProtocol, iface)
static HRESULT WINAPI BindProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) static HRESULT WINAPI BindProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv)
{ {
...@@ -792,7 +790,7 @@ static const IInternetPriorityVtbl InternetPriorityVtbl = { ...@@ -792,7 +790,7 @@ static const IInternetPriorityVtbl InternetPriorityVtbl = {
}; };
#define PROTSINK_THIS(iface) DEFINE_THIS(BindProtocol, InternetProtocolSink, iface) #define PROTSINK_THIS(iface) DEFINE_THIS(BindProtocol, IInternetProtocolSink, iface)
static HRESULT WINAPI BPInternetProtocolSink_QueryInterface(IInternetProtocolSink *iface, static HRESULT WINAPI BPInternetProtocolSink_QueryInterface(IInternetProtocolSink *iface,
REFIID riid, void **ppv) REFIID riid, void **ppv)
...@@ -1118,11 +1116,11 @@ HRESULT create_binding_protocol(LPCWSTR url, BOOL from_urlmon, IInternetProtocol ...@@ -1118,11 +1116,11 @@ HRESULT create_binding_protocol(LPCWSTR url, BOOL from_urlmon, IInternetProtocol
{ {
BindProtocol *ret = heap_alloc_zero(sizeof(BindProtocol)); BindProtocol *ret = heap_alloc_zero(sizeof(BindProtocol));
ret->lpInternetProtocolVtbl = &BindProtocolVtbl; ret->lpIInternetProtocolVtbl = &BindProtocolVtbl;
ret->lpInternetBindInfoVtbl = &InternetBindInfoVtbl; ret->lpInternetBindInfoVtbl = &InternetBindInfoVtbl;
ret->lpInternetPriorityVtbl = &InternetPriorityVtbl; ret->lpInternetPriorityVtbl = &InternetPriorityVtbl;
ret->lpServiceProviderVtbl = &ServiceProviderVtbl; ret->lpServiceProviderVtbl = &ServiceProviderVtbl;
ret->lpInternetProtocolSinkVtbl = &InternetProtocolSinkVtbl; ret->lpIInternetProtocolSinkVtbl = &InternetProtocolSinkVtbl;
ret->lpIInternetProtocolHandlerVtbl = &InternetProtocolHandlerVtbl; ret->lpIInternetProtocolHandlerVtbl = &InternetProtocolHandlerVtbl;
ret->ref = 1; ret->ref = 1;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(urlmon); WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef struct { typedef struct {
const IInternetProtocolVtbl *lpInternetProtocolVtbl; const IInternetProtocolVtbl *lpIInternetProtocolVtbl;
const IInternetPriorityVtbl *lpInternetPriorityVtbl; const IInternetPriorityVtbl *lpInternetPriorityVtbl;
HANDLE file; HANDLE file;
...@@ -31,10 +31,9 @@ typedef struct { ...@@ -31,10 +31,9 @@ typedef struct {
LONG ref; LONG ref;
} FileProtocol; } FileProtocol;
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl) #define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl)
#define PROTOCOL_THIS(iface) DEFINE_THIS(FileProtocol, InternetProtocol, iface) #define PROTOCOL_THIS(iface) DEFINE_THIS(FileProtocol, IInternetProtocol, iface)
static HRESULT WINAPI FileProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) static HRESULT WINAPI FileProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv)
{ {
...@@ -360,7 +359,7 @@ HRESULT FileProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) ...@@ -360,7 +359,7 @@ HRESULT FileProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
ret = heap_alloc(sizeof(FileProtocol)); ret = heap_alloc(sizeof(FileProtocol));
ret->lpInternetProtocolVtbl = &FileProtocolVtbl; ret->lpIInternetProtocolVtbl = &FileProtocolVtbl;
ret->lpInternetPriorityVtbl = &FilePriorityVtbl; ret->lpInternetPriorityVtbl = &FilePriorityVtbl;
ret->file = NULL; ret->file = NULL;
ret->priority = 0; ret->priority = 0;
......
...@@ -24,14 +24,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); ...@@ -24,14 +24,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef struct { typedef struct {
Protocol base; Protocol base;
const IInternetProtocolVtbl *lpInternetProtocolVtbl; const IInternetProtocolVtbl *lpIInternetProtocolVtbl;
const IInternetPriorityVtbl *lpInternetPriorityVtbl; const IInternetPriorityVtbl *lpInternetPriorityVtbl;
const IWinInetHttpInfoVtbl *lpWinInetHttpInfoVtbl; const IWinInetHttpInfoVtbl *lpWinInetHttpInfoVtbl;
LONG ref; LONG ref;
} FtpProtocol; } FtpProtocol;
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl) #define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl)
#define INETHTTPINFO(x) ((IWinInetHttpInfo*) &(x)->lpWinInetHttpInfoVtbl) #define INETHTTPINFO(x) ((IWinInetHttpInfo*) &(x)->lpWinInetHttpInfoVtbl)
...@@ -80,7 +79,7 @@ static const ProtocolVtbl AsyncProtocolVtbl = { ...@@ -80,7 +79,7 @@ static const ProtocolVtbl AsyncProtocolVtbl = {
FtpProtocol_close_connection FtpProtocol_close_connection
}; };
#define PROTOCOL_THIS(iface) DEFINE_THIS(FtpProtocol, InternetProtocol, iface) #define PROTOCOL_THIS(iface) DEFINE_THIS(FtpProtocol, IInternetProtocol, iface)
static HRESULT WINAPI FtpProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) static HRESULT WINAPI FtpProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv)
{ {
...@@ -360,9 +359,9 @@ HRESULT FtpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) ...@@ -360,9 +359,9 @@ HRESULT FtpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
ret = heap_alloc_zero(sizeof(FtpProtocol)); ret = heap_alloc_zero(sizeof(FtpProtocol));
ret->base.vtbl = &AsyncProtocolVtbl; ret->base.vtbl = &AsyncProtocolVtbl;
ret->lpInternetProtocolVtbl = &FtpProtocolVtbl; ret->lpIInternetProtocolVtbl = &FtpProtocolVtbl;
ret->lpInternetPriorityVtbl = &FtpPriorityVtbl; ret->lpInternetPriorityVtbl = &FtpPriorityVtbl;
ret->lpWinInetHttpInfoVtbl = &WinInetHttpInfoVtbl; ret->lpWinInetHttpInfoVtbl = &WinInetHttpInfoVtbl;
ret->ref = 1; ret->ref = 1;
*ppobj = PROTOCOL(ret); *ppobj = PROTOCOL(ret);
......
...@@ -24,13 +24,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); ...@@ -24,13 +24,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef struct { typedef struct {
Protocol base; Protocol base;
const IInternetProtocolVtbl *lpInternetProtocolVtbl; const IInternetProtocolVtbl *lpIInternetProtocolVtbl;
const IInternetPriorityVtbl *lpInternetPriorityVtbl; const IInternetPriorityVtbl *lpInternetPriorityVtbl;
LONG ref; LONG ref;
} GopherProtocol; } GopherProtocol;
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl) #define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl)
#define ASYNCPROTOCOL_THIS(iface) DEFINE_THIS2(GopherProtocol, base, iface) #define ASYNCPROTOCOL_THIS(iface) DEFINE_THIS2(GopherProtocol, base, iface)
...@@ -67,7 +66,7 @@ static const ProtocolVtbl AsyncProtocolVtbl = { ...@@ -67,7 +66,7 @@ static const ProtocolVtbl AsyncProtocolVtbl = {
GopherProtocol_close_connection GopherProtocol_close_connection
}; };
#define PROTOCOL_THIS(iface) DEFINE_THIS(GopherProtocol, InternetProtocol, iface) #define PROTOCOL_THIS(iface) DEFINE_THIS(GopherProtocol, IInternetProtocol, iface)
static HRESULT WINAPI GopherProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) static HRESULT WINAPI GopherProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv)
{ {
...@@ -289,8 +288,8 @@ HRESULT GopherProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) ...@@ -289,8 +288,8 @@ HRESULT GopherProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
ret = heap_alloc_zero(sizeof(GopherProtocol)); ret = heap_alloc_zero(sizeof(GopherProtocol));
ret->base.vtbl = &AsyncProtocolVtbl; ret->base.vtbl = &AsyncProtocolVtbl;
ret->lpInternetProtocolVtbl = &GopherProtocolVtbl; ret->lpIInternetProtocolVtbl = &GopherProtocolVtbl;
ret->lpInternetPriorityVtbl = &GopherPriorityVtbl; ret->lpInternetPriorityVtbl = &GopherPriorityVtbl;
ret->ref = 1; ret->ref = 1;
*ppobj = PROTOCOL(ret); *ppobj = PROTOCOL(ret);
......
...@@ -32,7 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); ...@@ -32,7 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef struct { typedef struct {
Protocol base; Protocol base;
const IInternetProtocolVtbl *lpInternetProtocolVtbl; const IInternetProtocolVtbl *lpIInternetProtocolVtbl;
const IInternetPriorityVtbl *lpInternetPriorityVtbl; const IInternetPriorityVtbl *lpInternetPriorityVtbl;
const IWinInetHttpInfoVtbl *lpWinInetHttpInfoVtbl; const IWinInetHttpInfoVtbl *lpWinInetHttpInfoVtbl;
...@@ -43,7 +43,6 @@ typedef struct { ...@@ -43,7 +43,6 @@ typedef struct {
LONG ref; LONG ref;
} HttpProtocol; } HttpProtocol;
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl) #define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl)
#define INETHTTPINFO(x) ((IWinInetHttpInfo*) &(x)->lpWinInetHttpInfoVtbl) #define INETHTTPINFO(x) ((IWinInetHttpInfo*) &(x)->lpWinInetHttpInfoVtbl)
...@@ -309,7 +308,7 @@ static const ProtocolVtbl AsyncProtocolVtbl = { ...@@ -309,7 +308,7 @@ static const ProtocolVtbl AsyncProtocolVtbl = {
HttpProtocol_close_connection HttpProtocol_close_connection
}; };
#define PROTOCOL_THIS(iface) DEFINE_THIS(HttpProtocol, InternetProtocol, iface) #define PROTOCOL_THIS(iface) DEFINE_THIS(HttpProtocol, IInternetProtocol, iface)
static HRESULT WINAPI HttpProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) static HRESULT WINAPI HttpProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv)
{ {
...@@ -590,9 +589,9 @@ static HRESULT create_http_protocol(BOOL https, void **ppobj) ...@@ -590,9 +589,9 @@ static HRESULT create_http_protocol(BOOL https, void **ppobj)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
ret->base.vtbl = &AsyncProtocolVtbl; ret->base.vtbl = &AsyncProtocolVtbl;
ret->lpInternetProtocolVtbl = &HttpProtocolVtbl; ret->lpIInternetProtocolVtbl = &HttpProtocolVtbl;
ret->lpInternetPriorityVtbl = &HttpPriorityVtbl; ret->lpInternetPriorityVtbl = &HttpPriorityVtbl;
ret->lpWinInetHttpInfoVtbl = &WinInetHttpInfoVtbl; ret->lpWinInetHttpInfoVtbl = &WinInetHttpInfoVtbl;
ret->https = https; ret->https = https;
ret->ref = 1; ret->ref = 1;
......
...@@ -22,16 +22,14 @@ ...@@ -22,16 +22,14 @@
WINE_DEFAULT_DEBUG_CHANNEL(urlmon); WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef struct { typedef struct {
const IInternetProtocolVtbl *lpInternetProtocolVtbl; const IInternetProtocolVtbl *lpIInternetProtocolVtbl;
LONG ref; LONG ref;
IStream *stream; IStream *stream;
} MkProtocol; } MkProtocol;
#define PROTOCOL_THIS(iface) DEFINE_THIS(MkProtocol, InternetProtocol, iface) #define PROTOCOL_THIS(iface) DEFINE_THIS(MkProtocol, IInternetProtocol, iface)
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
static HRESULT WINAPI MkProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) static HRESULT WINAPI MkProtocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv)
{ {
...@@ -293,7 +291,7 @@ HRESULT MkProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) ...@@ -293,7 +291,7 @@ HRESULT MkProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
ret = heap_alloc(sizeof(MkProtocol)); ret = heap_alloc(sizeof(MkProtocol));
ret->lpInternetProtocolVtbl = &MkProtocolVtbl; ret->lpIInternetProtocolVtbl = &MkProtocolVtbl;
ret->ref = 1; ret->ref = 1;
ret->stream = NULL; ret->stream = NULL;
......
...@@ -107,6 +107,9 @@ HRESULT protocol_lock_request(Protocol*); ...@@ -107,6 +107,9 @@ HRESULT protocol_lock_request(Protocol*);
HRESULT protocol_unlock_request(Protocol*); HRESULT protocol_unlock_request(Protocol*);
void protocol_close_connection(Protocol*); void protocol_close_connection(Protocol*);
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpIInternetProtocolVtbl)
#define PROTSINK(x) ((IInternetProtocolSink*) &(x)->lpIInternetProtocolSinkVtbl)
typedef struct { typedef struct {
HWND notif_hwnd; HWND notif_hwnd;
DWORD notif_hwnd_cnt; DWORD notif_hwnd_cnt;
......
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