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
1e5040ec
Commit
1e5040ec
authored
Sep 04, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Sep 06, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Implemented IUriBuilder_{Get/Set}Host.
parent
6aa90a2d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
19 deletions
+21
-19
uri.c
dlls/urlmon/tests/uri.c
+3
-5
uri.c
dlls/urlmon/uri.c
+18
-14
No files found.
dlls/urlmon/tests/uri.c
View file @
1e5040ec
...
...
@@ -4288,7 +4288,7 @@ static const uri_builder_test uri_builder_tests[] = {
{
"/Test/test dir"
,
Uri_CREATE_ALLOW_RELATIVE
,
S_OK
,
FALSE
,
{
{
TRUE
,
"http"
,
NULL
,
Uri_PROPERTY_SCHEME_NAME
,
S_OK
,
TRUE
},
{
TRUE
,
"::192.2.3.4"
,
NULL
,
Uri_PROPERTY_HOST
,
S_OK
,
TRU
E
},
{
TRUE
,
"::192.2.3.4"
,
NULL
,
Uri_PROPERTY_HOST
,
S_OK
,
FALS
E
},
{
TRUE
,
NULL
,
NULL
,
Uri_PROPERTY_PATH
,
S_OK
,
TRUE
}
},
{
FALSE
},
...
...
@@ -6920,10 +6920,8 @@ static void test_IUriBuilder_HasBeenModified(void) {
hr
,
E_POINTER
);
hr
=
IUriBuilder_SetHost
(
builder
,
hostW
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Error: IUriBuilder_SetHost returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
S_OK
);
}
ok
(
hr
==
S_OK
,
"Error: IUriBuilder_SetHost returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
S_OK
);
hr
=
IUriBuilder_HasBeenModified
(
builder
,
&
received
);
todo_wine
{
...
...
dlls/urlmon/uri.c
View file @
1e5040ec
...
...
@@ -82,6 +82,9 @@ typedef struct {
WCHAR
*
fragment
;
DWORD
fragment_len
;
WCHAR
*
host
;
DWORD
host_len
;
}
UriBuilder
;
typedef
struct
{
...
...
@@ -4310,6 +4313,7 @@ static ULONG WINAPI UriBuilder_Release(IUriBuilder *iface)
if
(
!
ref
)
{
if
(
This
->
uri
)
IUri_Release
(
URI
(
This
->
uri
));
heap_free
(
This
->
fragment
);
heap_free
(
This
->
host
);
heap_free
(
This
);
}
...
...
@@ -4440,19 +4444,17 @@ static HRESULT WINAPI UriBuilder_GetHost(IUriBuilder *iface, DWORD *pcchHost, LP
UriBuilder
*
This
=
URIBUILDER_THIS
(
iface
);
TRACE
(
"(%p)->(%p %p)
\n
"
,
This
,
pcchHost
,
ppwzHost
);
if
(
!
pcchHost
)
{
if
(
ppwzHost
)
*
ppwzHost
=
NULL
;
return
E_POINTER
;
}
if
(
!
ppwzHost
)
{
*
pcchHost
=
0
;
return
E_POINTER
;
if
(
!
This
->
uri
||
This
->
uri
->
host_start
==
-
1
||
This
->
modified_props
&
Uri_HAS_HOST
)
return
get_builder_component
(
&
This
->
host
,
&
This
->
host_len
,
NULL
,
0
,
ppwzHost
,
pcchHost
);
else
{
if
(
This
->
uri
->
host_type
==
Uri_HOST_IPV6
)
/* Don't include the '[' and ']' around the address. */
return
get_builder_component
(
&
This
->
host
,
&
This
->
host_len
,
This
->
uri
->
canon_uri
+
This
->
uri
->
host_start
+
1
,
This
->
uri
->
host_len
-
2
,
ppwzHost
,
pcchHost
);
else
return
get_builder_component
(
&
This
->
host
,
&
This
->
host_len
,
This
->
uri
->
canon_uri
+
This
->
uri
->
host_start
,
This
->
uri
->
host_len
,
ppwzHost
,
pcchHost
);
}
FIXME
(
"(%p)->(%p %p)
\n
"
,
This
,
pcchHost
,
ppwzHost
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
UriBuilder_GetPassword
(
IUriBuilder
*
iface
,
DWORD
*
pcchPassword
,
LPCWSTR
*
ppwzPassword
)
...
...
@@ -4587,8 +4589,10 @@ static HRESULT WINAPI UriBuilder_SetFragment(IUriBuilder *iface, LPCWSTR pwzNewV
static
HRESULT
WINAPI
UriBuilder_SetHost
(
IUriBuilder
*
iface
,
LPCWSTR
pwzNewValue
)
{
UriBuilder
*
This
=
URIBUILDER_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
pwzNewValue
));
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
pwzNewValue
));
This
->
modified_props
|=
Uri_HAS_HOST
;
return
set_builder_component
(
&
This
->
host
,
&
This
->
host_len
,
pwzNewValue
,
0
);
}
static
HRESULT
WINAPI
UriBuilder_SetPassword
(
IUriBuilder
*
iface
,
LPCWSTR
pwzNewValue
)
...
...
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