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
8ffd262d
Commit
8ffd262d
authored
May 18, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
May 19, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Move MIME availability handling to separated function.
parent
23c6cd42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
21 deletions
+17
-21
bindprot.c
dlls/urlmon/bindprot.c
+17
-21
No files found.
dlls/urlmon/bindprot.c
View file @
8ffd262d
...
...
@@ -220,6 +220,20 @@ static BOOL inline do_direct_notif(BindProtocol *This)
return
!
(
This
->
pi
&
PI_APARTMENTTHREADED
)
||
(
This
->
apartment_thread
==
GetCurrentThreadId
()
&&
!
This
->
continue_call
);
}
static
void
mime_available
(
BindProtocol
*
This
,
LPCWSTR
mime
,
BOOL
verified
)
{
heap_free
(
This
->
mime
);
This
->
mime
=
NULL
;
This
->
mime
=
heap_strdupW
(
mime
);
if
(
verified
||
!
(
This
->
pi
&
PI_MIMEVERIFICATION
))
{
This
->
reported_mime
=
TRUE
;
if
(
This
->
protocol_sink
)
IInternetProtocolSink_ReportProgress
(
This
->
protocol_sink
,
BINDSTATUS_MIMETYPEAVAILABLE
,
mime
);
}
}
#define PROTOCOL_THIS(iface) DEFINE_THIS(BindProtocol, InternetProtocol, iface)
static
HRESULT
WINAPI
BindProtocol_QueryInterface
(
IInternetProtocol
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
@@ -859,25 +873,11 @@ static void report_progress(BindProtocol *This, ULONG status_code, LPCWSTR statu
break
;
case
BINDSTATUS_MIMETYPEAVAILABLE
:
if
(
!
This
->
reported_mime
)
{
heap_free
(
This
->
mime
);
This
->
mime
=
heap_strdupW
(
status_text
);
}
if
(
This
->
protocol_sink
&&
!
(
This
->
pi
&
PI_MIMEVERIFICATION
))
IInternetProtocolSink_ReportProgress
(
This
->
protocol_sink
,
status_code
,
status_text
);
mime_available
(
This
,
status_text
,
FALSE
);
break
;
case
BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE
:
if
(
!
This
->
reported_mime
)
{
heap_free
(
This
->
mime
);
This
->
mime
=
heap_strdupW
(
status_text
);
}
if
(
This
->
protocol_sink
)
{
This
->
reported_mime
=
TRUE
;
IInternetProtocolSink_ReportProgress
(
This
->
protocol_sink
,
BINDSTATUS_MIMETYPEAVAILABLE
,
status_text
);
}
mime_available
(
This
,
status_text
,
TRUE
);
break
;
default:
...
...
@@ -960,12 +960,8 @@ static HRESULT report_data(BindProtocol *This, DWORD bscf, ULONG progress, ULONG
if
(
FAILED
(
hres
))
return
hres
;
heap_free
(
This
->
mime
);
This
->
mime
=
heap_strdupW
(
mime
);
mime_available
(
This
,
mime
,
TRUE
);
CoTaskMemFree
(
mime
);
This
->
reported_mime
=
TRUE
;
IInternetProtocolSink_ReportProgress
(
This
->
protocol_sink
,
BINDSTATUS_MIMETYPEAVAILABLE
,
This
->
mime
);
}
return
IInternetProtocolSink_ReportData
(
This
->
protocol_sink
,
bscf
,
progress
,
progress_max
);
...
...
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