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
3fa595e2
Commit
3fa595e2
authored
Mar 29, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added IWinInetHttpInfo stub implementation to HttpProtocol object.
parent
36dbb69b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
2 deletions
+71
-2
http.c
dlls/urlmon/http.c
+57
-2
protocol.c
dlls/urlmon/tests/protocol.c
+14
-0
No files found.
dlls/urlmon/http.c
View file @
3fa595e2
...
...
@@ -34,6 +34,7 @@ typedef struct {
const
IInternetProtocolVtbl
*
lpInternetProtocolVtbl
;
const
IInternetPriorityVtbl
*
lpInternetPriorityVtbl
;
const
IWinInetHttpInfoVtbl
*
lpWinInetHttpInfoVtbl
;
BOOL
https
;
IHttpNegotiate
*
http_negotiate
;
...
...
@@ -42,8 +43,9 @@ typedef struct {
LONG
ref
;
}
HttpProtocol
;
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl)
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl)
#define INETHTTPINFO(x) ((IWinInetHttpInfo*) &(x)->lpWinInetHttpInfoVtbl)
/* Default headers from native */
static
const
WCHAR
wszHeaders
[]
=
{
'A'
,
'c'
,
'c'
,
'e'
,
'p'
,
't'
,
'-'
,
'E'
,
'n'
,
'c'
,
'o'
,
'd'
,
'i'
,
'n'
,
'g'
,
...
...
@@ -326,6 +328,12 @@ static HRESULT WINAPI HttpProtocol_QueryInterface(IInternetProtocol *iface, REFI
}
else
if
(
IsEqualGUID
(
&
IID_IInternetPriority
,
riid
))
{
TRACE
(
"(%p)->(IID_IInternetPriority %p)
\n
"
,
This
,
ppv
);
*
ppv
=
PRIORITY
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IWinInetInfo
,
riid
))
{
TRACE
(
"(%p)->(IID_IWinInetInfo %p)
\n
"
,
This
,
ppv
);
*
ppv
=
INETHTTPINFO
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IWinInetHttpInfo
,
riid
))
{
TRACE
(
"(%p)->(IID_IWinInetHttpInfo %p)
\n
"
,
This
,
ppv
);
*
ppv
=
INETHTTPINFO
(
This
);
}
if
(
*
ppv
)
{
...
...
@@ -527,6 +535,52 @@ static const IInternetPriorityVtbl HttpPriorityVtbl = {
HttpPriority_GetPriority
};
#define INETINFO_THIS(iface) DEFINE_THIS(HttpProtocol, WinInetHttpInfo, iface)
static
HRESULT
WINAPI
HttpInfo_QueryInterface
(
IWinInetHttpInfo
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
HttpProtocol
*
This
=
INETINFO_THIS
(
iface
);
return
IBinding_QueryInterface
(
PROTOCOL
(
This
),
riid
,
ppv
);
}
static
ULONG
WINAPI
HttpInfo_AddRef
(
IWinInetHttpInfo
*
iface
)
{
HttpProtocol
*
This
=
INETINFO_THIS
(
iface
);
return
IBinding_AddRef
(
PROTOCOL
(
This
));
}
static
ULONG
WINAPI
HttpInfo_Release
(
IWinInetHttpInfo
*
iface
)
{
HttpProtocol
*
This
=
INETINFO_THIS
(
iface
);
return
IBinding_Release
(
PROTOCOL
(
This
));
}
static
HRESULT
WINAPI
HttpInfo_QueryOption
(
IWinInetHttpInfo
*
iface
,
DWORD
dwOption
,
void
*
pBuffer
,
DWORD
*
pcbBuffer
)
{
HttpProtocol
*
This
=
INETINFO_THIS
(
iface
);
FIXME
(
"(%p)->(%x %p %p)
\n
"
,
This
,
dwOption
,
pBuffer
,
pcbBuffer
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HttpInfo_QueryInfo
(
IWinInetHttpInfo
*
iface
,
DWORD
dwOption
,
void
*
pBuffer
,
DWORD
*
pcbBuffer
,
DWORD
*
pdwFlags
,
DWORD
*
pdwReserved
)
{
HttpProtocol
*
This
=
INETINFO_THIS
(
iface
);
FIXME
(
"(%p)->(%x %p %p %p %p)
\n
"
,
This
,
dwOption
,
pBuffer
,
pcbBuffer
,
pdwFlags
,
pdwReserved
);
return
E_NOTIMPL
;
}
#undef INETINFO_THIS
static
const
IWinInetHttpInfoVtbl
WinInetHttpInfoVtbl
=
{
HttpInfo_QueryInterface
,
HttpInfo_AddRef
,
HttpInfo_Release
,
HttpInfo_QueryOption
,
HttpInfo_QueryInfo
};
static
HRESULT
create_http_protocol
(
BOOL
https
,
void
**
ppobj
)
{
HttpProtocol
*
ret
;
...
...
@@ -538,6 +592,7 @@ static HRESULT create_http_protocol(BOOL https, void **ppobj)
ret
->
base
.
vtbl
=
&
AsyncProtocolVtbl
;
ret
->
lpInternetProtocolVtbl
=
&
HttpProtocolVtbl
;
ret
->
lpInternetPriorityVtbl
=
&
HttpPriorityVtbl
;
ret
->
lpWinInetHttpInfoVtbl
=
&
WinInetHttpInfoVtbl
;
ret
->
https
=
https
;
ret
->
ref
=
1
;
...
...
dlls/urlmon/tests/protocol.c
View file @
3fa595e2
...
...
@@ -1610,6 +1610,19 @@ static void test_protocol_terminate(IInternetProtocol *protocol)
ok
(
hres
==
S_OK
,
"UnlockRequest failed: %08x
\n
"
,
hres
);
}
static
void
test_http_info
(
IInternetProtocol
*
protocol
)
{
IWinInetHttpInfo
*
info
;
HRESULT
hres
;
hres
=
IInternetProtocol_QueryInterface
(
protocol
,
&
IID_IWinInetHttpInfo
,
(
void
**
)
&
info
);
ok
(
hres
==
S_OK
,
"Could not get IWinInterHttpInfo iface: %08x
\n
"
,
hres
);
/* TODO */
IWinInetHttpInfo_Release
(
info
);
}
/* is_first refers to whether this is the first call to this function
* _for this url_ */
static
void
test_http_protocol_url
(
LPCWSTR
url
,
BOOL
is_https
,
BOOL
is_first
)
...
...
@@ -1648,6 +1661,7 @@ static void test_http_protocol_url(LPCWSTR url, BOOL is_https, BOOL is_first)
ULONG
ref
;
test_priority
(
async_protocol
);
test_http_info
(
async_protocol
);
SET_EXPECT
(
ReportProgress_FINDINGRESOURCE
);
SET_EXPECT
(
ReportProgress_CONNECTING
);
...
...
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