Esempio n. 1
0
 void disposeCOMInterfaces() {
   if (supports != null) {
     supports.dispose();
     supports = null;
   }
   if (promptAuth != null) {
     promptAuth.dispose();
     promptAuth = null;
   }
 }
Esempio n. 2
0
 void disposeCOMInterfaces() {
   if (supports != null) {
     supports.dispose();
     supports = null;
   }
   if (factory != null) {
     factory.dispose();
     factory = null;
   }
 }
Esempio n. 3
0
  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;
  }
Esempio n. 4
0
  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;
  }
Esempio n. 5
0
 long /*int*/ getAddress() {
   return promptAuth.getAddress();
 }
Esempio n. 6
0
 int /*long*/ getAddress() {
   return factory.getAddress();
 }