*not part of tbox builds*
fix for 63586 git-svn-id: svn://10.0.0.236/trunk@83988 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -27,6 +27,6 @@ srcdir = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS= src loader classes
|
||||
DIRS= xpidl src loader classes components
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/* -*- Mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Sun Microsystems,
|
||||
* Inc. Portions created by Sun are
|
||||
* Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Igor Kushnirskiy <idk@eng.sun.com>
|
||||
*/
|
||||
|
||||
package org.mozilla.xpcom;
|
||||
|
||||
public class Components {
|
||||
public static nsIComponentManager getComponentManager() {
|
||||
return componentMgr;
|
||||
}
|
||||
public static void setComponentManager(nsIComponentManager mgr) {
|
||||
componentMgr = mgr;
|
||||
}
|
||||
private static nsIComponentManager componentMgr = null;
|
||||
};
|
||||
55
mozilla/java/xpcom/java/components/Makefile.in
Normal file
55
mozilla/java/xpcom/java/components/Makefile.in
Normal file
@@ -0,0 +1,55 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Igor Kushnirskiy <idk@eng.sun.com>
|
||||
#
|
||||
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = ../../../..
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = blackConnectInit
|
||||
LIBRARY_NAME = blackConnectInit
|
||||
IS_COMPONENT = 1
|
||||
XPIDL_MODULE = blackConnectInit
|
||||
XPIDLSRCS = bcIBlackConnectInit.idl
|
||||
CPPSRCS = bcBlackConnectInit.cpp
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
COMPONENT=bcBlackConnectInit
|
||||
CLASSES=bcIBlackConnectInit.class bcBlackConnectInit.class
|
||||
|
||||
$(COMPONENT).jar.comp: manifest $(CLASSES)
|
||||
$(JDKHOME)/bin/jar cvfm $(COMPONENT).jar.comp manifest *.class
|
||||
.java.class:
|
||||
$(JDKHOME)/bin/javac -classpath .:../classes $<
|
||||
install-component: $(COMPONENT).jar.comp $(COMPONENT).jar.info
|
||||
cp $(COMPONENT).jar.comp $(COMPONENT).jar.info $(DEPTH)/dist/bin/components/
|
||||
clobber-java:
|
||||
rm -f *.class *.jar
|
||||
clobber:: clobber-java
|
||||
clobber_all:: clobber-java
|
||||
install:: install-component
|
||||
|
||||
51
mozilla/java/xpcom/java/components/bcBlackConnectInit.cpp
Normal file
51
mozilla/java/xpcom/java/components/bcBlackConnectInit.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Sun Microsystems,
|
||||
* Inc. Portions created by Sun are
|
||||
* Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Igor Kushnirskiy <idk@eng.sun.com>
|
||||
*/
|
||||
|
||||
#include "bcIBlackConnectInit.h"
|
||||
#include "nsIModule.h"
|
||||
|
||||
static int counter = 0; //we do not need to call it on unload time;
|
||||
extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager *compMgr,
|
||||
nsIFile *location,
|
||||
nsIModule** result) //I am using it for initialization only
|
||||
{
|
||||
nsresult r;
|
||||
if (counter == 0) {
|
||||
counter ++;
|
||||
bcIBlackConnectInit *blackConnectInit;
|
||||
r = nsComponentManager::CreateInstance("bcBlackConnectInit",
|
||||
nsnull,
|
||||
NS_GET_IID(bcIBlackConnectInit),
|
||||
(void**)&blackConnectInit);
|
||||
if (NS_SUCCEEDED(r)) {
|
||||
nsIComponentManager* cm;
|
||||
r = NS_GetGlobalComponentManager(&cm);
|
||||
if (NS_SUCCEEDED(r)) {
|
||||
blackConnectInit->InitComponentManager(cm);
|
||||
}
|
||||
}
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
48
mozilla/java/xpcom/java/components/bcBlackConnectInit.java
Normal file
48
mozilla/java/xpcom/java/components/bcBlackConnectInit.java
Normal file
@@ -0,0 +1,48 @@
|
||||
/* -*- Mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Sun Microsystems,
|
||||
* Inc. Portions created by Sun are
|
||||
* Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Igor Kushnirskiy <idk@eng.sun.com>
|
||||
*/
|
||||
import org.mozilla.xpcom.*;
|
||||
|
||||
public class bcBlackConnectInit implements bcIBlackConnectInit {
|
||||
public bcBlackConnectInit() {
|
||||
}
|
||||
public Object queryInterface(IID iid) {
|
||||
Object result;
|
||||
if ( nsISupportsIID.equals(iid)
|
||||
|| bcIBlackConnectInitIID.equals(iid)) {
|
||||
result = this;
|
||||
} else {
|
||||
result = null;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/* void initComponentManager (in nsIComponentManager cm); */
|
||||
public void initComponentManager(nsIComponentManager cm) {
|
||||
Components.setComponentManager(cm);
|
||||
Debug.log("Components.setComponentManager(cm);");
|
||||
}
|
||||
|
||||
static IID bcIBlackConnectInitIID = new IID(bcIBlackConnectInit.IID);
|
||||
static IID nsISupportsIID = new IID(nsISupports.IID);
|
||||
static {
|
||||
InterfaceRegistry.register(nsIComponentManager.class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIComponentManager.idl"
|
||||
|
||||
[scriptable, uuid(d4867a7e-1dd1-11b2-a009-b111ab5d7639)]
|
||||
|
||||
interface bcIBlackConnectInit : nsISupports
|
||||
{
|
||||
void initComponentManager(in nsIComponentManager cm);
|
||||
};
|
||||
30
mozilla/java/xpcom/java/components/bcIBlackConnectInit.java
Normal file
30
mozilla/java/xpcom/java/components/bcIBlackConnectInit.java
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from bcIBlackConnectInit.idl.
|
||||
*/
|
||||
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
|
||||
|
||||
/**
|
||||
* Interface bcIBlackConnectInit
|
||||
*
|
||||
* IID: 0xd4867a7e-1dd1-11b2-a009-b111ab5d7639
|
||||
*/
|
||||
|
||||
public interface bcIBlackConnectInit extends nsISupports
|
||||
{
|
||||
public static final String IID =
|
||||
"d4867a7e-1dd1-11b2-a009-b111ab5d7639";
|
||||
|
||||
|
||||
/* void initComponentManager (in nsIComponentManager cm); */
|
||||
public void initComponentManager(nsIComponentManager cm);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
66
mozilla/java/xpcom/java/components/makefile.win
Normal file
66
mozilla/java/xpcom/java/components/makefile.win
Normal file
@@ -0,0 +1,66 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Igor Kushnirskiy <idk@eng.sun.com>
|
||||
#
|
||||
|
||||
|
||||
DEPTH = ..\..\..\..
|
||||
topsrcdir = ..\..\..\..
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
MODULE=javaSample
|
||||
COMPONENT=1
|
||||
DLLNAME=$(MODULE)
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\bcIBlackConnectInit.idl \
|
||||
$(NULL)
|
||||
|
||||
OBJS = .\$(OBJDIR)\bcBlackConnectInit.obj
|
||||
LLIBS=$(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom.lib
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
COMPONENT=bcBlackConnectInit
|
||||
CLASSES=bcIBlackConnectInit.class bcJavaSample.class
|
||||
|
||||
$(COMPONENT).jar.comp: manifest $(CLASSES)
|
||||
$(JDKHOME)\bin\jar cvfm $(COMPONENT).jar.comp manifest *.class
|
||||
|
||||
.SUFFIXES: .java .class
|
||||
|
||||
.java.class:
|
||||
$(JDKHOME)\bin\javac -classpath .;..\classes $<
|
||||
|
||||
install-component: $(COMPONENT).jar.comp $(COMPONENT).jar.info $(DLL)
|
||||
copy $(COMPONENT).jar* $(DIST)\bin\components
|
||||
copy $(DLL) $(DIST)\bin\components
|
||||
|
||||
clobber-java:
|
||||
-del *.class *.jar.comp
|
||||
clobber:: clobber-java
|
||||
rm $(DIST)\bin\components\$(DLLNAME).dll
|
||||
rm $(DIST)\bin\components\$(COMPONENT).jar.*
|
||||
clobber_all:: clobber-java
|
||||
install:: install-component
|
||||
1
mozilla/java/xpcom/java/components/manifest
Normal file
1
mozilla/java/xpcom/java/components/manifest
Normal file
@@ -0,0 +1 @@
|
||||
Component-Class: bcBlackConnectInit
|
||||
@@ -24,10 +24,12 @@
|
||||
DEPTH = ..\..\..
|
||||
|
||||
DIRS= \
|
||||
xpidl \
|
||||
loader \
|
||||
src \
|
||||
classes \
|
||||
test \
|
||||
# test \
|
||||
components \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
Reference in New Issue
Block a user