зеркало из https://github.com/mozilla/pjs.git
Bug 330256 - Change generated interfaces package name.
This commit is contained in:
Родитель
67994e5547
Коммит
9aec3eb2e6
|
@ -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
|
||||
|
|
|
@ -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] }
|
||||
};
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 = \
|
||||
|
|
|
@ -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());
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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");
|
||||
|
|
Загрузка…
Ссылка в новой задаче