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
0d27b740
Commit
0d27b740
authored
Oct 04, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added Abort support to BindProtocol.
parent
2e59b5ac
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
6 deletions
+52
-6
bindprot.c
dlls/urlmon/bindprot.c
+11
-4
protocol.c
dlls/urlmon/tests/protocol.c
+41
-2
No files found.
dlls/urlmon/bindprot.c
View file @
0d27b740
...
@@ -423,8 +423,10 @@ static HRESULT WINAPI BindProtocol_Abort(IInternetProtocol *iface, HRESULT hrRea
...
@@ -423,8 +423,10 @@ static HRESULT WINAPI BindProtocol_Abort(IInternetProtocol *iface, HRESULT hrRea
DWORD
dwOptions
)
DWORD
dwOptions
)
{
{
BindProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
BindProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
FIXME
(
"(%p)->(%08x %08x)
\n
"
,
This
,
hrReason
,
dwOptions
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%08x %08x)
\n
"
,
This
,
hrReason
,
dwOptions
);
return
IInternetProtocol_Abort
(
This
->
protocol_handler
,
hrReason
,
dwOptions
);
}
}
static
HRESULT
WINAPI
BindProtocol_Terminate
(
IInternetProtocol
*
iface
,
DWORD
dwOptions
)
static
HRESULT
WINAPI
BindProtocol_Terminate
(
IInternetProtocol
*
iface
,
DWORD
dwOptions
)
...
@@ -653,8 +655,13 @@ static HRESULT WINAPI ProtocolHandler_Abort(IInternetProtocol *iface, HRESULT hr
...
@@ -653,8 +655,13 @@ static HRESULT WINAPI ProtocolHandler_Abort(IInternetProtocol *iface, HRESULT hr
DWORD
dwOptions
)
DWORD
dwOptions
)
{
{
BindProtocol
*
This
=
PROTOCOLHANDLER_THIS
(
iface
);
BindProtocol
*
This
=
PROTOCOLHANDLER_THIS
(
iface
);
FIXME
(
"(%p)->(%08x %08x)
\n
"
,
This
,
hrReason
,
dwOptions
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%08x %08x)
\n
"
,
This
,
hrReason
,
dwOptions
);
if
(
This
->
protocol
&&
!
This
->
reported_result
)
return
IInternetProtocol_Abort
(
This
->
protocol
,
hrReason
,
dwOptions
);
return
S_OK
;
}
}
static
HRESULT
WINAPI
ProtocolHandler_Terminate
(
IInternetProtocol
*
iface
,
DWORD
dwOptions
)
static
HRESULT
WINAPI
ProtocolHandler_Terminate
(
IInternetProtocol
*
iface
,
DWORD
dwOptions
)
...
...
dlls/urlmon/tests/protocol.c
View file @
0d27b740
...
@@ -108,6 +108,7 @@ DEFINE_EXPECT(Read2);
...
@@ -108,6 +108,7 @@ DEFINE_EXPECT(Read2);
DEFINE_EXPECT
(
SetPriority
);
DEFINE_EXPECT
(
SetPriority
);
DEFINE_EXPECT
(
LockRequest
);
DEFINE_EXPECT
(
LockRequest
);
DEFINE_EXPECT
(
UnlockRequest
);
DEFINE_EXPECT
(
UnlockRequest
);
DEFINE_EXPECT
(
Abort
);
DEFINE_EXPECT
(
MimeFilter_CreateInstance
);
DEFINE_EXPECT
(
MimeFilter_CreateInstance
);
DEFINE_EXPECT
(
MimeFilter_Start
);
DEFINE_EXPECT
(
MimeFilter_Start
);
DEFINE_EXPECT
(
MimeFilter_ReportProgress
);
DEFINE_EXPECT
(
MimeFilter_ReportProgress
);
...
@@ -1159,8 +1160,16 @@ static ULONG WINAPI Protocol_Release(IInternetProtocol *iface)
...
@@ -1159,8 +1160,16 @@ static ULONG WINAPI Protocol_Release(IInternetProtocol *iface)
static
HRESULT
WINAPI
Protocol_Abort
(
IInternetProtocol
*
iface
,
HRESULT
hrReason
,
static
HRESULT
WINAPI
Protocol_Abort
(
IInternetProtocol
*
iface
,
HRESULT
hrReason
,
DWORD
dwOptions
)
DWORD
dwOptions
)
{
{
ok
(
0
,
"unexpected call
\n
"
);
HRESULT
hres
;
return
E_NOTIMPL
;
CHECK_EXPECT
(
Abort
);
SET_EXPECT
(
ReportResult
);
hres
=
IInternetProtocolSink_ReportResult
(
binding_sink
,
S_OK
,
ERROR_SUCCESS
,
NULL
);
ok
(
hres
==
S_OK
,
"ReportResult failed: %08x
\n
"
,
hres
);
CHECK_CALLED
(
ReportResult
);
return
S_OK
;
}
}
static
HRESULT
WINAPI
Protocol_Suspend
(
IInternetProtocol
*
iface
)
static
HRESULT
WINAPI
Protocol_Suspend
(
IInternetProtocol
*
iface
)
...
@@ -1262,6 +1271,11 @@ static DWORD WINAPI thread_proc(PVOID arg)
...
@@ -1262,6 +1271,11 @@ static DWORD WINAPI thread_proc(PVOID arg)
else
else
CHECK_CALLED
(
Switch
);
CHECK_CALLED
(
Switch
);
if
(
test_abort
)
{
SetEvent
(
event_complete
);
return
0
;
}
prot_state
=
2
;
prot_state
=
2
;
if
(
mimefilter_test
)
if
(
mimefilter_test
)
SET_EXPECT
(
MimeFilter_Switch
);
SET_EXPECT
(
MimeFilter_Switch
);
...
@@ -2999,6 +3013,18 @@ static void test_CreateBinding(void)
...
@@ -2999,6 +3013,18 @@ static void test_CreateBinding(void)
IInternetBindInfo_Release
(
prot_bind_info
);
IInternetBindInfo_Release
(
prot_bind_info
);
IInternetProtocol_Release
(
protocol
);
IInternetProtocol_Release
(
protocol
);
hres
=
IInternetSession_CreateBinding
(
session
,
NULL
,
test_url
,
NULL
,
NULL
,
&
protocol
,
0
);
ok
(
hres
==
S_OK
,
"CreateBinding failed: %08x
\n
"
,
hres
);
ok
(
protocol
!=
NULL
,
"protocol == NULL
\n
"
);
hres
=
IInternetProtocol_Abort
(
protocol
,
E_ABORT
,
0
);
ok
(
hres
==
S_OK
,
"Abort failed: %08x
\n
"
,
hres
);
hres
=
IInternetProtocol_Abort
(
protocol
,
E_FAIL
,
0
);
ok
(
hres
==
S_OK
,
"Abort failed: %08x
\n
"
,
hres
);
IInternetProtocol_Release
(
protocol
);
hres
=
IInternetSession_UnregisterNameSpace
(
session
,
&
ClassFactory
,
wsz_test
);
hres
=
IInternetSession_UnregisterNameSpace
(
session
,
&
ClassFactory
,
wsz_test
);
ok
(
hres
==
S_OK
,
"UnregisterNameSpace failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"UnregisterNameSpace failed: %08x
\n
"
,
hres
);
...
@@ -3064,6 +3090,17 @@ static void test_binding(int prot, DWORD grf_pi, DWORD test_flags)
...
@@ -3064,6 +3090,17 @@ static void test_binding(int prot, DWORD grf_pi, DWORD test_flags)
IInternetProtocol_Continue
(
protocol
,
pdata
);
IInternetProtocol_Continue
(
protocol
,
pdata
);
CHECK_CALLED
(
Continue
);
CHECK_CALLED
(
Continue
);
}
}
if
(
test_abort
&&
prot_state
==
2
)
{
SET_EXPECT
(
Abort
);
hres
=
IInternetProtocol_Abort
(
protocol
,
E_ABORT
,
0
);
ok
(
hres
==
S_OK
,
"Abort failed: %08x
\n
"
,
hres
);
CHECK_CALLED
(
Abort
);
hres
=
IInternetProtocol_Abort
(
protocol
,
E_ABORT
,
0
);
ok
(
hres
==
S_OK
,
"Abort failed: %08x
\n
"
,
hres
);
SetEvent
(
event_complete2
);
break
;
}
SetEvent
(
event_complete2
);
SetEvent
(
event_complete2
);
}
}
if
(
direct_read
)
if
(
direct_read
)
...
@@ -3179,6 +3216,8 @@ START_TEST(protocol)
...
@@ -3179,6 +3216,8 @@ START_TEST(protocol)
test_binding
(
HTTP_TEST
,
PI_MIMEVERIFICATION
,
TEST_EMULATEPROT
|
TEST_FILTER
);
test_binding
(
HTTP_TEST
,
PI_MIMEVERIFICATION
,
TEST_EMULATEPROT
|
TEST_FILTER
);
trace
(
"Testing http binding (mime verification, emulate prot, direct read)...
\n
"
);
trace
(
"Testing http binding (mime verification, emulate prot, direct read)...
\n
"
);
test_binding
(
HTTP_TEST
,
PI_MIMEVERIFICATION
,
TEST_EMULATEPROT
|
TEST_DIRECT_READ
);
test_binding
(
HTTP_TEST
,
PI_MIMEVERIFICATION
,
TEST_EMULATEPROT
|
TEST_DIRECT_READ
);
trace
(
"Testing http binding (mime verification, emulate prot, abort)...
\n
"
);
test_binding
(
HTTP_TEST
,
PI_MIMEVERIFICATION
,
TEST_EMULATEPROT
|
TEST_ABORT
);
CloseHandle
(
event_complete
);
CloseHandle
(
event_complete
);
CloseHandle
(
event_complete2
);
CloseHandle
(
event_complete2
);
...
...
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