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
380fd731
Commit
380fd731
authored
Sep 06, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Sep 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Implemented IUriBuilder_{Get/Set}UserName.
parent
ef8200eb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
14 deletions
+54
-14
uri.c
dlls/urlmon/tests/uri.c
+33
-1
uri.c
dlls/urlmon/uri.c
+21
-13
No files found.
dlls/urlmon/tests/uri.c
View file @
380fd731
...
...
@@ -4433,7 +4433,7 @@ static const uri_builder_test uri_builder_tests[] = {
{
TRUE
,
"#fragment"
,
NULL
,
Uri_PROPERTY_FRAGMENT
,
S_OK
,
FALSE
},
{
TRUE
,
"password"
,
NULL
,
Uri_PROPERTY_PASSWORD
,
S_OK
,
FALSE
},
{
TRUE
,
"?query=x"
,
NULL
,
Uri_PROPERTY_QUERY
,
S_OK
,
FALSE
},
{
TRUE
,
"username"
,
NULL
,
Uri_PROPERTY_USER_NAME
,
S_OK
,
TRU
E
}
{
TRUE
,
"username"
,
NULL
,
Uri_PROPERTY_USER_NAME
,
S_OK
,
FALS
E
}
},
{
FALSE
},
0
,
S_OK
,
TRUE
,
...
...
@@ -4856,6 +4856,38 @@ static const uri_builder_test uri_builder_tests[] = {
{
URL_SCHEME_HTTP
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
},
{
"http://:password@google.com/"
,
0
,
S_OK
,
FALSE
,
{
{
FALSE
},
},
{
FALSE
},
0
,
S_OK
,
TRUE
,
0
,
S_OK
,
TRUE
,
0
,
0
,
0
,
S_OK
,
TRUE
,
{
{
"http://:password@google.com/"
,
S_OK
},
{
":password@google.com"
,
S_OK
},
{
"http://google.com/"
,
S_OK
},
{
"google.com"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
"google.com"
,
S_OK
},
{
"password"
,
S_OK
},
{
"/"
,
S_OK
},
{
"/"
,
S_OK
},
{
""
,
S_FALSE
},
{
"http://:password@google.com/"
,
S_OK
},
{
"http"
,
S_OK
},
{
":password"
,
S_OK
},
{
""
,
S_FALSE
}
},
{
{
Uri_HOST_DNS
,
S_OK
},
{
80
,
S_OK
},
{
URL_SCHEME_HTTP
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
}
};
...
...
dlls/urlmon/uri.c
View file @
380fd731
...
...
@@ -100,6 +100,9 @@ typedef struct {
WCHAR
*
scheme
;
DWORD
scheme_len
;
WCHAR
*
username
;
DWORD
username_len
;
}
UriBuilder
;
typedef
struct
{
...
...
@@ -4383,6 +4386,7 @@ static ULONG WINAPI UriBuilder_Release(IUriBuilder *iface)
heap_free
(
This
->
path
);
heap_free
(
This
->
query
);
heap_free
(
This
->
scheme
);
heap_free
(
This
->
username
);
heap_free
(
This
);
}
...
...
@@ -4602,19 +4606,22 @@ static HRESULT WINAPI UriBuilder_GetUserName(IUriBuilder *iface, DWORD *pcchUser
UriBuilder
*
This
=
URIBUILDER_THIS
(
iface
);
TRACE
(
"(%p)->(%p %p)
\n
"
,
This
,
pcchUserName
,
ppwzUserName
);
if
(
!
pcchUserName
)
{
if
(
ppwzUserName
)
*
ppwzUserName
=
NULL
;
return
E_POINTER
;
}
if
(
!
This
->
uri
||
This
->
uri
->
userinfo_start
==
-
1
||
This
->
uri
->
userinfo_start
==
This
->
uri
->
userinfo_split
||
This
->
modified_props
&
Uri_HAS_USER_NAME
)
return
get_builder_component
(
&
This
->
username
,
&
This
->
username_len
,
NULL
,
0
,
ppwzUserName
,
pcchUserName
);
else
{
const
WCHAR
*
start
=
This
->
uri
->
canon_uri
+
This
->
uri
->
userinfo_start
;
if
(
!
ppwzUserName
)
{
*
pcchUserName
=
0
;
return
E_POINTER
;
/* Check if there's a password in the userinfo section. */
if
(
This
->
uri
->
userinfo_split
>
-
1
)
/* Don't include the password. */
return
get_builder_component
(
&
This
->
username
,
&
This
->
username_len
,
start
,
This
->
uri
->
userinfo_split
,
ppwzUserName
,
pcchUserName
);
else
return
get_builder_component
(
&
This
->
username
,
&
This
->
username_len
,
start
,
This
->
uri
->
userinfo_len
,
ppwzUserName
,
pcchUserName
);
}
FIXME
(
"(%p)->(%p %p)
\n
"
,
This
,
pcchUserName
,
ppwzUserName
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
UriBuilder_SetFragment
(
IUriBuilder
*
iface
,
LPCWSTR
pwzNewValue
)
...
...
@@ -4679,8 +4686,9 @@ static HRESULT WINAPI UriBuilder_SetSchemeName(IUriBuilder *iface, LPCWSTR pwzNe
static
HRESULT
WINAPI
UriBuilder_SetUserName
(
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
));
return
set_builder_component
(
&
This
->
username
,
&
This
->
username_len
,
pwzNewValue
,
0
,
&
This
->
modified_props
,
Uri_HAS_USER_NAME
);
}
static
HRESULT
WINAPI
UriBuilder_RemoveProperties
(
IUriBuilder
*
iface
,
DWORD
dwPropertyMask
)
...
...
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