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
8a669c9a
Commit
8a669c9a
authored
Dec 28, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 28, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added [Un]RegisterMimeFilter implementation.
parent
96be709c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
5 deletions
+48
-5
session.c
dlls/urlmon/session.c
+48
-5
No files found.
dlls/urlmon/session.c
View file @
8a669c9a
...
...
@@ -31,7 +31,16 @@ typedef struct name_space {
struct
name_space
*
next
;
}
name_space
;
typedef
struct
mime_filter
{
IClassFactory
*
cf
;
CLSID
clsid
;
LPWSTR
mime
;
struct
mime_filter
*
next
;
}
mime_filter
;
static
name_space
*
name_space_list
=
NULL
;
static
mime_filter
*
mime_filter_list
=
NULL
;
static
name_space
*
find_name_space
(
LPCWSTR
protocol
)
{
...
...
@@ -200,8 +209,8 @@ static HRESULT WINAPI InternetSession_RegisterNameSpace(IInternetSession *iface,
IClassFactory_AddRef
(
pCF
);
new_name_space
->
cf
=
pCF
;
new_name_space
->
protocol
=
heap_strdupW
(
pwzProtocol
);
new_name_space
->
clsid
=
*
rclsid
;
new_name_space
->
protocol
=
heap_strdupW
(
pwzProtocol
);
new_name_space
->
next
=
name_space_list
;
name_space_list
=
new_name_space
;
...
...
@@ -242,15 +251,49 @@ static HRESULT WINAPI InternetSession_UnregisterNameSpace(IInternetSession *ifac
static
HRESULT
WINAPI
InternetSession_RegisterMimeFilter
(
IInternetSession
*
iface
,
IClassFactory
*
pCF
,
REFCLSID
rclsid
,
LPCWSTR
pwzType
)
{
FIXME
(
"(%p %s %s)
\n
"
,
pCF
,
debugstr_guid
(
rclsid
),
debugstr_w
(
pwzType
));
return
E_NOTIMPL
;
mime_filter
*
filter
;
TRACE
(
"(%p %s %s)
\n
"
,
pCF
,
debugstr_guid
(
rclsid
),
debugstr_w
(
pwzType
));
filter
=
heap_alloc
(
sizeof
(
mime_filter
));
IClassFactory_AddRef
(
pCF
);
filter
->
cf
=
pCF
;
filter
->
clsid
=
*
rclsid
;
filter
->
mime
=
heap_strdupW
(
pwzType
);
filter
->
next
=
mime_filter_list
;
mime_filter_list
=
filter
;
return
S_OK
;
}
static
HRESULT
WINAPI
InternetSession_UnregisterMimeFilter
(
IInternetSession
*
iface
,
IClassFactory
*
pCF
,
LPCWSTR
pwzType
)
{
FIXME
(
"(%p %s)
\n
"
,
pCF
,
debugstr_w
(
pwzType
));
return
E_NOTIMPL
;
mime_filter
*
iter
,
*
prev
=
NULL
;
TRACE
(
"(%p %s)
\n
"
,
pCF
,
debugstr_w
(
pwzType
));
for
(
iter
=
mime_filter_list
;
iter
;
iter
=
iter
->
next
)
{
if
(
iter
->
cf
==
pCF
&&
!
strcmpW
(
iter
->
mime
,
pwzType
))
break
;
prev
=
iter
;
}
if
(
!
iter
)
return
S_OK
;
if
(
prev
)
prev
->
next
=
iter
->
next
;
else
mime_filter_list
=
iter
->
next
;
IClassFactory_Release
(
iter
->
cf
);
heap_free
(
iter
->
mime
);
heap_free
(
iter
);
return
S_OK
;
}
static
HRESULT
WINAPI
InternetSession_CreateBinding
(
IInternetSession
*
iface
,
...
...
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