diff --git a/mozilla/Makefile.in b/mozilla/Makefile.in index 4cf292fa58e..e5c046f718f 100644 --- a/mozilla/Makefile.in +++ b/mozilla/Makefile.in @@ -49,7 +49,6 @@ endif DIRS += \ modules/libutil \ - base \ intl \ js \ modules/security/freenav \ diff --git a/mozilla/allmakefiles.sh b/mozilla/allmakefiles.sh index 0ddf8f6ce63..1be7fff0d0a 100755 --- a/mozilla/allmakefiles.sh +++ b/mozilla/allmakefiles.sh @@ -40,15 +40,6 @@ fi add_makefiles < NUL +GARBAGE=$(GARBAGE) $(XPIDL_GEN_DIR) $(DIST)\bin\components\$(XPIDL_MODULE).xpt + !endif !endif diff --git a/mozilla/config/rules.mk b/mozilla/config/rules.mk index 4d79539a7ba..c527653e9ac 100644 --- a/mozilla/config/rules.mk +++ b/mozilla/config/rules.mk @@ -887,12 +887,16 @@ endif # Export the elements of $(XPIDLSRCS), generating .h and .xpt files and # moving them to the appropriate places. +ifndef XPIDL_MODULE +XPIDL_MODULE = $(MODULE) +endif + ifneq ($(XPIDLSRCS),) -ifeq ($(MODULE),) # we need $(MODULE) to make $(MODULE).xpt +ifeq ($(XPIDL_MODULE),) # we need $(XPIDL_MODULE) to make $(XPIDL_MODULE).xpt export:: FORCE @echo @echo "*** Error processing XPIDLSRCS:" - @echo "Please define MODULE when defining XPIDLSRCS," + @echo "Please define MODULE or XPIDL_MODULE when defining XPIDLSRCS," @echo "so we have a module name to use when creating MODULE.xpt." @echo; sleep 2; false else @@ -919,15 +923,15 @@ export:: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS)) $(XPDIST)/include ifndef NO_GEN_XPT # generate intermediate .xpt files into $(XPIDL_GEN_DIR), then link -# into $(MODULE).xpt and export it to $(DIST)/bin/components. +# into $(XPIDL_MODULE).xpt and export it to $(DIST)/bin/components. $(XPIDL_GEN_DIR)/%.xpt: %.idl $(IDL_COMPILE) $(XPIDL_GEN_DIR) $(XPIDL_COMPILE) -m typelib -w -I $(XPDIST)/idl -I$(srcdir) -o $(XPIDL_GEN_DIR)/$* $< -$(XPIDL_GEN_DIR)/$(MODULE).xpt: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS)) - $(XPIDL_LINK) $(XPIDL_GEN_DIR)/$(MODULE).xpt $^ +$(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS)) + $(XPIDL_LINK) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $^ -install:: $(XPIDL_GEN_DIR)/$(MODULE).xpt - $(INSTALL) -m 444 $(XPIDL_GEN_DIR)/$(MODULE).xpt $(DIST)/bin/components +install:: $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt + $(INSTALL) -m 444 $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(DIST)/bin/components endif diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 646f60fcbdc..e6843186508 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -33,7 +33,6 @@ #include "nsIComponentManager.h" #include "nsIServiceManager.h" #include "nsIEventQueueService.h" -#include "nsXPComCIID.h" #include "nsCRT.h" #include "nsVoidArray.h" #include "nsString.h" diff --git a/mozilla/dom/macbuild/dom.mcp b/mozilla/dom/macbuild/dom.mcp index 7d498a4dd07..8fc80998c69 100644 Binary files a/mozilla/dom/macbuild/dom.mcp and b/mozilla/dom/macbuild/dom.mcp differ diff --git a/mozilla/dom/src/build/Makefile.in b/mozilla/dom/src/build/Makefile.in index 2435ec6163a..95d350a6e1f 100644 --- a/mozilla/dom/src/build/Makefile.in +++ b/mozilla/dom/src/build/Makefile.in @@ -42,7 +42,6 @@ INCLUDES += -I$(PUBLIC)/xpcom -I$(PUBLIC)/raptor \ -I$(PUBLIC)/dom -I$(PUBLIC)/js -I$(srcdir)/../base -I$(PUBLIC)/jsurl GFX_DSO_FLAGS = $(addprefix -lgfx, $(MOZ_TOOLKIT)) -BASE_DSO_FLAGS= $(addprefix -lgmbase, $(MOZ_TOOLKIT)) SHARED_LIBRARY_LIBS = \ $(DIST)/lib/libjsdombase_s.a \ diff --git a/mozilla/dom/src/build/makefile.win b/mozilla/dom/src/build/makefile.win index e38061de61d..9aa823ed8df 100644 --- a/mozilla/dom/src/build/makefile.win +++ b/mozilla/dom/src/build/makefile.win @@ -47,11 +47,10 @@ MISCDEP = \ $(DIST)\lib\jsdomhtml_s.lib \ $(DIST)\lib\jsdomcss_s.lib \ $(DIST)\lib\jsurl.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\netlib.lib \ $(DIST)\lib\js32$(VERSION_NUMBER).lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plds3.lib \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) @@ -70,11 +69,10 @@ LLIBS= \ $(DIST)\lib\jsdomhtml_s.lib \ $(DIST)\lib\jsdomcss_s.lib \ $(DIST)\lib\jsurl.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\netlib.lib \ $(DIST)\lib\js32$(VERSION_NUMBER).lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plds3.lib \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) diff --git a/mozilla/dom/tools/Makefile.in b/mozilla/dom/tools/Makefile.in index ef94a9f5ed3..1d46c57161d 100644 --- a/mozilla/dom/tools/Makefile.in +++ b/mozilla/dom/tools/Makefile.in @@ -55,7 +55,6 @@ INCLUDES += \ $(NULL) LIBS+=\ - -lraptorbase \ $(NSPR_LIBS) \ -lxpcom \ -lreg \ diff --git a/mozilla/dom/tools/Makefile.win b/mozilla/dom/tools/Makefile.win index 5d022401fa5..396c4687d95 100644 --- a/mozilla/dom/tools/Makefile.win +++ b/mozilla/dom/tools/Makefile.win @@ -41,7 +41,7 @@ OBJS = \ LLIBS= \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ -SUBSYSTEM:CONSOLE diff --git a/mozilla/editor/base/makefile.win b/mozilla/editor/base/makefile.win index 7ae6d2001d2..0fa7ba6a47a 100644 --- a/mozilla/editor/base/makefile.win +++ b/mozilla/editor/base/makefile.win @@ -119,9 +119,8 @@ LCFLAGS = \ # These are the libraries we need to link with to create the dll LLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorhtmlpars.lib \ $(DIST)\lib\raptorwidget_s.lib \ $(LIBNSPR) diff --git a/mozilla/editor/guimgr/src/makefile.win b/mozilla/editor/guimgr/src/makefile.win index a6bdfeb6a76..319fbb2414d 100644 --- a/mozilla/editor/guimgr/src/makefile.win +++ b/mozilla/editor/guimgr/src/makefile.win @@ -50,7 +50,7 @@ LCFLAGS = \ $(NULL) # These are the libraries we need to link with to create the dll -LLIBS=$(DIST)\lib\xpcom32.lib $(DIST)\lib\raptorbase.lib +LLIBS=$(DIST)\lib\xpcom.lib !if "$(MOZ_BITS)"=="32" && defined(MOZ_DEBUG) && defined(GLOWCODE) LLIBS=$(LLIBS) $(GLOWDIR)\glowcode.lib diff --git a/mozilla/editor/txmgr/src/Makefile.in b/mozilla/editor/txmgr/src/Makefile.in index bcc55fb4c8e..f5cd05808d7 100644 --- a/mozilla/editor/txmgr/src/Makefile.in +++ b/mozilla/editor/txmgr/src/Makefile.in @@ -35,7 +35,7 @@ CPPSRCS = \ EXTRA_DSO_LDOPTS = \ -L$(DIST)/lib \ - -lraptorbase \ + -lxpcom \ $(NULL) MODULE = txmgr diff --git a/mozilla/editor/txmgr/src/makefile.win b/mozilla/editor/txmgr/src/makefile.win index 23355524d18..277afb56718 100644 --- a/mozilla/editor/txmgr/src/makefile.win +++ b/mozilla/editor/txmgr/src/makefile.win @@ -44,14 +44,14 @@ LINCS=-I$(PUBLIC)\xpcom \ -I$(PUBLIC)\raptor LLIBS= \ - $(DIST)\lib\raptorbase.lib + $(DIST)\lib\xpcom.lib MAKE_OBJ_TYPE = DLL DLLNAME = txmgr DLL=.\$(OBJDIR)\$(DLLNAME).dll MISCDEP = \ - $(DIST)\lib\raptorbase.lib + $(DIST)\lib\xpcom.lib LCFLAGS = \ $(LCFLAGS) \ @@ -59,7 +59,7 @@ LCFLAGS = \ $(NULL) # These are the libraries we need to link with to create the dll -LLIBS=$(DIST)\lib\xpcom32.lib $(DIST)\lib\raptorbase.lib +LLIBS=$(DIST)\lib\xpcom.lib !if "$(MOZ_BITS)"=="32" && defined(MOZ_DEBUG) && defined(GLOWCODE) LLIBS=$(LLIBS) $(GLOWDIR)\glowcode.lib diff --git a/mozilla/editor/txmgr/tests/Makefile.in b/mozilla/editor/txmgr/tests/Makefile.in index f3bd03f3771..4d5918208bd 100644 --- a/mozilla/editor/txmgr/tests/Makefile.in +++ b/mozilla/editor/txmgr/tests/Makefile.in @@ -26,7 +26,6 @@ CPPSRCS = TestTXMgr.cpp INCLUDES += -I$(DIST)/include LIBS = \ - -lraptorbase \ -lxpcom \ -lreg \ $(NSPR_LIBS) \ diff --git a/mozilla/editor/txmgr/tests/makefile.win b/mozilla/editor/txmgr/tests/makefile.win index 8eee8f80f03..d93d7bbd99f 100644 --- a/mozilla/editor/txmgr/tests/makefile.win +++ b/mozilla/editor/txmgr/tests/makefile.win @@ -34,8 +34,7 @@ LINCS=-I$(PUBLIC)\txmgr \ -I$(PUBLIC)\dom LLIBS= \ - $(DIST)\lib\raptorbase.lib \ - $(DIST)\lib\xpcom32.lib + $(DIST)\lib\xpcom.lib !if "$(MOZ_BITS)"=="32" && defined(MOZ_DEBUG) && defined(GLOWCODE) LLIBS=$(LLIBS) $(GLOWDIR)\glowcode.lib !endif diff --git a/mozilla/editor/txtsvc/src/Makefile.in b/mozilla/editor/txtsvc/src/Makefile.in index de50ae1fb34..d94edc9c8e0 100644 --- a/mozilla/editor/txtsvc/src/Makefile.in +++ b/mozilla/editor/txtsvc/src/Makefile.in @@ -34,7 +34,7 @@ CPPSRCS = \ EXTRA_DSO_LDOPTS = \ -L$(DIST)/lib \ - -lraptorbase \ + -lxpcom \ $(NULL) MODULE = txtsvc diff --git a/mozilla/editor/txtsvc/src/makefile.win b/mozilla/editor/txtsvc/src/makefile.win index a117bbca11c..d01da1298bf 100644 --- a/mozilla/editor/txtsvc/src/makefile.win +++ b/mozilla/editor/txtsvc/src/makefile.win @@ -44,14 +44,14 @@ LINCS=-I$(PUBLIC)\xpcom \ -I$(PUBLIC)\raptor LLIBS= \ - $(DIST)\lib\raptorbase.lib + $(DIST)\lib\xpcom.lib MAKE_OBJ_TYPE = DLL DLLNAME = txtsvc DLL=.\$(OBJDIR)\$(DLLNAME).dll MISCDEP = \ - $(DIST)\lib\raptorbase.lib + $(DIST)\lib\xpcom.lib LCFLAGS = \ $(LCFLAGS) \ @@ -59,7 +59,7 @@ LCFLAGS = \ $(NULL) # These are the libraries we need to link with to create the dll -LLIBS=$(DIST)\lib\xpcom32.lib $(DIST)\lib\raptorbase.lib +LLIBS=$(DIST)\lib\xpcom.lib !if "$(MOZ_BITS)"=="32" && defined(MOZ_DEBUG) && defined(GLOWCODE) LLIBS=$(LLIBS) $(GLOWDIR)\glowcode.lib diff --git a/mozilla/extensions/pics/src/Makefile.in b/mozilla/extensions/pics/src/Makefile.in index 8566fdf649e..f1754f530d9 100644 --- a/mozilla/extensions/pics/src/Makefile.in +++ b/mozilla/extensions/pics/src/Makefile.in @@ -46,7 +46,7 @@ EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS)) MODULE = pics -REQUIRES = js netlib xpcom xppref32 raptorbase nspr +REQUIRES = js netlib xpcom xppref32 nspr MKSHLIB := diff --git a/mozilla/extensions/pics/src/makefile.win b/mozilla/extensions/pics/src/makefile.win index 86c0ad5c9f5..80c772052d9 100644 --- a/mozilla/extensions/pics/src/makefile.win +++ b/mozilla/extensions/pics/src/makefile.win @@ -74,9 +74,9 @@ LLIBS = \ $(LIBNSPR) \ $(DIST)\lib\js$(MOZ_BITS)$(VERSION_NUMBER).lib \ $(DIST)\lib\netlib.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\xppref32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\raptorhtmlpars.lib \ $(HASHLIBS) diff --git a/mozilla/extensions/pics/tests/Makefile.in b/mozilla/extensions/pics/tests/Makefile.in index ee7c17e2e49..3da97aa948f 100644 --- a/mozilla/extensions/pics/tests/Makefile.in +++ b/mozilla/extensions/pics/tests/Makefile.in @@ -32,7 +32,6 @@ LIBS = \ -lxpcom \ -lreg \ -lpics \ - -lraptorbase \ $(NSPR_LIBS) \ $(NULL) diff --git a/mozilla/extensions/pics/tests/makefile.win b/mozilla/extensions/pics/tests/makefile.win index c88dc5d1f47..22028b038dd 100644 --- a/mozilla/extensions/pics/tests/makefile.win +++ b/mozilla/extensions/pics/tests/makefile.win @@ -45,8 +45,7 @@ LINCS = -I$(PUBLIC)/js \ LLIBS= \ $(DIST)\lib\pics.lib \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) \ diff --git a/mozilla/extensions/wallet/src/makefile.win b/mozilla/extensions/wallet/src/makefile.win index 75ec548e67e..be9a97a05e6 100644 --- a/mozilla/extensions/wallet/src/makefile.win +++ b/mozilla/extensions/wallet/src/makefile.win @@ -39,11 +39,10 @@ EXPORTS= $(NULL) LLIBS=$(LLIBS) $(LIBNSPR) \ $(WALLETLIBS) \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\secfreenav32.lib \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\xppref32.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\xplib.lib \ $(DIST)\lib\netlib.lib \ $(NULL) diff --git a/mozilla/gfx/macbuild/gfx.mcp b/mozilla/gfx/macbuild/gfx.mcp index e91fb8ce62c..0bfa16fddfe 100644 Binary files a/mozilla/gfx/macbuild/gfx.mcp and b/mozilla/gfx/macbuild/gfx.mcp differ diff --git a/mozilla/gfx/public/MANIFEST b/mozilla/gfx/public/MANIFEST index f571a2333ee..9972a4d1164 100644 --- a/mozilla/gfx/public/MANIFEST +++ b/mozilla/gfx/public/MANIFEST @@ -28,3 +28,6 @@ nsIDeviceContextSpec.h nsIDeviceContextSpecFactory.h nsColorNameIDs.h nsIDrawingSurface.h +nsITimer.h +nsITimerCallback.h +nsRepeater.h diff --git a/mozilla/gfx/public/Makefile.in b/mozilla/gfx/public/Makefile.in index b463c0904ee..d42813c2439 100644 --- a/mozilla/gfx/public/Makefile.in +++ b/mozilla/gfx/public/Makefile.in @@ -49,7 +49,9 @@ EXPORTS = \ nsIDeviceContextSpecFactory.h \ nsIDrawingSurface.h \ nsColorNameIDs.h \ - $(NULL) + nsITimer.h \ + nsITimerCallback.h \ + $(NULL) EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS)) diff --git a/mozilla/gfx/public/makefile.win b/mozilla/gfx/public/makefile.win index 01f42899f3a..2ee836e2bf7 100644 --- a/mozilla/gfx/public/makefile.win +++ b/mozilla/gfx/public/makefile.win @@ -45,6 +45,8 @@ EXPORTS = \ nsIDeviceContextSpecFactory.h \ nsIDrawingSurface.h \ nsColorNameIDs.h \ + nsITimer.h \ + nsITimerCallback.h \ $(NULL) MODULE=raptor diff --git a/mozilla/gfx/public/nsITimer.h b/mozilla/gfx/public/nsITimer.h index 38874809146..55f071beb7d 100644 --- a/mozilla/gfx/public/nsITimer.h +++ b/mozilla/gfx/public/nsITimer.h @@ -91,6 +91,12 @@ public: }; /** Factory method for creating an nsITimer */ -extern NS_GFX nsresult NS_NewTimer(nsITimer** aInstancePtrResult); +extern +#ifdef XP_MAC // On the macintosh, this is built into the network library. +NS_NET +#else +NS_GFX +#endif +nsresult NS_NewTimer(nsITimer** aInstancePtrResult); #endif diff --git a/mozilla/gfx/public/nsRepeater.h b/mozilla/gfx/public/nsRepeater.h new file mode 100644 index 00000000000..c0950847148 --- /dev/null +++ b/mozilla/gfx/public/nsRepeater.h @@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +#ifndef nsRepeater_h___ +#define nsRepeater_h___ + +#include "nscore.h" + +class EventRecord; + +class NS_NET Repeater { + public: + + Repeater(); + virtual ~Repeater(); + + virtual void RepeatAction(const EventRecord &aMacEvent) = 0; + + void StartRepeating(); + void StopRepeating(); + void StartIdling(); + void StopIdling(); + + static void DoRepeaters(const EventRecord &aMacEvent); + static void DoIdlers(const EventRecord &aMacEvent); + + protected: + + void AddToRepeatList(); + void RemoveFromRepeatList(); + void AddToIdleList(); + void RemoveFromIdleList(); + + static Repeater* sRepeaters; + static Repeater* sIdlers; + + bool mRepeating; + bool mIdling; + Repeater* mPrevRptr; + Repeater* mNextRptr; + Repeater* mPrevIdlr; + Repeater* mNextIdlr; +}; + +#endif \ No newline at end of file diff --git a/mozilla/gfx/src/gtk/Makefile.in b/mozilla/gfx/src/gtk/Makefile.in index 74ce1da996e..7c2980c138d 100644 --- a/mozilla/gfx/src/gtk/Makefile.in +++ b/mozilla/gfx/src/gtk/Makefile.in @@ -43,7 +43,8 @@ CPPSRCS = \ nsGfxFactoryGTK.cpp \ nsRenderingContextGTK.cpp \ nsImageGTK.cpp \ - nsRegionGTK.cpp + nsRegionGTK.cpp \ + nsTimer.cpp CSRCS = \ nsPrintdGTK.c diff --git a/mozilla/gfx/src/mac/nsRepeater.cpp b/mozilla/gfx/src/mac/nsRepeater.cpp new file mode 100644 index 00000000000..5a93b4d2970 --- /dev/null +++ b/mozilla/gfx/src/mac/nsRepeater.cpp @@ -0,0 +1,147 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +#include "nsRepeater.h" + +Repeater* Repeater::sRepeaters = 0; +Repeater* Repeater::sIdlers = 0; + +Repeater::Repeater() +{ + mRepeating = false; + mIdling = false; + mPrevRptr = 0; + mNextRptr = 0; + mPrevIdlr = 0; + mNextIdlr = 0; +} + +Repeater::~Repeater() +{ + if (mRepeating) RemoveFromRepeatList(); + if (mIdling) RemoveFromIdleList(); +} + +// protected helper functs + +//---------------------------------------------------------------------------- +void Repeater::AddToRepeatList() +{ + if (sRepeaters) + { + sRepeaters->mPrevRptr = this; + mNextRptr = sRepeaters; + } + sRepeaters = this; +} + +//---------------------------------------------------------------------------- +void Repeater::RemoveFromRepeatList() +{ + if (sRepeaters == this) sRepeaters = mNextRptr; + if (mPrevRptr) mPrevRptr->mNextRptr = mNextRptr; + if (mNextRptr) mNextRptr->mPrevRptr = mPrevRptr; + mPrevRptr = 0; + mNextRptr = 0; +} + +//---------------------------------------------------------------------------- +void Repeater::AddToIdleList() +{ + if (sIdlers) + { + sIdlers->mPrevIdlr = this; + mNextIdlr = sIdlers; + } + sIdlers = this; +} + +//---------------------------------------------------------------------------- +void Repeater::RemoveFromIdleList() +{ + if (sIdlers == this) sIdlers = mNextIdlr; + if (mPrevIdlr) mPrevIdlr->mNextIdlr = mNextIdlr; + if (mNextIdlr) mNextIdlr->mPrevIdlr = mPrevIdlr; + mPrevIdlr = 0; + mNextIdlr = 0; +} + +// repeater methods +//---------------------------------------------------------------------------- + +void Repeater::StartRepeating() +{ + if (!mRepeating) + { + AddToRepeatList(); + mRepeating = true; + } +} + +void Repeater::StopRepeating() +{ + if (mRepeating) + { + RemoveFromRepeatList(); + mRepeating = false; + } +} + +void Repeater::DoRepeaters(const EventRecord &aMacEvent) +{ + Repeater* theRepeater = sRepeaters; + while (theRepeater) + { + theRepeater->RepeatAction(aMacEvent); + theRepeater = theRepeater->mNextRptr; + } +} + +// idler methods + +void Repeater::StartIdling() +{ + if (!mIdling) + { + AddToIdleList(); + mIdling = true; + } +} + +void Repeater::StopIdling() +{ + if (mIdling) + { + RemoveFromIdleList(); + mIdling = false; + } +} + +void Repeater::DoIdlers(const EventRecord &aMacEvent) +{ + Repeater* theIdler = sIdlers; + while (theIdler) + { + theIdler->RepeatAction(aMacEvent); + theIdler = theIdler->mNextIdlr; + } +} + + + + diff --git a/mozilla/gfx/src/motif/Makefile.in b/mozilla/gfx/src/motif/Makefile.in index 50d8b7984ec..8c92c716888 100644 --- a/mozilla/gfx/src/motif/Makefile.in +++ b/mozilla/gfx/src/motif/Makefile.in @@ -36,7 +36,6 @@ EXTRA_DSO_LDOPTS+=\ -L$(DIST)/bin \ -lxpcom \ -lraptorgfx \ - -lraptorbase \ -lreg \ $(NSPR_LIBS) @@ -44,6 +43,7 @@ EXTRA_DSO_LDOPTS+= $(XLDFLAGS) $(XLIBS) CPPSRCS=nsDeviceContextMotif.cpp nsFontMetricsMotif.cpp nsGfxFactoryMotif.cpp \ + nsTimer.cpp \ nsRenderingContextMotif.cpp nsRegionMotif.cpp nsImageMotif.cpp include $(topsrcdir)/config/rules.mk diff --git a/mozilla/gfx/src/photon/Makefile.in b/mozilla/gfx/src/photon/Makefile.in index f0722fb46c8..8c6fbc2e8f0 100644 --- a/mozilla/gfx/src/photon/Makefile.in +++ b/mozilla/gfx/src/photon/Makefile.in @@ -43,6 +43,7 @@ CPPSRCS = \ nsGfxFactoryPh.cpp \ nsImagePh.cpp \ nsRegionPh.cpp \ + nsTimer.cpp \ nsRenderingContextPh.cpp diff --git a/mozilla/gfx/src/ps/Makefile.in b/mozilla/gfx/src/ps/Makefile.in index e27c494d9a3..7e40e58af28 100644 --- a/mozilla/gfx/src/ps/Makefile.in +++ b/mozilla/gfx/src/ps/Makefile.in @@ -32,7 +32,7 @@ MODULE=raptor DEFINES += -D_IMPL_NS_GFXONXP CFLAGS += $(TK_CFLAGS) -LLIBS+=$(DIST)/lib/libxpcom.a $(DIST)/lib/libraptorbase.a $(DIST)/lib/libraptorgfx.a +LLIBS+=$(DIST)/lib/libxpcom.a $(DIST)/lib/libraptorgfx.a CPPSRCS = \ nsDeviceContextPS.cpp \ diff --git a/mozilla/gfx/src/rhapsody/Makefile.in b/mozilla/gfx/src/rhapsody/Makefile.in index 17adace7eaa..4475de9e847 100644 --- a/mozilla/gfx/src/rhapsody/Makefile.in +++ b/mozilla/gfx/src/rhapsody/Makefile.in @@ -33,7 +33,7 @@ MODULE=raptor #LCFLAGS+=-D_IMPL_NS_GFXONXP #EXTRA_DSO_LDOPTS += -L$(DIST)/bin -lxpcom -lraptorgfx \ --lraptorbase -lreg $(NSPR_LIBS) +-lreg $(NSPR_LIBS) #CPPSRCS = \ @@ -42,6 +42,7 @@ MODULE=raptor nsGfxFactoryUnix.cpp \ nsRenderingContextUnix.cpp \ nsRegionUnix.cpp \ + nsTimer.cpp \ nsImageUnix.cpp include $(topsrcdir)/config/rules.mk diff --git a/mozilla/gfx/src/windows/makefile.win b/mozilla/gfx/src/windows/makefile.win index 6d21a479814..a066e1afa93 100644 --- a/mozilla/gfx/src/windows/makefile.win +++ b/mozilla/gfx/src/windows/makefile.win @@ -44,6 +44,7 @@ OBJS = \ .\$(OBJDIR)\nsDeviceContextSpecWin.obj \ .\$(OBJDIR)\nsDeviceContextSpecFactoryW.obj \ .\$(OBJDIR)\nsGfxFactoryWin.obj \ + .\$(OBJDIR)\nsTimer.obj \ $(NULL) EXPORTS= nsIRenderingContextWin.h \ @@ -70,8 +71,7 @@ LCFLAGS = \ $(NULL) LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\img32$(VERSION_NUMBER).lib \ $(DIST)\lib\js32$(VERSION_NUMBER).lib \ $(DIST)\lib\util.lib \ diff --git a/mozilla/gfx/src/xlib/Makefile.in b/mozilla/gfx/src/xlib/Makefile.in index 878c41b48f3..26a8b1346cb 100644 --- a/mozilla/gfx/src/xlib/Makefile.in +++ b/mozilla/gfx/src/xlib/Makefile.in @@ -42,6 +42,7 @@ CPPSRCS = nsFontMetricsXlib.cpp \ nsRenderingContextXlib.cpp \ nsDeviceContextSpecFactoryX.cpp \ nsDeviceContextSpecXlib.cpp \ + nsTimer.cpp \ nsGfxFactoryXlib.cpp CSRCS = diff --git a/mozilla/gfx/tests/Makefile.in b/mozilla/gfx/tests/Makefile.in index 7c1bc4ce624..df668ddb205 100644 --- a/mozilla/gfx/tests/Makefile.in +++ b/mozilla/gfx/tests/Makefile.in @@ -36,7 +36,6 @@ INCLUDES+=-I$(srcdir)/../src -I$(PUBLIC)/raptor -I$(PUBLIC)/xpcom LIBS = \ -lraptorgfx \ - -lraptorbase \ -lnetlib \ -lhttpurl \ -lgophurl \ @@ -50,7 +49,6 @@ LIBS = \ -lnetcnvts \ -lnetcache \ -lpwcac \ - -lgmbase$(MOZ_TOOLKIT) \ $(TK_LIBS) \ -lxpcom \ -lreg \ diff --git a/mozilla/gfx/tests/btest/makefile.win b/mozilla/gfx/tests/btest/makefile.win index 6aee7792764..57116a20912 100644 --- a/mozilla/gfx/tests/btest/makefile.win +++ b/mozilla/gfx/tests/btest/makefile.win @@ -25,9 +25,8 @@ PROGRAMS = $(PROG0) LINCS=-I$(XPDIST)\public\raptor -I$(XPDIST)\public\xpcom -I..\src LLIBS= \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorgfxwin.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\img32$(VERSION_NUMBER).lib \ diff --git a/mozilla/gfx/tests/makefile.win b/mozilla/gfx/tests/makefile.win index ec793cd7d11..b85dab88a34 100644 --- a/mozilla/gfx/tests/makefile.win +++ b/mozilla/gfx/tests/makefile.win @@ -29,9 +29,8 @@ PROGRAMS = $(PROG1) $(PROG2) $(PROG3) LINCS=-I$(XPDIST)\public\raptor -I$(XPDIST)\public\xpcom -I..\src LLIBS= \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorgfxwin.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib diff --git a/mozilla/htmlparser/robot/Makefile.in b/mozilla/htmlparser/robot/Makefile.in index 7f51bf7fc17..3004220ec2d 100644 --- a/mozilla/htmlparser/robot/Makefile.in +++ b/mozilla/htmlparser/robot/Makefile.in @@ -32,12 +32,10 @@ include $(topsrcdir)/config/config.mk LIBS = \ - -lraptorbase \ -lraptorhtmlpars \ -lexpat \ -lxmltok \ -lnetlib \ - -lgmbase$(MOZ_TOOLKIT) \ -lftpurl \ -lfileurl \ -labouturl \ diff --git a/mozilla/htmlparser/robot/makefile.win b/mozilla/htmlparser/robot/makefile.win index 801647fab59..06be711b964 100644 --- a/mozilla/htmlparser/robot/makefile.win +++ b/mozilla/htmlparser/robot/makefile.win @@ -23,8 +23,7 @@ DEPTH=..\.. LLIBS= \ $(DIST)\lib\raptorhtmlpars.lib \ - $(DIST)\lib\raptorbase.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\netlib.lib \ diff --git a/mozilla/htmlparser/robot/test/makefile.win b/mozilla/htmlparser/robot/test/makefile.win index ab56a2def73..a6e69218070 100644 --- a/mozilla/htmlparser/robot/test/makefile.win +++ b/mozilla/htmlparser/robot/test/makefile.win @@ -23,14 +23,12 @@ PROGRAM = .\$(OBJDIR)\htmlrobot.exe MISCDEP= \ $(DIST)\lib\DebugRobot.lib \ - $(DIST)\lib\raptorbase.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(NULL) MYLIBS= \ $(DIST)\lib\DebugRobot.lib \ - $(DIST)\lib\raptorbase.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(NULL) LLIBS= $(MYLIBS) \ diff --git a/mozilla/htmlparser/src/makefile.win b/mozilla/htmlparser/src/makefile.win index 3b48fd7a520..7d2f893e5c6 100644 --- a/mozilla/htmlparser/src/makefile.win +++ b/mozilla/htmlparser/src/makefile.win @@ -134,8 +134,7 @@ LCFLAGS = \ # These are the libraries we need to link with to create the dll LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\expat.lib \ $(LIBNSPR) diff --git a/mozilla/htmlparser/tests/grabpage/makefile.win b/mozilla/htmlparser/tests/grabpage/makefile.win index 98295e01048..2c93fb12124 100644 --- a/mozilla/htmlparser/tests/grabpage/makefile.win +++ b/mozilla/htmlparser/tests/grabpage/makefile.win @@ -23,9 +23,8 @@ PROGRAM = .\$(OBJDIR)\grabpage.exe MISCDEP= \ $(DIST)\lib\raptorhtmlpars.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\netlib.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) OBJS = \ @@ -39,9 +38,8 @@ LINCS= \ MYLIBS= \ $(DIST)\lib\raptorhtmlpars.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\netlib.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(NULL) diff --git a/mozilla/htmlparser/tests/logparse/Makefile.in b/mozilla/htmlparser/tests/logparse/Makefile.in index 00237c88989..d36ca928cf5 100644 --- a/mozilla/htmlparser/tests/logparse/Makefile.in +++ b/mozilla/htmlparser/tests/logparse/Makefile.in @@ -32,7 +32,6 @@ include $(topsrcdir)/config/config.mk LIBS = \ -lraptorhtmlpars \ - -lraptorbase \ -lxpcom \ -lreg \ $(NSPR_LIBS) \ diff --git a/mozilla/htmlparser/tests/logparse/makefile.win b/mozilla/htmlparser/tests/logparse/makefile.win index 95b779c3311..f95d75c1e9f 100644 --- a/mozilla/htmlparser/tests/logparse/makefile.win +++ b/mozilla/htmlparser/tests/logparse/makefile.win @@ -1,4 +1,4 @@ -#!nmake +!#!nmake # # The contents of this file are subject to the Netscape Public License # Version 1.0 (the "NPL"); you may not use this file except in @@ -23,7 +23,7 @@ PROGRAM = .\$(OBJDIR)\logparse.exe MISCDEP= \ $(DIST)\lib\raptorhtmlpars.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) OBJS = \ @@ -37,7 +37,7 @@ LINCS= \ MYLIBS= \ $(DIST)\lib\raptorhtmlpars.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(NULL) diff --git a/mozilla/intl/chardet/src/makefile.win b/mozilla/intl/chardet/src/makefile.win index e1d96e98e9e..62770b916ea 100644 --- a/mozilla/intl/chardet/src/makefile.win +++ b/mozilla/intl/chardet/src/makefile.win @@ -51,9 +51,8 @@ DLL=.\$(OBJDIR)\$(DLLNAME).dll LLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ - $(DIST)\lib\raptorbase.lib \ $(LIBNSPR) include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/intl/locale/src/makefile.win b/mozilla/intl/locale/src/makefile.win index 90574b9cb50..6cd69fe35f9 100644 --- a/mozilla/intl/locale/src/makefile.win +++ b/mozilla/intl/locale/src/makefile.win @@ -46,8 +46,7 @@ LINCS = -I. \ -I$(PUBLIC)\unicharutil -LLIBS = $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ +LLIBS = $(DIST)\lib\xpcom.lib \ $(LIBNSPR) MISCDEP = $(LLIBS) diff --git a/mozilla/intl/locale/src/windows/makefile.win b/mozilla/intl/locale/src/windows/makefile.win index dca72352664..cc99611b171 100644 --- a/mozilla/intl/locale/src/windows/makefile.win +++ b/mozilla/intl/locale/src/windows/makefile.win @@ -54,8 +54,7 @@ LCFLAGS = \ $(NULL) LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\nslocale_s.lib \ $(LIBNSPR) diff --git a/mozilla/intl/locale/tests/Makefile.in b/mozilla/intl/locale/tests/Makefile.in index 77be41e8c7a..ecc3dd601b9 100644 --- a/mozilla/intl/locale/tests/Makefile.in +++ b/mozilla/intl/locale/tests/Makefile.in @@ -32,7 +32,6 @@ LOCAL_INCLUDES = -I$(srcdir)/../src include $(topsrcdir)/config/config.mk LIBS = \ - -lraptorbase \ -lxpcom \ -lreg \ $(NSPR_LIBS) \ diff --git a/mozilla/intl/locale/tests/makefile.win b/mozilla/intl/locale/tests/makefile.win index c2bec7c13ff..1e082ed80c1 100644 --- a/mozilla/intl/locale/tests/makefile.win +++ b/mozilla/intl/locale/tests/makefile.win @@ -32,9 +32,8 @@ LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\locale -I$(PUBLIC)\raptor \ -I$(PUBLIC)\uconv -I$(PUBLIC)\unicharutil LLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\nslocale.lib diff --git a/mozilla/intl/lwbrk/src/makefile.win b/mozilla/intl/lwbrk/src/makefile.win index 4a958ab6502..60049fa95ed 100644 --- a/mozilla/intl/lwbrk/src/makefile.win +++ b/mozilla/intl/lwbrk/src/makefile.win @@ -54,9 +54,8 @@ DLL=.\$(OBJDIR)\$(DLLNAME).dll LLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ - $(DIST)\lib\raptorbase.lib \ $(LIBNSPR) include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/intl/lwbrk/tests/Makefile.in b/mozilla/intl/lwbrk/tests/Makefile.in index df23faa9b1d..d93549d19e0 100644 --- a/mozilla/intl/lwbrk/tests/Makefile.in +++ b/mozilla/intl/lwbrk/tests/Makefile.in @@ -30,7 +30,6 @@ INCLUDES += -I$(srcdir)/../public -I$(DIST)/include LIBS = \ -lxpcom \ - -lraptorbase \ -lreg \ $(NSPR_LIBS) \ $(NULL) diff --git a/mozilla/intl/lwbrk/tests/makefile.win b/mozilla/intl/lwbrk/tests/makefile.win index bbcd4be9f89..6eddbd8efca 100644 --- a/mozilla/intl/lwbrk/tests/makefile.win +++ b/mozilla/intl/lwbrk/tests/makefile.win @@ -30,8 +30,7 @@ REQUIRES=libreg LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\lwbrk -I$(PUBLIC)\raptor LLIBS= \ - $(DIST)\lib\raptorbase.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib diff --git a/mozilla/intl/strres/src/makefile.win b/mozilla/intl/strres/src/makefile.win index 300d3dc7b65..0c826a3609d 100644 --- a/mozilla/intl/strres/src/makefile.win +++ b/mozilla/intl/strres/src/makefile.win @@ -51,8 +51,7 @@ LCFLAGS = \ # These are the libraries we need to link with to create the dll LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) !if "$(MOZ_BITS)"=="32" && defined(MOZ_DEBUG) && defined(GLOWCODE) diff --git a/mozilla/intl/strres/tests/Makefile.in b/mozilla/intl/strres/tests/Makefile.in index dd7edfc4655..8a33d0ad671 100644 --- a/mozilla/intl/strres/tests/Makefile.in +++ b/mozilla/intl/strres/tests/Makefile.in @@ -37,13 +37,11 @@ LIBS = \ -lhttpurl \ -lnetwork \ -lnetcache \ - -lgmbase$(MOZ_TOOLKIT) \ $(TK_LIBS) \ -lpref \ -lsecfree \ -l$(MOZ_LIB_JS_PREFIX)js \ -lxp \ - -lraptorbase \ -lxpcom \ -lreg \ $(ZLIB_LIBS) \ diff --git a/mozilla/intl/strres/tests/StringBundleTest.cpp b/mozilla/intl/strres/tests/StringBundleTest.cpp index 375bcc925f9..c0369eed7c9 100644 --- a/mozilla/intl/strres/tests/StringBundleTest.cpp +++ b/mozilla/intl/strres/tests/StringBundleTest.cpp @@ -22,7 +22,6 @@ #include "nsINetService.h" #include "nsIServiceManager.h" #include "nsIComponentManager.h" -#include "nsXPComCIID.h" #define TEST_URL "resource:/res/strres.properties" diff --git a/mozilla/intl/strres/tests/makefile.win b/mozilla/intl/strres/tests/makefile.win index 664f834b949..1c1e191ae87 100644 --- a/mozilla/intl/strres/tests/makefile.win +++ b/mozilla/intl/strres/tests/makefile.win @@ -30,8 +30,7 @@ LINCS=\ $(NULL) LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ !if "$(MOZ_BITS)"=="32" && defined(MOZ_DEBUG) && defined(GLOWCODE) diff --git a/mozilla/intl/uconv/src/Makefile.in b/mozilla/intl/uconv/src/Makefile.in index 485bf8c6a44..0e99ad4e8e3 100644 --- a/mozilla/intl/uconv/src/Makefile.in +++ b/mozilla/intl/uconv/src/Makefile.in @@ -47,7 +47,7 @@ EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS)) CFLAGS += -DUSE_NSREG -D__STDC__ -REQUIRES = $(MODULE) libxpcom libraptorbase +REQUIRES = $(MODULE) libxpcom include $(topsrcdir)/config/rules.mk diff --git a/mozilla/intl/uconv/src/makefile.win b/mozilla/intl/uconv/src/makefile.win index 76cb1f6f4fa..df69e46237a 100644 --- a/mozilla/intl/uconv/src/makefile.win +++ b/mozilla/intl/uconv/src/makefile.win @@ -75,8 +75,7 @@ LINCS= \ $(NULL) LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) MISCDEP = $(LLIBS) diff --git a/mozilla/intl/uconv/tests/Makefile.in b/mozilla/intl/uconv/tests/Makefile.in index bd2bca8218a..e7d9348cca5 100644 --- a/mozilla/intl/uconv/tests/Makefile.in +++ b/mozilla/intl/uconv/tests/Makefile.in @@ -36,7 +36,7 @@ INCLUDES += -I$(srcdir)/../ucvlatin \ -I$(srcdir)/../ucvja2 -LIBS += $(NSPR_LIBS) -L$(DIST)/bin/ -lxpcom -lraptorbase -lreg -luconv +LIBS += $(NSPR_LIBS) -L$(DIST)/bin/ -lxpcom -lreg -luconv # needed for mac linux ifeq ($(OS_ARCH),Linux) diff --git a/mozilla/intl/uconv/tests/makefile.win b/mozilla/intl/uconv/tests/makefile.win index 803ec4b8b38..350cdccf9c9 100644 --- a/mozilla/intl/uconv/tests/makefile.win +++ b/mozilla/intl/uconv/tests/makefile.win @@ -26,8 +26,7 @@ RCFLAGS=/d_DEBUG !endif MISCDEP= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\uconv.lib \ $(LIBNSPR) \ @@ -43,8 +42,7 @@ LINCS= \ $(NULL) LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ -SUBSYSTEM:CONSOLE include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/intl/uconv/ucvcn/Makefile.in b/mozilla/intl/uconv/ucvcn/Makefile.in index 7356fe16bbd..23bd7a76d09 100644 --- a/mozilla/intl/uconv/ucvcn/Makefile.in +++ b/mozilla/intl/uconv/ucvcn/Makefile.in @@ -44,11 +44,11 @@ CPPSRCS = \ EXPORTS = \ nsUCvCnCID.h \ $(NULL) - + EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS)) CFLAGS += -DUSE_NSREG -D__STDC__ -REQUIRES = $(MODULE) libxpcom libraptorbase +REQUIRES = $(MODULE) libxpcom include $(topsrcdir)/config/rules.mk diff --git a/mozilla/intl/uconv/ucvcn/makefile.win b/mozilla/intl/uconv/ucvcn/makefile.win index fdd9cfd9e44..ef96795b52f 100644 --- a/mozilla/intl/uconv/ucvcn/makefile.win +++ b/mozilla/intl/uconv/ucvcn/makefile.win @@ -62,8 +62,7 @@ LINCS= \ $(NULL) LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) MISCDEP = $(LLIBS) diff --git a/mozilla/intl/uconv/ucvja/Makefile.in b/mozilla/intl/uconv/ucvja/Makefile.in index e486593ca98..77a446e660d 100644 --- a/mozilla/intl/uconv/ucvja/Makefile.in +++ b/mozilla/intl/uconv/ucvja/Makefile.in @@ -38,11 +38,11 @@ CPPSRCS = \ EXPORTS = \ nsUCVJACID.h \ $(NULL) - + EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS)) CFLAGS += -DUSE_NSREG -D__STDC__ -REQUIRES = $(MODULE) libxpcom libraptorbase +REQUIRES = $(MODULE) libxpcom include $(topsrcdir)/config/rules.mk diff --git a/mozilla/intl/uconv/ucvja/makefile.win b/mozilla/intl/uconv/ucvja/makefile.win index 84b2df4227b..7312a46c146 100644 --- a/mozilla/intl/uconv/ucvja/makefile.win +++ b/mozilla/intl/uconv/ucvja/makefile.win @@ -50,8 +50,7 @@ LINCS= \ $(NULL) LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) MISCDEP = $(LLIBS) diff --git a/mozilla/intl/uconv/ucvja2/Makefile.in b/mozilla/intl/uconv/ucvja2/Makefile.in index db770bd06fd..1d7f5bc1511 100644 --- a/mozilla/intl/uconv/ucvja2/Makefile.in +++ b/mozilla/intl/uconv/ucvja2/Makefile.in @@ -43,6 +43,6 @@ EXPORTS = \ CFLAGS += -DUSE_NSREG -D__STDC__ -REQUIRES = $(MODULE) libxpcom libraptorbase +REQUIRES = $(MODULE) libxpcom include $(topsrcdir)/config/rules.mk diff --git a/mozilla/intl/uconv/ucvja2/makefile.win b/mozilla/intl/uconv/ucvja2/makefile.win index 5b4df7fd0d8..b80549c832f 100644 --- a/mozilla/intl/uconv/ucvja2/makefile.win +++ b/mozilla/intl/uconv/ucvja2/makefile.win @@ -60,7 +60,7 @@ EXPORTS= nsUCVJA2CID.h \ $(NULL) LLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) MISCDEP = $(LLIBS) diff --git a/mozilla/intl/uconv/ucvlatin/Makefile.in b/mozilla/intl/uconv/ucvlatin/Makefile.in index 6350a98ed2b..64170573e39 100644 --- a/mozilla/intl/uconv/ucvlatin/Makefile.in +++ b/mozilla/intl/uconv/ucvlatin/Makefile.in @@ -109,11 +109,11 @@ CPPSRCS = \ EXPORTS = \ nsUCvLatinCID.h \ $(NULL) - + EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS)) CFLAGS += -DUSE_NSREG -D__STDC__ -REQUIRES = $(MODULE) libxpcom libraptorbase +REQUIRES = $(MODULE) libxpcom include $(topsrcdir)/config/rules.mk diff --git a/mozilla/intl/uconv/ucvlatin/makefile.win b/mozilla/intl/uconv/ucvlatin/makefile.win index c99852e89bb..05138f101d4 100644 --- a/mozilla/intl/uconv/ucvlatin/makefile.win +++ b/mozilla/intl/uconv/ucvlatin/makefile.win @@ -192,8 +192,7 @@ LINCS= \ $(NULL) LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) MISCDEP = $(LLIBS) diff --git a/mozilla/intl/unicharutil/src/makefile.win b/mozilla/intl/unicharutil/src/makefile.win index e65627e44a0..636a3b83a4f 100644 --- a/mozilla/intl/unicharutil/src/makefile.win +++ b/mozilla/intl/unicharutil/src/makefile.win @@ -54,9 +54,8 @@ DLL=.\$(OBJDIR)\$(DLLNAME).dll LLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ - $(DIST)\lib\raptorbase.lib \ $(LIBNSPR) include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/intl/unicharutil/tests/makefile.win b/mozilla/intl/unicharutil/tests/makefile.win index 5e96ee05ffe..46e34be6855 100644 --- a/mozilla/intl/unicharutil/tests/makefile.win +++ b/mozilla/intl/unicharutil/tests/makefile.win @@ -30,7 +30,7 @@ REQUIRES=libreg LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\unicharutil -I$(PUBLIC)\raptor LLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib diff --git a/mozilla/js/macbuild/XPConnect.mcp b/mozilla/js/macbuild/XPConnect.mcp index 9749f058d77..b6d072f7279 100644 Binary files a/mozilla/js/macbuild/XPConnect.mcp and b/mozilla/js/macbuild/XPConnect.mcp differ diff --git a/mozilla/js/macbuild/XPConnectIDL.mcp b/mozilla/js/macbuild/XPConnectIDL.mcp index 4216942e7aa..c7526be8c36 100644 Binary files a/mozilla/js/macbuild/XPConnectIDL.mcp and b/mozilla/js/macbuild/XPConnectIDL.mcp differ diff --git a/mozilla/js/src/fdlibm/fdlibm.mdp b/mozilla/js/src/fdlibm/fdlibm.mdp index a84e1ac6522..5904c494072 100644 Binary files a/mozilla/js/src/fdlibm/fdlibm.mdp and b/mozilla/js/src/fdlibm/fdlibm.mdp differ diff --git a/mozilla/js/src/liveconnect/makefile.win b/mozilla/js/src/liveconnect/makefile.win index 44357650a1f..7f2d8a1fce6 100644 --- a/mozilla/js/src/liveconnect/makefile.win +++ b/mozilla/js/src/liveconnect/makefile.win @@ -54,7 +54,7 @@ DEFFILE = $(DLLNAME).def LLIBS=$(LIBNSPR) $(DIST)\lib\js$(MOZ_BITS)$(VERSION_NUMBER).lib \ !ifdef MOZ_OJI - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ !endif $(NULL) diff --git a/mozilla/js/src/xpconnect/public/MANIFEST b/mozilla/js/src/xpconnect/public/MANIFEST index b01e58b4576..ee3d55ca977 100644 --- a/mozilla/js/src/xpconnect/public/MANIFEST +++ b/mozilla/js/src/xpconnect/public/MANIFEST @@ -5,3 +5,5 @@ nsIXPConnect.h nsIXPCScriptable.h xpclog.h +xpccomponents.h +xpcjsid.h \ No newline at end of file diff --git a/mozilla/js/src/xpconnect/shell/Makefile.in b/mozilla/js/src/xpconnect/shell/Makefile.in index f27b315839b..e8ce618b2c7 100644 --- a/mozilla/js/src/xpconnect/shell/Makefile.in +++ b/mozilla/js/src/xpconnect/shell/Makefile.in @@ -38,12 +38,7 @@ LIBS = \ -L$(DIST)/bin \ -l$(MOZ_LIB_JS_PREFIX)js \ -lxpcom \ - -lxpt \ - -lxptinfo \ - -lxptcall \ - -lxptcmd \ -lreg \ - -lraptorbase \ -l$(MOZ_LIB_UTIL_PREFIX)util \ $(NSPR_LIBS) \ $(NULL) diff --git a/mozilla/js/src/xpconnect/shell/makefile.win b/mozilla/js/src/xpconnect/shell/makefile.win index d2665b10652..74562f24137 100644 --- a/mozilla/js/src/xpconnect/shell/makefile.win +++ b/mozilla/js/src/xpconnect/shell/makefile.win @@ -28,13 +28,12 @@ LCFLAGS=-DUSE_NSREG -DWIN32_LEAN_AND_MEAN REQUIRES=xpcom js xpconnect LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\js -I$(PUBLIC)\xpconnect \ - -I$(PUBLIC)\raptor -I$(PUBLIC)\xptinfo -I$(PUBLIC)\libxpt + -I$(PUBLIC)\raptor LLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(DIST)\lib\js3250.lib \ - $(DIST)\lib\raptorbase.lib \ $(NULL) include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/js/src/xpconnect/src/Makefile.in b/mozilla/js/src/xpconnect/src/Makefile.in index 5c4a203a03c..9987dcb8021 100644 --- a/mozilla/js/src/xpconnect/src/Makefile.in +++ b/mozilla/js/src/xpconnect/src/Makefile.in @@ -69,11 +69,6 @@ EXTRA_DSO_LDOPTS = \ -L$(DIST)/bin \ -l$(MOZ_LIB_JS_PREFIX)js \ -lxpcom \ - -lxpt \ - -lxptinfo \ - -lxptcall \ - -lxptcmd \ - -lraptorbase \ -lreg \ $(NSPR_LIBS) \ $(NULL) diff --git a/mozilla/js/src/xpconnect/src/makefile.win b/mozilla/js/src/xpconnect/src/makefile.win index bbab95bd052..edc73b48b1d 100644 --- a/mozilla/js/src/xpconnect/src/makefile.win +++ b/mozilla/js/src/xpconnect/src/makefile.win @@ -26,7 +26,6 @@ DLLNAME = xpc$(MOZ_BITS)$(VERSION_NUMBER) DLL =.\$(OBJDIR)\$(DLLNAME).dll MODULE=xpconnect -REQUIRES=xpcom js libxpt xptinfo xptcall DEFINES=-DWIN32_LEAN_AND_MEAN -DEXPORT_XPC_API -DJS_THREADSAFE @@ -48,8 +47,7 @@ OBJS= \ $(NULL) LINCS=-I$(PUBLIC)\xpconnect -I$(PUBLIC)\xpcom -I$(PUBLIC)\js \ - -I$(PUBLIC)\raptor -I$(PUBLIC)\libxpt -I$(PUBLIC)\xptinfo \ - -I$(PUBLIC)\xptcall + -I$(PUBLIC)\raptor LCFLAGS = \ $(LCFLAGS) \ @@ -58,9 +56,7 @@ LCFLAGS = \ LLIBS= $(LIBNSPR) \ $(DIST)\lib\js$(MOZ_BITS)$(VERSION_NUMBER).lib \ - $(DIST)\lib\xpcom$(MOZ_BITS).lib \ - $(DIST)\lib\xptinfo$(MOZ_BITS).lib \ - $(DIST)\lib\xptcall$(MOZ_BITS).lib \ + $(DIST)\lib\xpcom.lib \ $(NULL) include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/js/src/xpconnect/tests/Makefile.in b/mozilla/js/src/xpconnect/tests/Makefile.in index b40eca17b00..9f02978086e 100644 --- a/mozilla/js/src/xpconnect/tests/Makefile.in +++ b/mozilla/js/src/xpconnect/tests/Makefile.in @@ -40,12 +40,7 @@ LIBS = \ -L$(DIST)/bin \ -l$(MOZ_LIB_JS_PREFIX)js \ -lxpcom \ - -lxpt \ - -lxptinfo \ - -lxptcall \ - -lxptcmd \ -lreg \ - -lraptorbase \ -l$(MOZ_LIB_UTIL_PREFIX)util \ $(NSPR_LIBS) \ $(NULL) diff --git a/mozilla/js/src/xpconnect/tests/components/makefile.win b/mozilla/js/src/xpconnect/tests/components/makefile.win index b88823773b7..d50e986a307 100644 --- a/mozilla/js/src/xpconnect/tests/components/makefile.win +++ b/mozilla/js/src/xpconnect/tests/components/makefile.win @@ -23,7 +23,6 @@ DLLNAME = xpctest DLL =.\$(OBJDIR)\$(DLLNAME).dll MODULE=xpconnect -REQUIRES=xpcom js libxpt xptinfo xptcall DEFINES=-DWIN32_LEAN_AND_MEAN @@ -33,8 +32,7 @@ OBJS= \ $(NULL) LINCS=-I$(PUBLIC)\xpconnect -I$(PUBLIC)\xpcom -I$(PUBLIC)\js \ - -I$(PUBLIC)\raptor -I$(PUBLIC)\libxpt -I$(PUBLIC)\xptinfo \ - -I$(PUBLIC)\xptcall -I$(PUBLIC)\xpconnect + -I$(PUBLIC)\raptor -I$(PUBLIC)\xpconnect LCFLAGS = \ $(LCFLAGS) \ @@ -43,9 +41,7 @@ LCFLAGS = \ LLIBS= $(LIBNSPR) \ $(DIST)\lib\js$(MOZ_BITS)$(VERSION_NUMBER).lib \ - $(DIST)\lib\xpcom$(MOZ_BITS).lib \ - $(DIST)\lib\xptinfo$(MOZ_BITS).lib \ - $(DIST)\lib\xptcall$(MOZ_BITS).lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\xpc$(MOZ_BITS)$(VERSION_NUMBER).lib \ $(NULL) diff --git a/mozilla/js/src/xpconnect/tests/makefile.win b/mozilla/js/src/xpconnect/tests/makefile.win index e98db4a279d..caf4b29d690 100644 --- a/mozilla/js/src/xpconnect/tests/makefile.win +++ b/mozilla/js/src/xpconnect/tests/makefile.win @@ -31,13 +31,12 @@ LCFLAGS=-DUSE_NSREG -DWIN32_LEAN_AND_MEAN -DJS_THREADSAFE -DJSFILE REQUIRES=xpcom js xpconnect LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\js -I$(PUBLIC)\xpconnect \ - -I$(PUBLIC)\raptor -I$(PUBLIC)\xptinfo -I$(PUBLIC)\libxpt + -I$(PUBLIC)\raptor LLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(DIST)\lib\js3250.lib \ - $(DIST)\lib\raptorbase.lib \ $(NULL) include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index 8ea13368e3e..f51e015da13 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -49,7 +49,6 @@ #include "nsHTMLAtoms.h" #include "nsCOMPtr.h" #include "nsIEventQueueService.h" -#include "nsXPComCIID.h" #include "nsIServiceManager.h" #include "nsICaret.h" #include "nsCaretProperties.h" diff --git a/mozilla/layout/base/public/Makefile.in b/mozilla/layout/base/public/Makefile.in index 2d31b643eb4..1b1c4c15b96 100644 --- a/mozilla/layout/base/public/Makefile.in +++ b/mozilla/layout/base/public/Makefile.in @@ -27,6 +27,7 @@ MODULE=layout EXPORTS = \ nslayout.h \ nsICaret.h \ + nsCaretProperties.h \ nsIContent.h \ nsIContentIterator.h \ nsIDiskDocument.h \ diff --git a/mozilla/layout/base/public/makefile.win b/mozilla/layout/base/public/makefile.win index 8c9d9cb3f1a..4c027413059 100644 --- a/mozilla/layout/base/public/makefile.win +++ b/mozilla/layout/base/public/makefile.win @@ -20,6 +20,7 @@ DEPTH=..\..\.. EXPORTS = \ nslayout.h \ nsICaret.h \ + nsCaretProperties.h \ nsIContent.h \ nsIContentIterator.h \ nsIDiskDocument.h \ diff --git a/mozilla/layout/base/public/nsCaretProperties.h b/mozilla/layout/base/public/nsCaretProperties.h index eec6629dc2d..83ddd0be75a 100644 --- a/mozilla/layout/base/public/nsCaretProperties.h +++ b/mozilla/layout/base/public/nsCaretProperties.h @@ -16,6 +16,8 @@ * Reserved. */ +#include "nslayout.h" + // this class is used to gather caret properties from the OS. It // must be implemented by each platform that wants more than // the generic caret properties. @@ -50,4 +52,4 @@ class nsCaretProperties }; -NS_BASE nsCaretProperties* NewCaretProperties(); +NS_LAYOUT nsCaretProperties* NewCaretProperties(); diff --git a/mozilla/layout/base/src/Makefile.in b/mozilla/layout/base/src/Makefile.in index 035fb61a5b3..1a9c54cbf9c 100644 --- a/mozilla/layout/base/src/Makefile.in +++ b/mozilla/layout/base/src/Makefile.in @@ -29,6 +29,7 @@ MODULE=layout # Alphabetical list of source files CPPSRCS = \ nsCaret.cpp \ + nsCaretProperties_$(MOZ_TOOLKIT).cpp \ nsCommentNode.cpp \ nsContentIterator.cpp \ nsContentList.cpp \ diff --git a/mozilla/layout/base/src/makefile.win b/mozilla/layout/base/src/makefile.win index 0ff685d4821..51397768717 100644 --- a/mozilla/layout/base/src/makefile.win +++ b/mozilla/layout/base/src/makefile.win @@ -56,6 +56,7 @@ CPPSRCS = \ nsLayoutAtoms.cpp \ nsLayoutDebugger.cpp \ nsCaret.cpp \ + nsCaretProperties_windows.cpp \ nsRange.cpp \ nsTextNode.cpp \ $(NULL) @@ -97,6 +98,7 @@ CPP_OBJS= \ .\$(OBJDIR)\nsLayoutAtoms.obj \ .\$(OBJDIR)\nsLayoutDebugger.obj \ .\$(OBJDIR)\nsCaret.obj \ + .\$(OBJDIR)\nsCaretProperties_windows.obj \ .\$(OBJDIR)\nsRange.obj \ .\$(OBJDIR)\nsTextNode.obj \ $(NULL) diff --git a/mozilla/layout/base/tests/Makefile.in b/mozilla/layout/base/tests/Makefile.in index a571d0c2dd1..b166cd1748e 100644 --- a/mozilla/layout/base/tests/Makefile.in +++ b/mozilla/layout/base/tests/Makefile.in @@ -46,12 +46,10 @@ LIBS = \ -lpwcac \ -lnetcache \ -lnetwork \ - -lraptorbase \ -lraptorhtml \ -lpref \ -lsecfree \ -limg \ - -lgmbase$(MOZ_TOOLKIT) \ -l$(MOZ_LIB_UTIL_PREFIX)util \ $(PNG_LIBS) \ $(JPEG_LIBS) \ diff --git a/mozilla/layout/base/tests/makefile.win b/mozilla/layout/base/tests/makefile.win index b134dc4cf37..82b92612671 100644 --- a/mozilla/layout/base/tests/makefile.win +++ b/mozilla/layout/base/tests/makefile.win @@ -25,8 +25,7 @@ LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor -I..\src LLIBS= \ $(DIST)\lib\raptorlayout_s.lib \ $(DIST)\lib\raptorgfxwin.lib \ - $(DIST)\lib\raptorbase.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\jsdom.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib diff --git a/mozilla/layout/build/Makefile.in b/mozilla/layout/build/Makefile.in index 03495cccc2d..6949b006695 100644 --- a/mozilla/layout/build/Makefile.in +++ b/mozilla/layout/build/Makefile.in @@ -46,8 +46,6 @@ EXPORTS=nsLayoutCID.h INCLUDES += -I$(srcdir)/../html/base/src -BASE_DSO_FLAGS = $(addprefix -lgmbase, $(MOZ_TOOLKIT)) - SHARED_LIBRARY_LIBS = \ $(DIST)/lib/libraptorevents_s.a \ $(DIST)/lib/libraptorhtmlbase_s.a \ diff --git a/mozilla/layout/build/dlldeps.cpp b/mozilla/layout/build/dlldeps.cpp index f11c14f05f0..a333e8eb2af 100644 --- a/mozilla/layout/build/dlldeps.cpp +++ b/mozilla/layout/build/dlldeps.cpp @@ -25,6 +25,7 @@ #include "nsIDocument.h" #include "nsHTMLParts.h" #include "nsINameSpaceManager.h" +#include "nsCaretProperties.h" void XXXNeverCalled() { @@ -52,4 +53,5 @@ void XXXNeverCalled() nsINameSpaceManager* nsm; NS_NewNameSpaceManager(&nsm); NS_CreateHTMLElement(nsnull, ""); + NewCaretProperties(); } diff --git a/mozilla/layout/build/makefile.win b/mozilla/layout/build/makefile.win index 209a0a36eb9..1f453c98bfc 100644 --- a/mozilla/layout/build/makefile.win +++ b/mozilla/layout/build/makefile.win @@ -51,8 +51,7 @@ MISCDEP = \ $(DIST)\lib\raptorxulbase_s.lib \ $(DIST)\lib\raptorxulcontent_s.lib \ $(DIST)\lib\raptorevents_s.lib \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\raptorhtmlpars.lib \ $(DIST)\lib\jsdom.lib \ @@ -85,8 +84,7 @@ LLIBS= \ $(DIST)\lib\raptorxulbase_s.lib \ $(DIST)\lib\raptorxulcontent_s.lib \ $(DIST)\lib\raptorevents_s.lib \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\raptorhtmlpars.lib \ $(DIST)\lib\jsdom.lib \ diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index 8ea13368e3e..f51e015da13 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -49,7 +49,6 @@ #include "nsHTMLAtoms.h" #include "nsCOMPtr.h" #include "nsIEventQueueService.h" -#include "nsXPComCIID.h" #include "nsIServiceManager.h" #include "nsICaret.h" #include "nsCaretProperties.h" diff --git a/mozilla/layout/html/tests/Makefile.in b/mozilla/layout/html/tests/Makefile.in index 6fb126d0166..7a9e5b98c21 100644 --- a/mozilla/layout/html/tests/Makefile.in +++ b/mozilla/layout/html/tests/Makefile.in @@ -47,7 +47,6 @@ LIBS = \ -lgophurl \ -lremoturl \ -lnetcnvts \ - -lraptorbase \ -labouturl \ -lhttpurl \ -lmimetype \ @@ -55,7 +54,6 @@ LIBS = \ -lnetcache \ -lsockstuburl \ -lnetwork \ - -lgmbase$(MOZ_TOOLKIT) \ $(TK_LIBS) \ -lpref \ -lsecfree \ diff --git a/mozilla/layout/html/tests/TestCSSParser.cpp b/mozilla/layout/html/tests/TestCSSParser.cpp index 826027a7ce4..f0f7aade06f 100644 --- a/mozilla/layout/html/tests/TestCSSParser.cpp +++ b/mozilla/layout/html/tests/TestCSSParser.cpp @@ -30,7 +30,6 @@ #include "nsIComponentManager.h" #include "nsIServiceManager.h" #include "nsIEventQueueService.h" -#include "nsXPComCIID.h" #ifdef XP_PC #define NETLIB_DLL "netlib.dll" diff --git a/mozilla/layout/html/tests/makefile.win b/mozilla/layout/html/tests/makefile.win index a80f9066657..e267b777802 100644 --- a/mozilla/layout/html/tests/makefile.win +++ b/mozilla/layout/html/tests/makefile.win @@ -52,11 +52,10 @@ LLIBS= \ $(DIST)\lib\raptorhtmlpars.lib \ $(DIST)\lib\raptorlayout_s.lib \ $(DIST)\lib\raptorgfxwin.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorevents_s.lib \ $(DIST)\lib\img32$(VERSION_NUMBER).lib \ $(DIST)\lib\util.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\jsdom.lib \ $(DIST)\lib\netlib.lib \ $(LIBNSPR) \ diff --git a/mozilla/layout/macbuild/layout.mcp b/mozilla/layout/macbuild/layout.mcp index b8d34bb0bbb..407185f198f 100644 Binary files a/mozilla/layout/macbuild/layout.mcp and b/mozilla/layout/macbuild/layout.mcp differ diff --git a/mozilla/lib/mac/NSRuntime/NSRuntime.mcp b/mozilla/lib/mac/NSRuntime/NSRuntime.mcp index 5e4ea780e23..ed88414e1cb 100644 Binary files a/mozilla/lib/mac/NSRuntime/NSRuntime.mcp and b/mozilla/lib/mac/NSRuntime/NSRuntime.mcp differ diff --git a/mozilla/mailnews/addrbook/build/makefile.win b/mozilla/mailnews/addrbook/build/makefile.win index d99e9a0dc25..ab664fee984 100644 --- a/mozilla/mailnews/addrbook/build/makefile.win +++ b/mozilla/mailnews/addrbook/build/makefile.win @@ -36,12 +36,11 @@ CPP_OBJS=\ # hooking in to their changes. LLIBS=\ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\msgcoreutil.lib \ $(DIST)\lib\addrbook.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\rdfutil_s.lib \ $(NULL) diff --git a/mozilla/mailnews/base/build/Makefile.in b/mozilla/mailnews/base/build/Makefile.in index f6612529591..9949cd9e882 100644 --- a/mozilla/mailnews/base/build/Makefile.in +++ b/mozilla/mailnews/base/build/Makefile.in @@ -46,7 +46,6 @@ EXTRA_DSO_LDOPTS = \ $(NSPR_LIBS) \ -lxpcom \ -lreg \ - -lraptorbase \ -lmozjs \ -lmsgbaseutil \ -lappcores \ diff --git a/mozilla/mailnews/base/build/makefile.win b/mozilla/mailnews/base/build/makefile.win index 20375e74870..7b9fd8361e5 100644 --- a/mozilla/mailnews/base/build/makefile.win +++ b/mozilla/mailnews/base/build/makefile.win @@ -80,8 +80,7 @@ MSGLIBS= \ # These are the libraries we need to link with to create the dll LLIBS= \ $(MSGLIBS) \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\js32$(VERSION_NUMBER).lib \ $(DIST)\lib\msgcoreutil.lib \ diff --git a/mozilla/mailnews/base/search/src/Makefile.in b/mozilla/mailnews/base/search/src/Makefile.in index 569e9a0d337..d6a9f62f1e6 100644 --- a/mozilla/mailnews/base/search/src/Makefile.in +++ b/mozilla/mailnews/base/search/src/Makefile.in @@ -41,7 +41,6 @@ EXTRA_DSO_LDOPTS = \ $(NSPR_LIBS) \ -lxpcom \ -lreg \ - -lraptorbase \ -lmork \ -lmsgbaseutil \ $(NULL) diff --git a/mozilla/mailnews/base/tests/identity/Makefile.in b/mozilla/mailnews/base/tests/identity/Makefile.in index b8c64baa6f7..3e8b3c15d54 100644 --- a/mozilla/mailnews/base/tests/identity/Makefile.in +++ b/mozilla/mailnews/base/tests/identity/Makefile.in @@ -33,7 +33,6 @@ LIBS = \ -L$(DIST)/bin \ -lxpcom \ -lreg \ - -lraptorbase \ -lmozjs \ -lsecfree \ $(NSPR_LIBS) \ diff --git a/mozilla/mailnews/base/tests/makefile.win b/mozilla/mailnews/base/tests/makefile.win index f6a7a12a701..c6525f192cd 100644 --- a/mozilla/mailnews/base/tests/makefile.win +++ b/mozilla/mailnews/base/tests/makefile.win @@ -69,7 +69,7 @@ PROGRAM=.\$(OBJDIR)\$(EXENAME).EXE #//------------------------------------------------------------------------ LCFLAGS=-DNETSCAPE LLIBS= $(LLIBS) ole32.lib \ - $(DIST)\lib\xpcom32.lib + $(DIST)\lib\xpcom.lib LINCS=$(LINCS) -I. \ diff --git a/mozilla/mailnews/base/util/Makefile.in b/mozilla/mailnews/base/util/Makefile.in index 99923376394..7e179afa066 100644 --- a/mozilla/mailnews/base/util/Makefile.in +++ b/mozilla/mailnews/base/util/Makefile.in @@ -59,7 +59,6 @@ EXTRA_DSO_LDOPTS = \ $(NSPR_LIBS) \ -L$(DIST)/bin \ -L$(DIST)/lib \ - -lraptorbase \ -lxpcom \ -lreg \ -lrdfutil_s \ diff --git a/mozilla/mailnews/base/util/makefile.win b/mozilla/mailnews/base/util/makefile.win index cf304296469..e5167b74215 100644 --- a/mozilla/mailnews/base/util/makefile.win +++ b/mozilla/mailnews/base/util/makefile.win @@ -38,8 +38,7 @@ LINCS= \ $(NULL) LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\rdfutil_s.lib \ $(LIBNSPR) \ diff --git a/mozilla/mailnews/compose/build/Makefile.in b/mozilla/mailnews/compose/build/Makefile.in index d85e710b988..67d93b7e1fd 100644 --- a/mozilla/mailnews/compose/build/Makefile.in +++ b/mozilla/mailnews/compose/build/Makefile.in @@ -47,7 +47,6 @@ EXTRA_DSO_LDOPTS = \ -L$(DIST)/lib \ -lxpcom \ -lreg \ - -lraptorbase \ -lmozjs \ -ljsdom \ -lappcores \ diff --git a/mozilla/mailnews/compose/build/makefile.win b/mozilla/mailnews/compose/build/makefile.win index 3ebc1eddce4..ef1c6d2d938 100644 --- a/mozilla/mailnews/compose/build/makefile.win +++ b/mozilla/mailnews/compose/build/makefile.win @@ -80,8 +80,7 @@ LCFLAGS=-DNETSCAPE # These are the libraries we need to link with to create the dll LLIBS= \ $(LLIBS) \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\js32$(VERSION_NUMBER).lib \ $(DIST)\lib\msgcompose.lib \ diff --git a/mozilla/mailnews/compose/tests/compose/makefile.win b/mozilla/mailnews/compose/tests/compose/makefile.win index 1ed6fb38029..d43c21381e6 100644 --- a/mozilla/mailnews/compose/tests/compose/makefile.win +++ b/mozilla/mailnews/compose/tests/compose/makefile.win @@ -69,10 +69,9 @@ PROGRAM=.\$(OBJDIR)\$(EXENAME).EXE #//------------------------------------------------------------------------ LCFLAGS=-DNETSCAPE LLIBS= $(LLIBS) ole32.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) \ - $(DIST)\lib\raptorbase.lib LINCS=$(LINCS) -I. \ diff --git a/mozilla/mailnews/compose/tests/compose/test.cpp b/mozilla/mailnews/compose/tests/compose/test.cpp index 93aeadfbca9..faa0d918bbf 100644 --- a/mozilla/mailnews/compose/tests/compose/test.cpp +++ b/mozilla/mailnews/compose/tests/compose/test.cpp @@ -23,7 +23,6 @@ #include "nsIUrlListener.h" #include "nsIEventQueueService.h" #include "nsIEventQueue.h" -#include "nsXPComCIID.h" #include "nsIFileLocator.h" #include "MsgCompGlue.h" diff --git a/mozilla/mailnews/compose/tests/smtp/Makefile.in b/mozilla/mailnews/compose/tests/smtp/Makefile.in index 0f831b26162..42530848e44 100644 --- a/mozilla/mailnews/compose/tests/smtp/Makefile.in +++ b/mozilla/mailnews/compose/tests/smtp/Makefile.in @@ -53,7 +53,6 @@ LIBS = \ -lxp \ -lpref \ -lmozjs \ - -lraptorbase \ -lraptorhtml \ -lraptorhtmlpars \ -lexpat \ @@ -66,7 +65,6 @@ LIBS = \ -ljpeg \ -lxp \ -lmozutil \ - -lgmbase$(MOZ_TOOLKIT) \ -lsecfree \ $(ZLIB_LIBS) \ $(DIST)/lib/librdfbase_s.a \ diff --git a/mozilla/mailnews/compose/tests/smtp/makefile.win b/mozilla/mailnews/compose/tests/smtp/makefile.win index 2567e227ed0..b38aef9aa63 100644 --- a/mozilla/mailnews/compose/tests/smtp/makefile.win +++ b/mozilla/mailnews/compose/tests/smtp/makefile.win @@ -38,9 +38,8 @@ LINCS= \ $(NULL) MYLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\raptorwidget.lib \ $(DIST)\lib\netlib.lib \ diff --git a/mozilla/mailnews/compose/tests/smtp/smtpTest.cpp b/mozilla/mailnews/compose/tests/smtp/smtpTest.cpp index 5f057c16755..48011faf396 100644 --- a/mozilla/mailnews/compose/tests/smtp/smtpTest.cpp +++ b/mozilla/mailnews/compose/tests/smtp/smtpTest.cpp @@ -46,7 +46,6 @@ #include "nsIServiceManager.h" #include "nsIEventQueueService.h" #include "nsIEventQueue.h" -#include "nsXPComCIID.h" #include "nsIPref.h" #include "nsIFileLocator.h" #include "nsFileSpec.h" diff --git a/mozilla/mailnews/db/msgdb/build/Makefile.in b/mozilla/mailnews/db/msgdb/build/Makefile.in index 4a40c829f5a..f19f36f7c51 100644 --- a/mozilla/mailnews/db/msgdb/build/Makefile.in +++ b/mozilla/mailnews/db/msgdb/build/Makefile.in @@ -46,7 +46,6 @@ EXTRA_DSO_LDOPTS = \ -L$(DIST)/bin \ -L$(DIST)/lib \ -lxpcom \ - -lraptorbase \ -lxp \ -lmsgbaseutil \ -lmork \ diff --git a/mozilla/mailnews/db/msgdb/build/makefile.win b/mozilla/mailnews/db/msgdb/build/makefile.win index e5458e79f2b..2d4ec460d35 100644 --- a/mozilla/mailnews/db/msgdb/build/makefile.win +++ b/mozilla/mailnews/db/msgdb/build/makefile.win @@ -39,13 +39,12 @@ CPP_OBJS=\ # hooking in to their changes. LLIBS=\ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\msgcoreutil.lib \ $(DIST)\lib\msgdb.lib \ $(DIST)\lib\mork.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ - $(DIST)\lib\raptorbase.lib \ $(NULL) MISCDEP=$(LLIBS) diff --git a/mozilla/mailnews/db/msgdb/src/Makefile.in b/mozilla/mailnews/db/msgdb/src/Makefile.in index cb6e7684668..313a5690bd0 100644 --- a/mozilla/mailnews/db/msgdb/src/Makefile.in +++ b/mozilla/mailnews/db/msgdb/src/Makefile.in @@ -44,7 +44,6 @@ EXTRA_DSO_LDOPTS = \ $(NSPR_LIBS) \ -lxpcom \ -lreg \ - -lraptorbase \ -lmork \ -lmsgbaseutil \ $(NULL) diff --git a/mozilla/mailnews/imap/build/Makefile.in b/mozilla/mailnews/imap/build/Makefile.in index 91181e954b8..462964cc53b 100644 --- a/mozilla/mailnews/imap/build/Makefile.in +++ b/mozilla/mailnews/imap/build/Makefile.in @@ -47,7 +47,6 @@ EXTRA_DSO_LDOPTS = \ -L$(DIST)/lib \ -lxpcom \ -lreg \ - -lraptorbase \ -lrdfutil_s \ -lmsgbaseutil \ -llocalmail \ diff --git a/mozilla/mailnews/imap/build/makefile.win b/mozilla/mailnews/imap/build/makefile.win index d9b2f0e8336..2670a5dfe56 100644 --- a/mozilla/mailnews/imap/build/makefile.win +++ b/mozilla/mailnews/imap/build/makefile.win @@ -37,11 +37,10 @@ CPP_OBJS=\ # hooking in to their changes. LLIBS=\ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\msgcoreutil.lib \ $(DIST)\lib\msgimap.lib \ $(DIST)\lib\plc3.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\rdfutil_s.lib \ $(DIST)\lib\msglocal.lib \ $(LIBNSPR) \ diff --git a/mozilla/mailnews/imap/src/nsImapMailFolder.cpp b/mozilla/mailnews/imap/src/nsImapMailFolder.cpp index b3614267af5..36f6bee4463 100644 --- a/mozilla/mailnews/imap/src/nsImapMailFolder.cpp +++ b/mozilla/mailnews/imap/src/nsImapMailFolder.cpp @@ -31,7 +31,6 @@ #include "nsImapFlagAndUidState.h" #include "nsParseMailbox.h" #include "nsIEventQueueService.h" -#include "nsXPComCIID.h" #include "nsIImapUrl.h" #include "nsImapUtils.h" #include "nsMsgUtils.h" diff --git a/mozilla/mailnews/imap/src/nsImapProtocol.cpp b/mozilla/mailnews/imap/src/nsImapProtocol.cpp index 303eb37df2a..ac4974bd20a 100644 --- a/mozilla/mailnews/imap/src/nsImapProtocol.cpp +++ b/mozilla/mailnews/imap/src/nsImapProtocol.cpp @@ -26,7 +26,6 @@ #endif #include "nsIEventQueueService.h" -#include "nsXPComCIID.h" #include "nsImapCore.h" #include "nsImapProtocol.h" diff --git a/mozilla/mailnews/imap/src/nsImapService.cpp b/mozilla/mailnews/imap/src/nsImapService.cpp index 4e603f32551..ae48abac049 100644 --- a/mozilla/mailnews/imap/src/nsImapService.cpp +++ b/mozilla/mailnews/imap/src/nsImapService.cpp @@ -37,7 +37,6 @@ #include "nsIRDFService.h" #include "nsIEventQueueService.h" #include "nsRDFCID.h" -#include "nsXPComCIID.h" // we need this because of an egcs 1.0 (and possibly gcc) compiler bug // that doesn't allow you to call ::nsISupports::GetIID() inside of a class // that multiply inherits from nsISupports diff --git a/mozilla/mailnews/imap/tests/harness/imapProtocolTest.cpp b/mozilla/mailnews/imap/tests/harness/imapProtocolTest.cpp index 871e615d1c8..a7904bbb937 100644 --- a/mozilla/mailnews/imap/tests/harness/imapProtocolTest.cpp +++ b/mozilla/mailnews/imap/tests/harness/imapProtocolTest.cpp @@ -54,7 +54,6 @@ #include "nsIEventQueueService.h" #include "nsIEventQueue.h" -#include "nsXPComCIID.h" #include "nsFileSpec.h" #include "nsMsgDBCID.h" diff --git a/mozilla/mailnews/imap/tests/harness/makefile.win b/mozilla/mailnews/imap/tests/harness/makefile.win index e8d6994c631..1619cc901aa 100644 --- a/mozilla/mailnews/imap/tests/harness/makefile.win +++ b/mozilla/mailnews/imap/tests/harness/makefile.win @@ -69,10 +69,9 @@ LCFLAGS=-DNETSCAPE LLIBS= $(LLIBS) ole32.lib \ $(LIBNSPR)\ $(DIST)\lib\plc3.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\msgcoreutil.lib \ $(DIST)\lib\msglocal.lib \ - $(DIST)\lib\xpcom32.lib + $(DIST)\lib\xpcom.lib LINCS=$(LINCS) -I. \ diff --git a/mozilla/mailnews/local/build/Makefile.in b/mozilla/mailnews/local/build/Makefile.in index a7d6fae88e2..bc0c82dff15 100644 --- a/mozilla/mailnews/local/build/Makefile.in +++ b/mozilla/mailnews/local/build/Makefile.in @@ -48,7 +48,6 @@ EXTRA_DSO_LDOPTS = \ -L$(DIST)/bin \ -lxpcom \ -lreg \ - -lraptorbase \ -lmsgbaseutil \ $(NULL) diff --git a/mozilla/mailnews/local/build/makefile.win b/mozilla/mailnews/local/build/makefile.win index f54c878ece6..a5c8b4158cc 100644 --- a/mozilla/mailnews/local/build/makefile.win +++ b/mozilla/mailnews/local/build/makefile.win @@ -38,13 +38,12 @@ CPP_OBJS=\ # hooking in to their changes. LLIBS=\ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\msgcoreutil.lib \ $(DIST)\lib\msglocal.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ - $(DIST)\lib\raptorbase.lib \ - $(DIST)\lib\rdfutil_s.lib \ + $(DIST)\lib\rdfutil_s.lib \ $(NULL) MISCDEP=$(LLIBS) diff --git a/mozilla/mailnews/local/tests/mailbox/Makefile.in b/mozilla/mailnews/local/tests/mailbox/Makefile.in index 00a28b50895..d4a7dd9c066 100644 --- a/mozilla/mailnews/local/tests/mailbox/Makefile.in +++ b/mozilla/mailnews/local/tests/mailbox/Makefile.in @@ -55,8 +55,6 @@ LIBS = \ -lmozjs \ -lmork \ -lmsgbaseutil \ - -lraptorbase \ - -lgmbase$(MOZ_TOOLKIT) \ -lsecfree \ $(ZLIB_LIBS) \ $(NSPR_LIBS) \ diff --git a/mozilla/mailnews/local/tests/mailbox/mailboxTest.cpp b/mozilla/mailnews/local/tests/mailbox/mailboxTest.cpp index a6c45ffef34..ccf79af9e99 100644 --- a/mozilla/mailnews/local/tests/mailbox/mailboxTest.cpp +++ b/mozilla/mailnews/local/tests/mailbox/mailboxTest.cpp @@ -78,7 +78,6 @@ #include "nsINetService.h" #include "nsIServiceManager.h" #include "nsIEventQueueService.h" -#include "nsXPComCIID.h" #include "nsRDFCID.h" #ifdef XP_PC diff --git a/mozilla/mailnews/local/tests/mailbox/makefile.win b/mozilla/mailnews/local/tests/mailbox/makefile.win index e56ad53ebde..a2ab178438b 100644 --- a/mozilla/mailnews/local/tests/mailbox/makefile.win +++ b/mozilla/mailnews/local/tests/mailbox/makefile.win @@ -38,9 +38,8 @@ LINCS= -I$(PUBLIC)\raptor \ -I$(PUBLIC)\js \ MYLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\raptorwidget.lib \ $(DIST)\lib\netlib.lib \ diff --git a/mozilla/mailnews/local/tests/mboxParser/Makefile.in b/mozilla/mailnews/local/tests/mboxParser/Makefile.in index f16d54fa8fd..019a560de94 100644 --- a/mozilla/mailnews/local/tests/mboxParser/Makefile.in +++ b/mozilla/mailnews/local/tests/mboxParser/Makefile.in @@ -52,8 +52,6 @@ LIBS = \ -lxp \ -lpref \ -lmozjs \ - -lraptorbase \ - -lgmbase$(MOZ_TOOLKIT) \ -lsecfree \ $(ZLIB_LIBS) \ $(NSPR_LIBS) \ diff --git a/mozilla/mailnews/local/tests/mboxParser/makefile.win b/mozilla/mailnews/local/tests/mboxParser/makefile.win index 5989dd19613..d20c320a9be 100644 --- a/mozilla/mailnews/local/tests/mboxParser/makefile.win +++ b/mozilla/mailnews/local/tests/mboxParser/makefile.win @@ -36,9 +36,8 @@ LINCS= \ -I$(PUBLIC)\rdf MYLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\raptorwidget.lib \ $(DIST)\lib\netlib.lib \ diff --git a/mozilla/mailnews/local/tests/mboxParser/mboxParserTest.cpp b/mozilla/mailnews/local/tests/mboxParser/mboxParserTest.cpp index 11a88434da0..143587e6481 100644 --- a/mozilla/mailnews/local/tests/mboxParser/mboxParserTest.cpp +++ b/mozilla/mailnews/local/tests/mboxParser/mboxParserTest.cpp @@ -44,7 +44,6 @@ #include "nsParseMailbox.h" -#include "nsXPComCIID.h" #ifdef XP_PC #define NETLIB_DLL "netlib.dll" diff --git a/mozilla/mailnews/local/tests/pop3/Makefile.in b/mozilla/mailnews/local/tests/pop3/Makefile.in index 2244f03de1b..cfc1f3d72b5 100644 --- a/mozilla/mailnews/local/tests/pop3/Makefile.in +++ b/mozilla/mailnews/local/tests/pop3/Makefile.in @@ -52,12 +52,10 @@ LIBS = \ -lxp \ -lpref \ -lmozjs \ - -lraptorbase \ -ljsdom \ -ljsurl \ -lrdfbase_s \ -lrdfutil_s \ - -lgmbase$(MOZ_TOOLKIT) \ -lsecfree \ $(ZLIB_LIBS) \ $(NSPR_LIBS) \ diff --git a/mozilla/mailnews/local/tests/pop3/makefile.win b/mozilla/mailnews/local/tests/pop3/makefile.win index fb2a0ccd7d9..5ffb370859f 100644 --- a/mozilla/mailnews/local/tests/pop3/makefile.win +++ b/mozilla/mailnews/local/tests/pop3/makefile.win @@ -38,9 +38,8 @@ LINCS= \ $(NULL) MYLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\raptorwidget.lib \ $(DIST)\lib\netlib.lib \ diff --git a/mozilla/mailnews/local/tests/pop3/pop3Test.cpp b/mozilla/mailnews/local/tests/pop3/pop3Test.cpp index a3f739666f9..580ee9a619e 100644 --- a/mozilla/mailnews/local/tests/pop3/pop3Test.cpp +++ b/mozilla/mailnews/local/tests/pop3/pop3Test.cpp @@ -46,7 +46,6 @@ #include "nsIServiceManager.h" #include "nsIEventQueueService.h" #include "nsIEventQueue.h" -#include "nsXPComCIID.h" #include "nsIMsgIdentity.h" #include "nsIMsgMailSession.h" diff --git a/mozilla/mailnews/mime/cthandlers/calendar/Makefile.in b/mozilla/mailnews/mime/cthandlers/calendar/Makefile.in index 70b0e8a1c8a..fa9380a348b 100644 --- a/mozilla/mailnews/mime/cthandlers/calendar/Makefile.in +++ b/mozilla/mailnews/mime/cthandlers/calendar/Makefile.in @@ -41,7 +41,6 @@ EXTRA_DSO_LDOPTS = \ -lxp \ -lxpcom \ -lreg \ - -lraptorbase \ $(NULL) include $(topsrcdir)/config/config.mk diff --git a/mozilla/mailnews/mime/cthandlers/calendar/makefile.win b/mozilla/mailnews/mime/cthandlers/calendar/makefile.win index f2acbd24000..3f44dbdb04d 100644 --- a/mozilla/mailnews/mime/cthandlers/calendar/makefile.win +++ b/mozilla/mailnews/mime/cthandlers/calendar/makefile.win @@ -91,8 +91,7 @@ LLIBS= \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\xplib.lib \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(NULL) LINCS=$(LINCS) -I. \ diff --git a/mozilla/mailnews/mime/cthandlers/vcard/Makefile.in b/mozilla/mailnews/mime/cthandlers/vcard/Makefile.in index 80f4fad925e..d059d023e12 100644 --- a/mozilla/mailnews/mime/cthandlers/vcard/Makefile.in +++ b/mozilla/mailnews/mime/cthandlers/vcard/Makefile.in @@ -43,7 +43,6 @@ EXTRA_DSO_LDOPTS = \ $(NSPR_LIBS) \ -L$(DIST)/bin \ -L$(DIST)/lib \ - -lraptorbase \ -lxpcom \ -lreg \ $(NULL) diff --git a/mozilla/mailnews/mime/cthandlers/vcard/makefile.win b/mozilla/mailnews/mime/cthandlers/vcard/makefile.win index 326cabd9d27..6eab86b905f 100644 --- a/mozilla/mailnews/mime/cthandlers/vcard/makefile.win +++ b/mozilla/mailnews/mime/cthandlers/vcard/makefile.win @@ -99,8 +99,7 @@ LLIBS= \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\js32$(VERSION_NUMBER).lib \ $(DIST)\lib\xppref32.lib \ - $(DIST)\lib\raptorbase.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(NULL) LINCS=$(LINCS) -I. \ diff --git a/mozilla/mailnews/mime/emitters/html/Makefile.in b/mozilla/mailnews/mime/emitters/html/Makefile.in index ac897048d63..d429401f018 100644 --- a/mozilla/mailnews/mime/emitters/html/Makefile.in +++ b/mozilla/mailnews/mime/emitters/html/Makefile.in @@ -37,7 +37,6 @@ EXTRA_DSO_LDOPTS = \ -L$(DIST)/bin \ -L$(DIST)/lib \ -lmozjs \ - -lraptorbase \ -lreg \ -lxpcom \ -lemitterutil \ diff --git a/mozilla/mailnews/mime/emitters/html/makefile.win b/mozilla/mailnews/mime/emitters/html/makefile.win index 82f400109e8..776638108d3 100644 --- a/mozilla/mailnews/mime/emitters/html/makefile.win +++ b/mozilla/mailnews/mime/emitters/html/makefile.win @@ -90,8 +90,7 @@ LLIBS= \ $(LIBNSPR) \ $(DIST)\lib\xppref32.lib \ $(DIST)\lib\mimetype.lib \ - $(DIST)\lib\raptorbase.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\emitterutils.lib \ $(NULL) diff --git a/mozilla/mailnews/mime/emitters/raw/Makefile.in b/mozilla/mailnews/mime/emitters/raw/Makefile.in index 6fda6b197f3..1e6584ee2b9 100644 --- a/mozilla/mailnews/mime/emitters/raw/Makefile.in +++ b/mozilla/mailnews/mime/emitters/raw/Makefile.in @@ -38,7 +38,6 @@ EXTRA_DSO_LDOPTS = \ -L$(DIST)/lib \ -lmozjs \ -lreg \ - -lraptorbase \ -lxpcom \ -lemitterutil \ $(NULL) diff --git a/mozilla/mailnews/mime/emitters/raw/makefile.win b/mozilla/mailnews/mime/emitters/raw/makefile.win index 55e0de84c26..ede5925c23d 100644 --- a/mozilla/mailnews/mime/emitters/raw/makefile.win +++ b/mozilla/mailnews/mime/emitters/raw/makefile.win @@ -83,8 +83,7 @@ LLIBS= \ $(LIBNSPR) \ $(DIST)\lib\xppref32.lib \ $(DIST)\lib\mimetype.lib \ - $(DIST)\lib\raptorbase.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\emitterutils.lib \ $(NULL) diff --git a/mozilla/mailnews/mime/emitters/src/Makefile.in b/mozilla/mailnews/mime/emitters/src/Makefile.in index 414ed1e6cfe..6d80ca90c87 100644 --- a/mozilla/mailnews/mime/emitters/src/Makefile.in +++ b/mozilla/mailnews/mime/emitters/src/Makefile.in @@ -40,7 +40,6 @@ EXTRA_DSO_LDOPTS = \ -L$(DIST)/bin \ -lxp \ -lxpcom \ - -lraptorbase \ -lmsgbaseutil \ $(NSPR_LIBS) \ $(NULL) diff --git a/mozilla/mailnews/mime/emitters/xml/Makefile.in b/mozilla/mailnews/mime/emitters/xml/Makefile.in index 66aaf35f479..9cfad9e8e67 100644 --- a/mozilla/mailnews/mime/emitters/xml/Makefile.in +++ b/mozilla/mailnews/mime/emitters/xml/Makefile.in @@ -38,7 +38,6 @@ EXTRA_DSO_LDOPTS = \ -L$(DIST)/lib \ -lmozjs \ -lreg \ - -lraptorbase \ -lxpcom \ -lemitterutil \ $(NULL) diff --git a/mozilla/mailnews/mime/emitters/xml/makefile.win b/mozilla/mailnews/mime/emitters/xml/makefile.win index ddf3b771c1d..a931bb00e89 100644 --- a/mozilla/mailnews/mime/emitters/xml/makefile.win +++ b/mozilla/mailnews/mime/emitters/xml/makefile.win @@ -90,8 +90,7 @@ LLIBS= \ $(LIBNSPR) \ $(DIST)\lib\xppref32.lib \ $(DIST)\lib\mimetype.lib \ - $(DIST)\lib\raptorbase.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\emitterutils.lib \ $(NULL) diff --git a/mozilla/mailnews/mime/src/Makefile.in b/mozilla/mailnews/mime/src/Makefile.in index 5bf04970c38..3a67729f91a 100644 --- a/mozilla/mailnews/mime/src/Makefile.in +++ b/mozilla/mailnews/mime/src/Makefile.in @@ -95,7 +95,6 @@ EXTRA_DSO_LDOPTS = \ -L$(DIST)/bin \ $(NSPR_LIBS) \ -lmozjs \ - -lraptorbase \ -lsecfree \ -lxpcom \ -lreg \ diff --git a/mozilla/mailnews/mime/src/makefile.win b/mozilla/mailnews/mime/src/makefile.win index a10b10c7ac9..a1ab146cb14 100644 --- a/mozilla/mailnews/mime/src/makefile.win +++ b/mozilla/mailnews/mime/src/makefile.win @@ -144,8 +144,7 @@ LLIBS= \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\js32$(VERSION_NUMBER).lib \ - $(DIST)\lib\raptorbase.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(NULL) LINCS=$(LINCS) -I. \ diff --git a/mozilla/mailnews/mime/tests/xpcomtest/makefile.win b/mozilla/mailnews/mime/tests/xpcomtest/makefile.win index 39a32ca6ae2..e2d1230f2cb 100644 --- a/mozilla/mailnews/mime/tests/xpcomtest/makefile.win +++ b/mozilla/mailnews/mime/tests/xpcomtest/makefile.win @@ -69,7 +69,7 @@ PROGRAM=.\$(OBJDIR)\$(EXENAME).EXE #//------------------------------------------------------------------------ LCFLAGS=-DNETSCAPE LLIBS= $(LLIBS) ole32.lib \ - $(DIST)\lib\xpcom32.lib + $(DIST)\lib\xpcom.lib LINCS=$(LINCS) -I. \ -I$(PUBLIC)\mailnews \ diff --git a/mozilla/mailnews/news/build/Makefile.in b/mozilla/mailnews/news/build/Makefile.in index 3217d80a084..f6d4340ed06 100644 --- a/mozilla/mailnews/news/build/Makefile.in +++ b/mozilla/mailnews/news/build/Makefile.in @@ -48,7 +48,6 @@ EXTRA_DSO_LDOPTS = \ $(MKSHLIB_UNFORCE_ALL) \ -L$(DIST)/bin \ -lmozjs \ - -lraptorbase \ -lxpcom \ -lreg \ -lmsgbaseutil \ diff --git a/mozilla/mailnews/news/build/makefile.win b/mozilla/mailnews/news/build/makefile.win index 3339b1f6d44..d9325add0c4 100644 --- a/mozilla/mailnews/news/build/makefile.win +++ b/mozilla/mailnews/news/build/makefile.win @@ -80,8 +80,7 @@ MSGLIBS= \ # These are the libraries we need to link with to create the dll LLIBS= \ $(MSGLIBS) \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\msgcoreutil.lib \ $(DIST)\lib\nntp.lib \ diff --git a/mozilla/mailnews/news/src/Makefile.in b/mozilla/mailnews/news/src/Makefile.in index 7d4982bc7f9..b523bde433f 100644 --- a/mozilla/mailnews/news/src/Makefile.in +++ b/mozilla/mailnews/news/src/Makefile.in @@ -58,7 +58,6 @@ EXTRA_DSO_LDOPTS = \ -L$(DIST)/bin \ -lxp \ -lxpcom \ - -lraptorbase \ -lmsgbaseutil \ $(NSPR_LIBS) \ $(NULL) diff --git a/mozilla/mailnews/news/tests/newsParser/Makefile.in b/mozilla/mailnews/news/tests/newsParser/Makefile.in index 7e35113aa64..282d776054e 100644 --- a/mozilla/mailnews/news/tests/newsParser/Makefile.in +++ b/mozilla/mailnews/news/tests/newsParser/Makefile.in @@ -52,8 +52,6 @@ LIBS = \ -lxp \ -lpref \ -lmozjs \ - -lraptorbase \ - -lgmbase$(MOZ_TOOLKIT) \ -lsecfree \ -ljsdom \ -ljsurl \ diff --git a/mozilla/mailnews/news/tests/newsParser/makefile.win b/mozilla/mailnews/news/tests/newsParser/makefile.win index 1cab0999d0d..330c65b7a67 100644 --- a/mozilla/mailnews/news/tests/newsParser/makefile.win +++ b/mozilla/mailnews/news/tests/newsParser/makefile.win @@ -38,9 +38,8 @@ LINCS= \ $(NULL) MYLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\raptorwidget.lib \ $(DIST)\lib\netlib.lib \ diff --git a/mozilla/mailnews/news/tests/newsParser/newsParserTest.cpp b/mozilla/mailnews/news/tests/newsParser/newsParserTest.cpp index b6447aa3f3f..d1adb6317db 100644 --- a/mozilla/mailnews/news/tests/newsParser/newsParserTest.cpp +++ b/mozilla/mailnews/news/tests/newsParser/newsParserTest.cpp @@ -34,7 +34,6 @@ #include "nsINetService.h" #include "nsIComponentManager.h" #include "nsString.h" -#include "nsXPComCIID.h" #include "nsNewsDatabase.h" #include "nsMsgDBCID.h" diff --git a/mozilla/mailnews/news/tests/nntp/Makefile.in b/mozilla/mailnews/news/tests/nntp/Makefile.in index 38bb2079269..92778b63d7c 100644 --- a/mozilla/mailnews/news/tests/nntp/Makefile.in +++ b/mozilla/mailnews/news/tests/nntp/Makefile.in @@ -53,8 +53,6 @@ LIBS = \ -lxp \ -lpref \ -lmozjs \ - -lraptorbase \ - -lgmbase$(MOZ_TOOLKIT) \ -lsecfree \ -lraptorhtml \ -lraptorhtmlpars \ diff --git a/mozilla/mailnews/news/tests/nntp/makefile.win b/mozilla/mailnews/news/tests/nntp/makefile.win index 8e822ace413..85a980d4c74 100644 --- a/mozilla/mailnews/news/tests/nntp/makefile.win +++ b/mozilla/mailnews/news/tests/nntp/makefile.win @@ -38,9 +38,8 @@ LINCS= \ $(NULL) MYLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\raptorwidget.lib \ $(DIST)\lib\netlib.lib \ diff --git a/mozilla/mailnews/news/tests/nntp/nntpTest.cpp b/mozilla/mailnews/news/tests/nntp/nntpTest.cpp index c9c130a4ec6..22051f47b8d 100644 --- a/mozilla/mailnews/news/tests/nntp/nntpTest.cpp +++ b/mozilla/mailnews/news/tests/nntp/nntpTest.cpp @@ -49,7 +49,6 @@ #include "nsIServiceManager.h" #include "nsIEventQueue.h" #include "nsIEventQueueService.h" -#include "nsXPComCIID.h" #include "nsIUrlListener.h" #include "nsIPref.h" diff --git a/mozilla/mailnews/ui/messenger/src/makefile.win b/mozilla/mailnews/ui/messenger/src/makefile.win index 40f82f606cd..b7c03767c06 100644 --- a/mozilla/mailnews/ui/messenger/src/makefile.win +++ b/mozilla/mailnews/ui/messenger/src/makefile.win @@ -55,12 +55,11 @@ LINCS= \ LLIBS = \ $(DIST)\lib\netlib.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\xppref32.lib \ $(DIST)\lib\xplib.lib \ $(DIST)\lib\js3250.lib \ $(DIST)\lib\jsdombase_s.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorgfxwin.lib\ $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ diff --git a/mozilla/makefile.win b/mozilla/makefile.win index 66dd7c8200e..b247d77c0a7 100644 --- a/mozilla/makefile.win +++ b/mozilla/makefile.win @@ -50,7 +50,6 @@ DIRS = \ modules\libutil \ sun-java \ js \ - base \ modules\security\freenav \ modules\libimg \ modules\plugin \ diff --git a/mozilla/modules/libimg/gifcom/makefile.win b/mozilla/modules/libimg/gifcom/makefile.win index 05883826ff0..f28b0841014 100644 --- a/mozilla/modules/libimg/gifcom/makefile.win +++ b/mozilla/modules/libimg/gifcom/makefile.win @@ -46,8 +46,7 @@ LCFLAGS = $(LCFLAGS) /TP LLIBS= $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\util.lib \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ !ifdef NU_CACHE $(DIST)\lib\cache.lib \ !endif diff --git a/mozilla/modules/libimg/jpgcom/makefile.win b/mozilla/modules/libimg/jpgcom/makefile.win index fa1f66fb913..80686cbd580 100644 --- a/mozilla/modules/libimg/jpgcom/makefile.win +++ b/mozilla/modules/libimg/jpgcom/makefile.win @@ -47,8 +47,7 @@ LLIBS= $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\util.lib \ $(DIST)\lib\jpeg3250.lib \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ !ifdef NU_CACHE $(DIST)\lib\cache.lib \ !endif diff --git a/mozilla/modules/libimg/pngcom/makefile.win b/mozilla/modules/libimg/pngcom/makefile.win index 8ee0bc67c55..a582b6f72c8 100644 --- a/mozilla/modules/libimg/pngcom/makefile.win +++ b/mozilla/modules/libimg/pngcom/makefile.win @@ -47,8 +47,7 @@ LLIBS= $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\util.lib \ $(DIST)\lib\png.lib \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\zlib.lib \ !ifdef NU_CACHE $(DIST)\lib\cache.lib \ diff --git a/mozilla/modules/libimg/src/makefile.win b/mozilla/modules/libimg/src/makefile.win index 743155621e2..6095d9d813d 100644 --- a/mozilla/modules/libimg/src/makefile.win +++ b/mozilla/modules/libimg/src/makefile.win @@ -49,8 +49,7 @@ LCFLAGS = $(LCFLAGS) /TP LLIBS= $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\util.lib \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ !ifdef NU_CACHE $(DIST)\lib\cache.lib \ !endif diff --git a/mozilla/modules/libpref/macbuild/libpref.mcp b/mozilla/modules/libpref/macbuild/libpref.mcp index 8a5f123d49d..3ffbb51ae9c 100644 Binary files a/mozilla/modules/libpref/macbuild/libpref.mcp and b/mozilla/modules/libpref/macbuild/libpref.mcp differ diff --git a/mozilla/modules/libpref/src/Makefile.in b/mozilla/modules/libpref/src/Makefile.in index 5e71f7db0e3..71986a93346 100644 --- a/mozilla/modules/libpref/src/Makefile.in +++ b/mozilla/modules/libpref/src/Makefile.in @@ -25,7 +25,7 @@ include $(DEPTH)/config/autoconf.mk MODULE = pref LIBRARY_NAME = pref -REQUIRES = js raptorbase pref dbm security ldap img layer xpcom util +REQUIRES = js pref dbm security ldap img layer xpcom util ifneq ($(subst /,_,$(shell uname -s)),OS2) CSRCS = unix/unixpref.c diff --git a/mozilla/modules/libpref/src/makefile.win b/mozilla/modules/libpref/src/makefile.win index 0dd34d9561f..7e584451029 100644 --- a/mozilla/modules/libpref/src/makefile.win +++ b/mozilla/modules/libpref/src/makefile.win @@ -80,8 +80,7 @@ LLIBS = \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) \ $(DIST)\lib\js$(MOZ_BITS)$(VERSION_NUMBER).lib \ - $(DIST)\lib\raptorbase.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(HASHLIBS) #//------------------------------------------------------------------------ diff --git a/mozilla/modules/oji/src/makefile.win b/mozilla/modules/oji/src/makefile.win index 6b0bdf4ded7..ba7ca1995b9 100644 --- a/mozilla/modules/oji/src/makefile.win +++ b/mozilla/modules/oji/src/makefile.win @@ -104,7 +104,7 @@ EXPORTS = jvmmgr.h \ LLIBS = \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\xplib.lib \ $(DIST)\lib\js3250.lib \ $(DIST)\lib\jsj3250.lib \ diff --git a/mozilla/modules/oji/src/nsJVMManager.cpp b/mozilla/modules/oji/src/nsJVMManager.cpp index 48118233511..84d0cdced48 100644 --- a/mozilla/modules/oji/src/nsJVMManager.cpp +++ b/mozilla/modules/oji/src/nsJVMManager.cpp @@ -45,7 +45,6 @@ #include "nsIPluginHost.h" #include "nsIPluginManager.h" #include "nsIServiceManager.h" -#include "nsXPComCIID.h" #include "nsIEventQueueService.h" #include "lcglue.h" #include "xpgetstr.h" diff --git a/mozilla/modules/oji/src/nsJVMPluginTagInfo.cpp b/mozilla/modules/oji/src/nsJVMPluginTagInfo.cpp index b3b2c5f5c5c..7ad3ab7618b 100644 --- a/mozilla/modules/oji/src/nsJVMPluginTagInfo.cpp +++ b/mozilla/modules/oji/src/nsJVMPluginTagInfo.cpp @@ -214,3 +214,4 @@ nsJVMPluginTagInfo::Create(nsISupports* outer, const nsIID& aIID, void* *aInstan } //////////////////////////////////////////////////////////////////////////////// + diff --git a/mozilla/modules/plugin/base/src/makefile.win b/mozilla/modules/plugin/base/src/makefile.win index 51c942303d8..88c013645be 100644 --- a/mozilla/modules/plugin/base/src/makefile.win +++ b/mozilla/modules/plugin/base/src/makefile.win @@ -67,8 +67,7 @@ CACHELIBNAME=netcache.lib !endif OURLIBS = \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\netlib.lib \ $(DIST)\lib\$(CACHELIBNAME) \ diff --git a/mozilla/modules/plugin/nglsrc/makefile.win b/mozilla/modules/plugin/nglsrc/makefile.win index 51c942303d8..88c013645be 100644 --- a/mozilla/modules/plugin/nglsrc/makefile.win +++ b/mozilla/modules/plugin/nglsrc/makefile.win @@ -67,8 +67,7 @@ CACHELIBNAME=netcache.lib !endif OURLIBS = \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\netlib.lib \ $(DIST)\lib\$(CACHELIBNAME) \ diff --git a/mozilla/modules/plugin/samples/simple/makefile.win b/mozilla/modules/plugin/samples/simple/makefile.win index 5e85c84380d..cd3df8c13cb 100644 --- a/mozilla/modules/plugin/samples/simple/makefile.win +++ b/mozilla/modules/plugin/samples/simple/makefile.win @@ -64,7 +64,7 @@ MAPFILE= npsimple.map #// (ie. LCFLAGS, LLFLAGS, LLIBS, LINCS) #// #//------------------------------------------------------------------------ -LLIBS=$(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom32.lib +LLIBS=$(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom.lib # clobber and clobber_all will remove the following garbage: GARBAGE = $(GARBAGE) _gen diff --git a/mozilla/modules/plugin/test/makefile.win b/mozilla/modules/plugin/test/makefile.win index 5e85c84380d..cd3df8c13cb 100644 --- a/mozilla/modules/plugin/test/makefile.win +++ b/mozilla/modules/plugin/test/makefile.win @@ -64,7 +64,7 @@ MAPFILE= npsimple.map #// (ie. LCFLAGS, LLFLAGS, LLIBS, LINCS) #// #//------------------------------------------------------------------------ -LLIBS=$(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom32.lib +LLIBS=$(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom.lib # clobber and clobber_all will remove the following garbage: GARBAGE = $(GARBAGE) _gen diff --git a/mozilla/network/cache/nu/src/makefile.win b/mozilla/network/cache/nu/src/makefile.win index 822d9147bf1..e791208a2f0 100644 --- a/mozilla/network/cache/nu/src/makefile.win +++ b/mozilla/network/cache/nu/src/makefile.win @@ -32,7 +32,7 @@ LLIBS = \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\dbm32.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\libpref.lib \ $(NULL) diff --git a/mozilla/network/cache/nu/tests/fftest/Makefile.in b/mozilla/network/cache/nu/tests/fftest/Makefile.in index 39f08556ed9..fa4881f016c 100644 --- a/mozilla/network/cache/nu/tests/fftest/Makefile.in +++ b/mozilla/network/cache/nu/tests/fftest/Makefile.in @@ -32,7 +32,6 @@ LIBS = \ -lcache \ -l$(MOZ_LIB_DBM_PREFIX)dbm \ -lnetlib \ - -lraptorbase \ -lnetcache \ -lmimetype \ -lremoturl \ @@ -45,7 +44,6 @@ LIBS = \ -labouturl \ -lnetwork \ -lnetcnvts \ - -lgmbase$(MOZ_TOOLKIT) \ $(TK_LIBS) \ -lpref \ -l$(MOZ_LIB_JS_PREFIX)js \ diff --git a/mozilla/network/macbuild/network.mcp b/mozilla/network/macbuild/network.mcp index 0157312646c..840639a6a5e 100644 Binary files a/mozilla/network/macbuild/network.mcp and b/mozilla/network/macbuild/network.mcp differ diff --git a/mozilla/network/module/makefile.win b/mozilla/network/module/makefile.win index aa44128daf9..0b2d82f3fe5 100644 --- a/mozilla/network/module/makefile.win +++ b/mozilla/network/module/makefile.win @@ -117,10 +117,9 @@ LLIBS=$(LLIBS) $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\js32$(VERSION_NUMBER).lib \ $(DIST)\lib\xppref32.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\xplib.lib \ $(DIST)\lib\zlib.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\dbm32.lib \ $(NETLIBS) \ $(NULL) diff --git a/mozilla/network/module/nsNetService.cpp b/mozilla/network/module/nsNetService.cpp index 07be453c04d..fc6065675a5 100644 --- a/mozilla/network/module/nsNetService.cpp +++ b/mozilla/network/module/nsNetService.cpp @@ -47,7 +47,6 @@ extern "C" { #include "nsIURLGroup.h" #include "nsIServiceManager.h" #include "nsIEventQueueService.h" -#include "nsXPComCIID.h" #include "nsCRT.h" #include "nsSocketTransport.h" diff --git a/mozilla/network/module/nsSocketTransport.cpp b/mozilla/network/module/nsSocketTransport.cpp index 9f0bc2e4adf..14f756dd1bd 100644 --- a/mozilla/network/module/nsSocketTransport.cpp +++ b/mozilla/network/module/nsSocketTransport.cpp @@ -22,7 +22,6 @@ #include "nsINetlibURL.h" #include "nsIServiceManager.h" -#include "nsXPComCIID.h" #include "netutils.h" #include "mktcp.h" diff --git a/mozilla/network/module/nsStubContext.cpp b/mozilla/network/module/nsStubContext.cpp index d8116c5ba28..3da1160dca9 100644 --- a/mozilla/network/module/nsStubContext.cpp +++ b/mozilla/network/module/nsStubContext.cpp @@ -211,7 +211,6 @@ char *stub_Prompt(MWContext *context, #include "nsIBlockingNotification.h" #include "nsAppShellCIDs.h" #include "plevent.h" -#include "nsXPComFactory.h" static NS_DEFINE_IID(kProtocolHelperCID, NS_PROTOCOL_HELPER_CID); // static NS_DEFINE_IID(kDefaultNotificationCID, NS_DEFAULT_NOTIFICATION_CID); @@ -264,6 +263,8 @@ nsDefaultNotification::Resume(nsIURL *aURL, void *aExtraInfo) } /*--------------------------------------------------------------*/ +#if 0 +#include "nsXPComFactory.h" /* forward declaration */ class nsDefaultNotification; @@ -285,7 +286,7 @@ nsresult NS_NewDefaultNotificationFactory(nsIFactory** aResult) *aResult = inst; return rv; } - +#endif /*--------------------------------------------------------------*/ diff --git a/mozilla/network/module/tests/Makefile.in b/mozilla/network/module/tests/Makefile.in index 77aaec1ccd6..61d9856e44c 100644 --- a/mozilla/network/module/tests/Makefile.in +++ b/mozilla/network/module/tests/Makefile.in @@ -52,8 +52,6 @@ LIBS = \ -lxp \ -lpref \ -l$(MOZ_LIB_JS_PREFIX)js \ - -lraptorbase \ - -lgmbase$(MOZ_TOOLKIT) \ -lsecfree \ $(NSPR_LIBS) \ $(TK_LIBS) \ diff --git a/mozilla/network/module/tests/makefile.win b/mozilla/network/module/tests/makefile.win index dfa7559cf77..27c6cc2a5a7 100644 --- a/mozilla/network/module/tests/makefile.win +++ b/mozilla/network/module/tests/makefile.win @@ -70,9 +70,8 @@ PROGRAM=.\$(OBJDIR)\$(EXENAME).EXE LCFLAGS=-DNETSCAPE LLIBS=$(LLIBS) \ $(LIBNSPR) \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\netlib.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\plc3.lib LINCS=$(LINCS) -I. \ diff --git a/mozilla/network/module/tests/nettest.cpp b/mozilla/network/module/tests/nettest.cpp index 9303b39392d..1439aad9602 100644 --- a/mozilla/network/module/tests/nettest.cpp +++ b/mozilla/network/module/tests/nettest.cpp @@ -33,7 +33,6 @@ #include "nsIComponentManager.h" #include "nsIServiceManager.h" #include "nsIEventQueueService.h" -#include "nsXPComCIID.h" #include "nsString.h" diff --git a/mozilla/network/module/tests/transportTest.cpp b/mozilla/network/module/tests/transportTest.cpp index 6d120bd2e1b..e72ebc709d1 100644 --- a/mozilla/network/module/tests/transportTest.cpp +++ b/mozilla/network/module/tests/transportTest.cpp @@ -55,7 +55,6 @@ PRBool bLoadAsync; #include "nsINetService.h" #include "nsIServiceManager.h" #include "nsIEventQueueService.h" -#include "nsXPComCIID.h" #ifdef XP_PC #define NETLIB_DLL "netlib.dll" diff --git a/mozilla/parser/htmlparser/robot/Makefile.in b/mozilla/parser/htmlparser/robot/Makefile.in index 7f51bf7fc17..3004220ec2d 100644 --- a/mozilla/parser/htmlparser/robot/Makefile.in +++ b/mozilla/parser/htmlparser/robot/Makefile.in @@ -32,12 +32,10 @@ include $(topsrcdir)/config/config.mk LIBS = \ - -lraptorbase \ -lraptorhtmlpars \ -lexpat \ -lxmltok \ -lnetlib \ - -lgmbase$(MOZ_TOOLKIT) \ -lftpurl \ -lfileurl \ -labouturl \ diff --git a/mozilla/parser/htmlparser/robot/makefile.win b/mozilla/parser/htmlparser/robot/makefile.win index 801647fab59..06be711b964 100644 --- a/mozilla/parser/htmlparser/robot/makefile.win +++ b/mozilla/parser/htmlparser/robot/makefile.win @@ -23,8 +23,7 @@ DEPTH=..\.. LLIBS= \ $(DIST)\lib\raptorhtmlpars.lib \ - $(DIST)\lib\raptorbase.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\netlib.lib \ diff --git a/mozilla/parser/htmlparser/robot/test/makefile.win b/mozilla/parser/htmlparser/robot/test/makefile.win index ab56a2def73..a6e69218070 100644 --- a/mozilla/parser/htmlparser/robot/test/makefile.win +++ b/mozilla/parser/htmlparser/robot/test/makefile.win @@ -23,14 +23,12 @@ PROGRAM = .\$(OBJDIR)\htmlrobot.exe MISCDEP= \ $(DIST)\lib\DebugRobot.lib \ - $(DIST)\lib\raptorbase.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(NULL) MYLIBS= \ $(DIST)\lib\DebugRobot.lib \ - $(DIST)\lib\raptorbase.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(NULL) LLIBS= $(MYLIBS) \ diff --git a/mozilla/parser/htmlparser/src/makefile.win b/mozilla/parser/htmlparser/src/makefile.win index 3b48fd7a520..7d2f893e5c6 100644 --- a/mozilla/parser/htmlparser/src/makefile.win +++ b/mozilla/parser/htmlparser/src/makefile.win @@ -134,8 +134,7 @@ LCFLAGS = \ # These are the libraries we need to link with to create the dll LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\expat.lib \ $(LIBNSPR) diff --git a/mozilla/parser/htmlparser/tests/grabpage/makefile.win b/mozilla/parser/htmlparser/tests/grabpage/makefile.win index 98295e01048..2c93fb12124 100644 --- a/mozilla/parser/htmlparser/tests/grabpage/makefile.win +++ b/mozilla/parser/htmlparser/tests/grabpage/makefile.win @@ -23,9 +23,8 @@ PROGRAM = .\$(OBJDIR)\grabpage.exe MISCDEP= \ $(DIST)\lib\raptorhtmlpars.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\netlib.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) OBJS = \ @@ -39,9 +38,8 @@ LINCS= \ MYLIBS= \ $(DIST)\lib\raptorhtmlpars.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\netlib.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(NULL) diff --git a/mozilla/parser/htmlparser/tests/logparse/Makefile.in b/mozilla/parser/htmlparser/tests/logparse/Makefile.in index 00237c88989..d36ca928cf5 100644 --- a/mozilla/parser/htmlparser/tests/logparse/Makefile.in +++ b/mozilla/parser/htmlparser/tests/logparse/Makefile.in @@ -32,7 +32,6 @@ include $(topsrcdir)/config/config.mk LIBS = \ -lraptorhtmlpars \ - -lraptorbase \ -lxpcom \ -lreg \ $(NSPR_LIBS) \ diff --git a/mozilla/parser/htmlparser/tests/logparse/makefile.win b/mozilla/parser/htmlparser/tests/logparse/makefile.win index 95b779c3311..f95d75c1e9f 100644 --- a/mozilla/parser/htmlparser/tests/logparse/makefile.win +++ b/mozilla/parser/htmlparser/tests/logparse/makefile.win @@ -1,4 +1,4 @@ -#!nmake +!#!nmake # # The contents of this file are subject to the Netscape Public License # Version 1.0 (the "NPL"); you may not use this file except in @@ -23,7 +23,7 @@ PROGRAM = .\$(OBJDIR)\logparse.exe MISCDEP= \ $(DIST)\lib\raptorhtmlpars.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) OBJS = \ @@ -37,7 +37,7 @@ LINCS= \ MYLIBS= \ $(DIST)\lib\raptorhtmlpars.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(NULL) diff --git a/mozilla/profile/macbuild/profile.mcp b/mozilla/profile/macbuild/profile.mcp index cf447d2bbe3..699f9300755 100644 Binary files a/mozilla/profile/macbuild/profile.mcp and b/mozilla/profile/macbuild/profile.mcp differ diff --git a/mozilla/profile/pref-migrator/src/makefile.win b/mozilla/profile/pref-migrator/src/makefile.win index f25c9386352..51b11ed4fa7 100644 --- a/mozilla/profile/pref-migrator/src/makefile.win +++ b/mozilla/profile/pref-migrator/src/makefile.win @@ -45,14 +45,13 @@ LINCS= \ -I$(XPDIST)\public\libreg \ $(NULL) -LLIBS = \ - $(DIST)\lib\libreg32.lib \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ - $(DIST)\lib\plc3.lib \ - $(DIST)\lib\xppref32.lib \ - $(LIBNSPR) \ - $(NULL) +LLIBS = \ + $(DIST)\lib\libreg32.lib \ + $(DIST)\lib\xpcom.lib \ + $(DIST)\lib\plc3.lib \ + $(DIST)\lib\xppref32.lib \ + $(LIBNSPR) \ + $(NULL) OBJS = \ .\$(OBJDIR)\nsprefmigration.obj \ diff --git a/mozilla/profile/src/makefile.win b/mozilla/profile/src/makefile.win index f15dbc15815..70c093cae9d 100644 --- a/mozilla/profile/src/makefile.win +++ b/mozilla/profile/src/makefile.win @@ -73,8 +73,7 @@ BINREL_DIST=$(XPDIST)\WIN954.0_DBG.OBJD LLIBS = \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib #//------------------------------------------------------------------------ #// diff --git a/mozilla/profile/src/nsProfile.cpp b/mozilla/profile/src/nsProfile.cpp index 3b70be99533..b7239034dba 100644 --- a/mozilla/profile/src/nsProfile.cpp +++ b/mozilla/profile/src/nsProfile.cpp @@ -34,10 +34,6 @@ #include #endif -// It is important to include this header file as it contains the -// registry CIDs. -#include "nsXPComCIID.h" - // included for XPlatform coding #include "nsFileStream.h" #include "nsSpecialSystemDirectory.h" diff --git a/mozilla/rdf/brprof/build/makefile.win b/mozilla/rdf/brprof/build/makefile.win index 673063309cf..2b4eeabf3d1 100644 --- a/mozilla/rdf/brprof/build/makefile.win +++ b/mozilla/rdf/brprof/build/makefile.win @@ -31,8 +31,7 @@ CPP_OBJS=\ # hooking in to their changes. LLIBS=\ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\brprof_s.lib \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) diff --git a/mozilla/rdf/brprof/server/makefile.win b/mozilla/rdf/brprof/server/makefile.win index c59b6e2f214..ba4e180f88a 100644 --- a/mozilla/rdf/brprof/server/makefile.win +++ b/mozilla/rdf/brprof/server/makefile.win @@ -44,8 +44,7 @@ LINCS= -I$(PUBLIC)\rdf \ $(NULL) LLIBS= $(DIST)\lib\rdf.lib \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\netlib.lib \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) \ diff --git a/mozilla/rdf/brprof/server/nsBrowsingProfileReader.cpp b/mozilla/rdf/brprof/server/nsBrowsingProfileReader.cpp index 6f1d7efdcb4..efb9e0876f1 100644 --- a/mozilla/rdf/brprof/server/nsBrowsingProfileReader.cpp +++ b/mozilla/rdf/brprof/server/nsBrowsingProfileReader.cpp @@ -37,7 +37,6 @@ #include "nsRDFCID.h" #include "nsString.h" #include "nsXPIDLString.h" -#include "nsXPComCIID.h" #include "plevent.h" #include "plstr.h" #include "prlog.h" diff --git a/mozilla/rdf/build/makefile.win b/mozilla/rdf/build/makefile.win index 3d792b31921..833c712c505 100644 --- a/mozilla/rdf/build/makefile.win +++ b/mozilla/rdf/build/makefile.win @@ -35,8 +35,7 @@ LLIBS=\ $(DIST)\lib\rdfutil_s.lib \ $(DIST)\lib\rdfcontent_s.lib \ $(DIST)\lib\rdfdatasource_s.lib \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\netlib.lib \ $(DIST)\lib\plc3.lib \ diff --git a/mozilla/rdf/chrome/build/makefile.win b/mozilla/rdf/chrome/build/makefile.win index 84ac351e637..c322b17e75f 100644 --- a/mozilla/rdf/chrome/build/makefile.win +++ b/mozilla/rdf/chrome/build/makefile.win @@ -31,8 +31,7 @@ CPP_OBJS=\ # hooking in to their changes. LLIBS=\ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\chrome_s.lib \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) diff --git a/mozilla/rdf/datasource/src/nsBookmarkDataSource.cpp b/mozilla/rdf/datasource/src/nsBookmarkDataSource.cpp index c52a81be454..4b4c4d534db 100644 --- a/mozilla/rdf/datasource/src/nsBookmarkDataSource.cpp +++ b/mozilla/rdf/datasource/src/nsBookmarkDataSource.cpp @@ -777,7 +777,10 @@ protected: public: BookmarkDataSourceImpl(void); virtual ~BookmarkDataSourceImpl(void); - +#if 0 + // for nsIGenericFactory: + static nsresult Create(nsISupports *aOuter, REFNSIID aIID, void **aResult); +#endif // nsISupports NS_DECL_ISUPPORTS @@ -932,6 +935,27 @@ BookmarkDataSourceImpl::~BookmarkDataSourceImpl(void) bm_ReleaseGlobals(); } +#if 0 +nsresult +BookmarkDataSourceImpl::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) +{ + nsresult rv; + if (aOuter) + return NS_ERROR_NO_AGGREGATION; + if (aResult == nsnull) + return NS_ERROR_NULL_POINTER; + BookmarkDataSourceImpl* ds = new BookmarkDataSourceImpl(); + if (ds == nsnull) + return NS_ERROR_OUT_OF_MEMORY; + rv = ds->QueryInterface(aIID, aResult); + if (NS_FAILED(rv)) { + delete ds; + return rv; + } + return rv; +} +#endif + //NS_IMPL_ISUPPORTS(BookmarkDataSourceImpl, kIRDFDataSourceIID); NS_IMPL_ADDREF(BookmarkDataSourceImpl); NS_IMPL_RELEASE(BookmarkDataSourceImpl); @@ -1437,6 +1461,7 @@ BookmarkDataSourceImpl::CanAccept(nsIRDFResource* aSource, //////////////////////////////////////////////////////////////////////////////// +#if 0 #include "nsXPComFactory.h" NS_DEF_FACTORY(BookmarkDataSource,BookmarkDataSourceImpl) @@ -1454,6 +1479,7 @@ NS_NewRDFBookmarkDataSourceFactory(nsIFactory** aResult) *aResult = inst; return rv; } +#endif nsresult NS_NewRDFBookmarkDataSource(nsIRDFDataSource** result) diff --git a/mozilla/rdf/macbuild/RDFIDL.mcp b/mozilla/rdf/macbuild/RDFIDL.mcp index b0133ac9c67..17f9b316587 100644 Binary files a/mozilla/rdf/macbuild/RDFIDL.mcp and b/mozilla/rdf/macbuild/RDFIDL.mcp differ diff --git a/mozilla/rdf/macbuild/rdf.mcp b/mozilla/rdf/macbuild/rdf.mcp index 72dd570ca65..6adc968c75b 100644 Binary files a/mozilla/rdf/macbuild/rdf.mcp and b/mozilla/rdf/macbuild/rdf.mcp differ diff --git a/mozilla/rdf/tests/localfile/Makefile.in b/mozilla/rdf/tests/localfile/Makefile.in index 63c82d4c696..c4d5274deee 100644 --- a/mozilla/rdf/tests/localfile/Makefile.in +++ b/mozilla/rdf/tests/localfile/Makefile.in @@ -30,7 +30,6 @@ REQUIRES = LIBS = \ -lxpcom \ - -lraptorbase \ -lreg \ $(NSPR_LIBS) \ $(NULL) diff --git a/mozilla/rdf/tests/localfile/localfile.cpp b/mozilla/rdf/tests/localfile/localfile.cpp index 861af83fdaa..8e26aa27670 100644 --- a/mozilla/rdf/tests/localfile/localfile.cpp +++ b/mozilla/rdf/tests/localfile/localfile.cpp @@ -53,11 +53,9 @@ #include "nsIURL.h" #include "nsDOMCID.h" // for NS_SCRIPT_NAMESET_REGISTRY_CID #include "nsLayoutCID.h" // for NS_NAMESPACEMANAGER_CID -#include "nsParserCIID.h" #include "nsRDFCID.h" #include "nsRDFCID.h" #include "nsIComponentManager.h" -#include "nsXPComCIID.h" #include "plevent.h" #include "plstr.h" #include "rdf.h" diff --git a/mozilla/rdf/tests/localfile/makefile.win b/mozilla/rdf/tests/localfile/makefile.win index aa574b871fd..91355468b12 100644 --- a/mozilla/rdf/tests/localfile/makefile.win +++ b/mozilla/rdf/tests/localfile/makefile.win @@ -39,8 +39,7 @@ LINCS= -I$(PUBLIC)\rdf \ LLIBS= \ $(DIST)\lib\rdf.lib \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\netlib.lib \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) diff --git a/mozilla/rdf/tests/rdfcat/Makefile.in b/mozilla/rdf/tests/rdfcat/Makefile.in index ae39f53ff4b..bee04be5f73 100644 --- a/mozilla/rdf/tests/rdfcat/Makefile.in +++ b/mozilla/rdf/tests/rdfcat/Makefile.in @@ -30,10 +30,8 @@ REQUIRES = TOOLKIT_GFX_LIB := -lgfx$(MOZ_TOOLKIT) TOOLKIT_WIDGET_LIB := -lwidget$(MOZ_TOOLKIT) -TOOLKIT_BASE_LIB := -lgmbase$(MOZ_TOOLKIT) BASE_LIBS = \ - -lraptorbase \ -lpref \ $(ZLIB_LIBS) \ -lreg \ @@ -50,7 +48,6 @@ GECKO_LIBS = \ $(TOOLKIT_GFX_LIB) \ -lgfxps \ -lraptorhtml \ - $(TOOLKIT_BASE_LIB) \ -lraptorhtmlpars \ -lexpat \ -lxmltok \ @@ -90,7 +87,6 @@ LIBS = \ $(IMGLIB_LIBS) \ $(BASE_LIBS) \ $(NSPR_LIBS) \ - $(TOOLKIT_BASE_LIB) \ $(TK_LIBS) \ $(NULL) diff --git a/mozilla/rdf/tests/rdfcat/makefile.win b/mozilla/rdf/tests/rdfcat/makefile.win index 71cb4c17f88..ebaf14b90b9 100644 --- a/mozilla/rdf/tests/rdfcat/makefile.win +++ b/mozilla/rdf/tests/rdfcat/makefile.win @@ -39,8 +39,7 @@ LINCS= -I$(PUBLIC)\rdf \ LLIBS= \ $(DIST)\lib\rdf.lib \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\netlib.lib \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) diff --git a/mozilla/rdf/tests/rdfcat/rdfcat.cpp b/mozilla/rdf/tests/rdfcat/rdfcat.cpp index 9eceea0909e..fd6465e92de 100644 --- a/mozilla/rdf/tests/rdfcat/rdfcat.cpp +++ b/mozilla/rdf/tests/rdfcat/rdfcat.cpp @@ -45,14 +45,13 @@ #include "nsIURL.h" #include "nsDOMCID.h" // for NS_SCRIPT_NAMESET_REGISTRY_CID #include "nsLayoutCID.h" // for NS_NAMESPACEMANAGER_CID -#include "nsParserCIID.h" #include "nsRDFCID.h" #include "nsRDFCID.h" #include "nsIComponentManager.h" -#include "nsXPComCIID.h" #include "prthread.h" #include "plevent.h" #include "plstr.h" +#include "nsParserCIID.h" #if defined(XP_PC) #define DOM_DLL "jsdom.dll" diff --git a/mozilla/rdf/tests/rdfpoll/Makefile.in b/mozilla/rdf/tests/rdfpoll/Makefile.in index 104fd883324..bcc22aaa62a 100644 --- a/mozilla/rdf/tests/rdfpoll/Makefile.in +++ b/mozilla/rdf/tests/rdfpoll/Makefile.in @@ -30,10 +30,8 @@ REQUIRES = TOOLKIT_GFX_LIB := -lgfx$(MOZ_TOOLKIT) TOOLKIT_WIDGET_LIB := -lwidget$(MOZ_TOOLKIT) -TOOLKIT_BASE_LIB := -lgmbase$(MOZ_TOOLKIT) BASE_LIBS = \ - -lraptorbase \ -lpref \ $(ZLIB_LIBS) \ -lreg \ @@ -50,7 +48,6 @@ GECKO_LIBS = \ $(TOOLKIT_GFX_LIB) \ -lgfxps \ -lraptorhtml \ - $(TOOLKIT_BASE_LIB) \ -lraptorhtmlpars \ -lexpat \ -lxmltok \ @@ -90,7 +87,6 @@ LIBS = \ $(IMGLIB_LIBS) \ $(BASE_LIBS) \ $(NSPR_LIBS) \ - $(TOOLKIT_BASE_LIB) \ $(TK_LIBS) \ $(NULL) diff --git a/mozilla/rdf/tests/rdfpoll/makefile.win b/mozilla/rdf/tests/rdfpoll/makefile.win index afd99df48bc..bbacc73a0c5 100644 --- a/mozilla/rdf/tests/rdfpoll/makefile.win +++ b/mozilla/rdf/tests/rdfpoll/makefile.win @@ -39,8 +39,7 @@ LINCS= -I$(PUBLIC)\rdf \ LLIBS= \ $(DIST)\lib\rdf.lib \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\netlib.lib \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) diff --git a/mozilla/rdf/tests/rdfpoll/rdfpoll.cpp b/mozilla/rdf/tests/rdfpoll/rdfpoll.cpp index daeded23e90..29da05e6b9d 100644 --- a/mozilla/rdf/tests/rdfpoll/rdfpoll.cpp +++ b/mozilla/rdf/tests/rdfpoll/rdfpoll.cpp @@ -45,15 +45,14 @@ #include "nsIURL.h" #include "nsDOMCID.h" // for NS_SCRIPT_NAMESET_REGISTRY_CID #include "nsLayoutCID.h" // for NS_NAMESPACEMANAGER_CID -#include "nsParserCIID.h" #include "nsRDFCID.h" #include "nsRDFCID.h" #include "nsIComponentManager.h" -#include "nsXPComCIID.h" #include "nsXPIDLString.h" #include "prthread.h" #include "plevent.h" #include "plstr.h" +#include "nsParserCIID.h" #if defined(XP_PC) #define DOM_DLL "jsdom.dll" diff --git a/mozilla/rdf/tests/rdfsink/makefile.win b/mozilla/rdf/tests/rdfsink/makefile.win index 16026e78d7f..0aaa87a64c0 100644 --- a/mozilla/rdf/tests/rdfsink/makefile.win +++ b/mozilla/rdf/tests/rdfsink/makefile.win @@ -39,8 +39,7 @@ LINCS= -I$(PUBLIC)\rdf \ LLIBS= \ $(DIST)\lib\rdf.lib \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\netlib.lib \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) diff --git a/mozilla/rdf/tests/rdfsink/rdfsink.cpp b/mozilla/rdf/tests/rdfsink/rdfsink.cpp index 0fcacc3b60d..f4fd0335408 100644 --- a/mozilla/rdf/tests/rdfsink/rdfsink.cpp +++ b/mozilla/rdf/tests/rdfsink/rdfsink.cpp @@ -34,11 +34,9 @@ #include "nsIURL.h" #include "nsDOMCID.h" // for NS_SCRIPT_NAMESET_REGISTRY_CID #include "nsLayoutCID.h" // for NS_NAMESPACEMANAGER_CID -#include "nsParserCIID.h" #include "nsRDFCID.h" #include "nsRDFCID.h" #include "nsIComponentManager.h" -#include "nsXPComCIID.h" #include "plevent.h" #include "plstr.h" diff --git a/mozilla/silentdl/makefile.win b/mozilla/silentdl/makefile.win index 2c283a2ce95..726581aa253 100644 --- a/mozilla/silentdl/makefile.win +++ b/mozilla/silentdl/makefile.win @@ -45,13 +45,12 @@ LINCS= \ LLIBS = \ $(DIST)\lib\netlib.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\xppref32.lib \ $(DIST)\lib\xplib.lib \ $(DIST)\lib\js3250.lib \ $(DIST)\lib\jsdombase_s.lib \ $(DIST)\lib\jsdomevents_s.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ diff --git a/mozilla/string/obsolete/nsString.cpp b/mozilla/string/obsolete/nsString.cpp index d7584696719..d0d86da25a5 100644 --- a/mozilla/string/obsolete/nsString.cpp +++ b/mozilla/string/obsolete/nsString.cpp @@ -2217,7 +2217,7 @@ ostream& operator<<(ostream& os,nsAutoString1& aString){ * @param * @return */ -NS_BASE int fputs(const nsString1& aString, FILE* out){ +NS_COM int fputs(const nsString1& aString, FILE* out){ char buf[200]; char* cp = buf; PRInt32 aLength=aString.Length(); diff --git a/mozilla/string/obsolete/nsString.h b/mozilla/string/obsolete/nsString.h index ae25e4976fc..178307ca416 100644 --- a/mozilla/string/obsolete/nsString.h +++ b/mozilla/string/obsolete/nsString.h @@ -50,7 +50,7 @@ class nsISizeOfHandler; -class NS_BASE nsString1 { +class NS_COM nsString1 { public: /** @@ -771,7 +771,7 @@ typedef PRUnichar chartype; }; ostream& operator<<(ostream& os,nsString1& aString); -extern NS_BASE int fputs(const nsString1& aString, FILE* out); +extern NS_COM int fputs(const nsString1& aString, FILE* out); //---------------------------------------------------------------------- @@ -782,7 +782,7 @@ extern NS_BASE int fputs(const nsString1& aString, FILE* out); * allocated and grown as necessary. */ // XXX template this with a parameter for the size of the buffer? -class NS_BASE nsAutoString1 : public nsString1 { +class NS_COM nsAutoString1 : public nsString1 { public: nsAutoString1(); nsAutoString1(const nsString1& other); diff --git a/mozilla/string/obsolete/nsString2.cpp b/mozilla/string/obsolete/nsString2.cpp index 9263c5883f6..594dfc346fb 100644 --- a/mozilla/string/obsolete/nsString2.cpp +++ b/mozilla/string/obsolete/nsString2.cpp @@ -1723,7 +1723,7 @@ ostream& operator<<(ostream& os,nsString2& aString){ * @param * @return */ -NS_BASE int fputs(const nsString2& aString, FILE* out) +NS_COM int fputs(const nsString2& aString, FILE* out) { char buf[100]; char* cp = buf; diff --git a/mozilla/string/obsolete/nsString2.h b/mozilla/string/obsolete/nsString2.h index 4e4fef5a80d..4d9bab7bcab 100644 --- a/mozilla/string/obsolete/nsString2.h +++ b/mozilla/string/obsolete/nsString2.h @@ -52,9 +52,9 @@ class nsISizeOfHandler; #define nsAutoString2 nsAutoString #endif -class NS_BASE nsSubsumeStr; +class NS_COM nsSubsumeStr; -class NS_BASE nsString2 : public nsStr { +class NS_COM nsString2 : public nsStr { public: @@ -726,7 +726,7 @@ virtual void DebugDump(ostream& aStream) const; }; -extern NS_BASE int fputs(const nsString2& aString, FILE* out); +extern NS_COM int fputs(const nsString2& aString, FILE* out); ostream& operator<<(ostream& os,nsString2& aString); @@ -736,7 +736,7 @@ ostream& operator<<(ostream& os,nsString2& aString); If the buffer needs to grow, it gets reallocated on the heap. **************************************************************/ -class NS_BASE nsAutoString2 : public nsString2 { +class NS_COM nsAutoString2 : public nsString2 { public: nsAutoString2(eCharSize aCharSize=kDefaultCharSize); @@ -786,7 +786,7 @@ public: You should probably not use this class unless you really know what you're doing. ***************************************************************/ -class NS_BASE nsSubsumeStr : public nsString2 { +class NS_COM nsSubsumeStr : public nsString2 { public: nsSubsumeStr(nsString2& aString); nsSubsumeStr(nsStr& aString); diff --git a/mozilla/uriloader/base/nsDocLoader.cpp b/mozilla/uriloader/base/nsDocLoader.cpp index ad412dcfb84..b0ef8b49a16 100644 --- a/mozilla/uriloader/base/nsDocLoader.cpp +++ b/mozilla/uriloader/base/nsDocLoader.cpp @@ -36,9 +36,10 @@ #include "nsIURLGroup.h" #include "nsIServiceManager.h" #include "nsINetService.h" -#include "nsXPComFactory.h" +#include "nsIGenericFactory.h" #include "nsIStreamLoadableDocument.h" #include "nsCOMPtr.h" +#include "nsCom.h" // XXX ick ick ick #include "nsIDocument.h" @@ -76,7 +77,7 @@ static NS_DEFINE_IID(kIDocumentIID, NS_IDOCUMENT_IID); static NS_DEFINE_IID(kIStreamListenerIID, NS_ISTREAMLISTENER_IID); static NS_DEFINE_IID(kINetServiceIID, NS_INETSERVICE_IID); static NS_DEFINE_IID(kIContentViewerContainerIID, NS_ICONTENT_VIEWER_CONTAINER_IID); - +static NS_DEFINE_CID(kGenericFactoryCID, NS_GENERICFACTORY_CID); /* Define CIDs... */ static NS_DEFINE_IID(kNetServiceCID, NS_NETSERVICE_CID); @@ -157,6 +158,9 @@ public: nsDocLoaderImpl(); + // for nsIGenericFactory: + static NS_IMETHODIMP Create(nsISupports *aOuter, const nsIID &aIID, void **aResult); + NS_DECL_ISUPPORTS // nsIDocumentLoader interface @@ -1583,20 +1587,8 @@ nsDocumentBindInfo::CancelRefreshURLTimers(void) *******************************************/ static nsDocLoaderImpl* gServiceInstance = nsnull; -NS_DEF_FACTORY(DocLoaderServiceGen,nsDocLoaderImpl) - -class nsDocLoaderServiceFactory : public nsDocLoaderServiceGenFactory -{ -public: - NS_IMETHOD CreateInstance(nsISupports *aOuter, - const nsIID &aIID, - void **aResult); -}; - NS_IMETHODIMP -nsDocLoaderServiceFactory::CreateInstance(nsISupports *aOuter, - const nsIID &aIID, - void **aResult) +nsDocLoaderImpl::Create(nsISupports *aOuter, const nsIID &aIID, void **aResult) { nsresult rv; nsDocLoaderImpl* inst; @@ -1641,13 +1633,18 @@ done: nsresult NS_NewDocLoaderServiceFactory(nsIFactory** aResult) { nsresult rv = NS_OK; - nsIFactory* inst = new nsDocLoaderServiceFactory(); - if (NULL == inst) { - rv = NS_ERROR_OUT_OF_MEMORY; + nsIGenericFactory* factory; + rv = nsComponentManager::CreateInstance(kGenericFactoryCID, nsnull, + nsIGenericFactory::GetIID(), + (void**)&factory); + if (NS_FAILED(rv)) return rv; + + rv = factory->SetConstructor(nsDocLoaderImpl::Create); + if (NS_FAILED(rv)) { + NS_RELEASE(factory); + return rv; } - else { - NS_ADDREF(inst); - } - *aResult = inst; + + *aResult = factory; return rv; } diff --git a/mozilla/view/macbuild/view.mcp b/mozilla/view/macbuild/view.mcp index 24967e334b3..dc8c9e1b142 100644 Binary files a/mozilla/view/macbuild/view.mcp and b/mozilla/view/macbuild/view.mcp differ diff --git a/mozilla/view/src/makefile.win b/mozilla/view/src/makefile.win index 64a24d7f491..5841ea1435e 100644 --- a/mozilla/view/src/makefile.win +++ b/mozilla/view/src/makefile.win @@ -46,8 +46,7 @@ LCFLAGS = \ $(NULL) LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(LIBNSPR) diff --git a/mozilla/webshell/embed/ActiveX/makefile.win b/mozilla/webshell/embed/ActiveX/makefile.win index 918d878b70a..dc30740f06b 100644 --- a/mozilla/webshell/embed/ActiveX/makefile.win +++ b/mozilla/webshell/embed/ActiveX/makefile.win @@ -97,10 +97,9 @@ LINCS= \ MYLIBS= \ !ifdef MOZ_ACTIVEX_CONTROL_SUPPORT - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\raptorweb.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ !endif $(NULL) diff --git a/mozilla/webshell/src/makefile.win b/mozilla/webshell/src/makefile.win index 0705269d75c..6b2e20de860 100644 --- a/mozilla/webshell/src/makefile.win +++ b/mozilla/webshell/src/makefile.win @@ -66,8 +66,7 @@ LCFLAGS = \ # These are the libraries we need to link with to create the dll LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\img32$(VERSION_NUMBER).lib \ $(DIST)\lib\util.lib \ diff --git a/mozilla/webshell/src/nsDocLoader.cpp b/mozilla/webshell/src/nsDocLoader.cpp index ad412dcfb84..b0ef8b49a16 100644 --- a/mozilla/webshell/src/nsDocLoader.cpp +++ b/mozilla/webshell/src/nsDocLoader.cpp @@ -36,9 +36,10 @@ #include "nsIURLGroup.h" #include "nsIServiceManager.h" #include "nsINetService.h" -#include "nsXPComFactory.h" +#include "nsIGenericFactory.h" #include "nsIStreamLoadableDocument.h" #include "nsCOMPtr.h" +#include "nsCom.h" // XXX ick ick ick #include "nsIDocument.h" @@ -76,7 +77,7 @@ static NS_DEFINE_IID(kIDocumentIID, NS_IDOCUMENT_IID); static NS_DEFINE_IID(kIStreamListenerIID, NS_ISTREAMLISTENER_IID); static NS_DEFINE_IID(kINetServiceIID, NS_INETSERVICE_IID); static NS_DEFINE_IID(kIContentViewerContainerIID, NS_ICONTENT_VIEWER_CONTAINER_IID); - +static NS_DEFINE_CID(kGenericFactoryCID, NS_GENERICFACTORY_CID); /* Define CIDs... */ static NS_DEFINE_IID(kNetServiceCID, NS_NETSERVICE_CID); @@ -157,6 +158,9 @@ public: nsDocLoaderImpl(); + // for nsIGenericFactory: + static NS_IMETHODIMP Create(nsISupports *aOuter, const nsIID &aIID, void **aResult); + NS_DECL_ISUPPORTS // nsIDocumentLoader interface @@ -1583,20 +1587,8 @@ nsDocumentBindInfo::CancelRefreshURLTimers(void) *******************************************/ static nsDocLoaderImpl* gServiceInstance = nsnull; -NS_DEF_FACTORY(DocLoaderServiceGen,nsDocLoaderImpl) - -class nsDocLoaderServiceFactory : public nsDocLoaderServiceGenFactory -{ -public: - NS_IMETHOD CreateInstance(nsISupports *aOuter, - const nsIID &aIID, - void **aResult); -}; - NS_IMETHODIMP -nsDocLoaderServiceFactory::CreateInstance(nsISupports *aOuter, - const nsIID &aIID, - void **aResult) +nsDocLoaderImpl::Create(nsISupports *aOuter, const nsIID &aIID, void **aResult) { nsresult rv; nsDocLoaderImpl* inst; @@ -1641,13 +1633,18 @@ done: nsresult NS_NewDocLoaderServiceFactory(nsIFactory** aResult) { nsresult rv = NS_OK; - nsIFactory* inst = new nsDocLoaderServiceFactory(); - if (NULL == inst) { - rv = NS_ERROR_OUT_OF_MEMORY; + nsIGenericFactory* factory; + rv = nsComponentManager::CreateInstance(kGenericFactoryCID, nsnull, + nsIGenericFactory::GetIID(), + (void**)&factory); + if (NS_FAILED(rv)) return rv; + + rv = factory->SetConstructor(nsDocLoaderImpl::Create); + if (NS_FAILED(rv)) { + NS_RELEASE(factory); + return rv; } - else { - NS_ADDREF(inst); - } - *aResult = inst; + + *aResult = factory; return rv; } diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index 646f60fcbdc..e6843186508 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -33,7 +33,6 @@ #include "nsIComponentManager.h" #include "nsIServiceManager.h" #include "nsIEventQueueService.h" -#include "nsXPComCIID.h" #include "nsCRT.h" #include "nsVoidArray.h" #include "nsString.h" diff --git a/mozilla/webshell/tests/imgtest/makefile.win b/mozilla/webshell/tests/imgtest/makefile.win index f6d61a79a97..808d1dbe951 100644 --- a/mozilla/webshell/tests/imgtest/makefile.win +++ b/mozilla/webshell/tests/imgtest/makefile.win @@ -30,10 +30,9 @@ OBJS = \ $(NULL) LLIBS= \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\raptorweb.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\img32$(VERSION_NUMBER).lib \ diff --git a/mozilla/webshell/tests/viewer/Makefile.in b/mozilla/webshell/tests/viewer/Makefile.in index 16c681ab5e4..6a9d88ddcb2 100644 --- a/mozilla/webshell/tests/viewer/Makefile.in +++ b/mozilla/webshell/tests/viewer/Makefile.in @@ -49,7 +49,6 @@ EXPORT_RESOURCE_THROBBER := \ TOOLKIT_GFX_LIB := -lgfx$(MOZ_TOOLKIT) TOOLKIT_WIDGET_LIB := -lwidget$(MOZ_TOOLKIT) -TOOLKIT_BASE_LIB := -lgmbase$(MOZ_TOOLKIT) # Hardcoding dlopen()'s? This needs to get fixed. # @@ -94,7 +93,6 @@ ifdef MOZ_OJI endif BASE_LIBS = \ - -lraptorbase \ -lpref \ $(ZLIB_LIBS) \ -lreg \ @@ -110,7 +108,6 @@ GECKO_LIBS = \ -lraptorgfx \ $(TOOLKIT_GFX_LIB) \ -lgfxps \ - $(TOOLKIT_BASE_LIB) \ -lraptorhtmlpars \ -lexpat \ -lxmltok \ diff --git a/mozilla/webshell/tests/viewer/makefile.win b/mozilla/webshell/tests/viewer/makefile.win index 474638ab3d9..559223125eb 100644 --- a/mozilla/webshell/tests/viewer/makefile.win +++ b/mozilla/webshell/tests/viewer/makefile.win @@ -30,7 +30,7 @@ RCFLAGS=/d_DEBUG MISCDEP= \ $(DIST)\lib\DebugRobot.lib \ $(DIST)\lib\raptorweb.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib @@ -81,14 +81,13 @@ LINCS= \ $(NULL) MYLIBS= \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\raptorhtml.lib \ $(DIST)\lib\raptorweb.lib \ $(DIST)\lib\raptorwidget.lib \ $(DIST)\lib\raptorhtmlpars.lib \ $(DIST)\lib\DebugRobot.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\js32$(VERSION_NUMBER).lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ diff --git a/mozilla/webshell/tests/viewer/nsSetupRegistry.cpp b/mozilla/webshell/tests/viewer/nsSetupRegistry.cpp index 809cc3c9132..6ff6808d4fc 100644 --- a/mozilla/webshell/tests/viewer/nsSetupRegistry.cpp +++ b/mozilla/webshell/tests/viewer/nsSetupRegistry.cpp @@ -20,7 +20,6 @@ #include "nsIPref.h" #include "nsIComponentManager.h" #include "nsWidgetsCID.h" -#include "nsGfxCIID.h" #include "nsViewsCID.h" #include "nsPluginsCID.h" #include "nsRDFCID.h" @@ -30,7 +29,6 @@ #include "nsIDocumentLoader.h" #include "nsIThrobber.h" -#include "nsXPComCIID.h" #include "nsParserCIID.h" #include "nsDOMCID.h" #include "nsINetService.h" @@ -54,13 +52,15 @@ #include "nsIObserver.h" #include "nsIAllocator.h" #include "nsIEventQueue.h" +#include "nsIEventQueueService.h" #include "nsIGenericFactory.h" +#include "nsGfxCIID.h" #include "prprf.h" #include "prmem.h" #ifdef XP_PC - #define XPCOM_DLL "xpcom32.dll" + #define XPCOM_DLL "xpcom.dll" #define WIDGET_DLL "raptorwidget.dll" #define GFXWIN_DLL "raptorgfxwin.dll" #define VIEW_DLL "raptorview.dll" @@ -81,7 +81,6 @@ #define UCVJA2_DLL "ucvja2.dll" #define STRRES_DLL "strres.dll" #define UNICHARUTIL_DLL "unicharutil.dll" - #define BASE_DLL "raptorbase.dll" #elif defined(XP_MAC) #define XPCOM_DLL "XPCOM_DLL" #define WIDGET_DLL "WIDGET_DLL" @@ -104,7 +103,6 @@ #define UCVJA2_DLL "UCVJA2_DLL" #define STRRES_DLL "STRRES_DLL" #define UNICHARUTIL_DLL "UNICHARUTIL_DLL" - #define BASE_DLL "base.shlb" #else #define XPCOM_DLL "libxpcom.so" /** Currently CFLAGS defines WIDGET_DLL and GFXWIN_DLL. If, for some @@ -135,14 +133,9 @@ #define UCVJA2_DLL "libucvja2.so" #define STRRES_DLL "libstrres.so" #define UNICHARUTIL_DLL "libunicharutil.so" - #define BASE_DLL "libraptorbase.so" #endif // Class ID's -static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID); -static NS_DEFINE_IID(kEventQueueCID, NS_EVENTQUEUE_CID); -static NS_DEFINE_IID(kAllocatorCID, NS_ALLOCATOR_CID); -static NS_DEFINE_IID(kGenericFactoryCID, NS_GENERICFACTORY_CID); static NS_DEFINE_IID(kCFileWidgetCID, NS_FILEWIDGET_CID); static NS_DEFINE_IID(kCWindowCID, NS_WINDOW_CID); static NS_DEFINE_IID(kCDialogCID, NS_DIALOG_CID); @@ -182,8 +175,6 @@ static NS_DEFINE_IID(kLookAndFeelCID, NS_LOOKANDFEEL_CID); static NS_DEFINE_IID(kCDOMScriptObjectFactory, NS_DOM_SCRIPT_OBJECT_FACTORY_CID); static NS_DEFINE_IID(kCScriptNameSetRegistry, NS_SCRIPT_NAMESET_REGISTRY_CID); static NS_DEFINE_CID(kNetServiceCID, NS_NETSERVICE_CID); -static NS_DEFINE_CID(kObserverServiceCID, NS_OBSERVERSERVICE_CID); -static NS_DEFINE_CID(kObserverCID, NS_OBSERVER_CID); static NS_DEFINE_IID(kClipboardCID, NS_CLIPBOARD_CID); static NS_DEFINE_CID(kCTransferableCID, NS_TRANSFERABLE_CID); @@ -212,10 +203,6 @@ static NS_DEFINE_IID(kUnicharUtilCID, NS_UNICHARUTIL_CID); extern "C" void NS_SetupRegistry() { - nsComponentManager::RegisterComponent(kEventQueueCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE); - nsComponentManager::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE); - nsComponentManager::RegisterComponent(kAllocatorCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE); - nsComponentManager::RegisterComponent(kGenericFactoryCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE); nsComponentManager::RegisterComponent(kLookAndFeelCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE); nsComponentManager::RegisterComponent(kCWindowIID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE); nsComponentManager::RegisterComponent(kCScrollbarIID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE); @@ -255,8 +242,6 @@ NS_SetupRegistry() nsComponentManager::RegisterComponent(kCScriptNameSetRegistry, NULL, NULL, DOM_DLL, PR_FALSE, PR_FALSE); nsComponentManager::RegisterComponent(kNetServiceCID, NULL, NULL, NETLIB_DLL, PR_FALSE, PR_FALSE); - nsComponentManager::RegisterComponent(kObserverServiceCID, NULL, NULL, BASE_DLL,PR_FALSE, PR_FALSE); - nsComponentManager::RegisterComponent(kObserverCID, NULL, NULL, BASE_DLL,PR_FALSE, PR_FALSE); nsComponentManager::RegisterComponent(kClipboardCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE); nsComponentManager::RegisterComponent(kCTransferableCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE); @@ -270,8 +255,6 @@ NS_SetupRegistry() nsComponentManager::RegisterComponent(kUnicharUtilCID, NULL, NULL, UNICHARUTIL_DLL, PR_FALSE, PR_FALSE); - nsComponentManager::RegisterComponent(kPersistentPropertiesCID, NULL, NULL, BASE_DLL, PR_FALSE, PR_FALSE); - nsComponentManager::RegisterComponent(kCPluginManagerCID, NULL, NULL, PLUGIN_DLL, PR_FALSE, PR_FALSE); #ifdef OJI nsComponentManager::RegisterComponent(kCapsManagerCID, NULL, NULL, CAPS_DLL, PR_FALSE, PR_FALSE); diff --git a/mozilla/webshell/tests/viewer/nsViewerApp.cpp b/mozilla/webshell/tests/viewer/nsViewerApp.cpp index cd6ec43614b..b33bd3d6dbb 100644 --- a/mozilla/webshell/tests/viewer/nsViewerApp.cpp +++ b/mozilla/webshell/tests/viewer/nsViewerApp.cpp @@ -31,7 +31,6 @@ #include "nsIComponentManager.h" #include "nsIServiceManager.h" #include "nsIEventQueueService.h" -#include "nsXPComCIID.h" #include "nsWebCrawler.h" #include "nsSpecialSystemDirectory.h" // For exe dir #include "prprf.h" diff --git a/mozilla/widget/macbuild/widget.mcp b/mozilla/widget/macbuild/widget.mcp index c88f7d8cb35..7640ec15f0a 100644 Binary files a/mozilla/widget/macbuild/widget.mcp and b/mozilla/widget/macbuild/widget.mcp differ diff --git a/mozilla/widget/public/MANIFEST b/mozilla/widget/public/MANIFEST index eb462435a64..d141b8b4d89 100644 --- a/mozilla/widget/public/MANIFEST +++ b/mozilla/widget/public/MANIFEST @@ -9,6 +9,7 @@ nsIClipboard.h nsITransferable.h nsIDragService.h nsIDragSession.h +nsIDragSessionMac.h nsui.h nsIWidget.h nsIButton.h @@ -19,7 +20,6 @@ nsITextWidget.h nsITextAreaWidget.h nsIComboBox.h nsIListBox.h -nsIFileWidget.h nsIScrollbar.h nsGUIEvent.h nsIRadioButton.h @@ -31,7 +31,6 @@ nsWidgetsCID.h nsITabWidget.h nsITooltipWidget.h nsIAppShell.h -nsStringUtil.h nsIDialog.h nsILabel.h nsILookAndFeel.h @@ -45,4 +44,5 @@ nsIImageButton.h nsIImageButtonListener.h nsIContentConnector.h nsIKeyBindMgr.h +nsStringUtil.h nsIContextMenu.h \ No newline at end of file diff --git a/mozilla/widget/public/Makefile.in b/mozilla/widget/public/Makefile.in index 270783f6203..f1e5206e45d 100644 --- a/mozilla/widget/public/Makefile.in +++ b/mozilla/widget/public/Makefile.in @@ -29,6 +29,7 @@ EXPORTS = \ nsIFontNameIterator.h \ nsIFontRetrieverService.h \ nsIFileListTransferable.h \ + nsIGenericTransferable.h \ nsIMenuBar.h \ nsIMenu.h \ nsIMenuItem.h \ @@ -48,7 +49,6 @@ EXPORTS = \ nsITextAreaWidget.h \ nsIComboBox.h \ nsIListBox.h \ - nsIFileWidget.h \ nsIScrollbar.h \ nsGUIEvent.h \ nsIRadioButton.h\ diff --git a/mozilla/widget/public/makefile.win b/mozilla/widget/public/makefile.win index 16250499b7b..87e16296438 100644 --- a/mozilla/widget/public/makefile.win +++ b/mozilla/widget/public/makefile.win @@ -30,6 +30,7 @@ EXPORTS=nsui.h \ nsIClipboardOwner.h \ nsIClipboard.h \ nsITransferable.h \ + nsIGenericTransferable.h \ nsIDragService.h \ nsIDragSession.h \ nsIWidget.h \ @@ -41,7 +42,6 @@ EXPORTS=nsui.h \ nsITextAreaWidget.h \ nsIComboBox.h \ nsIListBox.h \ - nsIFileWidget.h \ nsIScrollbar.h \ nsGUIEvent.h \ nsIRadioButton.h \ diff --git a/mozilla/widget/public/nsRepeater.h b/mozilla/widget/public/nsRepeater.h new file mode 100644 index 00000000000..d72d45c1f2f --- /dev/null +++ b/mozilla/widget/public/nsRepeater.h @@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +#ifndef nsRepeater_h___ +#define nsRepeater_h___ + +#include "nscore.h" + +class EventRecord; + +class NS_BASE Repeater { + public: + + Repeater(); + virtual ~Repeater(); + + virtual void RepeatAction(const EventRecord &aMacEvent) = 0; + + void StartRepeating(); + void StopRepeating(); + void StartIdling(); + void StopIdling(); + + static void DoRepeaters(const EventRecord &aMacEvent); + static void DoIdlers(const EventRecord &aMacEvent); + + protected: + + void AddToRepeatList(); + void RemoveFromRepeatList(); + void AddToIdleList(); + void RemoveFromIdleList(); + + static Repeater* sRepeaters; + static Repeater* sIdlers; + + bool mRepeating; + bool mIdling; + Repeater* mPrevRptr; + Repeater* mNextRptr; + Repeater* mPrevIdlr; + Repeater* mNextIdlr; +}; + +#endif \ No newline at end of file diff --git a/mozilla/widget/public/nsWidgetsCID.h b/mozilla/widget/public/nsWidgetsCID.h index 83887b59d10..fe1bcb7d153 100644 --- a/mozilla/widget/public/nsWidgetsCID.h +++ b/mozilla/widget/public/nsWidgetsCID.h @@ -186,7 +186,7 @@ // {285EF9B2-094A-11d3-9A87-0050046CDA96} #define NS_FONTRETRIEVERSERVICE_CID \ -{ 0x285ef9b2, 0x94a, 0x11d3, { 0x9a, 0x87, 0x0, 0x50, 0x4, 0x6c, 0xda, 0x96 } }; +{ 0x285ef9b2, 0x94a, 0x11d3, { 0x9a, 0x87, 0x0, 0x50, 0x4, 0x6c, 0xda, 0x96 } } //----------------------------------------------------------- //Drag & Drop & Clipboard diff --git a/mozilla/widget/src/build/makefile.win b/mozilla/widget/src/build/makefile.win index f176db7d70c..75b5356c034 100644 --- a/mozilla/widget/src/build/makefile.win +++ b/mozilla/widget/src/build/makefile.win @@ -32,8 +32,7 @@ MISCDEP = \ $(DIST)\lib\raptorhtmlpars.lib \ $(DIST)\lib\raptorbasewidget_s.lib \ $(DIST)\lib\raptorwidget_s.lib \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\raptorbasewidget_s.lib @@ -61,10 +60,9 @@ LLIBS= \ Uuid.lib \ ole32.lib \ shell32.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\raptorhtmlpars.lib \ $(DIST)\lib\raptorgfxwin.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorbasewidget_s.lib \ $(DIST)\lib\raptorwidget_s.lib \ $(LIBNSPR) diff --git a/mozilla/widget/src/gtk/nsAppShell.cpp b/mozilla/widget/src/gtk/nsAppShell.cpp index fa29b2cdf92..5af9c749d61 100644 --- a/mozilla/widget/src/gtk/nsAppShell.cpp +++ b/mozilla/widget/src/gtk/nsAppShell.cpp @@ -22,7 +22,6 @@ #include "nsIServiceManager.h" #include "nsIEventQueueService.h" #include "nsICmdLineService.h" -#include "nsXPComCIID.h" #include #include "nsIWidget.h" diff --git a/mozilla/widget/src/mac/nsContextMenu.cpp b/mozilla/widget/src/mac/nsContextMenu.cpp index ec6bf1654f6..0d5a76feb5d 100644 --- a/mozilla/widget/src/mac/nsContextMenu.cpp +++ b/mozilla/widget/src/mac/nsContextMenu.cpp @@ -24,7 +24,7 @@ #include "nsCOMPtr.h" -#include "nsComponentManager.h" +#include "nsIComponentManager.h" #include "nsMenu.h" // for mMacMenuIDCount diff --git a/mozilla/widget/src/mac/nsMacMessagePump.cpp b/mozilla/widget/src/mac/nsMacMessagePump.cpp index 9b17a868df4..c2468b93b30 100644 --- a/mozilla/widget/src/mac/nsMacMessagePump.cpp +++ b/mozilla/widget/src/mac/nsMacMessagePump.cpp @@ -39,7 +39,6 @@ #include "nsRepeater.h" -#include "nsXPComCIID.h" #include "nsIEventQueueService.h" #include "nsIServiceManager.h" #include "plevent.h" diff --git a/mozilla/widget/src/mac/nsRepeater.cpp b/mozilla/widget/src/mac/nsRepeater.cpp new file mode 100644 index 00000000000..5a93b4d2970 --- /dev/null +++ b/mozilla/widget/src/mac/nsRepeater.cpp @@ -0,0 +1,147 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +#include "nsRepeater.h" + +Repeater* Repeater::sRepeaters = 0; +Repeater* Repeater::sIdlers = 0; + +Repeater::Repeater() +{ + mRepeating = false; + mIdling = false; + mPrevRptr = 0; + mNextRptr = 0; + mPrevIdlr = 0; + mNextIdlr = 0; +} + +Repeater::~Repeater() +{ + if (mRepeating) RemoveFromRepeatList(); + if (mIdling) RemoveFromIdleList(); +} + +// protected helper functs + +//---------------------------------------------------------------------------- +void Repeater::AddToRepeatList() +{ + if (sRepeaters) + { + sRepeaters->mPrevRptr = this; + mNextRptr = sRepeaters; + } + sRepeaters = this; +} + +//---------------------------------------------------------------------------- +void Repeater::RemoveFromRepeatList() +{ + if (sRepeaters == this) sRepeaters = mNextRptr; + if (mPrevRptr) mPrevRptr->mNextRptr = mNextRptr; + if (mNextRptr) mNextRptr->mPrevRptr = mPrevRptr; + mPrevRptr = 0; + mNextRptr = 0; +} + +//---------------------------------------------------------------------------- +void Repeater::AddToIdleList() +{ + if (sIdlers) + { + sIdlers->mPrevIdlr = this; + mNextIdlr = sIdlers; + } + sIdlers = this; +} + +//---------------------------------------------------------------------------- +void Repeater::RemoveFromIdleList() +{ + if (sIdlers == this) sIdlers = mNextIdlr; + if (mPrevIdlr) mPrevIdlr->mNextIdlr = mNextIdlr; + if (mNextIdlr) mNextIdlr->mPrevIdlr = mPrevIdlr; + mPrevIdlr = 0; + mNextIdlr = 0; +} + +// repeater methods +//---------------------------------------------------------------------------- + +void Repeater::StartRepeating() +{ + if (!mRepeating) + { + AddToRepeatList(); + mRepeating = true; + } +} + +void Repeater::StopRepeating() +{ + if (mRepeating) + { + RemoveFromRepeatList(); + mRepeating = false; + } +} + +void Repeater::DoRepeaters(const EventRecord &aMacEvent) +{ + Repeater* theRepeater = sRepeaters; + while (theRepeater) + { + theRepeater->RepeatAction(aMacEvent); + theRepeater = theRepeater->mNextRptr; + } +} + +// idler methods + +void Repeater::StartIdling() +{ + if (!mIdling) + { + AddToIdleList(); + mIdling = true; + } +} + +void Repeater::StopIdling() +{ + if (mIdling) + { + RemoveFromIdleList(); + mIdling = false; + } +} + +void Repeater::DoIdlers(const EventRecord &aMacEvent) +{ + Repeater* theIdler = sIdlers; + while (theIdler) + { + theIdler->RepeatAction(aMacEvent); + theIdler = theIdler->mNextIdlr; + } +} + + + + diff --git a/mozilla/widget/src/mac/nsToolkit.cpp b/mozilla/widget/src/mac/nsToolkit.cpp index 8501448b8ac..da9d01f865a 100644 --- a/mozilla/widget/src/mac/nsToolkit.cpp +++ b/mozilla/widget/src/mac/nsToolkit.cpp @@ -24,7 +24,7 @@ #include #include "nsIEventQueueService.h" #include "nsIServiceManager.h" -#include "nsXPComCIID.h" + // Class IDs... static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID); diff --git a/mozilla/widget/src/rhapsody/Makefile.in b/mozilla/widget/src/rhapsody/Makefile.in index 4229d1014be..6bc21a15504 100644 --- a/mozilla/widget/src/rhapsody/Makefile.in +++ b/mozilla/widget/src/rhapsody/Makefile.in @@ -33,7 +33,7 @@ REQUIRES=util img xpcom raptor netlib DEFINES += -D_IMPL_NS_WIDGET -EXTRA_DSO_LDOPTS += -L$(DIST)/bin -lxpcom -lraptorbase -lreg $(NSPR_LIBS) +EXTRA_DSO_LDOPTS += -L$(DIST)/bin -lxpcom -lreg $(NSPR_LIBS) CPPSRCS= \ nsObject.cpp \ diff --git a/mozilla/widget/src/xlib/nsAppShell.cpp b/mozilla/widget/src/xlib/nsAppShell.cpp index 03b0111cfe6..37914e68e7b 100644 --- a/mozilla/widget/src/xlib/nsAppShell.cpp +++ b/mozilla/widget/src/xlib/nsAppShell.cpp @@ -22,7 +22,6 @@ #include "nsAppShell.h" #include "nsIWidget.h" #include "nsIEventQueueService.h" -#include "nsXPComCIID.h" #include "nsIServiceManager.h" #include "nsITimer.h" diff --git a/mozilla/widget/tests/scribble/Makefile.in b/mozilla/widget/tests/scribble/Makefile.in index 0dccadccfe4..7887b1ac5f9 100644 --- a/mozilla/widget/tests/scribble/Makefile.in +++ b/mozilla/widget/tests/scribble/Makefile.in @@ -27,7 +27,6 @@ PROGRAM = scribble TOOLKIT_GFX_LIB := -lgfx$(MOZ_TOOLKIT) TOOLKIT_WIDGET_LIB := -lwidget$(MOZ_TOOLKIT) -TOOLKIT_BASE_LIB := -lgmbase$(MOZ_TOOLKIT) # Hardcoding dlopen()'s? This needs to get fixed. # @@ -46,7 +45,6 @@ ifdef MOZ_OJI endif LIBS := \ - -lraptorbase \ -lpref \ -lxmltok \ -lexpat \ @@ -56,7 +54,6 @@ LIBS := \ -lgfxps \ -lraptorhtml \ $(DIST)/lib/libraptorhtmlforms_s.a \ - $(TOOLKIT_BASE_LIB) \ -lraptorhtmlpars \ -lraptorview \ -labouturl \ diff --git a/mozilla/widget/tests/scribble/Scribble.cpp b/mozilla/widget/tests/scribble/Scribble.cpp index bd5f23f5a39..78a968b5320 100644 --- a/mozilla/widget/tests/scribble/Scribble.cpp +++ b/mozilla/widget/tests/scribble/Scribble.cpp @@ -22,7 +22,6 @@ #include "nsIServiceManager.h" #include "nsIEventQueueService.h" #include "nsIEventQueue.h" -#include "nsXPComCIID.h" #include "nsIButton.h" #include "nsICheckButton.h" #include "nsILookAndFeel.h" diff --git a/mozilla/widget/tests/scribble/makefile.win b/mozilla/widget/tests/scribble/makefile.win index 2446ef2e1e5..2457f06797b 100644 --- a/mozilla/widget/tests/scribble/makefile.win +++ b/mozilla/widget/tests/scribble/makefile.win @@ -31,9 +31,8 @@ OBJS = \ LINCS=-I$(PUBLIC)\raptor -I$(PUBLIC)\xpcom MYLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\raptorwidget.lib \ $(DIST)\lib\netlib.lib\ diff --git a/mozilla/widget/tests/widget/Makefile.in b/mozilla/widget/tests/widget/Makefile.in index 0dbdf51c479..183014f4098 100644 --- a/mozilla/widget/tests/widget/Makefile.in +++ b/mozilla/widget/tests/widget/Makefile.in @@ -40,7 +40,6 @@ CPPSRCS = \ LIBS := \ -lraptorgfx \ - -lgmbase$(MOZ_TOOLKIT) \ $(TK_LIBS) \ -lgfxps \ -lnetlib \ @@ -62,7 +61,6 @@ LIBS := \ -limg \ $(PNG_LIBS) \ $(JPEG_LIBS) \ - -lraptorbase \ -lxpcom \ -lreg \ -l$(MOZ_LIB_JS_PREFIX)js \ diff --git a/mozilla/widget/tests/widget/makefile.win b/mozilla/widget/tests/widget/makefile.win index d448e5b12c4..73f0694f6aa 100644 --- a/mozilla/widget/tests/widget/makefile.win +++ b/mozilla/widget/tests/widget/makefile.win @@ -30,9 +30,8 @@ LINCS=-I$(PUBLIC)\raptor \ -I$(PUBLIC)\xpcom -I\ns\raptor\ui\src\windows MYLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorwidget.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(NULL) diff --git a/mozilla/widget/tests/widget/nsWidgetTest.cpp b/mozilla/widget/tests/widget/nsWidgetTest.cpp index 2404b77f82c..4780c105827 100644 --- a/mozilla/widget/tests/widget/nsWidgetTest.cpp +++ b/mozilla/widget/tests/widget/nsWidgetTest.cpp @@ -25,7 +25,6 @@ #include "nsIServiceManager.h" #include "nsIEventQueueService.h" #include "nsIEventQueue.h" -#include "nsXPComCIID.h" #include "nsGfxCIID.h" #include "nsWidgetsCID.h" diff --git a/mozilla/xpcom/Makefile.in b/mozilla/xpcom/Makefile.in index 271e625fa79..9d51ee56206 100644 --- a/mozilla/xpcom/Makefile.in +++ b/mozilla/xpcom/Makefile.in @@ -21,10 +21,17 @@ srcdir = @srcdir@ include $(DEPTH)/config/autoconf.mk -# Build xpidl first, so it's available to process idl. -# Explicitly recur into libxpt/xptinfo and libxpt/xptcall, -# as they depend on xpidl and can't be in the DIRS for libxpt. -DIRS = libxpt tools/xpidl public src idl libxpt/xptinfo libxpt/xptcall proxy +DIRS= typelib \ + base \ + ds \ + io \ + components \ + threads \ + reflect \ + proxy \ + build \ + tools \ + $(NULL) ifdef ENABLE_TESTS DIRS += tests diff --git a/mozilla/xpcom/base/MANIFEST b/mozilla/xpcom/base/MANIFEST new file mode 100644 index 00000000000..bdea888b0b6 --- /dev/null +++ b/mozilla/xpcom/base/MANIFEST @@ -0,0 +1,12 @@ +nsAgg.h +nsIAllocator.h +nsCOMPtr.h +nsCom.h +nsDebug.h +nsError.h +nsID.h +nsIID.h +nsIPtr.h +nsISupportsUtils.h +nsTraceRefcnt.h +nscore.h diff --git a/mozilla/xpcom/base/MANIFEST_IDL b/mozilla/xpcom/base/MANIFEST_IDL new file mode 100644 index 00000000000..69f90821bb2 --- /dev/null +++ b/mozilla/xpcom/base/MANIFEST_IDL @@ -0,0 +1,2 @@ +nsISupports.idl +nsrootidl.idl diff --git a/mozilla/xpcom/base/makefile.win b/mozilla/xpcom/base/makefile.win index 0286465bae9..9f5fed2609b 100644 --- a/mozilla/xpcom/base/makefile.win +++ b/mozilla/xpcom/base/makefile.win @@ -38,6 +38,8 @@ EXPORTS = \ nscore.h \ $(NULL) +XPILD_MODULE = xpcom_base + XPIDLSRCS = \ .\nsrootidl.idl \ .\nsISupports.idl \ diff --git a/mozilla/xpcom/base/nsAllocator.cpp b/mozilla/xpcom/base/nsAllocator.cpp index ca4a69f8b92..4a8e0e665b3 100644 --- a/mozilla/xpcom/base/nsAllocator.cpp +++ b/mozilla/xpcom/base/nsAllocator.cpp @@ -24,9 +24,6 @@ #include "nsIServiceManager.h" #include /* for memcpy */ -static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); -static NS_DEFINE_IID(kIAllocatorIID, NS_IALLOCATOR_IID); - nsAllocatorImpl::nsAllocatorImpl(nsISupports* outer) { NS_INIT_AGGREGATED(outer); @@ -44,8 +41,8 @@ nsAllocatorImpl::AggregatedQueryInterface(const nsIID& aIID, void** aInstancePtr if (NULL == aInstancePtr) { return NS_ERROR_NULL_POINTER; } - if (aIID.Equals(kIAllocatorIID) || - aIID.Equals(kISupportsIID)) { + if (aIID.Equals(nsIAllocator::GetIID()) || + aIID.Equals(nsISupports::GetIID())) { *aInstancePtr = (void*) this; AddRef(); return NS_OK; @@ -56,13 +53,13 @@ nsAllocatorImpl::AggregatedQueryInterface(const nsIID& aIID, void** aInstancePtr NS_METHOD nsAllocatorImpl::Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr) { - if (outer && !aIID.Equals(kISupportsIID)) + if (outer && !aIID.Equals(nsISupports::GetIID())) return NS_NOINTERFACE; // XXX right error? nsAllocatorImpl* mm = new nsAllocatorImpl(outer); if (mm == NULL) return NS_ERROR_OUT_OF_MEMORY; mm->AddRef(); - if (aIID.Equals(kISupportsIID)) + if (aIID.Equals(nsISupports::GetIID())) *aInstancePtr = mm->GetInner(); else *aInstancePtr = mm; @@ -102,7 +99,7 @@ nsAllocatorImpl::HeapMinimize(void) } //////////////////////////////////////////////////////////////////////////////// - +#if 0 nsAllocatorFactory::nsAllocatorFactory(void) { NS_INIT_REFCNT(); @@ -128,6 +125,7 @@ nsAllocatorFactory::LockFactory(PRBool aLock) { return NS_OK; // XXX what? } +#endif //////////////////////////////////////////////////////////////////////////////// @@ -175,10 +173,7 @@ nsIAllocator* nsAllocator::mAllocator = NULL; PRBool nsAllocator::FetchAllocator() { - NS_DEFINE_IID(kAllocatorCID, NS_ALLOCATOR_CID); - NS_DEFINE_IID(kIAllocatorIID, NS_IALLOCATOR_IID); - nsServiceManager::GetService(kAllocatorCID, kIAllocatorIID, - (nsISupports **)&mAllocator); + nsAllocatorImpl::Create(NULL, nsIAllocator::GetIID(), (void**)&mAllocator); NS_ASSERTION(mAllocator, "failed to get Allocator!"); return (PRBool) mAllocator; } diff --git a/mozilla/xpcom/base/nsAllocator.h b/mozilla/xpcom/base/nsAllocator.h index 8d0baad2b7c..f4c1522545f 100644 --- a/mozilla/xpcom/base/nsAllocator.h +++ b/mozilla/xpcom/base/nsAllocator.h @@ -73,7 +73,7 @@ public: }; //////////////////////////////////////////////////////////////////////////////// - +#if 0 class nsAllocatorFactory : public nsIFactory { public: NS_IMETHOD CreateInstance(nsISupports *aOuter, @@ -87,6 +87,6 @@ public: NS_DECL_ISUPPORTS }; - +#endif //////////////////////////////////////////////////////////////////////////////// #endif // nsAllocator_h__ diff --git a/mozilla/xpcom/build/Makefile.in b/mozilla/xpcom/build/Makefile.in index 6e08160bfc0..9c0b87eb964 100644 --- a/mozilla/xpcom/build/Makefile.in +++ b/mozilla/xpcom/build/Makefile.in @@ -29,12 +29,10 @@ LIBRARY_NAME = xpcom MODULE = xpcom CPPSRCS = \ - dlldeps.cpp \ nsXPComInit.cpp \ $(NULL) EXPORTS = \ - nsIXPComService.h \ $(NULL) EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS)) @@ -57,7 +55,12 @@ SHARED_LIBRARY_LIBS = \ $(DIST)/lib/libxpcomio_s.a \ $(DIST)/lib/libxpcomcomponents_s.a \ $(DIST)/lib/libxpcomthreads_s.a \ - $(DIST)/lib/libreg.a \ + $(DIST)/lib/libxpcomproxy_s.a \ + $(DIST)/lib/libxptcall.a \ + $(DIST)/lib/libxptinfo.a \ + $(DIST)/lib/libxpt.a \ + $(DIST)/lib/libxptcmd.a \ + $(DIST)/lib/libreg.a \ $(NULL) ifeq ($(OS_ARCH),HP-UX) diff --git a/mozilla/xpcom/build/dlldeps.cpp b/mozilla/xpcom/build/dlldeps.cpp index d25d6f0a7ff..791c3f51b52 100644 --- a/mozilla/xpcom/build/dlldeps.cpp +++ b/mozilla/xpcom/build/dlldeps.cpp @@ -36,6 +36,13 @@ #include "nsEnumeratorUtils.h" #include "nsQuickSort.h" #include "nsString2.h" +#include "nsProxyEventPrivate.h" +#include "xpt_xdr.h" +#include "nsInterfaceInfo.h" +#include "xptcall.h" +#include "nsIFileSpec.h" + +extern void xptc_dummy(); void XXXNeverCalled() { @@ -60,4 +67,15 @@ void XXXNeverCalled() NS_NewIntersectionEnumerator(NULL, NULL, NULL); NS_QuickSort(NULL, 0, 0, NULL, NULL); nsString2(); + nsProxyObject(); + XPT_DoString(NULL, NULL); + XPT_DoHeader(NULL, NULL); + nsInterfaceInfo* info = NULL; + info->GetName(NULL); +#ifdef DEBUG + info->print(NULL); +#endif + XPTC_InvokeByIndex(NULL, 0, 0, NULL); + NS_NewFileSpec(NULL); + xptc_dummy(); } diff --git a/mozilla/xpcom/build/makefile.win b/mozilla/xpcom/build/makefile.win index 04f3d8ffa70..1aceeb4bb3d 100644 --- a/mozilla/xpcom/build/makefile.win +++ b/mozilla/xpcom/build/makefile.win @@ -23,16 +23,23 @@ MODULE = xpcom LIBNAME = .\$(OBJDIR)\xpcom DLL = $(LIBNAME).dll -LINCS = \ - -I$(PUBLIC)\xpcom \ - -I..\base \ - -I..\ds \ - -I..\io \ - -I..\components \ - -I..\threads \ +LINCS = \ + -I$(PUBLIC)\xpcom \ + -I..\base \ + -I..\ds \ + -I..\io \ + -I..\components \ + -I..\threads \ + -I..\reflect\xptinfo\src \ + -I..\proxy\src \ $(NULL) -LCFLAGS = -D_IMPL_NS_COM -D_IMPL_NS_BASE -DWIN32_LEAN_AND_MEAN +LCFLAGS=-D_IMPL_NS_COM \ + -D_IMPL_NS_BASE \ + -DWIN32_LEAN_AND_MEAN \ + -DEXPORT_XPT_API \ + -DEXPORT_XPTC_API \ + -DEXPORT_XPTI_API CPP_OBJS = \ .\$(OBJDIR)\nsXPComInit.obj \ @@ -47,6 +54,11 @@ LLIBS = \ $(DIST)\lib\xpcomio_s.lib \ $(DIST)\lib\xpcomcomp_s.lib \ $(DIST)\lib\xpcomthreads_s.lib \ + $(DIST)\lib\xpcomxpt_s.lib \ + $(DIST)\lib\xpcomxptcall_s.lib \ + $(DIST)\lib\xpcomxptcmd_s.lib \ + $(DIST)\lib\xpcomxptinfo_s.lib \ + $(DIST)\lib\xpcomproxy_s.lib \ $(DIST)\lib\libreg32.lib \ shell32.lib \ !if "$(MOZ_BITS)"=="32" && defined(MOZ_DEBUG) && defined(GLOWCODE) diff --git a/mozilla/xpcom/components/MANIFEST b/mozilla/xpcom/components/MANIFEST new file mode 100644 index 00000000000..7320b115b61 --- /dev/null +++ b/mozilla/xpcom/components/MANIFEST @@ -0,0 +1,8 @@ +nsIComponentManager.h +nsIFactory.h +nsIGenericFactory.h +nsIRegistry.h +nsIServiceManager.h +nsIServiceProvider.h +nsRepository.h +nsXPComFactory.h diff --git a/mozilla/xpcom/components/nsComponentManager.cpp b/mozilla/xpcom/components/nsComponentManager.cpp index 7c55610d778..9da39341e02 100644 --- a/mozilla/xpcom/components/nsComponentManager.cpp +++ b/mozilla/xpcom/components/nsComponentManager.cpp @@ -703,7 +703,7 @@ nsComponentManagerImpl::PlatformFind(const nsCID &aCID, nsFactoryEntry* *result) // // HashProgID // -nsresult +nsresult nsComponentManagerImpl::HashProgID(const char *aProgID, const nsCID &aClass) { if(!aProgID) @@ -1817,21 +1817,22 @@ nsComponentManagerImpl::SelfRegisterDll(nsDll *dll) if (dll->Load() == PR_FALSE) { +#ifdef NS_DEBUG // Cannot load. Probably not a dll. char errorMsg[1024] = "Cannot get error from nspr. Not enough memory."; if (PR_GetErrorTextLength() < (int) sizeof(errorMsg)) PR_GetErrorText(errorMsg); -#ifdef NS_DEBUG + PR_LOG(nsComponentManagerLog, PR_LOG_ALWAYS, ("nsComponentManager: SelfRegisterDll(%s) Load FAILED with error:%s", dll->GetFullPath(), errorMsg)); -#endif /* NS_DEBUG */ + // Put the error message on the screen. // For now this message is also for optimized builds. Hence no ifdef DEBUG printf("**************************************************\n" "nsComponentManager: Load(%s) FAILED with error: %s\n" "**************************************************\n", dll->GetFullPath(), errorMsg); - +#endif /* NS_DEBUG */ return(NS_ERROR_FAILURE); } diff --git a/mozilla/xpcom/components/nsComponentManager.h b/mozilla/xpcom/components/nsComponentManager.h index 4b64c548433..1079f33b720 100644 --- a/mozilla/xpcom/components/nsComponentManager.h +++ b/mozilla/xpcom/components/nsComponentManager.h @@ -202,8 +202,9 @@ protected: * alpha0.30 : Changing autoreg to begin registration from ./components on unix * alpha0.40 : repository -> component manager * alpha0.50 : using nsIRegistry + * alpha0.60 : xpcom 2.0 landing */ -#define NS_XPCOM_COMPONENT_MANAGER_VERSION_STRING "alpha0.50" +#define NS_XPCOM_COMPONENT_MANAGER_VERSION_STRING "alpha0.60" //////////////////////////////////////////////////////////////////////////////// /** diff --git a/mozilla/xpcom/components/nsGenericFactory.cpp b/mozilla/xpcom/components/nsGenericFactory.cpp index b0c57df49e2..98d4cb121bc 100644 --- a/mozilla/xpcom/components/nsGenericFactory.cpp +++ b/mozilla/xpcom/components/nsGenericFactory.cpp @@ -35,11 +35,11 @@ NS_METHOD nsGenericFactory::QueryInterface(const nsIID& aIID, void** aInstancePt if (NULL == aInstancePtr) { return NS_ERROR_NULL_POINTER; } - if (aIID.Equals(nsIFactory::GetIID()) || - aIID.Equals(nsIGenericFactory::GetIID()) || - aIID.Equals(nsISupports::GetIID())) { - *aInstancePtr = (void*) this; - AddRef(); + if (aIID.Equals(nsIGenericFactory::GetIID()) || + aIID.Equals(nsIFactory::GetIID()) || + aIID.Equals(nsISupports::GetIID())) { + *aInstancePtr = (nsIGenericFactory*) this; + NS_ADDREF_THIS(); return NS_OK; } return NS_NOINTERFACE; @@ -86,3 +86,25 @@ NS_METHOD nsGenericFactory::Create(nsISupports* outer, const nsIID& aIID, void* } return res; } + +extern nsresult +NS_NewGenericFactory(nsIGenericFactory* *result, + nsIGenericFactory::ConstructorProcPtr constructor, + nsIGenericFactory::DestructorProcPtr destructor) +{ + nsresult rv; + nsIGenericFactory* fact; + rv = nsGenericFactory::Create(NULL, nsIGenericFactory::GetIID(), (void**)&fact); + if (NS_FAILED(rv)) return rv; + rv = fact->SetConstructor(constructor); + if (NS_FAILED(rv)) goto error; + rv = fact->SetDestructor(destructor); + if (NS_FAILED(rv)) goto error; + *result = fact; + return rv; + + error: + NS_RELEASE(fact); + return rv; +} + diff --git a/mozilla/xpcom/components/nsIGenericFactory.h b/mozilla/xpcom/components/nsIGenericFactory.h index 400d03296d6..1744406d18f 100644 --- a/mozilla/xpcom/components/nsIGenericFactory.h +++ b/mozilla/xpcom/components/nsIGenericFactory.h @@ -54,4 +54,40 @@ public: NS_IMETHOD SetDestructor(DestructorProcPtr destructor) = 0; }; +extern nsresult +NS_NewGenericFactory(nsIGenericFactory* *result, + nsIGenericFactory::ConstructorProcPtr constructor, + nsIGenericFactory::DestructorProcPtr destructor = NULL); + +#define NS_GENERIC_FACTORY_CONSTRUCTOR(_InstanceClass) \ +static nsresult \ +_InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, void **aResult) \ +{ \ + nsresult rv; \ + \ + _InstanceClass * inst; \ + \ + if (NULL == aResult) { \ + rv = NS_ERROR_NULL_POINTER; \ + goto done; \ + } \ + *aResult = NULL; \ + if (NULL != aOuter) { \ + rv = NS_ERROR_NO_AGGREGATION; \ + goto done; \ + } \ + \ + NS_NEWXPCOM(inst, _InstanceClass); \ + if (NULL == inst) { \ + rv = NS_ERROR_OUT_OF_MEMORY; \ + goto done; \ + } \ + NS_ADDREF(inst); \ + rv = inst->QueryInterface(aIID, aResult); \ + NS_RELEASE(inst); \ + \ + done: \ + return rv; \ +} + #endif /* nsIGenericFactory_h___ */ diff --git a/mozilla/xpcom/components/nsIRegistry.h b/mozilla/xpcom/components/nsIRegistry.h index 29703db65ec..36839175d5c 100644 --- a/mozilla/xpcom/components/nsIRegistry.h +++ b/mozilla/xpcom/components/nsIRegistry.h @@ -30,6 +30,11 @@ // {5316C380-B2F8-11d2-A374-0080C6F80E4B} #define NS_IREGISTRYVALUE_IID { 0x5316c380, 0xb2f8, 0x11d2, { 0xa3, 0x74, 0x0, 0x80, 0xc6, 0xf8, 0xe, 0x4b } } +/* be761f00-a3b0-11d2-996c-0080c7cb1081 */ +#define NS_REGISTRY_CID \ +{ 0xbe761f00, 0xa3b0, 0x11d2, \ + {0x99, 0x6c, 0x00, 0x80, 0xc7, 0xcb, 0x10, 0x81} } + class nsIEnumerator; diff --git a/mozilla/xpcom/components/nsServiceManager.cpp b/mozilla/xpcom/components/nsServiceManager.cpp index 521608db547..2f6d7751f71 100644 --- a/mozilla/xpcom/components/nsServiceManager.cpp +++ b/mozilla/xpcom/components/nsServiceManager.cpp @@ -516,98 +516,3 @@ nsServiceManager::UnregisterService(const char* aProgID) } //////////////////////////////////////////////////////////////////////////////// - -// XPCOM initialization -// -// To Control the order of initialization of these key components I am putting -// this function. -// -// - nsServiceManager -// - nsComponentManager -// - nsRegistry -// -// Here are key points to remember: -// - A global of all these need to exist. nsServiceManager is an independent object. -// nsComponentManager uses both the globalServiceManager and its own registry. -// -// - A static object of both the nsComponentManager and nsServiceManager -// are in use. Hence InitXPCOM() gets triggered from both -// NS_GetGlobale{Service/Component}Manager() calls. -// -// - There exists no global Registry. Registry can be created from the component manager. -// - -#include "nsComponentManager.h" -#include "nsIRegistry.h" -#include "nsXPComCIID.h" -#include "nsAllocator.h" - -extern "C" NS_EXPORT nsresult -NS_RegistryGetFactory(nsISupports* servMgr, nsIFactory** aFactory); - -nsIServiceManager* nsServiceManager::mGlobalServiceManager = NULL; -nsComponentManagerImpl* nsComponentManagerImpl::gComponentManager = NULL; - -nsresult NS_InitXPCOM(nsIServiceManager* *result) -{ - nsresult rv = NS_OK; - - // 1. Create the Global Service Manager - nsIServiceManager* servMgr = NULL; - if (nsServiceManager::mGlobalServiceManager == NULL) - { - rv = NS_NewServiceManager(&servMgr); - if (NS_FAILED(rv)) return rv; - nsServiceManager::mGlobalServiceManager = servMgr; - NS_ADDREF(servMgr); - if (result) *result = servMgr; - } - - // 2. Create the Component Manager and register with global service manager - // It is understood that the component manager can use the global service manager. - nsComponentManagerImpl *compMgr = NULL; - if (nsComponentManagerImpl::gComponentManager == NULL) - { - compMgr = new nsComponentManagerImpl(); - if (compMgr == NULL) - return NS_ERROR_OUT_OF_MEMORY; - NS_ADDREF(compMgr); - nsresult rv = compMgr->Init(); - if (NS_FAILED(rv)) - { - NS_RELEASE(compMgr); - return rv; - } - nsComponentManagerImpl::gComponentManager = compMgr; - } - - rv = servMgr->RegisterService(kComponentManagerCID, compMgr); - if (NS_FAILED(rv)) return rv; - - // 3. Register the RegistryFactory with the component manager so that - // clients can create new registry objects. - nsIFactory *registryFactory = NULL; - rv = NS_RegistryGetFactory(servMgr, ®istryFactory); - if (NS_FAILED(rv)) return rv; - - NS_DEFINE_CID(kRegistryCID, NS_REGISTRY_CID); - - rv = compMgr->RegisterFactory(kRegistryCID, NS_REGISTRY_CLASSNAME, - NS_REGISTRY_PROGID, registryFactory, - PR_TRUE); - NS_RELEASE(registryFactory); - if (NS_FAILED(rv)) return rv; - - // Register nsAllocator - nsAllocatorFactory* alloc = new nsAllocatorFactory(); - if (alloc == NULL) - return NS_ERROR_OUT_OF_MEMORY; - NS_ADDREF(alloc); - static NS_DEFINE_CID(kAllocatorCID, NS_ALLOCATOR_CID); - rv = compMgr->RegisterFactory(kAllocatorCID, "Malloc/Free Allocator", - NULL, alloc, PR_TRUE); - NS_RELEASE(alloc); - if (NS_FAILED(rv)) return rv; - - return rv; -} diff --git a/mozilla/xpcom/ds/MANIFEST b/mozilla/xpcom/ds/MANIFEST new file mode 100644 index 00000000000..19d7ace1828 --- /dev/null +++ b/mozilla/xpcom/ds/MANIFEST @@ -0,0 +1,32 @@ +nsBTree.h +nsCRT.h +nsDeque.h +nsEnumeratorUtils.h +nsHashtable.h +nsIArena.h +nsIAtom.h +nsIBuffer.h +nsIByteBuffer.h +nsIObserver.h +nsIObserverList.h +nsIObserverService.h +nsIPageManager.h +nsIProperties.h +nsISimpleEnumerator.h +nsISizeOfHandler.h +nsIString.h +nsISupportsArray.h +nsIUnicharBuffer.h +nsIVariant.h +nsInt64.h +nsQuickSort.h +nsRBTree.h +nsStr.h +nsString.h +nsString2.h +nsTime.h +nsUnitConversion.h +nsVector.h +nsVoidArray.h +nsXPIDLString.h +plvector.h diff --git a/mozilla/xpcom/ds/MANIFEST_IDL b/mozilla/xpcom/ds/MANIFEST_IDL new file mode 100644 index 00000000000..3587cf53771 --- /dev/null +++ b/mozilla/xpcom/ds/MANIFEST_IDL @@ -0,0 +1,2 @@ +nsICollection.idl +nsIEnumerator.idl diff --git a/mozilla/xpcom/ds/Makefile.in b/mozilla/xpcom/ds/Makefile.in index bc19277e43c..81a92e2cb2b 100644 --- a/mozilla/xpcom/ds/Makefile.in +++ b/mozilla/xpcom/ds/Makefile.in @@ -51,7 +51,6 @@ CPPSRCS = \ nsObserverList.cpp \ nsObserverService.cpp \ nsPageMgr.cpp \ - nsPipe.cpp \ nsProperties.cpp \ nsQuickSort.cpp \ nsRBTree.cpp \ diff --git a/mozilla/xpcom/ds/makefile.win b/mozilla/xpcom/ds/makefile.win index 8091e558dab..9380664ee0f 100644 --- a/mozilla/xpcom/ds/makefile.win +++ b/mozilla/xpcom/ds/makefile.win @@ -58,6 +58,8 @@ EXPORTS = \ plvector.h \ $(NULL) +XPILD_MODULE = xpcom_ds + XPIDLSRCS = \ .\nsICollection.idl \ .\nsIEnumerator.idl \ @@ -92,7 +94,6 @@ CPP_OBJS = \ .\$(OBJDIR)\nsObserverList.obj \ .\$(OBJDIR)\nsObserverService.obj \ .\$(OBJDIR)\nsPageMgr.obj \ - .\$(OBJDIR)\nsPipe.obj \ .\$(OBJDIR)\nsProperties.obj \ .\$(OBJDIR)\nsQuickSort.obj \ .\$(OBJDIR)\nsRBTree.obj \ diff --git a/mozilla/xpcom/ds/nsArena.cpp b/mozilla/xpcom/ds/nsArena.cpp index d0ed8804bfa..e1b3c6a0fca 100644 --- a/mozilla/xpcom/ds/nsArena.cpp +++ b/mozilla/xpcom/ds/nsArena.cpp @@ -15,51 +15,33 @@ * Copyright (C) 1998 Netscape Communications Corporation. All Rights * Reserved. */ -#include "nsIArena.h" + +#include "nsArena.h" #include "nsCRT.h" -#define PL_ARENA_CONST_ALIGN_MASK 7 -#include "plarena.h" - -static NS_DEFINE_IID(kArenaIID, NS_IARENA_IID); - -// Simple arena implementation layered on plarena -class ArenaImpl : public nsIArena { -public: - ArenaImpl(PRInt32 aBlockSize); - - NS_DECL_ISUPPORTS - - virtual void* Alloc(PRInt32 aSize); - -protected: - virtual ~ArenaImpl(); - - PLArenaPool mPool; - PRInt32 mBlockSize; -}; - -ArenaImpl::ArenaImpl(PRInt32 aBlockSize) +NS_IMETHODIMP +ArenaImpl::Init(PRUint32 aBlockSize) { - NS_INIT_REFCNT(); if (aBlockSize < NS_MIN_ARENA_BLOCK_SIZE) { aBlockSize = NS_DEFAULT_ARENA_BLOCK_SIZE; } PL_INIT_ARENA_POOL(&mPool, "nsIArena", aBlockSize); mBlockSize = aBlockSize; + return NS_OK; } -NS_IMPL_ISUPPORTS(ArenaImpl,kArenaIID) +NS_IMPL_ISUPPORTS(ArenaImpl, nsIArena::GetIID()) ArenaImpl::~ArenaImpl() { PL_FinishArenaPool(&mPool); } -void* ArenaImpl::Alloc(PRInt32 size) +NS_IMETHODIMP_(void*) +ArenaImpl::Alloc(PRUint32 size) { // Adjust size so that it's a multiple of sizeof(double) - PRInt32 align = size & (sizeof(double) - 1); + PRUint32 align = size & (sizeof(double) - 1); if (0 != align) { size += sizeof(double) - align; } @@ -69,12 +51,36 @@ void* ArenaImpl::Alloc(PRInt32 size) return p; } -NS_BASE nsresult NS_NewHeapArena(nsIArena** aInstancePtrResult, - PRInt32 aArenaBlockSize) +NS_METHOD +ArenaImpl::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) { - ArenaImpl* it = new ArenaImpl(aArenaBlockSize); - if (nsnull == it) { + if (aOuter) + return NS_ERROR_NO_AGGREGATION; + + ArenaImpl* it = new ArenaImpl(); + if (nsnull == it) return NS_ERROR_OUT_OF_MEMORY; - } - return it->QueryInterface(kArenaIID, (void **) aInstancePtrResult); + + NS_ADDREF(it); + nsresult rv = it->QueryInterface(aIID, aResult); + NS_RELEASE(it); + return rv; +} + +NS_COM nsresult NS_NewHeapArena(nsIArena** aInstancePtrResult, + PRUint32 aArenaBlockSize) +{ + nsresult rv; + nsIArena* arena; + rv = ArenaImpl::Create(NULL, nsIArena::GetIID(), (void**)&arena); + if (NS_FAILED(rv)) return rv; + + rv = arena->Init(aArenaBlockSize); + if (NS_FAILED(rv)) { + NS_RELEASE(arena); + return rv; + } + + *aInstancePtrResult = arena; + return rv; } diff --git a/mozilla/xpcom/ds/nsAtomTable.cpp b/mozilla/xpcom/ds/nsAtomTable.cpp index fda308213fd..6010c16f2c7 100644 --- a/mozilla/xpcom/ds/nsAtomTable.cpp +++ b/mozilla/xpcom/ds/nsAtomTable.cpp @@ -15,7 +15,8 @@ * Copyright (C) 1998 Netscape Communications Corporation. All Rights * Reserved. */ -#include "nsIAtom.h" + +#include "nsAtomTable.h" #include "nsString.h" #include "nsCRT.h" #include "plhash.h" @@ -27,30 +28,6 @@ static nsrefcnt gAtoms; static struct PLHashTable* gAtomHashTable; -class AtomImpl : public nsIAtom { -public: - AtomImpl(); - virtual ~AtomImpl(); - - NS_DECL_ISUPPORTS - - void* operator new(size_t size, const PRUnichar* us, PRInt32 uslen); - - void operator delete(void* ptr) { - ::operator delete(ptr); - } - - virtual void ToString(nsString& aBuf) const; - - virtual const PRUnichar* GetUnicode() const; - - NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler) const; - - // Actually more; 0 terminated. This slot is reserved for the - // terminating zero. - PRUnichar mString[1]; -}; - AtomImpl::AtomImpl() { NS_INIT_REFCNT(); @@ -115,18 +92,18 @@ static PRIntn CompareKeys(const PRUnichar* k1, const PRUnichar* k2) return nsCRT::strcmp(k1, k2) == 0; } -NS_BASE nsIAtom* NS_NewAtom(const char* isolatin1) +NS_COM nsIAtom* NS_NewAtom(const char* isolatin1) { nsAutoString tmp(isolatin1); return NS_NewAtom(tmp.GetUnicode()); } -NS_BASE nsIAtom* NS_NewAtom(const nsString& aString) +NS_COM nsIAtom* NS_NewAtom(const nsString& aString) { return NS_NewAtom(aString.GetUnicode()); } -NS_BASE nsIAtom* NS_NewAtom(const PRUnichar* us) +NS_COM nsIAtom* NS_NewAtom(const PRUnichar* us) { if (nsnull == gAtomHashTable) { gAtomHashTable = PL_NewHashTable(8, (PLHashFunction) HashKey, @@ -149,7 +126,7 @@ NS_BASE nsIAtom* NS_NewAtom(const PRUnichar* us) return id; } -NS_BASE nsrefcnt NS_GetNumberOfAtoms(void) +NS_COM nsrefcnt NS_GetNumberOfAtoms(void) { if (nsnull != gAtomHashTable) { NS_PRECONDITION(nsrefcnt(gAtomHashTable->nentries) == gAtoms, "bad atom table"); diff --git a/mozilla/xpcom/ds/nsBTree.h b/mozilla/xpcom/ds/nsBTree.h index 88b465bb01c..6c5323224f4 100644 --- a/mozilla/xpcom/ds/nsBTree.h +++ b/mozilla/xpcom/ds/nsBTree.h @@ -42,7 +42,7 @@ #include "nscore.h" -struct NS_BASE nsNode { +struct NS_COM nsNode { /** * @@ -135,7 +135,7 @@ struct NS_BASE nsNode { * * @update gess4/20/98 */ -class NS_BASE nsNodeFunctor { +class NS_COM nsNodeFunctor { public: virtual nsNodeFunctor& operator()(nsNode& aNode)=0; }; @@ -145,7 +145,7 @@ public: * Here comes the nsBTree class... ****************************************************/ -class NS_BASE nsBTree { +class NS_COM nsBTree { public: friend class nsBTreeIterator; diff --git a/mozilla/xpcom/ds/nsBuffer.cpp b/mozilla/xpcom/ds/nsBuffer.cpp index 9ef38d5d4d9..23e6e5d89c8 100644 --- a/mozilla/xpcom/ds/nsBuffer.cpp +++ b/mozilla/xpcom/ds/nsBuffer.cpp @@ -58,6 +58,22 @@ nsBuffer::~nsBuffer() NS_IMPL_ISUPPORTS(nsBuffer, nsIBuffer::GetIID()); +NS_METHOD +nsBuffer::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) +{ + if (aOuter) + return NS_ERROR_NO_AGGREGATION; + + nsBuffer* buf = new nsBuffer(); + if (buf == nsnull) + return NS_ERROR_OUT_OF_MEMORY; + + NS_ADDREF(buf); + nsresult rv = buf->QueryInterface(aIID, aResult); + NS_RELEASE(buf); + return rv; +} + //////////////////////////////////////////////////////////////////////////////// nsresult @@ -316,7 +332,7 @@ nsBuffer::SetEOF() static NS_DEFINE_CID(kAllocatorCID, NS_ALLOCATOR_CID); -NS_BASE nsresult +NS_COM nsresult NS_NewBuffer(nsIBuffer* *result, PRUint32 growBySize, PRUint32 maxSize) { @@ -324,24 +340,23 @@ NS_NewBuffer(nsIBuffer* *result, NS_WITH_SERVICE(nsIAllocator, alloc, kAllocatorCID, &rv); if (NS_FAILED(rv)) return rv; - nsBuffer* buf = new nsBuffer(); - if (buf == nsnull) - return NS_ERROR_OUT_OF_MEMORY; + nsBuffer* buf; + rv = nsBuffer::Create(NULL, nsIBuffer::GetIID(), (void**)&buf); + if (NS_FAILED(rv)) return rv; rv = buf->Init(growBySize, maxSize, alloc); if (NS_FAILED(rv)) { - delete buf; + NS_RELEASE(buf); return rv; } - NS_ADDREF(buf); *result = buf; return NS_OK; } static NS_DEFINE_CID(kPageManagerCID, NS_PAGEMANAGER_CID); -NS_BASE nsresult +NS_COM nsresult NS_NewPageBuffer(nsIBuffer* *result, PRUint32 growBySize, PRUint32 maxSize) { @@ -349,17 +364,16 @@ NS_NewPageBuffer(nsIBuffer* *result, NS_WITH_SERVICE(nsIAllocator, alloc, kPageManagerCID, &rv); if (NS_FAILED(rv)) return rv; - nsBuffer* buf = new nsBuffer(); - if (buf == nsnull) - return NS_ERROR_OUT_OF_MEMORY; + nsBuffer* buf; + rv = nsBuffer::Create(NULL, nsIBuffer::GetIID(), (void**)&buf); + if (NS_FAILED(rv)) return rv; rv = buf->Init(growBySize, maxSize, alloc); if (NS_FAILED(rv)) { - delete buf; + NS_RELEASE(buf); return rv; } - NS_ADDREF(buf); *result = buf; return NS_OK; } diff --git a/mozilla/xpcom/ds/nsBuffer.h b/mozilla/xpcom/ds/nsBuffer.h index 128a3c1b64c..094e6ef88a1 100644 --- a/mozilla/xpcom/ds/nsBuffer.h +++ b/mozilla/xpcom/ds/nsBuffer.h @@ -28,6 +28,9 @@ class nsBuffer : public nsIBuffer { public: NS_DECL_ISUPPORTS + static NS_METHOD + Create(nsISupports *aOuter, REFNSIID aIID, void **aResult); + // nsIBuffer methods: NS_IMETHOD Init(PRUint32 growBySize, PRUint32 maxSize, nsIAllocator* allocator); diff --git a/mozilla/xpcom/ds/nsByteBuffer.cpp b/mozilla/xpcom/ds/nsByteBuffer.cpp index ed3bbc37b75..de9b26e6130 100644 --- a/mozilla/xpcom/ds/nsByteBuffer.cpp +++ b/mozilla/xpcom/ds/nsByteBuffer.cpp @@ -15,39 +15,29 @@ * Copyright (C) 1998 Netscape Communications Corporation. All Rights * Reserved. */ -#include "nsIByteBuffer.h" + +#include "nsByteBuffer.h" #include "nsIInputStream.h" #include "nsCRT.h" #define MIN_BUFFER_SIZE 32 -class ByteBufferImpl : public nsIByteBuffer { -public: - ByteBufferImpl(PRUint32 aBufferSize); - virtual ~ByteBufferImpl(); +ByteBufferImpl::ByteBufferImpl(void) + : mBuffer(NULL), mSpace(0), mLength(0) +{ + NS_INIT_REFCNT(); +} - NS_DECL_ISUPPORTS - NS_IMETHOD_(PRUint32) GetLength(void) const; - NS_IMETHOD_(PRUint32) GetBufferSize(void) const; - NS_IMETHOD_(char*) GetBuffer() const; - NS_IMETHOD_(PRBool) Grow(PRUint32 aNewSize); - NS_IMETHOD_(PRInt32) Fill(nsresult* aErrorCode, nsIInputStream* aStream, - PRUint32 aKeep); - - char* mBuffer; - PRUint32 mSpace; - PRUint32 mLength; -}; - -ByteBufferImpl::ByteBufferImpl(PRUint32 aBufferSize) +NS_IMETHODIMP +ByteBufferImpl::Init(PRUint32 aBufferSize) { if (aBufferSize < MIN_BUFFER_SIZE) { aBufferSize = MIN_BUFFER_SIZE; } mSpace = aBufferSize; - mBuffer = new char[aBufferSize]; mLength = 0; - NS_INIT_REFCNT(); + mBuffer = new char[aBufferSize]; + return mBuffer ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } NS_DEFINE_IID(kByteBufferIID,NS_IBYTE_BUFFER_IID); @@ -62,6 +52,22 @@ ByteBufferImpl::~ByteBufferImpl() mLength = 0; } +NS_METHOD +ByteBufferImpl::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) +{ + if (aOuter) + return NS_ERROR_NO_AGGREGATION; + + ByteBufferImpl* it = new ByteBufferImpl(); + if (nsnull == it) + return NS_ERROR_OUT_OF_MEMORY; + + NS_ADDREF(it); + nsresult rv = it->QueryInterface(aIID, (void**)aResult); + NS_RELEASE(it); + return rv; +} + NS_IMETHODIMP_(PRUint32) ByteBufferImpl::GetLength(void) const { @@ -127,16 +133,20 @@ ByteBufferImpl::Fill(nsresult* aErrorCode, nsIInputStream* aStream, return nb; } -NS_BASE nsresult NS_NewByteBuffer(nsIByteBuffer** aInstancePtrResult, +NS_COM nsresult NS_NewByteBuffer(nsIByteBuffer** aInstancePtrResult, nsISupports* aOuter, PRUint32 aBufferSize) { - if (nsnull != aOuter) { - return NS_ERROR_NO_AGGREGATION; + nsresult rv; + nsIByteBuffer* buf; + rv = ByteBufferImpl::Create(aOuter, nsIByteBuffer::GetIID(), (void**)&buf); + if (NS_FAILED(rv)) return rv; + + rv = buf->Init(aBufferSize); + if (NS_FAILED(rv)) { + NS_RELEASE(buf); + return rv; } - ByteBufferImpl* it = new ByteBufferImpl(aBufferSize); - if (nsnull == it) { - return NS_ERROR_OUT_OF_MEMORY; - } - return it->QueryInterface(kByteBufferIID, (void **) aInstancePtrResult); + *aInstancePtrResult = buf; + return rv; } diff --git a/mozilla/xpcom/ds/nsCRT.h b/mozilla/xpcom/ds/nsCRT.h index cb9eeb4b065..89e2c1fef54 100644 --- a/mozilla/xpcom/ds/nsCRT.h +++ b/mozilla/xpcom/ds/nsCRT.h @@ -69,7 +69,7 @@ extern const PRUnichar kIsoLatin1ToUCS2[256]; /// This is a wrapper class around all the C runtime functions. -class NS_BASE nsCRT { +class NS_COM nsCRT { public: /** Copy bytes from aSrc to aDest. diff --git a/mozilla/xpcom/ds/nsDeque.h b/mozilla/xpcom/ds/nsDeque.h index ce80b4ca1d6..e2ce8f8c5ee 100644 --- a/mozilla/xpcom/ds/nsDeque.h +++ b/mozilla/xpcom/ds/nsDeque.h @@ -48,7 +48,7 @@ * * @update gess4/20/98 */ -class NS_BASE nsDequeFunctor{ +class NS_COM nsDequeFunctor{ public: virtual void* operator()(void* anObject)=0; }; @@ -68,7 +68,7 @@ public: * @update gess4/20/98 */ -class NS_BASE nsDeque { +class NS_COM nsDeque { friend class nsDequeIterator; public: nsDeque(nsDequeFunctor* aDeallocator); @@ -260,7 +260,7 @@ private: * Here comes the nsDequeIterator class... ******************************************************/ -class NS_BASE nsDequeIterator { +class NS_COM nsDequeIterator { public: /** diff --git a/mozilla/xpcom/ds/nsIArena.h b/mozilla/xpcom/ds/nsIArena.h index 40f123eade4..ee60163730f 100644 --- a/mozilla/xpcom/ds/nsIArena.h +++ b/mozilla/xpcom/ds/nsIArena.h @@ -39,7 +39,9 @@ class nsIArena : public nsISupports { public: static const nsIID& GetIID() { static nsIID iid = NS_IARENA_IID; return iid; } - virtual void* Alloc(PRInt32 size) = 0; + NS_IMETHOD Init(PRUint32 arenaBlockSize) = 0; + + NS_IMETHOD_(void*) Alloc(PRUint32 size) = 0; }; /** @@ -47,7 +49,17 @@ public: * underlying memory blocks. The underlying memory blocks are allocated * using the PR heap. */ -extern NS_BASE nsresult NS_NewHeapArena(nsIArena** aInstancePtrResult, - PRInt32 aArenaBlockSize = 0); +extern NS_COM nsresult NS_NewHeapArena(nsIArena** aInstancePtrResult, + PRUint32 aArenaBlockSize = 0); + +#define NS_ARENA_CID \ +{ /* 9832ec80-0d6b-11d3-9331-00104ba0fd40 */ \ + 0x9832ec80, \ + 0x0d6b, \ + 0x11d3, \ + {0x93, 0x31, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \ +} #endif /* nsIArena_h___ */ + + diff --git a/mozilla/xpcom/ds/nsIAtom.h b/mozilla/xpcom/ds/nsIAtom.h index f3fc836ef30..69ffdbb6d96 100644 --- a/mozilla/xpcom/ds/nsIAtom.h +++ b/mozilla/xpcom/ds/nsIAtom.h @@ -57,23 +57,23 @@ public: * Find an atom that matches the given iso-latin1 C string. The * C string is translated into it's unicode equivalent. */ -extern NS_BASE nsIAtom* NS_NewAtom(const char* isolatin1); +extern NS_COM nsIAtom* NS_NewAtom(const char* isolatin1); /** * Find an atom that matches the given unicode string. The string is assumed * to be zero terminated. */ -extern NS_BASE nsIAtom* NS_NewAtom(const PRUnichar* unicode); +extern NS_COM nsIAtom* NS_NewAtom(const PRUnichar* unicode); /** * Find an atom that matches the given string. */ -extern NS_BASE nsIAtom* NS_NewAtom(const nsString& aString); +extern NS_COM nsIAtom* NS_NewAtom(const nsString& aString); /** * Return a count of the total number of atoms currently * alive in the system. */ -extern NS_BASE nsrefcnt NS_GetNumberOfAtoms(void); +extern NS_COM nsrefcnt NS_GetNumberOfAtoms(void); #endif /* nsIAtom_h___ */ diff --git a/mozilla/xpcom/ds/nsIBuffer.h b/mozilla/xpcom/ds/nsIBuffer.h index 9bb2d4d83a6..f8e1532dbd9 100644 --- a/mozilla/xpcom/ds/nsIBuffer.h +++ b/mozilla/xpcom/ds/nsIBuffer.h @@ -59,23 +59,23 @@ public: NS_IMETHOD SetEOF() = 0; }; -extern NS_BASE nsresult +extern NS_COM nsresult NS_NewBuffer(nsIBuffer* *result, PRUint32 growBySize, PRUint32 maxSize); -extern NS_BASE nsresult +extern NS_COM nsresult NS_NewPageBuffer(nsIBuffer* *result, PRUint32 growBySize, PRUint32 maxSize); -extern NS_BASE nsresult +extern NS_COM nsresult NS_NewBufferInputStream(nsIInputStream* *result, nsIBuffer* buffer, PRBool blocking = PR_FALSE); -extern NS_BASE nsresult +extern NS_COM nsresult NS_NewBufferOutputStream(nsIOutputStream* *result, nsIBuffer* buffer, PRBool blocking = PR_FALSE); -extern NS_BASE nsresult +extern NS_COM nsresult NS_NewPipe2(nsIInputStream* *inStrResult, nsIOutputStream* *outStrResult, PRUint32 growBySize, PRUint32 maxSize); diff --git a/mozilla/xpcom/ds/nsIByteBuffer.h b/mozilla/xpcom/ds/nsIByteBuffer.h index 3dd8f8829de..4f186593768 100644 --- a/mozilla/xpcom/ds/nsIByteBuffer.h +++ b/mozilla/xpcom/ds/nsIByteBuffer.h @@ -31,6 +31,8 @@ class nsIInputStream; /** Interface to a buffer that holds bytes */ class nsIByteBuffer : public nsISupports { public: + NS_IMETHOD Init(PRUint32 aBufferSize) = 0; + /** @return length of buffer, i.e. how many bytes are currently in it. */ NS_IMETHOD_(PRUint32) GetLength(void) const = 0; @@ -49,8 +51,16 @@ public: PRUint32 aKeep) = 0; }; +#define NS_BYTEBUFFER_CID \ +{ /* a49d5280-0d6b-11d3-9331-00104ba0fd40 */ \ + 0xa49d5280, \ + 0x0d6b, \ + 0x11d3, \ + {0x93, 0x31, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \ +} + /** Create a new byte buffer using the given buffer size. */ -extern NS_BASE nsresult +extern NS_COM nsresult NS_NewByteBuffer(nsIByteBuffer** aInstancePtrResult, nsISupports* aOuter, PRUint32 aBufferSize = 0); diff --git a/mozilla/xpcom/ds/nsIEnumerator.h b/mozilla/xpcom/ds/nsIEnumerator.h index 45789ffd9e9..4bdf0ac561c 100644 --- a/mozilla/xpcom/ds/nsIEnumerator.h +++ b/mozilla/xpcom/ds/nsIEnumerator.h @@ -89,6 +89,7 @@ class nsIBidirectionalEnumerator : public nsIEnumerator { static NS_EXPORT_(JSObject *) GetJSObject(JSContext *cx, nsIBidirectionalEnumerator *priv); #endif }; + extern "C" NS_COM nsresult NS_NewEmptyEnumerator(nsISimpleEnumerator** aResult); // Construct and return an implementation of a "conjoining enumerator." This diff --git a/mozilla/xpcom/ds/nsIObserver.h b/mozilla/xpcom/ds/nsIObserver.h index 95ae512a11b..a7956efb36b 100644 --- a/mozilla/xpcom/ds/nsIObserver.h +++ b/mozilla/xpcom/ds/nsIObserver.h @@ -38,8 +38,8 @@ public: NS_IMETHOD Notify(nsISupports** result) = 0; }; -extern NS_BASE nsresult NS_NewObserver(nsIObserver** anObserver); +extern NS_COM nsresult NS_NewObserver(nsIObserver** anObserver, nsISupports* outer = NULL); -#define NS_OBSERVER_PROGID "component:||netscape|Observer" +#define NS_OBSERVER_PROGID "component://netscape/xpcom/observer" #endif /* nsIObserver_h__ */ diff --git a/mozilla/xpcom/ds/nsIObserverList.h b/mozilla/xpcom/ds/nsIObserverList.h index 2452767741b..1ed63ce9679 100644 --- a/mozilla/xpcom/ds/nsIObserverList.h +++ b/mozilla/xpcom/ds/nsIObserverList.h @@ -43,6 +43,6 @@ public: }; -extern NS_BASE nsresult NS_NewObserverList(nsIObserverList** anObserverList); +extern NS_COM nsresult NS_NewObserverList(nsIObserverList** anObserverList); #endif /* nsIObserverList_h__ */ diff --git a/mozilla/xpcom/ds/nsIObserverService.h b/mozilla/xpcom/ds/nsIObserverService.h index 58706509b3b..2b2b2af057c 100644 --- a/mozilla/xpcom/ds/nsIObserverService.h +++ b/mozilla/xpcom/ds/nsIObserverService.h @@ -43,7 +43,7 @@ public: NS_IMETHOD EnumerateObserverList(nsIEnumerator** anEnumerator, nsString* aTopic) = 0; }; -extern NS_BASE nsresult NS_NewObserverService(nsIObserverService** anObserverService); +extern NS_COM nsresult NS_NewObserverService(nsIObserverService** anObserverService); #define NS_OBSERVERSERVICE_PROGID "component:||netscape|ObserverService" diff --git a/mozilla/xpcom/ds/nsIProperties.h b/mozilla/xpcom/ds/nsIProperties.h index 5ec79dca883..c1ea8e3eb4c 100644 --- a/mozilla/xpcom/ds/nsIProperties.h +++ b/mozilla/xpcom/ds/nsIProperties.h @@ -29,6 +29,14 @@ {0x93, 0x11, 0x00, 0xe0, 0x98, 0x05, 0x57, 0x0f} \ } +#define NS_PROPERTIES_CID \ +{ /* b3efe4d0-0d6b-11d3-9331-00104ba0fd40 */ \ + 0xb3efe4d0, \ + 0x0d6b, \ + 0x11d3, \ + {0x93, 0x31, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \ +} + class nsIProperties : public nsISupports { public: static const nsIID& GetIID() { static nsIID iid = NS_IPROPERTIES_IID; return iid; } diff --git a/mozilla/xpcom/ds/nsISizeOfHandler.h b/mozilla/xpcom/ds/nsISizeOfHandler.h index af035d6db6e..59ae10670e6 100644 --- a/mozilla/xpcom/ds/nsISizeOfHandler.h +++ b/mozilla/xpcom/ds/nsISizeOfHandler.h @@ -60,7 +60,7 @@ public: NS_IMETHOD GetSize(PRUint32& aResult) = 0; }; -extern NS_BASE nsresult +extern NS_COM nsresult NS_NewSizeOfHandler(nsISizeOfHandler** aInstancePtrResult); #endif /* nsISizeofHandler_h___ */ diff --git a/mozilla/xpcom/ds/nsISupportsArray.h b/mozilla/xpcom/ds/nsISupportsArray.h index d2238d34faf..b643a2705e7 100644 --- a/mozilla/xpcom/ds/nsISupportsArray.h +++ b/mozilla/xpcom/ds/nsISupportsArray.h @@ -29,6 +29,14 @@ class nsIBidirectionalEnumerator; {0x791eafa0, 0xb9e6, 0x11d1, \ {0x80, 0x31, 0x00, 0x60, 0x08, 0x15, 0x9b, 0x5a}} +#define NS_SUPPORTSARRAY_CID \ +{ /* bda17d50-0d6b-11d3-9331-00104ba0fd40 */ \ + 0xbda17d50, \ + 0x0d6b, \ + 0x11d3, \ + {0x93, 0x31, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \ +} + // Enumerator callback function. Return PR_FALSE to stop typedef PRBool (*nsISupportsArrayEnumFunc)(nsISupports* aElement, void *aData); diff --git a/mozilla/xpcom/ds/nsIUnicharBuffer.h b/mozilla/xpcom/ds/nsIUnicharBuffer.h index 4ce3a0cab54..581c10b4e85 100644 --- a/mozilla/xpcom/ds/nsIUnicharBuffer.h +++ b/mozilla/xpcom/ds/nsIUnicharBuffer.h @@ -22,25 +22,36 @@ #include "nsISupports.h" class nsIUnicharInputStream; -#define NS_IUNICHAR_BUFFER_IID \ +#define NS_IUNICHARBUFFER_IID \ { 0x14cf6970, 0x93b5, 0x11d1, \ {0x89, 0x5b, 0x00, 0x60, 0x08, 0x91, 0x1b, 0x81} } /// Interface to a buffer that holds unicode characters class nsIUnicharBuffer : public nsISupports { public: - virtual PRInt32 GetLength() const = 0; - virtual PRInt32 GetBufferSize() const = 0; - virtual PRUnichar* GetBuffer() const = 0; - virtual PRBool Grow(PRInt32 aNewSize) = 0; - virtual PRInt32 Fill(nsresult* aErrorCode, nsIUnicharInputStream* aStream, - PRInt32 aKeep) = 0; + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IUNICHARBUFFER_IID); + + NS_IMETHOD Init(PRUint32 aBufferSize) = 0; + NS_IMETHOD_(PRInt32) GetLength() const = 0; + NS_IMETHOD_(PRInt32) GetBufferSize() const = 0; + NS_IMETHOD_(PRUnichar*) GetBuffer() const = 0; + NS_IMETHOD_(PRBool) Grow(PRInt32 aNewSize) = 0; + NS_IMETHOD_(PRInt32) Fill(nsresult* aErrorCode, nsIUnicharInputStream* aStream, + PRInt32 aKeep) = 0; }; /// Factory method for nsIUnicharBuffer. -extern NS_BASE nsresult - NS_NewUnicharBuffer(nsIUnicharBuffer** aInstancePtrResult, - nsISupports* aOuter, - PRUint32 aBufferSize = 0); +extern NS_COM nsresult +NS_NewUnicharBuffer(nsIUnicharBuffer** aInstancePtrResult, + nsISupports* aOuter, + PRUint32 aBufferSize = 0); + +#define NS_UNICHARBUFFER_CID \ +{ /* c81fd8f0-0d6b-11d3-9331-00104ba0fd40 */ \ + 0xc81fd8f0, \ + 0x0d6b, \ + 0x11d3, \ + {0x93, 0x31, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \ +} #endif /* nsIUnicharBuffer_h___ */ diff --git a/mozilla/xpcom/ds/nsIVariant.h b/mozilla/xpcom/ds/nsIVariant.h index 7b94f8ea319..a460a1c525e 100644 --- a/mozilla/xpcom/ds/nsIVariant.h +++ b/mozilla/xpcom/ds/nsIVariant.h @@ -52,7 +52,9 @@ public: nsVariantValue(PRInt32 value) { mUnion._PRInt32 = value; } nsVariantValue(PRUint32 value) { mUnion._PRUint32 = value; } nsVariantValue(PRInt64 value) { mUnion._PRInt64 = value; } +#ifndef XP_MAC nsVariantValue(PRUint64 value) { mUnion._PRUint64 = value; } +#endif nsVariantValue(float value) { mUnion._float = value; } nsVariantValue(PRFloat64 value) { mUnion._PRFloat64 = value; } // nsVariantValue(PRTime value) { mUnion._PRTime = value; } @@ -66,7 +68,9 @@ public: operator PRInt32() { return mUnion._PRInt32; } operator PRUint32() { return mUnion._PRUint32; } operator PRInt64() { return mUnion._PRInt64; } +#ifndef XP_MAC operator PRUint64() { return mUnion._PRUint64; } +#endif operator float() { return mUnion._float; } operator PRFloat64() { return mUnion._PRFloat64; } // operator PRTime() { return mUnion._PRTime; } @@ -142,7 +146,7 @@ public: }; -extern NS_BASE nsresult +extern NS_COM nsresult NS_NewIVariant(nsVariantType initialType, nsVariantValue& initialValue, nsIVariant* *result); diff --git a/mozilla/xpcom/ds/nsObserver.cpp b/mozilla/xpcom/ds/nsObserver.cpp index 6272510dc45..fb75d49f73d 100644 --- a/mozilla/xpcom/ds/nsObserver.cpp +++ b/mozilla/xpcom/ds/nsObserver.cpp @@ -35,25 +35,34 @@ static NS_DEFINE_IID(kObserverCID, NS_OBSERVER_CID); NS_IMPL_AGGREGATED(nsObserver); -NS_BASE nsresult NS_NewObserver(nsIObserver** anObserver) +NS_COM nsresult NS_NewObserver(nsIObserver** anObserver, nsISupports* outer) { - if (anObserver == NULL) - { - return NS_ERROR_NULL_POINTER; - } - - nsObserver* it = new nsObserver(); - - if (it == 0) { - return NS_ERROR_OUT_OF_MEMORY; - } - - return it->QueryInterface(kIObserverIID, (void **) anObserver); + return nsObserver::Create(outer, kIObserverIID, (void**)anObserver); } -nsObserver::nsObserver() +NS_METHOD +nsObserver::Create(nsISupports* outer, const nsIID& aIID, void* *anObserver) { - NS_INIT_REFCNT(); + if (anObserver == NULL) + return NS_ERROR_NULL_POINTER; + + nsObserver* it = new nsObserver(outer); + + if (it == NULL) + return NS_ERROR_OUT_OF_MEMORY; + + nsISupports* inner = outer ? it->GetInner() : it; + nsresult rv = inner->QueryInterface(aIID, anObserver); + if (NS_FAILED(rv)) { + delete it; + return rv; + } + return rv; +} + +nsObserver::nsObserver(nsISupports* outer) +{ + NS_INIT_AGGREGATED(outer); } nsObserver::~nsObserver(void) @@ -67,7 +76,7 @@ nsObserver::AggregatedQueryInterface(const nsIID& aIID, void** aInstancePtr) return NS_ERROR_NULL_POINTER; if (aIID.Equals(nsIObserver::GetIID()) || aIID.Equals(nsISupports::GetIID())) { - *aInstancePtr = this; + *aInstancePtr = (nsIObserver*)this; NS_ADDREF_THIS(); return NS_OK; } diff --git a/mozilla/xpcom/ds/nsObserver.h b/mozilla/xpcom/ds/nsObserver.h index 2978117246e..7c03aa3745d 100644 --- a/mozilla/xpcom/ds/nsObserver.h +++ b/mozilla/xpcom/ds/nsObserver.h @@ -1,4 +1,4 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * The contents of this file are subject to the Netscape Public License * Version 1.0 (the "NPL"); you may not use this file except in @@ -27,12 +27,14 @@ public: NS_IMETHOD Notify(nsISupports** result); - nsObserver(); + nsObserver(nsISupports* outer); virtual ~nsObserver(void); - + + static NS_METHOD + Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr); + NS_DECL_AGGREGATED - private: }; diff --git a/mozilla/xpcom/ds/nsObserverList.cpp b/mozilla/xpcom/ds/nsObserverList.cpp index a562640a211..ce0526c9195 100644 --- a/mozilla/xpcom/ds/nsObserverList.cpp +++ b/mozilla/xpcom/ds/nsObserverList.cpp @@ -36,7 +36,7 @@ static NS_DEFINE_IID(kObserverListCID, NS_OBSERVERLIST_CID); NS_IMPL_ISUPPORTS(nsObserverList, kIObserverListIID); -NS_BASE nsresult NS_NewObserverList(nsIObserverList** anObserverList) +NS_COM nsresult NS_NewObserverList(nsIObserverList** anObserverList) { if (anObserverList == NULL) diff --git a/mozilla/xpcom/ds/nsObserverService.cpp b/mozilla/xpcom/ds/nsObserverService.cpp index 29e4a391f14..4863e161f0c 100644 --- a/mozilla/xpcom/ds/nsObserverService.cpp +++ b/mozilla/xpcom/ds/nsObserverService.cpp @@ -34,30 +34,6 @@ static NS_DEFINE_IID(kObserverServiceCID, NS_OBSERVERSERVICE_CID); //////////////////////////////////////////////////////////////////////////////// -class nsObserverService : public nsIObserverService { -public: - - static nsresult GetObserverService(nsIObserverService** anObserverService); - - NS_IMETHOD AddObserver(nsIObserver** anObserver, nsString* aTopic); - NS_IMETHOD RemoveObserver(nsIObserver** anObserver, nsString* aTopic); - NS_IMETHOD EnumerateObserverList(nsIEnumerator** anEnumerator, nsString* aTopic); - - - nsObserverService(); - virtual ~nsObserverService(void); - - NS_DECL_ISUPPORTS - - -private: - - NS_IMETHOD GetObserverList(nsIObserverList** anObserverList, nsString* aTopic); - - nsHashtable *mObserverTopicTable; - -}; - static nsObserverService* gObserverService = nsnull; // The one-and-only ObserverService //////////////////////////////////////////////////////////////////////////////// @@ -66,7 +42,7 @@ static nsObserverService* gObserverService = nsnull; // The one-and-only Observe NS_IMPL_ISUPPORTS(nsObserverService, kIObserverServiceIID); -NS_BASE nsresult NS_NewObserverService(nsIObserverService** anObserverService) +NS_COM nsresult NS_NewObserverService(nsIObserverService** anObserverService) { return nsObserverService::GetObserverService(anObserverService); } @@ -85,6 +61,18 @@ nsObserverService::~nsObserverService(void) gObserverService = nsnull; } +NS_METHOD +nsObserverService::Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr) +{ + nsresult rv; + nsObserverService* os = new nsObserverService(); + if (os == NULL) + return NS_ERROR_OUT_OF_MEMORY; + NS_ADDREF(os); + rv = os->QueryInterface(aIID, aInstancePtr); + NS_RELEASE(os); + return rv; +} nsresult nsObserverService::GetObserverService(nsIObserverService** anObserverService) { diff --git a/mozilla/xpcom/ds/nsObserverService.h b/mozilla/xpcom/ds/nsObserverService.h index bbbaf06552d..2bc1c0b5e4b 100644 --- a/mozilla/xpcom/ds/nsObserverService.h +++ b/mozilla/xpcom/ds/nsObserverService.h @@ -19,4 +19,34 @@ #ifndef nsObserverService_h___ #define nsObserverService_h___ +#include "nsIObserverService.h" + +class nsHashtable; + +class nsObserverService : public nsIObserverService { +public: + + static nsresult GetObserverService(nsIObserverService** anObserverService); + + NS_IMETHOD AddObserver(nsIObserver** anObserver, nsString* aTopic); + NS_IMETHOD RemoveObserver(nsIObserver** anObserver, nsString* aTopic); + NS_IMETHOD EnumerateObserverList(nsIEnumerator** anEnumerator, nsString* aTopic); + + + nsObserverService(); + virtual ~nsObserverService(void); + + NS_DECL_ISUPPORTS + + static NS_METHOD + Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr); + +private: + + NS_IMETHOD GetObserverList(nsIObserverList** anObserverList, nsString* aTopic); + + nsHashtable* mObserverTopicTable; + +}; + #endif /* nsObserverService_h___ */ diff --git a/mozilla/xpcom/ds/nsPageMgr.cpp b/mozilla/xpcom/ds/nsPageMgr.cpp index 01bf3f89e3d..64f8f423bc2 100644 --- a/mozilla/xpcom/ds/nsPageMgr.cpp +++ b/mozilla/xpcom/ds/nsPageMgr.cpp @@ -262,9 +262,9 @@ nsPageMgr::InitPages(nsPageCount minPages, nsPageCount maxPages) mSegTable = mSegTable; mSegTableCount = mSegTableCount; - mSegTable[0].handle = h; - mSegTable[0].firstPage = firstPage; - mSegTable[0].lastPage = lastPage; + mSegTable[0].mHandle = h; + mSegTable[0].mFirstPage = firstPage; + mSegTable[0].mLastPage = lastPage; /* XXX hack for now -- just one segment */ mMemoryBase = firstPage; @@ -328,8 +328,8 @@ nsPageMgr::FinalizePages() OSErr err; PRUword i; for (i = 0; i < mSegTableCount; i++) { - if (mSegTable[i].handle) { - TempDisposeHandle(mSegTable[i].handle, &err); + if (mSegTable[i].mHandle) { + TempDisposeHandle(mSegTable[i].mHandle, &err); PR_ASSERT(err == 0); } } @@ -416,6 +416,26 @@ nsPageMgr::~nsPageMgr() } } +NS_METHOD +nsPageMgr::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) +{ + if (aOuter) + return NS_ERROR_NO_AGGREGATION; + nsPageMgr* pageMgr = new nsPageMgr(); + if (pageMgr == nsnull) + return NS_ERROR_OUT_OF_MEMORY; + + NS_ADDREF(pageMgr); + nsresult rv = pageMgr->Init(); + if (NS_FAILED(rv)) { + NS_RELEASE(pageMgr); + return rv; + } + rv = pageMgr->QueryInterface(aIID, aResult); + NS_RELEASE(pageMgr); + return NS_OK; +} + NS_IMPL_ADDREF(nsPageMgr); NS_IMPL_RELEASE(nsPageMgr); diff --git a/mozilla/xpcom/ds/nsPageMgr.h b/mozilla/xpcom/ds/nsPageMgr.h index 6a7aeade029..3a5988acc0a 100644 --- a/mozilla/xpcom/ds/nsPageMgr.h +++ b/mozilla/xpcom/ds/nsPageMgr.h @@ -102,6 +102,9 @@ class nsPageMgr : public nsIPageManager, public nsIAllocator { public: NS_DECL_ISUPPORTS + static NS_METHOD + Create(nsISupports *aOuter, REFNSIID aIID, void **aResult); + // nsIPageManager methods: NS_IMETHOD AllocPages(PRUint32 pageCount, void* *result); NS_IMETHOD DeallocPages(PRUint32 pageCount, void* pages); diff --git a/mozilla/xpcom/ds/nsProperties.cpp b/mozilla/xpcom/ds/nsProperties.cpp index 92087d87367..6711eadc26d 100644 --- a/mozilla/xpcom/ds/nsProperties.cpp +++ b/mozilla/xpcom/ds/nsProperties.cpp @@ -1,4 +1,4 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * The contents of this file are subject to the Netscape Public License * Version 1.0 (the "NPL"); you may not use this file except in @@ -22,10 +22,23 @@ //////////////////////////////////////////////////////////////////////////////// -NS_IMPL_ISUPPORTS(nsProperties, nsIProperties::GetIID()); - -nsProperties::nsProperties() +nsProperties::nsProperties(nsISupports* outer) { + NS_INIT_AGGREGATED(outer); +} + +NS_METHOD +nsProperties::Create(nsISupports *outer, REFNSIID aIID, void **aResult) +{ + if (outer && !aIID.Equals(nsISupports::GetIID())) + return NS_NOINTERFACE; // XXX right error? + nsProperties* props = new nsProperties(outer); + if (props == NULL) + return NS_ERROR_OUT_OF_MEMORY; + NS_ADDREF(props); + nsresult rv = props->QueryInterface(aIID, aResult); + NS_RELEASE(props); + return NS_OK; } PRBool @@ -41,6 +54,23 @@ nsProperties::~nsProperties() Enumerate(ReleaseValues); } +NS_IMPL_AGGREGATED(nsProperties); + +NS_METHOD +nsProperties::AggregatedQueryInterface(const nsIID& aIID, void** aInstancePtr) +{ + if (NULL == aInstancePtr) { + return NS_ERROR_NULL_POINTER; + } + if (aIID.Equals(nsIProperties::GetIID()) || + aIID.Equals(nsISupports::GetIID())) { + *aInstancePtr = (void*) this; + NS_ADDREF_THIS(); + return NS_OK; + } + return NS_NOINTERFACE; +} + NS_IMETHODIMP nsProperties::DefineProperty(const char* prop, nsISupports* initialValue) { @@ -108,12 +138,7 @@ nsProperties::HasProperty(const char* prop, nsISupports* expectedValue) nsresult NS_NewIProperties(nsIProperties* *result) { - nsProperties* props = new nsProperties(); - if (props == NULL) - return NS_ERROR_OUT_OF_MEMORY; - NS_ADDREF(props); - *result = props; - return NS_OK; + return nsProperties::Create(NULL, nsIProperties::GetIID(), (void**)result); } //////////////////////////////////////////////////////////////////////////////// @@ -121,7 +146,6 @@ NS_NewIProperties(nsIProperties* *result) //////////////////////////////////////////////////////////////////////////////// #include "nsID.h" -#include "nsBaseDLL.h" #include "nsCRT.h" #include "nsIInputStream.h" #include "nsIProperties.h" @@ -156,6 +180,20 @@ nsPersistentProperties::~nsPersistentProperties() } } +NS_METHOD +nsPersistentProperties::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) +{ + if (aOuter) + return NS_ERROR_NO_AGGREGATION; + nsPersistentProperties* props = new nsPersistentProperties(); + if (props == nsnull) + return NS_ERROR_OUT_OF_MEMORY; + NS_ADDREF(props); + nsresult rv = props->QueryInterface(aIID, aResult); + NS_RELEASE(props); + return rv; +} + NS_IMPL_ADDREF(nsPersistentProperties) NS_IMPL_RELEASE(nsPersistentProperties) diff --git a/mozilla/xpcom/ds/nsProperties.h b/mozilla/xpcom/ds/nsProperties.h index b16a4b5af67..29fe7aef4c0 100644 --- a/mozilla/xpcom/ds/nsProperties.h +++ b/mozilla/xpcom/ds/nsProperties.h @@ -21,13 +21,14 @@ #include "nsIProperties.h" #include "nsHashtable.h" +#include "nsAgg.h" class nsIUnicharInputStream; class nsProperties : public nsIProperties, public nsHashtable { public: - NS_DECL_ISUPPORTS + NS_DECL_AGGREGATED // nsIProperties methods: NS_IMETHOD DefineProperty(const char* prop, nsISupports* initialValue); @@ -37,9 +38,12 @@ public: NS_IMETHOD HasProperty(const char* prop, nsISupports* value); // nsProperties methods: - nsProperties(); + nsProperties(nsISupports* outer); virtual ~nsProperties(); + static NS_METHOD + Create(nsISupports *aOuter, REFNSIID aIID, void **aResult); + static PRBool ReleaseValues(nsHashKey* key, void* data, void* closure); }; @@ -52,6 +56,9 @@ public: NS_DECL_ISUPPORTS + static NS_METHOD + Create(nsISupports *aOuter, REFNSIID aIID, void **aResult); + // nsIProperties methods: NS_IMETHOD DefineProperty(const char* prop, nsISupports* initialValue); NS_IMETHOD UndefineProperty(const char* prop); diff --git a/mozilla/xpcom/ds/nsRBTree.h b/mozilla/xpcom/ds/nsRBTree.h index 8d423e246ae..a5464cb0467 100644 --- a/mozilla/xpcom/ds/nsRBTree.h +++ b/mozilla/xpcom/ds/nsRBTree.h @@ -41,9 +41,9 @@ * @update gess4/20/98 */ -class NS_BASE nsRBTree : public nsBTree { +class NS_COM nsRBTree : public nsBTree { public: -friend class NS_BASE nsRBTreeIterator; +friend class NS_COM nsRBTreeIterator; /** * nsRBTree constructor @@ -173,7 +173,7 @@ private: }; -class NS_BASE nsRBTreeIterator { +class NS_COM nsRBTreeIterator { public: /** diff --git a/mozilla/xpcom/ds/nsSizeOfHandler.cpp b/mozilla/xpcom/ds/nsSizeOfHandler.cpp index 63ee1ac4a85..715a69148e4 100644 --- a/mozilla/xpcom/ds/nsSizeOfHandler.cpp +++ b/mozilla/xpcom/ds/nsSizeOfHandler.cpp @@ -110,7 +110,7 @@ nsSizeOfHandler::GetSize(PRUint32& aResult) return NS_OK; } -NS_BASE nsresult +NS_COM nsresult NS_NewSizeOfHandler(nsISizeOfHandler** aInstancePtrResult) { nsISizeOfHandler *it = new nsSizeOfHandler(); diff --git a/mozilla/xpcom/ds/nsString.cpp b/mozilla/xpcom/ds/nsString.cpp index d7584696719..d0d86da25a5 100644 --- a/mozilla/xpcom/ds/nsString.cpp +++ b/mozilla/xpcom/ds/nsString.cpp @@ -2217,7 +2217,7 @@ ostream& operator<<(ostream& os,nsAutoString1& aString){ * @param * @return */ -NS_BASE int fputs(const nsString1& aString, FILE* out){ +NS_COM int fputs(const nsString1& aString, FILE* out){ char buf[200]; char* cp = buf; PRInt32 aLength=aString.Length(); diff --git a/mozilla/xpcom/ds/nsString.h b/mozilla/xpcom/ds/nsString.h index ae25e4976fc..178307ca416 100644 --- a/mozilla/xpcom/ds/nsString.h +++ b/mozilla/xpcom/ds/nsString.h @@ -50,7 +50,7 @@ class nsISizeOfHandler; -class NS_BASE nsString1 { +class NS_COM nsString1 { public: /** @@ -771,7 +771,7 @@ typedef PRUnichar chartype; }; ostream& operator<<(ostream& os,nsString1& aString); -extern NS_BASE int fputs(const nsString1& aString, FILE* out); +extern NS_COM int fputs(const nsString1& aString, FILE* out); //---------------------------------------------------------------------- @@ -782,7 +782,7 @@ extern NS_BASE int fputs(const nsString1& aString, FILE* out); * allocated and grown as necessary. */ // XXX template this with a parameter for the size of the buffer? -class NS_BASE nsAutoString1 : public nsString1 { +class NS_COM nsAutoString1 : public nsString1 { public: nsAutoString1(); nsAutoString1(const nsString1& other); diff --git a/mozilla/xpcom/ds/nsString2.cpp b/mozilla/xpcom/ds/nsString2.cpp index 9263c5883f6..594dfc346fb 100644 --- a/mozilla/xpcom/ds/nsString2.cpp +++ b/mozilla/xpcom/ds/nsString2.cpp @@ -1723,7 +1723,7 @@ ostream& operator<<(ostream& os,nsString2& aString){ * @param * @return */ -NS_BASE int fputs(const nsString2& aString, FILE* out) +NS_COM int fputs(const nsString2& aString, FILE* out) { char buf[100]; char* cp = buf; diff --git a/mozilla/xpcom/ds/nsString2.h b/mozilla/xpcom/ds/nsString2.h index 4e4fef5a80d..4d9bab7bcab 100644 --- a/mozilla/xpcom/ds/nsString2.h +++ b/mozilla/xpcom/ds/nsString2.h @@ -52,9 +52,9 @@ class nsISizeOfHandler; #define nsAutoString2 nsAutoString #endif -class NS_BASE nsSubsumeStr; +class NS_COM nsSubsumeStr; -class NS_BASE nsString2 : public nsStr { +class NS_COM nsString2 : public nsStr { public: @@ -726,7 +726,7 @@ virtual void DebugDump(ostream& aStream) const; }; -extern NS_BASE int fputs(const nsString2& aString, FILE* out); +extern NS_COM int fputs(const nsString2& aString, FILE* out); ostream& operator<<(ostream& os,nsString2& aString); @@ -736,7 +736,7 @@ ostream& operator<<(ostream& os,nsString2& aString); If the buffer needs to grow, it gets reallocated on the heap. **************************************************************/ -class NS_BASE nsAutoString2 : public nsString2 { +class NS_COM nsAutoString2 : public nsString2 { public: nsAutoString2(eCharSize aCharSize=kDefaultCharSize); @@ -786,7 +786,7 @@ public: You should probably not use this class unless you really know what you're doing. ***************************************************************/ -class NS_BASE nsSubsumeStr : public nsString2 { +class NS_COM nsSubsumeStr : public nsString2 { public: nsSubsumeStr(nsString2& aString); nsSubsumeStr(nsStr& aString); diff --git a/mozilla/xpcom/ds/nsSupportsArray.cpp b/mozilla/xpcom/ds/nsSupportsArray.cpp index 274b0dea4bd..07b09f12669 100644 --- a/mozilla/xpcom/ds/nsSupportsArray.cpp +++ b/mozilla/xpcom/ds/nsSupportsArray.cpp @@ -34,6 +34,22 @@ nsSupportsArray::~nsSupportsArray() DeleteArray(); } +NS_METHOD +nsSupportsArray::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) +{ + if (aOuter) + return NS_ERROR_NO_AGGREGATION; + + nsSupportsArray *it = new nsSupportsArray(); + if (it == NULL) + return NS_ERROR_OUT_OF_MEMORY; + + NS_ADDREF(it); + nsresult rv = it->QueryInterface(aIID, aResult); + NS_RELEASE(it); + return rv; +} + NS_IMPL_ISUPPORTS(nsSupportsArray, nsISupportsArray::GetIID()); void nsSupportsArray::DeleteArray(void) @@ -348,14 +364,9 @@ nsSupportsArray::Enumerate(nsIEnumerator* *result) NS_COM nsresult NS_NewISupportsArray(nsISupportsArray** aInstancePtrResult) { - if (aInstancePtrResult == 0) - return NS_ERROR_NULL_POINTER; - - nsSupportsArray *it = new nsSupportsArray(); - if (0 == it) - return NS_ERROR_OUT_OF_MEMORY; - NS_ADDREF(it); - *aInstancePtrResult = it; - return NS_OK; + nsresult rv; + rv = nsSupportsArray::Create(NULL, nsISupportsArray::GetIID(), + (void**)aInstancePtrResult); + return rv; } diff --git a/mozilla/xpcom/ds/nsSupportsArray.h b/mozilla/xpcom/ds/nsSupportsArray.h index 32fc63fdd2b..831a0a97bbb 100644 --- a/mozilla/xpcom/ds/nsSupportsArray.h +++ b/mozilla/xpcom/ds/nsSupportsArray.h @@ -28,6 +28,9 @@ public: nsSupportsArray(void); virtual ~nsSupportsArray(void); + static NS_METHOD + Create(nsISupports *aOuter, REFNSIID aIID, void **aResult); + NS_DECL_ISUPPORTS // nsICollection methods: diff --git a/mozilla/xpcom/ds/nsUnicharBuffer.cpp b/mozilla/xpcom/ds/nsUnicharBuffer.cpp index 4e2b338513f..3f4cac49ef9 100644 --- a/mozilla/xpcom/ds/nsUnicharBuffer.cpp +++ b/mozilla/xpcom/ds/nsUnicharBuffer.cpp @@ -15,43 +15,48 @@ * Copyright (C) 1998 Netscape Communications Corporation. All Rights * Reserved. */ -#include "nsIUnicharBuffer.h" + +#include "nsUnicharBuffer.h" #include "nsIUnicharInputStream.h" #include "nsCRT.h" #define MIN_BUFFER_SIZE 32 -class UnicharBufferImpl : public nsIUnicharBuffer { -public: - UnicharBufferImpl(PRUint32 aBufferSize); - virtual ~UnicharBufferImpl(); +UnicharBufferImpl::UnicharBufferImpl() + : mBuffer(NULL), mSpace(0), mLength(0) +{ + NS_INIT_REFCNT(); +} - NS_DECL_ISUPPORTS - virtual PRInt32 GetLength() const; - virtual PRInt32 GetBufferSize() const; - virtual PRUnichar* GetBuffer() const; - virtual PRBool Grow(PRInt32 aNewSize); - virtual PRInt32 Fill(nsresult* aErrorCode, nsIUnicharInputStream* aStream, - PRInt32 aKeep); +NS_METHOD +UnicharBufferImpl::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) +{ + if (aOuter) + return NS_ERROR_NO_AGGREGATION; - PRUnichar* mBuffer; - PRUint32 mSpace; - PRUint32 mLength; -}; + UnicharBufferImpl* it = new UnicharBufferImpl(); + if (it == nsnull) + return NS_ERROR_OUT_OF_MEMORY; -UnicharBufferImpl::UnicharBufferImpl(PRUint32 aBufferSize) + NS_ADDREF(it); + nsresult rv = it->QueryInterface(aIID, aResult); + NS_RELEASE(it); + return rv; +} + +NS_IMETHODIMP +UnicharBufferImpl::Init(PRUint32 aBufferSize) { if (aBufferSize < MIN_BUFFER_SIZE) { aBufferSize = MIN_BUFFER_SIZE; } mSpace = aBufferSize; - mBuffer = new PRUnichar[aBufferSize]; mLength = 0; - NS_INIT_REFCNT(); + mBuffer = new PRUnichar[aBufferSize]; + return mBuffer ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } -NS_DEFINE_IID(kUnicharBufferIID, NS_IUNICHAR_BUFFER_IID); -NS_IMPL_ISUPPORTS(UnicharBufferImpl,kUnicharBufferIID) +NS_IMPL_ISUPPORTS(UnicharBufferImpl, nsIUnicharBuffer::GetIID()) UnicharBufferImpl::~UnicharBufferImpl() { @@ -62,22 +67,26 @@ UnicharBufferImpl::~UnicharBufferImpl() mLength = 0; } -PRInt32 UnicharBufferImpl::GetLength() const +NS_IMETHODIMP_(PRInt32) +UnicharBufferImpl::GetLength() const { return mLength; } -PRInt32 UnicharBufferImpl::GetBufferSize() const +NS_IMETHODIMP_(PRInt32) +UnicharBufferImpl::GetBufferSize() const { return mSpace; } -PRUnichar* UnicharBufferImpl::GetBuffer() const +NS_IMETHODIMP_(PRUnichar*) +UnicharBufferImpl::GetBuffer() const { return mBuffer; } -PRBool UnicharBufferImpl::Grow(PRInt32 aNewSize) +NS_IMETHODIMP_(PRBool) +UnicharBufferImpl::Grow(PRInt32 aNewSize) { if (PRUint32(aNewSize) < MIN_BUFFER_SIZE) { aNewSize = MIN_BUFFER_SIZE; @@ -94,9 +103,10 @@ PRBool UnicharBufferImpl::Grow(PRInt32 aNewSize) return PR_FALSE; } -PRInt32 UnicharBufferImpl::Fill(nsresult* aErrorCode, - nsIUnicharInputStream* aStream, - PRInt32 aKeep) +NS_IMETHODIMP_(PRInt32) +UnicharBufferImpl::Fill(nsresult* aErrorCode, + nsIUnicharInputStream* aStream, + PRInt32 aKeep) { NS_PRECONDITION(nsnull != aStream, "null stream"); NS_PRECONDITION(PRUint32(aKeep) < PRUint32(mLength), "illegal keep count"); @@ -127,16 +137,21 @@ PRInt32 UnicharBufferImpl::Fill(nsresult* aErrorCode, return nb; } -NS_BASE nsresult NS_NewUnicharBuffer(nsIUnicharBuffer** aInstancePtrResult, - nsISupports* aOuter, - PRUint32 aBufferSize) +NS_COM nsresult +NS_NewUnicharBuffer(nsIUnicharBuffer** aInstancePtrResult, + nsISupports* aOuter, + PRUint32 aBufferSize) { - if (nsnull != aOuter) { - return NS_ERROR_NO_AGGREGATION; + nsresult rv; + nsIUnicharBuffer* buf; + rv = UnicharBufferImpl::Create(aOuter, nsIUnicharBuffer::GetIID(), + (void**)&buf); + if (NS_FAILED(rv)) return rv; + rv = buf->Init(aBufferSize); + if (NS_FAILED(rv)) { + NS_RELEASE(buf); + return rv; } - UnicharBufferImpl* it = new UnicharBufferImpl(aBufferSize); - if (nsnull == it) { - return NS_ERROR_OUT_OF_MEMORY; - } - return it->QueryInterface(kUnicharBufferIID, (void **) aInstancePtrResult); + *aInstancePtrResult = buf; + return rv; } diff --git a/mozilla/xpcom/ds/nsVariant.cpp b/mozilla/xpcom/ds/nsVariant.cpp index b74a0c4b08f..2f43fa0f7b7 100644 --- a/mozilla/xpcom/ds/nsVariant.cpp +++ b/mozilla/xpcom/ds/nsVariant.cpp @@ -218,7 +218,7 @@ nsVariant::GetDescription(char* *result) //////////////////////////////////////////////////////////////////////////////// -NS_BASE nsresult +NS_COM nsresult NS_NewIVariant(nsVariantType initialType, nsVariantValue& initialValue, nsIVariant* *result) { diff --git a/mozilla/xpcom/ds/nsVoidArray.h b/mozilla/xpcom/ds/nsVoidArray.h index 44e9e41f3f5..d0692ce7cd8 100644 --- a/mozilla/xpcom/ds/nsVoidArray.h +++ b/mozilla/xpcom/ds/nsVoidArray.h @@ -25,7 +25,7 @@ class nsISizeOfHandler; typedef PRBool (*nsVoidArrayEnumFunc)(void* aElement, void *aData); /// A basic zero-based array of void*'s that manages its own memory -class NS_BASE nsVoidArray { +class NS_COM nsVoidArray { public: nsVoidArray(); nsVoidArray(PRInt32 aCount); // initial count of aCount elements set to nsnull @@ -76,7 +76,7 @@ class nsString; typedef PRBool (*nsStringArrayEnumFunc)(nsString& aElement, void *aData); -class NS_BASE nsStringArray: protected nsVoidArray +class NS_COM nsStringArray: protected nsVoidArray { public: nsStringArray(void); diff --git a/mozilla/xpcom/glue/nsGenericFactory.cpp b/mozilla/xpcom/glue/nsGenericFactory.cpp index b0c57df49e2..98d4cb121bc 100644 --- a/mozilla/xpcom/glue/nsGenericFactory.cpp +++ b/mozilla/xpcom/glue/nsGenericFactory.cpp @@ -35,11 +35,11 @@ NS_METHOD nsGenericFactory::QueryInterface(const nsIID& aIID, void** aInstancePt if (NULL == aInstancePtr) { return NS_ERROR_NULL_POINTER; } - if (aIID.Equals(nsIFactory::GetIID()) || - aIID.Equals(nsIGenericFactory::GetIID()) || - aIID.Equals(nsISupports::GetIID())) { - *aInstancePtr = (void*) this; - AddRef(); + if (aIID.Equals(nsIGenericFactory::GetIID()) || + aIID.Equals(nsIFactory::GetIID()) || + aIID.Equals(nsISupports::GetIID())) { + *aInstancePtr = (nsIGenericFactory*) this; + NS_ADDREF_THIS(); return NS_OK; } return NS_NOINTERFACE; @@ -86,3 +86,25 @@ NS_METHOD nsGenericFactory::Create(nsISupports* outer, const nsIID& aIID, void* } return res; } + +extern nsresult +NS_NewGenericFactory(nsIGenericFactory* *result, + nsIGenericFactory::ConstructorProcPtr constructor, + nsIGenericFactory::DestructorProcPtr destructor) +{ + nsresult rv; + nsIGenericFactory* fact; + rv = nsGenericFactory::Create(NULL, nsIGenericFactory::GetIID(), (void**)&fact); + if (NS_FAILED(rv)) return rv; + rv = fact->SetConstructor(constructor); + if (NS_FAILED(rv)) goto error; + rv = fact->SetDestructor(destructor); + if (NS_FAILED(rv)) goto error; + *result = fact; + return rv; + + error: + NS_RELEASE(fact); + return rv; +} + diff --git a/mozilla/xpcom/glue/nsIGenericFactory.h b/mozilla/xpcom/glue/nsIGenericFactory.h index 400d03296d6..1744406d18f 100644 --- a/mozilla/xpcom/glue/nsIGenericFactory.h +++ b/mozilla/xpcom/glue/nsIGenericFactory.h @@ -54,4 +54,40 @@ public: NS_IMETHOD SetDestructor(DestructorProcPtr destructor) = 0; }; +extern nsresult +NS_NewGenericFactory(nsIGenericFactory* *result, + nsIGenericFactory::ConstructorProcPtr constructor, + nsIGenericFactory::DestructorProcPtr destructor = NULL); + +#define NS_GENERIC_FACTORY_CONSTRUCTOR(_InstanceClass) \ +static nsresult \ +_InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, void **aResult) \ +{ \ + nsresult rv; \ + \ + _InstanceClass * inst; \ + \ + if (NULL == aResult) { \ + rv = NS_ERROR_NULL_POINTER; \ + goto done; \ + } \ + *aResult = NULL; \ + if (NULL != aOuter) { \ + rv = NS_ERROR_NO_AGGREGATION; \ + goto done; \ + } \ + \ + NS_NEWXPCOM(inst, _InstanceClass); \ + if (NULL == inst) { \ + rv = NS_ERROR_OUT_OF_MEMORY; \ + goto done; \ + } \ + NS_ADDREF(inst); \ + rv = inst->QueryInterface(aIID, aResult); \ + NS_RELEASE(inst); \ + \ + done: \ + return rv; \ +} + #endif /* nsIGenericFactory_h___ */ diff --git a/mozilla/xpcom/glue/nsVoidArray.h b/mozilla/xpcom/glue/nsVoidArray.h index 44e9e41f3f5..d0692ce7cd8 100644 --- a/mozilla/xpcom/glue/nsVoidArray.h +++ b/mozilla/xpcom/glue/nsVoidArray.h @@ -25,7 +25,7 @@ class nsISizeOfHandler; typedef PRBool (*nsVoidArrayEnumFunc)(void* aElement, void *aData); /// A basic zero-based array of void*'s that manages its own memory -class NS_BASE nsVoidArray { +class NS_COM nsVoidArray { public: nsVoidArray(); nsVoidArray(PRInt32 aCount); // initial count of aCount elements set to nsnull @@ -76,7 +76,7 @@ class nsString; typedef PRBool (*nsStringArrayEnumFunc)(nsString& aElement, void *aData); -class NS_BASE nsStringArray: protected nsVoidArray +class NS_COM nsStringArray: protected nsVoidArray { public: nsStringArray(void); diff --git a/mozilla/xpcom/idl/MANIFEST b/mozilla/xpcom/idl/MANIFEST index 7ba13eb668d..67098e68156 100644 --- a/mozilla/xpcom/idl/MANIFEST +++ b/mozilla/xpcom/idl/MANIFEST @@ -2,3 +2,4 @@ nsIEnumerator.idl nsIFactory.idl nsISupports.idl nsrootidl.idl +nsIFilespec.idl diff --git a/mozilla/xpcom/idl/Makefile.in b/mozilla/xpcom/idl/Makefile.in index b718f63319c..2ab92896abb 100644 --- a/mozilla/xpcom/idl/Makefile.in +++ b/mozilla/xpcom/idl/Makefile.in @@ -28,6 +28,7 @@ XPIDLSRCS = \ nsIEnumerator.idl \ nsIFactory.idl \ nsICollection.idl \ + nsIFileSpec.idl \ $(NULL) include $(topsrcdir)/config/rules.mk diff --git a/mozilla/xpcom/idl/makefile.win b/mozilla/xpcom/idl/makefile.win index db019103df8..4a6c0097114 100644 --- a/mozilla/xpcom/idl/makefile.win +++ b/mozilla/xpcom/idl/makefile.win @@ -23,6 +23,7 @@ XPIDLSRCS= .\nsrootidl.idl \ .\nsIEnumerator.idl \ .\nsIFactory.idl \ .\nsICollection.idl \ + .\nsIFileSpec.idl \ $(NULL) include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/xpcom/idl/nsIFileSpec.idl b/mozilla/xpcom/idl/nsIFileSpec.idl new file mode 100644 index 00000000000..f3101296473 --- /dev/null +++ b/mozilla/xpcom/idl/nsIFileSpec.idl @@ -0,0 +1,157 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +// This is the only correct cross-platform way to specify a file. +// Strings are not such a way. If you grew up on windows or unix, you +// may think they are. Welcome to reality. + +#include "nsISupports.idl" + +%{C++ +#include "nscore.h" // for NS_BASE + +// Start commenting out the C++ versions of the below in the output header +#if 0 +%} +[ref] native nsStringRef(nsString); +native StandardFilterMask(nsIFileSpec::StandardFilterMask); +%{C++ +// End commenting out the C++ versions of the above in the output header +#endif +%} + +interface nsIFileURL; +interface nsIFilePath; + +[scriptable, uuid(d8c0a080-0868-11d3-915f-d9d889d48e3c)] +interface nsIFileSpec : nsISupports +{ + void fromFileSpec([const] in nsIFileSpec original); +%{C++ + // + // The "choose" functions present the file picker UI in order to set the + // value of the file spec. +%} + void chooseOutputFile(in string windowTitle, in string suggestedLeafName); + +%{C++ + // The mask for standard filters is given as follows: + enum StandardFilterMask + { + eAllReadable = (1<<0) + , eHTMLFiles = (1<<1) + , eXMLFiles = (1<<2) + , eImageFiles = (1<<3) + , eAllFiles = (1<<4) + + // Mask containing all the above default filters + , eAllStandardFilters = ( + eAllReadable + | eHTMLFiles + | eXMLFiles + | eImageFiles + | eAllFiles) + + // The "extra filter" bit should be set if the "extra filter" + // is passed in to chooseInputFile. + , eExtraFilter = (1<<31) + }; + enum { kNumStandardFilters = 5 }; +%} + void chooseInputFile( + in string title + , in StandardFilterMask standardFilterMask + , in string extraFilterTitle + , in string extraFilter + ); + void chooseDirectory(in string title); + + attribute string URLString; + attribute string UnixStyleFilePath; + attribute string PersistentDescriptorString; + attribute string NativePath; + + readonly attribute string NSPRPath; + + void error(); + + boolean isValid(); + boolean failed(); + + attribute string LeafName; + + readonly attribute nsIFileSpec Parent; + + void makeUnique(); + void makeUniqueWithSuggestedName(in string suggestedName); + + readonly attribute unsigned long ModDate; + boolean modDateChanged(in unsigned long oldStamp); + + boolean isDirectory(); + boolean isFile(); + boolean exists(); + + readonly attribute unsigned long FileSize; + readonly attribute unsigned long DiskSpaceAvailable; + + void AppendRelativeUnixPath(in string relativePath); + + void createDir(); + void rename([const] in string newLeafName); + void copyToDir([const] in nsIFileSpec newParentDir); + void moveToDir([const] in nsIFileSpec newParentDir); + void execute([const] in string args); + + void openStreamForReading(); + void openStreamForWriting(); + void openStreamForReadingAndWriting(); + void closeStream(); + boolean isStreamOpen(); + + boolean eof(); + long read(inout string buffer, in long requestedCount); + void readLine(inout string line, in long bufferSize, out boolean wasTruncated); +%{C++ + // Check eof() before each call. + // CAUTION: false result only indicates line was truncated + // to fit buffer, or an error occurred (OTHER THAN eof). +%} + long write(in string data, in long requestedCount); + void flush(); + + void seek(in long offset); + long tell(); + void endline(); + +}; + +[scriptable, uuid(d8c0a083-0868-11d3-915f-d9d889d48e3c)] +interface nsIDirectoryIterator : nsISupports +{ + void Init(in nsIFileSpec parent); + boolean exists(); + void next(); + readonly attribute nsIFileSpec currentSpec; +}; + +%{C++ +// Factory methods +NS_BASE nsresult NS_NewFileSpec(nsIFileSpec** result); +NS_BASE nsresult NS_NewDirectoryIterator(nsIDirectoryIterator** result); +%} diff --git a/mozilla/xpcom/io/MANIFEST b/mozilla/xpcom/io/MANIFEST new file mode 100644 index 00000000000..700dbf1c768 --- /dev/null +++ b/mozilla/xpcom/io/MANIFEST @@ -0,0 +1,13 @@ +nsEscape.h +nsFileSpec.h +nsFileSpecStreaming.h +nsFileStream.h +nsIFileWidget.h +nsIBaseStream.h +nsIByteBufferInputStream.h +nsIFileStream.h +nsIInputStream.h +nsIOutputStream.h +nsIStringStream.h +nsIUnicharInputStream.h +nsSpecialSystemDirectory.h diff --git a/mozilla/xpcom/io/MANIFEST_IDL b/mozilla/xpcom/io/MANIFEST_IDL new file mode 100644 index 00000000000..67e5fa15cf8 --- /dev/null +++ b/mozilla/xpcom/io/MANIFEST_IDL @@ -0,0 +1 @@ +nsIFileSpec.idl \ No newline at end of file diff --git a/mozilla/xpcom/io/Makefile.in b/mozilla/xpcom/io/Makefile.in index 7b0c5e24f7a..066425abe89 100644 --- a/mozilla/xpcom/io/Makefile.in +++ b/mozilla/xpcom/io/Makefile.in @@ -28,17 +28,22 @@ LIBRARY_NAME = xpcomio_s MODULE = xpcom +XPIDL_MODULE = xpcom_io + XPIDLSRCS = \ + nsIFileSpec.idl \ $(NULL) -CPPSRCS = \ +CPPSRCS = \ nsByteBufferInputStream.cpp \ nsEscape.cpp \ nsFileSpec.cpp \ nsFileSpecStreaming.cpp \ nsFileStream.cpp \ + nsFileSpecImpl.cpp \ nsIFileStream.cpp \ nsIStringStream.cpp \ + nsPipe.cpp \ nsSpecialSystemDirectory.cpp \ nsUnicharInputStream.cpp \ $(NULL) @@ -51,6 +56,7 @@ EXPORTS = \ nsIBaseStream.h \ nsIByteBufferInputStream.h \ nsIFileStream.h \ + nsIFileWidget.h \ nsIInputStream.h \ nsIOutputStream.h \ nsIStringStream.h \ diff --git a/mozilla/xpcom/io/makefile.win b/mozilla/xpcom/io/makefile.win index 65bce12162b..dd480e271ba 100644 --- a/mozilla/xpcom/io/makefile.win +++ b/mozilla/xpcom/io/makefile.win @@ -31,6 +31,7 @@ EXPORTS = \ nsIBaseStream.h \ nsIByteBufferInputStream.h \ nsIFileStream.h \ + nsIFileWidget.h \ nsIInputStream.h \ nsIOutputStream.h \ nsIStringStream.h \ @@ -38,7 +39,23 @@ EXPORTS = \ nsSpecialSystemDirectory.h \ $(NULL) -XPIDLSRCS = \ +NO_XPT_GEN=1 +XPILD_MODULE = xpcom_io + +XPIDLSRCS = \ + .\nsIFileSpec.idl \ + $(NULL) + +xXPIDLSRCS = \ + .\nsIUri.idl \ + .\nsIUrl.idl \ + .\nsIIOService.idl \ + .\nsIIOSpec.idl \ + .\nsIFileSpec.idl \ + .\nsIStreamObserver.idl \ + .\nsIBaseStream.idl \ + .\nsIInputStream.idl \ + .\nsIOutputStream.idl \ $(NULL) ################################################################################ @@ -52,16 +69,20 @@ LINCS = \ -I$(PUBLIC)\unicharutil \ $(NULL) +LINCS = $(LINCS) -I$(PUBLIC)\raptor # until we sort out the filespec/widgets dependency + LCFLAGS = -D_IMPL_NS_COM -D_IMPL_NS_BASE -DWIN32_LEAN_AND_MEAN CPP_OBJS = \ .\$(OBJDIR)\nsByteBufferInputStream.obj \ .\$(OBJDIR)\nsEscape.obj \ .\$(OBJDIR)\nsFileSpec.obj \ + .\$(OBJDIR)\nsFileSpecImpl.obj \ .\$(OBJDIR)\nsFileSpecStreaming.obj \ .\$(OBJDIR)\nsFileStream.obj \ .\$(OBJDIR)\nsIFileStream.obj \ .\$(OBJDIR)\nsIStringStream.obj \ + .\$(OBJDIR)\nsPipe.obj \ .\$(OBJDIR)\nsSpecialSystemDirectory.obj \ .\$(OBJDIR)\nsUnicharInputStream.obj \ $(NULL) diff --git a/mozilla/xpcom/io/nsByteBufferInputStream.cpp b/mozilla/xpcom/io/nsByteBufferInputStream.cpp index acbef95e5aa..ddd52c351fa 100644 --- a/mozilla/xpcom/io/nsByteBufferInputStream.cpp +++ b/mozilla/xpcom/io/nsByteBufferInputStream.cpp @@ -16,164 +16,9 @@ * Reserved. */ -#include "nsIByteBufferInputStream.h" -#include "nsCRT.h" +#include "nsByteBufferInputStream.h" #include "prcmon.h" -class nsByteBufferInputStream; - -//////////////////////////////////////////////////////////////////////////////// - -class nsByteBufferOutputStream : public nsIOutputStream -{ -public: - NS_DECL_ISUPPORTS - - // nsIBaseStream methods: - NS_IMETHOD Close(void); - - // nsIOutputStream methods: - NS_IMETHOD Write(const char* aBuf, PRUint32 aCount, PRUint32 *aWriteCount); - NS_IMETHOD Write(nsIInputStream* fromStream, PRUint32 *aWriteCount); - NS_IMETHOD Flush(void); - - // nsByteBufferOutputStream methods: - nsByteBufferOutputStream(nsByteBufferInputStream* in); - virtual ~nsByteBufferOutputStream(); - -protected: - nsByteBufferInputStream* mInputStream; -}; - -//////////////////////////////////////////////////////////////////////////////// - -class nsByteBufferInputStream : public nsIByteBufferInputStream -{ -public: - NS_DECL_ISUPPORTS - - // nsIBaseStream methods: - NS_IMETHOD Close(void); - - // nsIInputStream methods: - NS_IMETHOD GetLength(PRUint32 *aLength); - NS_IMETHOD Read(char* aBuf, PRUint32 aCount, PRUint32 *aReadCount); - - // nsIByteBufferInputStream methods: - NS_IMETHOD Fill(nsIInputStream* stream, PRUint32 *aWriteCount); - NS_IMETHOD Fill(const char* aBuf, PRUint32 aCount, PRUint32 *aWriteCount); - - // nsByteBufferInputStream methods: - nsByteBufferInputStream(PRBool blocking, PRUint32 size); - virtual ~nsByteBufferInputStream(); - - friend class nsByteBufferOutputStream; - - nsresult Init(void); - nsresult SetEOF(void); - nsresult Drain(void); - - PRBool AtEOF() { return mEOF && (mReadCursor == mWriteCursor) && !mFull; } - - PRUint32 ReadableAmount() { - if (mReadCursor < mWriteCursor) - return mWriteCursor - mReadCursor; - else if (mReadCursor == mWriteCursor && !mFull) - return 0; - else - return (mLength - mReadCursor) + mWriteCursor; - } - - PRUint32 WritableAmount() { - if (mWriteCursor < mReadCursor) - return mWriteCursor - mReadCursor; - else if (mReadCursor == mWriteCursor && mFull) - return 0; - else - return (mLength - mWriteCursor) + mReadCursor; - } - - void ReadChunk(char* toBuf, PRUint32 max, - PRUint32 end, PRUint32 *totalRef) - { - NS_ASSERTION(mReadCursor <= end, "bad range"); - PRUint32 diff = end - mReadCursor; - PRInt32 amt = PR_MIN(max, diff); - if (amt > 0) { - nsCRT::memcpy(toBuf, &mBuffer[mReadCursor], amt); -#ifdef DEBUG_warren -// nsCRT::memset(&mBuffer[mReadCursor], 0xDD, amt); -#endif - mReadCursor += amt; - *totalRef += amt; - } - } - - nsresult WriteChunk(nsIInputStream* in, - PRUint32 end, PRUint32 *totalRef) - { - NS_ASSERTION(mWriteCursor <= end, "bad range"); - PRUint32 amt = end - mWriteCursor; - if (amt > 0) { - PRUint32 readAmt; - nsresult rv = in->Read(&mBuffer[mWriteCursor], amt, &readAmt); - if (NS_FAILED(rv)) return rv; - mWriteCursor += readAmt; - *totalRef += readAmt; - } - return NS_OK; - } - -protected: - char* mBuffer; - PRUint32 mLength; - PRUint32 mReadCursor; - PRUint32 mWriteCursor; - PRBool mFull; - PRBool mClosed; - PRBool mEOF; - PRBool mBlocking; -}; - -//////////////////////////////////////////////////////////////////////////////// - -class nsDummyBufferStream : public nsIInputStream -{ -public: - NS_DECL_ISUPPORTS - - // nsIBaseStream methods: - NS_IMETHOD Close(void) { - NS_NOTREACHED("nsDummyBufferStream::Close"); - return NS_ERROR_FAILURE; - } - - // nsIInputStream methods: - NS_IMETHOD GetLength(PRUint32 *aLength) { - *aLength = mLength; - return NS_OK; - } - NS_IMETHOD Read(char* aBuf, PRUint32 aCount, PRUint32 *aReadCount) { - PRUint32 amt = PR_MIN(aCount, mLength); - if (amt > 0) { - nsCRT::memcpy(aBuf, mBuffer, amt); - mBuffer += amt; - mLength -= amt; - } - *aReadCount = amt; - return NS_OK; - } - - // nsDummyBufferStream methods: - nsDummyBufferStream(const char* buffer, PRUint32 length) - : mBuffer(buffer), mLength(length) {} - virtual ~nsDummyBufferStream() {} - -protected: - const char* mBuffer; - PRUint32 mLength; -}; - NS_IMETHODIMP nsDummyBufferStream::QueryInterface(REFNSIID aIID, void** aInstancePtr) { @@ -523,7 +368,7 @@ nsByteBufferOutputStream::Flush(void) //////////////////////////////////////////////////////////////////////////////// -NS_BASE nsresult +NS_COM nsresult NS_NewByteBufferInputStream(nsIByteBufferInputStream* *result, PRBool blocking, PRUint32 size) { @@ -545,7 +390,7 @@ NS_NewByteBufferInputStream(nsIByteBufferInputStream* *result, //////////////////////////////////////////////////////////////////////////////// -NS_BASE nsresult +NS_COM nsresult NS_NewPipe(nsIInputStream* *inStrResult, nsIOutputStream* *outStrResult, PRBool blocking, PRUint32 size) diff --git a/mozilla/xpcom/io/nsEscape.cpp b/mozilla/xpcom/io/nsEscape.cpp index e09194d0bd0..de16ec70b1e 100644 --- a/mozilla/xpcom/io/nsEscape.cpp +++ b/mozilla/xpcom/io/nsEscape.cpp @@ -54,7 +54,7 @@ const int netCharType[256] = #define HEX_ESCAPE '%' //---------------------------------------------------------------------------------------- -NS_BASE char* nsEscape(const char * str, nsEscapeMask mask) +NS_COM char* nsEscape(const char * str, nsEscapeMask mask) //---------------------------------------------------------------------------------------- { if(!str) @@ -63,7 +63,7 @@ NS_BASE char* nsEscape(const char * str, nsEscapeMask mask) } //---------------------------------------------------------------------------------------- -NS_BASE char* nsEscapeCount( +NS_COM char* nsEscapeCount( const char * str, PRInt32 len, nsEscapeMask mask, @@ -129,7 +129,7 @@ NS_BASE char* nsEscapeCount( } //---------------------------------------------------------------------------------------- -NS_BASE char* nsUnescape(char * str) +NS_COM char* nsUnescape(char * str) //---------------------------------------------------------------------------------------- { nsUnescapeCount(str); @@ -137,7 +137,7 @@ NS_BASE char* nsUnescape(char * str) } //---------------------------------------------------------------------------------------- -NS_BASE PRInt32 nsUnescapeCount(char * str) +NS_COM PRInt32 nsUnescapeCount(char * str) //---------------------------------------------------------------------------------------- { register char *src = str; @@ -168,7 +168,7 @@ NS_BASE PRInt32 nsUnescapeCount(char * str) } /* NET_UnEscapeCnt */ -NS_BASE char * +NS_COM char * nsEscapeHTML(const char * string) { char *rv = (char *) PR_Malloc(PL_strlen(string)*4 + 1); /* The +1 is for diff --git a/mozilla/xpcom/io/nsEscape.h b/mozilla/xpcom/io/nsEscape.h index c6579d81233..105b2500f67 100644 --- a/mozilla/xpcom/io/nsEscape.h +++ b/mozilla/xpcom/io/nsEscape.h @@ -34,26 +34,26 @@ typedef enum { #ifdef __cplusplus extern "C" { #endif -NS_BASE char * nsEscape(const char * str, nsEscapeMask mask); +NS_COM char * nsEscape(const char * str, nsEscapeMask mask); /* Caller must use delete [] on the result */ -NS_BASE char * nsUnescape(char * str); +NS_COM char * nsUnescape(char * str); /* decode % escaped hex codes into character values, * modifies the parameter, returns the same buffer */ -NS_BASE char * nsEscapeCount(const char * str, PRInt32 len, nsEscapeMask mask, PRInt32* out_len); +NS_COM char * nsEscapeCount(const char * str, PRInt32 len, nsEscapeMask mask, PRInt32* out_len); /* Like nsEscape, but if out_len is non-null, return result string length * in *out_len, and uses len instead of NUL termination. * Caller must use delete [] on the result. */ -NS_BASE PRInt32 nsUnescapeCount (char * str); +NS_COM PRInt32 nsUnescapeCount (char * str); /* decode % escaped hex codes into character values, * modifies the parameter buffer, returns the length of the result * (result may contain \0's). */ -NS_BASE char * +NS_COM char * nsEscapeHTML(const char * string); /* * Escape problem char's for HTML display diff --git a/mozilla/xpcom/io/nsFileSpec.cpp b/mozilla/xpcom/io/nsFileSpec.cpp index 1dfc459a3f3..6422d811025 100644 --- a/mozilla/xpcom/io/nsFileSpec.cpp +++ b/mozilla/xpcom/io/nsFileSpec.cpp @@ -437,11 +437,11 @@ void nsFileSpecHelpers::MakeAllDirectories(const char* inPath, int mode) #endif // XP_PC || XP_UNIX #if defined(XP_PC) -#include "windows/nsFileSpecWin.cpp" // Windows-specific implementations +#include "nsFileSpecWin.cpp" // Windows-specific implementations #elif defined(XP_MAC) #include "nsFileSpecMac.cpp" // Macintosh-specific implementations #elif defined(XP_UNIX) -#include "unix/nsFileSpecUnix.cpp" // Unix-specific implementations +#include "nsFileSpecUnix.cpp" // Unix-specific implementations #endif //======================================================================================== diff --git a/mozilla/xpcom/io/nsFileSpec.h b/mozilla/xpcom/io/nsFileSpec.h index 4360437be81..e235f46cff0 100644 --- a/mozilla/xpcom/io/nsFileSpec.h +++ b/mozilla/xpcom/io/nsFileSpec.h @@ -179,7 +179,7 @@ nsresult ns_file_convert_result(PRInt32 nativeErr); #define NS_FILE_FAILURE NS_FILE_RESULT(-1) //======================================================================================== -class NS_BASE nsAutoCString +class NS_COM nsAutoCString // // This should be in nsString.h, but the owner would not reply to my proposal. After four // weeks, I decided to put it in here. @@ -209,7 +209,7 @@ protected: }; // class nsAutoCString //======================================================================================== -class NS_BASE nsSimpleCharString +class NS_COM nsSimpleCharString // An envelope for char*: reference counted. Used internally by all the nsFileSpec // classes below. //======================================================================================== @@ -282,7 +282,7 @@ protected: }; // class nsSimpleCharString //======================================================================================== -class NS_BASE nsFileSpec +class NS_COM nsFileSpec // This is whatever each platform really prefers to describe files as. Declared first // because the other two types have an embedded nsFileSpec object. //======================================================================================== @@ -501,7 +501,7 @@ class NS_BASE nsFileSpec typedef nsFileSpec nsNativeFileSpec; //======================================================================================== -class NS_BASE nsFileURL +class NS_COM nsFileURL // This is an escaped string that looks like "file:///foo/bar/mumble%20fish". Since URLs // are the standard way of doing things in mozilla, this allows a string constructor, // which just stashes the string with no conversion. @@ -558,7 +558,7 @@ class NS_BASE nsFileURL }; // class nsFileURL //======================================================================================== -class NS_BASE nsFilePath +class NS_COM nsFilePath // This is a string that looks like "/foo/bar/mumble fish". Same as nsFileURL, but // without the "file:// prefix", and NOT %20 ENCODED! Strings passed in must be // valid unix-style paths in this format. @@ -612,7 +612,7 @@ class NS_BASE nsFilePath }; // class nsFilePath //======================================================================================== -class NS_BASE nsPersistentFileDescriptor +class NS_COM nsPersistentFileDescriptor // To save information about a file's location in another file, initialize // one of these from your nsFileSpec, and then write this out to your output stream. // To retrieve the info, create one of these, read its value from an input stream. @@ -622,13 +622,13 @@ class NS_BASE nsPersistentFileDescriptor public: nsPersistentFileDescriptor() {} // For use prior to reading in from a stream - nsPersistentFileDescriptor(const nsPersistentFileDescriptor& inPath); + nsPersistentFileDescriptor(const nsPersistentFileDescriptor& inEncodedData); virtual ~nsPersistentFileDescriptor(); - void operator = (const nsPersistentFileDescriptor& inPath); + void operator = (const nsPersistentFileDescriptor& inEncodedData); // Conversions - NS_EXPLICIT nsPersistentFileDescriptor(const nsFileSpec& inPath); - void operator = (const nsFileSpec& inPath); + NS_EXPLICIT nsPersistentFileDescriptor(const nsFileSpec& inSpec); + void operator = (const nsFileSpec& inSpec); // The following four functions are declared here (as friends). Their implementations // are in mozilla/base/src/nsFileSpecStreaming.cpp. @@ -636,9 +636,9 @@ class NS_BASE nsPersistentFileDescriptor friend nsresult Read(nsIInputStream* aStream, nsPersistentFileDescriptor&); friend nsresult Write(nsIOutputStream* aStream, const nsPersistentFileDescriptor&); // writes the data to a file - friend NS_BASE nsInputStream& operator >> (nsInputStream&, nsPersistentFileDescriptor&); + friend NS_COM nsInputStream& operator >> (nsInputStream&, nsPersistentFileDescriptor&); // reads the data from a file - friend NS_BASE nsOutputStream& operator << (nsOutputStream&, const nsPersistentFileDescriptor&); + friend NS_COM nsOutputStream& operator << (nsOutputStream&, const nsPersistentFileDescriptor&); // writes the data to a file friend class nsFileSpec; @@ -658,7 +658,7 @@ class NS_BASE nsPersistentFileDescriptor }; // class nsPersistentFileDescriptor //======================================================================================== -class NS_BASE nsDirectoryIterator +class NS_COM nsDirectoryIterator // Example: // // nsFileSpec parentDir(...); // directory over whose children we shall iterate @@ -721,7 +721,7 @@ class NS_BASE nsDirectoryIterator }; // class nsDirectoryIterator //======================================================================================== -class NS_BASE nsNSPRPath +class NS_COM nsNSPRPath // This class will allow you to pass any one of the nsFile* classes directly into NSPR // without the need to worry about whether you have the right kind of filepath or not. // It will also take care of cleaning up any allocated memory. diff --git a/mozilla/xpcom/io/nsFileSpecImpl.cpp b/mozilla/xpcom/io/nsFileSpecImpl.cpp new file mode 100644 index 00000000000..6a525f9c7a6 --- /dev/null +++ b/mozilla/xpcom/io/nsFileSpecImpl.cpp @@ -0,0 +1,907 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +#include "nsIFileSpec.h" // Always first, to ensure that it compiles alone. + +#include "nsFileSpec.h" +#include "nsIFileStream.h" +#include "nsFileStream.h" + +#include "nsIFileWidget.h" +#include "nsWidgetsCID.h" + +static NS_DEFINE_IID(kCFileWidgetCID, NS_FILEWIDGET_CID); + +#include "nsIComponentManager.h" + +#include "prmem.h" + +#ifdef NS_DEBUG +#define TEST_OUT_PTR(p) \ + if (!(p)) \ + return NS_ERROR_NULL_POINTER; +#else +#define TEST_OUT_PTR(p) +#endif +//======================================================================================== +class nsFileSpecImpl +//======================================================================================== + : public nsIFileSpec +{ + + public: + + NS_DECL_ISUPPORTS + + NS_IMETHOD fromFileSpec(const nsIFileSpec *original); + NS_IMETHOD chooseOutputFile(const char *windowTitle, const char *suggestedLeafName); + + NS_IMETHOD chooseInputFile( + const char *title, + nsIFileSpec::StandardFilterMask standardFilterMask, + const char *extraFilterTitle, const char *extraFilter); + + NS_IMETHOD chooseDirectory(const char *title); + + NS_IMETHOD GetURLString(char * *aURLString); + NS_IMETHOD SetURLString(char * aURLString); + + /* attribute string UnixStyleFilePath; */ + NS_IMETHOD GetUnixStyleFilePath(char * *aUnixStyleFilePath); + NS_IMETHOD SetUnixStyleFilePath(char * aUnixStyleFilePath); + + /* attribute string PersistentDescriptorString; */ + NS_IMETHOD GetPersistentDescriptorString(char * *aPersistentDescriptorString); + NS_IMETHOD SetPersistentDescriptorString(char * aPersistentDescriptorString); + + /* attribute string NativePath; */ + NS_IMETHOD GetNativePath(char * *aNativePath); + NS_IMETHOD SetNativePath(char * aNativePath); + + /* readonly attribute string NSPRPath; */ + NS_IMETHOD GetNSPRPath(char * *aNSPRPath); + + /* readonly attribute nsresult Error; */ + NS_IMETHOD error(); + + /* boolean isValid (); */ + NS_IMETHOD isValid(PRBool *_retval); + + /* boolean failed (); */ + NS_IMETHOD failed(PRBool *_retval); + + /* attribute string LeafName; */ + NS_IMETHOD GetLeafName(char * *aLeafName); + NS_IMETHOD SetLeafName(char * aLeafName); + + /* readonly attribute nsIFileSpec Parent; */ + NS_IMETHOD GetParent(nsIFileSpec * *aParent); + + /* nsIFileSpec makeUnique (); */ + NS_IMETHOD makeUnique(); + + /* nsIFileSpec makeUniqueWithSuggestedName (in string suggestedName); */ + NS_IMETHOD makeUniqueWithSuggestedName(const char* inSuggestedLeafName); + + /* readonly attribute unsigned long ModDate; */ + NS_IMETHOD GetModDate(PRUint32 *aModDate); + + /* boolean modDateChanged (in unsigned long oldStamp); */ + NS_IMETHOD modDateChanged(PRUint32 oldStamp, PRBool *_retval); + + /* boolean isDirectory (); */ + NS_IMETHOD isDirectory(PRBool *_retval); + + /* boolean isFile (); */ + NS_IMETHOD isFile(PRBool *_retval); + + /* boolean exists (); */ + NS_IMETHOD exists(PRBool *_retval); + + /* readonly attribute unsigned long FileSize; */ + NS_IMETHOD GetFileSize(PRUint32 *aFileSize); + + /* readonly attribute unsigned long DiskSpaceAvailable; */ + NS_IMETHOD GetDiskSpaceAvailable(PRUint32 *aDiskSpaceAvailable); + + /* nsIFileSpec AppendRelativeUnixPath (in string relativePath); */ + NS_IMETHOD AppendRelativeUnixPath(const char *relativePath); + + /* void createDir (); */ + NS_IMETHOD createDir(); + + /* void rename ([const] in string newLeafName); */ + NS_IMETHOD rename(const char *newLeafName); + + /* void copyToDir ([const] in nsIFileSpec newParentDir); */ + NS_IMETHOD copyToDir(const nsIFileSpec *newParentDir); + + /* void moveToDir ([const] in nsIFileSpec newParentDir); */ + NS_IMETHOD moveToDir(const nsIFileSpec *newParentDir); + + /* void execute ([const] in string args); */ + NS_IMETHOD execute(const char *args); + + /* void openStreamForReading (); */ + NS_IMETHOD openStreamForReading(); + + /* void openStreamForWriting (); */ + NS_IMETHOD openStreamForWriting(); + + /* void openStreamForReadingAndWriting (); */ + NS_IMETHOD openStreamForReadingAndWriting(); + + /* void close (); */ + NS_IMETHOD closeStream(); + + /* boolean isOpen (); */ + NS_IMETHOD isStreamOpen(PRBool *_retval); + + /* boolean eof (); */ + NS_IMETHOD eof(PRBool *_retval); + + NS_IMETHOD read(char** buffer, PRInt32 requestedCount, PRInt32 *_retval); + + NS_IMETHOD readLine(char** line, PRInt32 bufferSize, PRBool *wasTruncated); + // Check eof() before each call. + // CAUTION: false result only indicates line was truncated + // to fit buffer, or an error occurred (OTHER THAN eof). + + + NS_IMETHOD write(const char* data, PRInt32 requestedCount, PRInt32 *_retval); + + /* void flush (); */ + NS_IMETHOD flush(); + + /* void seek (in long offset); */ + NS_IMETHOD seek(PRInt32 offset); + + /* long tell (); */ + NS_IMETHOD tell(PRInt32 *_retval); + + /* void endline (); */ + NS_IMETHOD endline(); + + //---------------------- + // Implementation + //---------------------- + + nsFileSpecImpl(); + nsFileSpecImpl(const nsFileSpec& inSpec); + virtual ~nsFileSpecImpl(); + static nsresult MakeInterface(const nsFileSpec& inSpec, nsIFileSpec** outSpec); + + //---------------------- + // Data + //---------------------- + + nsFileSpec mFileSpec; + nsIInputStream* mInputStream; + nsIOutputStream* mOutputStream; + +}; // class nsFileSpecImpl + +//static NS_DEFINE_IID(kIFileSpecIID, NS_IFILESPEC_IID); +NS_IMPL_ISUPPORTS(nsFileSpecImpl, nsIFileSpec::GetIID()) + +//---------------------------------------------------------------------------------------- +nsFileSpecImpl::nsFileSpecImpl() +//---------------------------------------------------------------------------------------- + : mInputStream(nsnull) + , mOutputStream(nsnull) +{ + NS_INIT_ISUPPORTS(); +} + +//---------------------------------------------------------------------------------------- +nsFileSpecImpl::nsFileSpecImpl(const nsFileSpec& inSpec) +//---------------------------------------------------------------------------------------- + : mFileSpec(inSpec) + , mInputStream(nsnull) + , mOutputStream(nsnull) +{ + NS_INIT_ISUPPORTS(); +} + +//---------------------------------------------------------------------------------------- +nsFileSpecImpl::~nsFileSpecImpl() +//---------------------------------------------------------------------------------------- +{ + closeStream(); +} + +//---------------------------------------------------------------------------------------- +/* static */ +nsresult nsFileSpecImpl::MakeInterface(const nsFileSpec& inSpec, nsIFileSpec** result) +//---------------------------------------------------------------------------------------- +{ + nsFileSpecImpl* it = new nsFileSpecImpl(inSpec); + if (!it) + return NS_ERROR_OUT_OF_MEMORY; + return it->QueryInterface(nsIFileSpec::GetIID(), (void **) result); +} // nsFileSpecImpl::MakeInterface + +#define FILESPEC(ifilespec) ((nsFileSpecImpl*)ifilespec)->mFileSpec + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::fromFileSpec(const nsIFileSpec *original) +//---------------------------------------------------------------------------------------- +{ + mFileSpec = FILESPEC(original); + return mFileSpec.Error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::chooseOutputFile( + const char *windowTitle, + const char *suggestedLeafName) +//---------------------------------------------------------------------------------------- +{ + nsCOMPtr fileWidget; + nsresult rv = nsComponentManager::CreateInstance( + kCFileWidgetCID, + nsnull, + nsIFileWidget::GetIID(), + (void**)getter_AddRefs(fileWidget)); + if (NS_FAILED(rv)) + return rv; + + fileWidget->SetDefaultString(suggestedLeafName); + nsFileDlgResults result = fileWidget->PutFile(nsnull, windowTitle, mFileSpec); + if ( result != nsFileDlgResults_OK) + return NS_FILE_FAILURE; + if (mFileSpec.Exists() && result != nsFileDlgResults_Replace) + return NS_FILE_FAILURE; + return NS_OK; +} // nsFileSpecImpl::chooseOutputFile + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::chooseInputFile( + const char *inTitle, + nsIFileSpec::StandardFilterMask inMask, + const char *inExtraFilterTitle, const char *inExtraFilter) +//---------------------------------------------------------------------------------------- +{ + nsresult rv = NS_OK; + nsString* nextTitle; + nsString* nextFilter; + nsCOMPtr fileWidget; + rv = nsComponentManager::CreateInstance( + kCFileWidgetCID, + nsnull, + nsIFileWidget::GetIID(), + (void**)getter_AddRefs(fileWidget)); + if (NS_FAILED(rv)) + return rv; + nsString* titles = nsnull; + nsString* filters = nsnull; + titles = new nsString[1 + kNumStandardFilters]; + if (!titles) + { + rv = NS_ERROR_OUT_OF_MEMORY; + goto Clean; + } + filters = new nsString[1 + kNumStandardFilters]; + if (!filters) + { + rv = NS_ERROR_OUT_OF_MEMORY; + goto Clean; + } + nextTitle = titles; + nextFilter = filters; + if (inMask & eAllReadable) + { + *nextTitle++ = "All Readable Files"; + *nextFilter++ = "*.htm; *.html; *.xml; *.gif; *.jpg; *.jpeg; *.png"; + } + if (inMask & eHTMLFiles) + { + *nextTitle++ = "HTML Files"; + *nextFilter++ = "*.htm; *.html"; + } + if (inMask & eXMLFiles) + { + *nextTitle++ = "XML Files"; + *nextFilter++ = "*.xml"; + } + if (inMask & eImageFiles) + { + *nextTitle++ = "Image Files"; + *nextFilter++ = "*.gif; *.jpg; *.jpeg; *.png"; + } + if (inMask & eExtraFilter) + { + *nextTitle++ = inExtraFilterTitle; + *nextFilter++ = inExtraFilter; + } + if (inMask & eAllFiles) + { + *nextTitle++ = "All Files"; + *nextFilter++ = "*.*"; + } + + fileWidget->SetFilterList(nextFilter - filters, titles, filters); + if (fileWidget->GetFile(nsnull, inTitle, mFileSpec) != nsFileDlgResults_OK) + rv = NS_FILE_FAILURE; + +Clean: + delete [] titles; + delete [] filters; + return rv; +} // nsFileSpecImpl::chooseInputFile + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::chooseDirectory(const char *title) +//---------------------------------------------------------------------------------------- +{ + nsCOMPtr fileWidget; + nsresult rv = nsComponentManager::CreateInstance( + kCFileWidgetCID, + nsnull, + nsIFileWidget::GetIID(), + (void**)getter_AddRefs(fileWidget)); + if (NS_FAILED(rv)) + return rv; + if (fileWidget->GetFolder(nsnull, title, mFileSpec) != nsFileDlgResults_OK) + rv = NS_FILE_FAILURE; + return NS_OK; +} // nsFileSpecImpl::chooseDirectory + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::GetURLString(char * *aURLString) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(aURLString) + if (mFileSpec.Failed()) + return mFileSpec.Error(); + nsFileURL url(mFileSpec); + *aURLString = nsCRT::strdup(url.GetURLString()); + if (!*aURLString) + return NS_ERROR_OUT_OF_MEMORY; + return NS_OK; +} // nsFileSpecImpl::GetURLString + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::SetURLString(char * aURLString) +//---------------------------------------------------------------------------------------- +{ + mFileSpec = nsFileURL(aURLString); + return NS_OK; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::GetUnixStyleFilePath(char * *aUnixStyleFilePath) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(aUnixStyleFilePath) + if (mFileSpec.Failed()) + return mFileSpec.Error(); + nsFilePath path(mFileSpec); + *aUnixStyleFilePath = nsCRT::strdup((const char*) path); + if (!*aUnixStyleFilePath) + return NS_ERROR_OUT_OF_MEMORY; + return NS_OK; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::SetUnixStyleFilePath(char * aUnixStyleFilePath) +//---------------------------------------------------------------------------------------- +{ + mFileSpec = nsFilePath(aUnixStyleFilePath); + return NS_OK; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::GetPersistentDescriptorString(char * *aPersistentDescriptorString) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(aPersistentDescriptorString) + if (mFileSpec.Failed()) + return mFileSpec.Error(); + nsPersistentFileDescriptor desc(mFileSpec); + nsSimpleCharString data; + desc.GetData(data); + *aPersistentDescriptorString = nsCRT::strdup((const char*) data); + if (!*aPersistentDescriptorString) + return NS_ERROR_OUT_OF_MEMORY; + return NS_OK; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::SetPersistentDescriptorString(char * aPersistentDescriptorString) +//---------------------------------------------------------------------------------------- +{ + nsPersistentFileDescriptor desc(mFileSpec); + desc.SetData(aPersistentDescriptorString); + mFileSpec = desc; + return NS_OK; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::GetNativePath(char * *aNativePath) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(aNativePath) + if (mFileSpec.Failed()) + return mFileSpec.Error(); + *aNativePath = nsCRT::strdup(mFileSpec.GetNativePathCString()); + if (!*aNativePath) + return NS_ERROR_OUT_OF_MEMORY; + return NS_OK; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::SetNativePath(char * aNativePath) +//---------------------------------------------------------------------------------------- +{ + mFileSpec = aNativePath; + return NS_OK; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::GetNSPRPath(char * *aNSPRPath) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(aNSPRPath) + if (mFileSpec.Failed()) + return mFileSpec.Error(); + nsNSPRPath path(mFileSpec); + *aNSPRPath = nsCRT::strdup((const char*) path); + if (!*aNSPRPath) + return NS_ERROR_OUT_OF_MEMORY; + return NS_OK; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::error() +//---------------------------------------------------------------------------------------- +{ + return mFileSpec.Error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::isValid(PRBool *_retval) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(_retval) + *_retval = mFileSpec.Valid(); + return NS_OK; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::failed(PRBool *_retval) +//---------------------------------------------------------------------------------------- +{ + *_retval = mFileSpec.Failed(); + return NS_OK; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::GetLeafName(char * *aLeafName) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(aLeafName) + *aLeafName = mFileSpec.GetLeafName(); + return mFileSpec.Error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::SetLeafName(char * aLeafName) +//---------------------------------------------------------------------------------------- +{ + mFileSpec.SetLeafName(aLeafName); + return mFileSpec.Error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::GetParent(nsIFileSpec * *aParent) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(aParent) + nsFileSpec parent; + mFileSpec.GetParent(parent); + return MakeInterface(parent, aParent); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::makeUnique() +//---------------------------------------------------------------------------------------- +{ + mFileSpec.MakeUnique(); + return mFileSpec.Error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::makeUniqueWithSuggestedName(const char *suggestedName) +//---------------------------------------------------------------------------------------- +{ + mFileSpec.MakeUnique(suggestedName); + return mFileSpec.Error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::GetModDate(PRUint32 *aModDate) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(aModDate) + nsFileSpec::TimeStamp stamp; + mFileSpec.GetModDate(stamp); + *aModDate = stamp; + return mFileSpec.Error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::modDateChanged(PRUint32 oldStamp, PRBool *_retval) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(_retval) + *_retval = mFileSpec.ModDateChanged(oldStamp); + return mFileSpec.Error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::isDirectory(PRBool *_retval) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(_retval) + *_retval = mFileSpec.IsDirectory(); + return mFileSpec.Error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::isFile(PRBool *_retval) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(_retval) + *_retval = mFileSpec.IsFile(); + return mFileSpec.Error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::exists(PRBool *_retval) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(_retval) + *_retval = mFileSpec.Exists(); + return mFileSpec.Error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::GetFileSize(PRUint32 *aFileSize) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(aFileSize) + *aFileSize = mFileSpec.GetFileSize(); + return mFileSpec.Error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::GetDiskSpaceAvailable(PRUint32 *aDiskSpaceAvailable) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(aDiskSpaceAvailable) + *aDiskSpaceAvailable = mFileSpec.GetDiskSpaceAvailable(); + return mFileSpec.Error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::AppendRelativeUnixPath(const char *relativePath) +//---------------------------------------------------------------------------------------- +{ + mFileSpec += relativePath; + return mFileSpec.Error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::createDir() +//---------------------------------------------------------------------------------------- +{ + mFileSpec.CreateDir(); + return mFileSpec.Error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::rename(const char *newLeafName) +//---------------------------------------------------------------------------------------- +{ + return mFileSpec.Rename(newLeafName); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::copyToDir(const nsIFileSpec *newParentDir) +//---------------------------------------------------------------------------------------- +{ + return mFileSpec.Copy(FILESPEC(newParentDir)); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::moveToDir(const nsIFileSpec *newParentDir) +//---------------------------------------------------------------------------------------- +{ + return mFileSpec.Move(FILESPEC(newParentDir)); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::execute(const char *args) +//---------------------------------------------------------------------------------------- +{ + return mFileSpec.Execute(args); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::openStreamForReading() +//---------------------------------------------------------------------------------------- +{ + if (mInputStream || mOutputStream) + return NS_ERROR_FAILURE; + return NS_NewTypicalInputFileStream((nsISupports**)&mInputStream, mFileSpec); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::openStreamForWriting() +//---------------------------------------------------------------------------------------- +{ + if (mInputStream || mOutputStream) + return NS_ERROR_FAILURE; + return NS_NewTypicalOutputFileStream((nsISupports**)&mOutputStream, mFileSpec); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::openStreamForReadingAndWriting() +//---------------------------------------------------------------------------------------- +{ + if (mInputStream || mOutputStream) + return NS_ERROR_FAILURE; + nsresult result = NS_NewTypicalInputFileStream((nsISupports**)&mInputStream, mFileSpec); + if (NS_SUCCEEDED(result)) + result = NS_NewTypicalOutputFileStream((nsISupports**)&mOutputStream, mFileSpec); + return result; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::closeStream() +//---------------------------------------------------------------------------------------- +{ + NS_IF_RELEASE(mInputStream); + NS_IF_RELEASE(mOutputStream); + return NS_OK; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::isStreamOpen(PRBool *_retval) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(_retval) + *_retval = (mInputStream || mOutputStream); + return NS_OK; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::eof(PRBool *_retval) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(_retval) + if (!mInputStream) + return NS_ERROR_NULL_POINTER; + nsInputFileStream s(mInputStream); + *_retval = s.eof(); + return NS_OK; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::read(char** buffer, PRInt32 requestedCount, PRInt32 *_retval) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(_retval) + TEST_OUT_PTR(buffer) + if (!*buffer) + *buffer = (char*)PR_Malloc(requestedCount + 1); + if (!mInputStream) + return NS_ERROR_NULL_POINTER; + nsInputFileStream s(mInputStream); + *_retval = s.read(*buffer, requestedCount); + return s.error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::readLine(char** line, PRInt32 bufferSize, PRBool *wasTruncated) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(wasTruncated) + TEST_OUT_PTR(line) + if (!*line) + *line = (char*)PR_Malloc(bufferSize + 1); + if (!mInputStream) + return NS_ERROR_NULL_POINTER; + nsInputFileStream s(mInputStream); + *wasTruncated = s.readline(*line, bufferSize); + return s.error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::write(const char * data, PRInt32 requestedCount, PRInt32 *_retval) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(_retval) + if (!mOutputStream) + return NS_ERROR_NULL_POINTER; + nsOutputFileStream s(mOutputStream); + *_retval = s.write(data, requestedCount); + return s.error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::flush() +//---------------------------------------------------------------------------------------- +{ + if (!mOutputStream) + return NS_ERROR_NULL_POINTER; + nsOutputFileStream s(mOutputStream); + s.flush(); + return s.error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::seek(PRInt32 offset) +//---------------------------------------------------------------------------------------- +{ + nsresult result = NS_OK; + if (mOutputStream) + { + nsOutputFileStream os(mOutputStream); + os.seek(offset); + result = os.error(); + } + if (NS_SUCCEEDED(result) && mInputStream) + { + nsInputFileStream is(mInputStream); + is.seek(offset); + result = is.error(); + } + return result; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::tell(PRInt32 *_retval) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(_retval) + if (!mInputStream) + return NS_ERROR_NULL_POINTER; + nsInputFileStream s(mInputStream); + *_retval = s.tell(); + return s.error(); +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsFileSpecImpl::endline() +//---------------------------------------------------------------------------------------- +{ + nsOutputFileStream s(mOutputStream); + s << nsEndl; + return s.error(); +} + +//======================================================================================== +class nsDirectoryIteratorImpl +//======================================================================================== + : public nsIDirectoryIterator +{ + +public: + + nsDirectoryIteratorImpl(); + virtual ~nsDirectoryIteratorImpl(); + + NS_DECL_ISUPPORTS + + NS_IMETHOD Init(nsIFileSpec *parent); + + NS_IMETHOD exists(PRBool *_retval); + + NS_IMETHOD next(); + + NS_IMETHOD GetCurrentSpec(nsIFileSpec * *aCurrentSpec); + +protected: + + nsDirectoryIterator* mDirectoryIterator; +}; // class nsDirectoryIteratorImpl + +static NS_DEFINE_IID(kIDirectoryIteratorIID, NS_IDIRECTORYITERATOR_IID); +NS_IMPL_ISUPPORTS(nsDirectoryIteratorImpl, kIDirectoryIteratorIID) + +//---------------------------------------------------------------------------------------- +nsDirectoryIteratorImpl::nsDirectoryIteratorImpl() +//---------------------------------------------------------------------------------------- + : mDirectoryIterator(nsnull) +{ + NS_INIT_ISUPPORTS(); +} + +//---------------------------------------------------------------------------------------- +nsDirectoryIteratorImpl::~nsDirectoryIteratorImpl() +//---------------------------------------------------------------------------------------- +{ + delete mDirectoryIterator; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsDirectoryIteratorImpl::Init(nsIFileSpec *parent) +//---------------------------------------------------------------------------------------- +{ + delete mDirectoryIterator; + mDirectoryIterator = new nsDirectoryIterator(FILESPEC(parent)); + if (!mDirectoryIterator) + return NS_ERROR_OUT_OF_MEMORY; + return NS_OK; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsDirectoryIteratorImpl::exists(PRBool *_retval) +//---------------------------------------------------------------------------------------- +{ + TEST_OUT_PTR(_retval) + if (!mDirectoryIterator) + return NS_ERROR_NULL_POINTER; + *_retval = mDirectoryIterator->Exists(); + return NS_OK; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsDirectoryIteratorImpl::next() +//---------------------------------------------------------------------------------------- +{ + if (!mDirectoryIterator) + return NS_ERROR_NULL_POINTER; + (*mDirectoryIterator)++; + return NS_OK; +} + +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsDirectoryIteratorImpl::GetCurrentSpec(nsIFileSpec * *aCurrentSpec) +//---------------------------------------------------------------------------------------- +{ + if (!mDirectoryIterator) + return NS_ERROR_NULL_POINTER; + return nsFileSpecImpl::MakeInterface(mDirectoryIterator->Spec(), aCurrentSpec); +} + +//---------------------------------------------------------------------------------------- +nsresult NS_NewFileSpec(nsIFileSpec** result) +//---------------------------------------------------------------------------------------- +{ + if (!result) + return NS_ERROR_NULL_POINTER; + nsFileSpecImpl* it = new nsFileSpecImpl; + if (!it) + return NS_ERROR_OUT_OF_MEMORY; + return it->QueryInterface(nsIFileSpec::GetIID(), (void **) result); +} + +//---------------------------------------------------------------------------------------- +nsresult NS_NewDirectoryIterator(nsIDirectoryIterator** result) +//---------------------------------------------------------------------------------------- +{ + if (!result) + return NS_ERROR_NULL_POINTER; + nsDirectoryIteratorImpl* it = new nsDirectoryIteratorImpl(); + if (!it) + return NS_ERROR_OUT_OF_MEMORY; + return it->QueryInterface(kIDirectoryIteratorIID, (void **) result); +} diff --git a/mozilla/xpcom/io/nsFileSpecStreaming.h b/mozilla/xpcom/io/nsFileSpecStreaming.h index 92b9d15e07b..96126fabb6b 100644 --- a/mozilla/xpcom/io/nsFileSpecStreaming.h +++ b/mozilla/xpcom/io/nsFileSpecStreaming.h @@ -30,18 +30,18 @@ class nsIOutputStream; class nsFileURL; class nsFileSpec; -NS_BASE nsOutputStream& operator << (nsOutputStream& s, const nsFileURL& spec); -NS_BASE nsresult ReadDescriptor( +NS_COM nsOutputStream& operator << (nsOutputStream& s, const nsFileURL& spec); +NS_COM nsresult ReadDescriptor( nsIInputStream* aStream, nsPersistentFileDescriptor&); -NS_BASE nsresult WriteDescriptor( +NS_COM nsresult WriteDescriptor( nsIOutputStream* aStream, const nsPersistentFileDescriptor&); // writes the data to a file -NS_BASE nsInputStream& operator >> ( +NS_COM nsInputStream& operator >> ( nsInputStream&, nsPersistentFileDescriptor&); // reads the data from a stream (file or string) -NS_BASE nsOutputStream& operator << ( +NS_COM nsOutputStream& operator << ( nsOutputStream&, const nsPersistentFileDescriptor&); // writes the data to a stream (file or string) diff --git a/mozilla/xpcom/io/nsFileStream.cpp b/mozilla/xpcom/io/nsFileStream.cpp index 9798e07cd35..2c9ab3ad0f0 100644 --- a/mozilla/xpcom/io/nsFileStream.cpp +++ b/mozilla/xpcom/io/nsFileStream.cpp @@ -22,6 +22,7 @@ #include "nsFileStream.h" +#include "nsFileSpec.h" #include "nsIStringStream.h" #include @@ -308,6 +309,64 @@ void nsOutputFileStream::flush() mFileOutputStream->Flush(); } +//---------------------------------------------------------------------------------------- +void nsOutputFileStream::abort() +//---------------------------------------------------------------------------------------- +{ + mResult = NS_FILE_FAILURE; + close(); +} + +//======================================================================================== +// nsSaveViaTempStream +//======================================================================================== + +//---------------------------------------------------------------------------------------- +nsSaveViaTempStream::nsSaveViaTempStream(const nsFileSpec& inFileToSave) +//---------------------------------------------------------------------------------------- + : mFileToSave(inFileToSave) + , mTempFileSpec(new nsFileSpec(inFileToSave)) +{ + // Make sure the temp file's unique (in particular, different from the target file) + mTempFileSpec->MakeUnique(); + open( + *mTempFileSpec, + (PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE), + 0700 /*(octal)*/); +} // nsSaveViaTempStream::nsSaveViaTempStream + +//---------------------------------------------------------------------------------------- +void nsSaveViaTempStream::close() +//---------------------------------------------------------------------------------------- +{ + if (!mTempFileSpec) + return; + nsresult currentResult = mResult; + Inherited::close(); + mResult = currentResult; + if (error()) + { + mTempFileSpec->Delete(PR_FALSE); + } + else + { + nsFileSpec thirdSpec(mFileToSave); + thirdSpec.MakeUnique(); + nsSimpleCharString originalName(mFileToSave.GetLeafName()); + ((nsFileSpec&)mFileToSave).Rename(nsSimpleCharString(thirdSpec.GetLeafName())); + if (NS_SUCCEEDED(mTempFileSpec->Rename(originalName)) && mTempFileSpec->Valid()) + mFileToSave.Delete(PR_FALSE); + } + delete mTempFileSpec; +} // nsSaveViaTempStream::~nsSaveViaTempStream + +//---------------------------------------------------------------------------------------- +nsSaveViaTempStream::~nsSaveViaTempStream() +//---------------------------------------------------------------------------------------- +{ + delete mTempFileSpec; +} // nsSaveViaTempStream::~nsSaveViaTempStream + //======================================================================================== // Manipulators //======================================================================================== diff --git a/mozilla/xpcom/io/nsFileStream.h b/mozilla/xpcom/io/nsFileStream.h index e96e7608c6e..e4b7835b52d 100644 --- a/mozilla/xpcom/io/nsFileStream.h +++ b/mozilla/xpcom/io/nsFileStream.h @@ -153,7 +153,7 @@ using std::ostream; //=========================== End Compiler-specific macros =============================== //======================================================================================== -class NS_BASE nsInputStream +class NS_COM nsInputStream // This is a convenience class, for use on the STACK ("new" junkies: get detoxed first). // Given a COM-style stream, this allows you to use the >> operators. It also acquires and // reference counts its stream. @@ -214,7 +214,7 @@ protected: typedef nsInputStream nsBasicInStream; // historic support for this name //======================================================================================== -class NS_BASE nsOutputStream +class NS_COM nsOutputStream // This is a convenience class, for use on the STACK ("new" junkies, get detoxed first). // Given a COM-style stream, this allows you to use the << operators. It also acquires and // reference counts its stream. @@ -266,7 +266,7 @@ protected: typedef nsOutputStream nsBasicOutStream; // Historic support for this name //======================================================================================== -class NS_BASE nsErrorProne +class NS_COM nsErrorProne // Common (virtual) base class for remembering errors on demand //======================================================================================== { @@ -279,6 +279,10 @@ public: { return NS_FAILED(mResult); } + nsresult error() const + { + return mResult; + } // DATA protected: @@ -286,7 +290,7 @@ protected: }; // class nsErrorProne //======================================================================================== -class NS_BASE nsFileClient +class NS_COM nsFileClient // Because COM does not allow us to write functions which return a boolean value etc, // this class is here to take care of the tedious "declare variable then call with // the address of the variable" chores. @@ -331,7 +335,7 @@ protected: }; // class nsFileClient //======================================================================================== -class NS_BASE nsRandomAccessStoreClient +class NS_COM nsRandomAccessStoreClient // Because COM does not allow us to write functions which return a boolean value etc, // this class is here to take care of the tedious "declare variable then call with // the address of the variable" chores. @@ -389,7 +393,7 @@ protected: }; // class nsRandomAccessStoreClient //======================================================================================== -class NS_BASE nsRandomAccessInputStream +class NS_COM nsRandomAccessInputStream // Please read the comments at the top of this file //======================================================================================== : public nsRandomAccessStoreClient @@ -432,7 +436,7 @@ protected: }; // class nsRandomAccessInputStream //======================================================================================== -class NS_BASE nsInputStringStream +class NS_COM nsInputStringStream //======================================================================================== : public nsRandomAccessInputStream { @@ -449,7 +453,7 @@ public: }; // class nsInputStringStream //======================================================================================== -class NS_BASE nsInputFileStream +class NS_COM nsInputFileStream // Please read the comments at the top of this file //======================================================================================== : public nsRandomAccessInputStream @@ -489,7 +493,7 @@ protected: }; // class nsInputFileStream //======================================================================================== -class NS_BASE nsRandomAccessOutputStream +class NS_COM nsRandomAccessOutputStream // Please read the comments at the top of this file //======================================================================================== : public nsRandomAccessStoreClient @@ -530,7 +534,7 @@ protected: }; // class nsRandomAccessOutputStream //======================================================================================== -class NS_BASE nsOutputStringStream +class NS_COM nsOutputStringStream //======================================================================================== : public nsRandomAccessOutputStream { @@ -561,7 +565,7 @@ public: }; // class nsOutputStringStream //======================================================================================== -class NS_BASE nsOutputFileStream +class NS_COM nsOutputFileStream // Please read the comments at the top of this file //======================================================================================== : public nsRandomAccessOutputStream @@ -571,6 +575,13 @@ public: enum { kDefaultMode = (PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE) }; nsOutputFileStream() {} + nsOutputFileStream(nsIOutputStream* inStream) + { + mFile = nsQueryInterface(inStream); + mOutputStream = nsQueryInterface(inStream); + mStore = nsQueryInterface(inStream); + mFileOutputStream = nsQueryInterface(inStream); + } nsOutputFileStream( const nsFileSpec& inFile, int nsprMode = kDefaultMode, @@ -589,6 +600,7 @@ public: } virtual void flush(); + virtual void abort(); // Output streamers. Unfortunately, they don't inherit! nsOutputStream& operator << (const char* buf) @@ -616,7 +628,7 @@ protected: }; // class nsOutputFileStream //======================================================================================== -class NS_BASE nsOutputConsoleStream +class NS_COM nsOutputConsoleStream // Please read the comments at the top of this file //======================================================================================== : public nsOutputFileStream @@ -657,7 +669,7 @@ public: }; // class nsOutputConsoleStream //======================================================================================== -class NS_BASE nsIOFileStream +class NS_COM nsIOFileStream // Please read the comments at the top of this file //======================================================================================== : public nsInputFileStream @@ -737,7 +749,47 @@ protected: // Manipulators //======================================================================================== -NS_BASE nsOutputStream& nsEndl(nsOutputStream& os); // outputs and FLUSHES. +NS_COM nsOutputStream& nsEndl(nsOutputStream& os); // outputs and FLUSHES. +//======================================================================================== +class NS_COM nsSaveViaTempStream +// The interface looks like a stream class, but in fact it streams to a temp file, and +// finally renames if the output succeeded. +//======================================================================================== + : public nsOutputFileStream +{ +private: + typedef nsOutputFileStream Inherited; + +public: + nsSaveViaTempStream(const nsFileSpec& inFileToSave); + ~nsSaveViaTempStream(); + virtual void close(); + + // Output streamers. Unfortunately, they don't inherit! + nsOutputStream& operator << (const char* buf) + { return nsOutputStream::operator << (buf); } + nsOutputStream& operator << (char ch) + { return nsOutputStream::operator << (ch); } + nsOutputStream& operator << (short val) + { return nsOutputStream::operator << (val); } + nsOutputStream& operator << (unsigned short val) + { return nsOutputStream::operator << (val); } + nsOutputStream& operator << (long val) + { return nsOutputStream::operator << (val); } + nsOutputStream& operator << (unsigned long val) + { return nsOutputStream::operator << (val); } + nsOutputStream& operator << (int val) + { return nsOutputStream::operator << (val); } + nsOutputStream& operator << (unsigned int val) + { return nsOutputStream::operator << (val); } + nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&)) + { return nsOutputStream::operator << (pf); } +protected: + + const nsFileSpec& mFileToSave; + nsFileSpec* mTempFileSpec; +}; // class nsSaveViaTempStream + #endif /* _FILESTREAM_H_ */ diff --git a/mozilla/xpcom/io/nsIByteBufferInputStream.h b/mozilla/xpcom/io/nsIByteBufferInputStream.h index 5badc956642..b55ab0bd234 100644 --- a/mozilla/xpcom/io/nsIByteBufferInputStream.h +++ b/mozilla/xpcom/io/nsIByteBufferInputStream.h @@ -30,6 +30,14 @@ {0x93, 0x1c, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \ } +#define NS_BYTEBUFFERINPUTSTREAM_CID \ +{ /* d713ada0-0d6b-11d3-9331-00104ba0fd40 */ \ + 0xd713ada0, \ + 0x0d6b, \ + 0x11d3, \ + {0x93, 0x31, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \ +} + class nsIByteBufferInputStream : public nsIInputStream { public: NS_DEFINE_STATIC_IID_ACCESSOR(NS_IBYTEBUFFERINPUTSTREAM_IID); @@ -42,12 +50,12 @@ public: //////////////////////////////////////////////////////////////////////////////// -extern NS_BASE nsresult +extern NS_COM nsresult NS_NewByteBufferInputStream(nsIByteBufferInputStream* *result, PRBool blocking = PR_FALSE, PRUint32 size = 4096); -extern NS_BASE nsresult +extern NS_COM nsresult NS_NewPipe(nsIInputStream* *inStrResult, nsIOutputStream* *outStrResult, PRBool blocking = PR_TRUE, diff --git a/mozilla/xpcom/io/nsIFileSpec.idl b/mozilla/xpcom/io/nsIFileSpec.idl new file mode 100644 index 00000000000..15f06ad065f --- /dev/null +++ b/mozilla/xpcom/io/nsIFileSpec.idl @@ -0,0 +1,164 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +// This is the only correct cross-platform way to specify a file. +// Strings are not such a way. If you grew up on windows or unix, you +// may think they are. Welcome to reality. + +#include "nsISupports.idl" + +%{C++ +#include "nscore.h" // for NS_BASE + +// Start commenting out the C++ versions of the below in the output header +#if 0 +%} +[ref] native nsStringRef(nsString); +native StandardFilterMask(nsIFileSpec::StandardFilterMask); +%{C++ +// End commenting out the C++ versions of the above in the output header +#endif +%} + +interface nsIFileURL; +interface nsIFilePath; + +[scriptable, uuid(d8c0a080-0868-11d3-915f-d9d889d48e3c)] +interface nsIFileSpec : nsISupports +{ + void fromFileSpec([const] in nsIFileSpec original); +%{C++ +// File Widget stuff depends on widget/public/nsIWidget.h +// Until the following is moved out of xpcom/ ifdeffing it +// out. +%} +%{C++ + // + // The "choose" functions present the file picker UI in order to set the + // value of the file spec. +%} + void chooseOutputFile(in string windowTitle, in string suggestedLeafName); + +%{C++ + // The mask for standard filters is given as follows: + enum StandardFilterMask + { + eAllReadable = (1<<0) + , eHTMLFiles = (1<<1) + , eXMLFiles = (1<<2) + , eImageFiles = (1<<3) + , eAllFiles = (1<<4) + + // Mask containing all the above default filters + , eAllStandardFilters = ( + eAllReadable + | eHTMLFiles + | eXMLFiles + | eImageFiles + | eAllFiles) + + // The "extra filter" bit should be set if the "extra filter" + // is passed in to chooseInputFile. + , eExtraFilter = (1<<31) + }; + enum { kNumStandardFilters = 5 }; +%} + void chooseInputFile( + in string title + , in StandardFilterMask standardFilterMask + , in string extraFilterTitle + , in string extraFilter + ); + void chooseDirectory(in string title); +%{C++ +%} + + attribute string URLString; + attribute string UnixStyleFilePath; + attribute string PersistentDescriptorString; + attribute string NativePath; + + readonly attribute string NSPRPath; + + void error(); + + boolean isValid(); + boolean failed(); + + attribute string LeafName; + + readonly attribute nsIFileSpec Parent; + + void makeUnique(); + void makeUniqueWithSuggestedName(in string suggestedName); + + readonly attribute unsigned long ModDate; + boolean modDateChanged(in unsigned long oldStamp); + + boolean isDirectory(); + boolean isFile(); + boolean exists(); + + readonly attribute unsigned long FileSize; + readonly attribute unsigned long DiskSpaceAvailable; + + void AppendRelativeUnixPath(in string relativePath); + + void createDir(); + void rename([const] in string newLeafName); + void copyToDir([const] in nsIFileSpec newParentDir); + void moveToDir([const] in nsIFileSpec newParentDir); + void execute([const] in string args); + + void openStreamForReading(); + void openStreamForWriting(); + void openStreamForReadingAndWriting(); + void closeStream(); + boolean isStreamOpen(); + + boolean eof(); + long read(inout string buffer, in long requestedCount); + void readLine(inout string line, in long bufferSize, out boolean wasTruncated); +%{C++ + // Check eof() before each call. + // CAUTION: false result only indicates line was truncated + // to fit buffer, or an error occurred (OTHER THAN eof). +%} + long write(in string data, in long requestedCount); + void flush(); + + void seek(in long offset); + long tell(); + void endline(); + +}; + +[scriptable, uuid(d8c0a083-0868-11d3-915f-d9d889d48e3c)] +interface nsIDirectoryIterator : nsISupports +{ + void Init(in nsIFileSpec parent); + boolean exists(); + void next(); + readonly attribute nsIFileSpec currentSpec; +}; + +%{C++ +// Factory methods +NS_COM nsresult NS_NewFileSpec(nsIFileSpec** result); +NS_COM nsresult NS_NewDirectoryIterator(nsIDirectoryIterator** result); +%} diff --git a/mozilla/xpcom/io/nsIFileStream.cpp b/mozilla/xpcom/io/nsIFileStream.cpp index 4a1ea37e297..f061b8b4ce8 100644 --- a/mozilla/xpcom/io/nsIFileStream.cpp +++ b/mozilla/xpcom/io/nsIFileStream.cpp @@ -395,7 +395,7 @@ NS_IMETHODIMP FileImpl::Flush() } // FileImpl::flush //---------------------------------------------------------------------------------------- -NS_BASE nsresult NS_NewTypicalInputFileStream( +NS_COM nsresult NS_NewTypicalInputFileStream( nsISupports** aResult, const nsFileSpec& inFile /*Default nsprMode == PR_RDONLY*/ @@ -407,7 +407,7 @@ NS_BASE nsresult NS_NewTypicalInputFileStream( } //---------------------------------------------------------------------------------------- -NS_BASE nsresult NS_NewOutputConsoleStream( +NS_COM nsresult NS_NewOutputConsoleStream( nsISupports** aResult) // Factory method to get an nsOutputStream to the console. //---------------------------------------------------------------------------------------- @@ -426,7 +426,7 @@ NS_BASE nsresult NS_NewOutputConsoleStream( } //---------------------------------------------------------------------------------------- -NS_BASE nsresult NS_NewTypicalOutputFileStream( +NS_COM nsresult NS_NewTypicalOutputFileStream( nsISupports** aResult, const nsFileSpec& inFile /*default nsprMode= (PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE)*/ @@ -442,7 +442,7 @@ NS_BASE nsresult NS_NewTypicalOutputFileStream( } //---------------------------------------------------------------------------------------- -NS_BASE nsresult NS_NewIOFileStream( +NS_COM nsresult NS_NewIOFileStream( nsISupports** aResult, const nsFileSpec& inFile, PRInt32 nsprMode /*default = (PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE)*/, @@ -465,7 +465,7 @@ NS_BASE nsresult NS_NewIOFileStream( } //---------------------------------------------------------------------------------------- -NS_BASE nsresult NS_NewTypicalIOFileStream( +NS_COM nsresult NS_NewTypicalIOFileStream( nsISupports** aResult, const nsFileSpec& inFile /*default nsprMode= (PR_RDWR | PR_CREATE_FILE)*/ diff --git a/mozilla/xpcom/io/nsIFileStream.h b/mozilla/xpcom/io/nsIFileStream.h index 8f2ee8f05bb..7f14ace09d6 100644 --- a/mozilla/xpcom/io/nsIFileStream.h +++ b/mozilla/xpcom/io/nsIFileStream.h @@ -104,7 +104,7 @@ public: }; // class nsIFileOutputStream //---------------------------------------------------------------------------------------- -extern "C" NS_BASE nsresult NS_NewTypicalInputFileStream( +extern "C" NS_COM nsresult NS_NewTypicalInputFileStream( nsISupports** aStreamResult, const nsFileSpec& inFile /*Default nsprMode == PR_RDONLY*/ @@ -112,12 +112,12 @@ extern "C" NS_BASE nsresult NS_NewTypicalInputFileStream( // Factory method to get an nsInputStream from a file, using most common options //---------------------------------------------------------------------------------------- -extern "C" NS_BASE nsresult NS_NewOutputConsoleStream( +extern "C" NS_COM nsresult NS_NewOutputConsoleStream( nsISupports** aStreamResult); // Factory method to get an nsOutputStream to the console. //---------------------------------------------------------------------------------------- -extern "C" NS_BASE nsresult NS_NewTypicalOutputFileStream( +extern "C" NS_COM nsresult NS_NewTypicalOutputFileStream( nsISupports** aStreamResult, // will implement all the above interfaces const nsFileSpec& inFile /*default nsprMode= (PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE)*/ @@ -125,7 +125,7 @@ extern "C" NS_BASE nsresult NS_NewTypicalOutputFileStream( // Factory method to get an nsOutputStream to a file - most common case. //---------------------------------------------------------------------------------------- -extern "C" NS_BASE nsresult NS_NewTypicalIOFileStream( +extern "C" NS_COM nsresult NS_NewTypicalIOFileStream( nsISupports** aStreamResult, // will implement all the above interfaces const nsFileSpec& inFile /*default nsprMode = (PR_RDWR | PR_CREATE_FILE)*/ @@ -134,7 +134,7 @@ extern "C" NS_BASE nsresult NS_NewTypicalIOFileStream( // and nsIOutputStream, associated with a single file. //---------------------------------------------------------------------------------------- -extern "C" NS_BASE nsresult NS_NewIOFileStream( +extern "C" NS_COM nsresult NS_NewIOFileStream( nsISupports** aStreamResult, // will implement all the above interfaces const nsFileSpec& inFile, PRInt32 nsprMode, diff --git a/mozilla/xpcom/io/nsIFileWidget.h b/mozilla/xpcom/io/nsIFileWidget.h new file mode 100644 index 00000000000..5f263eb8498 --- /dev/null +++ b/mozilla/xpcom/io/nsIFileWidget.h @@ -0,0 +1,162 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +#ifndef nsIFileWidget_h__ +#define nsIFileWidget_h__ + +#include "nsString.h" +#include "nsFileSpec.h" + +class nsIWidget; +class nsIDeviceContext; +class nsIAppShell; +class nsIToolkit; + +// {F8030015-C342-11d1-97F0-00609703C14E} +#define NS_IFILEWIDGET_IID \ +{ 0xf8030015, 0xc342, 0x11d1, { 0x97, 0xf0, 0x0, 0x60, 0x97, 0x3, 0xc1, 0x4e } } + + +/** + * File selector mode + */ + +enum nsFileDlgMode { + /// Load a file or directory + eMode_load, + /// Save a file or directory + eMode_save, + /// Select a fodler/directory + eMode_getfolder + }; + + +enum nsFileDlgResults { + nsFileDlgResults_Cancel, // User hit cancel, ignore selection + nsFileDlgResults_OK, // User hit Ok, process selection + nsFileDlgResults_Replace // User acknowledged file already exists so ok to replace, process selection +}; + +/** + * File selector widget. + * Modally selects files for loading or saving from a list. + */ + +class nsIFileWidget : public nsISupports +{ + +public: + + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFILEWIDGET_IID) + + /** + * Create the file filter. This differs from the standard + * widget Create method because it passes in the mode + * + * @param aParent the parent to place this widget into + * @param aTitle The title for the file widget + * @param aMode load or save + * @return void + * + */ + NS_IMETHOD Create(nsIWidget *aParent, + const nsString& aTitle, + nsFileDlgMode aMode, + nsIDeviceContext *aContext = nsnull, + nsIAppShell *aAppShell = nsnull, + nsIToolkit *aToolkit = nsnull, + void *aInitData = nsnull) = 0; + + + /** + * Set the list of file filters + * + * @param aNumberOfFilter number of filters. + * @param aTitle array of filter titles + * @param aFilter array of filters to associate with titles + * @return void + * + */ + + NS_IMETHOD SetFilterList(PRUint32 aNumberOfFilters,const nsString aTitles[],const nsString aFilters[]) = 0; + + /** + * Show File Dialog. The dialog is displayed modally. + * + * @return PR_TRUE if user selects OK, PR_FALSE if user selects CANCEL + * + */ + + virtual PRBool Show() = 0; + + /** + * Get the nsFileSpec for the file or directory. + * + * @param aFile on exit it contains the file or directory selected + */ + + NS_IMETHOD GetFile(nsFileSpec& aFile) = 0; + + + /** + * Set the default string that appears in file open/save dialog + * + * @param aString the name of the file + * @return void + * + */ + NS_IMETHOD SetDefaultString(const nsString& aString) = 0; + + /** + * Set the directory that the file open/save dialog initially displays + * + * @param aDirectory the name of the directory + * @return void + * + */ + NS_IMETHOD SetDisplayDirectory(const nsFileSpec& aDirectory) = 0; + + /** + * Get the directory that the file open/save dialog was last displaying + * + * @param aDirectory the name of the directory + * @return void + * + */ + NS_IMETHOD GetDisplayDirectory(nsFileSpec& aDirectory) = 0; + + + virtual nsFileDlgResults GetFile( + nsIWidget * aParent, + const nsString & promptString, // Window title for the dialog + nsFileSpec & theFileSpec) = 0; // Populate with initial path for file dialog + + virtual nsFileDlgResults GetFolder( + nsIWidget * aParent, + const nsString & promptString, // Window title for the dialog + nsFileSpec & theFileSpec) = 0; // Populate with initial path for file dialog + + virtual nsFileDlgResults PutFile( + nsIWidget * aParent, + const nsString & promptString, // Window title for the dialog + nsFileSpec & theFileSpec) = 0; // Populate with initial path for file dialog +}; + +#endif // nsIFileWidget_h__ + diff --git a/mozilla/xpcom/io/nsIStringStream.cpp b/mozilla/xpcom/io/nsIStringStream.cpp index f250c575e2f..df3bfb5144d 100644 --- a/mozilla/xpcom/io/nsIStringStream.cpp +++ b/mozilla/xpcom/io/nsIStringStream.cpp @@ -378,7 +378,7 @@ NS_IMETHODIMP BasicStringImpl::Seek(PRSeekWhence whence, PRInt32 offset) } // StringImpl::Seek //---------------------------------------------------------------------------------------- -extern "C" NS_BASE nsresult NS_NewStringInputStream( +extern "C" NS_COM nsresult NS_NewStringInputStream( nsISupports** aStreamResult, const nsString& aStringToRead) // Factory method to get an nsInputStream from a string. Result will implement all the @@ -399,7 +399,7 @@ extern "C" NS_BASE nsresult NS_NewStringInputStream( } //---------------------------------------------------------------------------------------- -extern "C" NS_BASE nsresult NS_NewStringOutputStream( +extern "C" NS_COM nsresult NS_NewStringOutputStream( nsISupports** aStreamResult, nsString& aStringToChange) // Factory method to get an nsOutputStream from a string. Result will implement all the @@ -420,7 +420,7 @@ extern "C" NS_BASE nsresult NS_NewStringOutputStream( } //---------------------------------------------------------------------------------------- -extern "C" NS_BASE nsresult NS_NewCharInputStream( +extern "C" NS_COM nsresult NS_NewCharInputStream( nsISupports** aStreamResult, const char* aStringToRead) // Factory method to get an nsInputStream from a string. Result will implement all the @@ -441,7 +441,7 @@ extern "C" NS_BASE nsresult NS_NewCharInputStream( } //---------------------------------------------------------------------------------------- -extern "C" NS_BASE nsresult NS_NewCharOutputStream( +extern "C" NS_COM nsresult NS_NewCharOutputStream( nsISupports** aStreamResult, char** aStringToChange) // Factory method to get an nsOutputStream to a string. Result will implement all the @@ -463,7 +463,7 @@ extern "C" NS_BASE nsresult NS_NewCharOutputStream( } //---------------------------------------------------------------------------------------- -extern "C" NS_BASE nsresult NS_NewStringIOStream( +extern "C" NS_COM nsresult NS_NewStringIOStream( nsISupports** aStreamResult, nsString& aStringToChange) // Factory method to get an nsOutputStream to a string. Result will implement all the @@ -474,7 +474,7 @@ extern "C" NS_BASE nsresult NS_NewStringIOStream( } //---------------------------------------------------------------------------------------- -extern "C" NS_BASE nsresult NS_NewCharIOStream( +extern "C" NS_COM nsresult NS_NewCharIOStream( nsISupports** aStreamResult, char** aStringToChange) // Factory method to get an nsOutputStream to a string. Result will implement all the diff --git a/mozilla/xpcom/io/nsIStringStream.h b/mozilla/xpcom/io/nsIStringStream.h index 21848a564ed..5746c7a9c5c 100644 --- a/mozilla/xpcom/io/nsIStringStream.h +++ b/mozilla/xpcom/io/nsIStringStream.h @@ -23,42 +23,42 @@ #include "nsString.h" //---------------------------------------------------------------------------------------- -extern "C" NS_BASE nsresult NS_NewStringInputStream( +extern "C" NS_COM nsresult NS_NewStringInputStream( nsISupports** aStreamResult, const nsString& aStringToRead); // Factory method to get an nsInputStream from a string. Result will implement all the // file stream interfaces in nsIFileStream.h //---------------------------------------------------------------------------------------- -extern "C" NS_BASE nsresult NS_NewStringOutputStream( +extern "C" NS_COM nsresult NS_NewStringOutputStream( nsISupports** aStreamResult, nsString& aStringToChange); // Factory method to get an nsOutputStream from a string. Result will implement all the // file stream interfaces in nsIFileStream.h //---------------------------------------------------------------------------------------- -extern "C" NS_BASE nsresult NS_NewCharInputStream( +extern "C" NS_COM nsresult NS_NewCharInputStream( nsISupports** aStreamResult, const char* aStringToRead); // Factory method to get an nsInputStream from a string. Result will implement all the // file stream interfaces in nsIFileStream.h //---------------------------------------------------------------------------------------- -extern "C" NS_BASE nsresult NS_NewCharOutputStream( +extern "C" NS_COM nsresult NS_NewCharOutputStream( nsISupports** aStreamResult, char** aStringToChange); // Factory method to get an nsOutputStream to a string. Result will implement all the // file stream interfaces in nsIFileStream.h //---------------------------------------------------------------------------------------- -extern "C" NS_BASE nsresult NS_NewStringIOStream( +extern "C" NS_COM nsresult NS_NewStringIOStream( nsISupports** aStreamResult, nsString& aStringToChange); // Factory method to get an nsOutputStream to a string. Result will implement all the // file stream interfaces in nsIFileStream.h //---------------------------------------------------------------------------------------- -extern "C" NS_BASE nsresult NS_NewCharIOStream( +extern "C" NS_COM nsresult NS_NewCharIOStream( nsISupports** aStreamResult, char** aStringToChange); // Factory method to get an nsOutputStream to a string. Result will implement all the diff --git a/mozilla/xpcom/io/nsIUnicharInputStream.h b/mozilla/xpcom/io/nsIUnicharInputStream.h index a1515ec277b..e6f9b2d1ac3 100644 --- a/mozilla/xpcom/io/nsIUnicharInputStream.h +++ b/mozilla/xpcom/io/nsIUnicharInputStream.h @@ -43,7 +43,7 @@ public: * it destroyes the string (so make a copy if you don't want it doing * that) */ -extern NS_BASE nsresult +extern NS_COM nsresult NS_NewStringUnicharInputStream(nsIUnicharInputStream** aInstancePtrResult, nsString* aString); @@ -52,7 +52,7 @@ extern NS_BASE nsresult * nsnull is returned and the error code is set to * NS_INPUTSTREAM_NO_CONVERTER. */ -extern NS_BASE nsresult +extern NS_COM nsresult NS_NewConverterStream(nsIUnicharInputStream** aInstancePtrResult, nsISupports* aOuter, nsIInputStream* aStreamToWrap, diff --git a/mozilla/xpcom/io/nsPipe.cpp b/mozilla/xpcom/io/nsPipe.cpp index 612b179c67a..0c31ddf9216 100644 --- a/mozilla/xpcom/io/nsPipe.cpp +++ b/mozilla/xpcom/io/nsPipe.cpp @@ -225,7 +225,7 @@ nsBufferInputStream::Fill() //////////////////////////////////////////////////////////////////////////////// -NS_BASE nsresult +NS_COM nsresult NS_NewBufferInputStream(nsIInputStream* *result, nsIBuffer* buffer, PRBool blocking) { nsBufferInputStream* str = new nsBufferInputStream(buffer, blocking); @@ -376,7 +376,7 @@ nsBufferOutputStream::Flush(void) //////////////////////////////////////////////////////////////////////////////// -NS_BASE nsresult +NS_COM nsresult NS_NewBufferOutputStream(nsIOutputStream* *result, nsIBuffer* buffer, PRBool blocking) { nsBufferOutputStream* ostr = new nsBufferOutputStream(buffer, blocking); @@ -389,7 +389,7 @@ NS_NewBufferOutputStream(nsIOutputStream* *result, nsIBuffer* buffer, PRBool blo //////////////////////////////////////////////////////////////////////////////// -NS_BASE nsresult +NS_COM nsresult NS_NewPipe2(nsIInputStream* *inStrResult, nsIOutputStream* *outStrResult, PRUint32 growBySize, PRUint32 maxSize) diff --git a/mozilla/xpcom/io/nsSpecialSystemDirectory.h b/mozilla/xpcom/io/nsSpecialSystemDirectory.h index 828613840ac..956bcb655f4 100644 --- a/mozilla/xpcom/io/nsSpecialSystemDirectory.h +++ b/mozilla/xpcom/io/nsSpecialSystemDirectory.h @@ -35,7 +35,7 @@ // SEE ALSO: // mozilla/xpfe/appshell/public/nsFileLocations.h -class NS_BASE nsSpecialSystemDirectory : public nsFileSpec +class NS_COM nsSpecialSystemDirectory : public nsFileSpec { public: @@ -106,6 +106,6 @@ class NS_BASE nsSpecialSystemDirectory : public nsFileSpec private: void operator = (const char* inPath) { *(nsFileSpec*)this = inPath; } -}; // class NS_BASE nsSpecialSystemDirectory +}; // class NS_COM nsSpecialSystemDirectory #endif diff --git a/mozilla/xpcom/io/nsUnicharInputStream.cpp b/mozilla/xpcom/io/nsUnicharInputStream.cpp index 23f3bdd6b21..d3647c1b351 100644 --- a/mozilla/xpcom/io/nsUnicharInputStream.cpp +++ b/mozilla/xpcom/io/nsUnicharInputStream.cpp @@ -99,7 +99,7 @@ nsresult StringUnicharInputStream::Close() NS_IMPL_ISUPPORTS(StringUnicharInputStream, kIUnicharInputStreamIID); -NS_BASE nsresult +NS_COM nsresult NS_NewStringUnicharInputStream(nsIUnicharInputStream** aInstancePtrResult, nsString* aString) { @@ -121,7 +121,7 @@ NS_NewStringUnicharInputStream(nsIUnicharInputStream** aInstancePtrResult, //---------------------------------------------------------------------- /** - * This function used to be public, with the NS_BASE declaration. I am + * This function used to be public, with the NS_COM declaration. I am * changing it right now into a module private visibility because there are * better and more xpcom-like ways to get a Converter. */ @@ -286,7 +286,7 @@ PRInt32 ConverterInputStream::Fill(nsresult * aErrorCode) } // XXX hook up auto-detect here (do we need more info, like the url?) -NS_BASE nsresult +NS_COM nsresult NS_NewConverterStream(nsIUnicharInputStream** aInstancePtrResult, nsISupports* aOuter, nsIInputStream* aStreamToWrap, diff --git a/mozilla/xpcom/libxpt/macbuild/libxpt.mcp b/mozilla/xpcom/libxpt/macbuild/libxpt.mcp index 618c4bb9b26..2e42cb157ad 100644 Binary files a/mozilla/xpcom/libxpt/macbuild/libxpt.mcp and b/mozilla/xpcom/libxpt/macbuild/libxpt.mcp differ diff --git a/mozilla/xpcom/libxpt/tests/makefile.win b/mozilla/xpcom/libxpt/tests/makefile.win index 8ac388d9a3d..7ba28d49c1b 100644 --- a/mozilla/xpcom/libxpt/tests/makefile.win +++ b/mozilla/xpcom/libxpt/tests/makefile.win @@ -33,7 +33,7 @@ REQUIRES=xpcom libxpt LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor -I$(PUBLIC)\libxpt LLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\libxpt32.lib \ $(NULL) diff --git a/mozilla/xpcom/libxpt/xptcall/tests/makefile.win b/mozilla/xpcom/libxpt/xptcall/tests/makefile.win index 5f9dfdad14a..f1a1be4f3a8 100644 --- a/mozilla/xpcom/libxpt/xptcall/tests/makefile.win +++ b/mozilla/xpcom/libxpt/xptcall/tests/makefile.win @@ -34,7 +34,7 @@ LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\xptcall \ LLIBS= \ $(DIST)\lib\xptcall32.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(NULL) diff --git a/mozilla/xpcom/libxpt/xptinfo/tests/makefile.win b/mozilla/xpcom/libxpt/xptinfo/tests/makefile.win index c259bf0c4cf..cfddb93b2a5 100644 --- a/mozilla/xpcom/libxpt/xptinfo/tests/makefile.win +++ b/mozilla/xpcom/libxpt/xptinfo/tests/makefile.win @@ -33,7 +33,7 @@ LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor \ -I$(PUBLIC)\libxpt -I$(PUBLIC)\xptinfo LLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\libxpt32.lib \ $(DIST)\lib\xptinfo32.lib \ $(LIBNSPR) \ diff --git a/mozilla/xpcom/macbuild/FilesTest.mcp b/mozilla/xpcom/macbuild/FilesTest.mcp new file mode 100644 index 00000000000..a1cd54affd8 Binary files /dev/null and b/mozilla/xpcom/macbuild/FilesTest.mcp differ diff --git a/mozilla/xpcom/macbuild/XPCOMIDL.mcp b/mozilla/xpcom/macbuild/XPCOMIDL.mcp index 0c3b4a7c200..f7aa2ca37d7 100644 Binary files a/mozilla/xpcom/macbuild/XPCOMIDL.mcp and b/mozilla/xpcom/macbuild/XPCOMIDL.mcp differ diff --git a/mozilla/xpcom/macbuild/dummy.cpp b/mozilla/xpcom/macbuild/dummy.cpp new file mode 100644 index 00000000000..38c747f1a30 --- /dev/null +++ b/mozilla/xpcom/macbuild/dummy.cpp @@ -0,0 +1,4 @@ +static void dummy() +{ + // This is just so that base.shlb has something to compile. +} \ No newline at end of file diff --git a/mozilla/xpcom/macbuild/files.prefix b/mozilla/xpcom/macbuild/files.prefix new file mode 100644 index 00000000000..e5eda421547 --- /dev/null +++ b/mozilla/xpcom/macbuild/files.prefix @@ -0,0 +1,19 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +#include "MacPrefix_debug.h" diff --git a/mozilla/xpcom/macbuild/filesDebug.prefix b/mozilla/xpcom/macbuild/filesDebug.prefix new file mode 100644 index 00000000000..e5eda421547 --- /dev/null +++ b/mozilla/xpcom/macbuild/filesDebug.prefix @@ -0,0 +1,19 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +#include "MacPrefix_debug.h" diff --git a/mozilla/xpcom/macbuild/xpcomPPC.mcp b/mozilla/xpcom/macbuild/xpcomPPC.mcp index 5d0e3379a54..cc456c68566 100644 Binary files a/mozilla/xpcom/macbuild/xpcomPPC.mcp and b/mozilla/xpcom/macbuild/xpcomPPC.mcp differ diff --git a/mozilla/xpcom/makefile.win b/mozilla/xpcom/makefile.win index 7cd3e7ce3aa..a9b7c5c0b86 100644 --- a/mozilla/xpcom/makefile.win +++ b/mozilla/xpcom/makefile.win @@ -19,9 +19,16 @@ DEPTH=.. IGNORE_MANIFEST=1 -# Build xpidl first, so it's available to process idl. -# Explicitly recur into libxpt/xptinfo and libxpt/xptcall, -# as they depend on xpidl and can't be in the DIRS for libxpt. -DIRS=libxpt tools\xpidl idl public src libxpt\xptinfo libxpt\xptcall proxy tests +DIRS= typelib \ + base \ + ds \ + io \ + components \ + threads \ + reflect \ + proxy \ + tools \ + build \ + tests include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/xpcom/proxy/Makefile.in b/mozilla/xpcom/proxy/Makefile.in index 8b0d1d725f3..8235fd9405a 100644 --- a/mozilla/xpcom/proxy/Makefile.in +++ b/mozilla/xpcom/proxy/Makefile.in @@ -27,5 +27,4 @@ DIRS = public src ifdef ENABLE_TESTS DIRS += tests endif - include $(topsrcdir)/config/rules.mk diff --git a/mozilla/xpcom/proxy/public/Makefile.in b/mozilla/xpcom/proxy/public/Makefile.in index e855ed20963..037f23f5511 100644 --- a/mozilla/xpcom/proxy/public/Makefile.in +++ b/mozilla/xpcom/proxy/public/Makefile.in @@ -21,7 +21,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = proxy +MODULE = xpcom EXPORTS = nsProxyEvent.h \ nsProxyObjectManager.h\ diff --git a/mozilla/xpcom/proxy/public/makefile.win b/mozilla/xpcom/proxy/public/makefile.win index eb784671695..73052575cbf 100644 --- a/mozilla/xpcom/proxy/public/makefile.win +++ b/mozilla/xpcom/proxy/public/makefile.win @@ -19,7 +19,7 @@ DEPTH=..\..\.. IGNORE_MANIFEST=1 MAKE_OBJ_TYPE = DLL -MODULE=libproxy +MODULE=xpcom EXPORTS = \ nsProxyEvent.h \ diff --git a/mozilla/xpcom/proxy/src/Makefile.in b/mozilla/xpcom/proxy/src/Makefile.in index 9b81da59844..fea48b39266 100644 --- a/mozilla/xpcom/proxy/src/Makefile.in +++ b/mozilla/xpcom/proxy/src/Makefile.in @@ -21,8 +21,8 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = proxy -LIBRARY_NAME = proxy +MODULE = xpcom +LIBRARY_NAME = xpcomproxy_s REQUIRES = xpcom CPPSRCS = \ @@ -34,4 +34,8 @@ CPPSRCS = \ include $(topsrcdir)/config/config.mk +# No shared lib; Force creation of static lib +override NO_SHARED_LIB=1 +override NO_STATIC_LIB= + include $(topsrcdir)/config/rules.mk diff --git a/mozilla/xpcom/proxy/src/makefile.win b/mozilla/xpcom/proxy/src/makefile.win index 7d5ceb31b44..ed820784184 100644 --- a/mozilla/xpcom/proxy/src/makefile.win +++ b/mozilla/xpcom/proxy/src/makefile.win @@ -18,27 +18,13 @@ DEPTH=..\..\.. IGNORE_MANIFEST=1 -MAKE_OBJ_TYPE = DLL -MODULE=libproxy - -DLL=.\$(OBJDIR)\$(MODULE).dll +LIBRARY_NAME=xpcomproxy_s LINCS = \ -I$(PUBLIC)\xpcom \ - -I$(PUBLIC)\xptcall \ - -I$(PUBLIC)\xptinfo \ - -I$(PUBLIC)\libxpt \ - -I$(PUBLIC)\libproxy \ - -I$(PUBLIC)\raptor \ $(NULL) -LLIBS = \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\xptinfo32.lib \ - $(DIST)\lib\xptcall32.lib \ - $(LIBNSPR) \ - $(DIST)\lib\plc3.lib \ - $(NULL) +LCFLAGS = -D_IMPL_NS_COM -D_IMPL_NS_BASE -DWIN32_LEAN_AND_MEAN -DEXPORT_XPTC_API OBJS = \ .\$(OBJDIR)\nsProxyEvent.obj \ @@ -49,10 +35,8 @@ OBJS = \ include <$(DEPTH)\config\rules.mak> -install:: $(DLL) - $(MAKE_INSTALL) .\$(OBJDIR)\$(MODULE).dll $(DIST)\bin - $(MAKE_INSTALL) .\$(OBJDIR)\$(MODULE).lib $(DIST)\lib +libs:: $(LIBRARY) + $(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib clobber:: - rm -f $(DIST)\lib\$(MODULE).lib - rm -f $(DIST)\bin\$(MODULE).dll + rm -f $(DIST)\lib\$(LIBRARY_NAME).lib diff --git a/mozilla/xpcom/proxy/src/nsProxyEventPrivate.h b/mozilla/xpcom/proxy/src/nsProxyEventPrivate.h index 027f47e6a1c..1d98bb19074 100644 --- a/mozilla/xpcom/proxy/src/nsProxyEventPrivate.h +++ b/mozilla/xpcom/proxy/src/nsProxyEventPrivate.h @@ -27,6 +27,7 @@ #include "xptcall.h" // defines nsXPTCVariant #include "nsProxyEvent.h" +#include "nsProxyObjectManager.h" class nsProxyEventObject; class nsProxyEventClass; diff --git a/mozilla/xpcom/proxy/tests/Makefile.in b/mozilla/xpcom/proxy/tests/Makefile.in index ec1c78f334d..3be6eb61d67 100644 --- a/mozilla/xpcom/proxy/tests/Makefile.in +++ b/mozilla/xpcom/proxy/tests/Makefile.in @@ -28,11 +28,6 @@ CPPSRCS = proxytests.cpp LIBS = \ -L$(DIST)/bin \ -lxpcom \ - -lxpt \ - -lxptcmd \ - -lxptinfo \ - -lreg \ - -lraptorbase \ -l$(MOZ_LIB_UTIL_PREFIX)util \ $(NSPR_LIBS) \ $(NULL) diff --git a/mozilla/xpcom/proxy/tests/makefile.win b/mozilla/xpcom/proxy/tests/makefile.win index c5378c4ad78..fa53369a304 100644 --- a/mozilla/xpcom/proxy/tests/makefile.win +++ b/mozilla/xpcom/proxy/tests/makefile.win @@ -24,22 +24,13 @@ OBJS = \ $(NULL) LLIBS = \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\xptinfo32.lib \ - $(DIST)\lib\xptcall32.lib \ - $(DIST)\lib\libproxy.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ $(NULL) LINCS = \ -I$(PUBLIC)\xpcom \ - -I$(PUBLIC)\xptcall \ - -I$(PUBLIC)\xptinfo \ - -I$(PUBLIC)\libxpt \ - -I$(PUBLIC)\libproxy \ - -I$(PUBLIC)\raptor \ $(NULL) include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/xpcom/reflect/Makefile.in b/mozilla/xpcom/reflect/Makefile.in new file mode 100644 index 00000000000..65b7e455ff6 --- /dev/null +++ b/mozilla/xpcom/reflect/Makefile.in @@ -0,0 +1,30 @@ +#!gmake +# The contents of this file are subject to the Netscape Public License +# Version 1.0 (the "NPL"); you may not use this file except in +# compliance with the NPL. You may obtain a copy of the NPL at +# http://www.mozilla.org/NPL/ +# +# Software distributed under the NPL is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +# for the specific language governing rights and limitations under the +# NPL. +# +# The Initial Developer of this code under the NPL is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All Rights +# Reserved. + +DEPTH = ../.. +topsrcdir = @top_srcdir@ +VPATH = @srcdir@ +srcdir = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +DIRS = xptinfo xptcall + +ifdef ENABLE_TESTS +DIRS += tests +endif + +include $(topsrcdir)/config/rules.mk diff --git a/mozilla/xpcom/reflect/xptcall/public/Makefile.in b/mozilla/xpcom/reflect/xptcall/public/Makefile.in index e9205e5357b..30923122a3b 100644 --- a/mozilla/xpcom/reflect/xptcall/public/Makefile.in +++ b/mozilla/xpcom/reflect/xptcall/public/Makefile.in @@ -21,7 +21,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = xptcall +MODULE = xpcom EXPORTS = xptcall.h \ xptcstubsdecl.inc \ diff --git a/mozilla/xpcom/reflect/xptcall/public/makefile.win b/mozilla/xpcom/reflect/xptcall/public/makefile.win index 25d3c1e475c..e9963c7facc 100644 --- a/mozilla/xpcom/reflect/xptcall/public/makefile.win +++ b/mozilla/xpcom/reflect/xptcall/public/makefile.win @@ -19,11 +19,11 @@ IGNORE_MANIFEST=1 DEPTH=..\..\..\.. +MODULE = xpcom + EXPORTS = xptcall.h \ xptcstubsdecl.inc \ xptcstubsdef.inc \ $(NULL) -MODULE = xptcall - include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/xpcom/reflect/xptcall/src/Makefile.in b/mozilla/xpcom/reflect/xptcall/src/Makefile.in index 40b11f18dd2..79d89c81b3b 100644 --- a/mozilla/xpcom/reflect/xptcall/src/Makefile.in +++ b/mozilla/xpcom/reflect/xptcall/src/Makefile.in @@ -21,7 +21,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = xptcall +MODULE = xpcom LIBRARY_NAME = xptcall DIRS = md @@ -31,7 +31,11 @@ CFLAGS += -DEXPORT_XPTC_API CPPSRCS = xptcall.cpp \ $(NULL) -REQUIRES = $(MODULE) +REQUIRES = xpcom + +# we don't want the shared lib, but we want to force the creation of a static lib. +override NO_SHARED_LIB=1 +override NO_STATIC_LIB= # export:: libs diff --git a/mozilla/xpcom/reflect/xptcall/src/makefile.win b/mozilla/xpcom/reflect/xptcall/src/makefile.win index a0d8df4f2ba..db195b1ecda 100644 --- a/mozilla/xpcom/reflect/xptcall/src/makefile.win +++ b/mozilla/xpcom/reflect/xptcall/src/makefile.win @@ -20,46 +20,30 @@ IGNORE_MANIFEST=1 DIRS=md -MAKE_OBJ_TYPE = DLL -DLLNAME = xptcall$(MOZ_BITS) -#PDBFILE = $(DLLNAME).pdb -#MAPFILE = $(DLLNAME).map -DLL =.\$(OBJDIR)\$(DLLNAME).dll +MODULE=xpcom -MODULE=xptcall -REQUIRES=xpcom libxpt xptinfo +LIBRARY_NAME = xpcomxptcall_s DEFINES=-DWIN32_LEAN_AND_MEAN -DEXPORT_XPTC_API -OBJS= \ - .\$(OBJDIR)\xptcall.obj \ - .\md\win32\$(OBJDIR)\xptcinvoke.obj \ - .\md\win32\$(OBJDIR)\xptcstubs.obj \ +OBJS= \ + .\$(OBJDIR)\xptcall.obj \ $(NULL) EXPORTS = \ $(NULL) -LINCS=-I$(PUBLIC)\xptcall -I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor \ - -I$(PUBLIC)\libxpt -I$(PUBLIC)\xptinfo +LINCS=-I$(PUBLIC)\xpcom LCFLAGS = \ $(LCFLAGS) \ $(DEFINES) \ $(NULL) -LLIBS= $(LIBNSPR) \ - $(DIST)\lib\xpcom.lib \ - $(DIST)\lib\xptinfo$(MOZ_BITS).lib \ - $(NULL) - include <$(DEPTH)\config\rules.mak> -install:: $(DLL) - $(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin - $(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib $(DIST)\lib - +libs:: $(LIBRARY) + $(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib clobber:: - rm -f $(DIST)\lib\$(DLLNAME).lib - rm -f $(DIST)\bin\$(DLLNAME).dll + rm -f $(DIST)\lib\$(LIBRARY_NAME).lib diff --git a/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in b/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in index 29aa04654bb..e5147be5502 100644 --- a/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in +++ b/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in @@ -26,7 +26,7 @@ include $(topsrcdir)/config/config.mk CFLAGS += -DEXPORT_XPTC_API LIBRARY_NAME = xptcmd -MODULE = xptcall +MODULE = xpcom CPPSRCS = \ xptcinvoke_unsupported.cpp \ @@ -57,6 +57,10 @@ ASFILES = \ endif endif +# we don't want the shared lib, but we want to force the creation of a static lib. +override NO_SHARED_LIB=1 +override NO_STATIC_LIB= + include $(topsrcdir)/config/rules.mk INCLUDES += -I$(srcdir)/../.. diff --git a/mozilla/xpcom/reflect/xptcall/src/md/win32/makefile.win b/mozilla/xpcom/reflect/xptcall/src/md/win32/makefile.win index fca0aedf844..cd90f7da5b1 100644 --- a/mozilla/xpcom/reflect/xptcall/src/md/win32/makefile.win +++ b/mozilla/xpcom/reflect/xptcall/src/md/win32/makefile.win @@ -16,20 +16,20 @@ # Reserved. DEPTH=..\..\..\..\..\.. +MODULE = xpcom IGNORE_MANIFEST=1 include <$(DEPTH)\config\config.mak> DEFINES=-DWIN32_LEAN_AND_MEAN -DEXPORT_XPTC_API -LINCS=-I..\.. -I$(PUBLIC)\xptcall -I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor \ - -I$(PUBLIC)\libxpt -I$(PUBLIC)\xptinfo +LINCS=-I..\.. -I$(PUBLIC)\xpcom LCFLAGS = \ $(LCFLAGS) \ $(DEFINES) \ $(NULL) -LIBRARY_NAME = xptcmd +LIBRARY_NAME = xpcomxptcmd_s OBJS= \ .\$(OBJDIR)\xptcinvoke.obj \ @@ -38,4 +38,8 @@ OBJS= \ include <$(DEPTH)\config\rules.mak> -install:: $(LIBRARY) +libs:: $(LIBRARY) + $(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib + +clobber:: + rm -f $(DIST)\lib\$(LIBRARY_NAME).lib diff --git a/mozilla/xpcom/reflect/xptcall/src/md/win32/xptcstubs.cpp b/mozilla/xpcom/reflect/xptcall/src/md/win32/xptcstubs.cpp index 068f4c7b54e..c78f8420292 100644 --- a/mozilla/xpcom/reflect/xptcall/src/md/win32/xptcstubs.cpp +++ b/mozilla/xpcom/reflect/xptcall/src/md/win32/xptcstubs.cpp @@ -144,3 +144,7 @@ nsresult __stdcall nsXPTCStubBase::Sentinel##n() \ #include "xptcstubsdef.inc" #pragma warning(default : 4035) // restore default +void +xptc_dummy() +{ +} diff --git a/mozilla/xpcom/reflect/xptcall/tests/Makefile.in b/mozilla/xpcom/reflect/xptcall/tests/Makefile.in index 8c2349d01e8..3b2b976bcda 100644 --- a/mozilla/xpcom/reflect/xptcall/tests/Makefile.in +++ b/mozilla/xpcom/reflect/xptcall/tests/Makefile.in @@ -37,10 +37,6 @@ CFLAGS += -DJS_THREADSAFE LIBS = \ -L$(DIST)/bin \ -lxpcom \ - -lxpt \ - -lxptcmd \ - -lxptinfo \ - -lreg \ -l$(MOZ_LIB_UTIL_PREFIX)util \ $(NSPR_LIBS) \ $(NULL) @@ -52,8 +48,7 @@ LIBS = \ include $(topsrcdir)/config/rules.mk -# INCLUDES += -I$(PUBLIC)/xpcom -I$(PUBLIC)/js -I$(PUBLIC)/xptcall \ -# -I$(PUBLIC)/xptinfo -I$(PUBLIC)/libxpt -I$(PUBLIC)/raptor +# INCLUDES += -I$(PUBLIC)/xpcom -I$(PUBLIC)/js -I$(PUBLIC)/raptor #$(PROGS): $(OBJS) # @$(MAKE_OBJDIR) diff --git a/mozilla/xpcom/reflect/xptcall/tests/makefile.win b/mozilla/xpcom/reflect/xptcall/tests/makefile.win index f1a1be4f3a8..3a9612ca3ba 100644 --- a/mozilla/xpcom/reflect/xptcall/tests/makefile.win +++ b/mozilla/xpcom/reflect/xptcall/tests/makefile.win @@ -23,17 +23,11 @@ MAKE_OBJ_TYPE = EXE PROG1 = .\$(OBJDIR)\TestXPTCInvoke.exe PROGRAMS = $(PROG1) -LCFLAGS=-DUSE_NSREG +LCFLAGS=-DUSE_NSREG -DWIN32_LEAN_AND_MEAN -DEFINES=-DWIN32_LEAN_AND_MEAN - -REQUIRES=xpcom xptcall - -LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\xptcall \ - -I$(PUBLIC)\raptor -I$(PUBLIC)\xptinfo -I$(PUBLIC)\libxpt +LINCS=-I$(PUBLIC)\xpcom LLIBS= \ - $(DIST)\lib\xptcall32.lib \ $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(NULL) diff --git a/mozilla/xpcom/reflect/xptinfo/public/Makefile.in b/mozilla/xpcom/reflect/xptinfo/public/Makefile.in index 9a150a50bda..a23d97a8545 100644 --- a/mozilla/xpcom/reflect/xptinfo/public/Makefile.in +++ b/mozilla/xpcom/reflect/xptinfo/public/Makefile.in @@ -18,11 +18,10 @@ DEPTH = ../../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ +MODULE = xpcom include $(DEPTH)/config/autoconf.mk -MODULE = xptinfo - CFLAGS += -DEXPORT_XPCI_API EXPORTS = \ diff --git a/mozilla/xpcom/reflect/xptinfo/public/makefile.win b/mozilla/xpcom/reflect/xptinfo/public/makefile.win index e24dd1b99dd..fe861c41d94 100644 --- a/mozilla/xpcom/reflect/xptinfo/public/makefile.win +++ b/mozilla/xpcom/reflect/xptinfo/public/makefile.win @@ -18,13 +18,12 @@ IGNORE_MANIFEST=1 DEPTH=..\..\..\.. +MODULE = xpcom EXPORTS = \ xptinfo.h \ nsIInterfaceInfoManager.h \ nsIInterfaceInfo.h \ - $(NULL) - -MODULE = xptinfo + $(NULL) include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/xpcom/reflect/xptinfo/src/Makefile.in b/mozilla/xpcom/reflect/xptinfo/src/Makefile.in index a4b9c3e904a..ce8bc746b6d 100644 --- a/mozilla/xpcom/reflect/xptinfo/src/Makefile.in +++ b/mozilla/xpcom/reflect/xptinfo/src/Makefile.in @@ -21,7 +21,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = xptinfo +MODULE = xpcom LIBRARY_NAME = xptinfo CSRCS = $(NULL) @@ -32,7 +32,11 @@ CPPSRCS = nsInterfaceInfo.cpp \ nsInterfaceRecord.cpp \ $(NULL) -REQUIRES = $(MODULE) +REQUIRES = xpcom + +# we don't want the shared lib, but we want to force the creation of a static lib. +override NO_SHARED_LIB=1 +override NO_STATIC_LIB= # export:: libs diff --git a/mozilla/xpcom/reflect/xptinfo/src/makefile.win b/mozilla/xpcom/reflect/xptinfo/src/makefile.win index bdcf85133f5..765d9a787d9 100644 --- a/mozilla/xpcom/reflect/xptinfo/src/makefile.win +++ b/mozilla/xpcom/reflect/xptinfo/src/makefile.win @@ -17,27 +17,15 @@ IGNORE_MANIFEST=1 -MAKE_OBJ_TYPE = DLL - DEPTH=..\..\..\.. +MODULE = xpcom -DLLNAME = xptinfo$(MOZ_BITS) -DLL =.\$(OBJDIR)\$(DLLNAME).dll +LIBRARY_NAME=xpcomxptinfo_s -LCFLAGS = -DEXPORT_XPTI_API -DWIN32_LEAN_AND_MEAN +LCFLAGS = -DWIN32_LEAN_AND_MEAN -DEXPORT_XPTI_API -DEXPORT_XPT_API LINCS = \ -I$(PUBLIC)\xpcom \ - -I$(PUBLIC)\raptor \ - -I$(PUBLIC)\libxpt \ - -I$(PUBLIC)\xptinfo \ - $(NULL) - -LLIBS = \ - $(DIST)\lib\libxpt$(MOZ_BITS).lib \ - $(DIST)\lib\xpcom.lib \ - $(LIBNSPR) \ - $(DIST)\lib\plc3.lib \ $(NULL) CSRCS = \ @@ -61,10 +49,10 @@ CPP_OBJS = \ .\$(OBJDIR)\nsTypelibRecord.obj \ $(NULL) -MODULE = xptinfo - include <$(DEPTH)\config\rules.mak> -install:: $(DLL) - $(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin - $(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib $(DIST)\lib +libs:: $(LIBRARY) + $(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib + +clobber:: + rm -f $(DIST)\lib\$(LIBRARY_NAME).lib diff --git a/mozilla/xpcom/reflect/xptinfo/tests/Makefile.in b/mozilla/xpcom/reflect/xptinfo/tests/Makefile.in index aade388046a..e78b96b0d55 100644 --- a/mozilla/xpcom/reflect/xptinfo/tests/Makefile.in +++ b/mozilla/xpcom/reflect/xptinfo/tests/Makefile.in @@ -21,7 +21,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = libxpt +MODULE = xpcom SIMPLE_PROGRAMS = TestInterfaceInfo @@ -33,10 +33,7 @@ CPPSRCS = \ LIBS = \ -L$(DIST)/bin \ - -lxptinfo \ - -lxpt \ -lxpcom \ - -lreg \ $(NSPR_LIBS) \ $(NULL) diff --git a/mozilla/xpcom/reflect/xptinfo/tests/makefile.win b/mozilla/xpcom/reflect/xptinfo/tests/makefile.win index cfddb93b2a5..89bd9453950 100644 --- a/mozilla/xpcom/reflect/xptinfo/tests/makefile.win +++ b/mozilla/xpcom/reflect/xptinfo/tests/makefile.win @@ -23,20 +23,13 @@ MAKE_OBJ_TYPE = EXE PROG1 = .\$(OBJDIR)\TestInterfaceInfo.exe PROGRAMS = $(PROG1) -LCFLAGS=-DUSE_NSREG +LCFLAGS=-DUSE_NSREG -DEXPORT_XPTI_API -DWIN32_LEAN_AND_MEAN -DEFINES=-DWIN32_LEAN_AND_MEAN +LINCS=-I$(PUBLIC)\xpcom -REQUIRES=xpcom libxpt xptinfo - -LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor \ - -I$(PUBLIC)\libxpt -I$(PUBLIC)\xptinfo - -LLIBS= \ - $(DIST)\lib\xpcom.lib \ - $(DIST)\lib\libxpt32.lib \ - $(DIST)\lib\xptinfo32.lib \ - $(LIBNSPR) \ +LLIBS= \ + $(DIST)\lib\xpcom.lib \ + $(LIBNSPR) \ $(NULL) include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/xpcom/sample/makefile.win b/mozilla/xpcom/sample/makefile.win index 21526959eb5..a8e251ffb40 100644 --- a/mozilla/xpcom/sample/makefile.win +++ b/mozilla/xpcom/sample/makefile.win @@ -31,7 +31,7 @@ CPP_OBJS=\ $(NULL) LLIBS=\ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ $(NULL) diff --git a/mozilla/xpcom/string/obsolete/nsString.cpp b/mozilla/xpcom/string/obsolete/nsString.cpp index d7584696719..d0d86da25a5 100644 --- a/mozilla/xpcom/string/obsolete/nsString.cpp +++ b/mozilla/xpcom/string/obsolete/nsString.cpp @@ -2217,7 +2217,7 @@ ostream& operator<<(ostream& os,nsAutoString1& aString){ * @param * @return */ -NS_BASE int fputs(const nsString1& aString, FILE* out){ +NS_COM int fputs(const nsString1& aString, FILE* out){ char buf[200]; char* cp = buf; PRInt32 aLength=aString.Length(); diff --git a/mozilla/xpcom/string/obsolete/nsString.h b/mozilla/xpcom/string/obsolete/nsString.h index ae25e4976fc..178307ca416 100644 --- a/mozilla/xpcom/string/obsolete/nsString.h +++ b/mozilla/xpcom/string/obsolete/nsString.h @@ -50,7 +50,7 @@ class nsISizeOfHandler; -class NS_BASE nsString1 { +class NS_COM nsString1 { public: /** @@ -771,7 +771,7 @@ typedef PRUnichar chartype; }; ostream& operator<<(ostream& os,nsString1& aString); -extern NS_BASE int fputs(const nsString1& aString, FILE* out); +extern NS_COM int fputs(const nsString1& aString, FILE* out); //---------------------------------------------------------------------- @@ -782,7 +782,7 @@ extern NS_BASE int fputs(const nsString1& aString, FILE* out); * allocated and grown as necessary. */ // XXX template this with a parameter for the size of the buffer? -class NS_BASE nsAutoString1 : public nsString1 { +class NS_COM nsAutoString1 : public nsString1 { public: nsAutoString1(); nsAutoString1(const nsString1& other); diff --git a/mozilla/xpcom/string/obsolete/nsString2.cpp b/mozilla/xpcom/string/obsolete/nsString2.cpp index 9263c5883f6..594dfc346fb 100644 --- a/mozilla/xpcom/string/obsolete/nsString2.cpp +++ b/mozilla/xpcom/string/obsolete/nsString2.cpp @@ -1723,7 +1723,7 @@ ostream& operator<<(ostream& os,nsString2& aString){ * @param * @return */ -NS_BASE int fputs(const nsString2& aString, FILE* out) +NS_COM int fputs(const nsString2& aString, FILE* out) { char buf[100]; char* cp = buf; diff --git a/mozilla/xpcom/string/obsolete/nsString2.h b/mozilla/xpcom/string/obsolete/nsString2.h index 4e4fef5a80d..4d9bab7bcab 100644 --- a/mozilla/xpcom/string/obsolete/nsString2.h +++ b/mozilla/xpcom/string/obsolete/nsString2.h @@ -52,9 +52,9 @@ class nsISizeOfHandler; #define nsAutoString2 nsAutoString #endif -class NS_BASE nsSubsumeStr; +class NS_COM nsSubsumeStr; -class NS_BASE nsString2 : public nsStr { +class NS_COM nsString2 : public nsStr { public: @@ -726,7 +726,7 @@ virtual void DebugDump(ostream& aStream) const; }; -extern NS_BASE int fputs(const nsString2& aString, FILE* out); +extern NS_COM int fputs(const nsString2& aString, FILE* out); ostream& operator<<(ostream& os,nsString2& aString); @@ -736,7 +736,7 @@ ostream& operator<<(ostream& os,nsString2& aString); If the buffer needs to grow, it gets reallocated on the heap. **************************************************************/ -class NS_BASE nsAutoString2 : public nsString2 { +class NS_COM nsAutoString2 : public nsString2 { public: nsAutoString2(eCharSize aCharSize=kDefaultCharSize); @@ -786,7 +786,7 @@ public: You should probably not use this class unless you really know what you're doing. ***************************************************************/ -class NS_BASE nsSubsumeStr : public nsString2 { +class NS_COM nsSubsumeStr : public nsString2 { public: nsSubsumeStr(nsString2& aString); nsSubsumeStr(nsStr& aString); diff --git a/mozilla/xpcom/tests/Makefile.in b/mozilla/xpcom/tests/Makefile.in index 6635172cc89..ef18bf27db4 100644 --- a/mozilla/xpcom/tests/Makefile.in +++ b/mozilla/xpcom/tests/Makefile.in @@ -66,14 +66,12 @@ LIBS = \ -lnetcnvts \ -lnetlib \ -lnetwork \ - -lraptorbase \ -lxp \ -lxpcom \ -lreg \ -ljsurl \ -l$(MOZ_LIB_DBM_PREFIX)dbm \ -lpwcac \ - -lgmbase$(MOZ_TOOLKIT) \ $(TK_LIBS) \ -limg \ $(JPEG_LIBS) \ diff --git a/mozilla/xpcom/tests/PropertiesTest.cpp b/mozilla/xpcom/tests/PropertiesTest.cpp index e2da04a1989..b4d21a04fb9 100644 --- a/mozilla/xpcom/tests/PropertiesTest.cpp +++ b/mozilla/xpcom/tests/PropertiesTest.cpp @@ -18,7 +18,6 @@ #define NS_IMPL_IDS -#include "nsXPComCIID.h" #include "nsIEventQueueService.h" #include "nsINetService.h" #include "nsIProperties.h" diff --git a/mozilla/xpcom/tests/TestBuffers.cpp b/mozilla/xpcom/tests/TestBuffers.cpp index e210737009a..673777055c3 100644 --- a/mozilla/xpcom/tests/TestBuffers.cpp +++ b/mozilla/xpcom/tests/TestBuffers.cpp @@ -21,7 +21,7 @@ #include "nsIComponentManager.h" #include "nsIServiceManager.h" #include "nsAutoLock.h" -#include "nsPageMgr.h" +#include "nsIPageManager.h" #include "nsCRT.h" #include "prprf.h" #include "prmem.h" diff --git a/mozilla/xpcom/tests/TestFactory.cpp b/mozilla/xpcom/tests/TestFactory.cpp index c7d8a029592..f7921f8f132 100644 --- a/mozilla/xpcom/tests/TestFactory.cpp +++ b/mozilla/xpcom/tests/TestFactory.cpp @@ -20,6 +20,7 @@ #include "TestFactory.h" #include "nsISupports.h" #include "nsIComponentManager.h" +#include "nsIServiceManager.h" NS_DEFINE_IID(kFactoryIID, NS_IFACTORY_IID); NS_DEFINE_CID(kTestFactoryCID, NS_TESTFACTORY_CID); @@ -27,6 +28,17 @@ NS_DEFINE_CID(kTestLoadedFactoryCID, NS_TESTLOADEDFACTORY_CID); NS_DEFINE_IID(kTestClassIID, NS_ITESTCLASS_IID); int main(int argc, char **argv) { + nsresult rv; + nsIServiceManager* servMgr; + + rv = NS_InitXPCOM(&servMgr); + if (NS_FAILED(rv)) return rv; + + // XXX why do I have to do this?! + rv = nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup, + "components"); + if (NS_FAILED(rv)) return rv; + RegisterTestFactories(); ITestClass *t = NULL; diff --git a/mozilla/xpcom/tests/dynamic/makefile.win b/mozilla/xpcom/tests/dynamic/makefile.win index afbbdabece0..b94161ae4e0 100644 --- a/mozilla/xpcom/tests/dynamic/makefile.win +++ b/mozilla/xpcom/tests/dynamic/makefile.win @@ -26,7 +26,7 @@ DLL = $(OBJDIR)\TestDynamic.dll LINCS = -I.. -I$(PUBLIC)\xpcom LLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib !if "$(MOZ_BITS)"=="32" && defined(MOZ_DEBUG) && defined(GLOWCODE) @@ -46,4 +46,4 @@ MODULE = xpcom include <$(DEPTH)\config\rules.mak> install:: $(DLL) - $(MAKE_INSTALL) $(DLL) $(DIST)\bin + $(MAKE_INSTALL) $(DLL) $(DIST)\bin\components diff --git a/mozilla/xpcom/tests/makefile.win b/mozilla/xpcom/tests/makefile.win index 495e64fca4f..c65d7db77a2 100644 --- a/mozilla/xpcom/tests/makefile.win +++ b/mozilla/xpcom/tests/makefile.win @@ -27,18 +27,54 @@ PROG2 = .\$(OBJDIR)\RegFactory.exe PROG3 = .\$(OBJDIR)\TestArray.exe PROG4 = .\$(OBJDIR)\TestID.exe PROG5 = .\$(OBJDIR)\TestServMgr.exe -PROGRAMS = $(PROG1) $(PROG2) $(PROG3) $(PROG4) $(PROG5) $(PROG6) +#PROG6 = .\$(OBJDIR)\TimerTest.exe +PROG7 = .\$(OBJDIR)\TestAtoms.exe +PROG8 = .\$(OBJDIR)\CvtURL.exe +PROG9 = .\$(OBJDIR)\TestCRT.exe +PROG10 = .\$(OBJDIR)\FilesTest.exe +PROG11 = .\$(OBJDIR)\PropertiesTest.exe +PROG12 = .\$(OBJDIR)\TestAutoLock.exe +PROG13 = .\$(OBJDIR)\TestThreads.exe +PROG14 = .\$(OBJDIR)\TestObserverService.exe +PROG15 = .\$(OBJDIR)\TestBuffers.exe +PROG16 = .\$(OBJDIR)\TestPipes.exe + +RESFILE = timer.res + +PROGRAMS = $(PROG1) $(PROG2) $(PROG3) $(PROG4) $(PROG5) \ + $(PROG6) $(PROG7) \ +!ifdef MODULAR_NETLIB + $(PROG8) \ + $(PROG9) \ + $(PROG10) \ +!endif + $(PROG11) \ + $(PROG12) \ + $(PROG13) \ + $(PROG14) \ + $(PROG15) \ + $(PROG16) \ + $(NULL) LCFLAGS=-DUSE_NSREG -GX REQUIRES=libreg -LINCS=-I$(PUBLIC)\xpcom -Iservices +LINCS= \ + -Iservices \ +!ifdef MODULAR_NETLIB + -I$(PUBLIC)\netlib \ +!endif + -I$(PUBLIC)\xpcom + +LLIBS= \ + $(DIST)\lib\xpcom.lib \ +!ifdef MODULAR_NETLIB + $(DIST)\lib\netlib.lib \ +!endif + $(LIBNSPR) \ + $(DIST)\lib\plc3.lib -LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(LIBNSPR) \ - $(DIST)\lib\plc3.lib !if "$(MOZ_BITS)"=="32" && defined(MOZ_DEBUG) && defined(GLOWCODE) LLIBS=$(LLIBS) $(GLOWDIR)\glowcode.lib !endif @@ -48,7 +84,7 @@ include <$(DEPTH)\config\rules.mak> install:: $(PROGRAMS) -for %p in ($(PROGRAMS)) do $(MAKE_INSTALL) %p $(DIST)\bin -clobber:: +xoclobber:: -for %p in ($(PROGRAMS)) do $(RM) %p $(DIST)\bin\%p # Move this into config/obj.inc when it's allowed @@ -72,3 +108,27 @@ $(PROG2): $(OBJDIR) RegFactory.cpp $(PROG3): $(OBJDIR) TestArray.cpp $(PROG4): $(OBJDIR) TestID.cpp $(PROG5): $(OBJDIR) TestServMgr.cpp + +#$(PROG6): $(OBJDIR) TimerTest.cpp $(RESFILE) + +$(PROG7): $(OBJDIR) TestAtoms.cpp + +$(PROG8): $(OBJDIR) FilesTest.cpp + +!ifdef MODULAR_NETLIB +$(PROG9): $(OBJDIR) CvtURL.cpp + +$(PROG10): $(OBJDIR) TestCRT.cpp + +$(PROG11): $(OBJDIR) PropertiesTest.cpp +!endif + +$(PROG12): $(OBJDIR) TestAutoLock.cpp + +$(PROG13): $(OBJDIR) TestThreads.cpp + +$(PROG14): $(OBJDIR) TestObserverService.cpp + +$(PROG15): $(OBJDIR) TestBuffers.cpp + +$(PROG16): $(OBJDIR) TestPipes.cpp diff --git a/mozilla/xpcom/tests/services/makefile.win b/mozilla/xpcom/tests/services/makefile.win index e6f74317747..3ee7fd3819c 100644 --- a/mozilla/xpcom/tests/services/makefile.win +++ b/mozilla/xpcom/tests/services/makefile.win @@ -26,7 +26,7 @@ DLL = $(OBJDIR)\MyService.dll LINCS = -I.. -I$(PUBLIC)\xpcom LLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib !if "$(MOZ_BITS)"=="32" && defined(MOZ_DEBUG) && defined(GLOWCODE) diff --git a/mozilla/xpcom/tests/windows/makefile.win b/mozilla/xpcom/tests/windows/makefile.win index e5d2f63e8c0..0bec8eab3cd 100644 --- a/mozilla/xpcom/tests/windows/makefile.win +++ b/mozilla/xpcom/tests/windows/makefile.win @@ -28,7 +28,7 @@ LINCS=-I$(PUBLIC)\xpcom LLIBS= \ rpcrt4.lib \ uuid.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib !if "$(MOZ_BITS)"=="32" && defined(MOZ_DEBUG) && defined(GLOWCODE) diff --git a/mozilla/xpcom/threads/MANIFEST b/mozilla/xpcom/threads/MANIFEST new file mode 100644 index 00000000000..bd7400d1eed --- /dev/null +++ b/mozilla/xpcom/threads/MANIFEST @@ -0,0 +1,4 @@ +nsAutoLock.h +nsIEventQueue.h +nsIEventQueueService.h +nsIThread.h diff --git a/mozilla/xpcom/threads/makefile.win b/mozilla/xpcom/threads/makefile.win index 17b6e7d5318..53de76d246d 100644 --- a/mozilla/xpcom/threads/makefile.win +++ b/mozilla/xpcom/threads/makefile.win @@ -28,8 +28,6 @@ EXPORTS = \ nsIEventQueue.h \ nsIEventQueueService.h \ nsIThread.h \ - nsITimer.h \ - nsITimerCallback.h \ $(NULL) XPIDLSRCS = \ @@ -51,7 +49,6 @@ CPP_OBJS = \ .\$(OBJDIR)\nsEventQueue.obj \ .\$(OBJDIR)\nsEventQueueService.obj \ .\$(OBJDIR)\nsThread.obj \ - .\$(OBJDIR)\nsTimer_win.obj \ $(NULL) include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/xpcom/threads/nsAutoLock.h b/mozilla/xpcom/threads/nsAutoLock.h index 8c52072639f..a86aab4c870 100644 --- a/mozilla/xpcom/threads/nsAutoLock.h +++ b/mozilla/xpcom/threads/nsAutoLock.h @@ -74,7 +74,7 @@ #include "prlog.h" // If you ever decide that you need to add a non-inline method to this -// class, be sure to change the class declaration to "class NS_BASE +// class, be sure to change the class declaration to "class NS_COM // nsAutoLock". class nsAutoLock { diff --git a/mozilla/xpcom/threads/nsEventQueue.cpp b/mozilla/xpcom/threads/nsEventQueue.cpp index b4981790eeb..aa765b716f9 100644 --- a/mozilla/xpcom/threads/nsEventQueue.cpp +++ b/mozilla/xpcom/threads/nsEventQueue.cpp @@ -113,5 +113,8 @@ nsEventQueueImpl::Create(nsISupports *aOuter, if (evt == NULL) return NS_ERROR_OUT_OF_MEMORY; nsresult rv = evt->QueryInterface(aIID, aResult); + if (NS_FAILED(rv)) { + delete evt; + } return rv; } diff --git a/mozilla/xpcom/threads/nsEventQueue.h b/mozilla/xpcom/threads/nsEventQueue.h index 7203fae3166..03ae7a4e41f 100644 --- a/mozilla/xpcom/threads/nsEventQueue.h +++ b/mozilla/xpcom/threads/nsEventQueue.h @@ -19,7 +19,6 @@ #include "prmon.h" #include "nsIEventQueue.h" -#include "nsXPComFactory.h" static NS_DEFINE_IID(kIEventQueueIID, NS_IEVENTQUEUE_IID); diff --git a/mozilla/xpcom/threads/nsEventQueueService.cpp b/mozilla/xpcom/threads/nsEventQueueService.cpp index 3bcc7506871..c0b2e72b4fd 100644 --- a/mozilla/xpcom/threads/nsEventQueueService.cpp +++ b/mozilla/xpcom/threads/nsEventQueueService.cpp @@ -16,56 +16,14 @@ * Corporation. Portions created by Netscape are Copyright (C) 1998 * Netscape Communications Corporation. All Rights Reserved. */ + +#include "nsEventQueueService.h" #include "prmon.h" #include "nsComponentManager.h" -#include "nsIEventQueueService.h" #include "nsIEventQueue.h" -#include "nsHashtable.h" -#include "nsXPComFactory.h" static NS_DEFINE_IID(kIEventQueueServiceIID, NS_IEVENTQUEUESERVICE_IID); -// XXX move to nsID.h or nsHashtable.h? (copied from nsComponentManager.cpp) -class ThreadKey: public nsHashKey { -private: - const PRThread* id; - -public: - ThreadKey(const PRThread* aID) { - id = aID; - } - - PRUint32 HashValue(void) const { - return (PRUint32)id; - } - - PRBool Equals(const nsHashKey *aKey) const { - return (id == ((const ThreadKey *) aKey)->id); - } - - nsHashKey *Clone(void) const { - return new ThreadKey(id); - } -}; - - -/* This class is used with the EventQueueEntries to allow us to nest - event queues */ -class EventQueueStack -{ -public: - EventQueueStack(EventQueueStack* next = NULL); - ~EventQueueStack(); - - nsIEventQueue* GetEventQueue(); - EventQueueStack* GetNext(); - void SetNext(EventQueueStack* aStack); - -private: - nsIEventQueue* mEventQueue; - EventQueueStack* mNextQueue; -}; - static NS_DEFINE_IID(kIEventQueueIID, NS_IEVENTQUEUE_IID); static NS_DEFINE_IID(kEventQueueCID, NS_EVENTQUEUE_CID); @@ -113,30 +71,7 @@ void EventQueueStack::SetNext(EventQueueStack* aStack) mNextQueue = aStack; } -/* - * This class maintains the data associated with each entry in the EventQueue - * service's hash table... - * - * It derives from nsISupports merely as a convienence since the entries are - * reference counted... - */ -class EventQueueEntry : public nsISupports -{ -public: - EventQueueEntry(); - virtual ~EventQueueEntry(); - - // nsISupports interface... - NS_DECL_ISUPPORTS - - nsIEventQueue* GetEventQueue(void); - - void PushQueue(void); - void PopQueue(void); - -private: - EventQueueStack* mQueueStack; -}; +//////////////////////////////////////////////////////////////////////////////// /* nsISupports interface implementation... */ NS_IMPL_ISUPPORTS(EventQueueEntry,kISupportsIID); @@ -182,34 +117,7 @@ void EventQueueEntry::PopQueue(void) delete popped; } -class nsEventQueueServiceImpl : public nsIEventQueueService -{ -public: - nsEventQueueServiceImpl(); - virtual ~nsEventQueueServiceImpl(); - - // nsISupports interface... - NS_DECL_ISUPPORTS - - // nsIEventQueueService interface... - NS_IMETHOD CreateThreadEventQueue(void); - NS_IMETHOD DestroyThreadEventQueue(void); - NS_IMETHOD GetThreadEventQueue(PRThread* aThread, nsIEventQueue** aResult); - - NS_IMETHOD CreateFromPLEventQueue(PLEventQueue* aPLEventQueue, nsIEventQueue** aResult); - - NS_IMETHOD PushThreadEventQueue(void); - NS_IMETHOD PopThreadEventQueue(void); - -#ifdef XP_MAC - NS_IMETHOD ProcessEvents(); -#endif // XP_MAC - -private: - nsHashtable* mEventQTable; - PRMonitor* mEventQMonitor; -}; - +//////////////////////////////////////////////////////////////////////////////// nsEventQueueServiceImpl::nsEventQueueServiceImpl() { @@ -239,6 +147,20 @@ nsEventQueueServiceImpl::~nsEventQueueServiceImpl() PR_DestroyMonitor(mEventQMonitor); } +NS_METHOD +nsEventQueueServiceImpl::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) +{ + if (aOuter) + return NS_ERROR_NO_AGGREGATION; + nsEventQueueServiceImpl* eqs = new nsEventQueueServiceImpl(); + if (eqs == NULL) + return NS_ERROR_OUT_OF_MEMORY; + NS_ADDREF(eqs); + nsresult rv = eqs->QueryInterface(aIID, aResult); + NS_RELEASE(eqs); + return rv; +} + /* nsISupports interface implementation... */ NS_IMPL_ISUPPORTS(nsEventQueueServiceImpl,kIEventQueueServiceIID); @@ -418,6 +340,7 @@ done: PR_ExitMonitor(mEventQMonitor); return rv; } + #ifdef XP_MAC // Callback from the enumeration of the HashTable. static PRBool EventDispatchingFunc(nsHashKey *aKey, void *aData, void* closure) @@ -442,77 +365,5 @@ NS_IMETHODIMP nsEventQueueServiceImpl::ProcessEvents() } #endif -//---------------------------------------------------------------------- -static nsEventQueueServiceImpl* gServiceInstance = NULL; - -NS_DEF_FACTORY(EventQueueServiceGen,nsEventQueueServiceImpl) - -class nsEventQueueServiceFactory : public nsEventQueueServiceGenFactory -{ -public: - NS_IMETHOD CreateInstance(nsISupports *aOuter, - const nsIID &aIID, - void **aResult); -}; - -NS_IMETHODIMP -nsEventQueueServiceFactory::CreateInstance(nsISupports *aOuter, - const nsIID &aIID, - void **aResult) -{ - nsresult rv; - nsISupports* inst; - - // Parameter validation... - if (NULL == aResult) { - rv = NS_ERROR_NULL_POINTER; - goto done; - } - // Do not support aggregatable components... - *aResult = NULL; - if (NULL != aOuter) { - rv = NS_ERROR_NO_AGGREGATION; - goto done; - } - - if (NULL == gServiceInstance) { - // Create a new instance of the component... - NS_NEWXPCOM(gServiceInstance, nsEventQueueServiceImpl); - if (NULL == gServiceInstance) { - rv = NS_ERROR_OUT_OF_MEMORY; - goto done; - } - NS_ADDREF(gServiceInstance); - } - - // If the QI fails, the component will be destroyed... - // - // Use a local copy so the NS_RELEASE() will not null the global - // pointer... - inst = gServiceInstance; - - NS_ADDREF(inst); - rv = inst->QueryInterface(aIID, aResult); - NS_RELEASE(inst); - -done: - return rv; -} - - -// Entry point to create nsEventQueueService factory instances... - -nsresult NS_NewEventQueueServiceFactory(nsIFactory** aResult) -{ - nsresult rv = NS_OK; - nsIFactory* inst = new nsEventQueueServiceFactory(); - if (NULL == inst) { - rv = NS_ERROR_OUT_OF_MEMORY; - } - else { - NS_ADDREF(inst); - } - *aResult = inst; - return rv; -} +//////////////////////////////////////////////////////////////////////////////// diff --git a/mozilla/xpcom/threads/nsIEventQueueService.h b/mozilla/xpcom/threads/nsIEventQueueService.h index 8373242d2c1..3135d1e365a 100644 --- a/mozilla/xpcom/threads/nsIEventQueueService.h +++ b/mozilla/xpcom/threads/nsIEventQueueService.h @@ -30,6 +30,11 @@ { 0xa6cf90dc, 0x15b3, 0x11d2, \ {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} } +/* be761f00-a3b0-11d2-996c-0080c7cb1080 */ +#define NS_EVENTQUEUESERVICE_CID \ +{ 0xbe761f00, 0xa3b0, 0x11d2, \ + {0x99, 0x6c, 0x00, 0x80, 0xc7, 0xcb, 0x10, 0x80} } + class nsIEventQueueService : public nsISupports { public: diff --git a/mozilla/xpcom/threads/nsIThread.h b/mozilla/xpcom/threads/nsIThread.h index f662e54897a..bf23db45368 100644 --- a/mozilla/xpcom/threads/nsIThread.h +++ b/mozilla/xpcom/threads/nsIThread.h @@ -25,13 +25,12 @@ //////////////////////////////////////////////////////////////////////////////// -// XXX regenerate: #define NS_IRUNNABLE_IID \ -{ /* 677d9a90-93ee-11d2-816a-006008119d7a */ \ - 0x677d9a90, \ - 0x93ee, \ - 0x11d2, \ - {0x81, 0x6a, 0x00, 0x60, 0x19, 0x11, 0x9d, 0x7a} \ +{ /* e06996e0-0d6b-11d3-9331-00104ba0fd40 */ \ + 0xe06996e0, \ + 0x0d6b, \ + 0x11d3, \ + {0x93, 0x31, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \ } class nsIRunnable : public nsISupports @@ -45,13 +44,12 @@ public: //////////////////////////////////////////////////////////////////////////////// -// XXX regenerate: #define NS_ITHREAD_IID \ -{ /* 677d9a90-93ee-11d2-816a-006008119d7a */ \ - 0x677d9a90, \ - 0x93ee, \ - 0x11d2, \ - {0x81, 0x6a, 0x00, 0x60, 0x29, 0x11, 0x9d, 0x7a} \ +{ /* ecbb89e0-0d6b-11d3-9331-00104ba0fd40 */ \ + 0xecbb89e0, \ + 0x0d6b, \ + 0x11d3, \ + {0x93, 0x31, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \ } class nsIThread : public nsISupports @@ -60,10 +58,10 @@ public: NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITHREAD_IID); // returns the nsIThread for the current thread: - static NS_BASE nsresult GetCurrent(nsIThread* *result); + static NS_COM nsresult GetCurrent(nsIThread* *result); // returns the nsIThread for an arbitrary PRThread: - static NS_BASE nsresult GetIThread(PRThread* prthread, nsIThread* *result); + static NS_COM nsresult GetIThread(PRThread* prthread, nsIThread* *result); NS_IMETHOD Join() = 0; @@ -78,7 +76,7 @@ public: NS_IMETHOD GetPRThread(PRThread* *result) = 0; }; -extern NS_BASE nsresult +extern NS_COM nsresult NS_NewThread(nsIThread* *result, nsIRunnable* runnable, PRUint32 stackSize = 0, @@ -88,13 +86,12 @@ NS_NewThread(nsIThread* *result, //////////////////////////////////////////////////////////////////////////////// -// XXX regenerate: #define NS_ITHREADPOOL_IID \ -{ /* 677d9a90-93ee-11d2-816a-006008119d7a */ \ - 0x677d9a90, \ - 0x93ee, \ - 0x11d2, \ - {0x81, 0x6a, 0x00, 0x60, 0x39, 0x11, 0x9d, 0x7a} \ +{ /* 074d0170-0d6c-11d3-9331-00104ba0fd40 */ \ + 0x074d0170, \ + 0x0d6c, \ + 0x11d3, \ + {0x93, 0x31, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \ } /** @@ -114,7 +111,7 @@ public: NS_IMETHOD Shutdown() = 0; }; -extern NS_BASE nsresult +extern NS_COM nsresult NS_NewThreadPool(nsIThreadPool* *result, PRUint32 minThreads, PRUint32 maxThreads, PRUint32 stackSize = 0, diff --git a/mozilla/xpcom/threads/nsThread.cpp b/mozilla/xpcom/threads/nsThread.cpp index 84d153b1417..c9878dde916 100644 --- a/mozilla/xpcom/threads/nsThread.cpp +++ b/mozilla/xpcom/threads/nsThread.cpp @@ -160,7 +160,7 @@ nsThread::GetPRThread(PRThread* *result) return NS_OK; } -NS_BASE nsresult +NS_COM nsresult NS_NewThread(nsIThread* *result, nsIRunnable* runnable, PRUint32 stackSize, @@ -203,13 +203,13 @@ nsThread::RegisterThreadSelf() return NS_OK; } -NS_BASE nsresult +NS_COM nsresult nsIThread::GetCurrent(nsIThread* *result) { return GetIThread(PR_CurrentThread(), result); } -NS_BASE nsresult +NS_COM nsresult nsIThread::GetIThread(PRThread* prthread, nsIThread* *result) { PRStatus status; @@ -422,7 +422,7 @@ nsThreadPool::Shutdown() return rv; } -NS_BASE nsresult +NS_COM nsresult NS_NewThreadPool(nsIThreadPool* *result, PRUint32 minThreads, PRUint32 maxThreads, PRUint32 stackSize, diff --git a/mozilla/xpcom/tools/Makefile.in b/mozilla/xpcom/tools/Makefile.in index 79c344bc535..c405c108bb0 100644 --- a/mozilla/xpcom/tools/Makefile.in +++ b/mozilla/xpcom/tools/Makefile.in @@ -23,8 +23,4 @@ include $(DEPTH)/config/autoconf.mk DIRS = registry -#ifdef BUILD_XPIDL -DIRS += xpidl -#endif - include $(topsrcdir)/config/rules.mk diff --git a/mozilla/xpcom/tools/makefile.win b/mozilla/xpcom/tools/makefile.win index f49dfe777b6..1f7d58af768 100644 --- a/mozilla/xpcom/tools/makefile.win +++ b/mozilla/xpcom/tools/makefile.win @@ -21,7 +21,6 @@ IGNORE_MANIFEST=1 DIRS = windows \ registry \ - xpidl \ $(NULL) # removed !ifdef BUILD_XPIDL above... diff --git a/mozilla/xpcom/tools/registry/Makefile.in b/mozilla/xpcom/tools/registry/Makefile.in index 6b43bc04107..7117b2890cf 100644 --- a/mozilla/xpcom/tools/registry/Makefile.in +++ b/mozilla/xpcom/tools/registry/Makefile.in @@ -29,7 +29,7 @@ include $(topsrcdir)/config/config.mk DEFINES += -DUSE_NSREG -LIBS = -lxpcom -lreg $(NSPR_LIBS) +LIBS = -lxpcom $(NSPR_LIBS) SIMPLE_PROGRAMS = $(addprefix $(OBJDIR)/, $(CPPSRCS:.cpp=)) diff --git a/mozilla/xpcom/tools/registry/makefile.win b/mozilla/xpcom/tools/registry/makefile.win index b11b1692378..e697bb1beb0 100644 --- a/mozilla/xpcom/tools/registry/makefile.win +++ b/mozilla/xpcom/tools/registry/makefile.win @@ -28,12 +28,12 @@ MAKE_OBJ_TYPE = EXE PROG1 = .\$(OBJDIR)\regExport.exe PROGRAMS = $(PROG1) -LLIBS = \ - $(LIBNSPR) \ - $(DIST)\lib\plc3.lib \ - $(DIST)\lib\xpcom$(MOZ_BITS).lib \ +LLIBS = \ + $(LIBNSPR) \ + $(DIST)\lib\plc3.lib \ + $(DIST)\lib\xpcom.lib \ !if "$(MOZ_BITS)"=="32" && defined(MOZ_DEBUG) && defined(GLOWCODE) - $(GLOWDIR)\glowcode.lib \ + $(GLOWDIR)\glowcode.lib \ !endif $(NULL) diff --git a/mozilla/xpcom/tools/registry/regExport.cpp b/mozilla/xpcom/tools/registry/regExport.cpp index 235dcb74c91..1fa1a7933e8 100644 --- a/mozilla/xpcom/tools/registry/regExport.cpp +++ b/mozilla/xpcom/tools/registry/regExport.cpp @@ -21,7 +21,6 @@ #include "nsIServiceManager.h" #include "nsIComponentManager.h" #include "nsIRegistry.h" -#include "nsXPComCIID.h" #include "nsIEnumerator.h" #include "prmem.h" #include "plstr.h" diff --git a/mozilla/xpcom/typelib/makefile.win b/mozilla/xpcom/typelib/makefile.win index 453660f4773..eadca6fe91a 100644 --- a/mozilla/xpcom/typelib/makefile.win +++ b/mozilla/xpcom/typelib/makefile.win @@ -19,9 +19,6 @@ DEPTH=..\.. IGNORE_MANIFEST=1 -# Build xpidl first, so it's available to process idl. -# Explicitly recur into libxpt/xptinfo and libxpt/xptcall, -# as they depend on xpidl and can't be in the DIRS for libxpt. DIRS= xpt \ xpidl diff --git a/mozilla/xpcom/typelib/xpidl/makefile.win b/mozilla/xpcom/typelib/xpidl/makefile.win index c79bc3ade96..ab2ea77c523 100644 --- a/mozilla/xpcom/typelib/xpidl/makefile.win +++ b/mozilla/xpcom/typelib/xpidl/makefile.win @@ -34,14 +34,15 @@ OBJS = \ $(NULL) LINCS=-I$(PUBLIC)\xpcom \ - -I$(PUBLIC)\libxpt \ -I$(MOZ_TOOLS)\include \ $(NULL) +LCFLAGS = -DEXPORT_XPT_API + MYDIR=C:\USR\LOCAL MYLIBS= \ - $(DIST)\lib\libxpt32.lib \ + $(DIST)\lib\xpcomxpt_s.lib \ $(MOZ_TOOLS)\lib\glib-1.2.lib \ $(MOZ_TOOLS)\lib\libidl-0.6.lib \ $(NULL) diff --git a/mozilla/xpcom/typelib/xpidl/xpidl_typelib.c b/mozilla/xpcom/typelib/xpidl/xpidl_typelib.c index d8863abe8c2..9d40c11dd39 100644 --- a/mozilla/xpcom/typelib/xpidl/xpidl_typelib.c +++ b/mozilla/xpcom/typelib/xpidl/xpidl_typelib.c @@ -47,17 +47,20 @@ struct priv_data { #endif typedef struct { - char *full_name; - char *name; - char *name_space; - char *iid; + char *full_name; + char *name; + char *name_space; + char *iid; + gboolean is_forward_dcl; } NewInterfaceHolder; static NewInterfaceHolder* -CreateNewInterfaceHolder(char *name, char *name_space, char *iid) +CreateNewInterfaceHolder(char *name, char *name_space, char *iid, + gboolean is_forward_dcl) { NewInterfaceHolder *holder = calloc(1, sizeof(NewInterfaceHolder)); if(holder) { + holder->is_forward_dcl = is_forward_dcl; if(name) holder->name = xpidl_strdup(name); if(name_space) @@ -105,15 +108,32 @@ add_interface_maybe(IDL_tree_func_data *tfd, gpointer user_data) TreeState *state = user_data; IDL_tree up; if (IDL_NODE_TYPE(tfd->tree) == IDLN_IDENT) { - if ((IDL_NODE_TYPE((up = IDL_NODE_UP(tfd->tree))) == IDLN_INTERFACE)) { + IDL_tree_type node_type = IDL_NODE_TYPE((up = IDL_NODE_UP(tfd->tree))); + if (node_type == IDLN_INTERFACE || node_type == IDLN_FORWARD_DCL) { + + /* We only want to add a new entry if there is no entry by this + * name or if the previously found entry was just a forward + * declaration and the new entry is not. + */ + char *iface = IDL_IDENT(tfd->tree).str; - if (!g_hash_table_lookup(IFACE_MAP(state), iface)) { + NewInterfaceHolder *old_holder = (NewInterfaceHolder *) + g_hash_table_lookup(IFACE_MAP(state), iface); + if (old_holder && old_holder->is_forward_dcl && + node_type != IDLN_FORWARD_DCL) + { + g_hash_table_remove(IFACE_MAP(state), iface); + DeleteNewInterfaceHolder(old_holder); + old_holder = NULL; + } + if (!old_holder) { /* XXX should we parse here and store a struct nsID *? */ char *iid = (char *)IDL_tree_property_get(tfd->tree, "uuid"); char *name_space = (char *) IDL_tree_property_get(tfd->tree, "namespace"); NewInterfaceHolder *holder = - CreateNewInterfaceHolder(iface, name_space, iid); + CreateNewInterfaceHolder(iface, name_space, iid, + (gboolean) node_type == IDLN_FORWARD_DCL); if(!holder) return FALSE; g_hash_table_insert(IFACE_MAP(state), @@ -159,6 +179,9 @@ find_interfaces(IDL_tree_func_data *tfd, gpointer user_data) xpidl_list_foreach(node, add_interface_maybe, user_data); node = IDL_INTERFACE(tfd->tree).ident; break; + case IDLN_FORWARD_DCL: + node = IDL_FORWARD_DCL(tfd->tree).ident; + break; default: node = NULL; } @@ -612,6 +635,7 @@ fill_td_from_type(TreeState *state, XPTTypeDescriptor *td, IDL_tree type) } switch (IDL_NODE_TYPE(up)) { /* This whole section is abominably ugly */ + case IDLN_FORWARD_DCL: case IDLN_INTERFACE: { XPTInterfaceDirectoryEntry *ide, *ides; uint16 num_ifaces; @@ -623,6 +647,8 @@ handle_iid_is: /* might get here via the goto, so re-check type */ if (IDL_NODE_TYPE(up) == IDLN_INTERFACE) className = IDL_IDENT(IDL_INTERFACE(up).ident).str; + else if (IDL_NODE_TYPE(up) == IDLN_FORWARD_DCL) + className = IDL_IDENT(IDL_FORWARD_DCL(up).ident).str; else className = IDL_IDENT(IDL_NATIVE(up).ident).str; iid_is = NULL; diff --git a/mozilla/xpcom/typelib/xpt/Makefile.in b/mozilla/xpcom/typelib/xpt/Makefile.in index 7440e7066a8..cce6935ba40 100644 --- a/mozilla/xpcom/typelib/xpt/Makefile.in +++ b/mozilla/xpcom/typelib/xpt/Makefile.in @@ -14,7 +14,7 @@ # Copyright (C) 1998 Netscape Communications Corporation. All Rights # Reserved. -DEPTH = ../.. +DEPTH = ../../.. topsrcdir = @top_srcdir@ VPATH = @srcdir@ srcdir = @srcdir@ @@ -24,12 +24,9 @@ include $(DEPTH)/config/autoconf.mk DIRS = public src ifdef ENABLE_TESTS -DIRS += tests +DIRS += tests endif DIRS += tools -# Don't recur into xptinfo and xptcall, because they may require xpidl, -# which hasn't been built yet. They'll be called from the xpcom makefile. - include $(topsrcdir)/config/rules.mk diff --git a/mozilla/xpcom/typelib/xpt/makefile.win b/mozilla/xpcom/typelib/xpt/makefile.win index 90df92cf5f9..eb87ecd52cd 100644 --- a/mozilla/xpcom/typelib/xpt/makefile.win +++ b/mozilla/xpcom/typelib/xpt/makefile.win @@ -14,11 +14,9 @@ # Copyright (C) 1998 Netscape Communications Corporation. All Rights # Reserved. -DEPTH=..\.. +DEPTH=..\..\.. IGNORE_MANIFEST=1 -# Don't recur into xptinfo and xptcall, because they may require xpidl, -# which hasn't been built yet. They'll be called from the xpcom makefile. DIRS=public src tests tools include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/xpcom/typelib/xpt/public/Makefile.in b/mozilla/xpcom/typelib/xpt/public/Makefile.in index ab26f656289..98af22947c9 100644 --- a/mozilla/xpcom/typelib/xpt/public/Makefile.in +++ b/mozilla/xpcom/typelib/xpt/public/Makefile.in @@ -14,14 +14,14 @@ # Copyright (C) 1998 Netscape Communications Corporation. All Rights # Reserved. -DEPTH = ../../.. +DEPTH = ../../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = libxpt +MODULE = xpcom EXPORTS = xpt_struct.h \ xpt_xdr.h \ diff --git a/mozilla/xpcom/typelib/xpt/public/makefile.win b/mozilla/xpcom/typelib/xpt/public/makefile.win index 2c149bdf054..b8764b2f5d8 100644 --- a/mozilla/xpcom/typelib/xpt/public/makefile.win +++ b/mozilla/xpcom/typelib/xpt/public/makefile.win @@ -17,12 +17,12 @@ IGNORE_MANIFEST=1 -DEPTH=..\..\.. +DEPTH=..\..\..\.. + +MODULE = xpcom EXPORTS = xpt_struct.h \ xpt_xdr.h \ $(NULL) -MODULE = libxpt - include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/xpcom/typelib/xpt/public/xpt_xdr.h b/mozilla/xpcom/typelib/xpt/public/xpt_xdr.h index d987874d081..189d0c6b3c1 100644 --- a/mozilla/xpcom/typelib/xpt/public/xpt_xdr.h +++ b/mozilla/xpcom/typelib/xpt/public/xpt_xdr.h @@ -23,9 +23,9 @@ #ifndef __xpt_xdr_h__ #define __xpt_xdr_h__ -#include -#include -#include +#include "nspr.h" +#include "plhash.h" +#include "prmem.h" #include "xpt_struct.h" PR_BEGIN_EXTERN_C diff --git a/mozilla/xpcom/typelib/xpt/src/Makefile.in b/mozilla/xpcom/typelib/xpt/src/Makefile.in index 032ae4a2e9b..6cab9fee3b9 100644 --- a/mozilla/xpcom/typelib/xpt/src/Makefile.in +++ b/mozilla/xpcom/typelib/xpt/src/Makefile.in @@ -15,14 +15,14 @@ # Reserved. # -DEPTH = ../../.. +DEPTH = ../../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = libxpt +MODULE = xpcom LIBRARY_NAME = xpt LIB_IS_C_ONLY = 1 @@ -33,8 +33,14 @@ CSRCS = xpt_struct.c \ REQUIRES = $(MODULE) -# build libxpt (but not xptinfo, xptcall subdirs) early so that it'll be -# available to xpidl, which also must be built early. +EXPORTS = $(NULL) + +# we don't want the shared lib, but we want to force the creation of a static lib. +override NO_SHARED_LIB=1 +override NO_STATIC_LIB= + +# build libxpt early so that it'll be available to xpidl, which also +# must be built early. export:: libs include $(topsrcdir)/config/rules.mk diff --git a/mozilla/xpcom/typelib/xpt/src/makefile.win b/mozilla/xpcom/typelib/xpt/src/makefile.win index b040768d0a8..77d4dde405c 100644 --- a/mozilla/xpcom/typelib/xpt/src/makefile.win +++ b/mozilla/xpcom/typelib/xpt/src/makefile.win @@ -17,17 +17,16 @@ IGNORE_MANIFEST=1 -MAKE_OBJ_TYPE = DLL +DEPTH=..\..\..\.. -DEPTH=..\..\.. +MODULE = xpcom -LIBNAME = .\$(OBJDIR)\libxpt$(MOZ_BITS) -DLL = $(LIBNAME).dll +LIBRARY_NAME = xpcomxpt_s LCFLAGS = -DEXPORT_XPT_API -DWIN32_LEAN_AND_MEAN LINCS = \ - -I$(PUBLIC)\libxpt \ + -I$(PUBLIC)\xpcom \ $(NULL) LLIBS = \ @@ -43,10 +42,10 @@ C_OBJS = \ .\$(OBJDIR)\xpt_xdr.obj \ $(NULL) -MODULE = libxpt - include <$(DEPTH)\config\rules.mak> -export:: $(DLL) - $(MAKE_INSTALL) $(LIBNAME).$(DLL_SUFFIX) $(DIST)\bin - $(MAKE_INSTALL) $(LIBNAME).$(LIB_SUFFIX) $(DIST)\lib +export:: $(LIBRARY) + $(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib + +clobber:: + rm -f $(DIST)\lib\$(LIBRARY_NAME).lib diff --git a/mozilla/xpcom/typelib/xpt/src/xpt_xdr.c b/mozilla/xpcom/typelib/xpt/src/xpt_xdr.c index 87bfa692fa2..2d233bf101e 100644 --- a/mozilla/xpcom/typelib/xpt/src/xpt_xdr.c +++ b/mozilla/xpcom/typelib/xpt/src/xpt_xdr.c @@ -19,7 +19,7 @@ /* Implementation of XDR primitives. */ #include "xpt_xdr.h" -#include +#include "nspr.h" #include /* strchr */ static PRBool diff --git a/mozilla/xpcom/typelib/xpt/tests/Makefile.in b/mozilla/xpcom/typelib/xpt/tests/Makefile.in index 687928c9fcd..40c5223324a 100644 --- a/mozilla/xpcom/typelib/xpt/tests/Makefile.in +++ b/mozilla/xpcom/typelib/xpt/tests/Makefile.in @@ -14,14 +14,14 @@ # Copyright (C) 1998 Netscape Communications Corporation. All Rights # Reserved. -DEPTH = ../../.. +DEPTH = ../../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = libxpt +MODULE = xpcom SIMPLE_PROGRAMS = PrimitiveTest SimpleTypeLib @@ -29,7 +29,7 @@ CSRCS = PrimitiveTest.c SimpleTypeLib.c LIBS = \ -L$(DIST)/bin \ - -lxpt \ + -lxpcom \ $(NULL) include $(topsrcdir)/config/rules.mk diff --git a/mozilla/xpcom/typelib/xpt/tests/makefile.win b/mozilla/xpcom/typelib/xpt/tests/makefile.win index 8ac388d9a3d..38592873831 100644 --- a/mozilla/xpcom/typelib/xpt/tests/makefile.win +++ b/mozilla/xpcom/typelib/xpt/tests/makefile.win @@ -15,7 +15,7 @@ # Copyright (C) 1998 Netscape Communications Corporation. All Rights # Reserved. -DEPTH=..\..\.. +DEPTH=..\..\..\.. IGNORE_MANIFEST=1 @@ -24,17 +24,12 @@ PROG1 = .\$(OBJDIR)\PrimitiveTest.exe PROG2 = .\$(OBJDIR)\SimpleTypeLib.exe PROGRAMS = $(PROG1) $(PROG2) -LCFLAGS=-DUSE_NSREG +LCFLAGS=-DWIN32_LEAN_AND_MEAN -DEXPORT_XPT_API -DUSE_NSREG -DEFINES=-DWIN32_LEAN_AND_MEAN - -REQUIRES=xpcom libxpt - -LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor -I$(PUBLIC)\libxpt +LINCS=-I$(PUBLIC)\xpcom LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\libxpt32.lib \ + $(DIST)\lib\xpcom.lib \ $(NULL) include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/xpcom/typelib/xpt/tools/Makefile.in b/mozilla/xpcom/typelib/xpt/tools/Makefile.in index e48d09cf21f..3d9986c28ba 100644 --- a/mozilla/xpcom/typelib/xpt/tools/Makefile.in +++ b/mozilla/xpcom/typelib/xpt/tools/Makefile.in @@ -14,14 +14,14 @@ # Copyright (C) 1998 Netscape Communications Corporation. All Rights # Reserved. -DEPTH = ../../.. +DEPTH = ../../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = libxpt +MODULE = xpcom SIMPLE_PROGRAMS = xpt_dump xpt_link diff --git a/mozilla/xpcom/typelib/xpt/tools/makefile.win b/mozilla/xpcom/typelib/xpt/tools/makefile.win index b5bf4073c88..33aca792f23 100644 --- a/mozilla/xpcom/typelib/xpt/tools/makefile.win +++ b/mozilla/xpcom/typelib/xpt/tools/makefile.win @@ -15,7 +15,7 @@ # Copyright (C) 1998 Netscape Communications Corporation. All Rights # Reserved. -DEPTH=..\..\.. +DEPTH=..\..\..\.. IGNORE_MANIFEST=1 @@ -24,23 +24,19 @@ PROG1 = .\$(OBJDIR)\xpt_dump.exe PROG2 = .\$(OBJDIR)\xpt_link.exe PROGRAMS = $(PROG1) $(PROG2) -LCFLAGS=-DUSE_NSREG +LCFLAGS=-DUSE_NSREG -DWIN32_LEAN_AND_MEAN -DEXPORT_XPT_API -DEFINES=-DWIN32_LEAN_AND_MEAN +LINCS=-I$(PUBLIC)\xpcom -REQUIRES=libxpt - -LINCS=-I$(PUBLIC)\libxpt - -LLIBS= \ - $(DIST)\lib\libxpt32.lib \ +LLIBS= \ + $(DIST)\lib\xpcom.lib \ $(NULL) include <$(DEPTH)\config\rules.mak> # build these xpt tools early so that it'll be # available along with xpidl, which also must be built early. -export:: $(PROGRAMS) +install:: $(PROGRAMS) -for %p in ($(PROGRAMS)) do $(MAKE_INSTALL) %p $(DIST)\bin # Move this into config/obj.inc when it's allowed diff --git a/mozilla/xpfe/AppCores/macbuild/AppCores.mcp b/mozilla/xpfe/AppCores/macbuild/AppCores.mcp index 5970f4e80ff..4eda4b897c0 100644 Binary files a/mozilla/xpfe/AppCores/macbuild/AppCores.mcp and b/mozilla/xpfe/AppCores/macbuild/AppCores.mcp differ diff --git a/mozilla/xpfe/AppCores/src/makefile.win b/mozilla/xpfe/AppCores/src/makefile.win index 8f6c8a8a5c2..8a7d5584fc4 100644 --- a/mozilla/xpfe/AppCores/src/makefile.win +++ b/mozilla/xpfe/AppCores/src/makefile.win @@ -54,13 +54,12 @@ LINCS= \ LLIBS = \ $(DIST)\lib\netlib.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\xppref32.lib \ $(DIST)\lib\xplib.lib \ $(DIST)\lib\js3250.lib \ $(DIST)\lib\jsdombase_s.lib \ $(DIST)\lib\jsdomevents_s.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(LIBNSPR) \ $(DIST)\lib\plc3.lib \ diff --git a/mozilla/xpfe/AppCores/src/nsBrowserAppCore.cpp b/mozilla/xpfe/AppCores/src/nsBrowserAppCore.cpp index d4c7dbaf49d..e97469aa901 100644 --- a/mozilla/xpfe/AppCores/src/nsBrowserAppCore.cpp +++ b/mozilla/xpfe/AppCores/src/nsBrowserAppCore.cpp @@ -18,6 +18,7 @@ */ #include "nsBrowserAppCore.h" + #include "nsIBrowserWindow.h" #include "nsIWebShell.h" #include "pratom.h" @@ -27,8 +28,8 @@ #include "nsAppCoresCIDs.h" #include "nsIDOMAppCoresManager.h" -#include "nsIFileWidget.h" -#include "nsWidgetsCID.h" +#define FILE_WIDGET_DEPENDENCY +#include "nsIFileSpec.h" #include "nsIScriptContext.h" #include "nsIScriptContextOwner.h" @@ -64,10 +65,6 @@ #include "nsIPresShell.h" #include "nsFileSpec.h" // needed for nsAutoCString -// FileDialog -static NS_DEFINE_IID(kCFileWidgetCID, NS_FILEWIDGET_CID); -static NS_DEFINE_IID(kIFileWidgetIID, NS_IFILEWIDGET_IID); - #if defined(ClientWallet) || defined(SingleSignon) #ifdef ClientWallet #include "nsIFileLocator.h" @@ -1134,35 +1131,30 @@ static void BuildFileURL(const char * aFileName, nsString & aFileURL) delete[] str; } -NS_IMETHODIMP -nsBrowserAppCore::OpenWindow() +//---------------------------------------------------------------------------------------- +NS_IMETHODIMP nsBrowserAppCore::OpenWindow() +//---------------------------------------------------------------------------------------- { - nsIFileWidget *fileWidget; + nsCOMPtr fileSpec; + nsresult rv = NS_NewFileSpec(getter_AddRefs(fileSpec)); + if (NS_FAILED(rv)) + return rv; - nsString title("Open File"); - if (NS_OK == nsComponentManager::CreateInstance(kCFileWidgetCID, nsnull, kIFileWidgetIID, (void**)&fileWidget)) { - nsString titles[] = {"All Readable Files", "HTML Files", - "XML Files", "Image Files", "All Files"}; - nsString filters[] = {"*.htm; *.html; *.xml; *.gif; *.jpg; *.jpeg; *.png", - "*.htm; *.html", - "*.xml", - "*.gif; *.jpg; *.jpeg; *.png", - "*.*"}; - fileWidget->SetFilterList(5, titles, filters); - - nsFileSpec fileSpec; - if (fileWidget->GetFile(nsnull, title, fileSpec) == nsFileDlgResults_OK) { - nsFileURL fileURL(fileSpec); - char buffer[1024]; - const nsAutoCString cstr(fileURL.GetAsString()); - PR_snprintf( buffer, sizeof buffer, "OpenFile(\"%s\")", (const char*)cstr); - ExecuteScript( mToolbarScriptContext, buffer ); - } - NS_RELEASE(fileWidget); - } - - return NS_OK; -} + rv = fileSpec->chooseInputFile( + "Open File", nsIFileSpec::eAllStandardFilters, nsnull, nsnull); + if (NS_FAILED(rv)) + return rv; + + char buffer[1024]; + char* urlString; + rv = fileSpec->GetURLString(&urlString); + if (NS_FAILED(rv)) + return rv; + PR_snprintf( buffer, sizeof buffer, "OpenFile(\"%s\")", urlString); + nsCRT::free(urlString); + ExecuteScript( mToolbarScriptContext, buffer ); + return rv; +} // nsBrowserAppCore::OpenWindow //---------------------------------------- void nsBrowserAppCore::SetButtonImage(nsIDOMNode * aParentNode, PRInt32 aBtnNum, const nsString &aResName) @@ -1444,5 +1436,3 @@ FindNamedXULElement(nsIWebShell * aShell, } return rv; } - - diff --git a/mozilla/xpfe/AppCores/src/nsToolkitCore.cpp b/mozilla/xpfe/AppCores/src/nsToolkitCore.cpp index 61f98fa3fba..2a576356e03 100644 --- a/mozilla/xpfe/AppCores/src/nsToolkitCore.cpp +++ b/mozilla/xpfe/AppCores/src/nsToolkitCore.cpp @@ -38,7 +38,6 @@ #include "nsIDOMXULDocument.h" #include "nsIDocument.h" #include "nsIDOMElement.h" -#include "nsXPComCIID.h" class nsIScriptContext; diff --git a/mozilla/xpfe/apprunner/src/makefile.win b/mozilla/xpfe/apprunner/src/makefile.win index 64e4dab9bb6..6b9a67dc3cf 100644 --- a/mozilla/xpfe/apprunner/src/makefile.win +++ b/mozilla/xpfe/apprunner/src/makefile.win @@ -45,7 +45,7 @@ LCFLAGS = \ $(NULL) LLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) \ $(NULL) diff --git a/mozilla/xpfe/appshell/macbuild/AppShell.mcp b/mozilla/xpfe/appshell/macbuild/AppShell.mcp index e0feb5c2643..4cbc0cc6bae 100644 Binary files a/mozilla/xpfe/appshell/macbuild/AppShell.mcp and b/mozilla/xpfe/appshell/macbuild/AppShell.mcp differ diff --git a/mozilla/xpfe/appshell/src/makefile.win b/mozilla/xpfe/appshell/src/makefile.win index 0a92b716e48..cd8bade465b 100644 --- a/mozilla/xpfe/appshell/src/makefile.win +++ b/mozilla/xpfe/appshell/src/makefile.win @@ -77,8 +77,7 @@ LCFLAGS = \ # These are the libraries we need to link with to create the DLL LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\netlib.lib \ diff --git a/mozilla/xpfe/appshell/src/nsAppShellService.cpp b/mozilla/xpfe/appshell/src/nsAppShellService.cpp index 02d5dd5ed19..1c9f0c59b54 100644 --- a/mozilla/xpfe/appshell/src/nsAppShellService.cpp +++ b/mozilla/xpfe/appshell/src/nsAppShellService.cpp @@ -24,7 +24,6 @@ #include "nsIURL.h" #include "nsIServiceManager.h" #include "nsIEventQueueService.h" -#include "nsXPComCIID.h" #include "nsXPComFactory.h" /* template implementation of a XPCOM factory */ #include "nsIAppShell.h" diff --git a/mozilla/xpfe/appshell/src/nsDefaultHelper.cpp b/mozilla/xpfe/appshell/src/nsDefaultHelper.cpp index 86b65961403..b0d0cda0097 100644 --- a/mozilla/xpfe/appshell/src/nsDefaultHelper.cpp +++ b/mozilla/xpfe/appshell/src/nsDefaultHelper.cpp @@ -25,7 +25,6 @@ #include "nsIEventQueueService.h" #include "nsIServiceManager.h" #include "nsXPComFactory.h" -#include "nsXPComCIID.h" // Class IDs... static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID); diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp index 15b11b917f2..e9ac1df684a 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp @@ -63,7 +63,6 @@ // For JS Execution #include "nsIScriptContextOwner.h" -#include "nsXPComCIID.h" #include "nsIEventQueueService.h" #include "plevent.h" #include "prmem.h" diff --git a/mozilla/xpfe/bootstrap/Makefile.in b/mozilla/xpfe/bootstrap/Makefile.in index 8782663926f..8385b7b6eb7 100644 --- a/mozilla/xpfe/bootstrap/Makefile.in +++ b/mozilla/xpfe/bootstrap/Makefile.in @@ -25,23 +25,17 @@ MODULE = apprunner include $(DEPTH)/config/autoconf.mk -TOOLKIT_GFX_LIB = -lgfx$(MOZ_TOOLKIT) -TOOLKIT_WIDGET_LIB = -lwidget$(MOZ_TOOLKIT) -TOOLKIT_BASE_LIB = -lgmbase$(MOZ_TOOLKIT) -TOOLKIT_CFLAGS = -DWIDGET_DLL=\"libwidget$(MOZ_TOOLKIT).$(DLL_SUFFIX)\" \ - -DGFXWIN_DLL=\"libgfx$(MOZ_TOOLKIT).$(DLL_SUFFIX)\" \ - $(TK_CFLAGS) +TOOLKIT_GFX_LIB = -lgfx$(MOZ_TOOLKIT) +TOOLKIT_WIDGET_LIB = -lwidget$(MOZ_TOOLKIT) LIBS = \ -L$(DIST)/bin \ -lnsappshell \ -lxpcom \ - -lraptorbase \ $(TOOLKIT_WIDGET_LIB)\ -lraptorgfx \ $(TOOLKIT_GFX_LIB)\ -lgfxps \ - $(TOOLKIT_BASE_LIB)\ -lreg \ -labouturl \ -lhttpurl \ @@ -62,7 +56,6 @@ LIBS = \ -lxmltok \ -ljsdom \ -ljsurl \ - -lraptorbase \ -lsecfree \ -l$(MOZ_LIB_JS_PREFIX)js \ $(JSJ_LIB) \ diff --git a/mozilla/xpfe/bootstrap/macbuild/apprunner.mcp b/mozilla/xpfe/bootstrap/macbuild/apprunner.mcp index 860d8f3326d..7259afb89e8 100644 Binary files a/mozilla/xpfe/bootstrap/macbuild/apprunner.mcp and b/mozilla/xpfe/bootstrap/macbuild/apprunner.mcp differ diff --git a/mozilla/xpfe/bootstrap/makefile.win b/mozilla/xpfe/bootstrap/makefile.win index 04c813854d4..1f851e5d29b 100644 --- a/mozilla/xpfe/bootstrap/makefile.win +++ b/mozilla/xpfe/bootstrap/makefile.win @@ -67,9 +67,8 @@ LCFLAGS = \ # These are the libraries we need to link with to create the exe LLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\raptorgfxwin.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\netlib.lib \ $(LIBNSPR) \ diff --git a/mozilla/xpfe/browser/src/makefile.win b/mozilla/xpfe/browser/src/makefile.win index 527752ae9a3..83e5921af80 100644 --- a/mozilla/xpfe/browser/src/makefile.win +++ b/mozilla/xpfe/browser/src/makefile.win @@ -51,8 +51,7 @@ LCFLAGS = \ # These are the libraries we need to link with to create the DLL LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\raptorgfxwin.lib \ $(DIST)\lib\plc3.lib \ $(DIST)\lib\netlib.lib \ diff --git a/mozilla/xpfe/components/find/macbuild/FindComponent.mcp b/mozilla/xpfe/components/find/macbuild/FindComponent.mcp index 116fe63157a..dc8d7645a5d 100644 Binary files a/mozilla/xpfe/components/find/macbuild/FindComponent.mcp and b/mozilla/xpfe/components/find/macbuild/FindComponent.mcp differ diff --git a/mozilla/xpfe/components/find/src/Makefile.in b/mozilla/xpfe/components/find/src/Makefile.in index b3e3e41c137..d41a7c4ea5e 100644 --- a/mozilla/xpfe/components/find/src/Makefile.in +++ b/mozilla/xpfe/components/find/src/Makefile.in @@ -36,7 +36,6 @@ EXTRA_DSO_LDOPTS = \ $(MKSHLIB_UNFORCE_ALL) \ -L$(DIST)/bin \ -L$(DIST)/lib \ - -lraptorbase \ -lxpcom \ -lreg \ -lnetlib \ diff --git a/mozilla/xpfe/components/find/src/makefile.win b/mozilla/xpfe/components/find/src/makefile.win index 4d38e9be74a..4552231c617 100644 --- a/mozilla/xpfe/components/find/src/makefile.win +++ b/mozilla/xpfe/components/find/src/makefile.win @@ -50,8 +50,7 @@ LINCS = \ LLIBS = \ $(LIBNSPR) \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\netlib.lib \ $(NULL) diff --git a/mozilla/xpfe/components/history/macbuild/history.mcp b/mozilla/xpfe/components/history/macbuild/history.mcp index 278a0f4ccd3..2f1941be07b 100644 Binary files a/mozilla/xpfe/components/history/macbuild/history.mcp and b/mozilla/xpfe/components/history/macbuild/history.mcp differ diff --git a/mozilla/xpfe/components/history/macbuild/historyIDL.mcp b/mozilla/xpfe/components/history/macbuild/historyIDL.mcp index ecd3ea3d502..f01630af42b 100644 Binary files a/mozilla/xpfe/components/history/macbuild/historyIDL.mcp and b/mozilla/xpfe/components/history/macbuild/historyIDL.mcp differ diff --git a/mozilla/xpfe/components/history/src/Makefile.in b/mozilla/xpfe/components/history/src/Makefile.in index 7196ba769c1..241e7f0ccde 100644 --- a/mozilla/xpfe/components/history/src/Makefile.in +++ b/mozilla/xpfe/components/history/src/Makefile.in @@ -36,9 +36,7 @@ EXTRA_DSO_LDOPTS = \ $(MKSHLIB_UNFORCE_ALL) \ -L$(DIST)/bin \ -L$(DIST)/lib \ - -lraptorbase \ -lxpcom \ - -lreg \ $(NSPR_LIBS) \ $(NULL) diff --git a/mozilla/xpfe/components/history/src/makefile.win b/mozilla/xpfe/components/history/src/makefile.win index ee4fbe02e55..23a7fbb6398 100644 --- a/mozilla/xpfe/components/history/src/makefile.win +++ b/mozilla/xpfe/components/history/src/makefile.win @@ -45,8 +45,7 @@ LCFLAGS = \ # These are the libraries we need to link with to create the DLL LLIBS= \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) \ $(NULL) diff --git a/mozilla/xpfe/components/sample/src/Makefile.in b/mozilla/xpfe/components/sample/src/Makefile.in index 740e1ed1aca..f0c3ee45a5b 100644 --- a/mozilla/xpfe/components/sample/src/Makefile.in +++ b/mozilla/xpfe/components/sample/src/Makefile.in @@ -35,7 +35,6 @@ EXTRA_DSO_LDOPTS = \ $(MKSHLIB_UNFORCE_ALL) \ -L$(DIST)/bin \ -L$(DIST)/lib \ - -lraptorbase \ -lxpcom \ -lreg \ -lnetlib \ diff --git a/mozilla/xpfe/components/sample/src/makefile.win b/mozilla/xpfe/components/sample/src/makefile.win index 4ff5e9db15d..4078d9f3677 100644 --- a/mozilla/xpfe/components/sample/src/makefile.win +++ b/mozilla/xpfe/components/sample/src/makefile.win @@ -46,8 +46,7 @@ LINCS = \ LLIBS = \ $(LIBNSPR) \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\netlib.lib \ $(NULL) diff --git a/mozilla/xpfe/components/ucth/src/Makefile.in b/mozilla/xpfe/components/ucth/src/Makefile.in index 73ebee38749..fd29790dcd7 100644 --- a/mozilla/xpfe/components/ucth/src/Makefile.in +++ b/mozilla/xpfe/components/ucth/src/Makefile.in @@ -35,7 +35,6 @@ EXTRA_DSO_LDOPTS = \ $(MKSHLIB_UNFORCE_ALL) \ -L$(DIST)/bin \ -L$(DIST)/lib \ - -lraptorbase \ -lxpcom \ -lreg \ -lnetlib \ diff --git a/mozilla/xpfe/components/ucth/src/makefile.win b/mozilla/xpfe/components/ucth/src/makefile.win index f55661c394c..c4504b35198 100644 --- a/mozilla/xpfe/components/ucth/src/makefile.win +++ b/mozilla/xpfe/components/ucth/src/makefile.win @@ -49,8 +49,7 @@ LINCS = \ LLIBS = \ $(LIBNSPR) \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\netlib.lib \ $(NULL) diff --git a/mozilla/xpfe/components/xfer/src/Makefile.in b/mozilla/xpfe/components/xfer/src/Makefile.in index bd4243bc159..4554dc2a1ba 100644 --- a/mozilla/xpfe/components/xfer/src/Makefile.in +++ b/mozilla/xpfe/components/xfer/src/Makefile.in @@ -36,7 +36,6 @@ EXTRA_DSO_LDOPTS = \ $(MKSHLIB_UNFORCE_ALL) \ -L$(DIST)/bin \ -L$(DIST)/lib \ - -lraptorbase \ -lxpcom \ -lreg \ -lnetlib \ diff --git a/mozilla/xpfe/components/xfer/src/makefile.win b/mozilla/xpfe/components/xfer/src/makefile.win index 7c0b8c9bfd7..7efc0924eaa 100644 --- a/mozilla/xpfe/components/xfer/src/makefile.win +++ b/mozilla/xpfe/components/xfer/src/makefile.win @@ -49,8 +49,7 @@ LINCS = \ LLIBS = \ $(LIBNSPR) \ - $(DIST)\lib\xpcom32.lib \ - $(DIST)\lib\raptorbase.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\netlib.lib \ $(NULL) diff --git a/mozilla/xpfe/main/makefile.win b/mozilla/xpfe/main/makefile.win index 8c4dca1837a..b53aa9c8c2b 100644 --- a/mozilla/xpfe/main/makefile.win +++ b/mozilla/xpfe/main/makefile.win @@ -43,7 +43,7 @@ LCFLAGS = \ $(NULL) LLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) \ $(NULL) diff --git a/mozilla/xpfe/tools/makefile.win b/mozilla/xpfe/tools/makefile.win index 5c0212c688c..9b23fd7df56 100644 --- a/mozilla/xpfe/tools/makefile.win +++ b/mozilla/xpfe/tools/makefile.win @@ -44,7 +44,7 @@ LCFLAGS = \ # These are the libraries we need to link with to create the exe LLIBS= \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) \ $(NULL) diff --git a/mozilla/xpinstall/macbuild/xpinstall.mcp b/mozilla/xpinstall/macbuild/xpinstall.mcp index 308a69ae86f..42a30e94280 100644 Binary files a/mozilla/xpinstall/macbuild/xpinstall.mcp and b/mozilla/xpinstall/macbuild/xpinstall.mcp differ diff --git a/mozilla/xpinstall/src/makefile.win b/mozilla/xpinstall/src/makefile.win index e4dffe1b94c..e7e7cdecc00 100644 --- a/mozilla/xpinstall/src/makefile.win +++ b/mozilla/xpinstall/src/makefile.win @@ -39,9 +39,6 @@ LCFLAGS = \ $(NULL) LINCS= \ - -I$(PUBLIC)\libxpt \ - -I$(PUBLIC)\xptinfo \ - -I$(PUBLIC)\xptcall \ -I$(PUBLIC)\xpinstall \ -I$(PUBLIC)\jar \ -I$(PUBLIC)\libreg \ @@ -60,12 +57,11 @@ LLIBS = \ $(DIST)\lib\jar50.lib \ $(DIST)\lib\libreg32.lib \ $(DIST)\lib\netlib.lib \ - $(DIST)\lib\xpcom32.lib \ + $(DIST)\lib\xpcom.lib \ $(DIST)\lib\xppref32.lib \ $(DIST)\lib\js3250.lib \ $(DIST)\lib\jsdombase_s.lib \ $(DIST)\lib\jsdomevents_s.lib \ - $(DIST)\lib\raptorbase.lib \ $(DIST)\lib\zlib.lib \ $(DIST)\lib\plc3.lib \ $(LIBNSPR) \ diff --git a/mozilla/xpinstall/src/nsSoftwareUpdateRun.cpp b/mozilla/xpinstall/src/nsSoftwareUpdateRun.cpp index 135b1f3ac69..81e7c433a3e 100644 --- a/mozilla/xpinstall/src/nsSoftwareUpdateRun.cpp +++ b/mozilla/xpinstall/src/nsSoftwareUpdateRun.cpp @@ -39,7 +39,7 @@ #include "nspr.h" #include "jsapi.h" -#include "nsIXPInstallProgressNotifier.h" +#include "nsIEventQueueService.h" static NS_DEFINE_IID(kISoftwareUpdateIID, NS_ISOFTWAREUPDATE_IID); @@ -359,4 +359,4 @@ extern "C" void RunInstallOnThread(void *data) bail: softwareUpdate->InstallJarCallBack(); -} \ No newline at end of file +}