mshtml: Added GetMoniker and SetMoniker methods to nsIWineURI.

This commit is contained in:
Jacek Caban 2006-08-09 16:34:59 +02:00 committed by Alexandre Julliard
parent cba2e19409
commit f0ca85f78e
2 changed files with 39 additions and 0 deletions

View File

@ -69,6 +69,8 @@ interface nsILoadGroup;
interface nsIDOMNode; interface nsIDOMNode;
interface nsIDOMDocument; interface nsIDOMDocument;
interface IMoniker;
[ [
object, object,
uuid(00000000-0000-0000-c000-000000000046) uuid(00000000-0000-0000-c000-000000000046)
@ -1170,4 +1172,6 @@ interface nsIWineURI : nsIURI
nsresult GetNSContainer(NSContainer **aNSContainer); nsresult GetNSContainer(NSContainer **aNSContainer);
nsresult SetNSContainer(NSContainer *aNSContainer); nsresult SetNSContainer(NSContainer *aNSContainer);
nsresult GetMoniker(IMoniker **aMoniker);
nsresult SetMoniker(IMoniker *aMoniker);
} }

View File

@ -52,6 +52,7 @@ typedef struct {
nsIURI *uri; nsIURI *uri;
NSContainer *container; NSContainer *container;
IMoniker *mon;
} nsURI; } nsURI;
#define NSURI(x) ((nsIURI*) &(x)->lpWineURIVtbl) #define NSURI(x) ((nsIURI*) &(x)->lpWineURIVtbl)
@ -1436,6 +1437,37 @@ static nsresult NSAPI nsURI_SetNSContainer(nsIWineURI *iface, NSContainer *aCont
return NS_OK; return NS_OK;
} }
static nsresult NSAPI nsURI_GetMoniker(nsIWineURI *iface, IMoniker **aMoniker)
{
nsURI *This = NSURI_THIS(iface);
TRACE("(%p)->(%p)\n", This, aMoniker);
if(This->mon)
IMoniker_AddRef(This->mon);
*aMoniker = This->mon;
return NS_OK;
}
static nsresult NSAPI nsURI_SetMoniker(nsIWineURI *iface, IMoniker *aMoniker)
{
nsURI *This = NSURI_THIS(iface);
TRACE("(%p)->(%p)\n", This, aMoniker);
if(This->mon) {
WARN("Moniker already set: %p\n", This->container);
IMoniker_Release(This->mon);
}
if(aMoniker)
IMoniker_AddRef(aMoniker);
This->mon = aMoniker;
return NS_OK;
}
#undef NSURI_THIS #undef NSURI_THIS
static const nsIWineURIVtbl nsWineURIVtbl = { static const nsIWineURIVtbl nsWineURIVtbl = {
@ -1470,6 +1502,8 @@ static const nsIWineURIVtbl nsWineURIVtbl = {
nsURI_GetOriginCharset, nsURI_GetOriginCharset,
nsURI_GetNSContainer, nsURI_GetNSContainer,
nsURI_SetNSContainer, nsURI_SetNSContainer,
nsURI_GetMoniker,
nsURI_SetMoniker
}; };
static nsresult create_uri(nsIURI *uri, NSContainer *container, nsIURI **_retval) static nsresult create_uri(nsIURI *uri, NSContainer *container, nsIURI **_retval)
@ -1480,6 +1514,7 @@ static nsresult create_uri(nsIURI *uri, NSContainer *container, nsIURI **_retval
ret->ref = 1; ret->ref = 1;
ret->uri = uri; ret->uri = uri;
ret->container = container; ret->container = container;
ret->mon = NULL;
if(container) if(container)
nsIWebBrowserChrome_AddRef(NSWBCHROME(container)); nsIWebBrowserChrome_AddRef(NSWBCHROME(container));