void disposeCOMInterfaces() { if (supports != null) { supports.dispose(); supports = null; } if (promptAuth != null) { promptAuth.dispose(); promptAuth = null; } }
void disposeCOMInterfaces() { if (supports != null) { supports.dispose(); supports = null; } if (factory != null) { factory.dispose(); factory = null; } }
int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) { if (riid == 0 || ppvObject == 0) return XPCOM.NS_ERROR_NO_INTERFACE; nsID guid = new nsID(); XPCOM.memmove(guid, riid, nsID.sizeof); if (guid.Equals(nsISupports.NS_ISUPPORTS_IID)) { XPCOM.memmove(ppvObject, new long /*int*/[] {supports.getAddress()}, C.PTR_SIZEOF); AddRef(); return XPCOM.NS_OK; } if (guid.Equals(XPCOM.NS_IAUTHPROMPT2_IID)) { XPCOM.memmove(ppvObject, new long /*int*/[] {promptAuth.getAddress()}, C.PTR_SIZEOF); AddRef(); return XPCOM.NS_OK; } XPCOM.memmove(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); return XPCOM.NS_ERROR_NO_INTERFACE; }
int QueryInterface(int /*long*/ riid, int /*long*/ ppvObject) { if (riid == 0 || ppvObject == 0) return XPCOM.NS_ERROR_NO_INTERFACE; nsID guid = new nsID(); XPCOM.memmove(guid, riid, nsID.sizeof); if (guid.Equals(nsISupports.NS_ISUPPORTS_IID)) { XPCOM.memmove(ppvObject, new int /*long*/[] {supports.getAddress()}, C.PTR_SIZEOF); AddRef(); return XPCOM.NS_OK; } if (guid.Equals(nsIFactory.NS_IFACTORY_IID)) { XPCOM.memmove(ppvObject, new int /*long*/[] {factory.getAddress()}, C.PTR_SIZEOF); AddRef(); return XPCOM.NS_OK; } XPCOM.memmove(ppvObject, new int /*long*/[] {0}, C.PTR_SIZEOF); return XPCOM.NS_ERROR_NO_INTERFACE; }
long /*int*/ getAddress() { return promptAuth.getAddress(); }
int /*long*/ getAddress() { return factory.getAddress(); }