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
db24fff1
Commit
db24fff1
authored
May 31, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
May 31, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Use FindMimeFromData to determine MIME type.
parent
bb835ae4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
5 deletions
+21
-5
binding.c
dlls/urlmon/binding.c
+21
-5
No files found.
dlls/urlmon/binding.c
View file @
db24fff1
...
...
@@ -53,6 +53,7 @@ typedef struct {
DWORD
bindf
;
LPWSTR
mime
;
LPWSTR
url
;
BOOL
verified_mime
;
DWORD
apartment_thread
;
HWND
notif_hwnd
;
...
...
@@ -737,6 +738,7 @@ static HRESULT WINAPI InternetProtocolSink_ReportProgress(IInternetProtocolSink
on_progress
(
This
,
0
,
0
,
BINDSTATUS_SENDINGREQUEST
,
szStatusText
);
break
;
case
BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE
:
This
->
verified_mime
=
TRUE
;
on_progress
(
This
,
0
,
0
,
BINDSTATUS_MIMETYPEAVAILABLE
,
szStatusText
);
break
;
case
BINDSTATUS_CACHEFILENAMEAVAILABLE
:
...
...
@@ -757,10 +759,25 @@ static HRESULT WINAPI InternetProtocolSink_ReportData(IInternetProtocolSink *ifa
TRACE
(
"(%p)->(%ld %lu %lu)
\n
"
,
This
,
grfBSCF
,
ulProgress
,
ulProgressMax
);
if
(
grfBSCF
&
BSCF_FIRSTDATANOTIFICATION
)
{
fill_stream_buffer
(
This
->
stream
);
if
(
!
This
->
verified_mime
)
{
LPWSTR
mime
;
This
->
verified_mime
=
TRUE
;
/* FIXME: Always call FindMediaFromData (its implementation is not yet ready for this). */
if
(
This
->
mime
)
IBindStatusCallback_OnProgress
(
This
->
callback
,
ulProgress
,
ulProgressMax
,
BINDSTATUS_MIMETYPEAVAILABLE
,
This
->
mime
);
mime
=
This
->
mime
;
else
FindMimeFromData
(
NULL
,
This
->
url
,
This
->
stream
->
buf
,
min
(
This
->
stream
->
buf_size
,
255
),
This
->
mime
,
0
,
&
mime
,
0
);
IBindStatusCallback_OnProgress
(
This
->
callback
,
ulProgress
,
ulProgressMax
,
BINDSTATUS_MIMETYPEAVAILABLE
,
mime
);
}
if
(
grfBSCF
&
BSCF_FIRSTDATANOTIFICATION
)
{
IBindStatusCallback_OnProgress
(
This
->
callback
,
ulProgress
,
ulProgressMax
,
BINDSTATUS_BEGINDOWNLOADDATA
,
This
->
url
);
}
...
...
@@ -772,8 +789,6 @@ static HRESULT WINAPI InternetProtocolSink_ReportData(IInternetProtocolSink *ifa
if
(
grfBSCF
&
BSCF_FIRSTDATANOTIFICATION
)
IInternetProtocol_LockRequest
(
This
->
protocol
,
0
);
fill_stream_buffer
(
This
->
stream
);
formatetc
.
cfFormat
=
0
;
/* FIXME */
formatetc
.
ptd
=
NULL
;
formatetc
.
dwAspect
=
1
;
...
...
@@ -1028,6 +1043,7 @@ static HRESULT Binding_Create(LPCWSTR url, IBindCtx *pbc, REFIID riid, Binding *
ret
->
url
=
NULL
;
ret
->
apartment_thread
=
GetCurrentThreadId
();
ret
->
notif_hwnd
=
get_notif_hwnd
();
ret
->
verified_mime
=
FALSE
;
memset
(
&
ret
->
bindinfo
,
0
,
sizeof
(
BINDINFO
));
ret
->
bindinfo
.
cbSize
=
sizeof
(
BINDINFO
);
...
...
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