Commit 5ea16d78 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

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

parent 8beb142b
...@@ -1533,4 +1533,6 @@ interface nsIWineURI : nsIURI ...@@ -1533,4 +1533,6 @@ interface nsIWineURI : nsIURI
nsresult SetMoniker(IMoniker *aMoniker); nsresult SetMoniker(IMoniker *aMoniker);
nsresult GetIsDocumentURI(PRBool *aIsDocumentURI); nsresult GetIsDocumentURI(PRBool *aIsDocumentURI);
nsresult SetIsDocumentURI(PRBool aIsDocumentURI); nsresult SetIsDocumentURI(PRBool aIsDocumentURI);
nsresult GetWineURL(LPCWSTR *aURL);
nsresult SetWineURL(LPCWSTR aURL);
} }
...@@ -1616,6 +1616,35 @@ static nsresult NSAPI nsURI_SetIsDocumentURI(nsIWineURI *iface, PRBool aIsDocume ...@@ -1616,6 +1616,35 @@ static nsresult NSAPI nsURI_SetIsDocumentURI(nsIWineURI *iface, PRBool aIsDocume
return NS_OK; 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 #undef NSURI_THIS
static const nsIWineURIVtbl nsWineURIVtbl = { static const nsIWineURIVtbl nsWineURIVtbl = {
...@@ -1653,7 +1682,9 @@ static const nsIWineURIVtbl nsWineURIVtbl = { ...@@ -1653,7 +1682,9 @@ static const nsIWineURIVtbl nsWineURIVtbl = {
nsURI_GetMoniker, nsURI_GetMoniker,
nsURI_SetMoniker, nsURI_SetMoniker,
nsURI_GetIsDocumentURI, nsURI_GetIsDocumentURI,
nsURI_SetIsDocumentURI nsURI_SetIsDocumentURI,
nsURI_GetWineURL,
nsURI_SetWineURL
}; };
static nsresult create_uri(nsIURI *uri, NSContainer *container, nsIURI **_retval) static nsresult create_uri(nsIURI *uri, NSContainer *container, nsIURI **_retval)
......
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