protected static boolean IsXULRunner10 () { return MozillaVersion.CheckVersion (MozillaVersion.VERSION_XR10, true); }
public static nsID GetIID (Class<?> clazz, int version, boolean exact) { if (version <= MozillaVersion.GetLatestVersion ()) { nsID[] table = IIDs.get (clazz); if (table == null) { return table[version]; int defaultIIDIndex = MozillaVersion.GetLatestVersion () + 1; if (version == MozillaVersion.GetCurrentVersion () && table[defaultIIDIndex] != null) { return table[defaultIIDIndex]; /* the cached value */ if (version == MozillaVersion.GetCurrentVersion ()) {
rc = localFile.QueryInterface (IIDStore.GetIID (nsIFile.class, MozillaVersion.VERSION_XR31, true), result); if (rc == XPCOM.NS_OK) { /* 31.x */ MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR31); } else { rc = localFile.QueryInterface (IIDStore.GetIID (nsIFile.class, MozillaVersion.VERSION_XR24, true), result); if (rc == XPCOM.NS_OK) { /* 24.x */ MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR24); } else { /* 10.x */ rc = localFile.QueryInterface (IIDStore.GetIID (nsILocalFile.class, MozillaVersion.VERSION_XR10), result); error (rc); MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR10); MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR1_9_2); if (MozillaVersion.CheckVersion (MozillaVersion.VERSION_XR10)) { rc = XPCOM.Call (functionPtr, localFile.getAddress (), localFile.getAddress (), LocationProvider.getAddress ()); } else { MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR1_9_2); rc = XPCOM.NS_InitXPCOM2 (0, localFile.getAddress(), LocationProvider.getAddress ());
protected static void RegisterIID (Class<?> clazz, int version, nsID iid) { if (version <= MozillaVersion.GetLatestVersion ()) { nsID[] table = IIDs.get (clazz); if (table == null) { /* * Note that the table's final slot is used to cache the iid for * the current version since this is the most frequently used one. */ table = new nsID[MozillaVersion.GetLatestVersion () + 2]; IIDs.put (clazz, table); } table[version] = iid; } } }
public static nsID GetIID (Class<?> clazz) { return GetIID (clazz, MozillaVersion.GetCurrentVersion ()); }
rc = localFile.QueryInterface (IIDStore.GetIID (nsIFile.class, MozillaVersion.VERSION_XR31, true), result); if (rc == XPCOM.NS_OK) { /* 31.x */ MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR31); } else { rc = localFile.QueryInterface (IIDStore.GetIID (nsIFile.class, MozillaVersion.VERSION_XR24, true), result); if (rc == XPCOM.NS_OK) { /* 24.x */ MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR24); } else { /* 10.x */ rc = localFile.QueryInterface (IIDStore.GetIID (nsILocalFile.class, MozillaVersion.VERSION_XR10), result); error (rc); MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR10); MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR1_9_2); if (MozillaVersion.CheckVersion (MozillaVersion.VERSION_XR10)) { rc = XPCOM.Call (functionPtr, localFile.getAddress (), localFile.getAddress (), LocationProvider.getAddress ()); } else { MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR1_9_2); rc = XPCOM.NS_InitXPCOM2 (0, localFile.getAddress(), LocationProvider.getAddress ());
protected static void RegisterIID (Class<?> clazz, int version, nsID iid) { if (version <= MozillaVersion.GetLatestVersion ()) { nsID[] table = IIDs.get (clazz); if (table == null) { /* * Note that the table's final slot is used to cache the iid for * the current version since this is the most frequently used one. */ table = new nsID[MozillaVersion.GetLatestVersion () + 2]; IIDs.put (clazz, table); } table[version] = iid; } } }
public static nsID GetIID (Class<?> clazz) { return GetIID (clazz, MozillaVersion.GetCurrentVersion ()); }
protected static boolean IsXULRunner10 () { return MozillaVersion.CheckVersion (MozillaVersion.VERSION_XR10, true); }
rc = localFile.QueryInterface (IIDStore.GetIID (nsIFile.class, MozillaVersion.VERSION_XR31, true), result); if (rc == XPCOM.NS_OK) { /* 31.x */ MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR31); } else { rc = localFile.QueryInterface (IIDStore.GetIID (nsIFile.class, MozillaVersion.VERSION_XR24, true), result); if (rc == XPCOM.NS_OK) { /* 24.x */ MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR24); } else { /* 10.x */ rc = localFile.QueryInterface (IIDStore.GetIID (nsILocalFile.class, MozillaVersion.VERSION_XR10), result); error (rc); MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR10); MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR1_9_2); if (MozillaVersion.CheckVersion (MozillaVersion.VERSION_XR10)) { rc = XPCOM.Call (functionPtr, localFile.getAddress (), localFile.getAddress (), LocationProvider.getAddress ()); } else { MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR1_9_2); rc = XPCOM.NS_InitXPCOM2 (0, localFile.getAddress(), LocationProvider.getAddress ());
public static nsID GetIID (Class<?> clazz, int version, boolean exact) { if (version <= MozillaVersion.GetLatestVersion ()) { nsID[] table = IIDs.get (clazz); if (table == null) { return table[version]; int defaultIIDIndex = MozillaVersion.GetLatestVersion () + 1; if (version == MozillaVersion.GetCurrentVersion () && table[defaultIIDIndex] != null) { return table[defaultIIDIndex]; /* the cached value */ if (version == MozillaVersion.GetCurrentVersion ()) {
protected static void RegisterIID (Class<?> clazz, int version, nsID iid) { if (version <= MozillaVersion.GetLatestVersion ()) { nsID[] table = IIDs.get (clazz); if (table == null) { /* * Note that the table's final slot is used to cache the iid for * the current version since this is the most frequently used one. */ table = new nsID[MozillaVersion.GetLatestVersion () + 2]; IIDs.put (clazz, table); } table[version] = iid; } } }
public static nsID GetIID (Class<?> clazz) { return GetIID (clazz, MozillaVersion.GetCurrentVersion ()); }
public static boolean CheckVersion (int version) { return CheckVersion (version, false); }
rc = localFile.QueryInterface (IIDStore.GetIID (nsIFile.class, MozillaVersion.VERSION_XR31, true), result); if (rc == XPCOM.NS_OK) { /* 31.x */ MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR31); } else { rc = localFile.QueryInterface (IIDStore.GetIID (nsIFile.class, MozillaVersion.VERSION_XR24, true), result); if (rc == XPCOM.NS_OK) { /* 24.x */ MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR24); } else { /* 10.x */ rc = localFile.QueryInterface (IIDStore.GetIID (nsILocalFile.class, MozillaVersion.VERSION_XR10), result); error (rc); MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR10); MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR1_9_2); if (MozillaVersion.CheckVersion (MozillaVersion.VERSION_XR10)) { rc = XPCOM.Call (functionPtr, localFile.getAddress (), localFile.getAddress (), LocationProvider.getAddress ()); } else { MozillaVersion.SetCurrentVersion (MozillaVersion.VERSION_XR1_9_2); rc = XPCOM.NS_InitXPCOM2 (0, localFile.getAddress(), LocationProvider.getAddress ());
public static nsID GetIID (Class<?> clazz, int version, boolean exact) { if (version <= MozillaVersion.GetLatestVersion ()) { nsID[] table = IIDs.get (clazz); if (table == null) { return table[version]; int defaultIIDIndex = MozillaVersion.GetLatestVersion () + 1; if (version == MozillaVersion.GetCurrentVersion () && table[defaultIIDIndex] != null) { return table[defaultIIDIndex]; /* the cached value */ if (version == MozillaVersion.GetCurrentVersion ()) {
protected static void RegisterIID (Class<?> clazz, int version, nsID iid) { if (version <= MozillaVersion.GetLatestVersion ()) { nsID[] table = IIDs.get (clazz); if (table == null) { /* * Note that the table's final slot is used to cache the iid for * the current version since this is the most frequently used one. */ table = new nsID[MozillaVersion.GetLatestVersion () + 2]; IIDs.put (clazz, table); } table[version] = iid; } } }
public static nsID GetIID (Class<?> clazz) { return GetIID (clazz, MozillaVersion.GetCurrentVersion ()); }
protected static boolean IsXULRunner31 () { return MozillaVersion.CheckVersion (MozillaVersion.VERSION_XR31, true); }
rc = componentManager.CreateInstance (MozillaVersion.CheckVersion(MozillaVersion.VERSION_XR31) ? XPCOM.NS_IWEBBROWSER_31_CID : XPCOM.NS_IWEBBROWSER_CID, 0, IIDStore.GetIID (nsIWebBrowser.class), result); if (rc != XPCOM.NS_OK) { browser.dispose (); if (!MozillaVersion.CheckVersion (MozillaVersion.VERSION_XR10)) { rc = webBrowser.QueryInterface (IIDStore.GetIID (nsIInterfaceRequestor.class), result); if (rc != XPCOM.NS_OK) { if (rc == XPCOM.NS_OK && result[0] != 0) { new nsISupports (result[0]).Release (); MozillaVersion.SetCurrentVersion (i); break; if (MozillaVersion.CheckVersion (MozillaVersion.VERSION_XR1_8, true)) { if (!factoriesRegistered) { DownloadFactory_1_8 downloadFactory_1_8 = new DownloadFactory_1_8 (); if (MozillaVersion.CheckVersion (MozillaVersion.VERSION_XR1_9)) { delegate.addWindowSubclass ();