Compare commits
11 Commits
Bugzilla_P
...
JAVADEV_6_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f75864d2ea | ||
|
|
a853a72847 | ||
|
|
a850c63a19 | ||
|
|
cb677db0ef | ||
|
|
9ace584607 | ||
|
|
cfb73dbc2b | ||
|
|
204d0c2246 | ||
|
|
9274a7d631 | ||
|
|
46a13d11cf | ||
|
|
8a5d7a822e | ||
|
|
b414c78592 |
71
mozilla/java/Makefile.in
Normal file
71
mozilla/java/Makefile.in
Normal file
@@ -0,0 +1,71 @@
|
||||
#!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):
|
||||
|
||||
DEPTH = ..
|
||||
topsrcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifneq ($(BUILD_DOM_ONLY),)
|
||||
DIRS = external \
|
||||
util \
|
||||
dom
|
||||
else
|
||||
ifneq ($(BUILD_PLUGLETS_ONLY),)
|
||||
DIRS = external \
|
||||
util \
|
||||
dom \
|
||||
plugins
|
||||
else
|
||||
ifneq ($(BUILD_WEBCLIENT_ONLY),)
|
||||
DIRS = external \
|
||||
util \
|
||||
dom \
|
||||
xpcom \
|
||||
webclient
|
||||
else
|
||||
ifneq ($(BUILD_BLACKCONNECT_ONLY),)
|
||||
DIRS = external \
|
||||
util \
|
||||
xpcom
|
||||
else
|
||||
ifneq ($(BUILD_BLACKWOOD),)
|
||||
DIRS = external \
|
||||
util \
|
||||
dom \
|
||||
xpcom \
|
||||
webclient \
|
||||
plugins
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
ifneq ($(PACKAGE_BUILD),)
|
||||
DIRS += build
|
||||
endif
|
||||
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
82
mozilla/java/Makefile.win
Normal file
82
mozilla/java/Makefile.win
Normal file
@@ -0,0 +1,82 @@
|
||||
#!nmake
|
||||
#
|
||||
# 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):
|
||||
|
||||
IGNORE_MANIFEST=1
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile to build the java enhancers to mozilla
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the depth of the current directory relative to the
|
||||
#// root of NS
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH = ..
|
||||
|
||||
!ifdef BUILD_DOM_ONLY
|
||||
DIRS = external \
|
||||
util \
|
||||
dom
|
||||
!else
|
||||
!ifdef BUILD_PLUGLETS_ONLY
|
||||
DIRS = external \
|
||||
util \
|
||||
dom \
|
||||
plugins
|
||||
!else
|
||||
!ifdef BUILD_WEBCLIENT_ONLY
|
||||
DIRS = external \
|
||||
util \
|
||||
dom \
|
||||
xpcom \
|
||||
webclient \
|
||||
build
|
||||
!else
|
||||
!ifdef BUILD_BLACKCONNECT_ONLY
|
||||
DIRS = external \
|
||||
util \
|
||||
xpcom
|
||||
!else
|
||||
!ifdef BUILD_BLACKWOOD
|
||||
DIRS = external \
|
||||
util \
|
||||
dom \
|
||||
xpcom \
|
||||
webclient \
|
||||
plugins
|
||||
!endif
|
||||
!endif
|
||||
!endif
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!ifdef PACKAGE_BUILD
|
||||
DIRS = $(DIRS) build
|
||||
!endif
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
edburns:
|
||||
echo $(DIRS)
|
||||
36
mozilla/java/README
Normal file
36
mozilla/java/README
Normal file
@@ -0,0 +1,36 @@
|
||||
Here lies the code that comprises the java enhancers to mozilla.
|
||||
|
||||
Authors: see the README files for each individual subdirectory
|
||||
|
||||
Requirements:
|
||||
|
||||
* JDK1.2 or greater (may work with lower versions, haven't checked).
|
||||
|
||||
* Successfully built MOZ_DEBUG=1 Mozilla M13 tree.
|
||||
|
||||
* Perl 5 perl.exe must be in your path
|
||||
|
||||
How To Build:
|
||||
|
||||
* make it so the directory in which this file resides is a child of your
|
||||
top level Mozilla M13 directory
|
||||
|
||||
* make sure the environment var JDKHOME is set to your jdk installation
|
||||
directory, ie SET JDKHOME=C:\jdk1.2.2
|
||||
|
||||
* type "nmake /f makefile.win all" and hope for the best
|
||||
|
||||
* this should compile the clasess into %MOZ_SRC%\dist\classes
|
||||
|
||||
Problems:
|
||||
|
||||
* clobber_all doesn't remove the .class files from dist\classes. You
|
||||
have to do this manually.
|
||||
|
||||
* post to netscape.public.mozilla.java newsgroup
|
||||
|
||||
General notes:
|
||||
|
||||
* Please update the ChangeLog (changelo) files in the subdirectories when
|
||||
you make changes.
|
||||
|
||||
104
mozilla/java/README.commercial
Normal file
104
mozilla/java/README.commercial
Normal file
@@ -0,0 +1,104 @@
|
||||
******************** BLACKWOOD RELEASE 0.9 README ********************
|
||||
|
||||
|
||||
READ THIS DOCUMENT BEFORE RUNNING ANY OF THE BLACKWOOD COMPONENTS
|
||||
|
||||
|
||||
This version of Blackwood has been built on and configured for
|
||||
the Solaris(TM) operating environment
|
||||
|
||||
|
||||
This package contains the following components of the Blackwood Project
|
||||
- Pluglets, JavaDOM and Webclient
|
||||
|
||||
The Blackwood project aims to -
|
||||
1. Better integrate the Java (TM) platform with the Mozilla (Netscape 6)
|
||||
Browser so developers can extend the browser with components and
|
||||
plug-ins written in the Java programming language
|
||||
2. Make sure that Mozilla's layout engine can be embedded in
|
||||
applications running on a Java virtual machine (JVM).
|
||||
|
||||
More information on the Blackwood project can be obtained online at
|
||||
http://www.mozilla.org/projects/blackwood/
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
SYSTEM REQUIREMENTS
|
||||
------------------------------------------------------------------------
|
||||
|
||||
The Blackwood software components run on Solaris for SPARC(TM) and
|
||||
Solaris for Intel with Solaris versions 7 and 8.
|
||||
|
||||
You will also need to install the JRE1.3.0_01 Java Bundle that goes
|
||||
with Netscape 6 PR3
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
BLACKWOOD COMPONENTS
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
JAVA PLUGLET API - A Pluglet is a plug-in that is written in the Java
|
||||
programming Language. The Java Pluglet API is a close 1:1 implementation
|
||||
of the new C++ Plug-in API in Mozilla and it allows users to develop
|
||||
plug-ins in Java that run inside a Java Virtual Machione (JVM).
|
||||
|
||||
More information can be obtained online at
|
||||
http://www.mozilla.org/projects/blackwood/java-plugins/
|
||||
|
||||
|
||||
JAVA DOM API - The Java DOM API is an implementation of the Java Bindings
|
||||
specified in the Document Object Model (DOM) Level 1 Specification. This
|
||||
API allows Java Applets and Pluglets to interact with and modify the
|
||||
document they are embedded into.
|
||||
|
||||
More information can be obtained online at
|
||||
http://www.mozilla.org/projects/blackwood/dom/
|
||||
http://www.w3.org/TR/REC-DOM-Level-1/java-language-binding.html
|
||||
|
||||
|
||||
WEBCLIENT - Webclient is a browser-neutral Java API that enables generic
|
||||
web browsing capabilities in a Java application.
|
||||
|
||||
More information can be obtained online at
|
||||
http://www.mozilla.org/projects/blackwood/webclient/
|
||||
http://www.mozilla.org/projects/blackwood/webclient/ref_guides/Developer_guide/index.htm
|
||||
http://www.mozilla.org/projects/blackwood/webclient/ref_guides/Implementation_guide/index.htm
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
RUN INSTRUCTIONS
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
PLUGLETS
|
||||
- Launch the browser using the shell script "netscape"
|
||||
- Navigate to the url file:///opt/SUNWns6/res/javadev/pluglets/test.html
|
||||
|
||||
This contains several Pluglet examples.
|
||||
|
||||
|
||||
JAVADOM
|
||||
- The DOMViewer example in the Pluglets example list is a JavaDOM example
|
||||
|
||||
|
||||
WEBCLIENT
|
||||
- set the Environment variable MOZILLA_FIVE_HOME to the location of your
|
||||
Netscape 6 binaries. If you install the SVR4 package, this will be
|
||||
setenv MOZILLA_FIVE_HOME /opt/SUNWns6
|
||||
- cd to the javadev/example directory
|
||||
- run the shell script runem as
|
||||
runem <your url>
|
||||
|
||||
|
||||
============================================================================
|
||||
Copyright 2000 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto,
|
||||
California 94303 U.S.A. All rights reserved.
|
||||
|
||||
Sun, Sun Microsystems, Java, SunOS, OpenWindows, and Solaris are trademarks,
|
||||
registered trademarks, or service marks of Sun Microsystems, Inc. in the U.S.A.
|
||||
and other countries. All SPARC trademarks are used under license and are
|
||||
trademarks or registered trademarks of SPARC International, Inc. in the U.S.A.
|
||||
and other countries. Products bearing SPARC trademarks are based upon an
|
||||
architecture developed by Sun Microsystems, Inc. Netscape is a trademark of
|
||||
Netscape Communications Corporation. PostScript is a trademark of Adobe
|
||||
Systems, Incorporated, which may be registered in certain jurisdictions.
|
||||
|
||||
271
mozilla/java/build/Makefile.in
Normal file
271
mozilla/java/build/Makefile.in
Normal file
@@ -0,0 +1,271 @@
|
||||
# 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):
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = $(DEPTH)
|
||||
|
||||
JAVAHOME = $(JDKHOME)
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
PACKAGE_DIR=$(topsrcdir)/dist/javadev
|
||||
PACKAGE_LIB=$(PACKAGE_DIR)/lib
|
||||
PACKAGE_EXAMPLE=$(PACKAGE_DIR)/example
|
||||
|
||||
ifeq ($(PACKAGE_VER),)
|
||||
PACKAGE_VER=1_1
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(OS_ARCH),Linux)
|
||||
PACKAGE_OS=linux
|
||||
SET_CLASSPATH="export CLASSPATH="
|
||||
else
|
||||
PACKAGE_OS=solaris
|
||||
SET_CLASSPATH="setenv CLASSPATH "
|
||||
endif
|
||||
|
||||
buildRunems:
|
||||
ifneq ($(BUILD_DOM_ONLY),)
|
||||
if test ! -d $(PACKAGE_DIR) ; then mkdir $(PACKAGE_DIR) ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB) ; then mkdir $(PACKAGE_LIB) ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_EXAMPLE) ; then mkdir $(PACKAGE_EXAMPLE) ; else true ; fi ;
|
||||
if test ! -d $(DIST)/../java/build/org ; then mkdir $(DIST)/../java/build/org ; else true ; fi ;
|
||||
if test ! -d $(DIST)/../java/build/org/mozilla ; then mkdir $(DIST)/../java/build/org/mozilla ; else true ; fi ;
|
||||
cp -R $(DIST)/classes/org/mozilla/dom $(DIST)/../java/build/org/mozilla
|
||||
cp -R $(DIST)/classes/org/mozilla/util $(DIST)/../java/build/org/mozilla
|
||||
cp -R $(DIST)/classes/org/w3c $(DIST)/../java/build/org
|
||||
cd $(DIST)/../java/build
|
||||
$(JDKHOME)/bin/jar -cvfM0 JavaDOM_$(PACKAGE_VER)_$(PACKAGE_OS).jar org
|
||||
cp JavaDOM_$(PACKAGE_VER)_$(PACKAGE_OS).jar $(PACKAGE_LIB)/JavaDOM_$(PACKAGE_VER)_$(PACKAGE_OS).jar
|
||||
rm -Rf $(DIST)/../java/build/org
|
||||
rm -f $(DIST)/../java/build/JavaDOM_$(PACKAGE_VER)_$(PACKAGE_OS).jar
|
||||
cp $(DIST)/bin/libjavadomjni.so $(PACKAGE_LIB)/libjavadomjni.so
|
||||
cp $(DIST)/bin/components/libjavadom.so $(PACKAGE_LIB)/libjavadom.so
|
||||
chmod 775 $(PACKAGE_LIB)/libjavadomjni.so
|
||||
chmod 775 $(PACKAGE_LIB)/libjavadom.so
|
||||
cp $(DIST)/../java/build/install_dom_unix.js $(DIST)/install.js
|
||||
cp $(DIST)/../java/build/symlink.sh $(DIST)/symlink.sh
|
||||
chmod 775 $(DIST)/symlink.sh
|
||||
cp $(DIST)/../java/build/README.DOM $(PACKAGE_DIR)/README.DOM
|
||||
cd $(DIST) ; \
|
||||
zip -r JavaDOM_$(PACKAGE_VER)_$(PACKAGE_OS).xpi install.js symlink.sh javadev
|
||||
else
|
||||
ifneq ($(BUILD_PLUGLETS_ONLY),)
|
||||
if test ! -d $(PACKAGE_DIR) ; then mkdir $(PACKAGE_DIR) ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB) ; then mkdir $(PACKAGE_LIB) ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_EXAMPLE) ; then mkdir $(PACKAGE_EXAMPLE) ; else true ; fi ;
|
||||
if test ! -d $(DIST)/../java/build/org ; then mkdir $(DIST)/../java/build/org ; else true ; fi ;
|
||||
if test ! -d $(DIST)/../java/build/org/mozilla ; then mkdir $(DIST)/../java/build/org/mozilla ; else true ; fi ;
|
||||
cp -R $(DIST)/classes/org/mozilla/util $(DIST)/../java/build/org/mozilla
|
||||
cp -R $(DIST)/classes/org/mozilla/dom $(DIST)/../java/build/org/mozilla
|
||||
cp -R $(DIST)/classes/org/mozilla/plugins $(DIST)/../java/build/org/mozilla
|
||||
cp -R $(DIST)/classes/org/w3c $(DIST)/../java/build/org
|
||||
cd $(DIST)/../java/build
|
||||
$(JDKHOME)/bin/jar -cvfM0 Pluglet_$(PACKAGE_VER)_$(PACKAGE_OS).jar org
|
||||
cp Pluglet_$(PACKAGE_VER)_$(PACKAGE_OS).jar $(PACKAGE_LIB)/Pluglet_$(PACKAGE_VER)_$(PACKAGE_OS).jar
|
||||
rm -Rf $(DIST)/../java/build/org
|
||||
rm -f $(DIST)/../java/build/Pluglet_$(PACKAGE_VER)_$(PACKAGE_OS).jar
|
||||
cp $(DIST)/bin/libjavadomjni.so $(PACKAGE_LIB)/libjavadomjni.so
|
||||
cp $(DIST)/bin/components/libjavadom.so $(PACKAGE_LIB)/libjavadom.so
|
||||
cp $(DIST)/bin/libplugletjni.so $(PACKAGE_LIB)/libplugletjni.so
|
||||
cp $(DIST)/bin/components/libpluglet.so $(PACKAGE_LIB)/libpluglet.so
|
||||
chmod 775 $(PACKAGE_LIB)/libjavadomjni.so
|
||||
chmod 775 $(PACKAGE_LIB)/libjavadom.so
|
||||
chmod 775 $(PACKAGE_LIB)/libplugletjni.so
|
||||
chmod 775 $(PACKAGE_LIB)/libpluglet.so
|
||||
cp $(DIST)/../java/build/install_pluglet_unix.js $(DIST)/install.js
|
||||
cp $(DIST)/../java/build/symlink.sh $(DIST)/symlink.sh
|
||||
chmod 775 $(DIST)/symlink.sh
|
||||
cp $(DIST)/../java/build/README.PLUGLET $(PACKAGE_DIR)/README.PLUGLET
|
||||
cd $(DIST) ; \
|
||||
zip -r Pluglet_$(PACKAGE_VER)_$(PACKAGE_OS).xpi install.js symlink.sh javadev
|
||||
else
|
||||
ifneq ($(BUILD_WEBCLIENT_ONLY),)
|
||||
if test ! -d $(PACKAGE_DIR) ; then mkdir $(PACKAGE_DIR) ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB) ; then mkdir $(PACKAGE_LIB) ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_EXAMPLE) ; then mkdir $(PACKAGE_EXAMPLE) ; else true ; fi ;
|
||||
if test ! -d $(DIST)/../java/build/org ; then mkdir $(DIST)/../java/build/org ; else true ; fi ;
|
||||
if test ! -d $(DIST)/../java/build/org/mozilla ; then mkdir $(DIST)/../java/build/org/mozilla ; else true ; fi ;
|
||||
cp -R $(DIST)/classes/org/mozilla/util $(DIST)/../java/build/org/mozilla
|
||||
cp -R $(DIST)/classes/org/mozilla/dom $(DIST)/../java/build/org/mozilla
|
||||
cp -R $(DIST)/classes/org/mozilla/webclient $(DIST)/../java/build/org/mozilla
|
||||
cp -R $(DIST)/classes/org/mozilla/xpcom $(DIST)/../java/build/org/mozilla
|
||||
cp -R $(DIST)/classes/org/w3c $(DIST)/../java/build/org
|
||||
cd $(DIST)/../java/build
|
||||
$(JDKHOME)/bin/jar -cvfM0 webclient_$(PACKAGE_VER)_$(PACKAGE_OS).jar org
|
||||
cp webclient_$(PACKAGE_VER)_$(PACKAGE_OS).jar $(PACKAGE_LIB)/webclient_$(PACKAGE_VER)_$(PACKAGE_OS).jar
|
||||
rm -Rf $(DIST)/../java/build/org
|
||||
rm -f $(DIST)/../java/build/webclient_$(PACKAGE_VER)_$(PACKAGE_OS).jar
|
||||
cp $(DIST)/bin/libjavadomjni.so $(PACKAGE_LIB)/libjavadomjni.so
|
||||
cp $(DIST)/bin/components/libjavadom.so $(PACKAGE_LIB)/libjavadom.so
|
||||
cp $(DIST)/bin/libwebclient.so $(PACKAGE_LIB)/libwebclient.so
|
||||
cp $(DIST)/bin/libwebclientstub.so $(PACKAGE_LIB)/libwebclientstub.so
|
||||
cp $(DIST)/lib/libwc_share.so $(PACKAGE_LIB)/libwc_share.so
|
||||
cp $(DIST)/bin/components/libbcorb.so $(PACKAGE_LIB)/libbcorb.so
|
||||
cp $(DIST)/bin/libblackconnectjni.so $(PACKAGE_LIB)/libblackconnectjni.so
|
||||
cp $(DIST)/bin/components/libbcjavastubs.so $(PACKAGE_LIB)/libbcjavastubs.so
|
||||
cp $(DIST)/bin/components/libjavaloader.so $(PACKAGE_LIB)/libjavaloader.so
|
||||
cp $(DIST)/bin/components/libjavaSample.so $(PACKAGE_LIB)/libjavaSample.so
|
||||
cp $(DIST)/bin/components/libbcxpcomstubs.so $(PACKAGE_LIB)/libbcxpcomstubs.so
|
||||
cp $(DIST)/bin/regxpcom $(PACKAGE_LIB)/regxpcom
|
||||
chmod 775 $(PACKAGE_LIB)/libbcorb.so
|
||||
chmod 775 $(PACKAGE_LIB)/libbcjavastubs.so
|
||||
chmod 775 $(PACKAGE_LIB)/libjavaloader.so
|
||||
chmod 775 $(PACKAGE_LIB)/libjavaSample.so
|
||||
chmod 775 $(PACKAGE_LIB)/libbcxpcomstubs.so
|
||||
chmod 775 $(PACKAGE_LIB)/regxpcom
|
||||
chmod 775 $(PACKAGE_LIB)/libjavadomjni.so
|
||||
chmod 775 $(PACKAGE_LIB)/libjavadom.so
|
||||
chmod 775 $(PACKAGE_LIB)/libwebclient.so
|
||||
chmod 775 $(PACKAGE_LIB)/libwebclientstub.so
|
||||
chmod 775 $(PACKAGE_LIB)/libwc_share.so
|
||||
@echo +++ Creating Commercial Package. Use runem.bat to run the test browser.
|
||||
rm -f runem_unix_commercial.bat
|
||||
@echo cp ../lib/libwebclient.so ../.. >> runem_unix_commercial.bat
|
||||
@echo cp ../lib/libwebclientstub.so ../.. >> runem_unix_commercial.bat
|
||||
@echo cp ../lib/libjavadom.so ../../components >> runem_unix_commercial.bat
|
||||
@echo cp ../lib/libjavadomjni.so ../.. >> runem_unix_commercial.bat
|
||||
@echo cp ../lib/libblackconnectjni.so ../.. >> runem_unix_commercial.bat
|
||||
@echo $(SET_CLASSPATH)../lib/webclient_$(PACKAGE_VER)_$(PACKAGE_OS).jar>> runem_unix_commercial.bat
|
||||
@echo $(PERL) ./runem.pl org.mozilla.webclient.test.EmbeddedMozillaImpl $(DEPTH) %1% >> runem_unix_commercial.bat
|
||||
cp -f runem_unix_commercial.bat $(PACKAGE_EXAMPLE)/runem.bat
|
||||
cp -f $(DIST)/../java/webclient/src_share/runem.pl $(PACKAGE_EXAMPLE)/runem.pl
|
||||
chmod 775 $(PACKAGE_EXAMPLE)/runem.bat
|
||||
chmod 775 $(PACKAGE_EXAMPLE)/runem.pl
|
||||
cp $(DIST)/../java/build/install_webclient_unix.js $(DIST)/install.js
|
||||
cp $(DIST)/../java/build/symlink.sh $(DIST)/symlink.sh
|
||||
chmod 775 $(DIST)/symlink.sh
|
||||
cp $(DIST)/../java/build/README.WEBCLIENT $(PACKAGE_DIR)/README.WEBCLIENT
|
||||
cd $(DIST) ; \
|
||||
zip -r webclient_$(PACKAGE_VER)_$(PACKAGE_OS).xpi install.js symlink.sh javadev
|
||||
else
|
||||
ifneq ($(BUILD_BLACKCONNECT_ONLY),)
|
||||
if test ! -d $(PACKAGE_DIR) ; then mkdir $(PACKAGE_DIR) ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB) ; then mkdir $(PACKAGE_LIB) ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_EXAMPLE) ; then mkdir $(PACKAGE_EXAMPLE) ; else true ; fi ;
|
||||
if test ! -d $(DIST)/../java/build/org ; then mkdir $(DIST)/../java/build/org ; else true ; fi ;
|
||||
if test ! -d $(DIST)/../java/build/org/mozilla ; then mkdir $(DIST)/../java/build/org/mozilla ; else true ; fi ;
|
||||
cp -R $(DIST)/classes/org/mozilla/util $(DIST)/../java/build/org/mozilla
|
||||
cp -R $(DIST)/classes/org/mozilla/xpcom $(DIST)/../java/build/org/mozilla
|
||||
cd $(DIST)/../java/build
|
||||
$(JDKHOME)/bin/jar -cvfM0 Blackconnect_$(PACKAGE_VER)_$(PACKAGE_OS).jar org
|
||||
cp Blackconnect_$(PACKAGE_VER)_$(PACKAGE_OS).jar $(PACKAGE_LIB)/Blackconnect_$(PACKAGE_VER)_$(PACKAGE_OS).jar
|
||||
rm -Rf $(DIST)/../java/build/org
|
||||
rm -f $(DIST)/../java/build/Blackconnect_$(PACKAGE_VER)_$(PACKAGE_OS).jar
|
||||
cp $(DIST)/bin/components/libbcorb.so $(PACKAGE_LIB)/libbcorb.so
|
||||
cp $(DIST)/bin/components/libbcjavastubs.so $(PACKAGE_LIB)/libbcjavastubs.so
|
||||
cp $(DIST)/bin/components/libjavaloader.so $(PACKAGE_LIB)/libjavaloader.so
|
||||
cp $(DIST)/bin/components/libjavaSample.so $(PACKAGE_LIB)/libjavaSample.so
|
||||
cp $(DIST)/bin/components/libbcxpcomstubs.so $(PACKAGE_LIB)/libbcxpcomstubs.so
|
||||
cp $(DIST)/bin/regxpcom $(PACKAGE_LIB)/regxpcom
|
||||
chmod 775 $(PACKAGE_LIB)/libbcorb.so
|
||||
chmod 775 $(PACKAGE_LIB)/libbcjavastubs.so
|
||||
chmod 775 $(PACKAGE_LIB)/libjavaloader.so
|
||||
chmod 775 $(PACKAGE_LIB)/libjavaSample.so
|
||||
chmod 775 $(PACKAGE_LIB)/libbcxpcomstubs.so
|
||||
chmod 775 $(PACKAGE_LIB)/regxpcom
|
||||
cp $(DIST)/../java/build/install_blackconnect_unix.js $(DIST)/install.js
|
||||
cp $(DIST)/../java/build/symlink.sh $(DIST)/symlink.sh
|
||||
chmod 775 $(DIST)/symlink.sh
|
||||
cp $(DIST)/../java/build/README.BLACKCONNECT $(PACKAGE_DIR)/README.BLACKCONNECT
|
||||
cd $(DIST) ; \
|
||||
zip -r Blackconnect_$(PACKAGE_VER)_$(PACKAGE_OS).xpi install.js symlink.sh javadev
|
||||
else
|
||||
ifneq ($(BUILD_BLACKWOOD),)
|
||||
if test ! -d $(PACKAGE_DIR) ; then mkdir $(PACKAGE_DIR) ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_LIB) ; then mkdir $(PACKAGE_LIB) ; else true ; fi ;
|
||||
if test ! -d $(PACKAGE_EXAMPLE) ; then mkdir $(PACKAGE_EXAMPLE) ; else true ; fi ;
|
||||
if test ! -d $(DIST)/../java/build/org ; then mkdir $(DIST)/../java/build/org ; else true ; fi ;
|
||||
if test ! -d $(DIST)/../java/build/org/mozilla ; then mkdir $(DIST)/../java/build/org/mozilla ; else true ; fi ;
|
||||
cp -R $(DIST)/classes/org/mozilla $(DIST)/../java/build/org
|
||||
cp -R $(DIST)/classes/org/w3c $(DIST)/../java/build/org
|
||||
cd $(DIST)/../java/build
|
||||
$(JDKHOME)/bin/jar -cvfM0 Blackwood_$(PACKAGE_VER)_$(PACKAGE_OS).jar org
|
||||
cp Blackwood_$(PACKAGE_VER)_$(PACKAGE_OS).jar $(PACKAGE_LIB)/Blackwood_$(PACKAGE_VER)_$(PACKAGE_OS).jar
|
||||
rm -Rf $(DIST)/../java/build/org
|
||||
rm -f $(DIST)/../java/build/Blackwood_$(PACKAGE_VER)_$(PACKAGE_OS).jar
|
||||
cp $(DIST)/bin/libjavadomjni.so $(PACKAGE_LIB)/libjavadomjni.so
|
||||
cp $(DIST)/bin/components/libjavadom.so $(PACKAGE_LIB)/libjavadom.so
|
||||
cp $(DIST)/bin/libplugletjni.so $(PACKAGE_LIB)/libplugletjni.so
|
||||
cp $(DIST)/bin/components/libpluglet.so $(PACKAGE_LIB)/libpluglet.so
|
||||
cp $(DIST)/bin/libwebclient.so $(PACKAGE_LIB)/libwebclient.so
|
||||
cp $(DIST)/bin/libwebclientstub.so $(PACKAGE_LIB)/libwebclientstub.so
|
||||
cp $(DIST)/lib/libwc_share.so $(PACKAGE_LIB)/libwc_share.so
|
||||
cp $(DIST)/bin/components/libbcorb.so $(PACKAGE_LIB)/libbcorb.so
|
||||
cp $(DIST)/bin/components/libbcjavastubs.so $(PACKAGE_LIB)/libbcjavastubs.so
|
||||
cp $(DIST)/bin/components/libjavaloader.so $(PACKAGE_LIB)/libjavaloader.so
|
||||
cp $(DIST)/bin/components/libjavaSample.so $(PACKAGE_LIB)/libjavaSample.so
|
||||
cp $(DIST)/bin/components/libbcxpcomstubs.so $(PACKAGE_LIB)/libbcxpcomstubs.so
|
||||
cp $(DIST)/bin/regxpcom $(PACKAGE_LIB)/regxpcom
|
||||
chmod 775 $(PACKAGE_LIB)/libjavadomjni.so
|
||||
chmod 775 $(PACKAGE_LIB)/libjavadom.so
|
||||
chmod 775 $(PACKAGE_LIB)/libplugletjni.so
|
||||
chmod 775 $(PACKAGE_LIB)/libpluglet.so
|
||||
chmod 775 $(PACKAGE_LIB)/libwebclient.so
|
||||
chmod 775 $(PACKAGE_LIB)/libwebclientstub.so
|
||||
chmod 775 $(PACKAGE_LIB)/libwc_share.so
|
||||
chmod 775 $(PACKAGE_LIB)/libbcorb.so
|
||||
chmod 775 $(PACKAGE_LIB)/libbcjavastubs.so
|
||||
chmod 775 $(PACKAGE_LIB)/libjavaloader.so
|
||||
chmod 775 $(PACKAGE_LIB)/libjavaSample.so
|
||||
chmod 775 $(PACKAGE_LIB)/libbcxpcomstubs.so
|
||||
chmod 775 $(PACKAGE_LIB)/regxpcom
|
||||
@echo +++ Creating Commercial Package. Use runem.bat to run the test browser.
|
||||
rm -f runem_unix_commercial.bat
|
||||
@echo cp ../lib/libwebclient.so ../.. >> runem_unix_commercial.bat
|
||||
@echo cp ../lib/libwebclientstub.so ../.. >> runem_unix_commercial.bat
|
||||
@echo cp ../lib/libjavadom.so ../../components >> runem_unix_commercial.bat
|
||||
@echo cp ../lib/libjavadomjni.so ../.. >> runem_unix_commercial.bat
|
||||
@echo cp ../lib/libplugletjni.so ../.. >> runem_unix_commercial.bat
|
||||
@echo cp ../lib/libpluglet.so ../../components >> runem_unix_commercial.bat
|
||||
@echo $(SET_CLASSPATH)../lib/Blackwood_$(PACKAGE_VER)_$(PACKAGE_OS).jar>> runem_unix_commercial.bat
|
||||
@echo $(PERL) ./runem.pl org.mozilla.webclient.test.EmbeddedMozillaImpl $(DEPTH) %1% >> runem_unix_commercial.bat
|
||||
cp -f runem_unix_commercial.bat $(PACKAGE_EXAMPLE)/runem.bat
|
||||
cp -f $(DIST)/../java/webclient/src_share/runem.pl $(PACKAGE_EXAMPLE)/runem.pl
|
||||
chmod 775 $(PACKAGE_EXAMPLE)/runem.bat
|
||||
chmod 775 $(PACKAGE_EXAMPLE)/runem.pl
|
||||
cp $(DIST)/../java/build/install_blackwood_unix.js $(DIST)/install.js
|
||||
cp $(DIST)/../java/build/symlink.sh $(DIST)/symlink.sh
|
||||
chmod 775 $(DIST)/symlink.sh
|
||||
cp $(DIST)/../java/build/README.BLACKWOOD $(PACKAGE_DIR)/README.BLACKWOOD
|
||||
cd $(DIST) ; \
|
||||
zip -r Blackwood_$(PACKAGE_VER)_$(PACKAGE_OS).xpi install.js symlink.sh javadev
|
||||
endif #BLACKWOOD
|
||||
endif #BLACKCONNECT
|
||||
endif #WEBCLIENT
|
||||
endif #PLUGLETS
|
||||
endif #DOM
|
||||
|
||||
|
||||
|
||||
install::buildRunems
|
||||
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)/*.zip
|
||||
rm -f $(DIST)/*.js
|
||||
rm -rf $(DIST)/javadev
|
||||
rm -f $(DIST)/symlink.sh
|
||||
|
||||
|
||||
clobber_all::clobber
|
||||
|
||||
|
||||
clean::clobber
|
||||
241
mozilla/java/build/Makefile.win
Normal file
241
mozilla/java/build/Makefile.win
Normal file
@@ -0,0 +1,241 @@
|
||||
#!nmake
|
||||
#
|
||||
# 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):
|
||||
|
||||
DEPTH = ..\..
|
||||
IGNORE_MANIFEST = 1
|
||||
|
||||
JAVAHOME = $(JDKHOME)
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
PACKAGE_DIR = $(DEPTH)\dist\javadev
|
||||
PACKAGE_LIB = $(PACKAGE_DIR)\lib
|
||||
PACKAGE_EXAMPLE = $(PACKAGE_DIR)\example
|
||||
|
||||
!ifndef PACKAGE_VER
|
||||
PACKAGE_VER = 1_1
|
||||
!endif
|
||||
|
||||
|
||||
buildRunems:
|
||||
!ifdef BUILD_DOM_ONLY
|
||||
-mkdir $(PACKAGE_DIR)
|
||||
-mkdir $(PACKAGE_LIB)
|
||||
-mkdir $(PACKAGE_EXAMPLE)
|
||||
-mkdir $(DIST)\..\java\build\org
|
||||
-mkdir $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E $(DIST)\..\classes\org\mozilla\dom $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E $(DIST)\..\classes\org\mozilla\util $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E $(DIST)\..\classes\org\w3c $(DIST)\..\java\build\org
|
||||
cd $(DIST)\..\java\build
|
||||
jar -cvfM0 JavaDOM_$(PACKAGE_VER)_win32.jar org
|
||||
copy JavaDOM_$(PACKAGE_VER)_win32.jar ..\..\javadev\lib\JavaDOM_$(PACKAGE_VER)_win32.jar
|
||||
cd ..\..\..\java\build
|
||||
rmdir /S/Q $(DIST)\..\java\build\org
|
||||
del /Q $(DIST)\..\java\build\JavaDOM_$(PACKAGE_VER)_win32.jar
|
||||
copy $(DIST)\bin\javadomjni.dll $(PACKAGE_LIB)\javadomjni.dll
|
||||
copy $(DIST)\bin\components\javadom.dll $(PACKAGE_LIB)\javadom.dll
|
||||
chmod 775 $(PACKAGE_LIB)\javadomjni.dll
|
||||
chmod 775 $(PACKAGE_LIB)\javadom.dll
|
||||
copy install_dom_win32.js $(DIST)\..\install.js
|
||||
copy README.DOM $(PACKAGE_DIR)\README.DOM
|
||||
cd $(DIST)\..
|
||||
zip -r JavaDOM_$(PACKAGE_VER)_win32.xpi install.js javadev
|
||||
cd ..\java\build
|
||||
!else
|
||||
!ifdef BUILD_PLUGLETS_ONLY
|
||||
-mkdir $(PACKAGE_DIR)
|
||||
-mkdir $(PACKAGE_LIB)
|
||||
-mkdir $(PACKAGE_EXAMPLE)
|
||||
-mkdir $(DIST)\..\java\build\org
|
||||
-mkdir $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E $(DIST)\..\classes\org\mozilla\util $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E $(DIST)\..\classes\org\mozilla\dom $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E $(DIST)\..\classes\org\mozilla\plugins $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E $(DIST)\..\classes\org\w3c $(DIST)\..\java\build\org
|
||||
cd $(DIST)\..\java\build
|
||||
jar -cvfM0 Pluglet_$(PACKAGE_VER)_win32.jar org
|
||||
copy Pluglet_$(PACKAGE_VER)_win32.jar ..\..\javadev\lib\Pluglet_$(PACKAGE_VER)_win32.jar
|
||||
cd ..\..\..\java\build
|
||||
rmdir /S/Q $(DIST)\..\java\build\org
|
||||
del /Q $(DIST)\..\java\build\Pluglet_$(PACKAGE_VER)_win32.jar
|
||||
copy $(DIST)\bin\javadomjni.dll $(PACKAGE_LIB)\javadomjni.dll
|
||||
copy $(DIST)\bin\components\javadom.dll $(PACKAGE_LIB)\javadom.dll
|
||||
copy $(DIST)\bin\plugletjni.dll $(PACKAGE_LIB)\plugletjni.dll
|
||||
copy $(DIST)\bin\components\pluglet.dll $(PACKAGE_LIB)\pluglet.dll
|
||||
chmod 775 $(PACKAGE_LIB)\javadomjni.dll
|
||||
chmod 775 $(PACKAGE_LIB)\javadom.dll
|
||||
chmod 775 $(PACKAGE_LIB)\plugletjni.dll
|
||||
chmod 775 $(PACKAGE_LIB)\pluglet.dll
|
||||
copy install_pluglet_win32.js $(DIST)\..\install.js
|
||||
copy README.PLUGLET $(PACKAGE_DIR)\README.PLUGLET
|
||||
cd $(DIST)\..
|
||||
zip -r Pluglet_$(PACKAGE_VER)_win32.xpi install.js javadev
|
||||
cd ..\java\build
|
||||
!else
|
||||
!ifdef BUILD_WEBCLIENT_ONLY
|
||||
-mkdir $(PACKAGE_DIR)
|
||||
-mkdir $(PACKAGE_LIB)
|
||||
-mkdir $(PACKAGE_EXAMPLE)
|
||||
-mkdir $(DIST)\..\java\build\org
|
||||
-mkdir $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E /I $(DIST)\..\classes\org\mozilla\util\*.* $(DIST)\..\java\build\org\mozilla\util
|
||||
xcopy /E /I $(DIST)\..\classes\org\mozilla\dom\*.* $(DIST)\..\java\build\org\mozilla\dom
|
||||
xcopy /E /I $(DIST)\..\classes\org\mozilla\webclient\*.* $(DIST)\..\java\build\org\mozilla\webclient
|
||||
xcopy /E /I $(DIST)\..\classes\org\mozilla\xpcom\*.* $(DIST)\..\java\build\org\mozilla\xpcom
|
||||
xcopy /E /I $(DIST)\..\classes\org\w3c\*.* $(DIST)\..\java\build\org\w3c
|
||||
cd $(DIST)\..\java\build
|
||||
jar -cvfM0 webclient_$(PACKAGE_VER)_win32.jar org
|
||||
copy webclient_$(PACKAGE_VER)_win32.jar ..\..\javadev\lib\webclient_$(PACKAGE_VER)_win32.jar
|
||||
cd ..\..\..\java\build
|
||||
rmdir /S/Q $(DIST)\..\java\build\org
|
||||
del /Q $(DIST)\..\java\build\webclient_$(PACKAGE_VER)_win32.jar
|
||||
copy $(DIST)\bin\javadomjni.dll $(PACKAGE_LIB)\javadomjni.dll
|
||||
copy $(DIST)\bin\components\javadom.dll $(PACKAGE_LIB)\javadom.dll
|
||||
copy $(DIST)\bin\webclient.dll $(PACKAGE_LIB)\webclient.dll
|
||||
copy $(DIST)\lib\wc_share.lib $(PACKAGE_LIB)\wc_share.lib
|
||||
copy $(DIST)\bin\components\bcorb.dll $(PACKAGE_LIB)\bcorb.dll
|
||||
copy $(DIST)\bin\blackconnectjni.dll $(PACKAGE_LIB)\blackconnectjni.dll
|
||||
copy $(DIST)\bin\components\bcjavastubs.dll $(PACKAGE_LIB)\bcjavastubs.dll
|
||||
copy $(DIST)\bin\components\bcjavaloader.dll $(PACKAGE_LIB)\bcjavaloader.dll
|
||||
copy $(DIST)\bin\components\bcxpcomstubs.dll $(PACKAGE_LIB)\bcxpcomstubs.dll
|
||||
copy $(DIST)\bin\regxpcom.exe $(PACKAGE_LIB)\regxpcom.exe
|
||||
chmod 775 $(PACKAGE_LIB)\bcorb.dll
|
||||
chmod 775 $(PACKAGE_LIB)\bcjavastubs.dll
|
||||
chmod 775 $(PACKAGE_LIB)\bcjavaloader.dll
|
||||
chmod 775 $(PACKAGE_LIB)\bcxpcomstubs.dll
|
||||
chmod 775 $(PACKAGE_LIB)\regxpcom.exe
|
||||
chmod 775 $(PACKAGE_LIB)\javadomjni.dll
|
||||
chmod 775 $(PACKAGE_LIB)\javadom.dll
|
||||
chmod 775 $(PACKAGE_LIB)\webclient.dll
|
||||
chmod 775 $(PACKAGE_LIB)\wc_share.lib
|
||||
@echo +++ Creating Commercial Package. Use runem.bat to run the test browser.
|
||||
rm -f runem_win_commercial.bat
|
||||
@echo set CLASSPATH="..\lib\webclient_$(PACKAGE_VER)_win32.jar"> runem_win_commercial.bat
|
||||
@echo $(PERL) .\runem.pl org.mozilla.webclient.test.EmbeddedMozillaImpl $(DEPTH) %1% >> runem_win_commercial.bat
|
||||
copy runem_win_commercial.bat $(PACKAGE_EXAMPLE)\runem.bat
|
||||
copy $(DIST)\..\..\java\webclient\src_share\runem.pl $(PACKAGE_EXAMPLE)\runem.pl
|
||||
chmod 775 $(PACKAGE_EXAMPLE)\runem.bat
|
||||
chmod 775 $(PACKAGE_EXAMPLE)\runem.pl
|
||||
copy install_webclient_win32.js $(DIST)\..\install.js
|
||||
copy README.WEBCLIENT $(PACKAGE_DIR)\README.WEBCLIENT
|
||||
cd $(DIST)\..
|
||||
zip -r webclient_$(PACKAGE_VER)_win32.xpi install.js javadev
|
||||
cd ..\java\build
|
||||
!else
|
||||
!ifdef BUILD_BLACKCONNECT_ONLY
|
||||
-mkdir $(PACKAGE_DIR)
|
||||
-mkdir $(PACKAGE_LIB)
|
||||
-mkdir $(PACKAGE_EXAMPLE)
|
||||
-mkdir $(DIST)\..\java\build\org
|
||||
-mkdir $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E $(DIST)\..\classes\org\mozilla\util $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E $(DIST)\..\classes\org\mozilla\xpcom $(DIST)\..\java\build\org\mozilla
|
||||
cd $(DIST)\..\java\build
|
||||
jar -cvfM0 Blackconnect_$(PACKAGE_VER)_win32.jar org
|
||||
copy Blackconnect_$(PACKAGE_VER)_win32.jar ..\..\javadev\lib\Blackconnect_$(PACKAGE_VER)_win32.jar
|
||||
cd ..\..\..\java\build
|
||||
rmdir /S/Q $(DIST)\..\java\build\org
|
||||
del /Q $(DIST)\..\java\build\Blackconnect_$(PACKAGE_VER)_win32.jar
|
||||
copy $(DIST)\bin\components\bcorb.dll $(PACKAGE_LIB)\bcorb.dll
|
||||
copy $(DIST)\bin\components\bcjavastubs.dll $(PACKAGE_LIB)\bcjavastubs.dll
|
||||
copy $(DIST)\bin\components\bcjavaloader.dll $(PACKAGE_LIB)\bcjavaloader.dll
|
||||
copy $(DIST)\bin\components\bcxpcomstubs.dll $(PACKAGE_LIB)\bcxpcomstubs.dll
|
||||
copy $(DIST)\bin\regxpcom.exe $(PACKAGE_LIB)\regxpcom.exe
|
||||
chmod 775 $(PACKAGE_LIB)\bcorb.dll
|
||||
chmod 775 $(PACKAGE_LIB)\bcjavastubs.dll
|
||||
chmod 775 $(PACKAGE_LIB)\bcjavaloader.dll
|
||||
chmod 775 $(PACKAGE_LIB)\bcxpcomstubs.dll
|
||||
chmod 775 $(PACKAGE_LIB)\regxpcom.exe
|
||||
copy install_blackconnect_win32.js $(DIST)\..\install.js
|
||||
copy README.BLACKCONNECT $(PACKAGE_DIR)\README.BLACKCONNECT
|
||||
cd $(DIST)\..
|
||||
zip -r Blackconnect_$(PACKAGE_VER)_win32.xpi install.js javadev
|
||||
cd ..\java\build
|
||||
!else
|
||||
!ifdef BUILD_BLACKWOOD
|
||||
-mkdir $(PACKAGE_DIR)
|
||||
-mkdir $(PACKAGE_LIB)
|
||||
-mkdir $(PACKAGE_EXAMPLE)
|
||||
-mkdir $(DIST)\..\java\build\org
|
||||
-mkdir $(DIST)\..\java\build\org\mozilla
|
||||
xcopy /E $(DIST)\..\classes\org\mozilla\* $(DIST)\..\java\build\org
|
||||
xcopy /E $(DIST)\..\classes\org\w3c $(DIST)\..\java\build\org
|
||||
cd $(DIST)\..\java\build
|
||||
jar -cvfM0 Blackwood_$(PACKAGE_VER)_win32.jar org
|
||||
copy Blackwood_$(PACKAGE_VER)_win32.jar ..\..\javadev\lib\Blackwood_$(PACKAGE_VER)_win32.jar
|
||||
cd ..\..\..\java\build
|
||||
rmdir /S/Q $(DIST)\..\java\build\org
|
||||
del /Q $(DIST)\..\java\build\Blackwood_$(PACKAGE_VER)_win32.jar
|
||||
copy $(DIST)\bin\javadomjni.dll $(PACKAGE_LIB)\javadomjni.dll
|
||||
copy $(DIST)\bin\components\javadom.dll $(PACKAGE_LIB)\javadom.dll
|
||||
copy $(DIST)\bin\plugletjni.dll $(PACKAGE_LIB)\plugletjni.dll
|
||||
copy $(DIST)\bin\components\pluglet.dll $(PACKAGE_LIB)\pluglet.dll
|
||||
copy $(DIST)\bin\webclient.dll $(PACKAGE_LIB)\webclient.dll
|
||||
copy $(DIST)\lib\wc_share.lib $(PACKAGE_LIB)\wc_share.lib
|
||||
copy $(DIST)\bin\components\bcorb.dll $(PACKAGE_LIB)\bcorb.dll
|
||||
copy $(DIST)\bin\components\bcjavastubs.dll $(PACKAGE_LIB)\bcjavastubs.dll
|
||||
copy $(DIST)\bin\components\bcjavaloader.dll $(PACKAGE_LIB)\bcjavaloader.dll
|
||||
copy $(DIST)\bin\components\bcxpcomstubs.dll $(PACKAGE_LIB)\bcxpcomstubs.dll
|
||||
copy $(DIST)\bin\regxpcom.exe $(PACKAGE_LIB)\regxpcom.exe
|
||||
chmod 775 $(PACKAGE_LIB)\javadomjni.dll
|
||||
chmod 775 $(PACKAGE_LIB)\javadom.dll
|
||||
chmod 775 $(PACKAGE_LIB)\plugletjni.dll
|
||||
chmod 775 $(PACKAGE_LIB)\pluglet.dll
|
||||
chmod 775 $(PACKAGE_LIB)\webclient.dll
|
||||
chmod 775 $(PACKAGE_LIB)\wc_share.lib
|
||||
chmod 775 $(PACKAGE_LIB)\bcorb.dll
|
||||
chmod 775 $(PACKAGE_LIB)\bcjavastubs.dll
|
||||
chmod 775 $(PACKAGE_LIB)\bcjavaloader.dll
|
||||
chmod 775 $(PACKAGE_LIB)\bcxpcomstubs.dll
|
||||
chmod 775 $(PACKAGE_LIB)\regxpcom.exe
|
||||
@echo +++ Creating Commercial Package. Use runem.bat to run the test browser.
|
||||
del /Q runem_win_commercial.bat
|
||||
@echo set CLASSPATH=..\lib\Blackwood_$(PACKAGE_VER)_win32.jar > runem_win_commercial.bat
|
||||
@echo $(PERL) .\runem.pl org.mozilla.webclient.test.EmbeddedMozilla $(DEPTH) %1% >> runem_win_commercial.bat
|
||||
copy runem_win_commercial.bat $(PACKAGE_EXAMPLE)\runem.bat
|
||||
copy $(DIST)\..\..\java\webclient\src_share\runem.pl $(PACKAGE_EXAMPLE)\runem.pl
|
||||
chmod 775 $(PACKAGE_EXAMPLE)\runem.bat
|
||||
chmod 775 $(PACKAGE_EXAMPLE)\runem.pl
|
||||
copy install_blackwood_win32.js $(DIST)\..\install.js
|
||||
copy README.BLACKWOOD $(PACKAGE_DIR)\README.BLACKWOOD
|
||||
cd $(DIST)\..
|
||||
zip -r Blackwood_$(PACKAGE_VER)_win32.xpi install.js javadev
|
||||
cd ..\java\build
|
||||
!endif #BLACKWOOD
|
||||
!endif #BLACKCONNECT
|
||||
!endif #WEBCLIENT
|
||||
!endif #PLUGLETS
|
||||
!endif #DOM
|
||||
|
||||
|
||||
install::buildRunems
|
||||
|
||||
|
||||
clobber::
|
||||
rm -rf $(DIST)\..\*.xpi
|
||||
rm -rf $(DIST)\..\javadev
|
||||
rm -rf $(DIST)\..\java
|
||||
|
||||
|
||||
clobber_all::clobber
|
||||
|
||||
|
||||
clean::clobber
|
||||
78
mozilla/java/build/README.BLACKCONNECT
Normal file
78
mozilla/java/build/README.BLACKCONNECT
Normal file
@@ -0,0 +1,78 @@
|
||||
Black Connect
|
||||
================================
|
||||
|
||||
This directory contains the Black Connect
|
||||
|
||||
The sources is divided into three directories
|
||||
|
||||
connect
|
||||
public headers.
|
||||
ORB implementation.
|
||||
|
||||
xpcom
|
||||
XPCOM stubs and proxy implementation
|
||||
|
||||
java
|
||||
JAVA stubs and proxy implementation
|
||||
Java component loader
|
||||
|
||||
===============================================
|
||||
Solaris directions
|
||||
===============================================
|
||||
|
||||
Requirements:
|
||||
|
||||
* current mozilla built tree
|
||||
|
||||
* JDK1.3
|
||||
|
||||
* Perl 5 must be in your path
|
||||
|
||||
How To Build:
|
||||
|
||||
* make sure the environment var JDKHOME is set to your jdk installation
|
||||
directory, ie export JDKHOME=/usr/local/jdk1.3
|
||||
|
||||
* Add following directories to to your LD_LIBRARY_PATH:
|
||||
|
||||
|
||||
$MOZILLA_FIVE_HOME:$JDKHOME/jre/lib/$HOSTTYPE/native_threads:$JDKHOME/jre/lib/$HOSTTYPE/classic:
|
||||
$JDKHOME/jre/lib/$HOSTTYPE/:
|
||||
|
||||
* type "gmake"
|
||||
|
||||
|
||||
==============================================
|
||||
Linux directions
|
||||
===============================================
|
||||
|
||||
Requirements:
|
||||
|
||||
* mozilla m16 build tree
|
||||
|
||||
* JDK1.3 from IBM
|
||||
|
||||
* Perl 5 must be in your path
|
||||
|
||||
How To Build:
|
||||
|
||||
* make sure the environment var JDKHOME is set to your jdk installation
|
||||
directory, ie export JDKHOME=/usr/local/jdk1.3
|
||||
|
||||
* Add following directories to to your LD_LIBRARY_PATH:
|
||||
|
||||
$MOZILLA_FIVE_HOME:$JDKHOME/jre/bin:$JDKHOME/jre/bin/classic:
|
||||
|
||||
* remove jni* jri* from MOZILLA_FIVE_HOME/dist/include
|
||||
|
||||
* type "gmake"
|
||||
|
||||
==============================================
|
||||
How to run test java component
|
||||
===============================================
|
||||
* cd java/test
|
||||
* gmake
|
||||
* add $MOZILLA_FIVE_HOME/dist/classes to your CLASSPATH
|
||||
Test component would be placed in dist/bin/componets and loaded on mozilla
|
||||
sturtup (or you can use regxpcom for testing)
|
||||
|
||||
95
mozilla/java/build/README.BLACKWOOD
Normal file
95
mozilla/java/build/README.BLACKWOOD
Normal file
@@ -0,0 +1,95 @@
|
||||
Here lies the MozWebShell java wrapper to mozilla M8.
|
||||
|
||||
Authors: Kirk Baker <kbaker@eb.com>
|
||||
Ian Wilkinson <iw@ennoble.co>
|
||||
|
||||
Build hacking and packaging: Ed Burns <edburns@acm.org>
|
||||
|
||||
Unix port: Mark Lin <mark.lin@eng.sun.com>
|
||||
|
||||
========================================================================
|
||||
Win32 Build Directions:
|
||||
========================================================================
|
||||
Requirements:
|
||||
|
||||
* built mozilla with source code from after 10/5/99
|
||||
|
||||
* JDK1.1.7 or greater
|
||||
|
||||
* built org.mozilla.util java classes (see NOTE_UTIL)
|
||||
|
||||
* Perl 5 perl.exe must be in your path
|
||||
|
||||
How To Build:
|
||||
|
||||
* Follow the directions in ..\README
|
||||
|
||||
* type "nmake /f makefile.win all" and hope for the best
|
||||
|
||||
How to Run:
|
||||
|
||||
* once the build has successfully completed, run this batch file:
|
||||
|
||||
.\src\WIN32_D.OBJ\runem.bat <opt: YOUR_URL>
|
||||
|
||||
Note that YOUR_URL is probably necessary since firewall support wasn't
|
||||
working in M8.
|
||||
|
||||
|
||||
Problems:
|
||||
|
||||
* clobber_all doesn't remove the .class files from dist\classes. You
|
||||
have to do this manually.
|
||||
|
||||
* post to netscape.public.mozilla.java newsgroup
|
||||
|
||||
========================================================================
|
||||
Unix Build Directions (currently only Linux,
|
||||
Solaris support is coming soon):
|
||||
========================================================================
|
||||
Requirements:
|
||||
|
||||
* built mozilla tree for some variant of Linux
|
||||
|
||||
* JDK1.2 with native threads support from http://www.blackdown.org
|
||||
(JDK1.1 doesn't seem to work)
|
||||
|
||||
* built org.mozilla.util java classes (see NOTE_UTIL)
|
||||
|
||||
How To Build:
|
||||
|
||||
* Follow the directions in ../util/README
|
||||
|
||||
* set JDKHOME to where your JDK install directory resides
|
||||
-> setenv JDKHOME /usr/local/jdk1.2
|
||||
|
||||
* cd to 'classes' and type "make -f makefile.unix" and hope for the best
|
||||
-> cd classes; make -f Makefile.unix
|
||||
|
||||
* then cd to 'src' and type "make -f makefile.unix" and hope for the best
|
||||
-> cd src; make -f Makefile.unix
|
||||
|
||||
How to Run:
|
||||
|
||||
* once the build has successfully completed, run 'runem.unix' in your
|
||||
'src' directory:
|
||||
-> cd src; ./runem.unix <YOUR_URL>
|
||||
|
||||
Note that YOUR_URL is probably necessary since firewall support wasn't
|
||||
working in M8.
|
||||
|
||||
Problems? Email mark.lin@eng.sun.com or post to netscape.public.mozilla.java.
|
||||
|
||||
========================================================================
|
||||
NOTE_UTIL:
|
||||
========================================================================
|
||||
* this package depends on the org.mozilla.util classes, which can be
|
||||
found in the mozilla tree under mozilla\java\util. They are a
|
||||
separate checkout and build. Once you check out the org.mozilla.util
|
||||
classes, see the README in the mozilla\java\util\README.
|
||||
|
||||
General notes:
|
||||
|
||||
* Please update the ChangeLog (changelo) when you make changes.
|
||||
|
||||
|
||||
153
mozilla/java/build/README.DOM
Normal file
153
mozilla/java/build/README.DOM
Normal file
@@ -0,0 +1,153 @@
|
||||
|
||||
Sources
|
||||
=======
|
||||
|
||||
The sources are located in mozilla/java/dom.
|
||||
Subdirectories
|
||||
|
||||
classes
|
||||
jni
|
||||
src
|
||||
tests
|
||||
|
||||
contain Java sources, Java native methods implementation,
|
||||
native c++ code and Java DOM API tests respectively.
|
||||
|
||||
Note:
|
||||
Sources that work with mozilla PR1 and earlier
|
||||
versions should be checked out using DOM_PR1 tag.
|
||||
|
||||
No tags are needed for the sources that work with
|
||||
the latest mozilla tree.
|
||||
|
||||
Building
|
||||
========
|
||||
|
||||
Requirenments:
|
||||
--------------
|
||||
Current mozilla build
|
||||
JDK1.2 or JDK1.3
|
||||
Perl 5 must be in your path
|
||||
JDKHOME environment variable set to your JDK dir
|
||||
CLASSPATH environment cvariable set to contain
|
||||
org.w3c.dom classes. The sources can be found at
|
||||
http://www.w3.org/TR/2000/CR-DOM-Level-2-20000307/java-binding.html
|
||||
(for mozilla PR1 and earlie versions)
|
||||
http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/java-binding.html
|
||||
(for the latest mozilla)
|
||||
|
||||
Solaris specific
|
||||
----------------
|
||||
Add following directories to LD_LIBRARY_PATH environment variable:
|
||||
$MOZILLA_FIVE_HOME
|
||||
$JDKHOME/jre/lib/$HOSTTYPE/native_threads
|
||||
$JDKHOME/jre/lib/$HOSTTYPE/classic
|
||||
$JDKHOME/jre/lib/$HOSTTYPE/
|
||||
|
||||
goto mozilla/java/dom directory and type "gmake"
|
||||
|
||||
|
||||
Windows NT specific
|
||||
-------------------
|
||||
To enable OJI usage set environment variable JAVA_DOM_OJI_ENABLE=1
|
||||
Add following directories to PATH environment variable:
|
||||
%MOZILLA_FIVE_HOME%
|
||||
%JDKHOME%\jre\bin\classic (only in case you don't use OJI)
|
||||
|
||||
goto mozilla/java/dom directory and type "nmake /f makefile.win"
|
||||
|
||||
|
||||
Using the Java DOM API
|
||||
======================
|
||||
|
||||
A Java component obtains a org.w3c.dom.Document by registering for
|
||||
Document load notifications. The Document is passed in along with the
|
||||
notifications. The preferred way for a Java component to register for
|
||||
Document load notifications is to register via the DOMAccessor class.
|
||||
|
||||
However, this is possible only if OJI usage is enabled. This works
|
||||
on Windows NT platform.
|
||||
|
||||
On Solaris currently the nsJavaDOM component instantiates its own JVM.
|
||||
When an OJI-compatible JVM is available, we will move over to using it.
|
||||
So, one has to apply two patches to
|
||||
|
||||
mozilla/webshell/src/nsWebShell.cpp
|
||||
mozilla/java/dom/classes/org/mozilla/dom/DOMAccessor.java
|
||||
|
||||
They can be found at mozilla/java/dom directory.
|
||||
The first one inits nsJavaDOM component and adds it as a
|
||||
document load observer listener.
|
||||
|
||||
The second one registers a document load listener via DOMAccessor.
|
||||
Note:
|
||||
any class that implements the DocumentLoadListener interface may
|
||||
stand for GenericDocLoadListener.
|
||||
|
||||
After applying a patch to nsWebShell.cpp edit
|
||||
mozilla/webshell/src/Makefile.in to add -DJAVA_DOM to the list of
|
||||
defines. Then do a gmake in this directory.
|
||||
|
||||
After applying a patch to DOMAccessor.java go to mozilla/java/dom/classes
|
||||
and do a gmake. No changes in makefiles are needed.
|
||||
|
||||
You can find examples of Java DOM API usage in
|
||||
|
||||
mozilla/java/dom/classes/org/mozilla/dom/util
|
||||
mozilla/java/dom/tests/src/applets
|
||||
|
||||
|
||||
DOM2 events
|
||||
------------
|
||||
|
||||
At the moment all DOM2 event-related interfaces are present
|
||||
however they are not fully implemented yet
|
||||
because Mozilla's core DOM does not support DOM2 events fully.
|
||||
Consequences:
|
||||
- some methods throws OperationUnsupportedException()
|
||||
|
||||
The basic implementation architecture is following:
|
||||
- NodeImpl is extended to support EventTarget interface
|
||||
- for every addEventListener call special NativeDOMProxyListener object is
|
||||
created and is registered with Mozilla's DOM
|
||||
It's task is to propagate event notifications from Mozilla's DOM
|
||||
to target Java EventListener
|
||||
- In order to sucessfully unregister EventListeners we need to
|
||||
save association between java EventListener and corresponding
|
||||
NativeDOMProxyListener object. This is done by storing such
|
||||
associations Vector at NodeImpl
|
||||
- javaDOMEventsGlobals class is used much like javaDOMGlobals for caching
|
||||
(this code may be moved to javaDOMGlobals)
|
||||
|
||||
NSPR Logging
|
||||
------------
|
||||
|
||||
The NSPR Log module name is javadom. For instructions on how to enable
|
||||
logging, see dist/include/prlog.h
|
||||
|
||||
|
||||
Debug output
|
||||
------------
|
||||
|
||||
The debug build of the Java DOM API creates the JVM with the verbose
|
||||
and the verboseGC options turned on, to help in debugging. It also
|
||||
creates two files in the current working directory, dom-java.txt and
|
||||
dom-cpp.txt, which are simple dumps of the DOM, as printed from C++
|
||||
and from Java. The two should be identical. The code to write these
|
||||
files is, essentially, my regression test. Feel free to add to it.
|
||||
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
Currently tested on Solaris 7 only with Java 2 SDK 1.2.1. egcs-2.91.66,
|
||||
Sun Workshop C++ 4.2 and 5.0 have been know to compile this code
|
||||
fine. gcc-2.8.1 does *not* work. I have not used anything
|
||||
Java2-specific, and it works with JDK1.1.x too (I have been using JDK
|
||||
1.1.6 too).
|
||||
|
||||
|
||||
References
|
||||
----------
|
||||
|
||||
I highly recommend reading Sheng Liang's new JNI book.
|
||||
105
mozilla/java/build/README.PLUGLET
Normal file
105
mozilla/java/build/README.PLUGLET
Normal file
@@ -0,0 +1,105 @@
|
||||
Java-Implemented Plug-ins.
|
||||
================================
|
||||
http://www.mozilla.org/projects/blackwood/java-plugins/
|
||||
--------------------------------
|
||||
This directory contains the beginnings of the Java-Implemented plug-uns.
|
||||
|
||||
The sources is divided into four directories
|
||||
|
||||
classes
|
||||
Java source files
|
||||
src
|
||||
Native code (c++/c)
|
||||
jni
|
||||
Implamentations of java native methods
|
||||
test
|
||||
Test code, including simple pluglet.
|
||||
|
||||
========================================================================
|
||||
Win32 Directions:
|
||||
========================================================================
|
||||
Requirements:
|
||||
|
||||
* current mozilla built tree
|
||||
|
||||
* JDK1.3 or JDK1.2 if you are not using OJI
|
||||
|
||||
* Perl 5 perl.exe must be in your path
|
||||
|
||||
How To Build:
|
||||
|
||||
* make sure the environment var JDKHOME is set to your jdk installation
|
||||
directory, ie SET JDKHOME=C:\jdk1.2
|
||||
|
||||
* if you do not have working OJI set OJI_DISABLE to 1
|
||||
(You can do it in your command prompt, or you can set it in
|
||||
mozilla/java/plugins/src/makefile.win).
|
||||
|
||||
* type "nmake /f makefile.win"
|
||||
|
||||
How to Run:
|
||||
|
||||
* Add following directories to to your path:
|
||||
%MOZILLA_FIVE_HOME%
|
||||
In case OJI_DISABLE add %JDKHOME%\jre\bin\client to your path
|
||||
|
||||
* Copy class files from mozilla/dist/classes to your JRE/lib/ext directory and
|
||||
add JRE/lib/ext to your classpath
|
||||
|
||||
How to build and run test
|
||||
* go to the test directory and type "nmake /f makefile.win"
|
||||
|
||||
* Set PLUGLET environment to the directory you have test.jar
|
||||
|
||||
* Run mozilla and load page test.html from test directory and if everething is ok you will see
|
||||
some awt demo.
|
||||
|
||||
|
||||
=========================================================================
|
||||
Unix (Sparc Solaris and i386 Linux) Directions:
|
||||
=========================================================================
|
||||
|
||||
Requirements:
|
||||
|
||||
* current mozilla built tree
|
||||
|
||||
* JDK1.3
|
||||
|
||||
* Perl 5 must be in your path
|
||||
|
||||
How To Build:
|
||||
|
||||
* make sure the environment var JDKHOME is set to your jdk installation
|
||||
directory, ie export JDKHOME=/usr/local/jdk1.3
|
||||
|
||||
* Add following directories to to your LD_LIBRARY_PATH:
|
||||
|
||||
$MOZILLA_FIVE_HOME:$JDKHOME/jre/lib/$HOSTTYPE/native_threads:$JDKHOME/jre/lib/$HOSTTYPE/client:
|
||||
$JDKHOME/jre/lib/$HOSTTYPE/:
|
||||
|
||||
* type "gmake"
|
||||
|
||||
How to Run:
|
||||
|
||||
* Add $MOZILLA_FILE_HOME/../classes to your CLASSPATH
|
||||
|
||||
How to build and run test
|
||||
|
||||
* go to the test directory and type "gmake"
|
||||
test.jar will be placed in mozilla/dist/bin/plugins directory
|
||||
|
||||
* set LD_PRELOAD to libXm.so (to libawt.so on linux platform)
|
||||
|
||||
* Run mozilla and load page resource:///res/javadev/pluglets/test.html and if everething is ok you will see some awt demo.
|
||||
|
||||
|
||||
========================================================================
|
||||
|
||||
Problems:
|
||||
|
||||
* post to netscape.public.mozilla.java newsgroup
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
95
mozilla/java/build/README.WEBCLIENT
Normal file
95
mozilla/java/build/README.WEBCLIENT
Normal file
@@ -0,0 +1,95 @@
|
||||
Here lies the MozWebShell java wrapper to mozilla M8.
|
||||
|
||||
Authors: Kirk Baker <kbaker@eb.com>
|
||||
Ian Wilkinson <iw@ennoble.co>
|
||||
|
||||
Build hacking and packaging: Ed Burns <edburns@acm.org>
|
||||
|
||||
Unix port: Mark Lin <mark.lin@eng.sun.com>
|
||||
|
||||
========================================================================
|
||||
Win32 Build Directions:
|
||||
========================================================================
|
||||
Requirements:
|
||||
|
||||
* built mozilla with source code from after 10/5/99
|
||||
|
||||
* JDK1.1.7 or greater
|
||||
|
||||
* built org.mozilla.util java classes (see NOTE_UTIL)
|
||||
|
||||
* Perl 5 perl.exe must be in your path
|
||||
|
||||
How To Build:
|
||||
|
||||
* Follow the directions in ..\README
|
||||
|
||||
* type "nmake /f makefile.win all" and hope for the best
|
||||
|
||||
How to Run:
|
||||
|
||||
* once the build has successfully completed, run this batch file:
|
||||
|
||||
.\src\WIN32_D.OBJ\runem.bat <opt: YOUR_URL>
|
||||
|
||||
Note that YOUR_URL is probably necessary since firewall support wasn't
|
||||
working in M8.
|
||||
|
||||
|
||||
Problems:
|
||||
|
||||
* clobber_all doesn't remove the .class files from dist\classes. You
|
||||
have to do this manually.
|
||||
|
||||
* post to netscape.public.mozilla.java newsgroup
|
||||
|
||||
========================================================================
|
||||
Unix Build Directions (currently only Linux,
|
||||
Solaris support is coming soon):
|
||||
========================================================================
|
||||
Requirements:
|
||||
|
||||
* built mozilla tree for some variant of Linux
|
||||
|
||||
* JDK1.2 with native threads support from http://www.blackdown.org
|
||||
(JDK1.1 doesn't seem to work)
|
||||
|
||||
* built org.mozilla.util java classes (see NOTE_UTIL)
|
||||
|
||||
How To Build:
|
||||
|
||||
* Follow the directions in ../util/README
|
||||
|
||||
* set JDKHOME to where your JDK install directory resides
|
||||
-> setenv JDKHOME /usr/local/jdk1.2
|
||||
|
||||
* cd to 'classes' and type "make -f makefile.unix" and hope for the best
|
||||
-> cd classes; make -f Makefile.unix
|
||||
|
||||
* then cd to 'src' and type "make -f makefile.unix" and hope for the best
|
||||
-> cd src; make -f Makefile.unix
|
||||
|
||||
How to Run:
|
||||
|
||||
* once the build has successfully completed, run 'runem.unix' in your
|
||||
'src' directory:
|
||||
-> cd src; ./runem.unix <YOUR_URL>
|
||||
|
||||
Note that YOUR_URL is probably necessary since firewall support wasn't
|
||||
working in M8.
|
||||
|
||||
Problems? Email mark.lin@eng.sun.com or post to netscape.public.mozilla.java.
|
||||
|
||||
========================================================================
|
||||
NOTE_UTIL:
|
||||
========================================================================
|
||||
* this package depends on the org.mozilla.util classes, which can be
|
||||
found in the mozilla tree under mozilla\java\util. They are a
|
||||
separate checkout and build. Once you check out the org.mozilla.util
|
||||
classes, see the README in the mozilla\java\util\README.
|
||||
|
||||
General notes:
|
||||
|
||||
* Please update the ChangeLog (changelo) when you make changes.
|
||||
|
||||
|
||||
86
mozilla/java/build/install_blackconnect_unix.js
Normal file
86
mozilla/java/build/install_blackconnect_unix.js
Normal file
@@ -0,0 +1,86 @@
|
||||
// Installation guide for BlackConnect.xpi
|
||||
// this function verifies disk space in kilobytes
|
||||
function verifyDiskSpace(dirPath, spaceRequired)
|
||||
{
|
||||
var spaceAvailable;
|
||||
|
||||
// Get the available disk space on the given path
|
||||
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
|
||||
|
||||
// Convert the available disk space into kilobytes
|
||||
spaceAvailable = parseInt(spaceAvailable / 1024);
|
||||
|
||||
// do the verification
|
||||
if(spaceAvailable < spaceRequired)
|
||||
{
|
||||
logComment("Insufficient disk space: " + dirPath);
|
||||
logComment(" required : " + spaceRequired + " K");
|
||||
logComment(" available: " + spaceAvailable + " K");
|
||||
return(false);
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
// this function creates a symlink
|
||||
function symlink(lnk, tgt)
|
||||
{
|
||||
var err = execute("symlink.sh", tgt + " " + lnk);
|
||||
logComment("execute symlink.sh "+tgt+" "+lnk+" returned: "+err);
|
||||
}
|
||||
|
||||
// main
|
||||
var srDest;
|
||||
var err;
|
||||
var fProgram;
|
||||
|
||||
srDest = 1000;
|
||||
logComment("Starting Install Process");
|
||||
err = initInstall("BlackConnect", "BlackConnect", "1.0");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
fProgram = getFolder("Program");
|
||||
logComment("fProgram: " + fProgram);
|
||||
|
||||
if(verifyDiskSpace(fProgram, srDest))
|
||||
{
|
||||
setPackageFolder(fProgram);
|
||||
err = addDirectory("",
|
||||
"1.0",
|
||||
"javadev", // dir name in jar to extract
|
||||
fProgram, // Where to put this file
|
||||
// (Returned from GetFolder)
|
||||
"javadev", // subdir name to create relative to fProgram
|
||||
true); // Force Flag
|
||||
logComment("addDirectory() returned: " + err);
|
||||
|
||||
var fComponents = getFolder("Components");
|
||||
var fJavadev = getFolder("Program","javadev");
|
||||
symlink(fComponents + "libbcorb.so",
|
||||
getFolder(fJavadev, "lib/libbcorb.so"));
|
||||
symlink(fComponents + "libbcjavastubs.so",
|
||||
getFolder(fJavadev, "lib/libbcjavastubs.so"));
|
||||
symlink(fComponents + "libjavaloader.so",
|
||||
getFolder(fJavadev, "lib/libjavaloader.so"));
|
||||
symlink(fComponents + "libjavaSample.so",
|
||||
getFolder(fJavadev, "lib/libjavaSample.so"));
|
||||
symlink(fComponents + "libbcTest.so",
|
||||
getFolder(fJavadev, "lib/libbcTest.so"));
|
||||
symlink(fComponents + "libbcxpcomstubs.so",
|
||||
getFolder(fJavadev, "lib/libbcxpcomstubs.so"));
|
||||
symlink(fProgram + "regxpcom",
|
||||
getFolder(fJavadev, "lib/regxpcom"));
|
||||
|
||||
// check return value
|
||||
if(err == SUCCESS)
|
||||
{
|
||||
err = performInstall();
|
||||
logComment("performInstall() returned: " + err);
|
||||
}
|
||||
else
|
||||
cancelInstall(err);
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
||||
|
||||
// end main
|
||||
76
mozilla/java/build/install_blackconnect_win32.js
Normal file
76
mozilla/java/build/install_blackconnect_win32.js
Normal file
@@ -0,0 +1,76 @@
|
||||
// Installation guide for BlackConnect.xpi
|
||||
// this function verifies disk space in kilobytes
|
||||
function verifyDiskSpace(dirPath, spaceRequired)
|
||||
{
|
||||
var spaceAvailable;
|
||||
|
||||
// Get the available disk space on the given path
|
||||
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
|
||||
|
||||
// Convert the available disk space into kilobytes
|
||||
spaceAvailable = parseInt(spaceAvailable / 1024);
|
||||
|
||||
// do the verification
|
||||
if(spaceAvailable < spaceRequired)
|
||||
{
|
||||
logComment("Insufficient disk space: " + dirPath);
|
||||
logComment(" required : " + spaceRequired + " K");
|
||||
logComment(" available: " + spaceAvailable + " K");
|
||||
return(false);
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
// main
|
||||
var srDest;
|
||||
var err;
|
||||
var fProgram;
|
||||
|
||||
srDest = 1000;
|
||||
logComment("Starting Install Process");
|
||||
err = initInstall("BlackConnect", "BlackConnect", "1.0");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
fProgram = getFolder("Program");
|
||||
logComment("fProgram: " + fProgram);
|
||||
|
||||
if(verifyDiskSpace(fProgram, srDest))
|
||||
{
|
||||
setPackageFolder(fProgram);
|
||||
err = addDirectory("",
|
||||
"1.0",
|
||||
"javadev", // dir name in jar to extract
|
||||
fProgram, // Where to put this file
|
||||
// (Returned from GetFolder)
|
||||
"javadev", // subdir name to create relative to fProgram
|
||||
true); // Force Flag
|
||||
logComment("addDirectory() returned: " + err);
|
||||
|
||||
var fComponents = getFolder("Components");
|
||||
var fJavadev = getFolder("Program","javadev");
|
||||
src = getFolder(fJavadev, "lib/bcorb.dll");
|
||||
err = File.copy(src, fComponents);
|
||||
src = getFolder(fJavadev, "lib/bcjavastubs.dll");
|
||||
err = File.copy(src, fComponents);
|
||||
src = getFolder(fJavadev, "lib/javaloader.dll");
|
||||
err = File.copy(src, fComponents);
|
||||
src = getFolder(fJavadev, "lib/bcxpcomstubs.dll");
|
||||
err = File.copy(src, fComponents);
|
||||
src = getFolder(fJavadev, "regxpcom.exe");
|
||||
err = File.copy(src, fProgram);
|
||||
|
||||
// check return value
|
||||
if(err == SUCCESS)
|
||||
{
|
||||
err = performInstall();
|
||||
logComment("performInstall() returned: " + err);
|
||||
}
|
||||
else
|
||||
cancelInstall(err);
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
||||
|
||||
// end main
|
||||
90
mozilla/java/build/install_blackwood_unix.js
Normal file
90
mozilla/java/build/install_blackwood_unix.js
Normal file
@@ -0,0 +1,90 @@
|
||||
// Installation guide for Blackwood.xpi
|
||||
// this function verifies disk space in kilobytes
|
||||
function verifyDiskSpace(dirPath, spaceRequired)
|
||||
{
|
||||
var spaceAvailable;
|
||||
|
||||
// Get the available disk space on the given path
|
||||
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
|
||||
|
||||
// Convert the available disk space into kilobytes
|
||||
spaceAvailable = parseInt(spaceAvailable / 1024);
|
||||
|
||||
// do the verification
|
||||
if(spaceAvailable < spaceRequired)
|
||||
{
|
||||
logComment("Insufficient disk space: " + dirPath);
|
||||
logComment(" required : " + spaceRequired + " K");
|
||||
logComment(" available: " + spaceAvailable + " K");
|
||||
return(false);
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
// this function creates a symlink
|
||||
function symlink(lnk, tgt)
|
||||
{
|
||||
var err = execute("symlink.sh", tgt + " " + lnk);
|
||||
logComment("execute symlink.sh "+tgt+" "+lnk+" returned: "+err);
|
||||
}
|
||||
|
||||
// main
|
||||
var srDest;
|
||||
var err;
|
||||
var fProgram;
|
||||
|
||||
srDest = 1000;
|
||||
logComment("Starting Install Process");
|
||||
err = initInstall("Blackwood", "Blackwood", "1.0");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
fProgram = getFolder("Program");
|
||||
logComment("fProgram: " + fProgram);
|
||||
|
||||
if(verifyDiskSpace(fProgram, srDest))
|
||||
{
|
||||
setPackageFolder(fProgram);
|
||||
err = addDirectory("",
|
||||
"1.0",
|
||||
"javadev", // dir name in jar to extract
|
||||
fProgram, // Where to put this file
|
||||
// (Returned from GetFolder)
|
||||
"javadev", // subdir name to create relative to fProgram
|
||||
true); // Force Flag
|
||||
logComment("addDirectory() returned: " + err);
|
||||
|
||||
var fComponents = getFolder("Components");
|
||||
var fJavadev = getFolder("Program","javadev");
|
||||
symlink(fComponents + "libjavadom.so",
|
||||
getFolder(fJavadev, "lib/libjavadom.so"));
|
||||
symlink(fComponents + "libpluglet.so",
|
||||
getFolder(fJavadev, "lib/libpluglet.so"));
|
||||
symlink(fComponents + "libbcorb.so",
|
||||
getFolder(fJavadev, "lib/libbcorb.so"));
|
||||
symlink(fComponents + "libbcjavastubs.so",
|
||||
getFolder(fJavadev, "lib/libbcjavastubs.so"));
|
||||
symlink(fComponents + "libjavaloader.so",
|
||||
getFolder(fJavadev, "lib/libjavaloader.so"));
|
||||
symlink(fComponents + "libjavaSample.so",
|
||||
getFolder(fJavadev, "lib/libjavaSample.so"));
|
||||
symlink(fComponents + "libbcTest.so",
|
||||
getFolder(fJavadev, "lib/libbcTest.so"));
|
||||
symlink(fComponents + "libbcxpcomstubs.so",
|
||||
getFolder(fJavadev, "lib/libbcxpcomstubs.so"));
|
||||
symlink(fProgram + "regxpcom",
|
||||
getFolder(fJavadev, "lib/regxpcom"));
|
||||
|
||||
// check return value
|
||||
if(err == SUCCESS)
|
||||
{
|
||||
err = performInstall();
|
||||
logComment("performInstall() returned: " + err);
|
||||
}
|
||||
else
|
||||
cancelInstall(err);
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
||||
|
||||
// end main
|
||||
80
mozilla/java/build/install_blackwood_win32.js
Normal file
80
mozilla/java/build/install_blackwood_win32.js
Normal file
@@ -0,0 +1,80 @@
|
||||
// Installation guide for Blackwood.xpi
|
||||
// this function verifies disk space in kilobytes
|
||||
function verifyDiskSpace(dirPath, spaceRequired)
|
||||
{
|
||||
var spaceAvailable;
|
||||
|
||||
// Get the available disk space on the given path
|
||||
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
|
||||
|
||||
// Convert the available disk space into kilobytes
|
||||
spaceAvailable = parseInt(spaceAvailable / 1024);
|
||||
|
||||
// do the verification
|
||||
if(spaceAvailable < spaceRequired)
|
||||
{
|
||||
logComment("Insufficient disk space: " + dirPath);
|
||||
logComment(" required : " + spaceRequired + " K");
|
||||
logComment(" available: " + spaceAvailable + " K");
|
||||
return(false);
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
// main
|
||||
var srDest;
|
||||
var err;
|
||||
var fProgram;
|
||||
|
||||
srDest = 1000;
|
||||
logComment("Starting Install Process");
|
||||
err = initInstall("Blackwood", "Blackwood", "1.0");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
fProgram = getFolder("Program");
|
||||
logComment("fProgram: " + fProgram);
|
||||
|
||||
if(verifyDiskSpace(fProgram, srDest))
|
||||
{
|
||||
setPackageFolder(fProgram);
|
||||
err = addDirectory("",
|
||||
"1.0",
|
||||
"javadev", // dir name in jar to extract
|
||||
fProgram, // Where to put this file
|
||||
// (Returned from GetFolder)
|
||||
"javadev", // subdir name to create relative to fProgram
|
||||
true); // Force Flag
|
||||
logComment("addDirectory() returned: " + err);
|
||||
|
||||
var fComponents = getFolder("Components");
|
||||
var fJavadev = getFolder("Program","javadev");
|
||||
src = getFolder(fJavadev, "lib/javadom.dll");
|
||||
err = File.copy(src, fComponents);
|
||||
src = getFolder(fJavadev, "lib/pluglet.dll");
|
||||
err = File.copy(src, fComponents);
|
||||
src = getFolder(fJavadev, "lib/bcorb.dll");
|
||||
err = File.copy(src, fComponents);
|
||||
src = getFolder(fJavadev, "lib/bcjavastubs.dll");
|
||||
err = File.copy(src, fComponents);
|
||||
src = getFolder(fJavadev, "lib/javaloader.dll");
|
||||
err = File.copy(src, fComponents);
|
||||
src = getFolder(fJavadev, "lib/bcxpcomstubs.dll");
|
||||
err = File.copy(src, fComponents);
|
||||
src = getFolder(fJavadev, "regxpcom.exe");
|
||||
err = File.copy(src, fProgram);
|
||||
|
||||
// check return value
|
||||
if(err == SUCCESS)
|
||||
{
|
||||
err = performInstall();
|
||||
logComment("performInstall() returned: " + err);
|
||||
}
|
||||
else
|
||||
cancelInstall(err);
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
||||
|
||||
// end main
|
||||
74
mozilla/java/build/install_dom_unix.js
Normal file
74
mozilla/java/build/install_dom_unix.js
Normal file
@@ -0,0 +1,74 @@
|
||||
// Installation guide for JavaDOM.xpi
|
||||
// this function verifies disk space in kilobytes
|
||||
function verifyDiskSpace(dirPath, spaceRequired)
|
||||
{
|
||||
var spaceAvailable;
|
||||
|
||||
// Get the available disk space on the given path
|
||||
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
|
||||
|
||||
// Convert the available disk space into kilobytes
|
||||
spaceAvailable = parseInt(spaceAvailable / 1024);
|
||||
|
||||
// do the verification
|
||||
if(spaceAvailable < spaceRequired)
|
||||
{
|
||||
logComment("Insufficient disk space: " + dirPath);
|
||||
logComment(" required : " + spaceRequired + " K");
|
||||
logComment(" available: " + spaceAvailable + " K");
|
||||
return(false);
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
// this function creates a symlink
|
||||
function symlink(lnk, tgt)
|
||||
{
|
||||
var err = execute("symlink.sh", tgt + " " + lnk);
|
||||
logComment("execute symlink.sh "+tgt+" "+lnk+" returned: "+err);
|
||||
}
|
||||
|
||||
// main
|
||||
var srDest;
|
||||
var err;
|
||||
var fProgram;
|
||||
|
||||
srDest = 1000;
|
||||
logComment("Starting Install Process");
|
||||
err = initInstall("JavaDOM", "JavaDOM", "1.0");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
fProgram = getFolder("Program");
|
||||
logComment("fProgram: " + fProgram);
|
||||
|
||||
if(verifyDiskSpace(fProgram, srDest))
|
||||
{
|
||||
setPackageFolder(fProgram);
|
||||
err = addDirectory("",
|
||||
"1.0",
|
||||
"javadev", // dir name in jar to extract
|
||||
fProgram, // Where to put this file
|
||||
// (Returned from GetFolder)
|
||||
"javadev", // subdir name to create relative to fProgram
|
||||
true); // Force Flag
|
||||
logComment("addDirectory() returned: " + err);
|
||||
|
||||
var fComponents = getFolder("Components");
|
||||
var fJavadev = getFolder("Program","javadev");
|
||||
symlink(fComponents + "libjavadom.so",
|
||||
getFolder(fJavadev, "lib/libjavadom.so"));
|
||||
|
||||
// check return value
|
||||
if(err == SUCCESS)
|
||||
{
|
||||
err = performInstall();
|
||||
logComment("performInstall() returned: " + err);
|
||||
}
|
||||
else
|
||||
cancelInstall(err);
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
||||
|
||||
// end main
|
||||
68
mozilla/java/build/install_dom_win32.js
Normal file
68
mozilla/java/build/install_dom_win32.js
Normal file
@@ -0,0 +1,68 @@
|
||||
// Installation guide for JavaDOM.xpi
|
||||
// this function verifies disk space in kilobytes
|
||||
function verifyDiskSpace(dirPath, spaceRequired)
|
||||
{
|
||||
var spaceAvailable;
|
||||
|
||||
// Get the available disk space on the given path
|
||||
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
|
||||
|
||||
// Convert the available disk space into kilobytes
|
||||
spaceAvailable = parseInt(spaceAvailable / 1024);
|
||||
|
||||
// do the verification
|
||||
if(spaceAvailable < spaceRequired)
|
||||
{
|
||||
logComment("Insufficient disk space: " + dirPath);
|
||||
logComment(" required : " + spaceRequired + " K");
|
||||
logComment(" available: " + spaceAvailable + " K");
|
||||
return(false);
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
// main
|
||||
var srDest;
|
||||
var err;
|
||||
var fProgram;
|
||||
|
||||
srDest = 1000;
|
||||
logComment("Starting Install Process");
|
||||
err = initInstall("JavaDOM", "JavaDOM", "1.0");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
fProgram = getFolder("Program");
|
||||
logComment("fProgram: " + fProgram);
|
||||
|
||||
if(verifyDiskSpace(fProgram, srDest))
|
||||
{
|
||||
setPackageFolder(fProgram);
|
||||
err = addDirectory("",
|
||||
"1.0",
|
||||
"javadev", // dir name in jar to extract
|
||||
fProgram, // Where to put this file
|
||||
// (Returned from GetFolder)
|
||||
"javadev", // subdir name to create relative to fProgram
|
||||
true); // Force Flag
|
||||
logComment("addDirectory() returned: " + err);
|
||||
|
||||
var fComponents = getFolder("Components");
|
||||
var fJavadev = getFolder("Program","javadev");
|
||||
src = getFolder(fJavadev, "lib/javadom.dll");
|
||||
err = File.copy(src, fComponents);
|
||||
|
||||
// check return value
|
||||
if(err == SUCCESS)
|
||||
{
|
||||
err = performInstall();
|
||||
logComment("performInstall() returned: " + err);
|
||||
}
|
||||
else
|
||||
cancelInstall(err);
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
||||
|
||||
// end main
|
||||
76
mozilla/java/build/install_pluglets_unix.js
Normal file
76
mozilla/java/build/install_pluglets_unix.js
Normal file
@@ -0,0 +1,76 @@
|
||||
// Installation guide for Pluglets.xpi
|
||||
// this function verifies disk space in kilobytes
|
||||
function verifyDiskSpace(dirPath, spaceRequired)
|
||||
{
|
||||
var spaceAvailable;
|
||||
|
||||
// Get the available disk space on the given path
|
||||
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
|
||||
|
||||
// Convert the available disk space into kilobytes
|
||||
spaceAvailable = parseInt(spaceAvailable / 1024);
|
||||
|
||||
// do the verification
|
||||
if(spaceAvailable < spaceRequired)
|
||||
{
|
||||
logComment("Insufficient disk space: " + dirPath);
|
||||
logComment(" required : " + spaceRequired + " K");
|
||||
logComment(" available: " + spaceAvailable + " K");
|
||||
return(false);
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
// this function creates a symlink
|
||||
function symlink(lnk, tgt)
|
||||
{
|
||||
var err = execute("symlink.sh", tgt + " " + lnk);
|
||||
logComment("execute symlink.sh "+tgt+" "+lnk+" returned: "+err);
|
||||
}
|
||||
|
||||
// main
|
||||
var srDest;
|
||||
var err;
|
||||
var fProgram;
|
||||
|
||||
srDest = 1000;
|
||||
logComment("Starting Install Process");
|
||||
err = initInstall("Pluglets", "Pluglets", "1.0");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
fProgram = getFolder("Program");
|
||||
logComment("fProgram: " + fProgram);
|
||||
|
||||
if(verifyDiskSpace(fProgram, srDest))
|
||||
{
|
||||
setPackageFolder(fProgram);
|
||||
err = addDirectory("",
|
||||
"1.0",
|
||||
"javadev", // dir name in jar to extract
|
||||
fProgram, // Where to put this file
|
||||
// (Returned from GetFolder)
|
||||
"javadev", // subdir name to create relative to fProgram
|
||||
true); // Force Flag
|
||||
logComment("addDirectory() returned: " + err);
|
||||
|
||||
var fComponents = getFolder("Components");
|
||||
var fJavadev = getFolder("Program","javadev");
|
||||
symlink(fComponents + "libjavadom.so",
|
||||
getFolder(fJavadev, "lib/libjavadom.so"));
|
||||
symlink(fComponents + "libpluglet.so",
|
||||
getFolder(fJavadev, "lib/libpluglet.so"));
|
||||
|
||||
// check return value
|
||||
if(err == SUCCESS)
|
||||
{
|
||||
err = performInstall();
|
||||
logComment("performInstall() returned: " + err);
|
||||
}
|
||||
else
|
||||
cancelInstall(err);
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
||||
|
||||
// end main
|
||||
70
mozilla/java/build/install_pluglets_win32.js
Normal file
70
mozilla/java/build/install_pluglets_win32.js
Normal file
@@ -0,0 +1,70 @@
|
||||
// Installation guide for Pluglets.xpi
|
||||
// this function verifies disk space in kilobytes
|
||||
function verifyDiskSpace(dirPath, spaceRequired)
|
||||
{
|
||||
var spaceAvailable;
|
||||
|
||||
// Get the available disk space on the given path
|
||||
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
|
||||
|
||||
// Convert the available disk space into kilobytes
|
||||
spaceAvailable = parseInt(spaceAvailable / 1024);
|
||||
|
||||
// do the verification
|
||||
if(spaceAvailable < spaceRequired)
|
||||
{
|
||||
logComment("Insufficient disk space: " + dirPath);
|
||||
logComment(" required : " + spaceRequired + " K");
|
||||
logComment(" available: " + spaceAvailable + " K");
|
||||
return(false);
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
// main
|
||||
var srDest;
|
||||
var err;
|
||||
var fProgram;
|
||||
|
||||
srDest = 1000;
|
||||
logComment("Starting Install Process");
|
||||
err = initInstall("Pluglets", "Pluglets", "1.0");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
fProgram = getFolder("Program");
|
||||
logComment("fProgram: " + fProgram);
|
||||
|
||||
if(verifyDiskSpace(fProgram, srDest))
|
||||
{
|
||||
setPackageFolder(fProgram);
|
||||
err = addDirectory("",
|
||||
"1.0",
|
||||
"javadev", // dir name in jar to extract
|
||||
fProgram, // Where to put this file
|
||||
// (Returned from GetFolder)
|
||||
"javadev", // subdir name to create relative to fProgram
|
||||
true); // Force Flag
|
||||
logComment("addDirectory() returned: " + err);
|
||||
|
||||
var fComponents = getFolder("Components");
|
||||
var fJavadev = getFolder("Program","javadev");
|
||||
src = getFolder(fJavadev, "lib/javadom.dll");
|
||||
err = File.copy(src, fComponents);
|
||||
src = getFolder(fJavadev, "lib/pluglet.dll");
|
||||
err = File.copy(src, fComponents);
|
||||
|
||||
// check return value
|
||||
if(err == SUCCESS)
|
||||
{
|
||||
err = performInstall();
|
||||
logComment("performInstall() returned: " + err);
|
||||
}
|
||||
else
|
||||
cancelInstall(err);
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
||||
|
||||
// end main
|
||||
88
mozilla/java/build/install_webclient_unix.js
Normal file
88
mozilla/java/build/install_webclient_unix.js
Normal file
@@ -0,0 +1,88 @@
|
||||
// Installation guide for Webclient.xpi
|
||||
// this function verifies disk space in kilobytes
|
||||
function verifyDiskSpace(dirPath, spaceRequired)
|
||||
{
|
||||
var spaceAvailable;
|
||||
|
||||
// Get the available disk space on the given path
|
||||
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
|
||||
|
||||
// Convert the available disk space into kilobytes
|
||||
spaceAvailable = parseInt(spaceAvailable / 1024);
|
||||
|
||||
// do the verification
|
||||
if(spaceAvailable < spaceRequired)
|
||||
{
|
||||
logComment("Insufficient disk space: " + dirPath);
|
||||
logComment(" required : " + spaceRequired + " K");
|
||||
logComment(" available: " + spaceAvailable + " K");
|
||||
return(false);
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
// this function creates a symlink
|
||||
function symlink(lnk, tgt)
|
||||
{
|
||||
var err = execute("symlink.sh", tgt + " " + lnk);
|
||||
logComment("execute symlink.sh "+tgt+" "+lnk+" returned: "+err);
|
||||
}
|
||||
|
||||
// main
|
||||
var srDest;
|
||||
var err;
|
||||
var fProgram;
|
||||
|
||||
srDest = 1000;
|
||||
logComment("Starting Install Process");
|
||||
err = initInstall("Webclient", "Webclient", "1.1");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
fProgram = getFolder("Program");
|
||||
logComment("fProgram: " + fProgram);
|
||||
|
||||
if(verifyDiskSpace(fProgram, srDest))
|
||||
{
|
||||
setPackageFolder(fProgram);
|
||||
err = addDirectory("",
|
||||
"1.1",
|
||||
"javadev", // dir name in jar to extract
|
||||
fProgram, // Where to put this file
|
||||
// (Returned from GetFolder)
|
||||
"javadev", // subdir name to create relative to fProgram
|
||||
true); // Force Flag
|
||||
logComment("addDirectory() returned: " + err);
|
||||
|
||||
var fComponents = getFolder("Components");
|
||||
var fJavadev = getFolder("Program","javadev");
|
||||
symlink(fComponents + "libjavadom.so",
|
||||
getFolder(fJavadev, "lib/libjavadom.so"));
|
||||
symlink(fComponents + "libbcorb.so",
|
||||
getFolder(fJavadev, "lib/libbcorb.so"));
|
||||
symlink(fComponents + "libbcjavastubs.so",
|
||||
getFolder(fJavadev, "lib/libbcjavastubs.so"));
|
||||
symlink(fComponents + "libbcjavaloader.so",
|
||||
getFolder(fJavadev, "lib/libbcjavaloader.so"));
|
||||
symlink(fComponents + "libjavaSample.so",
|
||||
getFolder(fJavadev, "lib/libjavaSample.so"));
|
||||
symlink(fComponents + "libbcTest.so",
|
||||
getFolder(fJavadev, "lib/libbcTest.so"));
|
||||
symlink(fComponents + "libbcxpcomstubs.so",
|
||||
getFolder(fJavadev, "lib/libbcxpcomstubs.so"));
|
||||
symlink(fProgram + "regxpcom",
|
||||
getFolder(fJavadev, "lib/regxpcom"));
|
||||
|
||||
// check return value
|
||||
if(err == SUCCESS)
|
||||
{
|
||||
err = performInstall();
|
||||
logComment("performInstall() returned: " + err);
|
||||
}
|
||||
else
|
||||
cancelInstall(err);
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
||||
|
||||
// end main
|
||||
85
mozilla/java/build/install_webclient_win32.js
Normal file
85
mozilla/java/build/install_webclient_win32.js
Normal file
@@ -0,0 +1,85 @@
|
||||
// Installation guide for Webclient.xpi
|
||||
// this function verifies disk space in kilobytes
|
||||
function verifyDiskSpace(dirPath, spaceRequired)
|
||||
{
|
||||
var spaceAvailable;
|
||||
|
||||
// Get the available disk space on the given path
|
||||
spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
|
||||
|
||||
// Convert the available disk space into kilobytes
|
||||
spaceAvailable = parseInt(spaceAvailable / 1024);
|
||||
|
||||
// do the verification
|
||||
if(spaceAvailable < spaceRequired)
|
||||
{
|
||||
logComment("Insufficient disk space: " + dirPath);
|
||||
logComment(" required : " + spaceRequired + " K");
|
||||
logComment(" available: " + spaceAvailable + " K");
|
||||
return(false);
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
// main
|
||||
var srDest;
|
||||
var err;
|
||||
var fProgram;
|
||||
|
||||
srDest = 1000;
|
||||
logComment("Starting Install Process");
|
||||
err = initInstall("Webclient", "Webclient", "1.1");
|
||||
logComment("initInstall: " + err);
|
||||
|
||||
fProgram = getFolder("Program");
|
||||
logComment("fProgram: " + fProgram);
|
||||
|
||||
if(verifyDiskSpace(fProgram, srDest))
|
||||
{
|
||||
setPackageFolder(fProgram);
|
||||
err = addDirectory("",
|
||||
"1.1",
|
||||
"javadev", // dir name in jar to extract
|
||||
fProgram, // Where to put this file
|
||||
// (Returned from GetFolder)
|
||||
"javadev", // subdir name to create relative to fProgram
|
||||
true); // Force Flag
|
||||
logComment("addDirectory() returned: " + err);
|
||||
|
||||
var fComponents = getFolder("Components");
|
||||
var fJavadev = getFolder("Program","javadev");
|
||||
src = getFolder(fJavadev, "lib/javadom.dll");
|
||||
err = File.copy(src, fComponents);
|
||||
src = getFolder(fJavadev, "lib/bcorb.dll");
|
||||
err = File.copy(src, fComponents);
|
||||
src = getFolder(fJavadev, "lib/blackconnectjni.dll");
|
||||
err = File.copy(src, fProgram);
|
||||
src = getFolder(fJavadev, "lib/bcjavastubs.dll");
|
||||
err = File.copy(src, fComponents);
|
||||
src = getFolder(fJavadev, "lib/bcjavaloader.dll");
|
||||
err = File.copy(src, fComponents);
|
||||
src = getFolder(fJavadev, "lib/bcxpcomstubs.dll");
|
||||
err = File.copy(src, fComponents);
|
||||
src = getFolder(fJavadev, "lib/regxpcom.exe");
|
||||
err = File.copy(src, fProgram);
|
||||
|
||||
src = getFolder(fJavadev, "lib/javadomjni.dll");
|
||||
err = File.copy(src, fProgram);
|
||||
src = getFolder(fJavadev, "lib/webclient.dll");
|
||||
err = File.copy(src, fProgram);
|
||||
|
||||
// check return value
|
||||
if(err == SUCCESS)
|
||||
{
|
||||
err = performInstall();
|
||||
logComment("performInstall() returned: " + err);
|
||||
}
|
||||
else
|
||||
cancelInstall(err);
|
||||
}
|
||||
else
|
||||
cancelInstall(INSUFFICIENT_DISK_SPACE);
|
||||
|
||||
// end main
|
||||
11
mozilla/java/build/symlink.sh
Normal file
11
mozilla/java/build/symlink.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Hack to allow symlinking (required for Sun's JRE) in
|
||||
# a zippy.
|
||||
#
|
||||
# usage: symlink.sh <srcfile> <newlink>
|
||||
#
|
||||
#-------------------------------------------------------
|
||||
|
||||
ln -s $1 $2
|
||||
5
mozilla/java/changelo
Normal file
5
mozilla/java/changelo
Normal file
@@ -0,0 +1,5 @@
|
||||
Fri Jul 30 14:57:28 1999 Ed Burns <Ed Burns <ed.burns@sun.com>>
|
||||
|
||||
* Made necessary changes to build files to build with jdk1.1.7 or
|
||||
jdk1.2.2.
|
||||
|
||||
44
mozilla/java/config/buildpkg.bat
Normal file
44
mozilla/java/config/buildpkg.bat
Normal file
@@ -0,0 +1,44 @@
|
||||
@echo off
|
||||
rem The contents of this file are subject to the Netscape Public
|
||||
rem License Version 1.1 (the "License"); you may not use this file
|
||||
rem except in compliance with the License. You may obtain a copy of
|
||||
rem the License at http://www.mozilla.org/NPL/
|
||||
rem
|
||||
rem Software distributed under the License is distributed on an "AS
|
||||
rem IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
rem implied. See the License for the specific language governing
|
||||
rem rights and limitations under the License.
|
||||
rem
|
||||
rem The Original Code is mozilla.org code.
|
||||
rem
|
||||
rem The Initial Developer of the Original Code is Netscape
|
||||
rem Communications Corporation. Portions created by Netscape are
|
||||
rem Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
rem Rights Reserved.
|
||||
rem
|
||||
rem Contributor(s):
|
||||
@echo on
|
||||
|
||||
@echo off
|
||||
if not exist %2 echo Warning: %2 does not exist! (you may need to check it out)
|
||||
if not exist %2 exit 1
|
||||
|
||||
pushd %2
|
||||
|
||||
goto NO_CAFE
|
||||
|
||||
if "%MOZ_CAFE%"=="" goto NO_CAFE
|
||||
|
||||
mkdir %MOZ_SRC%\mozilla\dist\classes\%2
|
||||
%MOZ_TOOLS%\bin\sj.exe -classpath %MOZ_SRC%\mozilla\dist\classes;%MOZ_SRC%\mozilla\sun-java\classsrc -d %MOZ_SRC%\mozilla\dist\classes *.java
|
||||
goto END
|
||||
|
||||
:NO_CAFE
|
||||
|
||||
perl.exe %MOZ_SRC%\mozilla\config\outofdate.pl -d %MOZ_SRC%\mozilla\dist\classes\%2 -cfg %1 *.java > doit.bat
|
||||
call doit.bat
|
||||
del /F /A:A doit.bat
|
||||
|
||||
:END
|
||||
|
||||
popd
|
||||
19
mozilla/java/config/localdefs.mak
Normal file
19
mozilla/java/config/localdefs.mak
Normal file
@@ -0,0 +1,19 @@
|
||||
# this file contains defs that should be in the top level mozilla/config
|
||||
# directory, but may not be there due to tree update issues.
|
||||
|
||||
|
||||
!ifndef JAVA_HOME
|
||||
JAVA_HOME=$(JDKHOME)
|
||||
!endif
|
||||
|
||||
JAVA_DESTPATH = $(MOZ_SRC)\mozilla\dist\classes
|
||||
DEFAULT_JAVA_SOURCEPATH = $(MOZ_SRC)\mozilla\sun-java\classsrc
|
||||
JAVA_SOURCEPATH = $(MOZ_SRC)\mozilla\sun-java\classsrc11;$(DEFAULT_JAVA_SOURCEPATH)
|
||||
JAVAC_ZIP=$(JAVA_HOME)\lib\classes.zip
|
||||
JAVAC_CLASSPATH=$(JAVAC_ZIP)$(PATH_SEPARATOR)$(JAVA_DESTPATH)$(PATH_SEPARATOR)$(JAVA_SOURCEPATH)
|
||||
|
||||
|
||||
JAVA=$(JDKHOME)\bin\java
|
||||
JAVAH=$(JDKHOME)\bin\JAVAH
|
||||
JAVAH_FLAGS=-jni -classpath $(JAVAC_CLASSPATH)
|
||||
|
||||
134
mozilla/java/config/outofdate.pl
Normal file
134
mozilla/java/config/outofdate.pl
Normal file
@@ -0,0 +1,134 @@
|
||||
#!perl
|
||||
#
|
||||
# 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):
|
||||
#
|
||||
|
||||
#
|
||||
#Input: [-d dir] foo1.java foo2.java
|
||||
#Compares with: foo1.class foo2.class (if -d specified, checks in 'dir',
|
||||
# otherwise assumes .class files in same directory as .java files)
|
||||
#Returns: list of input arguments which are newer than corresponding class
|
||||
#files (non-existant class files are considered to be real old :-)
|
||||
#
|
||||
|
||||
$found = 1;
|
||||
|
||||
# GLOBALS
|
||||
$SEP = 0; # the paltform independent path separator
|
||||
$CFG = 0; # the value of the -cfg flag
|
||||
|
||||
# determine the path separator
|
||||
$_ = $ENV{"PATH"};
|
||||
if (m|/|) {
|
||||
$SEP = "/";
|
||||
}
|
||||
else {
|
||||
$SEP = "\\";
|
||||
}
|
||||
|
||||
if ($ARGV[0] eq '-d') {
|
||||
$classdir = $ARGV[1];
|
||||
$classdir .= $SEP;
|
||||
shift;
|
||||
shift;
|
||||
} else {
|
||||
$classdir = "." . $SEP;
|
||||
}
|
||||
|
||||
# if -cfg is specified, print out the contents of the cfg file to stdout
|
||||
if ($ARGV[0] eq '-cfg') {
|
||||
$CFG = $ARGV[1];
|
||||
shift;
|
||||
shift;
|
||||
}
|
||||
|
||||
$_ = $ARGV[0];
|
||||
if (m/\*.java/) {
|
||||
# Account for the fact that the shell didn't expand *.java by doing it
|
||||
# manually.
|
||||
&manuallyExpandArgument("java");
|
||||
}
|
||||
|
||||
$printFile = 0;
|
||||
|
||||
foreach $filename (@ARGV) {
|
||||
$classfilename = $classdir;
|
||||
$classfilename .= $filename;
|
||||
$classfilename =~ s/.java$/.class/;
|
||||
# workaround to only build sun/io/* classes when necessary
|
||||
# change the pathname of target file to be consistent
|
||||
# with sun/io subdirectories
|
||||
#
|
||||
# sun/io was always getting rebuilt because the java files
|
||||
# were split into subdirectories, but the package names
|
||||
# remained the same. This was confusing outofdate.pl
|
||||
#
|
||||
$classfilename =~ s/sun\/io\/extended.\//sun\/io\//;
|
||||
$classfilename =~ s/\.\.\/\.\.\/sun-java\/classsrc\///;
|
||||
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,
|
||||
$ctime,$blksize,$blocks) = stat($filename);
|
||||
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$classmtime,
|
||||
$ctime,$blksize,$blocks) = stat($classfilename);
|
||||
# print $filename, " ", $mtime, ", ", $classfilename, " ", $classmtime, "\n";
|
||||
if ($mtime > $classmtime) {
|
||||
|
||||
# Only print the file header if we actually have some files to
|
||||
# compile.
|
||||
if (!$printFile) {
|
||||
$printFile = 1;
|
||||
&printFile($CFG);
|
||||
}
|
||||
print $filename, " ";
|
||||
$found = 0;
|
||||
}
|
||||
}
|
||||
|
||||
print "\n";
|
||||
|
||||
# push onto $ARG array all filenames with extension $ext
|
||||
|
||||
# @param ext the extension of the file
|
||||
|
||||
sub manuallyExpandArgument {
|
||||
local($ext) = @_;
|
||||
$ext = "\." . $ext; # put it in regexp
|
||||
|
||||
$result = opendir(DIR, ".");
|
||||
|
||||
@allfiles = grep(/$ext/, readdir(DIR));
|
||||
$i = 0;
|
||||
foreach $file (@allfiles) {
|
||||
#skip emacs save files
|
||||
$_ = $file;
|
||||
if (!/~/) {
|
||||
$ARGV[$i++] = $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub printFile {
|
||||
local($file) = @_;
|
||||
|
||||
$result = open(CFG, $file);
|
||||
while (<CFG>) {
|
||||
chop;
|
||||
print $_;
|
||||
}
|
||||
}
|
||||
10
mozilla/java/dom/DOMAccessor.java.patch
Normal file
10
mozilla/java/dom/DOMAccessor.java.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
Index: DOMAccessor.java
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/java/dom/classes/org/mozilla/dom/DOMAccessor.java,v
|
||||
retrieving revision 1.2
|
||||
diff -r1.2 DOMAccessor.java
|
||||
31a32,33
|
||||
> import org.mozilla.dom.util.GenericDocLoadListener;
|
||||
>
|
||||
38a41
|
||||
> addDocumentLoadListener(new GenericDocLoadListener("JavaDOM"));
|
||||
30
mozilla/java/dom/Makefile.in
Normal file
30
mozilla/java/dom/Makefile.in
Normal file
@@ -0,0 +1,30 @@
|
||||
#!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):
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = classes src jni
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
153
mozilla/java/dom/README
Normal file
153
mozilla/java/dom/README
Normal file
@@ -0,0 +1,153 @@
|
||||
|
||||
Sources
|
||||
=======
|
||||
|
||||
The sources are located in mozilla/java/dom.
|
||||
Subdirectories
|
||||
|
||||
classes
|
||||
jni
|
||||
src
|
||||
tests
|
||||
|
||||
contain Java sources, Java native methods implementation,
|
||||
native c++ code and Java DOM API tests respectively.
|
||||
|
||||
Note:
|
||||
Sources that work with mozilla PR1 and earlier
|
||||
versions should be checked out using DOM_PR1 tag.
|
||||
|
||||
No tags are needed for the sources that work with
|
||||
the latest mozilla tree.
|
||||
|
||||
Building
|
||||
========
|
||||
|
||||
Requirenments:
|
||||
--------------
|
||||
Current mozilla build
|
||||
JDK1.2 or JDK1.3
|
||||
Perl 5 must be in your path
|
||||
JDKHOME environment variable set to your JDK dir
|
||||
CLASSPATH environment cvariable set to contain
|
||||
org.w3c.dom classes. The sources can be found at
|
||||
http://www.w3.org/TR/2000/CR-DOM-Level-2-20000307/java-binding.html
|
||||
(for mozilla PR1 and earlie versions)
|
||||
http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/java-binding.html
|
||||
(for the latest mozilla)
|
||||
|
||||
Solaris specific
|
||||
----------------
|
||||
Add following directories to LD_LIBRARY_PATH environment variable:
|
||||
$MOZILLA_FIVE_HOME
|
||||
$JDKHOME/jre/lib/$HOSTTYPE/native_threads
|
||||
$JDKHOME/jre/lib/$HOSTTYPE/classic
|
||||
$JDKHOME/jre/lib/$HOSTTYPE/
|
||||
|
||||
goto mozilla/java/dom directory and type "gmake"
|
||||
|
||||
|
||||
Windows NT specific
|
||||
-------------------
|
||||
To enable OJI usage set environment variable JAVA_DOM_OJI_ENABLE=1
|
||||
Add following directories to PATH environment variable:
|
||||
%MOZILLA_FIVE_HOME%
|
||||
%JDKHOME%\jre\bin\classic (only in case you don't use OJI)
|
||||
|
||||
goto mozilla/java/dom directory and type "nmake /f makefile.win"
|
||||
|
||||
|
||||
Using the Java DOM API
|
||||
======================
|
||||
|
||||
A Java component obtains a org.w3c.dom.Document by registering for
|
||||
Document load notifications. The Document is passed in along with the
|
||||
notifications. The preferred way for a Java component to register for
|
||||
Document load notifications is to register via the DOMAccessor class.
|
||||
|
||||
However, this is possible only if OJI usage is enabled. This works
|
||||
on Windows NT platform.
|
||||
|
||||
On Solaris currently the nsJavaDOM component instantiates its own JVM.
|
||||
When an OJI-compatible JVM is available, we will move over to using it.
|
||||
So, one has to apply two patches to
|
||||
|
||||
mozilla/webshell/src/nsWebShell.cpp
|
||||
mozilla/java/dom/classes/org/mozilla/dom/DOMAccessor.java
|
||||
|
||||
They can be found at mozilla/java/dom directory.
|
||||
The first one inits nsJavaDOM component and adds it as a
|
||||
document load observer listener.
|
||||
|
||||
The second one registers a document load listener via DOMAccessor.
|
||||
Note:
|
||||
any class that implements the DocumentLoadListener interface may
|
||||
stand for GenericDocLoadListener.
|
||||
|
||||
After applying a patch to nsWebShell.cpp edit
|
||||
mozilla/webshell/src/Makefile.in to add -DJAVA_DOM to the list of
|
||||
defines. Then do a gmake in this directory.
|
||||
|
||||
After applying a patch to DOMAccessor.java go to mozilla/java/dom/classes
|
||||
and do a gmake. No changes in makefiles are needed.
|
||||
|
||||
You can find examples of Java DOM API usage in
|
||||
|
||||
mozilla/java/dom/classes/org/mozilla/dom/util
|
||||
mozilla/java/dom/tests/src/applets
|
||||
|
||||
|
||||
DOM2 events
|
||||
------------
|
||||
|
||||
At the moment all DOM2 event-related interfaces are present
|
||||
however they are not fully implemented yet
|
||||
because Mozilla's core DOM does not support DOM2 events fully.
|
||||
Consequences:
|
||||
- some methods throws OperationUnsupportedException()
|
||||
|
||||
The basic implementation architecture is following:
|
||||
- NodeImpl is extended to support EventTarget interface
|
||||
- for every addEventListener call special NativeDOMProxyListener object is
|
||||
created and is registered with Mozilla's DOM
|
||||
It's task is to propagate event notifications from Mozilla's DOM
|
||||
to target Java EventListener
|
||||
- In order to sucessfully unregister EventListeners we need to
|
||||
save association between java EventListener and corresponding
|
||||
NativeDOMProxyListener object. This is done by storing such
|
||||
associations Vector at NodeImpl
|
||||
- javaDOMEventsGlobals class is used much like javaDOMGlobals for caching
|
||||
(this code may be moved to javaDOMGlobals)
|
||||
|
||||
NSPR Logging
|
||||
------------
|
||||
|
||||
The NSPR Log module name is javadom. For instructions on how to enable
|
||||
logging, see dist/include/prlog.h
|
||||
|
||||
|
||||
Debug output
|
||||
------------
|
||||
|
||||
The debug build of the Java DOM API creates the JVM with the verbose
|
||||
and the verboseGC options turned on, to help in debugging. It also
|
||||
creates two files in the current working directory, dom-java.txt and
|
||||
dom-cpp.txt, which are simple dumps of the DOM, as printed from C++
|
||||
and from Java. The two should be identical. The code to write these
|
||||
files is, essentially, my regression test. Feel free to add to it.
|
||||
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
Currently tested on Solaris 7 only with Java 2 SDK 1.2.1. egcs-2.91.66,
|
||||
Sun Workshop C++ 4.2 and 5.0 have been know to compile this code
|
||||
fine. gcc-2.8.1 does *not* work. I have not used anything
|
||||
Java2-specific, and it works with JDK1.1.x too (I have been using JDK
|
||||
1.1.6 too).
|
||||
|
||||
|
||||
References
|
||||
----------
|
||||
|
||||
I highly recommend reading Sheng Liang's new JNI book.
|
||||
25
mozilla/java/dom/TODO
Normal file
25
mozilla/java/dom/TODO
Normal file
@@ -0,0 +1,25 @@
|
||||
o Convert to using IDL and GenericFactories. Once support for
|
||||
ComponentLoaders is implemented in xpcom, use that to load our
|
||||
component.
|
||||
|
||||
[5d]
|
||||
|
||||
o Use OJI to obtain the JVM.
|
||||
|
||||
[5d. Awaiting OJI availability]
|
||||
|
||||
o i18n the API
|
||||
|
||||
o Use nsISupportsProxies to work around thread
|
||||
limitations. This will mean writing an IDL for nsIJavaDOM.h, but
|
||||
that sould be trivial. Dcumentation for nsISupportsProxies is
|
||||
available at
|
||||
http://www.mozilla.org/projects/xpcom/Proxies.html.
|
||||
|
||||
[2w. Assigned. Contact: Sergey Lunegov <lsv@sparc.spb.su>]
|
||||
|
||||
o Investigate the possibility of writing a tool that can generate the
|
||||
JNI code from idl. This is the only practical way to implement the
|
||||
HTML DOM (because it is too big to hand-code).
|
||||
|
||||
[4w+]
|
||||
36
mozilla/java/dom/blackconnect/dom/Makefile
Normal file
36
mozilla/java/dom/blackconnect/dom/Makefile
Normal file
@@ -0,0 +1,36 @@
|
||||
#!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 = ../../../..
|
||||
VPATH = .
|
||||
srcdir = .
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS= \
|
||||
classes \
|
||||
stubs \
|
||||
accessor \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
30
mozilla/java/dom/blackconnect/dom/Makefile.in
Normal file
30
mozilla/java/dom/blackconnect/dom/Makefile.in
Normal file
@@ -0,0 +1,30 @@
|
||||
#!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):
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = classes stubs accessor
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
56
mozilla/java/dom/blackconnect/dom/accessor/Makefile.in
Normal file
56
mozilla/java/dom/blackconnect/dom/accessor/Makefile.in
Normal file
@@ -0,0 +1,56 @@
|
||||
#!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):
|
||||
#
|
||||
|
||||
|
||||
DEPTH = ../../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = DOMAccessor
|
||||
COMPONENT = DOMAccessor
|
||||
LIBRARY_NAME = DOMAccessor
|
||||
IS_COMPONENT = 1
|
||||
XPIDL_MODULE = DOMAccessor
|
||||
XPIDLSRCS = bcIDOMAccessor.idl
|
||||
|
||||
CPPSRCS = bcDOMAccessor.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_LIBS = -ljavadomstubs -L$(DIST)/lib
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
bcDOMAccessor.jar.comp: manifest bcIDOMAccessor.class bcDOMAccessor.class
|
||||
$(JDKHOME)/bin/jar cvfm bcDOMAccessor.jar.comp manifest *.class
|
||||
.java.class:
|
||||
$(JDKHOME)/bin/javac -classpath $(CLASSPATH) $<
|
||||
install-component: bcDOMAccessor.jar.comp bcDOMAccessor.jar.info
|
||||
cp bcDOMAccessor.jar.comp bcDOMAccessor.jar.info $(DEPTH)/dist/bin/components/
|
||||
|
||||
clobber-java:
|
||||
rm -f *.class *.jar
|
||||
clobber:: clobber-java
|
||||
clobber_all:: clobber-java
|
||||
install:: install-component
|
||||
244
mozilla/java/dom/blackconnect/dom/accessor/bcDOMAccessor.cpp
Normal file
244
mozilla/java/dom/blackconnect/dom/accessor/bcDOMAccessor.cpp
Normal file
@@ -0,0 +1,244 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* 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):
|
||||
* Denis Sharypov <sdv@sparc.spb.su>
|
||||
*/
|
||||
#include "bcIDOMAccessor.h"
|
||||
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsIModule.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsCURILoader.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDocumentLoader.h"
|
||||
#include "nsIDocumentLoaderObserver.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "bcNode.h"
|
||||
#include "bcDocument.h"
|
||||
#include "bcElement.h"
|
||||
|
||||
// #include "nsIEnumerator.h"
|
||||
// #include "stdlib.h"
|
||||
|
||||
static nsIDOMDocument* GetDocument(nsIDocumentLoader* loader);
|
||||
#if defined(DEBUG)
|
||||
#include <stdio.h>
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsIDOMNamedNodeMap.h"
|
||||
#endif
|
||||
|
||||
static NS_DEFINE_IID(kIDocShellIID, NS_IDOCSHELL_IID);
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIDocumentViewerIID, NS_IDOCUMENT_VIEWER_IID);
|
||||
static NS_DEFINE_IID(kIDOMDocumentIID, NS_IDOMDOCUMENT_IID);
|
||||
static NS_DEFINE_IID(kIDocumentLoaderObserverIID, NS_IDOCUMENT_LOADER_OBSERVER_IID);
|
||||
|
||||
/* 151dd030-9ed0-11d4-a983-00105ae3801e */
|
||||
#define BC_DOM_ACCESSOR_CID \
|
||||
{0x151dd030, 0x9ed0, 0x11d4, \
|
||||
{0xa9, 0x83, 0x00, 0x10, 0x5a, 0xe3, 0x80, 0x1e}}
|
||||
|
||||
static NS_DEFINE_IID(kDocLoaderServiceCID, NS_DOCUMENTLOADER_SERVICE_CID);
|
||||
|
||||
class bcDOMAccessor : public bcIDOMAccessor, public nsIDocumentLoaderObserver
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_BCIDOMACCESSOR
|
||||
NS_DECL_NSIDOCUMENTLOADEROBSERVER
|
||||
|
||||
bcDOMAccessor(bcIDOMAccessor* accessor);
|
||||
virtual ~bcDOMAccessor();
|
||||
/* additional members */
|
||||
private:
|
||||
bcIDOMAccessor* accessor;
|
||||
|
||||
};
|
||||
|
||||
/* Implementation file */
|
||||
NS_IMPL_ISUPPORTS1(bcDOMAccessor, bcIDOMAccessor)
|
||||
|
||||
bcDOMAccessor::bcDOMAccessor(bcIDOMAccessor* accessor)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
this->accessor = accessor;
|
||||
/* member initializers and constructor code */
|
||||
}
|
||||
|
||||
bcDOMAccessor::~bcDOMAccessor()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
NS_IMETHODIMP bcDOMAccessor::EndDocumentLoad(const char *url, Document* doc)
|
||||
// NS_IMETHODIMP bcDOMAccessor::EndDocumentLoad(const char *url, Node *node, Element *elem)
|
||||
{
|
||||
// wrap bcDOMDocumentImpl(doc)
|
||||
// addref(bcDOMDocumentImpl)
|
||||
if (accessor)
|
||||
accessor->EndDocumentLoad(url, doc);
|
||||
// accessor->EndDocumentLoad(url, node, elem);
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* void onStartDocumentLoad (in nsIDocumentLoader aLoader, in nsIURI aURL, in string aCommand); */
|
||||
NS_IMETHODIMP bcDOMAccessor::OnStartDocumentLoad(nsIDocumentLoader *aLoader, nsIURI *aURL, const char *aCommand)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* void onEndDocumentLoad (in nsIDocumentLoader loader, in nsIChannel aChannel, in unsigned long aStatus); */
|
||||
NS_IMETHODIMP bcDOMAccessor::OnEndDocumentLoad(nsIDocumentLoader *loader, nsIChannel *aChannel, PRUint32 aStatus)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* void onStartURLLoad (in nsIDocumentLoader aLoader, in nsIChannel channel); */
|
||||
NS_IMETHODIMP bcDOMAccessor::OnStartURLLoad(nsIDocumentLoader *aLoader, nsIChannel *channel)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* void onProgressURLLoad (in nsIDocumentLoader aLoader, in nsIChannel aChannel, in unsigned long aProgress, in unsigned long aProgressMax); */
|
||||
NS_IMETHODIMP bcDOMAccessor::OnProgressURLLoad(nsIDocumentLoader *aLoader, nsIChannel *aChannel, PRUint32 aProgress, PRUint32 aProgressMax)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* [noscript] void onStatusURLLoad (in nsIDocumentLoader loader, in nsIChannel channel, in nsStringRef aMsg); */
|
||||
NS_IMETHODIMP bcDOMAccessor::OnStatusURLLoad(nsIDocumentLoader *loader, nsIChannel *channel, nsString & aMsg)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* void onEndURLLoad (in nsIDocumentLoader aLoader,
|
||||
in nsIChannel aChannel,
|
||||
in unsigned long aStatus); */
|
||||
|
||||
NS_IMETHODIMP bcDOMAccessor::OnEndURLLoad(nsIDocumentLoader *loader,
|
||||
nsIChannel *channel,
|
||||
PRUint32 aStatus)
|
||||
{
|
||||
char* urlSpec = (char*) "";
|
||||
nsIURI* url = nsnull;
|
||||
if (channel && NS_SUCCEEDED(channel->GetURI(&url)))
|
||||
url->GetSpec(&urlSpec);
|
||||
|
||||
nsIDOMDocument* domDoc = GetDocument(loader);
|
||||
nsIDOMElement* docEl;
|
||||
domDoc->GetDocumentElement(&docEl);
|
||||
nsIDOMNode* node = nsnull;
|
||||
nsresult rv = domDoc->QueryInterface(NS_GET_IID(nsIDOMNode), (void**)&node);
|
||||
// nb: error check
|
||||
EndDocumentLoad(urlSpec, new bcDocument(domDoc));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void test() {
|
||||
printf("--DOMAccessor test start\n");
|
||||
nsresult rv = NS_OK;
|
||||
bcIDOMAccessor *accessor = NULL;
|
||||
rv = nsComponentManager::CreateInstance("bcDOMAccessor",
|
||||
nsnull,
|
||||
NS_GET_IID(bcIDOMAccessor),
|
||||
(void**)&accessor);
|
||||
if (NS_FAILED(rv)) {
|
||||
printf(" === [debug] can not load bcDOMAccessor\n");
|
||||
return;
|
||||
}
|
||||
NS_WITH_SERVICE(nsIDocumentLoader, docLoaderService, kDocLoaderServiceCID, &rv);
|
||||
if (NS_FAILED(rv) || !docLoaderService) {
|
||||
printf("=== no doc loader found...\n");
|
||||
} else {
|
||||
rv = docLoaderService->AddObserver((nsIDocumentLoaderObserver*)(new bcDOMAccessor(accessor)));
|
||||
if (NS_FAILED(rv)) {
|
||||
printf("=== AddObserver(DOMAccessor) failed x\n", rv);
|
||||
}
|
||||
}
|
||||
printf("--DOMAccessor test end\n");
|
||||
}
|
||||
|
||||
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 runnig test *only*
|
||||
{
|
||||
if (counter == 0) {
|
||||
counter ++;
|
||||
printf("--DOMAccessor before test\n");
|
||||
test();
|
||||
printf("--DOMAccessor after test\n");
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
static nsIDOMDocument* GetDocument(nsIDocumentLoader* loader)
|
||||
{
|
||||
nsIDocShell* docshell = nsnull;
|
||||
nsISupports* container = nsnull;
|
||||
nsIContentViewer* contentv = nsnull;
|
||||
nsIDocumentViewer* docv = nsnull;
|
||||
nsIDocument* document = nsnull;
|
||||
nsIDOMDocument* domDoc = nsnull;
|
||||
|
||||
nsresult rv = loader->GetContainer(&container);
|
||||
if (NS_SUCCEEDED(rv) && container) {
|
||||
rv = container->QueryInterface(kIDocShellIID, (void**) &docshell);
|
||||
container->Release();
|
||||
if (NS_SUCCEEDED(rv) && docshell) {
|
||||
rv = docshell->GetContentViewer(&contentv);
|
||||
docshell->Release();
|
||||
if (NS_SUCCEEDED(rv) && contentv) {
|
||||
rv = contentv->QueryInterface(kIDocumentViewerIID, (void**) &docv);
|
||||
contentv->Release();
|
||||
if (NS_SUCCEEDED(rv) && docv) {
|
||||
rv = docv->GetDocument(document);
|
||||
docv->Release();
|
||||
if (NS_SUCCEEDED(rv) && document) {
|
||||
rv = document->QueryInterface(kIDOMDocumentIID, (void**) &domDoc);
|
||||
if (NS_SUCCEEDED(rv) && docv) {
|
||||
return domDoc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stderr,
|
||||
"=== GetDocument: failed: "
|
||||
"container=%x, webshell=%x, contentViewer=%x, "
|
||||
"documentViewer=%x, document=%x, "
|
||||
"domDocument=%x, error=%x\n",
|
||||
(unsigned) (void*) container,
|
||||
(unsigned) (void*) docshell,
|
||||
(unsigned) (void*) contentv,
|
||||
(unsigned) (void*) docv,
|
||||
(unsigned) (void*) document,
|
||||
(unsigned) (void*) domDoc,
|
||||
rv);
|
||||
return NULL;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
6b777772-1dd2-11b2-91bd-d3ab05f89834
|
||||
bcDOMAccessor
|
||||
bcDOMAccessor
|
||||
@@ -0,0 +1,56 @@
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
import org.mozilla.dom.Attr;
|
||||
import org.mozilla.dom.Node;
|
||||
import org.mozilla.dom.Document;
|
||||
import org.mozilla.dom.Element;
|
||||
import org.mozilla.dom.DOMTreeDumper;
|
||||
|
||||
|
||||
public class bcDOMAccessor implements bcIDOMAccessor {
|
||||
public bcDOMAccessor() {}
|
||||
public Object queryInterface(IID iid) {
|
||||
System.out.println("--[java]::queryInterface iid="+iid);
|
||||
Object result;
|
||||
if ( iid.equals(nsISupportsIID)
|
||||
|| iid.equals(bcIDOMAccessorIID)) {
|
||||
result = this;
|
||||
} else {
|
||||
result = null;
|
||||
}
|
||||
System.out.println("--[java]::queryInterface result=null "+(result==null));
|
||||
return result;
|
||||
}
|
||||
|
||||
public void endDocumentLoad(String url, Document doc) {
|
||||
System.out.println("=== GOT URL: " + url);
|
||||
if (url.startsWith("about")) {
|
||||
return;
|
||||
}
|
||||
new DOMTreeDumper().dumpToStream(System.out, doc);
|
||||
|
||||
}
|
||||
|
||||
static IID bcIDOMAccessorIID = new IID(bcIDOMAccessor.IID);
|
||||
static IID nsISupportsIID = new IID(nsISupports.IID);
|
||||
static {
|
||||
InterfaceRegistry.register("org.mozilla.dom.Attr");
|
||||
InterfaceRegistry.register("org.mozilla.dom.CDATASection");
|
||||
InterfaceRegistry.register("org.mozilla.dom.CharacterData");
|
||||
InterfaceRegistry.register("org.mozilla.dom.Comment");
|
||||
InterfaceRegistry.register("org.mozilla.dom.Document");
|
||||
InterfaceRegistry.register("org.mozilla.dom.DocumentFragment");
|
||||
InterfaceRegistry.register("org.mozilla.dom.DocumentType");
|
||||
InterfaceRegistry.register("org.mozilla.dom.DOMImplementation");
|
||||
InterfaceRegistry.register("org.mozilla.dom.Element");
|
||||
InterfaceRegistry.register("org.mozilla.dom.Entity");
|
||||
InterfaceRegistry.register("org.mozilla.dom.EntityReference");
|
||||
InterfaceRegistry.register("org.mozilla.dom.NamedNodeMap");
|
||||
InterfaceRegistry.register("org.mozilla.dom.Node");
|
||||
InterfaceRegistry.register("org.mozilla.dom.NodeList");
|
||||
InterfaceRegistry.register("org.mozilla.dom.Notation");
|
||||
InterfaceRegistry.register("org.mozilla.dom.ProcessingInstruction");
|
||||
InterfaceRegistry.register("org.mozilla.dom.Text");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#include "nsISupports.idl"
|
||||
#include "dom.idl"
|
||||
|
||||
#pragma prefix
|
||||
[scriptable, uuid(d0ee9960-9ecf-11d4-a983-00105ae3801e)]
|
||||
interface bcIDOMAccessor : nsISupports
|
||||
{
|
||||
void endDocumentLoad(in string url, in Document doc);
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from bcIDOMAccessor.idl.
|
||||
*/
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
import org.mozilla.dom.*;
|
||||
|
||||
|
||||
/**
|
||||
* Interface bcIDOMAccessor
|
||||
*
|
||||
* IID: 0xd0ee9960-9ecf-11d4-a983-00105ae3801e
|
||||
*/
|
||||
|
||||
public interface bcIDOMAccessor extends nsISupports
|
||||
{
|
||||
public static final String IID =
|
||||
"d0ee9960-9ecf-11d4-a983-00105ae3801e";
|
||||
|
||||
|
||||
/* void endDocumentLoad (in string url, in Document doc); */
|
||||
public void endDocumentLoad(String url, Document doc);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
66
mozilla/java/dom/blackconnect/dom/accessor/makefile.win
Normal file
66
mozilla/java/dom/blackconnect/dom/accessor/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):
|
||||
# Denis Sharypov <sdv@sparc.spb.su>
|
||||
#
|
||||
|
||||
|
||||
DEPTH = ..\..\..\..\..
|
||||
topsrcdir = ..\..\..\..\..
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
MODULE=DOMAccessor
|
||||
COMPONENT=1
|
||||
DLLNAME=$(MODULE)
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\bcIDOMAccessor.idl \
|
||||
$(NULL)
|
||||
|
||||
OBJS = \
|
||||
.\$(OBJDIR)\bcDOMAccessor.obj \
|
||||
$(NULL)
|
||||
|
||||
LLIBS=$(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom.lib $(DIST)\lib\javadomstubs.lib
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
bcDOMAccessor.jar.comp: manifest bcDOMAccessor.class bcDOMAccessor.class
|
||||
$(JDKHOME)\bin\jar cvfm bcDOMAccessor.jar.comp manifest *.class
|
||||
|
||||
.SUFFIXES: .java .class
|
||||
|
||||
.java.class:
|
||||
$(JDKHOME)\bin\javac -classpath $(CLASSPATH) $<
|
||||
|
||||
install-component: bcDOMAccessor.jar.comp bcDOMAccessor.jar.info $(DLL)
|
||||
copy bcDOMAccessor.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\bcDOMAccessor.jar.*
|
||||
clobber_all:: clobber-java
|
||||
install:: install-component
|
||||
1
mozilla/java/dom/blackconnect/dom/accessor/manifest
Normal file
1
mozilla/java/dom/blackconnect/dom/accessor/manifest
Normal file
@@ -0,0 +1 @@
|
||||
Component-Class: bcDOMAccessor
|
||||
40
mozilla/java/dom/blackconnect/dom/classes/Makefile.in
Normal file
40
mozilla/java/dom/blackconnect/dom/classes/Makefile.in
Normal file
@@ -0,0 +1,40 @@
|
||||
#!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):
|
||||
|
||||
DEPTH = ../../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
IGNORE_MANIFEST=1
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
JDIRS = org/mozilla/dom \
|
||||
$(NULL)
|
||||
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
JAVAC_PROG = $(JDKHOME)/bin/javac
|
||||
JAVAC_FLAGS = -classpath $(CLASSPATH) -d $(JAVA_DESTPATH)
|
||||
JAVAC = $(JAVAC_PROG) $(JAVAC_FLAGS)
|
||||
|
||||
35
mozilla/java/dom/blackconnect/dom/classes/makefile.win
Normal file
35
mozilla/java/dom/blackconnect/dom/classes/makefile.win
Normal file
@@ -0,0 +1,35 @@
|
||||
#
|
||||
# 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):
|
||||
|
||||
IGNORE_MANIFEST=1
|
||||
DEPTH = ..\..\..\..\..
|
||||
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
include <$(DEPTH)\config\config.mak>
|
||||
|
||||
JDIRS = org\mozilla\dom \
|
||||
$(NULL)
|
||||
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
include <$(DEPTH)\config\javarules.mak>
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from dom.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
|
||||
|
||||
/**
|
||||
* Interface Attr
|
||||
*
|
||||
* IID: 0x09e31950-9ad5-11d4-a983-00105ae3801e
|
||||
*/
|
||||
|
||||
public interface Attr extends Node
|
||||
{
|
||||
public static final String IID =
|
||||
"09e31950-9ad5-11d4-a983-00105ae3801e";
|
||||
|
||||
|
||||
/* readonly attribute DOMString name; */
|
||||
public String getName();
|
||||
|
||||
/* readonly attribute boolean specified; */
|
||||
public boolean getSpecified();
|
||||
|
||||
/* attribute DOMString value; */
|
||||
public String getValue();
|
||||
public void setValue(String value);
|
||||
|
||||
/* readonly attribute Element ownerElement; */
|
||||
public Element getOwnerElement();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from dom.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
|
||||
|
||||
/**
|
||||
* Interface CDATASection
|
||||
*
|
||||
* IID: 0x0b813520-9ad5-11d4-a983-00105ae3801e
|
||||
*/
|
||||
|
||||
public interface CDATASection extends Text
|
||||
{
|
||||
public static final String IID =
|
||||
"0b813520-9ad5-11d4-a983-00105ae3801e";
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from dom.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
import org.w3c.dom.DOMException;
|
||||
|
||||
|
||||
/**
|
||||
* Interface CharacterData
|
||||
*
|
||||
* IID: 0x0965cbf0-9ad5-11d4-a983-00105ae3801e
|
||||
*/
|
||||
|
||||
public interface CharacterData extends Node
|
||||
{
|
||||
public static final String IID =
|
||||
"0965cbf0-9ad5-11d4-a983-00105ae3801e";
|
||||
|
||||
|
||||
/* attribute DOMString data; */
|
||||
public String getData();
|
||||
public void setData(String value);
|
||||
|
||||
/* readonly attribute unsigned long length; */
|
||||
public int getLength();
|
||||
|
||||
/* DOMString substringData (in unsigned long offset, in unsigned long count) raises (DOMException); */
|
||||
public String substringData(int offset, int count) throws DOMException;
|
||||
|
||||
/* void appendData (in DOMString arg) raises (DOMException); */
|
||||
public void appendData(String arg) throws DOMException;
|
||||
|
||||
/* void insertData (in unsigned long offset, in DOMString arg) raises (DOMException); */
|
||||
public void insertData(int offset, String arg) throws DOMException;
|
||||
|
||||
/* void deleteData (in unsigned long offset, in unsigned long count) raises (DOMException); */
|
||||
public void deleteData(int offset, int count) throws DOMException;
|
||||
|
||||
/* void replaceData (in unsigned long offset, in unsigned long count, in DOMString arg) raises (DOMException); */
|
||||
public void replaceData(int offset, int count, String arg) throws DOMException;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from dom.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
|
||||
|
||||
/**
|
||||
* Interface Comment
|
||||
*
|
||||
* IID: 0x0ae9ed90-9ad5-11d4-a983-00105ae3801e
|
||||
*/
|
||||
|
||||
public interface Comment extends CharacterData
|
||||
{
|
||||
public static final String IID =
|
||||
"0ae9ed90-9ad5-11d4-a983-00105ae3801e";
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from dom.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
import org.w3c.dom.DOMException;
|
||||
|
||||
|
||||
/**
|
||||
* Interface DOMImplementation
|
||||
*
|
||||
* IID: 0x0776b330-9ad5-11d4-a983-00105ae3801e
|
||||
*/
|
||||
|
||||
public interface DOMImplementation extends nsISupports
|
||||
{
|
||||
public static final String IID =
|
||||
"0776b330-9ad5-11d4-a983-00105ae3801e";
|
||||
|
||||
|
||||
/* boolean hasFeature (in DOMString feature, in DOMString version); */
|
||||
public boolean hasFeature(String feature, String version);
|
||||
|
||||
/* DocumentType createDocumentType (in DOMString qualifiedName, in DOMString publicId, in DOMString systemId) raises (DOMException); */
|
||||
public DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) throws DOMException;
|
||||
|
||||
/* Document createDocument (in DOMString namespaceURI, in DOMString qualifiedName, in DocumentType doctype) raises (DOMException); */
|
||||
public Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype) throws DOMException;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,224 @@
|
||||
/*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.0 (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 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): Denis Sharypov <sdv@sparc.spb.su>
|
||||
*
|
||||
*/
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
public class DOMTreeDumper {
|
||||
|
||||
private String name;
|
||||
private boolean debug;
|
||||
private PrintStream ps;
|
||||
private boolean inA;
|
||||
private final String[] endTagForbiddenNames = {"AREA",
|
||||
"BASE",
|
||||
"BASEFONT",
|
||||
"BR",
|
||||
"COL",
|
||||
"FRAME",
|
||||
"HR",
|
||||
"IMG",
|
||||
"INPUT",
|
||||
"ISINDEX",
|
||||
"LINK",
|
||||
"META",
|
||||
"PARAM"};
|
||||
|
||||
public DOMTreeDumper() {
|
||||
this("DOMTreeDumper", true);
|
||||
}
|
||||
|
||||
public DOMTreeDumper(boolean debug) {
|
||||
this("DOMTreeDumper", debug);
|
||||
}
|
||||
|
||||
public DOMTreeDumper(String name) {
|
||||
this(name, true);
|
||||
}
|
||||
|
||||
public DOMTreeDumper(String name, boolean debug) {
|
||||
this.name = name;
|
||||
this.debug = debug;
|
||||
}
|
||||
|
||||
private void dumpDocument(Document doc) {
|
||||
if (doc == null) return;
|
||||
Element element = doc.getDocumentElement();
|
||||
if (element == null) return;
|
||||
element.normalize();
|
||||
// DocumentType dt = doc.getDoctype();
|
||||
// dumpNode(dt);
|
||||
|
||||
dumpNode(element);
|
||||
ps.println();
|
||||
ps.flush();
|
||||
|
||||
element = null;
|
||||
doc = null;
|
||||
}
|
||||
|
||||
private void dumpNode(Node node) {
|
||||
dumpNode(node, false);
|
||||
}
|
||||
|
||||
private void dumpNode(Node node, boolean isMapNode) {
|
||||
if (node == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
int type = node.getNodeType();
|
||||
String name = node.getNodeName();
|
||||
String value = node.getNodeValue();
|
||||
|
||||
switch (type) {
|
||||
case Node.ELEMENT_NODE:
|
||||
if (name.equals("A")) inA = true;
|
||||
if (!(inA || name.equals("BR"))) {
|
||||
ps.println();
|
||||
}
|
||||
ps.print("<" + name);
|
||||
dumpAttributes(node);
|
||||
ps.print(">");
|
||||
dumpChildren(node);
|
||||
if (name.equals("A")) inA = false;
|
||||
if (!endTagForbidden(name)) {
|
||||
ps.print("</" + node.getNodeName() + ">");
|
||||
}
|
||||
break;
|
||||
case Node.ATTRIBUTE_NODE:
|
||||
ps.print(" " + name.toUpperCase() + "=\"" + value + "\"");
|
||||
break;
|
||||
case Node.TEXT_NODE:
|
||||
if (!node.getParentNode().getNodeName().equals("PRE")) {
|
||||
value = value.trim();
|
||||
}
|
||||
if (!value.equals("")) {
|
||||
if (!inA) {
|
||||
ps.println();
|
||||
}
|
||||
ps.print(canonicalize(value));
|
||||
}
|
||||
break;
|
||||
case Node.COMMENT_NODE:
|
||||
ps.print("\n<!--" + value + "-->");
|
||||
break;
|
||||
case Node.CDATA_SECTION_NODE:
|
||||
case Node.ENTITY_REFERENCE_NODE:
|
||||
case Node.ENTITY_NODE:
|
||||
case Node.PROCESSING_INSTRUCTION_NODE:
|
||||
case Node.DOCUMENT_NODE:
|
||||
case Node.DOCUMENT_TYPE_NODE:
|
||||
case Node.DOCUMENT_FRAGMENT_NODE:
|
||||
case Node.NOTATION_NODE:
|
||||
ps.println("\n<!-- NOT HANDLED: " + name +
|
||||
" value=" + value + " -->");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void dumpAttributes(Node node) {
|
||||
NamedNodeMap map = node.getAttributes();
|
||||
if (map == null) return;
|
||||
int length = map.getLength();
|
||||
for (int i=0; i < length; i++) {
|
||||
Node item = map.item(i);
|
||||
dumpNode(item, true);
|
||||
}
|
||||
}
|
||||
|
||||
private void dumpChildren(Node node) {
|
||||
NodeList children = node.getChildNodes();
|
||||
int length = 0;
|
||||
boolean hasChildren = ((children != null) && ((length = children.getLength()) > 0));
|
||||
if (!hasChildren) {
|
||||
return;
|
||||
}
|
||||
for (int i=0; i < length; i++) {
|
||||
dumpNode(children.item(i), false);
|
||||
}
|
||||
if (!inA) {
|
||||
ps.println();
|
||||
}
|
||||
}
|
||||
|
||||
private String canonicalize(String str) {
|
||||
StringBuffer in = new StringBuffer(str);
|
||||
int length = in.length();
|
||||
StringBuffer out = new StringBuffer(length);
|
||||
char c;
|
||||
for (int i = 0; i < length; i++) {
|
||||
switch (c = in.charAt(i)) {
|
||||
case '&' :
|
||||
out.append("&");
|
||||
break;
|
||||
case '<':
|
||||
out.append("<");
|
||||
break;
|
||||
case '>':
|
||||
out.append(">");
|
||||
break;
|
||||
case '\u00A0':
|
||||
out.append(" ");
|
||||
break;
|
||||
default:
|
||||
out.append(c);
|
||||
}
|
||||
}
|
||||
return out.toString();
|
||||
}
|
||||
|
||||
private boolean endTagForbidden(String name) {
|
||||
for (int i = 0; i < endTagForbiddenNames.length; i++) {
|
||||
if (name.equals(endTagForbiddenNames[i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void dumpToFile(String fileName, Document doc) {
|
||||
try {
|
||||
FileOutputStream fos = new FileOutputStream(fileName);
|
||||
ps = new PrintStream(new BufferedOutputStream(fos, 1024));
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
return;
|
||||
}
|
||||
dbg("dumping to " + fileName);
|
||||
dumpDocument(doc);
|
||||
dbg("finished dumping...");
|
||||
}
|
||||
|
||||
public void dumpToStream(PrintStream ps, Document doc) {
|
||||
this.ps = ps;
|
||||
dbg("dumping to stream...");
|
||||
dumpDocument(doc);
|
||||
dbg("finished dumping...");
|
||||
}
|
||||
|
||||
private void dbg(String str) {
|
||||
if (debug) {
|
||||
System.out.println(name + ": " + str);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from dom.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
import org.w3c.dom.DOMException;
|
||||
|
||||
|
||||
/**
|
||||
* Interface Document
|
||||
*
|
||||
* IID: 0x0e81d470-9ad5-11d4-a983-00105ae3801e
|
||||
*/
|
||||
|
||||
public interface Document extends Node
|
||||
{
|
||||
public static final String IID =
|
||||
"0e81d470-9ad5-11d4-a983-00105ae3801e";
|
||||
|
||||
|
||||
/* readonly attribute DocumentType doctype; */
|
||||
public DocumentType getDoctype();
|
||||
|
||||
/* readonly attribute DOMImplementation implementation; */
|
||||
public DOMImplementation getImplementation();
|
||||
|
||||
/* readonly attribute Element documentElement; */
|
||||
public Element getDocumentElement();
|
||||
|
||||
/* Element createElement (in DOMString tagName) raises (DOMException); */
|
||||
public Element createElement(String tagName) throws DOMException;
|
||||
|
||||
/* DocumentFragment createDocumentFragment (); */
|
||||
public DocumentFragment createDocumentFragment();
|
||||
|
||||
/* Text createTextNode (in DOMString data); */
|
||||
public Text createTextNode(String data);
|
||||
|
||||
/* Comment createComment (in DOMString data); */
|
||||
public Comment createComment(String data);
|
||||
|
||||
/* CDATASection createCDATASection (in DOMString data) raises (DOMException); */
|
||||
public CDATASection createCDATASection(String data) throws DOMException;
|
||||
|
||||
/* ProcessingInstruction createProcessingInstruction (in DOMString target, in DOMString data) raises (DOMException); */
|
||||
public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException;
|
||||
|
||||
/* Attr createAttribute (in DOMString name) raises (DOMException); */
|
||||
public Attr createAttribute(String name) throws DOMException;
|
||||
|
||||
/* EntityReference createEntityReference (in DOMString name) raises (DOMException); */
|
||||
public EntityReference createEntityReference(String name) throws DOMException;
|
||||
|
||||
/* NodeList getElementsByTagName (in DOMString tagname); */
|
||||
public NodeList getElementsByTagName(String tagname);
|
||||
|
||||
/* Node importNode (in Node importedNode, in boolean deep) raises (DOMException); */
|
||||
public Node importNode(Node importedNode, boolean deep) throws DOMException;
|
||||
|
||||
/* Element createElementNS (in DOMString namespaceURI, in DOMString qualifiedName) raises (DOMException); */
|
||||
public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException;
|
||||
|
||||
/* Attr createAttributeNS (in DOMString namespaceURI, in DOMString qualifiedName) raises (DOMException); */
|
||||
public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException;
|
||||
|
||||
/* NodeList getElementsByTagNameNS (in DOMString namespaceURI, in DOMString localName); */
|
||||
public NodeList getElementsByTagNameNS(String namespaceURI, String localName);
|
||||
|
||||
/* Element getElementById (in DOMString elementId); */
|
||||
public Element getElementById(String elementId);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from dom.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
|
||||
|
||||
/**
|
||||
* Interface DocumentFragment
|
||||
*
|
||||
* IID: 0x0e249e00-9ad5-11d4-a983-00105ae3801e
|
||||
*/
|
||||
|
||||
public interface DocumentFragment extends Node
|
||||
{
|
||||
public static final String IID =
|
||||
"0e249e00-9ad5-11d4-a983-00105ae3801e";
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from dom.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
|
||||
|
||||
/**
|
||||
* Interface DocumentType
|
||||
*
|
||||
* IID: 0x0c07ada0-9ad5-11d4-a983-00105ae3801e
|
||||
*/
|
||||
|
||||
public interface DocumentType extends Node
|
||||
{
|
||||
public static final String IID =
|
||||
"0c07ada0-9ad5-11d4-a983-00105ae3801e";
|
||||
|
||||
|
||||
/* readonly attribute DOMString name; */
|
||||
public String getName();
|
||||
|
||||
/* readonly attribute NamedNodeMap entities; */
|
||||
public NamedNodeMap getEntities();
|
||||
|
||||
/* readonly attribute NamedNodeMap notations; */
|
||||
public NamedNodeMap getNotations();
|
||||
|
||||
/* readonly attribute DOMString publicId; */
|
||||
public String getPublicId();
|
||||
|
||||
/* readonly attribute DOMString systemId; */
|
||||
public String getSystemId();
|
||||
|
||||
/* readonly attribute DOMString internalSubset; */
|
||||
public String getInternalSubset();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from dom.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
import org.w3c.dom.DOMException;
|
||||
|
||||
|
||||
/**
|
||||
* Interface Element
|
||||
*
|
||||
* IID: 0x0a7d6f40-9ad5-11d4-a983-00105ae3801e
|
||||
*/
|
||||
|
||||
public interface Element extends Node
|
||||
{
|
||||
public static final String IID =
|
||||
"0a7d6f40-9ad5-11d4-a983-00105ae3801e";
|
||||
|
||||
|
||||
/* readonly attribute DOMString tagName; */
|
||||
public String getTagName();
|
||||
|
||||
/* DOMString getAttribute (in DOMString name); */
|
||||
public String getAttribute(String name);
|
||||
|
||||
/* void setAttribute (in DOMString name, in DOMString value) raises (DOMException); */
|
||||
public void setAttribute(String name, String value) throws DOMException;
|
||||
|
||||
/* void removeAttribute (in DOMString name) raises (DOMException); */
|
||||
public void removeAttribute(String name) throws DOMException;
|
||||
|
||||
/* Attr getAttributeNode (in DOMString name); */
|
||||
public Attr getAttributeNode(String name);
|
||||
|
||||
/* Attr setAttributeNode (in Attr newAttr) raises (DOMException); */
|
||||
public Attr setAttributeNode(Attr newAttr) throws DOMException;
|
||||
|
||||
/* Attr removeAttributeNode (in Attr oldAttr) raises (DOMException); */
|
||||
public Attr removeAttributeNode(Attr oldAttr) throws DOMException;
|
||||
|
||||
/* NodeList getElementsByTagName (in DOMString name); */
|
||||
public NodeList getElementsByTagName(String name);
|
||||
|
||||
/* DOMString getAttributeNS (in DOMString namespaceURI, in DOMString localName); */
|
||||
public String getAttributeNS(String namespaceURI, String localName);
|
||||
|
||||
/* void setAttributeNS (in DOMString namespaceURI, in DOMString qualifiedName, in DOMString value) raises (DOMException); */
|
||||
public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException;
|
||||
|
||||
/* void removeAttributeNS (in DOMString namespaceURI, in DOMString localName) raises (DOMException); */
|
||||
public void removeAttributeNS(String namespaceURI, String localName) throws DOMException;
|
||||
|
||||
/* Attr getAttributeNodeNS (in DOMString namespaceURI, in DOMString localName); */
|
||||
public Attr getAttributeNodeNS(String namespaceURI, String localName);
|
||||
|
||||
/* Attr setAttributeNodeNS (in Attr newAttr) raises (DOMException); */
|
||||
public Attr setAttributeNodeNS(Attr newAttr) throws DOMException;
|
||||
|
||||
/* NodeList getElementsByTagNameNS (in DOMString namespaceURI, in DOMString localName); */
|
||||
public NodeList getElementsByTagNameNS(String namespaceURI, String localName);
|
||||
|
||||
/* boolean hasAttribute (in DOMString name); */
|
||||
public boolean hasAttribute(String name);
|
||||
|
||||
/* boolean hasAttributeNS (in DOMString namespaceURI, in DOMString localName); */
|
||||
public boolean hasAttributeNS(String namespaceURI, String localName);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from dom.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
|
||||
|
||||
/**
|
||||
* Interface Entity
|
||||
*
|
||||
* IID: 0x0cf30080-9ad5-11d4-a983-00105ae3801e
|
||||
*/
|
||||
|
||||
public interface Entity extends Node
|
||||
{
|
||||
public static final String IID =
|
||||
"0cf30080-9ad5-11d4-a983-00105ae3801e";
|
||||
|
||||
|
||||
/* readonly attribute DOMString publicId; */
|
||||
public String getPublicId();
|
||||
|
||||
/* readonly attribute DOMString systemId; */
|
||||
public String getSystemId();
|
||||
|
||||
/* readonly attribute DOMString notationName; */
|
||||
public String getNotationName();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from dom.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
|
||||
|
||||
/**
|
||||
* Interface EntityReference
|
||||
*
|
||||
* IID: 0x0d4eafc0-9ad5-11d4-a983-00105ae3801e
|
||||
*/
|
||||
|
||||
public interface EntityReference extends Node
|
||||
{
|
||||
public static final String IID =
|
||||
"0d4eafc0-9ad5-11d4-a983-00105ae3801e";
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from dom.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
import org.w3c.dom.DOMException;
|
||||
|
||||
|
||||
/**
|
||||
* Interface NamedNodeMap
|
||||
*
|
||||
* IID: 0x08f4b810-9ad5-11d4-a983-00105ae3801e
|
||||
*/
|
||||
|
||||
public interface NamedNodeMap extends nsISupports
|
||||
{
|
||||
public static final String IID =
|
||||
"08f4b810-9ad5-11d4-a983-00105ae3801e";
|
||||
|
||||
|
||||
/* Node getNamedItem (in DOMString name); */
|
||||
public Node getNamedItem(String name);
|
||||
|
||||
/* Node setNamedItem (in Node arg) raises (DOMException); */
|
||||
public Node setNamedItem(Node arg) throws DOMException;
|
||||
|
||||
/* Node removeNamedItem (in DOMString name) raises (DOMException); */
|
||||
public Node removeNamedItem(String name) throws DOMException;
|
||||
|
||||
/* Node item (in unsigned long index); */
|
||||
public Node item(int index);
|
||||
|
||||
/* readonly attribute unsigned long length; */
|
||||
public int getLength();
|
||||
|
||||
/* Node getNamedItemNS (in DOMString namespaceURI, in DOMString localName); */
|
||||
public Node getNamedItemNS(String namespaceURI, String localName);
|
||||
|
||||
/* Node setNamedItemNS (in Node arg) raises (DOMException); */
|
||||
public Node setNamedItemNS(Node arg) throws DOMException;
|
||||
|
||||
/* Node removeNamedItemNS (in DOMString namespaceURI, in DOMString localName) raises (DOMException); */
|
||||
public Node removeNamedItemNS(String namespaceURI, String localName) throws DOMException;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from dom.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
import org.w3c.dom.DOMException;
|
||||
|
||||
/**
|
||||
* Interface Node
|
||||
*
|
||||
* IID: 0x082f98e0-9ad5-11d4-a983-00105ae3801e
|
||||
*/
|
||||
|
||||
public interface Node extends nsISupports
|
||||
{
|
||||
public static final String IID =
|
||||
"082f98e0-9ad5-11d4-a983-00105ae3801e";
|
||||
|
||||
|
||||
/* const unsigned short ELEMENT_NODE = 1; */
|
||||
public static final short ELEMENT_NODE = 1;
|
||||
|
||||
/* const unsigned short ATTRIBUTE_NODE = 2; */
|
||||
public static final short ATTRIBUTE_NODE = 2;
|
||||
|
||||
/* const unsigned short TEXT_NODE = 3; */
|
||||
public static final short TEXT_NODE = 3;
|
||||
|
||||
/* const unsigned short CDATA_SECTION_NODE = 4; */
|
||||
public static final short CDATA_SECTION_NODE = 4;
|
||||
|
||||
/* const unsigned short ENTITY_REFERENCE_NODE = 5; */
|
||||
public static final short ENTITY_REFERENCE_NODE = 5;
|
||||
|
||||
/* const unsigned short ENTITY_NODE = 6; */
|
||||
public static final short ENTITY_NODE = 6;
|
||||
|
||||
/* const unsigned short PROCESSING_INSTRUCTION_NODE = 7; */
|
||||
public static final short PROCESSING_INSTRUCTION_NODE = 7;
|
||||
|
||||
/* const unsigned short COMMENT_NODE = 8; */
|
||||
public static final short COMMENT_NODE = 8;
|
||||
|
||||
/* const unsigned short DOCUMENT_NODE = 9; */
|
||||
public static final short DOCUMENT_NODE = 9;
|
||||
|
||||
/* const unsigned short DOCUMENT_TYPE_NODE = 10; */
|
||||
public static final short DOCUMENT_TYPE_NODE = 10;
|
||||
|
||||
/* const unsigned short DOCUMENT_FRAGMENT_NODE = 11; */
|
||||
public static final short DOCUMENT_FRAGMENT_NODE = 11;
|
||||
|
||||
/* const unsigned short NOTATION_NODE = 12; */
|
||||
public static final short NOTATION_NODE = 12;
|
||||
|
||||
/* readonly attribute DOMString nodeName; */
|
||||
public String getNodeName();
|
||||
|
||||
/* attribute DOMString nodeValue; */
|
||||
public String getNodeValue();
|
||||
public void setNodeValue(String value);
|
||||
|
||||
/* readonly attribute unsigned short nodeType; */
|
||||
public short getNodeType();
|
||||
|
||||
/* readonly attribute Node parentNode; */
|
||||
public Node getParentNode();
|
||||
|
||||
/* readonly attribute NodeList childNodes; */
|
||||
public NodeList getChildNodes();
|
||||
|
||||
/* readonly attribute Node firstChild; */
|
||||
public Node getFirstChild();
|
||||
|
||||
/* readonly attribute Node lastChild; */
|
||||
public Node getLastChild();
|
||||
|
||||
/* readonly attribute Node previousSibling; */
|
||||
public Node getPreviousSibling();
|
||||
|
||||
/* readonly attribute Node nextSibling; */
|
||||
public Node getNextSibling();
|
||||
|
||||
/* readonly attribute NamedNodeMap attributes; */
|
||||
public NamedNodeMap getAttributes();
|
||||
|
||||
/* readonly attribute Document ownerDocument; */
|
||||
public Document getOwnerDocument();
|
||||
|
||||
/* Node insertBefore (in Node newChild, in Node refChild) raises (DOMException); */
|
||||
public Node insertBefore(Node newChild, Node refChild) throws DOMException;
|
||||
|
||||
/* Node replaceChild (in Node newChild, in Node oldChild) raises (DOMException); */
|
||||
public Node replaceChild(Node newChild, Node oldChild) throws DOMException;
|
||||
|
||||
/* Node removeChild (in Node oldChild) raises (DOMException); */
|
||||
public Node removeChild(Node oldChild) throws DOMException;
|
||||
|
||||
/* Node appendChild (in Node newChild) raises (DOMException); */
|
||||
public Node appendChild(Node newChild) throws DOMException;
|
||||
|
||||
/* boolean hasChildNodes (); */
|
||||
public boolean hasChildNodes();
|
||||
|
||||
/* Node cloneNode (in boolean deep); */
|
||||
public Node cloneNode(boolean deep);
|
||||
|
||||
/* void normalize (); */
|
||||
public void normalize();
|
||||
|
||||
/* boolean supports (in DOMString feature, in DOMString version); */
|
||||
public boolean supports(String feature, String version);
|
||||
|
||||
/* readonly attribute DOMString namespaceURI; */
|
||||
public String getNamespaceURI();
|
||||
|
||||
/* attribute DOMString prefix; */
|
||||
public String getPrefix();
|
||||
public void setPrefix(String value);
|
||||
|
||||
/* readonly attribute DOMString localName; */
|
||||
public String getLocalName();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from dom.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
|
||||
|
||||
/**
|
||||
* Interface NodeList
|
||||
*
|
||||
* IID: 0x0895fa70-9ad5-11d4-a983-00105ae3801e
|
||||
*/
|
||||
|
||||
public interface NodeList extends nsISupports
|
||||
{
|
||||
public static final String IID =
|
||||
"0895fa70-9ad5-11d4-a983-00105ae3801e";
|
||||
|
||||
|
||||
/* Node item (in unsigned long index); */
|
||||
public Node item(int index);
|
||||
|
||||
/* readonly attribute unsigned long length; */
|
||||
public int getLength();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from dom.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
|
||||
|
||||
/**
|
||||
* Interface Notation
|
||||
*
|
||||
* IID: 0x0c7a48b0-9ad5-11d4-a983-00105ae3801e
|
||||
*/
|
||||
|
||||
public interface Notation extends Node
|
||||
{
|
||||
public static final String IID =
|
||||
"0c7a48b0-9ad5-11d4-a983-00105ae3801e";
|
||||
|
||||
|
||||
/* readonly attribute DOMString publicId; */
|
||||
public String getPublicId();
|
||||
|
||||
/* readonly attribute DOMString systemId; */
|
||||
public String getSystemId();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from dom.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
|
||||
|
||||
/**
|
||||
* Interface ProcessingInstruction
|
||||
*
|
||||
* IID: 0x0db69880-9ad5-11d4-a983-00105ae3801e
|
||||
*/
|
||||
|
||||
public interface ProcessingInstruction extends Node
|
||||
{
|
||||
public static final String IID =
|
||||
"0db69880-9ad5-11d4-a983-00105ae3801e";
|
||||
|
||||
|
||||
/* readonly attribute DOMString target; */
|
||||
public String getTarget();
|
||||
|
||||
/* attribute DOMString data; */
|
||||
public String getData();
|
||||
public void setData(String value);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from dom.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
import org.w3c.dom.DOMException;
|
||||
|
||||
|
||||
/**
|
||||
* Interface Text
|
||||
*
|
||||
* IID: 0x0eefd9f0-9ad5-11d4-a983-00105ae3801e
|
||||
*/
|
||||
|
||||
public interface Text extends CharacterData
|
||||
{
|
||||
public static final String IID =
|
||||
"0eefd9f0-9ad5-11d4-a983-00105ae3801e";
|
||||
|
||||
|
||||
/* Text splitText (in unsigned long offset) raises (DOMException); */
|
||||
public Text splitText(int offset) throws DOMException;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
1
mozilla/java/dom/blackconnect/dom/classes/org/mozilla/dom/doit.bat
Executable file
1
mozilla/java/dom/blackconnect/dom/classes/org/mozilla/dom/doit.bat
Executable file
@@ -0,0 +1 @@
|
||||
C:\jdk1.3\bin\javac -classpath .;C:\JDK1.3\jre\lib\rt.jar;;C:\JDK1.3\jre\lib\jaws.jar;d:\wrk\mozilla\dist\classes;;d:\wrk\classes;;d:\wrk\mozilla\dist\classes -d d:\wrk\mozilla\dist\classes Attr.java CDATASection.java CharacterData.java Comment.java Document.java DocumentFragment.java DocumentType.java DOMImplementation.java DOMTreeDumper.java Element.java Entity.java EntityReference.java NamedNodeMap.java Node.java NodeList.java Notation.java ProcessingInstruction.java Text.java
|
||||
32
mozilla/java/dom/blackconnect/dom/makefile.win
Normal file
32
mozilla/java/dom/blackconnect/dom/makefile.win
Normal file
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# 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):
|
||||
|
||||
IGNORE_MANIFEST=1
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the depth of the current directory relative to the
|
||||
#// root of NS
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH = ..\..\..\..
|
||||
|
||||
DIRS = classes stubs accessor
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
88
mozilla/java/dom/blackconnect/dom/readme
Normal file
88
mozilla/java/dom/blackconnect/dom/readme
Normal file
@@ -0,0 +1,88 @@
|
||||
About the project
|
||||
=================
|
||||
|
||||
The goal is to provide access to the DOM API provided
|
||||
by the mozilla browser using the java to xpcom bridge(Blackconnect).
|
||||
|
||||
The implementation currently consists of stubs between mozilla core DOM
|
||||
interfaces and core DOM interfaces defined in dom.idl (blackconnect
|
||||
requires scriptable interfaces), java interfaces generated from
|
||||
dom.idl and a DOMAccessor as an example of using the DOM API.
|
||||
|
||||
|
||||
Sources
|
||||
=======
|
||||
|
||||
The sources are located in mozilla/java/dom
|
||||
Subdirectories
|
||||
|
||||
classes - contains classes generated automatically from
|
||||
idl definition of core DOM interfaces (stubs/dom.idl)
|
||||
using xpidl compiler (mozilla/java/xpcom/java/xpidl)
|
||||
and a sample DOMTreeDumper class that dumps an html
|
||||
document source using its DOM tree.
|
||||
|
||||
stubs - stubs between mozilla core DOM interfaces and
|
||||
core DOM interfaces defined in dom.idl
|
||||
|
||||
accessor - a sample java component which demonstrates the
|
||||
use of the DOM API from java via blackconnect
|
||||
|
||||
|
||||
Building
|
||||
========
|
||||
Requirenments:
|
||||
--------------
|
||||
- you need to build the blackconnect bridge
|
||||
mozilla/java/xpcom and to have all the
|
||||
environment variables set required for
|
||||
building blackconnect
|
||||
- mozilla_Netscape_20000922_BRANCH mozilla build
|
||||
- JDK1.3
|
||||
- Perl 5 must be in your path
|
||||
- JDKHOME environment variable set to your JDK dir
|
||||
- CLASSPATH environment variable set to contain
|
||||
mozilla/dist/classes directory and
|
||||
org.w3c.dom.DOMException class. The source can be found at
|
||||
http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/java-binding.html
|
||||
|
||||
Solaris and Linux:
|
||||
------------------
|
||||
goto mozilla/java/dom directory and type "gmake"
|
||||
|
||||
Windows NT:
|
||||
-----------
|
||||
goto mozilla/java/dom directory and type "nmake /f makefile.win"
|
||||
|
||||
|
||||
Running
|
||||
=======
|
||||
After building a component run a mozilla browser. The document
|
||||
sources will be dumped into console.
|
||||
|
||||
Using the Java DOM API
|
||||
======================
|
||||
|
||||
Directory accessor contains a sample java component which
|
||||
becomes a document load listener and dumps sources of documents
|
||||
being displayed in mozilla using their DOM trees.
|
||||
|
||||
if you have a C++ pointer to any core DOM mozilla interface nsIDOM<...>
|
||||
you need to wrap it into a corresponding scriptable stub interface
|
||||
bc<...> (e.g. nsIDOMDocument into bcDocument using
|
||||
bcDocument::bcDocument(nsIDOMDocument* ptr) constructor) and you
|
||||
can use it to pass to java as a class instance which implements
|
||||
a org.mozill.dom.Document interface using blackconnect.
|
||||
|
||||
An example works this way:
|
||||
A C++ implementation of a component gets a call via NSGetModule method,
|
||||
registrates itself as a document load listener, gets a reference to
|
||||
a java component and then pass references to all documents being
|
||||
displayed into a java component.
|
||||
|
||||
Notes:
|
||||
- Since exception passing mechanism is not yet implemented in blackconnect
|
||||
no DOMExceptions are raised.
|
||||
|
||||
- The mechanism used in a sample allows to modify any documents in any
|
||||
way provided by the DOM API, so there are no security restrictions at all.
|
||||
74
mozilla/java/dom/blackconnect/dom/stubs/Makefile.in
Normal file
74
mozilla/java/dom/blackconnect/dom/stubs/Makefile.in
Normal file
@@ -0,0 +1,74 @@
|
||||
#!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):
|
||||
#
|
||||
|
||||
|
||||
DEPTH = ../../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
LIBRARY_NAME = javadomstubs
|
||||
MODULE = javadomstubs
|
||||
XPIDLSRCS = dom.idl
|
||||
|
||||
CPPSRCS = bcNode.cpp \
|
||||
bcElement.cpp \
|
||||
bcAttr.cpp \
|
||||
bcNodeList.cpp \
|
||||
bcNamedNodeMap.cpp \
|
||||
bcDocument.cpp \
|
||||
bcCharacterData.cpp \
|
||||
bcText.cpp \
|
||||
bcComment.cpp \
|
||||
bcCDATASection.cpp \
|
||||
bcDocumentFragment.cpp \
|
||||
bcEntityReference.cpp \
|
||||
bcEntity.cpp \
|
||||
bcNotation.cpp \
|
||||
bcDocumentType.cpp \
|
||||
bcProcessingInstruction.cpp \
|
||||
bcDOMImplementation.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = bcNode.h \
|
||||
bcElement.h \
|
||||
bcAttr.h \
|
||||
bcNodeList.h \
|
||||
bcNamedNodeMap.h \
|
||||
bcDocument.h \
|
||||
bcCharacterData.h \
|
||||
bcText.h \
|
||||
bcComment.h \
|
||||
bcCDATASection.h \
|
||||
bcDocumentFragment.h \
|
||||
bcEntityReference.h \
|
||||
bcEntity.h \
|
||||
bcNotation.h \
|
||||
bcDocumentType.h \
|
||||
bcProcessingInstruction.h \
|
||||
bcDOMImplementation.h \
|
||||
$(NULL)
|
||||
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
56
mozilla/java/dom/blackconnect/dom/stubs/bcAttr.cpp
Normal file
56
mozilla/java/dom/blackconnect/dom/stubs/bcAttr.cpp
Normal file
@@ -0,0 +1,56 @@
|
||||
#include "bcAttr.h"
|
||||
#include "bcElement.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(bcAttr, Attr)
|
||||
|
||||
bcAttr::bcAttr(nsIDOMAttr* ptr)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
domPtr = ptr;
|
||||
nodePtr = new bcNode(ptr);
|
||||
}
|
||||
|
||||
bcAttr::~bcAttr()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString name; */
|
||||
NS_IMETHODIMP bcAttr::GetName(DOMString *aName)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetName(ret);
|
||||
*aName = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* readonly attribute boolean specified; */
|
||||
NS_IMETHODIMP bcAttr::GetSpecified(PRBool *aSpecified)
|
||||
{
|
||||
return domPtr->GetSpecified(aSpecified);
|
||||
}
|
||||
|
||||
/* attribute DOMString value; */
|
||||
NS_IMETHODIMP bcAttr::GetValue(DOMString *aValue)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetValue(ret);
|
||||
*aValue = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
NS_IMETHODIMP bcAttr::SetValue(DOMString aValue)
|
||||
{
|
||||
nsString val(aValue);
|
||||
nsresult rv = domPtr->SetValue(val);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* readonly attribute Element ownerElement; */
|
||||
NS_IMETHODIMP bcAttr::GetOwnerElement(Element * *aOwnerElement)
|
||||
{
|
||||
nsIDOMElement* ret = nsnull;
|
||||
nsresult rv = domPtr->GetOwnerElement(&ret);
|
||||
*aOwnerElement = new bcElement(ret);
|
||||
return rv;
|
||||
}
|
||||
26
mozilla/java/dom/blackconnect/dom/stubs/bcAttr.h
Normal file
26
mozilla/java/dom/blackconnect/dom/stubs/bcAttr.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef __bcAttr_h__
|
||||
#define __bcAttr_h__
|
||||
|
||||
#include "dom.h"
|
||||
#include "bcNode.h"
|
||||
#include "nsIDOMAttr.h"
|
||||
|
||||
#define DOM_ATTR_PTR(_attr_) (!_attr_ ? nsnull : ((bcAttr*)_attr_)->domPtr)
|
||||
#define NEW_BCATTR(_attr_) (!_attr_ ? nsnull : new bcAttr(_attr_))
|
||||
|
||||
class bcAttr : public Attr
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_ATTR
|
||||
NS_FORWARD_NODE(nodePtr->)
|
||||
|
||||
bcAttr(nsIDOMAttr* domPtr);
|
||||
virtual ~bcAttr();
|
||||
nsIDOMAttr* domPtr;
|
||||
private:
|
||||
bcNode* nodePtr;
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
#endif // __bcAttr_h__
|
||||
17
mozilla/java/dom/blackconnect/dom/stubs/bcCDATASection.cpp
Normal file
17
mozilla/java/dom/blackconnect/dom/stubs/bcCDATASection.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "bcCDATASection.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(bcCDATASection, CDATASection)
|
||||
|
||||
bcCDATASection::bcCDATASection(nsIDOMCDATASection* ptr)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
domPtr = ptr;
|
||||
textPtr = new bcText(ptr);
|
||||
}
|
||||
|
||||
bcCDATASection::~bcCDATASection()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
28
mozilla/java/dom/blackconnect/dom/stubs/bcCDATASection.h
Normal file
28
mozilla/java/dom/blackconnect/dom/stubs/bcCDATASection.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef __bcCDATASection_h__
|
||||
#define __bcCDATASection_h__
|
||||
|
||||
#include "dom.h"
|
||||
#include "nsIDOMCDATASection.h"
|
||||
#include "bcText.h"
|
||||
|
||||
#define DOM_CDATASECTION_PTR(_cdatasection_) (!_cdatasection_ ? nsnull : ((bcCDATASection*)_cdatasection_)->domPtr)
|
||||
#define NEW_BCCDATASECTION(_cdatasection_) (!_cdatasection_ ? nsnull : new bcCDATASection(_cdatasection_))
|
||||
|
||||
class bcCDATASection : public CDATASection
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_CDATASECTION
|
||||
NS_FORWARD_NODE(textPtr->)
|
||||
NS_FORWARD_CHARACTERDATA(textPtr->)
|
||||
NS_FORWARD_TEXT(textPtr->)
|
||||
|
||||
bcCDATASection(nsIDOMCDATASection* domPtr);
|
||||
virtual ~bcCDATASection();
|
||||
private:
|
||||
nsIDOMCDATASection* domPtr;
|
||||
bcText* textPtr;
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
#endif // __bcCDATASection_h__
|
||||
75
mozilla/java/dom/blackconnect/dom/stubs/bcCharacterData.cpp
Normal file
75
mozilla/java/dom/blackconnect/dom/stubs/bcCharacterData.cpp
Normal file
@@ -0,0 +1,75 @@
|
||||
#include "bcCharacterData.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(bcCharacterData, CharacterData)
|
||||
|
||||
bcCharacterData::bcCharacterData(nsIDOMCharacterData* ptr)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
domPtr = ptr;
|
||||
nodePtr = new bcNode(ptr);
|
||||
}
|
||||
|
||||
bcCharacterData::~bcCharacterData()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
/* attribute DOMString data; */
|
||||
NS_IMETHODIMP bcCharacterData::GetData(DOMString *aData)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetData(ret);
|
||||
*aData = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP bcCharacterData::SetData(DOMString aData)
|
||||
{
|
||||
nsString _aData(aData);
|
||||
return domPtr->SetData(_aData);
|
||||
}
|
||||
|
||||
|
||||
/* readonly attribute unsigned long length; */
|
||||
NS_IMETHODIMP bcCharacterData::GetLength(PRUint32 *aLength)
|
||||
{
|
||||
return domPtr->GetLength(aLength);
|
||||
}
|
||||
|
||||
|
||||
/* DOMString substringData (in unsigned long offset, in unsigned long count) raises (DOMException); */
|
||||
NS_IMETHODIMP bcCharacterData::SubstringData(PRUint32 offset, PRUint32 count, DOMString *_retval)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->SubstringData(offset, count, ret);
|
||||
*_retval = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* void appendData (in DOMString arg) raises (DOMException); */
|
||||
NS_IMETHODIMP bcCharacterData::AppendData(DOMString arg)
|
||||
{
|
||||
nsString _arg(arg);
|
||||
return domPtr->AppendData(_arg);
|
||||
}
|
||||
|
||||
/* void insertData (in unsigned long offset, in DOMString arg) raises (DOMException); */
|
||||
NS_IMETHODIMP bcCharacterData::InsertData(PRUint32 offset, DOMString arg)
|
||||
{
|
||||
nsString _arg(arg);
|
||||
return domPtr->InsertData(offset, _arg);
|
||||
}
|
||||
|
||||
/* void deleteData (in unsigned long offset, in unsigned long count) raises (DOMException); */
|
||||
NS_IMETHODIMP bcCharacterData::DeleteData(PRUint32 offset, PRUint32 count)
|
||||
{
|
||||
return domPtr->DeleteData(offset, count);
|
||||
}
|
||||
|
||||
/* void replaceData (in unsigned long offset, in unsigned long count, in DOMString arg) raises (DOMException); */
|
||||
NS_IMETHODIMP bcCharacterData::ReplaceData(PRUint32 offset, PRUint32 count, DOMString arg)
|
||||
{
|
||||
nsString _arg(arg);
|
||||
return domPtr->ReplaceData(offset, count, _arg);
|
||||
}
|
||||
26
mozilla/java/dom/blackconnect/dom/stubs/bcCharacterData.h
Normal file
26
mozilla/java/dom/blackconnect/dom/stubs/bcCharacterData.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef __bcCharacterData_h__
|
||||
#define __bcCharacterData_h__
|
||||
|
||||
#include "dom.h"
|
||||
#include "bcNode.h"
|
||||
#include "nsIDOMCharacterData.h"
|
||||
|
||||
#define DOM_CHARACTERDATA_PTR(_characterdata_) (!_characterdata_ ? nsnull : ((bcCharacterData*)_characterdata_)->domPtr)
|
||||
#define NEW_BCCHARACTERDATA(_characterdata_) (!_characterdata_ ? nsnull : new bcCharacterData(_characterdata_))
|
||||
|
||||
class bcCharacterData : public CharacterData
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_CHARACTERDATA
|
||||
NS_FORWARD_NODE(nodePtr->)
|
||||
|
||||
bcCharacterData(nsIDOMCharacterData* domPtr);
|
||||
virtual ~bcCharacterData();
|
||||
private:
|
||||
nsIDOMCharacterData* domPtr;
|
||||
bcNode* nodePtr;
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
#endif // __bcCharacterData_h__
|
||||
17
mozilla/java/dom/blackconnect/dom/stubs/bcComment.cpp
Normal file
17
mozilla/java/dom/blackconnect/dom/stubs/bcComment.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "bcComment.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(bcComment, Comment)
|
||||
|
||||
bcComment::bcComment(nsIDOMComment* ptr)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
domPtr = ptr;
|
||||
dataPtr = new bcCharacterData(ptr);
|
||||
}
|
||||
|
||||
bcComment::~bcComment()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
27
mozilla/java/dom/blackconnect/dom/stubs/bcComment.h
Normal file
27
mozilla/java/dom/blackconnect/dom/stubs/bcComment.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef __bcComment_h__
|
||||
#define __bcComment_h__
|
||||
|
||||
#include "dom.h"
|
||||
#include "nsIDOMComment.h"
|
||||
#include "bcCharacterData.h"
|
||||
|
||||
#define DOM_COMMENT_PTR(_comment_) (!_comment_ ? nsnull : ((bcComment*)_comment_)->domPtr)
|
||||
#define NEW_BCCOMMENT(_comment_) (!_comment_ ? nsnull : new bcComment(_comment_))
|
||||
|
||||
class bcComment : public Comment
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_COMMENT
|
||||
NS_FORWARD_NODE(dataPtr->)
|
||||
NS_FORWARD_CHARACTERDATA(dataPtr->)
|
||||
|
||||
bcComment(nsIDOMComment* domPtr);
|
||||
virtual ~bcComment();
|
||||
private:
|
||||
nsIDOMComment* domPtr;
|
||||
bcCharacterData* dataPtr;
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
#endif // __bcComment_h__
|
||||
@@ -0,0 +1,46 @@
|
||||
#include "bcDOMImplementation.h"
|
||||
#include "bcDocumentType.h"
|
||||
#include "bcDocument.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(bcDOMImplementation, DOMImplementation)
|
||||
|
||||
bcDOMImplementation::bcDOMImplementation(nsIDOMDOMImplementation* ptr)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
domPtr = ptr;
|
||||
}
|
||||
|
||||
bcDOMImplementation::~bcDOMImplementation()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
/* boolean hasFeature (in DOMString feature, in DOMString version); */
|
||||
NS_IMETHODIMP bcDOMImplementation::HasFeature(DOMString feature, DOMString version, PRBool *_retval)
|
||||
{
|
||||
nsString _feature(feature), _version(version);
|
||||
return domPtr->HasFeature(_feature, _version, _retval);
|
||||
}
|
||||
|
||||
/* DocumentType createDocumentType (in DOMString qualifiedName, in DOMString publicId, in DOMString systemId) raises (DOMException); */
|
||||
NS_IMETHODIMP bcDOMImplementation::CreateDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId, DocumentType **_retval)
|
||||
{
|
||||
nsIDOMDocumentType* ret = nsnull;
|
||||
nsString _qualifiedName(qualifiedName), _publicId(publicId), _systemId(systemId);
|
||||
nsresult rv = domPtr->CreateDocumentType(_qualifiedName, _publicId, _systemId, &ret);
|
||||
*_retval = NEW_BCDOCUMENTTYPE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Document createDocument (in DOMString namespaceURI, in DOMString qualifiedName, in DocumentType doctype) raises (DOMException); */
|
||||
NS_IMETHODIMP bcDOMImplementation::CreateDocument(DOMString namespaceURI, DOMString qualifiedName, DocumentType *doctype, Document **_retval)
|
||||
{
|
||||
nsIDOMDocument* ret = nsnull;
|
||||
nsString _namespaceURI(namespaceURI), _qualifiedName(qualifiedName);
|
||||
nsresult rv = domPtr->CreateDocument(_namespaceURI, _qualifiedName,
|
||||
DOM_DOCUMENTTYPE_PTR(doctype), &ret);
|
||||
*_retval = NEW_BCDOCUMENT(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
#ifndef __bcDOMImplementation_h__
|
||||
#define __bcDOMImplementation_h__
|
||||
|
||||
#include "dom.h"
|
||||
#include "nsIDOMDOMImplementation.h"
|
||||
|
||||
#define DOM_DOMIMPLEMENTATION_PTR(_domimplementation_) (!_domimplementation_ ? nsnull : ((bcDOMImplementation*)_domimplementation_)->domPtr)
|
||||
#define NEW_BCDOMIMPLEMENTATION(_domimplementation_) (!_domimplementation_ ? nsnull : new bcDOMImplementation(_domimplementation_))
|
||||
|
||||
class bcDOMImplementation : public DOMImplementation
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_DOMIMPLEMENTATION
|
||||
|
||||
bcDOMImplementation(nsIDOMDOMImplementation* domPtr);
|
||||
virtual ~bcDOMImplementation();
|
||||
private:
|
||||
nsIDOMDOMImplementation* domPtr;
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
#endif // __bcDOMImplementation_h__
|
||||
196
mozilla/java/dom/blackconnect/dom/stubs/bcDocument.cpp
Normal file
196
mozilla/java/dom/blackconnect/dom/stubs/bcDocument.cpp
Normal file
@@ -0,0 +1,196 @@
|
||||
#include "bcDocument.h"
|
||||
#include "bcElement.h"
|
||||
#include "bcNodeList.h"
|
||||
#include "bcAttr.h"
|
||||
#include "bcText.h"
|
||||
#include "bcComment.h"
|
||||
#include "bcCDATASection.h"
|
||||
#include "bcEntityReference.h"
|
||||
#include "bcDocumentType.h"
|
||||
#include "bcDocumentFragment.h"
|
||||
#include "bcProcessingInstruction.h"
|
||||
#include "bcDOMImplementation.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(bcDocument, Document)
|
||||
|
||||
bcDocument::bcDocument(nsIDOMDocument* ptr)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
domPtr = ptr;
|
||||
nodePtr = new bcNode(ptr);
|
||||
}
|
||||
|
||||
bcDocument::~bcDocument()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
/* readonly attribute DocumentType doctype; */
|
||||
NS_IMETHODIMP bcDocument::GetDoctype(DocumentType * *aDoctype)
|
||||
{
|
||||
nsIDOMDocumentType* ret;
|
||||
nsresult rv = domPtr->GetDoctype(&ret);
|
||||
*aDoctype = NEW_BCDOCUMENTTYPE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
/* readonly attribute DOMImplementation implementation; */
|
||||
NS_IMETHODIMP bcDocument::GetImplementation(DOMImplementation * *aImplementation)
|
||||
{
|
||||
nsIDOMDOMImplementation* ret;
|
||||
nsresult rv = domPtr->GetImplementation(&ret);
|
||||
*aImplementation = NEW_BCDOMIMPLEMENTATION(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
/* readonly attribute Element documentElement; */
|
||||
NS_IMETHODIMP bcDocument::GetDocumentElement(Element * *aDocumentElement)
|
||||
{
|
||||
nsIDOMElement* ret = nsnull;
|
||||
nsresult rv = domPtr->GetDocumentElement(&ret);
|
||||
*aDocumentElement = NEW_BCELEMENT(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
/* Element createElement (in DOMString tagName) raises (DOMException); */
|
||||
NS_IMETHODIMP bcDocument::CreateElement(DOMString tagName, Element **_retval)
|
||||
{
|
||||
nsIDOMElement* ret = nsnull;
|
||||
nsString _tagName(tagName);
|
||||
nsresult rv = domPtr->CreateElement(_tagName, &ret);
|
||||
*_retval = NEW_BCELEMENT(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* DocumentFragment createDocumentFragment (); */
|
||||
NS_IMETHODIMP bcDocument::CreateDocumentFragment(DocumentFragment **_retval)
|
||||
{
|
||||
nsIDOMDocumentFragment* ret;
|
||||
nsresult rv = domPtr->CreateDocumentFragment(&ret);
|
||||
*_retval = NEW_BCDOCUMENTFRAGMENT(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Text createTextNode (in DOMString data); */
|
||||
NS_IMETHODIMP bcDocument::CreateTextNode(DOMString data, Text **_retval)
|
||||
{
|
||||
nsString _data(data);
|
||||
nsIDOMText* ret = nsnull;
|
||||
nsresult rv = domPtr->CreateTextNode(_data, &ret);
|
||||
*_retval = NEW_BCTEXT(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Comment createComment (in DOMString data); */
|
||||
NS_IMETHODIMP bcDocument::CreateComment(DOMString data, Comment **_retval)
|
||||
{
|
||||
nsString _data(data);
|
||||
nsIDOMComment* ret = nsnull;
|
||||
nsresult rv = domPtr->CreateComment(_data, &ret);
|
||||
*_retval = NEW_BCCOMMENT(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* CDATASection createCDATASection (in DOMString data) raises (DOMException); */
|
||||
NS_IMETHODIMP bcDocument::CreateCDATASection(DOMString data, CDATASection **_retval)
|
||||
{
|
||||
nsString _data(data);
|
||||
nsIDOMCDATASection* ret = nsnull;
|
||||
nsresult rv = domPtr->CreateCDATASection(_data, &ret);
|
||||
*_retval = NEW_BCCDATASECTION(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* ProcessingInstruction createProcessingInstruction (in DOMString target, in DOMString data) raises (DOMException); */
|
||||
NS_IMETHODIMP bcDocument::CreateProcessingInstruction(DOMString target, DOMString data, ProcessingInstruction **_retval)
|
||||
{
|
||||
nsIDOMProcessingInstruction* ret;
|
||||
nsString _target(target), _data(data);
|
||||
nsresult rv = domPtr->CreateProcessingInstruction(_target, _data, &ret);
|
||||
*_retval = NEW_BCPROCESSINGINSTRUCTION(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Attr createAttribute (in DOMString name) raises (DOMException); */
|
||||
NS_IMETHODIMP bcDocument::CreateAttribute(DOMString name, Attr **_retval)
|
||||
{
|
||||
nsString _name(name);
|
||||
nsIDOMAttr* ret = nsnull;
|
||||
nsresult rv = domPtr->CreateAttribute(_name, &ret);
|
||||
*_retval = NEW_BCATTR(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* EntityReference createEntityReference (in DOMString name) raises (DOMException); */
|
||||
NS_IMETHODIMP bcDocument::CreateEntityReference(DOMString name, EntityReference **_retval)
|
||||
{
|
||||
nsString _name(name);
|
||||
nsIDOMEntityReference* ret = nsnull;
|
||||
nsresult rv = domPtr->CreateEntityReference(_name, &ret);
|
||||
*_retval = NEW_BCENTITYREFERENCE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* NodeList getElementsByTagName (in DOMString tagname); */
|
||||
NS_IMETHODIMP bcDocument::GetElementsByTagName(DOMString tagname, NodeList **_retval)
|
||||
{
|
||||
nsString _tagname(tagname);
|
||||
nsIDOMNodeList* ret = nsnull;
|
||||
nsresult rv = domPtr->GetElementsByTagName(_tagname, &ret);
|
||||
*_retval = NEW_BCNODELIST(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Node importNode (in Node importedNode, in boolean deep) raises (DOMException); */
|
||||
NS_IMETHODIMP bcDocument::ImportNode(Node *importedNode, PRBool deep, Node **_retval)
|
||||
{
|
||||
nsIDOMNode* ret = nsnull;
|
||||
nsresult rv = domPtr->ImportNode(DOM_NODE_PTR(importedNode), deep, &ret);
|
||||
*_retval = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Element createElementNS (in DOMString namespaceURI, in DOMString qualifiedName) raises (DOMException); */
|
||||
NS_IMETHODIMP bcDocument::CreateElementNS(DOMString namespaceURI, DOMString qualifiedName, Element **_retval)
|
||||
{
|
||||
nsString _namespaceURI(namespaceURI), _qualifiedName(qualifiedName);
|
||||
nsIDOMElement* ret = nsnull;
|
||||
nsresult rv = domPtr->CreateElementNS(_namespaceURI, _qualifiedName, &ret);
|
||||
*_retval = NEW_BCELEMENT(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Attr createAttributeNS (in DOMString namespaceURI, in DOMString qualifiedName) raises (DOMException); */
|
||||
NS_IMETHODIMP bcDocument::CreateAttributeNS(DOMString namespaceURI, DOMString qualifiedName, Attr **_retval)
|
||||
{
|
||||
nsString _namespaceURI(namespaceURI), _qualifiedName(qualifiedName);
|
||||
nsIDOMAttr* ret = nsnull;
|
||||
nsresult rv = domPtr->CreateAttributeNS(_namespaceURI, _qualifiedName, &ret);
|
||||
*_retval = NEW_BCATTR(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* NodeList getElementsByTagNameNS (in DOMString namespaceURI, in DOMString localName); */
|
||||
NS_IMETHODIMP bcDocument::GetElementsByTagNameNS(DOMString namespaceURI, DOMString localName, NodeList **_retval)
|
||||
{
|
||||
nsString _namespaceURI(namespaceURI), _localName(localName);
|
||||
nsIDOMNodeList* ret;
|
||||
nsresult rv = domPtr->GetElementsByTagNameNS(_namespaceURI, _localName, &ret);
|
||||
*_retval = NEW_BCNODELIST(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Element getElementById (in DOMString elementId); */
|
||||
NS_IMETHODIMP bcDocument::GetElementById(DOMString elementId, Element **_retval)
|
||||
{
|
||||
nsString _elementId(elementId);
|
||||
nsIDOMElement* ret = nsnull;
|
||||
nsresult rv = domPtr->GetElementById(_elementId, &ret);
|
||||
*_retval = NEW_BCELEMENT(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
26
mozilla/java/dom/blackconnect/dom/stubs/bcDocument.h
Normal file
26
mozilla/java/dom/blackconnect/dom/stubs/bcDocument.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef __bcDocument_h__
|
||||
#define __bcDocument_h__
|
||||
|
||||
#include "dom.h"
|
||||
#include "bcNode.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
|
||||
#define DOM_DOCUMENT_PTR(_document_) (!_document_ ? nsnull : ((bcDocument*)_document_)->domPtr)
|
||||
#define NEW_BCDOCUMENT(_document_) (!_document_ ? nsnull : new bcDocument(_document_))
|
||||
|
||||
class bcDocument : public Document
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_DOCUMENT
|
||||
NS_FORWARD_NODE(nodePtr->)
|
||||
|
||||
bcDocument(nsIDOMDocument* domPtr);
|
||||
virtual ~bcDocument();
|
||||
private:
|
||||
nsIDOMDocument* domPtr;
|
||||
bcNode* nodePtr;
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
#endif // __bcDocument_h__
|
||||
@@ -0,0 +1,17 @@
|
||||
#include "bcDocumentFragment.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(bcDocumentFragment, DocumentFragment)
|
||||
|
||||
bcDocumentFragment::bcDocumentFragment(nsIDOMDocumentFragment* ptr)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
domPtr = ptr;
|
||||
nodePtr = new bcNode(ptr);
|
||||
}
|
||||
|
||||
bcDocumentFragment::~bcDocumentFragment()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
26
mozilla/java/dom/blackconnect/dom/stubs/bcDocumentFragment.h
Normal file
26
mozilla/java/dom/blackconnect/dom/stubs/bcDocumentFragment.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef __bcDocumentFragment_h__
|
||||
#define __bcDocumentFragment_h__
|
||||
|
||||
#include "dom.h"
|
||||
#include "bcNode.h"
|
||||
#include "nsIDOMDocumentFragment.h"
|
||||
|
||||
#define DOM_DOCUMENTFRAGMENT_PTR(_documentfragment_) (!_documentfragment_ ? nsnull : ((bcDocumentFragment*)_documentfragment_)->domPtr)
|
||||
#define NEW_BCDOCUMENTFRAGMENT(_documentfragment_) (!_documentfragment_ ? nsnull : new bcDocumentFragment(_documentfragment_))
|
||||
|
||||
class bcDocumentFragment : public DocumentFragment
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_DOCUMENTFRAGMENT
|
||||
NS_FORWARD_NODE(nodePtr->)
|
||||
|
||||
bcDocumentFragment(nsIDOMDocumentFragment* domPtr);
|
||||
virtual ~bcDocumentFragment();
|
||||
private:
|
||||
nsIDOMDocumentFragment* domPtr;
|
||||
bcNode* nodePtr;
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
#endif // __bcDocumentFragment_h__
|
||||
78
mozilla/java/dom/blackconnect/dom/stubs/bcDocumentType.cpp
Normal file
78
mozilla/java/dom/blackconnect/dom/stubs/bcDocumentType.cpp
Normal file
@@ -0,0 +1,78 @@
|
||||
#include "bcDocumentType.h"
|
||||
#include "bcNamedNodeMap.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(bcDocumentType, DocumentType)
|
||||
|
||||
bcDocumentType::bcDocumentType(nsIDOMDocumentType* ptr)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
domPtr = ptr;
|
||||
nodePtr = new bcNode(ptr);
|
||||
}
|
||||
|
||||
bcDocumentType::~bcDocumentType()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString name; */
|
||||
NS_IMETHODIMP bcDocumentType::GetName(DOMString *aName)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetName(ret);
|
||||
*aName = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
/* readonly attribute NamedNodeMap entities; */
|
||||
NS_IMETHODIMP bcDocumentType::GetEntities(NamedNodeMap * *aEntities)
|
||||
{
|
||||
nsIDOMNamedNodeMap* ret = nsnull;
|
||||
nsresult rv = domPtr->GetEntities(&ret);
|
||||
*aEntities = NEW_BCNAMEDNODEMAP(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
/* readonly attribute NamedNodeMap notations; */
|
||||
NS_IMETHODIMP bcDocumentType::GetNotations(NamedNodeMap * *aNotations)
|
||||
{
|
||||
nsIDOMNamedNodeMap* ret = nsnull;
|
||||
nsresult rv = domPtr->GetNotations(&ret);
|
||||
*aNotations = NEW_BCNAMEDNODEMAP(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
/* readonly attribute DOMString publicId; */
|
||||
NS_IMETHODIMP bcDocumentType::GetPublicId(DOMString *aPublicId)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetPublicId(ret);
|
||||
*aPublicId = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
/* readonly attribute DOMString systemId; */
|
||||
NS_IMETHODIMP bcDocumentType::GetSystemId(DOMString *aSystemId)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetSystemId(ret);
|
||||
*aSystemId = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
/* readonly attribute DOMString internalSubset; */
|
||||
NS_IMETHODIMP bcDocumentType::GetInternalSubset(DOMString *aInternalSubset)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetInternalSubset(ret);
|
||||
*aInternalSubset = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
26
mozilla/java/dom/blackconnect/dom/stubs/bcDocumentType.h
Normal file
26
mozilla/java/dom/blackconnect/dom/stubs/bcDocumentType.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef __bcDocumentType_h__
|
||||
#define __bcDocumentType_h__
|
||||
|
||||
#include "dom.h"
|
||||
#include "bcNode.h"
|
||||
#include "nsIDOMDocumentType.h"
|
||||
|
||||
#define DOM_DOCUMENTTYPE_PTR(_documenttype_) (!_documenttype_ ? nsnull : ((bcDocumentType*)_documenttype_)->domPtr)
|
||||
#define NEW_BCDOCUMENTTYPE(_documenttype_) (!_documenttype_ ? nsnull : new bcDocumentType(_documenttype_))
|
||||
|
||||
class bcDocumentType : public DocumentType
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_DOCUMENTTYPE
|
||||
NS_FORWARD_NODE(nodePtr->)
|
||||
|
||||
bcDocumentType(nsIDOMDocumentType* domPtr);
|
||||
virtual ~bcDocumentType();
|
||||
nsIDOMDocumentType* domPtr;
|
||||
private:
|
||||
bcNode* nodePtr;
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
#endif // __bcDocumentType_h__
|
||||
159
mozilla/java/dom/blackconnect/dom/stubs/bcElement.cpp
Normal file
159
mozilla/java/dom/blackconnect/dom/stubs/bcElement.cpp
Normal file
@@ -0,0 +1,159 @@
|
||||
#include "bcElement.h"
|
||||
#include "bcAttr.h"
|
||||
#include "bcNodeList.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(bcElement, Element)
|
||||
|
||||
bcElement::bcElement(nsIDOMElement* ptr)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
domPtr = ptr;
|
||||
nodePtr = new bcNode(ptr);
|
||||
}
|
||||
|
||||
bcElement::~bcElement()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString tagName; */
|
||||
NS_IMETHODIMP bcElement::GetTagName(DOMString *aTagName)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetTagName(ret);
|
||||
*aTagName = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* DOMString getAttribute (in DOMString name); */
|
||||
NS_IMETHODIMP bcElement::GetAttribute(DOMString name, DOMString *_retval)
|
||||
{
|
||||
nsString ret, _name(name);
|
||||
nsresult rv = domPtr->GetAttribute(_name, ret);
|
||||
*_retval = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* void setAttribute (in DOMString name, in DOMString value) raises (DOMException); */
|
||||
NS_IMETHODIMP bcElement::SetAttribute(DOMString name, DOMString value)
|
||||
{
|
||||
nsString _name(name), _value(value);
|
||||
nsresult rv = domPtr->SetAttribute(_name, _value);
|
||||
printf("\n===== setting value (%s) to attr (%s)\n\n",
|
||||
_value.ToNewCString(),
|
||||
_name.ToNewCString());
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* void removeAttribute (in DOMString name) raises (DOMException); */
|
||||
NS_IMETHODIMP bcElement::RemoveAttribute(DOMString name)
|
||||
{
|
||||
nsString _name(name);
|
||||
return domPtr->RemoveAttribute(_name);
|
||||
}
|
||||
|
||||
/* Attr getAttributeNode (in DOMString name); */
|
||||
NS_IMETHODIMP bcElement::GetAttributeNode(DOMString name, Attr **_retval)
|
||||
{
|
||||
nsString _name(name);
|
||||
nsIDOMAttr* ret = nsnull;
|
||||
nsresult rv = domPtr->GetAttributeNode(_name, &ret);
|
||||
*_retval = NEW_BCATTR(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Attr setAttributeNode (in Attr newAttr) raises (DOMException); */
|
||||
NS_IMETHODIMP bcElement::SetAttributeNode(Attr *newAttr, Attr **_retval)
|
||||
{
|
||||
nsIDOMAttr* ret = nsnull;
|
||||
nsresult rv = domPtr->SetAttributeNode(DOM_ATTR_PTR(newAttr), &ret);
|
||||
*_retval = NEW_BCATTR(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Attr removeAttributeNode (in Attr oldAttr) raises (DOMException); */
|
||||
NS_IMETHODIMP bcElement::RemoveAttributeNode(Attr *oldAttr, Attr **_retval)
|
||||
{
|
||||
nsIDOMAttr* ret = nsnull;
|
||||
nsresult rv = domPtr->RemoveAttributeNode(DOM_ATTR_PTR(oldAttr), &ret);
|
||||
*_retval = NEW_BCATTR(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* NodeList getElementsByTagName (in DOMString name); */
|
||||
NS_IMETHODIMP bcElement::GetElementsByTagName(DOMString name, NodeList **_retval)
|
||||
{
|
||||
nsIDOMNodeList* ret = nsnull;
|
||||
nsString _name(name);
|
||||
nsresult rv = domPtr->GetElementsByTagName(_name, &ret);
|
||||
*_retval = NEW_BCNODELIST(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* DOMString getAttributeNS (in DOMString namespaceURI, in DOMString localName); */
|
||||
NS_IMETHODIMP bcElement::GetAttributeNS(DOMString namespaceURI, DOMString localName, DOMString *_retval)
|
||||
{
|
||||
nsString _namespaceURI(namespaceURI), _localName(localName), ret;
|
||||
nsresult rv = domPtr->GetAttributeNS(_namespaceURI, _localName, ret);
|
||||
*_retval = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* void setAttributeNS (in DOMString namespaceURI, in DOMString qualifiedName, in DOMString value) raises (DOMException); */
|
||||
NS_IMETHODIMP bcElement::SetAttributeNS(DOMString namespaceURI, DOMString qualifiedName, DOMString value)
|
||||
{
|
||||
nsString _namespaceURI(namespaceURI), _qualifiedName(qualifiedName), _value(value);
|
||||
return domPtr->SetAttributeNS(_namespaceURI, _qualifiedName, _value);
|
||||
}
|
||||
|
||||
/* void removeAttributeNS (in DOMString namespaceURI, in DOMString localName) raises (DOMException); */
|
||||
NS_IMETHODIMP bcElement::RemoveAttributeNS(DOMString namespaceURI, DOMString localName)
|
||||
{
|
||||
nsString _namespaceURI(namespaceURI), _localName(localName);
|
||||
return domPtr->RemoveAttributeNS(_namespaceURI, _localName);
|
||||
}
|
||||
|
||||
/* Attr getAttributeNodeNS (in DOMString namespaceURI, in DOMString localName); */
|
||||
NS_IMETHODIMP bcElement::GetAttributeNodeNS(DOMString namespaceURI, DOMString localName, Attr **_retval)
|
||||
{
|
||||
nsString _namespaceURI(namespaceURI), _localName(localName);
|
||||
nsIDOMAttr* ret = nsnull;
|
||||
nsresult rv = domPtr->GetAttributeNodeNS(_namespaceURI, _localName, &ret);
|
||||
*_retval = NEW_BCATTR(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Attr setAttributeNodeNS (in Attr newAttr) raises (DOMException); */
|
||||
NS_IMETHODIMP bcElement::SetAttributeNodeNS(Attr *newAttr, Attr **_retval)
|
||||
{
|
||||
nsIDOMAttr* ret = nsnull;
|
||||
nsresult rv = domPtr->SetAttributeNodeNS(DOM_ATTR_PTR(newAttr), &ret);
|
||||
*_retval = NEW_BCATTR(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* NodeList getElementsByTagNameNS (in DOMString namespaceURI, in DOMString localName); */
|
||||
NS_IMETHODIMP bcElement::GetElementsByTagNameNS(DOMString namespaceURI, DOMString localName, NodeList **_retval)
|
||||
{
|
||||
nsIDOMNodeList* ret = nsnull;
|
||||
nsString _namespaceURI(namespaceURI), _localName(localName);
|
||||
nsresult rv = domPtr->GetElementsByTagNameNS(_namespaceURI, _localName, &ret);
|
||||
*_retval = NEW_BCNODELIST(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* boolean hasAttribute (in DOMString name); */
|
||||
NS_IMETHODIMP bcElement::HasAttribute(DOMString name, PRBool *_retval)
|
||||
{
|
||||
nsString _name(name);
|
||||
return domPtr->HasAttribute(_name, _retval);
|
||||
}
|
||||
|
||||
/* boolean hasAttributeNS (in DOMString namespaceURI, in DOMString localName); */
|
||||
NS_IMETHODIMP bcElement::HasAttributeNS(DOMString namespaceURI, DOMString localName, PRBool *_retval)
|
||||
{
|
||||
nsString _namespaceURI(namespaceURI), _localName(localName);
|
||||
return domPtr->HasAttributeNS(_namespaceURI, _localName, _retval);
|
||||
}
|
||||
|
||||
26
mozilla/java/dom/blackconnect/dom/stubs/bcElement.h
Normal file
26
mozilla/java/dom/blackconnect/dom/stubs/bcElement.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef __bcElement_h__
|
||||
#define __bcElement_h__
|
||||
|
||||
#include "dom.h"
|
||||
#include "bcNode.h"
|
||||
#include "nsIDOMElement.h"
|
||||
|
||||
#define DOM_ELEMENT_PTR(_element_) (!_element_ ? nsnull : ((bcElement*)_element_)->domPtr)
|
||||
#define NEW_BCELEMENT(_element_) (!_element_ ? nsnull : new bcElement(_element_))
|
||||
|
||||
class bcElement : public Element
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_ELEMENT
|
||||
NS_FORWARD_NODE(nodePtr->)
|
||||
|
||||
bcElement(nsIDOMElement* domPtr);
|
||||
virtual ~bcElement();
|
||||
private:
|
||||
nsIDOMElement* domPtr;
|
||||
bcNode* nodePtr;
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
#endif // __bcElement_h__
|
||||
47
mozilla/java/dom/blackconnect/dom/stubs/bcEntity.cpp
Normal file
47
mozilla/java/dom/blackconnect/dom/stubs/bcEntity.cpp
Normal file
@@ -0,0 +1,47 @@
|
||||
#include "bcEntity.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(bcEntity, Entity)
|
||||
|
||||
bcEntity::bcEntity(nsIDOMEntity* ptr)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
domPtr = ptr;
|
||||
nodePtr = new bcNode(ptr);
|
||||
}
|
||||
|
||||
bcEntity::~bcEntity()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString publicId; */
|
||||
NS_IMETHODIMP bcEntity::GetPublicId(DOMString *aPublicId)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetPublicId(ret);
|
||||
*aPublicId = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
/* readonly attribute DOMString systemId; */
|
||||
NS_IMETHODIMP bcEntity::GetSystemId(DOMString *aSystemId)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetSystemId(ret);
|
||||
*aSystemId = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
/* readonly attribute DOMString notationName; */
|
||||
NS_IMETHODIMP bcEntity::GetNotationName(DOMString *aNotationName)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetNotationName(ret);
|
||||
*aNotationName = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
26
mozilla/java/dom/blackconnect/dom/stubs/bcEntity.h
Normal file
26
mozilla/java/dom/blackconnect/dom/stubs/bcEntity.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef __bcEntity_h__
|
||||
#define __bcEntity_h__
|
||||
|
||||
#include "dom.h"
|
||||
#include "bcNode.h"
|
||||
#include "nsIDOMEntity.h"
|
||||
|
||||
#define DOM_ENTITY_PTR(_entity_) (!_entity_ ? nsnull : ((bcEntity*)_entity_)->domPtr)
|
||||
#define NEW_BCENTITY(_entity_) (!_entity_ ? nsnull : new bcEntity(_entity_))
|
||||
|
||||
class bcEntity : public Entity
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_ENTITY
|
||||
NS_FORWARD_NODE(nodePtr->)
|
||||
|
||||
bcEntity(nsIDOMEntity* domPtr);
|
||||
virtual ~bcEntity();
|
||||
private:
|
||||
nsIDOMEntity* domPtr;
|
||||
bcNode* nodePtr;
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
#endif // __bcEntity_h__
|
||||
@@ -0,0 +1,17 @@
|
||||
#include "bcEntityReference.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(bcEntityReference, EntityReference)
|
||||
|
||||
bcEntityReference::bcEntityReference(nsIDOMEntityReference* ptr)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
domPtr = ptr;
|
||||
nodePtr = new bcNode(ptr);
|
||||
}
|
||||
|
||||
bcEntityReference::~bcEntityReference()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
26
mozilla/java/dom/blackconnect/dom/stubs/bcEntityReference.h
Normal file
26
mozilla/java/dom/blackconnect/dom/stubs/bcEntityReference.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef __bcEntityReference_h__
|
||||
#define __bcEntityReference_h__
|
||||
|
||||
#include "dom.h"
|
||||
#include "bcNode.h"
|
||||
#include "nsIDOMEntityReference.h"
|
||||
|
||||
#define DOM_ENTITYREFERENCE_PTR(_entityreference_) (!_entityreference_ ? nsnull : ((bcEntityReference*)_entityreference_)->domPtr)
|
||||
#define NEW_BCENTITYREFERENCE(_entityreference_) (!_entityreference_ ? nsnull : new bcEntityReference(_entityreference_))
|
||||
|
||||
class bcEntityReference : public EntityReference
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_ENTITYREFERENCE
|
||||
NS_FORWARD_NODE(nodePtr->)
|
||||
|
||||
bcEntityReference(nsIDOMEntityReference* domPtr);
|
||||
virtual ~bcEntityReference();
|
||||
private:
|
||||
nsIDOMEntityReference* domPtr;
|
||||
bcNode* nodePtr;
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
#endif // __bcEntityReference_h__
|
||||
91
mozilla/java/dom/blackconnect/dom/stubs/bcNamedNodeMap.cpp
Normal file
91
mozilla/java/dom/blackconnect/dom/stubs/bcNamedNodeMap.cpp
Normal file
@@ -0,0 +1,91 @@
|
||||
#include "bcNamedNodeMap.h"
|
||||
#include "bcNode.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(bcNamedNodeMap, NamedNodeMap)
|
||||
|
||||
bcNamedNodeMap::bcNamedNodeMap(nsIDOMNamedNodeMap* ptr)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
domPtr = ptr;
|
||||
}
|
||||
|
||||
bcNamedNodeMap::~bcNamedNodeMap()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
/* Node getNamedItem (in DOMString name); */
|
||||
NS_IMETHODIMP bcNamedNodeMap::GetNamedItem(DOMString name, Node **_retval)
|
||||
{
|
||||
nsString _name(name);
|
||||
nsIDOMNode* ret = nsnull;
|
||||
nsresult rv = domPtr->GetNamedItem(_name, &ret);
|
||||
*_retval = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Node setNamedItem (in Node arg) raises (DOMException); */
|
||||
NS_IMETHODIMP bcNamedNodeMap::SetNamedItem(Node *arg, Node **_retval)
|
||||
{
|
||||
nsIDOMNode* ret = nsnull;
|
||||
nsresult rv = domPtr->SetNamedItem(DOM_NODE_PTR(arg), &ret);
|
||||
*_retval = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Node removeNamedItem (in DOMString name) raises (DOMException); */
|
||||
NS_IMETHODIMP bcNamedNodeMap::RemoveNamedItem(DOMString name, Node **_retval)
|
||||
{
|
||||
nsString _name(name);
|
||||
nsIDOMNode* ret = nsnull;
|
||||
nsresult rv = domPtr->RemoveNamedItem(_name, &ret);
|
||||
*_retval = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Node item (in unsigned long index); */
|
||||
NS_IMETHODIMP bcNamedNodeMap::Item(PRUint32 index, Node **_retval)
|
||||
{
|
||||
nsIDOMNode* ret = nsnull;
|
||||
nsresult rv = domPtr->Item(index, &ret);
|
||||
*_retval = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long length; */
|
||||
NS_IMETHODIMP bcNamedNodeMap::GetLength(PRUint32 *aLength)
|
||||
{
|
||||
return domPtr->GetLength(aLength);
|
||||
}
|
||||
|
||||
|
||||
/* Node getNamedItemNS (in DOMString namespaceURI, in DOMString localName); */
|
||||
NS_IMETHODIMP bcNamedNodeMap::GetNamedItemNS(DOMString namespaceURI, DOMString localName, Node **_retval)
|
||||
{
|
||||
nsString _namespaceURI(namespaceURI), _localName(localName);
|
||||
nsIDOMNode* ret = nsnull;
|
||||
nsresult rv = domPtr->GetNamedItemNS(_namespaceURI, _localName, &ret);
|
||||
*_retval = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Node setNamedItemNS (in Node arg) raises (DOMException); */
|
||||
NS_IMETHODIMP bcNamedNodeMap::SetNamedItemNS(Node *arg, Node **_retval)
|
||||
{
|
||||
nsIDOMNode* ret = nsnull;
|
||||
nsresult rv = domPtr->SetNamedItemNS(DOM_NODE_PTR(arg), &ret);
|
||||
*_retval = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Node removeNamedItemNS (in DOMString namespaceURI, in DOMString localName) raises (DOMException); */
|
||||
NS_IMETHODIMP bcNamedNodeMap::RemoveNamedItemNS(DOMString namespaceURI, DOMString localName, Node **_retval)
|
||||
{
|
||||
nsString _namespaceURI(namespaceURI), _localName(localName);
|
||||
nsIDOMNode* ret = nsnull;
|
||||
nsresult rv = domPtr->RemoveNamedItemNS(_namespaceURI, _localName, &ret);
|
||||
*_retval = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
23
mozilla/java/dom/blackconnect/dom/stubs/bcNamedNodeMap.h
Normal file
23
mozilla/java/dom/blackconnect/dom/stubs/bcNamedNodeMap.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef __bcNamedNodeMap_h__
|
||||
#define __bcNamedNodeMap_h__
|
||||
|
||||
#include "dom.h"
|
||||
#include "nsIDOMNamedNodeMap.h"
|
||||
|
||||
#define DOM_NAMEDNODEMAP_PTR(_namednodemap_) (!_namednodemap_ ? nsnull : ((bcNamedNodeMap*)_namednodemap_)->domPtr)
|
||||
#define NEW_BCNAMEDNODEMAP(_namednodemap_) (!_namednodemap_ ? nsnull : new bcNamedNodeMap(_namednodemap_))
|
||||
|
||||
class bcNamedNodeMap : public NamedNodeMap
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NAMEDNODEMAP
|
||||
|
||||
bcNamedNodeMap(nsIDOMNamedNodeMap* domPtr);
|
||||
virtual ~bcNamedNodeMap();
|
||||
private:
|
||||
nsIDOMNamedNodeMap* domPtr;
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
#endif // __bcNamedNodeMap_h__
|
||||
224
mozilla/java/dom/blackconnect/dom/stubs/bcNode.cpp
Normal file
224
mozilla/java/dom/blackconnect/dom/stubs/bcNode.cpp
Normal file
@@ -0,0 +1,224 @@
|
||||
#include "bcNode.h"
|
||||
#include "bcNodeList.h"
|
||||
#include "bcNamedNodeMap.h"
|
||||
#include "bcDocument.h"
|
||||
// #include "nsDOMError.h"
|
||||
// #include "nsIDOMEventTarget.h"
|
||||
|
||||
/* Implementation file */
|
||||
NS_IMPL_ISUPPORTS1(bcNode, Node)
|
||||
|
||||
bcNode::bcNode(nsIDOMNode* ptr)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
domPtr = ptr;
|
||||
}
|
||||
|
||||
bcNode::~bcNode()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString nodeName; */
|
||||
NS_IMETHODIMP bcNode::GetNodeName(DOMString *aNodeName)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetNodeName(ret);
|
||||
*aNodeName = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* attribute DOMString nodeValue; */
|
||||
NS_IMETHODIMP bcNode::GetNodeValue(DOMString *aNodeValue)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetNodeValue(ret);
|
||||
*aNodeValue = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
NS_IMETHODIMP bcNode::SetNodeValue(DOMString aNodeValue)
|
||||
{
|
||||
nsString val(aNodeValue);
|
||||
nsresult rv = domPtr->SetNodeValue(val);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned short nodeType; */
|
||||
NS_IMETHODIMP bcNode::GetNodeType(PRUint16 *aNodeType)
|
||||
{
|
||||
PRUint16 type = 0;
|
||||
nsresult rv = domPtr->GetNodeType(&type);
|
||||
*aNodeType = type;
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* readonly attribute Node parentNode; */
|
||||
NS_IMETHODIMP bcNode::GetParentNode(Node * *aParentNode)
|
||||
{
|
||||
nsIDOMNode* ret = nsnull;
|
||||
nsresult rv = domPtr->GetParentNode(&ret);
|
||||
*aParentNode = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* readonly attribute NodeList childNodes; */
|
||||
NS_IMETHODIMP bcNode::GetChildNodes(NodeList * *aChildNodes)
|
||||
{
|
||||
nsIDOMNodeList* ret = nsnull;
|
||||
nsresult rv = domPtr->GetChildNodes(&ret);
|
||||
*aChildNodes = NEW_BCNODELIST(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* readonly attribute Node firstChild; */
|
||||
NS_IMETHODIMP bcNode::GetFirstChild(Node * *aFirstChild)
|
||||
{
|
||||
nsIDOMNode* ret = nsnull;
|
||||
nsresult rv = domPtr->GetFirstChild(&ret);
|
||||
*aFirstChild = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* readonly attribute Node lastChild; */
|
||||
NS_IMETHODIMP bcNode::GetLastChild(Node * *aLastChild)
|
||||
{
|
||||
nsIDOMNode* ret = nsnull;
|
||||
nsresult rv = domPtr->GetLastChild(&ret);
|
||||
*aLastChild = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* readonly attribute Node previousSibling; */
|
||||
NS_IMETHODIMP bcNode::GetPreviousSibling(Node * *aPreviousSibling)
|
||||
{
|
||||
nsIDOMNode* ret = nsnull;
|
||||
nsresult rv = domPtr->GetPreviousSibling(&ret);
|
||||
*aPreviousSibling = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* readonly attribute Node nextSibling; */
|
||||
NS_IMETHODIMP bcNode::GetNextSibling(Node * *aNextSibling)
|
||||
{
|
||||
nsIDOMNode* ret = nsnull;
|
||||
nsresult rv = domPtr->GetNextSibling(&ret);
|
||||
*aNextSibling = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* readonly attribute NamedNodeMap attributes; */
|
||||
NS_IMETHODIMP bcNode::GetAttributes(NamedNodeMap * *aAttributes)
|
||||
{
|
||||
nsIDOMNamedNodeMap* ret = nsnull;
|
||||
nsresult rv = domPtr->GetAttributes(&ret);
|
||||
*aAttributes = NEW_BCNAMEDNODEMAP(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* readonly attribute Document ownerDocument; */
|
||||
NS_IMETHODIMP bcNode::GetOwnerDocument(Document * *aOwnerDocument)
|
||||
{
|
||||
nsIDOMDocument* ret;
|
||||
nsresult rv = domPtr->GetOwnerDocument(&ret);
|
||||
*aOwnerDocument = NEW_BCDOCUMENT(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Node insertBefore (in Node newChild, in Node refChild) raises (DOMException); */
|
||||
NS_IMETHODIMP bcNode::InsertBefore(Node *newChild, Node *refChild, Node **_retval)
|
||||
{
|
||||
nsIDOMNode* ret = nsnull;
|
||||
nsresult rv = domPtr->InsertBefore(DOM_NODE_PTR(newChild), DOM_NODE_PTR(refChild), &ret);
|
||||
*_retval = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Node replaceChild (in Node newChild, in Node oldChild) raises (DOMException); */
|
||||
NS_IMETHODIMP bcNode::ReplaceChild(Node *newChild, Node *oldChild, Node **_retval)
|
||||
{
|
||||
nsIDOMNode* ret = nsnull;
|
||||
nsresult rv = domPtr->ReplaceChild(DOM_NODE_PTR(newChild), DOM_NODE_PTR(oldChild), &ret);
|
||||
*_retval = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Node removeChild (in Node oldChild) raises (DOMException); */
|
||||
NS_IMETHODIMP bcNode::RemoveChild(Node *oldChild, Node **_retval)
|
||||
{
|
||||
nsIDOMNode* ret = nsnull;
|
||||
nsresult rv = domPtr->RemoveChild(DOM_NODE_PTR(oldChild), &ret);
|
||||
*_retval = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Node appendChild (in Node newChild) raises (DOMException); */
|
||||
NS_IMETHODIMP bcNode::AppendChild(Node *newChild, Node **_retval)
|
||||
{
|
||||
nsIDOMNode* ret = nsnull;
|
||||
nsresult rv = domPtr->AppendChild(DOM_NODE_PTR(newChild), &ret);
|
||||
*_retval = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* boolean hasChildNodes (); */
|
||||
NS_IMETHODIMP bcNode::HasChildNodes(PRBool *_retval)
|
||||
{
|
||||
return domPtr->HasChildNodes(_retval);
|
||||
}
|
||||
|
||||
/* Node cloneNode (in boolean deep); */
|
||||
NS_IMETHODIMP bcNode::CloneNode(PRBool deep, Node **_retval)
|
||||
{
|
||||
nsIDOMNode* ret = nsnull;
|
||||
nsresult rv = domPtr->CloneNode(deep, &ret);
|
||||
*_retval = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* void normalize (); */
|
||||
NS_IMETHODIMP bcNode::Normalize()
|
||||
{
|
||||
return domPtr->Normalize();
|
||||
}
|
||||
|
||||
/* boolean supports (in DOMString feature, in DOMString version); */
|
||||
NS_IMETHODIMP bcNode::Supports(DOMString feature, DOMString version, PRBool *_retval)
|
||||
{
|
||||
nsString _feature(feature), _version(version);
|
||||
return domPtr->IsSupported(_feature, _version, _retval);
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString namespaceURI; */
|
||||
NS_IMETHODIMP bcNode::GetNamespaceURI(DOMString *aNamespaceURI)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetNamespaceURI(ret);
|
||||
*aNamespaceURI = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* attribute DOMString prefix; */
|
||||
NS_IMETHODIMP bcNode::GetPrefix(DOMString *aPrefix)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetPrefix(ret);
|
||||
*aPrefix = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
NS_IMETHODIMP bcNode::SetPrefix(DOMString aPrefix)
|
||||
{
|
||||
nsString val(aPrefix);
|
||||
nsresult rv = domPtr->SetPrefix(val);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString localName; */
|
||||
NS_IMETHODIMP bcNode::GetLocalName(DOMString *aLocalName)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetPrefix(ret);
|
||||
*aLocalName = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
23
mozilla/java/dom/blackconnect/dom/stubs/bcNode.h
Normal file
23
mozilla/java/dom/blackconnect/dom/stubs/bcNode.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef __bcNode_h__
|
||||
#define __bcNode_h__
|
||||
|
||||
#include "dom.h"
|
||||
#include "nsIDOMNode.h"
|
||||
|
||||
#define DOM_NODE_PTR(_node_) (!_node_ ? nsnull : ((bcNode*)_node_)->domPtr)
|
||||
#define NEW_BCNODE(_node_) (!_node_ ? nsnull : new bcNode(_node_))
|
||||
|
||||
class bcNode : public Node
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NODE
|
||||
|
||||
bcNode(nsIDOMNode* domPtr);
|
||||
virtual ~bcNode();
|
||||
/* private: */
|
||||
nsIDOMNode* domPtr;
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
#endif // __bcNode_h__
|
||||
32
mozilla/java/dom/blackconnect/dom/stubs/bcNodeList.cpp
Normal file
32
mozilla/java/dom/blackconnect/dom/stubs/bcNodeList.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#include "bcNodeList.h"
|
||||
#include "bcNode.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(bcNodeList, NodeList)
|
||||
|
||||
bcNodeList::bcNodeList(nsIDOMNodeList* ptr)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
domPtr = ptr;
|
||||
}
|
||||
|
||||
bcNodeList::~bcNodeList()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
/* Node item (in unsigned long index); */
|
||||
NS_IMETHODIMP bcNodeList::Item(PRUint32 index, Node **_retval)
|
||||
{
|
||||
nsIDOMNode* ret = NULL;
|
||||
nsresult rv = domPtr->Item(index, &ret);
|
||||
*_retval = NEW_BCNODE(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long length; */
|
||||
NS_IMETHODIMP bcNodeList::GetLength(PRUint32 *aLength)
|
||||
{
|
||||
return domPtr->GetLength(aLength);
|
||||
}
|
||||
|
||||
23
mozilla/java/dom/blackconnect/dom/stubs/bcNodeList.h
Normal file
23
mozilla/java/dom/blackconnect/dom/stubs/bcNodeList.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef __bcNodeList_h__
|
||||
#define __bcNodeList_h__
|
||||
|
||||
#include "dom.h"
|
||||
#include "nsIDOMNodeList.h"
|
||||
|
||||
#define DOM_NODELIST_PTR(_nodelist_) (!_nodelist_ ? nsnull : ((bcNodeList*)_nodelist_)->domPtr)
|
||||
#define NEW_BCNODELIST(_nodelist_) (!_nodelist_ ? nsnull : new bcNodeList(_nodelist_))
|
||||
|
||||
class bcNodeList : public NodeList
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NODELIST
|
||||
|
||||
bcNodeList(nsIDOMNodeList* domPtr);
|
||||
virtual ~bcNodeList();
|
||||
private:
|
||||
nsIDOMNodeList* domPtr;
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
#endif // __bcNodeList_h__
|
||||
37
mozilla/java/dom/blackconnect/dom/stubs/bcNotation.cpp
Normal file
37
mozilla/java/dom/blackconnect/dom/stubs/bcNotation.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "bcNotation.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(bcNotation, Notation)
|
||||
|
||||
bcNotation::bcNotation(nsIDOMNotation* ptr)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
domPtr = ptr;
|
||||
nodePtr = new bcNode(ptr);
|
||||
}
|
||||
|
||||
bcNotation::~bcNotation()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString publicId; */
|
||||
NS_IMETHODIMP bcNotation::GetPublicId(DOMString *aPublicId)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetPublicId(ret);
|
||||
*aPublicId = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
/* readonly attribute DOMString systemId; */
|
||||
NS_IMETHODIMP bcNotation::GetSystemId(DOMString *aSystemId)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetSystemId(ret);
|
||||
*aSystemId = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
26
mozilla/java/dom/blackconnect/dom/stubs/bcNotation.h
Normal file
26
mozilla/java/dom/blackconnect/dom/stubs/bcNotation.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef __bcNotation_h__
|
||||
#define __bcNotation_h__
|
||||
|
||||
#include "dom.h"
|
||||
#include "bcNode.h"
|
||||
#include "nsIDOMNotation.h"
|
||||
|
||||
#define DOM_NOTATION_PTR(_notation_) (!_notation_ ? nsnull : ((bcNotation*)_notation_)->domPtr)
|
||||
#define NEW_BCNOTATION(_notation_) (!_notation_ ? nsnull : new bcNotation(_notation_))
|
||||
|
||||
class bcNotation : public Notation
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NOTATION
|
||||
NS_FORWARD_NODE(nodePtr->)
|
||||
|
||||
bcNotation(nsIDOMNotation* domPtr);
|
||||
virtual ~bcNotation();
|
||||
private:
|
||||
nsIDOMNotation* domPtr;
|
||||
bcNode* nodePtr;
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
#endif // __bcNotation_h__
|
||||
@@ -0,0 +1,43 @@
|
||||
#include "bcProcessingInstruction.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(bcProcessingInstruction, ProcessingInstruction)
|
||||
|
||||
bcProcessingInstruction::bcProcessingInstruction(nsIDOMProcessingInstruction* ptr)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
domPtr = ptr;
|
||||
nodePtr = new bcNode(ptr);
|
||||
}
|
||||
|
||||
bcProcessingInstruction::~bcProcessingInstruction()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
/* readonly attribute DOMString target; */
|
||||
NS_IMETHODIMP bcProcessingInstruction::GetTarget(DOMString *aTarget)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetTarget(ret);
|
||||
*aTarget = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
/* attribute DOMString data; */
|
||||
NS_IMETHODIMP bcProcessingInstruction::GetData(DOMString *aData)
|
||||
{
|
||||
nsString ret;
|
||||
nsresult rv = domPtr->GetData(ret);
|
||||
*aData = ret.ToNewUnicode();
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP bcProcessingInstruction::SetData(DOMString aData)
|
||||
{
|
||||
nsString _aData(aData);
|
||||
return domPtr->SetData(_aData);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#ifndef __bcProcessingInstruction_h__
|
||||
#define __bcProcessingInstruction_h__
|
||||
|
||||
#include "dom.h"
|
||||
#include "bcNode.h"
|
||||
#include "nsIDOMProcessingInstruction.h"
|
||||
|
||||
#define DOM_PROCESSINGINSTRUCTION_PTR(_processinginstruction_) (!_processinginstruction_ ? nsnull : ((bcProcessingInstruction*)_processinginstruction_)->domPtr)
|
||||
#define NEW_BCPROCESSINGINSTRUCTION(_processinginstruction_) (!_processinginstruction_ ? nsnull : new bcProcessingInstruction(_processinginstruction_))
|
||||
|
||||
class bcProcessingInstruction : public ProcessingInstruction
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_PROCESSINGINSTRUCTION
|
||||
NS_FORWARD_NODE(nodePtr->)
|
||||
|
||||
bcProcessingInstruction(nsIDOMProcessingInstruction* domPtr);
|
||||
virtual ~bcProcessingInstruction();
|
||||
private:
|
||||
nsIDOMProcessingInstruction* domPtr;
|
||||
bcNode* nodePtr;
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
#endif // __bcProcessingInstruction_h__
|
||||
26
mozilla/java/dom/blackconnect/dom/stubs/bcText.cpp
Normal file
26
mozilla/java/dom/blackconnect/dom/stubs/bcText.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "bcText.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(bcText, Text)
|
||||
|
||||
bcText::bcText(nsIDOMText* ptr)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
domPtr = ptr;
|
||||
dataPtr = new bcCharacterData(ptr);
|
||||
}
|
||||
|
||||
bcText::~bcText()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
/* Text splitText (in unsigned long offset) raises (DOMException); */
|
||||
NS_IMETHODIMP bcText::SplitText(PRUint32 offset, Text **_retval)
|
||||
{
|
||||
nsIDOMText* ret = nsnull;
|
||||
nsresult rv = domPtr->SplitText(offset, &ret);
|
||||
*_retval = NEW_BCTEXT(ret);
|
||||
return rv;
|
||||
}
|
||||
|
||||
27
mozilla/java/dom/blackconnect/dom/stubs/bcText.h
Normal file
27
mozilla/java/dom/blackconnect/dom/stubs/bcText.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef __bcText_h__
|
||||
#define __bcText_h__
|
||||
|
||||
#include "dom.h"
|
||||
#include "nsIDOMText.h"
|
||||
#include "bcCharacterData.h"
|
||||
|
||||
#define DOM_TEXT_PTR(_text_) (!_text_ ? nsnull : ((bcText*)_text_)->domPtr)
|
||||
#define NEW_BCTEXT(_text_) (!_text_ ? nsnull : new bcText(_text_))
|
||||
|
||||
class bcText : public Text
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_TEXT
|
||||
NS_FORWARD_NODE(dataPtr->)
|
||||
NS_FORWARD_CHARACTERDATA(dataPtr->)
|
||||
|
||||
bcText(nsIDOMText* domPtr);
|
||||
virtual ~bcText();
|
||||
private:
|
||||
nsIDOMText* domPtr;
|
||||
bcCharacterData* dataPtr;
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
#endif // __bcText_h__
|
||||
314
mozilla/java/dom/blackconnect/dom/stubs/dom.idl
Normal file
314
mozilla/java/dom/blackconnect/dom/stubs/dom.idl
Normal file
@@ -0,0 +1,314 @@
|
||||
#include "nsISupports.idl"
|
||||
|
||||
#pragma prefix org.mozilla.dom
|
||||
|
||||
|
||||
typedef wstring DOMString;
|
||||
|
||||
interface DocumentType;
|
||||
interface Document;
|
||||
interface NodeList;
|
||||
interface NamedNodeMap;
|
||||
interface Element;
|
||||
|
||||
exception DOMException {
|
||||
unsigned short code;
|
||||
};
|
||||
|
||||
// ExceptionCode
|
||||
const unsigned short INDEX_SIZE_ERR = 1;
|
||||
const unsigned short DOMSTRING_SIZE_ERR = 2;
|
||||
const unsigned short HIERARCHY_REQUEST_ERR = 3;
|
||||
const unsigned short WRONG_DOCUMENT_ERR = 4;
|
||||
const unsigned short INVALID_CHARACTER_ERR = 5;
|
||||
const unsigned short NO_DATA_ALLOWED_ERR = 6;
|
||||
const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
|
||||
const unsigned short NOT_FOUND_ERR = 8;
|
||||
const unsigned short NOT_SUPPORTED_ERR = 9;
|
||||
const unsigned short INUSE_ATTRIBUTE_ERR = 10;
|
||||
// Introduced in DOM Level 2:
|
||||
const unsigned short INVALID_STATE_ERR = 11;
|
||||
// Introduced in DOM Level 2:
|
||||
const unsigned short SYNTAX_ERR = 12;
|
||||
// Introduced in DOM Level 2:
|
||||
const unsigned short INVALID_MODIFICATION_ERR = 13;
|
||||
// Introduced in DOM Level 2:
|
||||
const unsigned short NAMESPACE_ERR = 14;
|
||||
// Introduced in DOM Level 2:
|
||||
const unsigned short INVALID_ACCESS_ERR = 15;
|
||||
|
||||
|
||||
[scriptable, uuid(0776b330-9ad5-11d4-a983-00105ae3801e)]
|
||||
interface DOMImplementation : nsISupports {
|
||||
boolean hasFeature(in DOMString feature,
|
||||
in DOMString version);
|
||||
// Introduced in DOM Level 2:
|
||||
DocumentType createDocumentType(in DOMString qualifiedName,
|
||||
in DOMString publicId,
|
||||
in DOMString systemId)
|
||||
raises(DOMException);
|
||||
// Introduced in DOM Level 2:
|
||||
Document createDocument(in DOMString namespaceURI,
|
||||
in DOMString qualifiedName,
|
||||
in DocumentType doctype)
|
||||
raises(DOMException);
|
||||
};
|
||||
|
||||
[scriptable, uuid(082f98e0-9ad5-11d4-a983-00105ae3801e)]
|
||||
interface Node : nsISupports {
|
||||
// NodeType
|
||||
const unsigned short ELEMENT_NODE = 1;
|
||||
const unsigned short ATTRIBUTE_NODE = 2;
|
||||
const unsigned short TEXT_NODE = 3;
|
||||
const unsigned short CDATA_SECTION_NODE = 4;
|
||||
const unsigned short ENTITY_REFERENCE_NODE = 5;
|
||||
const unsigned short ENTITY_NODE = 6;
|
||||
const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
|
||||
const unsigned short COMMENT_NODE = 8;
|
||||
const unsigned short DOCUMENT_NODE = 9;
|
||||
const unsigned short DOCUMENT_TYPE_NODE = 10;
|
||||
const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
|
||||
const unsigned short NOTATION_NODE = 12;
|
||||
|
||||
readonly attribute DOMString nodeName;
|
||||
attribute DOMString nodeValue;
|
||||
// raises(DOMException) on setting
|
||||
// raises(DOMException) on retrieval
|
||||
|
||||
readonly attribute unsigned short nodeType;
|
||||
readonly attribute Node parentNode;
|
||||
readonly attribute NodeList childNodes;
|
||||
readonly attribute Node firstChild;
|
||||
readonly attribute Node lastChild;
|
||||
readonly attribute Node previousSibling;
|
||||
readonly attribute Node nextSibling;
|
||||
readonly attribute NamedNodeMap attributes;
|
||||
// Modified in DOM Level 2:
|
||||
readonly attribute Document ownerDocument;
|
||||
Node insertBefore(in Node newChild,
|
||||
in Node refChild)
|
||||
raises(DOMException);
|
||||
Node replaceChild(in Node newChild,
|
||||
in Node oldChild)
|
||||
raises(DOMException);
|
||||
Node removeChild(in Node oldChild)
|
||||
raises(DOMException);
|
||||
Node appendChild(in Node newChild)
|
||||
raises(DOMException);
|
||||
boolean hasChildNodes();
|
||||
Node cloneNode(in boolean deep);
|
||||
// Introduced in DOM Level 2:
|
||||
void normalize();
|
||||
// Introduced in DOM Level 2:
|
||||
boolean supports(in DOMString feature,
|
||||
in DOMString version);
|
||||
// Introduced in DOM Level 2:
|
||||
readonly attribute DOMString namespaceURI;
|
||||
// Introduced in DOM Level 2:
|
||||
attribute DOMString prefix;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
// Introduced in DOM Level 2:
|
||||
readonly attribute DOMString localName;
|
||||
};
|
||||
|
||||
[scriptable, uuid(0895fa70-9ad5-11d4-a983-00105ae3801e)]
|
||||
interface NodeList : nsISupports {
|
||||
Node item(in unsigned long index);
|
||||
readonly attribute unsigned long length;
|
||||
};
|
||||
|
||||
[scriptable, uuid(08f4b810-9ad5-11d4-a983-00105ae3801e)]
|
||||
interface NamedNodeMap : nsISupports {
|
||||
Node getNamedItem(in DOMString name);
|
||||
Node setNamedItem(in Node arg)
|
||||
raises(DOMException);
|
||||
Node removeNamedItem(in DOMString name)
|
||||
raises(DOMException);
|
||||
Node item(in unsigned long index);
|
||||
readonly attribute unsigned long length;
|
||||
// Introduced in DOM Level 2:
|
||||
Node getNamedItemNS(in DOMString namespaceURI,
|
||||
in DOMString localName);
|
||||
// Introduced in DOM Level 2:
|
||||
Node setNamedItemNS(in Node arg)
|
||||
raises(DOMException);
|
||||
// Introduced in DOM Level 2:
|
||||
Node removeNamedItemNS(in DOMString namespaceURI,
|
||||
in DOMString localName)
|
||||
raises(DOMException);
|
||||
};
|
||||
|
||||
[scriptable, uuid(0965cbf0-9ad5-11d4-a983-00105ae3801e)]
|
||||
interface CharacterData : Node {
|
||||
attribute DOMString data;
|
||||
// raises(DOMException) on setting
|
||||
// raises(DOMException) on retrieval
|
||||
|
||||
readonly attribute unsigned long length;
|
||||
DOMString substringData(in unsigned long offset,
|
||||
in unsigned long count)
|
||||
raises(DOMException);
|
||||
void appendData(in DOMString arg)
|
||||
raises(DOMException);
|
||||
void insertData(in unsigned long offset,
|
||||
in DOMString arg)
|
||||
raises(DOMException);
|
||||
void deleteData(in unsigned long offset,
|
||||
in unsigned long count)
|
||||
raises(DOMException);
|
||||
void replaceData(in unsigned long offset,
|
||||
in unsigned long count,
|
||||
in DOMString arg)
|
||||
raises(DOMException);
|
||||
};
|
||||
|
||||
[scriptable, uuid(09e31950-9ad5-11d4-a983-00105ae3801e)]
|
||||
interface Attr : Node {
|
||||
readonly attribute DOMString name;
|
||||
readonly attribute boolean specified;
|
||||
attribute DOMString value;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
// Introduced in DOM Level 2:
|
||||
readonly attribute Element ownerElement;
|
||||
};
|
||||
|
||||
[scriptable, uuid(0a7d6f40-9ad5-11d4-a983-00105ae3801e)]
|
||||
interface Element : Node {
|
||||
readonly attribute DOMString tagName;
|
||||
DOMString getAttribute(in DOMString name);
|
||||
void setAttribute(in DOMString name,
|
||||
in DOMString value)
|
||||
raises(DOMException);
|
||||
void removeAttribute(in DOMString name)
|
||||
raises(DOMException);
|
||||
Attr getAttributeNode(in DOMString name);
|
||||
Attr setAttributeNode(in Attr newAttr)
|
||||
raises(DOMException);
|
||||
Attr removeAttributeNode(in Attr oldAttr)
|
||||
raises(DOMException);
|
||||
NodeList getElementsByTagName(in DOMString name);
|
||||
// Introduced in DOM Level 2:
|
||||
DOMString getAttributeNS(in DOMString namespaceURI,
|
||||
in DOMString localName);
|
||||
// Introduced in DOM Level 2:
|
||||
void setAttributeNS(in DOMString namespaceURI,
|
||||
in DOMString qualifiedName,
|
||||
in DOMString value)
|
||||
raises(DOMException);
|
||||
// Introduced in DOM Level 2:
|
||||
void removeAttributeNS(in DOMString namespaceURI,
|
||||
in DOMString localName)
|
||||
raises(DOMException);
|
||||
// Introduced in DOM Level 2:
|
||||
Attr getAttributeNodeNS(in DOMString namespaceURI,
|
||||
in DOMString localName);
|
||||
// Introduced in DOM Level 2:
|
||||
Attr setAttributeNodeNS(in Attr newAttr)
|
||||
raises(DOMException);
|
||||
// Introduced in DOM Level 2:
|
||||
NodeList getElementsByTagNameNS(in DOMString namespaceURI,
|
||||
in DOMString localName);
|
||||
// Introduced in DOM Level 2:
|
||||
boolean hasAttribute(in DOMString name);
|
||||
// Introduced in DOM Level 2:
|
||||
boolean hasAttributeNS(in DOMString namespaceURI,
|
||||
in DOMString localName);
|
||||
};
|
||||
|
||||
[scriptable, uuid(0eefd9f0-9ad5-11d4-a983-00105ae3801e)]
|
||||
interface Text : CharacterData {
|
||||
Text splitText(in unsigned long offset)
|
||||
raises(DOMException);
|
||||
};
|
||||
|
||||
[scriptable, uuid(0ae9ed90-9ad5-11d4-a983-00105ae3801e)]
|
||||
interface Comment : CharacterData {
|
||||
};
|
||||
|
||||
[scriptable, uuid(0b813520-9ad5-11d4-a983-00105ae3801e)]
|
||||
interface CDATASection : Text {
|
||||
};
|
||||
|
||||
[scriptable, uuid(0c07ada0-9ad5-11d4-a983-00105ae3801e)]
|
||||
interface DocumentType : Node {
|
||||
readonly attribute DOMString name;
|
||||
readonly attribute NamedNodeMap entities;
|
||||
readonly attribute NamedNodeMap notations;
|
||||
// Introduced in DOM Level 2:
|
||||
readonly attribute DOMString publicId;
|
||||
// Introduced in DOM Level 2:
|
||||
readonly attribute DOMString systemId;
|
||||
// Introduced in DOM Level 2:
|
||||
readonly attribute DOMString internalSubset;
|
||||
};
|
||||
|
||||
[scriptable, uuid(0c7a48b0-9ad5-11d4-a983-00105ae3801e)]
|
||||
interface Notation : Node {
|
||||
readonly attribute DOMString publicId;
|
||||
readonly attribute DOMString systemId;
|
||||
};
|
||||
|
||||
[scriptable, uuid(0cf30080-9ad5-11d4-a983-00105ae3801e)]
|
||||
interface Entity : Node {
|
||||
readonly attribute DOMString publicId;
|
||||
readonly attribute DOMString systemId;
|
||||
readonly attribute DOMString notationName;
|
||||
};
|
||||
|
||||
[scriptable, uuid(0d4eafc0-9ad5-11d4-a983-00105ae3801e)]
|
||||
interface EntityReference : Node {
|
||||
};
|
||||
|
||||
[scriptable, uuid(0db69880-9ad5-11d4-a983-00105ae3801e)]
|
||||
interface ProcessingInstruction : Node {
|
||||
readonly attribute DOMString target;
|
||||
attribute DOMString data;
|
||||
// raises(DOMException) on setting
|
||||
|
||||
};
|
||||
|
||||
[scriptable, uuid(0e249e00-9ad5-11d4-a983-00105ae3801e)]
|
||||
interface DocumentFragment : Node {
|
||||
};
|
||||
|
||||
[scriptable, uuid(0e81d470-9ad5-11d4-a983-00105ae3801e)]
|
||||
interface Document : Node {
|
||||
readonly attribute DocumentType doctype;
|
||||
readonly attribute DOMImplementation implementation;
|
||||
readonly attribute Element documentElement;
|
||||
Element createElement(in DOMString tagName)
|
||||
raises(DOMException);
|
||||
DocumentFragment createDocumentFragment();
|
||||
Text createTextNode(in DOMString data);
|
||||
Comment createComment(in DOMString data);
|
||||
CDATASection createCDATASection(in DOMString data)
|
||||
raises(DOMException);
|
||||
ProcessingInstruction createProcessingInstruction(in DOMString target,
|
||||
in DOMString data)
|
||||
raises(DOMException);
|
||||
Attr createAttribute(in DOMString name)
|
||||
raises(DOMException);
|
||||
EntityReference createEntityReference(in DOMString name)
|
||||
raises(DOMException);
|
||||
NodeList getElementsByTagName(in DOMString tagname);
|
||||
// Introduced in DOM Level 2:
|
||||
Node importNode(in Node importedNode,
|
||||
in boolean deep)
|
||||
raises(DOMException);
|
||||
// Introduced in DOM Level 2:
|
||||
Element createElementNS(in DOMString namespaceURI,
|
||||
in DOMString qualifiedName)
|
||||
raises(DOMException);
|
||||
// Introduced in DOM Level 2:
|
||||
Attr createAttributeNS(in DOMString namespaceURI,
|
||||
in DOMString qualifiedName)
|
||||
raises(DOMException);
|
||||
// Introduced in DOM Level 2:
|
||||
NodeList getElementsByTagNameNS(in DOMString namespaceURI,
|
||||
in DOMString localName);
|
||||
// Introduced in DOM Level 2:
|
||||
Element getElementById(in DOMString elementId);
|
||||
};
|
||||
|
||||
91
mozilla/java/dom/blackconnect/dom/stubs/makefile.win
Normal file
91
mozilla/java/dom/blackconnect/dom/stubs/makefile.win
Normal file
@@ -0,0 +1,91 @@
|
||||
#!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):
|
||||
# Denis Sharypov <sdv@sparc.spb.su>
|
||||
#
|
||||
|
||||
|
||||
DEPTH = ..\..\..\..\..
|
||||
topsrcdir = ..\..\..\..\..
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
MODULE=javadomstubs
|
||||
COMPONENT=1
|
||||
DLLNAME=$(MODULE)
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
LIBRARY_NAME=javadomstubs
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\dom.idl \
|
||||
$(NULL)
|
||||
|
||||
OBJS = \
|
||||
.\$(OBJDIR)\bcNode.obj \
|
||||
.\$(OBJDIR)\bcElement.obj \
|
||||
.\$(OBJDIR)\bcAttr.obj \
|
||||
.\$(OBJDIR)\bcNodeList.obj \
|
||||
.\$(OBJDIR)\bcNamedNodeMap.obj \
|
||||
.\$(OBJDIR)\bcDocument.obj \
|
||||
.\$(OBJDIR)\bcCharacterData.obj \
|
||||
.\$(OBJDIR)\bcText.obj \
|
||||
.\$(OBJDIR)\bcComment.obj \
|
||||
.\$(OBJDIR)\bcCDATASection.obj \
|
||||
.\$(OBJDIR)\bcDocumentFragment.obj \
|
||||
.\$(OBJDIR)\bcEntityReference.obj \
|
||||
.\$(OBJDIR)\bcEntity.obj \
|
||||
.\$(OBJDIR)\bcNotation.obj \
|
||||
.\$(OBJDIR)\bcDocumentType.obj \
|
||||
.\$(OBJDIR)\bcProcessingInstruction.obj \
|
||||
.\$(OBJDIR)\bcDOMImplementation.obj \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
bcNode.h \
|
||||
bcElement.h \
|
||||
bcAttr.h \
|
||||
bcNodeList.h \
|
||||
bcNamedNodeMap.h \
|
||||
bcDocument.h \
|
||||
bcCharacterData.h \
|
||||
bcText.h \
|
||||
bcComment.h \
|
||||
bcCDATASection.h \
|
||||
bcDocumentFragment.h \
|
||||
bcEntityReference.h \
|
||||
bcEntity.h \
|
||||
bcNotation.h \
|
||||
bcDocumentType.h \
|
||||
bcProcessingInstruction.h \
|
||||
bcDOMImplementation.h \
|
||||
$(NULL)
|
||||
|
||||
LLIBS=$(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom.lib
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\bin\$(DLLNAME).dll
|
||||
rm -f $(DIST)\lib\$(DLLNAME).lib
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user