diff --git a/config/config.mk b/config/config.mk index 5afc3c8f62c9..fc6abc71e81c 100644 --- a/config/config.mk +++ b/config/config.mk @@ -501,7 +501,7 @@ endif # Java macros JAVA_GEN_DIR = _javagen JAVA_DIST_DIR = $(DEPTH)/$(JAVA_GEN_DIR) -JAVA_IFACES_PKG_NAME = org/mozilla/xpcom +JAVA_IFACES_PKG_NAME = org/mozilla/interfaces REQ_INCLUDES = $(foreach d,$(REQUIRES),-I$(DIST)/include/$d) -I$(DIST)/include ifdef LIBXUL_SDK diff --git a/extensions/java/xpcom/glue/nsJavaXPCOMGlue.cpp b/extensions/java/xpcom/glue/nsJavaXPCOMGlue.cpp index d577b4b1a189..cd2d89996f5a 100644 --- a/extensions/java/xpcom/glue/nsJavaXPCOMGlue.cpp +++ b/extensions/java/xpcom/glue/nsJavaXPCOMGlue.cpp @@ -280,17 +280,17 @@ RegisterNativeMethods(JNIEnv* env, void** aFunctions) JNINativeMethod xpcom_methods[] = { { "initXPCOMNative", - "(Ljava/io/File;Lorg/mozilla/xpcom/IAppFileLocProvider;)Lorg/mozilla/xpcom/nsIServiceManager;", + "(Ljava/io/File;Lorg/mozilla/xpcom/IAppFileLocProvider;)Lorg/mozilla/interfaces/nsIServiceManager;", (void*) aFunctions[kFunc_InitXPCOM] }, - { "shutdownXPCOM", "(Lorg/mozilla/xpcom/nsIServiceManager;)V", + { "shutdownXPCOM", "(Lorg/mozilla/interfaces/nsIServiceManager;)V", (void*) aFunctions[kFunc_ShutdownXPCOM] }, - { "getComponentManager", "()Lorg/mozilla/xpcom/nsIComponentManager;", + { "getComponentManager", "()Lorg/mozilla/interfaces/nsIComponentManager;", (void*) aFunctions[kFunc_GetComponentManager] }, - { "getComponentRegistrar", "()Lorg/mozilla/xpcom/nsIComponentRegistrar;", + { "getComponentRegistrar", "()Lorg/mozilla/interfaces/nsIComponentRegistrar;", (void*) aFunctions[kFunc_GetComponentRegistrar] }, - { "getServiceManager", "()Lorg/mozilla/xpcom/nsIServiceManager;", + { "getServiceManager", "()Lorg/mozilla/interfaces/nsIServiceManager;", (void*) aFunctions[kFunc_GetServiceManager] }, - { "newLocalFile", "(Ljava/lang/String;Z)Lorg/mozilla/xpcom/nsILocalFile;", + { "newLocalFile", "(Ljava/lang/String;Z)Lorg/mozilla/interfaces/nsILocalFile;", (void*) aFunctions[kFunc_NewLocalFile] } }; diff --git a/extensions/java/xpcom/interfaces/org/mozilla/xpcom/IXPCOM.java b/extensions/java/xpcom/interfaces/org/mozilla/xpcom/IXPCOM.java index 3b62445f695a..73081de2b09e 100644 --- a/extensions/java/xpcom/interfaces/org/mozilla/xpcom/IXPCOM.java +++ b/extensions/java/xpcom/interfaces/org/mozilla/xpcom/IXPCOM.java @@ -38,6 +38,11 @@ package org.mozilla.xpcom; import java.io.File; +import org.mozilla.interfaces.nsIComponentManager; +import org.mozilla.interfaces.nsIComponentRegistrar; +import org.mozilla.interfaces.nsILocalFile; +import org.mozilla.interfaces.nsIServiceManager; + public interface IXPCOM { diff --git a/extensions/java/xpcom/interfaces/org/mozilla/xpcom/Mozilla.java b/extensions/java/xpcom/interfaces/org/mozilla/xpcom/Mozilla.java index 8f25b18e571c..3e8c9aca76ee 100644 --- a/extensions/java/xpcom/interfaces/org/mozilla/xpcom/Mozilla.java +++ b/extensions/java/xpcom/interfaces/org/mozilla/xpcom/Mozilla.java @@ -50,6 +50,12 @@ import java.util.Enumeration; import java.util.Iterator; import java.util.Properties; +import org.mozilla.interfaces.nsIComponentManager; +import org.mozilla.interfaces.nsIComponentRegistrar; +import org.mozilla.interfaces.nsILocalFile; +import org.mozilla.interfaces.nsIServiceManager; +import org.mozilla.interfaces.nsISupports; + /** * A singleton class which provides access to the Mozilla browser. Requires diff --git a/extensions/java/xpcom/interfaces/org/mozilla/xpcom/VersionComparator.java b/extensions/java/xpcom/interfaces/org/mozilla/xpcom/VersionComparator.java index b5a25956a995..e5b12f5d6020 100644 --- a/extensions/java/xpcom/interfaces/org/mozilla/xpcom/VersionComparator.java +++ b/extensions/java/xpcom/interfaces/org/mozilla/xpcom/VersionComparator.java @@ -40,6 +40,9 @@ package org.mozilla.xpcom; import java.util.Enumeration; import java.util.StringTokenizer; +import org.mozilla.interfaces.nsISupports; +import org.mozilla.interfaces.nsIVersionComparator; + /** * Version strings are dot-separated sequences of version-parts. diff --git a/extensions/java/xpcom/src/Makefile.in b/extensions/java/xpcom/src/Makefile.in index cb5b4541a22e..4c4f01c03074 100755 --- a/extensions/java/xpcom/src/Makefile.in +++ b/extensions/java/xpcom/src/Makefile.in @@ -89,13 +89,15 @@ endif #JAVA_LIBRARY_NAME = javaxpcom JARFILE = javaxpcom.jar +PACKAGE_DIR = org/mozilla/xpcom/internal + JAVA_SRCS = \ - org/mozilla/xpcom/internal/XPCOMJavaProxy.java \ - org/mozilla/xpcom/internal/XPCOMJavaProxyBase.java \ - org/mozilla/xpcom/internal/MozillaImpl.java \ - org/mozilla/xpcom/internal/GREImpl.java \ - org/mozilla/xpcom/internal/XPCOMImpl.java \ - org/mozilla/xpcom/internal/JavaXPCOMMethods.java \ + $(PACKAGE_DIR)/XPCOMJavaProxy.java \ + $(PACKAGE_DIR)/XPCOMJavaProxyBase.java \ + $(PACKAGE_DIR)/MozillaImpl.java \ + $(PACKAGE_DIR)/GREImpl.java \ + $(PACKAGE_DIR)/XPCOMImpl.java \ + $(PACKAGE_DIR)/JavaXPCOMMethods.java \ $(NULL) JAVA_CLASSPATH = \ diff --git a/extensions/java/xpcom/src/nsJavaWrapper.cpp b/extensions/java/xpcom/src/nsJavaWrapper.cpp index bff0ad77ab96..c86245398a2b 100644 --- a/extensions/java/xpcom/src/nsJavaWrapper.cpp +++ b/extensions/java/xpcom/src/nsJavaWrapper.cpp @@ -128,7 +128,7 @@ CreateJavaArray(JNIEnv* env, PRUint8 aType, PRUint32 aSize, const nsID& aIID, return rv; // Create proper Java interface name - nsCAutoString class_name("org/mozilla/xpcom/"); + nsCAutoString class_name("org/mozilla/interfaces/"); class_name.AppendASCII(iface_name); jclass ifaceClass = env->FindClass(class_name.get()); if (!ifaceClass) @@ -1600,7 +1600,7 @@ CreateJavaProxy(JNIEnv* env, nsISupports* aXPCOMObject, const nsIID& aIID, jobject java_obj = nsnull; // Create proper Java interface name - nsCAutoString class_name("org.mozilla.xpcom."); + nsCAutoString class_name("org.mozilla.interfaces."); class_name.AppendASCII(iface_name); jclass ifaceClass = FindClassInLoader(env, aObjectLoader, class_name.get()); diff --git a/extensions/java/xpcom/src/nsJavaXPCOMBindingUtils.cpp b/extensions/java/xpcom/src/nsJavaXPCOMBindingUtils.cpp index d3fabd0d23f1..fa1299993e9a 100644 --- a/extensions/java/xpcom/src/nsJavaXPCOMBindingUtils.cpp +++ b/extensions/java/xpcom/src/nsJavaXPCOMBindingUtils.cpp @@ -236,10 +236,10 @@ InitializeJavaGlobals(JNIEnv *env) goto init_error; } - if (!(clazz = env->FindClass("org/mozilla/xpcom/nsISupports")) || + if (!(clazz = env->FindClass("org/mozilla/interfaces/nsISupports")) || !(nsISupportsClass = (jclass) env->NewGlobalRef(clazz))) { - NS_WARNING("Problem creating org.mozilla.xpcom.nsISupports globals"); + NS_WARNING("Problem creating org.mozilla.interfaces.nsISupports globals"); goto init_error; } diff --git a/extensions/java/xpcom/src/nsJavaXPTCStub.cpp b/extensions/java/xpcom/src/nsJavaXPTCStub.cpp index 184df6eafb47..db64b6919930 100644 --- a/extensions/java/xpcom/src/nsJavaXPTCStub.cpp +++ b/extensions/java/xpcom/src/nsJavaXPTCStub.cpp @@ -273,7 +273,7 @@ nsJavaXPTCStub::QueryInterface(const nsID &aIID, void **aInstancePtr) jmethodID qiMID = 0; jclass clazz = env->GetObjectClass(javaObject); if (clazz) { - char* sig = "(Ljava/lang/String;)Lorg/mozilla/xpcom/nsISupports;"; + char* sig = "(Ljava/lang/String;)Lorg/mozilla/interfaces/nsISupports;"; qiMID = env->GetMethodID(clazz, "queryInterface", sig); NS_ASSERTION(qiMID, "Failed to get queryInterface method ID"); } @@ -949,11 +949,11 @@ nsJavaXPTCStub::SetupJavaParams(const nsXPTParamInfo &aParamInfo, } if (tag != nsXPTType::T_INTERFACE_IS) { - aMethodSig.AppendLiteral("Lorg/mozilla/xpcom/"); + aMethodSig.AppendLiteral("Lorg/mozilla/interfaces/"); aMethodSig.AppendASCII(iface_name); aMethodSig.Append(';'); } else { - aMethodSig.AppendLiteral("Lorg/mozilla/xpcom/nsISupports;"); + aMethodSig.AppendLiteral("Lorg/mozilla/interfaces/nsISupports;"); } nsMemory::Free(iface_name); @@ -1138,7 +1138,7 @@ nsJavaXPTCStub::GetRetvalSig(const nsXPTParamInfo* aParamInfo, if (NS_FAILED(rv) || !iface_name) break; - aRetvalSig.AppendLiteral("Lorg/mozilla/xpcom/"); + aRetvalSig.AppendLiteral("Lorg/mozilla/interfaces/"); aRetvalSig.AppendASCII(iface_name); aRetvalSig.Append(';'); nsMemory::Free(iface_name); @@ -1146,7 +1146,7 @@ nsJavaXPTCStub::GetRetvalSig(const nsXPTParamInfo* aParamInfo, } case nsXPTType::T_INTERFACE_IS: - aRetvalSig.AppendLiteral("Lorg/mozilla/xpcom/nsISupports;"); + aRetvalSig.AppendLiteral("Lorg/mozilla/interfaces/nsISupports;"); break; case nsXPTType::T_VOID: diff --git a/extensions/java/xpcom/src/org/mozilla/xpcom/internal/XPCOMImpl.java b/extensions/java/xpcom/src/org/mozilla/xpcom/internal/XPCOMImpl.java index 17a2ae9846a9..3a9d02d23246 100644 --- a/extensions/java/xpcom/src/org/mozilla/xpcom/internal/XPCOMImpl.java +++ b/extensions/java/xpcom/src/org/mozilla/xpcom/internal/XPCOMImpl.java @@ -40,10 +40,11 @@ import java.io.File; import org.mozilla.xpcom.IAppFileLocProvider; import org.mozilla.xpcom.IXPCOM; -import org.mozilla.xpcom.nsIComponentManager; -import org.mozilla.xpcom.nsIComponentRegistrar; -import org.mozilla.xpcom.nsILocalFile; -import org.mozilla.xpcom.nsIServiceManager; + +import org.mozilla.interfaces.nsIComponentManager; +import org.mozilla.interfaces.nsIComponentRegistrar; +import org.mozilla.interfaces.nsILocalFile; +import org.mozilla.interfaces.nsIServiceManager; public class XPCOMImpl implements IXPCOM { diff --git a/xpcom/typelib/xpidl/xpidl_java.c b/xpcom/typelib/xpidl/xpidl_java.c index 2b7c315e25c5..929abcb7c3dc 100644 --- a/xpcom/typelib/xpidl/xpidl_java.c +++ b/xpcom/typelib/xpidl/xpidl_java.c @@ -303,7 +303,7 @@ interface_declaration(TreeState *state) " * %s.idl\n */\n", state->basename); /* package name (namespace) */ - fputs("\npackage org.mozilla.xpcom;\n\n", state->file); + fputs("\npackage org.mozilla.interfaces;\n\n", state->file); iid = IDL_tree_property_get(IDL_INTERFACE(interface).ident, "uuid");