Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
1ca20552
Commit
1ca20552
authored
Dec 30, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 31, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Use BindProtocol in Binding object.
parent
86a0b1d2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
42 deletions
+27
-42
binding.c
dlls/urlmon/binding.c
+3
-28
bindprot.c
dlls/urlmon/bindprot.c
+22
-12
session.c
dlls/urlmon/session.c
+1
-1
urlmon_main.h
dlls/urlmon/urlmon_main.h
+1
-1
No files found.
dlls/urlmon/binding.c
View file @
1ca20552
...
...
@@ -790,6 +790,8 @@ static HRESULT WINAPI InternetProtocolSink_ReportProgress(IInternetProtocolSink
case
BINDSTATUS_SENDINGREQUEST
:
on_progress
(
This
,
0
,
0
,
BINDSTATUS_SENDINGREQUEST
,
szStatusText
);
break
;
case
BINDSTATUS_PROTOCOLCLASSID
:
break
;
case
BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE
:
mime_available
(
This
,
szStatusText
,
FALSE
);
break
;
...
...
@@ -1095,33 +1097,6 @@ static HRESULT get_callback(IBindCtx *pbc, IBindStatusCallback **callback)
return
SUCCEEDED
(
hres
)
?
S_OK
:
MK_E_SYNTAX
;
}
static
HRESULT
get_protocol
(
Binding
*
This
,
LPCWSTR
url
)
{
IClassFactory
*
cf
=
NULL
;
HRESULT
hres
;
hres
=
IBindStatusCallback_QueryInterface
(
This
->
callback
,
&
IID_IInternetProtocol
,
(
void
**
)
&
This
->
protocol
);
if
(
SUCCEEDED
(
hres
))
return
S_OK
;
if
(
This
->
service_provider
)
{
hres
=
IServiceProvider_QueryService
(
This
->
service_provider
,
&
IID_IInternetProtocol
,
&
IID_IInternetProtocol
,
(
void
**
)
&
This
->
protocol
);
if
(
SUCCEEDED
(
hres
))
return
S_OK
;
}
hres
=
get_protocol_handler
(
url
,
NULL
,
&
cf
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IClassFactory_CreateInstance
(
cf
,
NULL
,
&
IID_IInternetProtocol
,
(
void
**
)
&
This
->
protocol
);
IClassFactory_Release
(
cf
);
return
hres
;
}
static
BOOL
is_urlmon_protocol
(
LPCWSTR
url
)
{
static
const
WCHAR
wszCdl
[]
=
{
'c'
,
'd'
,
'l'
};
...
...
@@ -1210,7 +1185,7 @@ static HRESULT Binding_Create(LPCWSTR url, IBindCtx *pbc, REFIID riid, Binding *
IBindStatusCallback_QueryInterface
(
ret
->
callback
,
&
IID_IServiceProvider
,
(
void
**
)
&
ret
->
service_provider
);
hres
=
get_protocol
(
ret
,
ur
l
);
hres
=
create_binding_protocol
(
url
,
TRUE
,
&
ret
->
protoco
l
);
if
(
FAILED
(
hres
))
{
WARN
(
"Could not get protocol handler
\n
"
);
IBinding_Release
(
BINDING
(
ret
));
...
...
dlls/urlmon/bindprot.c
View file @
1ca20552
...
...
@@ -38,6 +38,7 @@ typedef struct {
LONG
priority
;
BOOL
reported_result
;
BOOL
from_urlmon
;
}
BindProtocol
;
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
...
...
@@ -152,16 +153,23 @@ static HRESULT WINAPI BindProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IClassFactory_CreateInstance
(
cf
,
(
IUnknown
*
)
BINDINFO
(
This
),
&
IID_IUnknown
,
(
void
**
)
&
unk
);
IClassFactory_Release
(
cf
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IInternetProtocol
,
(
void
**
)
&
protocol
);
IUnknown_Release
(
unk
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
This
->
from_urlmon
)
{
hres
=
IClassFactory_CreateInstance
(
cf
,
NULL
,
&
IID_IInternetProtocol
,
(
void
**
)
&
protocol
);
IClassFactory_Release
(
cf
);
if
(
FAILED
(
hres
))
return
hres
;
}
else
{
hres
=
IClassFactory_CreateInstance
(
cf
,
(
IUnknown
*
)
BINDINFO
(
This
),
&
IID_IUnknown
,
(
void
**
)
&
unk
);
IClassFactory_Release
(
cf
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IInternetProtocol
,
(
void
**
)
&
protocol
);
IUnknown_Release
(
unk
);
if
(
FAILED
(
hres
))
return
hres
;
}
}
StringFromCLSID
(
&
clsid
,
&
clsid_str
);
...
...
@@ -488,7 +496,8 @@ static HRESULT WINAPI BPInternetProtocolSink_ReportProgress(IInternetProtocolSin
if
(
!
This
->
protocol_sink
)
return
S_OK
;
return
IInternetProtocolSink_ReportProgress
(
This
->
protocol_sink
,
BINDSTATUS_MIMETYPEAVAILABLE
,
szStatusText
);
This
->
from_urlmon
?
BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE
:
BINDSTATUS_MIMETYPEAVAILABLE
,
szStatusText
);
default:
FIXME
(
"unsupported ulStatusCode %u
\n
"
,
ulStatusCode
);
}
...
...
@@ -579,7 +588,7 @@ static const IServiceProviderVtbl ServiceProviderVtbl = {
BPServiceProvider_QueryService
};
HRESULT
create_binding_protocol
(
LPCWSTR
url
,
IInternetProtocol
**
protocol
)
HRESULT
create_binding_protocol
(
LPCWSTR
url
,
BOOL
from_urlmon
,
IInternetProtocol
**
protocol
)
{
BindProtocol
*
ret
=
heap_alloc_zero
(
sizeof
(
BindProtocol
));
...
...
@@ -590,6 +599,7 @@ HRESULT create_binding_protocol(LPCWSTR url, IInternetProtocol **protocol)
ret
->
lpInternetProtocolSinkVtbl
=
&
InternetProtocolSinkVtbl
;
ret
->
ref
=
1
;
ret
->
from_urlmon
=
from_urlmon
;
URLMON_LockModule
();
...
...
dlls/urlmon/session.c
View file @
1ca20552
...
...
@@ -306,7 +306,7 @@ static HRESULT WINAPI InternetSession_CreateBinding(IInternetSession *iface,
if
(
pBC
||
pUnkOuter
||
ppUnk
||
dwOption
)
FIXME
(
"Unsupported arguments
\n
"
);
return
create_binding_protocol
(
szUrl
,
ppOInetProt
);
return
create_binding_protocol
(
szUrl
,
FALSE
,
ppOInetProt
);
}
static
HRESULT
WINAPI
InternetSession_SetSessionOption
(
IInternetSession
*
iface
,
...
...
dlls/urlmon/urlmon_main.h
View file @
1ca20552
...
...
@@ -70,7 +70,7 @@ HRESULT get_protocol_handler(LPCWSTR url, CLSID *clsid, IClassFactory **ret);
HRESULT
start_binding
(
LPCWSTR
url
,
IBindCtx
*
pbc
,
REFIID
riid
,
void
**
ppv
);
HRESULT
create_binding_protocol
(
LPCWSTR
url
,
IInternetProtocol
**
protocol
);
HRESULT
create_binding_protocol
(
LPCWSTR
url
,
BOOL
from_urlmon
,
IInternetProtocol
**
protocol
);
void
set_binding_sink
(
IInternetProtocol
*
bind_protocol
,
IInternetProtocolSink
*
sink
);
static
inline
void
*
heap_alloc
(
size_t
len
)
...
...
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