*not part of the build*
fix for 74676 git-svn-id: svn://10.0.0.236/trunk@91262 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -43,7 +43,6 @@ CXXFLAGS += -I$(JDKHOME)/include -I$(JDKHOME)/include/linux $(MOZ_TOOLKIT
|
||||
|
||||
EXTRA_DSO_LDOPTS += \
|
||||
-L$(DIST)/bin/components/ \
|
||||
-lbcorb -lbcxpcomstubs -lbcjavastubs \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
@@ -22,13 +22,16 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsCRT.h"
|
||||
#include "bcJavaComponentFactory.h"
|
||||
#include "bcJavaStubsAndProxies.h"
|
||||
#include "bcXPCOMStubsAndProxies.h"
|
||||
#include "bcORB.h"
|
||||
#include "bcIJavaStubsAndProxies.h"
|
||||
#include "bcJavaStubsAndProxiesCID.h"
|
||||
#include "bcIXPCOMStubsAndProxies.h"
|
||||
#include "bcXPCOMStubsAndProxiesCID.h"
|
||||
#include "bcIORBComponent.h"
|
||||
#include "bcORBComponentCID.h"
|
||||
|
||||
static NS_DEFINE_CID(kJavaStubsAndProxies,BC_JAVASTUBSANDPROXIES_CID);
|
||||
static NS_DEFINE_CID(kXPCOMStubsAndProxies,BC_XPCOMSTUBSANDPROXIES_CID);
|
||||
static NS_DEFINE_CID(kORBCIID,BC_ORB_CID);
|
||||
static NS_DEFINE_CID(kORBComponent,BC_ORBCOMPONENT_CID);
|
||||
|
||||
NS_IMPL_ISUPPORTS1(bcJavaComponentFactory, nsIFactory)
|
||||
|
||||
@@ -47,17 +50,17 @@ bcJavaComponentFactory::~bcJavaComponentFactory() {
|
||||
NS_IMETHODIMP bcJavaComponentFactory::CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *result) {
|
||||
printf("--bcJavaComponentFactory::CreateInstance\n");
|
||||
nsresult r;
|
||||
NS_WITH_SERVICE(bcJavaStubsAndProxies, javaStubsAndProxies, kJavaStubsAndProxies, &r);
|
||||
NS_WITH_SERVICE(bcIJavaStubsAndProxies, javaStubsAndProxies, kJavaStubsAndProxies, &r);
|
||||
if (NS_FAILED(r)) {
|
||||
printf("--bcJavaComponentFactory::CreateInstance javaStubsAndProxies failed \n");
|
||||
return r;
|
||||
}
|
||||
NS_WITH_SERVICE(bcXPCOMStubsAndProxies, xpcomStubsAndProxies, kXPCOMStubsAndProxies, &r);
|
||||
NS_WITH_SERVICE(bcIXPCOMStubsAndProxies, xpcomStubsAndProxies, kXPCOMStubsAndProxies, &r);
|
||||
if (NS_FAILED(r)) {
|
||||
printf("--bcJavaComponentFactory::CreateInstance xpcomStubsAndProxies failed \n");
|
||||
return r;
|
||||
}
|
||||
NS_WITH_SERVICE(bcORB, _orb, kORBCIID, &r);
|
||||
NS_WITH_SERVICE(bcIORBComponent, _orb, kORBComponent, &r);
|
||||
if (NS_FAILED(r)) {
|
||||
printf("--bcJavaComponentFactory::CreateInstance bcORB failed \n");
|
||||
return r;
|
||||
|
||||
@@ -31,14 +31,14 @@
|
||||
#include "nsSupportsArray.h"
|
||||
|
||||
#define BC_JAVACOMPONENTLOADER_ContractID \
|
||||
"@mozilla.org/blackwood/blackconnect/java-component-loader"
|
||||
"@mozilla.org/blackwood/blackconnect/java-component-loader;1"
|
||||
|
||||
/* 0d6b5198-1dd2-11b2-b2f0-ed49ba755db8 */
|
||||
#define BC_JAVACOMPONENTLOADER_CID \
|
||||
{ 0x0d6b5198, 0x1dd2, 0x11b2, \
|
||||
{0xb2, 0xf0, 0xed, 0x49, 0xba, 0x75, 0x5d, 0xb8 }}
|
||||
|
||||
#define JAVACOMPONENTTYPENAME "text/java"
|
||||
#define JAVACOMPONENTTYPENAME "application/java"
|
||||
|
||||
class bcJavaComponentLoader : public nsIComponentLoader {
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
@@ -37,7 +37,9 @@ MODULE = bcjavastubs
|
||||
IS_COMPONENT = 1
|
||||
|
||||
EXPORTS = \
|
||||
bcJavaStubsAndProxies.h
|
||||
bcIJavaStubsAndProxies.h \
|
||||
bcJavaStubsAndProxiesCID.h \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
bcJavaMarshalToolkit.cpp \
|
||||
@@ -80,7 +82,6 @@ endif
|
||||
|
||||
EXTRA_DSO_LDOPTS += \
|
||||
-L$(DIST)/bin/components/ \
|
||||
-lbcorb \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
47
mozilla/java/xpcom/java/src/bcIJavaStubsAndProxies.h
Normal file
47
mozilla/java/xpcom/java/src/bcIJavaStubsAndProxies.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* -*- 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>
|
||||
*/
|
||||
#ifndef __bcIJavaStubsAndProxies_h
|
||||
#define __bcIJavaStubsAndProxies_h
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "jni.h"
|
||||
#include "bcDefs.h"
|
||||
|
||||
/* 58034ea6-1dd2-11b2-9b58-8630abb8af47 */
|
||||
#define BC_JAVASTUBSANDPROXIES_IID \
|
||||
{0x58034ea6, 0x1dd2, 0x11b2, \
|
||||
{0x9b, 0x58, 0x86, 0x30, 0xab, 0xb8, 0xaf,0x47}}
|
||||
|
||||
class bcIORB;
|
||||
class bcIStub;
|
||||
|
||||
class bcIJavaStubsAndProxies : public nsISupports {
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(BC_JAVASTUBSANDPROXIES_IID)
|
||||
NS_IMETHOD GetStub(jobject obj, bcIStub **stub) = 0;
|
||||
NS_IMETHOD GetOID(char *location, bcOID *) = 0; //load component by location
|
||||
NS_IMETHOD GetOID(jobject object, bcIORB *orb, bcOID *oid) = 0;
|
||||
NS_IMETHOD GetProxy(bcOID oid, const nsIID &iid, bcIORB *orb, jobject *proxy) = 0;
|
||||
NS_IMETHOD GetInterface(const nsIID &iid, jclass *clazz) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -24,7 +24,8 @@
|
||||
#include "bcJavaStubsAndProxies.h"
|
||||
#include "bcJavaStub.h"
|
||||
#include "bcJavaGlobal.h"
|
||||
#include "bcORB.h"
|
||||
#include "bcIORBComponent.h"
|
||||
#include "bcORBComponentCID.h"
|
||||
#include "bcIIDJava.h"
|
||||
#include "nsHashtable.h"
|
||||
|
||||
@@ -40,7 +41,7 @@ jmethodID bcJavaStubsAndProxies::getInvocationHandlerID = 0;
|
||||
jclass bcJavaStubsAndProxies::org_mozilla_xpcom_ProxyHandler = 0;
|
||||
jmethodID bcJavaStubsAndProxies::getOIDID = 0;
|
||||
|
||||
NS_DEFINE_CID(kORBCIID,BC_ORB_CID);
|
||||
NS_DEFINE_CID(kORBComponent,BC_ORBCOMPONENT_CID);
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(bcJavaStubsAndProxies);
|
||||
|
||||
static nsModuleComponentInfo components[] =
|
||||
@@ -191,7 +192,7 @@ NS_IMETHODIMP bcJavaStubsAndProxies::GetOID(char *location, bcOID *oid) {
|
||||
jstring jstr = env->NewStringUTF(location);
|
||||
jobject object = env->CallStaticObjectMethod(componentLoader, loadComponentID, jstr);
|
||||
bcIStub *stub = new bcJavaStub(object);
|
||||
NS_WITH_SERVICE(bcORB,_orb,kORBCIID,&result);
|
||||
NS_WITH_SERVICE(bcIORBComponent,_orb,kORBComponent,&result);
|
||||
if (NS_FAILED(result)) {
|
||||
PR_LOG(log,PR_LOG_DEBUG,("--bcJavaStubsAndProxies::GetOID failed\n"));
|
||||
return result;
|
||||
|
||||
@@ -21,29 +21,16 @@
|
||||
*/
|
||||
#ifndef __bcJavaStubsAndProxies_h
|
||||
#define __bcJavaStubsAndProxies_h
|
||||
#include "nsISupports.h"
|
||||
#include "jni.h"
|
||||
#include "bcDefs.h"
|
||||
#include "bcIStub.h"
|
||||
|
||||
#include "bcIJavaStubsAndProxies.h"
|
||||
#include "bcIORB.h"
|
||||
|
||||
/* 58034ea6-1dd2-11b2-9b58-8630abb8af47 */
|
||||
|
||||
#define BC_JAVASTUBSANDPROXIES_IID \
|
||||
{0x58034ea6, 0x1dd2, 0x11b2, \
|
||||
{0x9b, 0x58, 0x86, 0x30, 0xab, 0xb8, 0xaf,0x47}}
|
||||
|
||||
#define BC_JAVASTUBSANDPROXIES_ContractID "@mozilla.org/blackwood/blackconnect/java-stubs-and-proxies"
|
||||
|
||||
/* 7cadf6e8-1dd2-11b2-9a6e-b1c37844e004 */
|
||||
#define BC_JAVASTUBSANDPROXIES_CID \
|
||||
{0x7cadf6e8, 0x1dd2, 0x11b2, \
|
||||
{0x9a, 0x6e, 0xb1, 0xc3, 0x78,0x44, 0xe0, 0x04}}
|
||||
#include "bcIStub.h"
|
||||
#include "bcJavaStubsAndProxiesCID.h"
|
||||
|
||||
class nsHashtable;
|
||||
class bcJavaStubsAndProxies : public nsISupports {
|
||||
|
||||
class bcJavaStubsAndProxies : public bcIJavaStubsAndProxies {
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(BC_JAVASTUBSANDPROXIES_IID)
|
||||
NS_IMETHOD GetStub(jobject obj, bcIStub **stub);
|
||||
NS_IMETHOD GetOID(char *location, bcOID *); //load component by location
|
||||
NS_IMETHOD GetOID(jobject object, bcIORB *orb, bcOID *oid);
|
||||
|
||||
33
mozilla/java/xpcom/java/src/bcJavaStubsAndProxiesCID.h
Normal file
33
mozilla/java/xpcom/java/src/bcJavaStubsAndProxiesCID.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/* -*- 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>
|
||||
*/
|
||||
#ifndef __bcJavaStubsAndProxiesCID_h__
|
||||
#define __bcJavaStubsAndProxiesCID_h__
|
||||
|
||||
|
||||
/* 7cadf6e8-1dd2-11b2-9a6e-b1c37844e004 */
|
||||
#define BC_JAVASTUBSANDPROXIES_CID \
|
||||
{0x7cadf6e8, 0x1dd2, 0x11b2, \
|
||||
{0x9a, 0x6e, 0xb1, 0xc3, 0x78,0x44, 0xe0, 0x04}}
|
||||
|
||||
#define BC_JAVASTUBSANDPROXIES_ContractID "@mozilla.org/blackwood/blackconnect/java-stubs-and-proxies;1"
|
||||
|
||||
#endif
|
||||
@@ -31,7 +31,9 @@ DLLNAME = bcjavastubs
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
|
||||
EXPORTS = \
|
||||
bcJavaStubsAndProxies.h
|
||||
bcIJavaStubsAndProxies.h \
|
||||
bcJavaStubsAndProxiesCID.h \
|
||||
$(NULL)
|
||||
|
||||
OBJS= \
|
||||
.\$(OBJDIR)\bcJavaMarshalToolkit.obj \
|
||||
|
||||
Reference in New Issue
Block a user