int SetObserver (long /*int*/ aObserver) { if (aObserver != 0) { nsISupports supports = new nsISupports (aObserver); long /*int*/[] result = new long /*int*/[1]; int rc = supports.QueryInterface (nsIHelperAppLauncher.NS_IHELPERAPPLAUNCHER_IID, result); if (rc != XPCOM.NS_OK) Mozilla.error (rc); if (result[0] == 0) Mozilla.error (XPCOM.NS_ERROR_NO_INTERFACE); helperAppLauncher = new nsIHelperAppLauncher (result[0]); } return XPCOM.NS_OK; }
int GetNext (long /*int*/ _retval) { if (values == null || index == values.length) return XPCOM.NS_ERROR_UNEXPECTED; nsISupports value = values[index++]; value.AddRef (); XPCOM.memmove (_retval, new long /*int*/[] {value.getAddress ()}, C.PTR_SIZEOF); return XPCOM.NS_OK; } }
void disposeCOMInterfaces () { if (supports != null) { supports.dispose (); supports = null; } if (simpleEnumerator != null) { simpleEnumerator.dispose (); simpleEnumerator = null; } if (values != null) { for (int i = 0; i < values.length; i++) { values[i].Release (); } values = null; } }
nsISupports support = new nsISupports (arg0); long /*int*/[] result = new long /*int*/[1]; int rc = support.QueryInterface (nsIHelperAppLauncher_1_8.NS_IHELPERAPPLAUNCHER_IID, result); if (rc == XPCOM.NS_OK) { using_1_8 = true; hasLauncher = true; new nsISupports (result[0]).Release (); } else { result[0] = 0; rc = support.QueryInterface (nsIHelperAppLauncher.NS_IHELPERAPPLAUNCHER_IID, result); if (rc == XPCOM.NS_OK) { hasLauncher = true; new nsISupports (result[0]).Release ();
new nsISupports (visitor.getAddress ()).AddRef (); rc = request.QueryInterface (nsIHttpChannel.NS_IHTTPCHANNEL_IID, result); if (rc == XPCOM.NS_OK && result[0] != 0) { httpChannel.Release (); new nsISupports (visitor.getAddress ()).Release ();
new nsISupports (badCertRequest).Release (); new nsISupports (ptrObject.value).Release ();
public int Release() { return XPCOM.VtblCall(FIRST_METHOD_ID + 2, getAddress()); } }
SimpleEnumerator (nsISupports[] values) { this.values = values; for (int i = 0; i < values.length; i++) { values[i].AddRef (); } createCOMInterfaces (); }
rc = serviceManager.GetServiceByContractID (toByteArray (XPCOM.NS_INTERFACEINFOMANAGER_CONTRACTID), IIDStore.GetIID (nsIInterfaceInfoManager.class), result); serviceManager.Release (); if (rc != XPCOM.NS_OK) { rc = iim.GetInfoForName (toByteArray (getClassName()), result); iim.Release (); if (rc != XPCOM.NS_OK) { int[] index = new int [1]; int /*long*/[] dummy = new int /*long*/[1]; rc = info.GetMethodInfoForName (toByteArray (methodString), index, dummy); info.Release (); if (rc != XPCOM.NS_OK) {
protected int getSetterIndex (String attribute) { return getMethodIndex (attribute) + 1; }
public int GetAsBool(int[] _retval) { /* mozilla's representation of boolean changed from 4 bytes to 1 byte as of XULRunner 4.x */ if (nsISupports.IsXULRVersionOrLater(MozillaVersion.VERSION_XR10)) { byte[] byteValue = new byte[1]; int rc = XPCOM.VtblCall(this.getMethodIndex("getAsBool"), getAddress(), byteValue); _retval[0] = (int)byteValue[0]; return rc; } return XPCOM.VtblCall(this.getMethodIndex("getAsBool"), getAddress(), _retval); }
nsISupports support = new nsISupports (arg0); int /*long*/[] result = new int /*long*/[1]; int rc = support.QueryInterface (IIDStore.GetIID (nsIHelperAppLauncher_1_8.class), result); if (rc == XPCOM.NS_OK) { using_1_8 = true; hasLauncher = true; new nsISupports (result[0]).Release (); } else { result[0] = 0; rc = support.QueryInterface (IIDStore.GetIID (nsIHelperAppLauncher.class, MozillaVersion.VERSION_BASE), result); if (rc == XPCOM.NS_OK) { hasLauncher = true; new nsISupports (result[0]).Release ();
new nsISupports (visitor.getAddress ()).AddRef (); rc = request.QueryInterface (IIDStore.GetIID (nsIHttpChannel.class), result); if (rc == XPCOM.NS_OK && result[0] != 0) { new nsISupports (visitor.getAddress ()).Release ();
event.doit = result[0] == 0; if (rc == XPCOM.NS_OK && result[0] != 0) { new nsISupports (result[0]).Release ();
public int Release() { return XPCOM.VtblCall(FIRST_METHOD_ID + 2, getAddress()); } }
SimpleEnumerator (nsISupports[] values) { this.values = values; for (int i = 0; i < values.length; i++) { values[i].AddRef (); } createCOMInterfaces (); }
rc = serviceManager.GetServiceByContractID (toByteArray (XPCOM.NS_INTERFACEINFOMANAGER_CONTRACTID), IIDStore.GetIID (nsIInterfaceInfoManager.class), result); serviceManager.Release (); if (rc != XPCOM.NS_OK) { rc = iim.GetInfoForName (toByteArray (getClassName()), result); iim.Release (); if (rc != XPCOM.NS_OK) { int[] index = new int [1]; int /*long*/[] dummy = new int /*long*/[1]; rc = info.GetMethodInfoForName (toByteArray (methodString), index, dummy); info.Release (); if (rc != XPCOM.NS_OK) {
protected int getSetterIndex (String attribute) { return getMethodIndex (attribute) + 1; }
public int GetAsBool(int[] _retval) { /* mozilla's representation of boolean changed from 4 bytes to 1 byte as of XULRunner 4.x */ if (nsISupports.IsXULRVersionOrLater(MozillaVersion.VERSION_XR10)) { byte[] byteValue = new byte[1]; int rc = XPCOM.VtblCall(this.getMethodIndex("getAsBool"), getAddress(), byteValue); _retval[0] = (int)byteValue[0]; return rc; } return XPCOM.VtblCall(this.getMethodIndex("getAsBool"), getAddress(), _retval); }
nsISupports support = new nsISupports (arg0); long /*int*/[] result = new long /*int*/[1]; int rc = support.QueryInterface (IIDStore.GetIID (nsIHelperAppLauncher_1_8.class), result); if (rc == XPCOM.NS_OK) { using_1_8 = true; hasLauncher = true; new nsISupports (result[0]).Release (); } else { result[0] = 0; rc = support.QueryInterface (IIDStore.GetIID (nsIHelperAppLauncher.class, MozillaVersion.VERSION_BASE), result); if (rc == XPCOM.NS_OK) { hasLauncher = true; new nsISupports (result[0]).Release ();