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
0289530f
Commit
0289530f
authored
Jul 19, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement nsIURI::SetUserPass on top of IUri.
parent
d15b567c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
8 deletions
+54
-8
nsio.c
dlls/mshtml/nsio.c
+54
-8
No files found.
dlls/mshtml/nsio.c
View file @
0289530f
...
...
@@ -1747,28 +1747,74 @@ static nsresult NSAPI nsURI_SetScheme(nsIURL *iface, const nsACString *aScheme)
static
nsresult
NSAPI
nsURI_GetUserPass
(
nsIURL
*
iface
,
nsACString
*
aUserPass
)
{
nsWineURI
*
This
=
impl_from_nsIURL
(
iface
);
BSTR
user
,
pass
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
aUserPass
);
if
(
This
->
nsuri
)
return
nsIURI_GetUserPass
(
This
->
nsuri
,
aUserPass
);
if
(
!
ensure_uri
(
This
))
return
NS_ERROR_UNEXPECTED
;
hres
=
IUri_GetUserName
(
This
->
uri
,
&
user
);
if
(
FAILED
(
hres
))
return
NS_ERROR_FAILURE
;
hres
=
IUri_GetPassword
(
This
->
uri
,
&
pass
);
if
(
FAILED
(
hres
))
{
SysFreeString
(
user
);
return
NS_ERROR_FAILURE
;
}
if
(
*
user
||
*
pass
)
{
FIXME
(
"Construct user:pass string
\n
"
);
}
else
{
nsACString_SetData
(
aUserPass
,
""
);
}
return
get_uri_string
(
This
,
Uri_PROPERTY_USER_INFO
,
aUserPass
);
SysFreeString
(
user
);
SysFreeString
(
pass
);
return
NS_OK
;
}
static
nsresult
NSAPI
nsURI_SetUserPass
(
nsIURL
*
iface
,
const
nsACString
*
aUserPass
)
{
nsWineURI
*
This
=
impl_from_nsIURL
(
iface
);
WCHAR
*
user
=
NULL
,
*
pass
=
NULL
,
*
buf
=
NULL
;
const
char
*
user_pass
;
HRESULT
hres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_nsacstr
(
aUserPass
));
if
(
This
->
nsuri
)
{
invalidate_uri
(
This
);
return
nsIURI_SetUserPass
(
This
->
nsuri
,
aUserPass
);
if
(
!
ensure_uri_builder
(
This
))
return
NS_ERROR_UNEXPECTED
;
nsACString_GetData
(
aUserPass
,
&
user_pass
);
if
(
*
user_pass
)
{
WCHAR
*
ptr
;
buf
=
heap_strdupAtoW
(
user_pass
);
if
(
!
buf
)
return
NS_ERROR_OUT_OF_MEMORY
;
ptr
=
strchrW
(
buf
,
':'
);
if
(
!
ptr
)
{
user
=
buf
;
}
else
if
(
ptr
!=
buf
)
{
*
ptr
++
=
0
;
user
=
buf
;
if
(
*
ptr
)
pass
=
ptr
;
}
else
{
pass
=
buf
+
1
;
}
}
FIXME
(
"default action not implemented
\n
"
);
return
NS_ERROR_NOT_IMPLEMENTED
;
hres
=
IUriBuilder_SetUserName
(
This
->
uri_builder
,
user
);
if
(
SUCCEEDED
(
hres
))
hres
=
IUriBuilder_SetPassword
(
This
->
uri_builder
,
pass
);
heap_free
(
buf
);
return
SUCCEEDED
(
hres
)
?
NS_OK
:
NS_ERROR_FAILURE
;
}
static
nsresult
NSAPI
nsURI_GetUsername
(
nsIURL
*
iface
,
nsACString
*
aUsername
)
...
...
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