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
fe3e5b9c
Commit
fe3e5b9c
authored
Jan 26, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Added IInternetProtocolInfo stub implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b60b50ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
0 deletions
+91
-0
protocol.c
dlls/inetcomm/protocol.c
+77
-0
mimeole.c
dlls/inetcomm/tests/mimeole.c
+14
-0
No files found.
dlls/inetcomm/protocol.c
View file @
fe3e5b9c
...
...
@@ -29,6 +29,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(inetcomm);
typedef
struct
{
IInternetProtocol
IInternetProtocol_iface
;
IInternetProtocolInfo
IInternetProtocolInfo_iface
;
LONG
ref
;
}
MimeHtmlProtocol
;
...
...
@@ -50,6 +51,9 @@ static HRESULT WINAPI MimeHtmlProtocol_QueryInterface(IInternetProtocol *iface,
}
else
if
(
IsEqualGUID
(
&
IID_IInternetProtocol
,
riid
))
{
TRACE
(
"(%p)->(IID_IInternetProtocol %p)
\n
"
,
iface
,
ppv
);
*
ppv
=
&
This
->
IInternetProtocol_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IInternetProtocolInfo
,
riid
))
{
TRACE
(
"(%p)->(IID_IInternetProtocolInfo %p)
\n
"
,
iface
,
ppv
);
*
ppv
=
&
This
->
IInternetProtocolInfo_iface
;
}
else
{
FIXME
(
"unknown interface %s
\n
"
,
debugstr_guid
(
riid
));
*
ppv
=
NULL
;
...
...
@@ -173,6 +177,78 @@ static const IInternetProtocolVtbl MimeHtmlProtocolVtbl = {
MimeHtmlProtocol_UnlockRequest
};
static
inline
MimeHtmlProtocol
*
impl_from_IInternetProtocolInfo
(
IInternetProtocolInfo
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
MimeHtmlProtocol
,
IInternetProtocolInfo_iface
);
}
static
HRESULT
WINAPI
MimeHtmlProtocolInfo_QueryInterface
(
IInternetProtocolInfo
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
MimeHtmlProtocol
*
This
=
impl_from_IInternetProtocolInfo
(
iface
);
return
IInternetProtocol_QueryInterface
(
&
This
->
IInternetProtocol_iface
,
riid
,
ppv
);
}
static
ULONG
WINAPI
MimeHtmlProtocolInfo_AddRef
(
IInternetProtocolInfo
*
iface
)
{
MimeHtmlProtocol
*
This
=
impl_from_IInternetProtocolInfo
(
iface
);
return
IInternetProtocol_AddRef
(
&
This
->
IInternetProtocol_iface
);
}
static
ULONG
WINAPI
MimeHtmlProtocolInfo_Release
(
IInternetProtocolInfo
*
iface
)
{
MimeHtmlProtocol
*
This
=
impl_from_IInternetProtocolInfo
(
iface
);
return
IInternetProtocol_Release
(
&
This
->
IInternetProtocol_iface
);
}
static
HRESULT
WINAPI
MimeHtmlProtocolInfo_ParseUrl
(
IInternetProtocolInfo
*
iface
,
LPCWSTR
pwzUrl
,
PARSEACTION
ParseAction
,
DWORD
dwParseFlags
,
LPWSTR
pwzResult
,
DWORD
cchResult
,
DWORD
*
pcchResult
,
DWORD
dwReserved
)
{
MimeHtmlProtocol
*
This
=
impl_from_IInternetProtocolInfo
(
iface
);
FIXME
(
"(%p)->(%s %d %x %p %d %p %d)
\n
"
,
This
,
debugstr_w
(
pwzUrl
),
ParseAction
,
dwParseFlags
,
pwzResult
,
cchResult
,
pcchResult
,
dwReserved
);
return
INET_E_DEFAULT_ACTION
;
}
static
HRESULT
WINAPI
MimeHtmlProtocolInfo_CombineUrl
(
IInternetProtocolInfo
*
iface
,
LPCWSTR
pwzBaseUrl
,
LPCWSTR
pwzRelativeUrl
,
DWORD
dwCombineFlags
,
LPWSTR
pwzResult
,
DWORD
cchResult
,
DWORD
*
pcchResult
,
DWORD
dwReserved
)
{
MimeHtmlProtocol
*
This
=
impl_from_IInternetProtocolInfo
(
iface
);
FIXME
(
"(%p)->(%s %s %08x %p %d %p %d)
\n
"
,
This
,
debugstr_w
(
pwzBaseUrl
),
debugstr_w
(
pwzRelativeUrl
),
dwCombineFlags
,
pwzResult
,
cchResult
,
pcchResult
,
dwReserved
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MimeHtmlProtocolInfo_CompareUrl
(
IInternetProtocolInfo
*
iface
,
LPCWSTR
pwzUrl1
,
LPCWSTR
pwzUrl2
,
DWORD
dwCompareFlags
)
{
MimeHtmlProtocol
*
This
=
impl_from_IInternetProtocolInfo
(
iface
);
FIXME
(
"(%p)->(%s %s %08x)
\n
"
,
This
,
debugstr_w
(
pwzUrl1
),
debugstr_w
(
pwzUrl2
),
dwCompareFlags
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MimeHtmlProtocolInfo_QueryInfo
(
IInternetProtocolInfo
*
iface
,
LPCWSTR
pwzUrl
,
QUERYOPTION
QueryOption
,
DWORD
dwQueryFlags
,
LPVOID
pBuffer
,
DWORD
cbBuffer
,
DWORD
*
pcbBuf
,
DWORD
dwReserved
)
{
MimeHtmlProtocol
*
This
=
impl_from_IInternetProtocolInfo
(
iface
);
FIXME
(
"(%p)->(%s %08x %08x %p %d %p %d)
\n
"
,
This
,
debugstr_w
(
pwzUrl
),
QueryOption
,
dwQueryFlags
,
pBuffer
,
cbBuffer
,
pcbBuf
,
dwReserved
);
return
INET_E_USE_DEFAULT_PROTOCOLHANDLER
;
}
static
const
IInternetProtocolInfoVtbl
MimeHtmlProtocolInfoVtbl
=
{
MimeHtmlProtocolInfo_QueryInterface
,
MimeHtmlProtocolInfo_AddRef
,
MimeHtmlProtocolInfo_Release
,
MimeHtmlProtocolInfo_ParseUrl
,
MimeHtmlProtocolInfo_CombineUrl
,
MimeHtmlProtocolInfo_CompareUrl
,
MimeHtmlProtocolInfo_QueryInfo
};
HRESULT
MimeHtmlProtocol_create
(
IUnknown
*
outer
,
void
**
obj
)
{
MimeHtmlProtocol
*
protocol
;
...
...
@@ -185,6 +261,7 @@ HRESULT MimeHtmlProtocol_create(IUnknown *outer, void **obj)
return
E_OUTOFMEMORY
;
protocol
->
IInternetProtocol_iface
.
lpVtbl
=
&
MimeHtmlProtocolVtbl
;
protocol
->
IInternetProtocolInfo_iface
.
lpVtbl
=
&
MimeHtmlProtocolInfoVtbl
;
protocol
->
ref
=
1
;
*
obj
=
&
protocol
->
IInternetProtocol_iface
;
...
...
dlls/inetcomm/tests/mimeole.c
View file @
fe3e5b9c
...
...
@@ -760,6 +760,18 @@ static void test_MimeOleGetPropertySchema(void)
IMimePropertySchema_Release
(
schema
);
}
static
void
test_mhtml_protocol_info
(
void
)
{
IInternetProtocolInfo
*
protocol_info
;
HRESULT
hres
;
hres
=
CoCreateInstance
(
&
CLSID_IMimeHtmlProtocol
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IInternetProtocolInfo
,
(
void
**
)
&
protocol_info
);
ok
(
hres
==
S_OK
,
"Could not create protocol info: %08x
\n
"
,
hres
);
IInternetProtocolInfo_Release
(
protocol_info
);
}
static
void
test_mhtml_protocol
(
void
)
{
IUnknown
*
unk
,
*
unk2
;
...
...
@@ -777,6 +789,8 @@ static void test_mhtml_protocol(void)
ok
(
hres
==
E_NOINTERFACE
,
"IInternetProtocolInfo supported
\n
"
);
IUnknown_Release
(
unk
);
test_mhtml_protocol_info
();
}
START_TEST
(
mimeole
)
...
...
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