Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a9765337
Commit
a9765337
authored
Dec 24, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added IServiceProvider implementation to BindProtocol object.
parent
7cd13e17
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
1 deletion
+52
-1
bindprot.c
dlls/urlmon/bindprot.c
+52
-1
No files found.
dlls/urlmon/bindprot.c
View file @
a9765337
...
...
@@ -25,6 +25,7 @@ typedef struct {
const
IInternetProtocolVtbl
*
lpInternetProtocolVtbl
;
const
IInternetBindInfoVtbl
*
lpInternetBindInfoVtbl
;
const
IInternetPriorityVtbl
*
lpInternetPriorityVtbl
;
const
IServiceProviderVtbl
*
lpServiceProviderVtbl
;
const
IInternetProtocolSinkVtbl
*
lpInternetProtocolSinkVtbl
;
LONG
ref
;
...
...
@@ -32,6 +33,7 @@ typedef struct {
IInternetProtocol
*
protocol
;
IInternetBindInfo
*
bind_info
;
IInternetProtocolSink
*
protocol_sink
;
IServiceProvider
*
service_provider
;
LONG
priority
;
}
BindProtocol
;
...
...
@@ -39,6 +41,7 @@ typedef struct {
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
#define BINDINFO(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl)
#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl)
#define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl)
#define PROTSINK(x) ((IInternetProtocolSink*) &(x)->lpInternetProtocolSinkVtbl)
#define PROTOCOL_THIS(iface) DEFINE_THIS(BindProtocol, InternetProtocol, iface)
...
...
@@ -66,7 +69,8 @@ static HRESULT WINAPI BindProtocol_QueryInterface(IInternetProtocol *iface, REFI
}
else
if
(
IsEqualGUID
(
&
IID_IAuthenticate
,
riid
))
{
FIXME
(
"(%p)->(IID_IAuthenticate %p)
\n
"
,
This
,
ppv
);
}
else
if
(
IsEqualGUID
(
&
IID_IServiceProvider
,
riid
))
{
FIXME
(
"(%p)->(IID_IServiceProvider %p)
\n
"
,
This
,
ppv
);
TRACE
(
"(%p)->(IID_IServiceProvider %p)
\n
"
,
This
,
ppv
);
*
ppv
=
SERVPROV
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IInternetProtocolSink
,
riid
))
{
TRACE
(
"(%p)->(IID_IInternetProtocolSink %p)
\n
"
,
This
,
ppv
);
*
ppv
=
PROTSINK
(
This
);
...
...
@@ -171,6 +175,8 @@ static HRESULT WINAPI BindProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
IInternetProtocolSink_AddRef
(
pOIProtSink
);
This
->
protocol_sink
=
pOIProtSink
;
IInternetProtocolSink_QueryInterface
(
pOIProtSink
,
&
IID_IServiceProvider
,
(
void
**
)
&
This
->
service_provider
);
hres
=
IInternetProtocol_QueryInterface
(
protocol
,
&
IID_IInternetPriority
,
(
void
**
)
&
priority
);
if
(
SUCCEEDED
(
hres
))
{
IInternetPriority_SetPriority
(
priority
,
This
->
priority
);
...
...
@@ -470,6 +476,49 @@ static const IInternetProtocolSinkVtbl InternetProtocolSinkVtbl = {
InternetProtocolSink_ReportResult
};
#define SERVPROV_THIS(iface) DEFINE_THIS(BindProtocol, ServiceProvider, iface)
static
HRESULT
WINAPI
BPServiceProvider_QueryInterface
(
IServiceProvider
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
BindProtocol
*
This
=
SERVPROV_THIS
(
iface
);
return
IInternetProtocol_QueryInterface
(
PROTOCOL
(
This
),
riid
,
ppv
);
}
static
ULONG
WINAPI
BPServiceProvider_AddRef
(
IServiceProvider
*
iface
)
{
BindProtocol
*
This
=
SERVPROV_THIS
(
iface
);
return
IInternetProtocol_AddRef
(
PROTOCOL
(
This
));
}
static
ULONG
WINAPI
BPServiceProvider_Release
(
IServiceProvider
*
iface
)
{
BindProtocol
*
This
=
SERVPROV_THIS
(
iface
);
return
IInternetProtocol_Release
(
PROTOCOL
(
This
));
}
static
HRESULT
WINAPI
BPServiceProvider_QueryService
(
IServiceProvider
*
iface
,
REFGUID
guidService
,
REFIID
riid
,
void
**
ppv
)
{
BindProtocol
*
This
=
SERVPROV_THIS
(
iface
);
TRACE
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_guid
(
guidService
),
debugstr_guid
(
riid
),
ppv
);
if
(
!
This
->
service_provider
)
return
E_NOINTERFACE
;
return
IServiceProvider_QueryService
(
This
->
service_provider
,
guidService
,
riid
,
ppv
);
}
#undef SERVPROV_THIS
static
const
IServiceProviderVtbl
ServiceProviderVtbl
=
{
BPServiceProvider_QueryInterface
,
BPServiceProvider_AddRef
,
BPServiceProvider_Release
,
BPServiceProvider_QueryService
};
HRESULT
create_binding_protocol
(
LPCWSTR
url
,
IInternetProtocol
**
protocol
)
{
BindProtocol
*
ret
=
heap_alloc
(
sizeof
(
BindProtocol
));
...
...
@@ -477,12 +526,14 @@ HRESULT create_binding_protocol(LPCWSTR url, IInternetProtocol **protocol)
ret
->
lpInternetProtocolVtbl
=
&
BindProtocolVtbl
;
ret
->
lpInternetBindInfoVtbl
=
&
InternetBindInfoVtbl
;
ret
->
lpInternetPriorityVtbl
=
&
InternetPriorityVtbl
;
ret
->
lpServiceProviderVtbl
=
&
ServiceProviderVtbl
;
ret
->
lpInternetProtocolSinkVtbl
=
&
InternetProtocolSinkVtbl
;
ret
->
ref
=
1
;
ret
->
protocol
=
NULL
;
ret
->
bind_info
=
NULL
;
ret
->
protocol_sink
=
NULL
;
ret
->
service_provider
=
NULL
;
ret
->
priority
=
0
;
URLMON_LockModule
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment