Commit 779ad051 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Make nsIURI::[Get|Set]Username implementation IUri-based.

parent 9cb4c21f
...@@ -1770,26 +1770,33 @@ static nsresult NSAPI nsURI_GetUsername(nsIURL *iface, nsACString *aUsername) ...@@ -1770,26 +1770,33 @@ static nsresult NSAPI nsURI_GetUsername(nsIURL *iface, nsACString *aUsername)
TRACE("(%p)->(%p)\n", This, aUsername); TRACE("(%p)->(%p)\n", This, aUsername);
if(This->nsuri) return get_uri_string(This, Uri_PROPERTY_USER_NAME, aUsername);
return nsIURI_GetUsername(This->nsuri, aUsername);
FIXME("default action not implemented\n");
return NS_ERROR_NOT_IMPLEMENTED;
} }
static nsresult NSAPI nsURI_SetUsername(nsIURL *iface, const nsACString *aUsername) static nsresult NSAPI nsURI_SetUsername(nsIURL *iface, const nsACString *aUsername)
{ {
nsWineURI *This = impl_from_nsIURL(iface); nsWineURI *This = impl_from_nsIURL(iface);
const char *usera;
WCHAR *user;
HRESULT hres;
TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aUsername)); TRACE("(%p)->(%s)\n", This, debugstr_nsacstr(aUsername));
if(This->nsuri) { if(!ensure_uri_builder(This))
invalidate_uri(This); return NS_ERROR_UNEXPECTED;
return nsIURI_SetUsername(This->nsuri, aUsername);
}
FIXME("default action not implemented\n"); nsACString_GetData(aUsername, &usera);
return NS_ERROR_NOT_IMPLEMENTED; user = heap_strdupAtoW(usera);
if(!user)
return NS_ERROR_OUT_OF_MEMORY;
hres = IUriBuilder_SetUserName(This->uri_builder, user);
heap_free(user);
if(FAILED(hres))
return NS_ERROR_UNEXPECTED;
sync_wine_url(This);
return NS_OK;
} }
static nsresult NSAPI nsURI_GetPassword(nsIURL *iface, nsACString *aPassword) static nsresult NSAPI nsURI_GetPassword(nsIURL *iface, nsACString *aPassword)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment