mshtml: Added [Set|Get]WineURL functions to nsIWineURI.

This commit is contained in:
Jacek Caban 2007-02-09 20:18:20 +01:00 committed by Alexandre Julliard
parent 8beb142b94
commit 5ea16d7856
2 changed files with 34 additions and 1 deletions

View File

@ -1533,4 +1533,6 @@ interface nsIWineURI : nsIURI
nsresult SetMoniker(IMoniker *aMoniker);
nsresult GetIsDocumentURI(PRBool *aIsDocumentURI);
nsresult SetIsDocumentURI(PRBool aIsDocumentURI);
nsresult GetWineURL(LPCWSTR *aURL);
nsresult SetWineURL(LPCWSTR aURL);
}

View File

@ -1616,6 +1616,35 @@ static nsresult NSAPI nsURI_SetIsDocumentURI(nsIWineURI *iface, PRBool aIsDocume
return NS_OK;
}
static nsresult NSAPI nsURI_GetWineURL(nsIWineURI *iface, LPCWSTR *aURL)
{
nsURI *This = NSURI_THIS(iface);
TRACE("(%p)->(%p)\n", This, aURL);
*aURL = This->wine_url;
return NS_OK;
}
static nsresult NSAPI nsURI_SetWineURL(nsIWineURI *iface, LPCWSTR aURL)
{
nsURI *This = NSURI_THIS(iface);
TRACE("(%p)->(%s)\n", This, debugstr_w(aURL));
mshtml_free(This->wine_url);
if(aURL) {
int len = strlenW(aURL)+1;
This->wine_url = mshtml_alloc(len*sizeof(WCHAR));
memcpy(This->wine_url, aURL, len*sizeof(WCHAR));
}else {
This->wine_url = NULL;
}
return NS_OK;
}
#undef NSURI_THIS
static const nsIWineURIVtbl nsWineURIVtbl = {
@ -1653,7 +1682,9 @@ static const nsIWineURIVtbl nsWineURIVtbl = {
nsURI_GetMoniker,
nsURI_SetMoniker,
nsURI_GetIsDocumentURI,
nsURI_SetIsDocumentURI
nsURI_SetIsDocumentURI,
nsURI_GetWineURL,
nsURI_SetWineURL
};
static nsresult create_uri(nsIURI *uri, NSContainer *container, nsIURI **_retval)