diff --git a/mozilla/config/autoconf.mk.in b/mozilla/config/autoconf.mk.in index aff0eed3bd7..4fd01c05c71 100644 --- a/mozilla/config/autoconf.mk.in +++ b/mozilla/config/autoconf.mk.in @@ -191,6 +191,7 @@ MOZ_POST_PROGRAM_COMMAND = @MOZ_POST_PROGRAM_COMMAND@ MOZ_BUILD_ROOT = @MOZ_BUILD_ROOT@ MOZ_XUL = @MOZ_XUL@ +MOZ_RDF = @MOZ_RDF@ NECKO_PROTOCOLS = @NECKO_PROTOCOLS@ NECKO_DISK_CACHE = @NECKO_DISK_CACHE@ diff --git a/mozilla/configure.in b/mozilla/configure.in index 9903be613ad..3a25c3b5386 100644 --- a/mozilla/configure.in +++ b/mozilla/configure.in @@ -4040,6 +4040,7 @@ MOZ_PYTHON_LIBS= MOZ_PYTHON_PREFIX= MOZ_PYTHON_VER= MOZ_PYTHON_VER_DOTTED= +MOZ_RDF=1 MOZ_REFLOW_PERF= MOZ_SAFE_BROWSING= MOZ_SINGLE_PROFILE= @@ -4227,6 +4228,7 @@ minimal) MOZ_XPINSTALL= MOZ_XTF= MOZ_XUL= + MOZ_RDF= MOZ_XUL_APP=1 NECKO_DISK_CACHE= NECKO_PROTOCOLS_DEFAULT="about data http file res" @@ -7255,6 +7257,17 @@ if test "$MOZ_PROFILELOCKING"; then AC_DEFINE(MOZ_PROFILELOCKING) fi +dnl ======================================================== +dnl disable rdf services +dnl ======================================================== +MOZ_ARG_DISABLE_BOOL(rdf, +[ --disable-rdf Disable RDF], + MOZ_RDF= ) +if test "$MOZ_RDF"; then + AC_DEFINE(MOZ_RDF) +fi + +AC_SUBST(MOZ_RDF) dnl ======================================================== dnl necko configuration options diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp index a7cad7ddf58..7b02ed7d61e 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp @@ -154,8 +154,6 @@ const PRInt32 kBackward = 1; #define ID_NOT_IN_DOCUMENT ((nsIContent *)2) #define NAME_NOT_VALID ((nsBaseContentList*)1) -static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); - // Returns the name atom of aContent, if the content is a named item // and has a name atom. static nsIAtom* IsNamedItem(nsIContent* aContent); diff --git a/mozilla/content/html/document/src/nsHTMLDocument.h b/mozilla/content/html/document/src/nsHTMLDocument.h index 32cbda452ce..fe30da123c1 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.h +++ b/mozilla/content/html/document/src/nsHTMLDocument.h @@ -47,9 +47,7 @@ #include "nsIDOMHTMLCollection.h" #include "nsIScriptElement.h" #include "jsapi.h" -#include "rdf.h" -#include "nsRDFCID.h" -#include "nsIRDFService.h" + #include "pldhash.h" #include "nsIHttpChannel.h" #include "nsHTMLStyleSheet.h" diff --git a/mozilla/layout/build/nsContentDLF.cpp b/mozilla/layout/build/nsContentDLF.cpp index 694e65bd8a0..3186ca13d7b 100644 --- a/mozilla/layout/build/nsContentDLF.cpp +++ b/mozilla/layout/build/nsContentDLF.cpp @@ -57,9 +57,6 @@ #include "nsCRT.h" #include "nsIViewSourceChannel.h" -#include "nsRDFCID.h" -#include "nsIRDFResource.h" - #include "imgILoader.h" // plugins diff --git a/mozilla/toolkit/components/Makefile.in b/mozilla/toolkit/components/Makefile.in index 9b308514317..ffb81b03a80 100644 --- a/mozilla/toolkit/components/Makefile.in +++ b/mozilla/toolkit/components/Makefile.in @@ -108,8 +108,10 @@ DIRS += help endif ifdef MOZ_XPINSTALL +ifdef MOZ_RDF DIRS += downloads endif +endif endif # MOZ_SUITE ifdef MOZ_URL_CLASSIFIER diff --git a/mozilla/toolkit/components/build/Makefile.in b/mozilla/toolkit/components/build/Makefile.in index 9224375f58e..984dd2808bc 100644 --- a/mozilla/toolkit/components/build/Makefile.in +++ b/mozilla/toolkit/components/build/Makefile.in @@ -109,9 +109,11 @@ SHARED_LIBRARY_LIBS = \ ifndef MOZ_SUITE # XXX Suite isn't ready to build this just yet ifdef MOZ_XPINSTALL +ifdef MOZ_RDF SHARED_LIBRARY_LIBS += ../downloads/src/$(LIB_PREFIX)download_s.$(LIB_SUFFIX) endif endif +endif ifdef ALERTS_SERVICE SHARED_LIBRARY_LIBS += ../alerts/src/$(LIB_PREFIX)alerts_s.$(LIB_SUFFIX) diff --git a/mozilla/toolkit/components/build/nsToolkitCompsModule.cpp b/mozilla/toolkit/components/build/nsToolkitCompsModule.cpp index 219242a9f53..5dd4ce3a173 100644 --- a/mozilla/toolkit/components/build/nsToolkitCompsModule.cpp +++ b/mozilla/toolkit/components/build/nsToolkitCompsModule.cpp @@ -47,9 +47,11 @@ #ifndef MOZ_SUITE // XXX Suite isn't ready to include this just yet #ifdef MOZ_XPINSTALL +#ifdef MOZ_RDF #include "nsDownloadManager.h" #include "nsDownloadProxy.h" #endif +#endif #include "nsTypeAheadFind.h" #endif // MOZ_SUITE @@ -75,9 +77,11 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsAlertsService) #ifndef MOZ_SUITE // XXX Suite isn't ready to include this just yet #ifdef MOZ_XPINSTALL +#ifdef MOZ_RDF NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDownloadManager, Init) NS_GENERIC_FACTORY_CONSTRUCTOR(nsDownloadProxy) #endif +#endif NS_GENERIC_FACTORY_CONSTRUCTOR(nsTypeAheadFind) #endif // MOZ_SUITE @@ -114,6 +118,7 @@ static const nsModuleComponentInfo components[] = #ifndef MOZ_SUITE // XXX Suite isn't ready to include this just yet #ifdef MOZ_XPINSTALL +#ifdef MOZ_RDF { "Download Manager", NS_DOWNLOADMANAGER_CID, NS_DOWNLOADMANAGER_CONTRACTID, @@ -122,6 +127,7 @@ static const nsModuleComponentInfo components[] = NS_DOWNLOAD_CID, NS_TRANSFER_CONTRACTID, nsDownloadProxyConstructor }, +#endif #endif { "TypeAheadFind Component", NS_TYPEAHEADFIND_CID, diff --git a/mozilla/toolkit/library/Makefile.in b/mozilla/toolkit/library/Makefile.in index 7a7e3abaefc..7c951e69c92 100644 --- a/mozilla/toolkit/library/Makefile.in +++ b/mozilla/toolkit/library/Makefile.in @@ -42,7 +42,9 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk +ifdef MOZ_RDF include $(topsrcdir)/rdf/util/src/objs.mk +endif include $(topsrcdir)/intl/unicharutil/util/objs.mk MODULE = libxul @@ -111,28 +113,42 @@ include $(srcdir)/libxul-config.mk EXTRA_DEPS += \ $(srcdir)/libxul-config.mk \ $(srcdir)/libxul-rules.mk \ - $(topsrcdir)/rdf/util/src/objs.mk \ $(topsrcdir)/intl/unicharutil/util/objs.mk \ $(NULL) REQUIRES += \ - rdf \ - rdfutil \ uconv \ unicharutil \ $(NULL) CPPSRCS += \ - $(RDF_UTIL_SRC_LCPPSRCS) \ $(INTL_UNICHARUTIL_UTIL_LCPPSRCS) \ $(NULL) GARBAGE += \ - $(RDF_UTIL_SRC_LCPPSRCS) \ $(INTL_UNICHARUTIL_UTIL_LCPPSRCS) \ $(wildcard *.$(OBJ_SUFFIX)) \ dlldeps-javaxpcom.cpp \ $(NULL) + +ifdef MOZ_RDF +EXTRA_DEPS += \ + $(topsrcdir)/rdf/util/src/objs.mk \ + $(NULL) + +REQUIRES += \ + rdf \ + rdfutil \ + $(NULL) + +CPPSRCS += \ + $(RDF_UTIL_SRC_LCPPSRCS) \ + $(NULL) + +GARBAGE += \ + $(RDF_UTIL_SRC_LCPPSRCS) \ + $(NULL) +endif else ifdef NS_TRACE_MALLOC EXTRA_DSO_LIBS += tracemalloc diff --git a/mozilla/toolkit/library/libxul-config.mk b/mozilla/toolkit/library/libxul-config.mk index cd457f08a83..4d5c6e36203 100644 --- a/mozilla/toolkit/library/libxul-config.mk +++ b/mozilla/toolkit/library/libxul-config.mk @@ -97,7 +97,6 @@ COMPONENT_LIBS += \ jar$(VERSION_NUMBER) \ pref \ caps \ - rdf \ htmlpars \ imglib2 \ gklayout \ @@ -109,8 +108,6 @@ COMPONENT_LIBS += \ nsappshell \ txmgr \ chrome \ - windowds \ - intlapp \ commandlines \ toolkitcomps \ pipboot \ @@ -181,10 +178,20 @@ else DEFINES += -DMOZ_PLAINTEXT_EDITOR_ONLY endif +ifdef MOZ_RDF +COMPONENT_LIBS += \ + rdf \ + windowds \ + intlapp \ + $(NULL) +endif + ifeq (,$(filter beos os2 mac photon cocoa windows,$(MOZ_WIDGET_TOOLKIT))) +ifdef MOZ_RDF COMPONENT_LIBS += fileview DEFINES += -DMOZ_FILEVIEW endif +endif ifdef MOZ_PLACES STATIC_LIBS += morkreader_s diff --git a/mozilla/toolkit/library/nsStaticXULComponents.cpp b/mozilla/toolkit/library/nsStaticXULComponents.cpp index a04fd34cfa6..c2a72921750 100644 --- a/mozilla/toolkit/library/nsStaticXULComponents.cpp +++ b/mozilla/toolkit/library/nsStaticXULComponents.cpp @@ -149,6 +149,19 @@ #define XPRINT_MODULES #endif +#define XPINTL_MODULE MODULE(nsXPIntlModule) +#define WINDOWDS_MODULE MODULE(nsWindowDataSourceModule) + +#ifdef MOZ_RDF +#define RDF_MODULE MODULE(nsRDFModule) +#else +#undef XPINTL_MODULE +#undef WINDOWDS_MODULE +#define RDF_MODULE +#define WINDOWDS_MODULE +#define XPINTL_MODULE +#endif + #ifdef OJI #define OJI_MODULES MODULE(nsCJVMManagerModule) #else @@ -269,7 +282,9 @@ MODULE(nsJarModule) \ MODULE(nsPrefModule) \ MODULE(nsSecurityManagerModule) \ - MODULE(nsRDFModule) \ + RDF_MODULE \ + XPINTL_MODULE \ + WINDOWDS_MODULE \ MODULE(nsParserModule) \ POSTSCRIPT_MODULES \ GFX_MODULES \ @@ -291,8 +306,6 @@ COMPOSER_MODULE \ MODULE(nsChromeModule) \ APPLICATION_MODULES \ - MODULE(nsWindowDataSourceModule) \ - MODULE(nsXPIntlModule) \ MODULE(Apprunner) \ MODULE(CommandLineModule) \ FILEVIEW_MODULE \ diff --git a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp index 5a154bcd230..f42e5e21163 100644 --- a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -65,10 +65,12 @@ #include "nsAutoPtr.h" // used to manage our in memory data source of helper applications +#ifdef MOZ_RDF #include "nsRDFCID.h" #include "rdf.h" #include "nsIRDFService.h" #include "nsIRDFRemoteDataSource.h" +#endif //MOZ_RDF #include "nsHelperAppRDF.h" #include "nsIMIMEInfo.h" #include "nsDirectoryServiceDefs.h" @@ -132,7 +134,9 @@ static const char NEVER_ASK_PREF_BRANCH[] = "browser.helperApps.neverAsk."; static const char NEVER_ASK_FOR_SAVE_TO_DISK_PREF[] = "saveToDisk"; static const char NEVER_ASK_FOR_OPEN_FILE_PREF[] = "openFile"; +#ifdef MOZ_RDF static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); +#endif static NS_DEFINE_CID(kPluginManagerCID, NS_PLUGINMANAGER_CID); /** @@ -515,6 +519,7 @@ nsExternalHelperAppService::~nsExternalHelperAppService() nsresult nsExternalHelperAppService::InitDataSource() { +#ifdef MOZ_RDF nsresult rv = NS_OK; // don't re-initialize the data source if we've already done so... @@ -567,6 +572,9 @@ nsresult nsExternalHelperAppService::InitDataSource() mDataSourceInitialized = PR_TRUE; return rv; +#else + return NS_ERROR_NOT_AVAILABLE; +#endif } NS_IMETHODIMP nsExternalHelperAppService::DoContent(const nsACString& aMimeContentType, @@ -706,6 +714,7 @@ NS_IMETHODIMP nsExternalHelperAppService::ApplyDecodingForExtension(const nsACSt return NS_OK; } +#ifdef MOZ_RDF nsresult nsExternalHelperAppService::FillTopLevelProperties(nsIRDFResource * aContentTypeNodeResource, nsIRDFService * aRDFService, nsIMIMEInfo * aMIMEInfo) { @@ -854,9 +863,11 @@ nsresult nsExternalHelperAppService::FillContentHandlerProperties(const char * a return rv; } +#endif /* MOZ_RDF */ PRBool nsExternalHelperAppService::MIMETypeIsInDataSource(const char * aContentType) { +#ifdef MOZ_RDF nsresult rv = InitDataSource(); if (NS_FAILED(rv)) return PR_FALSE; @@ -888,11 +899,13 @@ PRBool nsExternalHelperAppService::MIMETypeIsInDataSource(const char * aContentT if (NS_SUCCEEDED(rv) && exists) return PR_TRUE; } +#endif return PR_FALSE; } nsresult nsExternalHelperAppService::GetMIMEInfoForMimeTypeFromDS(const nsACString& aContentType, nsIMIMEInfo * aMIMEInfo) { +#ifdef MOZ_RDF NS_ENSURE_ARG_POINTER(aMIMEInfo); nsresult rv = InitDataSource(); if (NS_FAILED(rv)) return rv; @@ -941,6 +954,9 @@ nsresult nsExternalHelperAppService::GetMIMEInfoForMimeTypeFromDS(const nsACStri } return rv; +#else + return NS_ERROR_NOT_AVAILABLE; +#endif /* MOZ_RDF */ } nsresult nsExternalHelperAppService::GetMIMEInfoForExtensionFromDS(const nsACString& aFileExtension, nsIMIMEInfo * aMIMEInfo) @@ -956,6 +972,7 @@ nsresult nsExternalHelperAppService::GetMIMEInfoForExtensionFromDS(const nsACStr PRBool nsExternalHelperAppService::GetTypeFromDS(const nsACString& aExtension, nsACString& aType) { +#ifdef MOZ_RDF nsresult rv = InitDataSource(); if (NS_FAILED(rv)) return PR_FALSE; @@ -989,6 +1006,7 @@ PRBool nsExternalHelperAppService::GetTypeFromDS(const nsACString& aExtension, return PR_TRUE; } } // if we have a node in the graph for this extension +#endif /* MOZ_RDF */ return PR_FALSE; } @@ -1314,11 +1332,13 @@ nsExternalHelperAppService::Observe(nsISupports *aSubject, const char *aTopic, c { if (!strcmp(aTopic, "profile-before-change")) { ExpungeTemporaryFiles(); +#ifdef MOZ_RDF nsCOMPtr flushableDataSource = do_QueryInterface(mOverRideDataSource); if (flushableDataSource) flushableDataSource->Flush(); mOverRideDataSource = nsnull; mDataSourceInitialized = PR_FALSE; +#endif } return NS_OK; } diff --git a/mozilla/uriloader/exthandler/nsExternalHelperAppService.h b/mozilla/uriloader/exthandler/nsExternalHelperAppService.h index 71d4a889944..7d5fe24972e 100644 --- a/mozilla/uriloader/exthandler/nsExternalHelperAppService.h +++ b/mozilla/uriloader/exthandler/nsExternalHelperAppService.h @@ -67,8 +67,10 @@ #include "nsIChannel.h" #include "nsITimer.h" +#ifdef MOZ_RDF #include "nsIRDFDataSource.h" #include "nsIRDFResource.h" +#endif #include "nsCOMPtr.h" #include "nsIObserver.h" #include "nsCOMArray.h" @@ -194,6 +196,7 @@ protected: * Pointer to the datasource that contains the user override information. * @see InitDataSource */ +#ifdef MOZ_RDF nsCOMPtr mOverRideDataSource; nsCOMPtr kNC_Description; @@ -205,6 +208,7 @@ protected: nsCOMPtr kNC_AlwaysAsk; nsCOMPtr kNC_HandleInternal; nsCOMPtr kNC_PrettyName; +#endif /** * Whether mOverRideDataSource is initialized @@ -216,6 +220,7 @@ protected: * object for a given content type inside that data source. * The content type of the MIME Info will not be changed. */ +#ifdef MOZ_RDF NS_HIDDEN_(nsresult) FillTopLevelProperties(nsIRDFResource * aContentTypeNodeResource, nsIRDFService * aRDFService, nsIMIMEInfo * aMIMEInfo); @@ -235,6 +240,7 @@ protected: NS_HIDDEN_(nsresult) FillLiteralValueFromTarget(nsIRDFResource * aSource, nsIRDFResource * aProperty, const PRUnichar ** aLiteralValue); +#endif /** * Searches the "extra" array of MIMEInfo objects for an object diff --git a/mozilla/xpfe/components/Makefile.in b/mozilla/xpfe/components/Makefile.in index eff8a5581cf..7eda9eeb1fe 100644 --- a/mozilla/xpfe/components/Makefile.in +++ b/mozilla/xpfe/components/Makefile.in @@ -66,9 +66,14 @@ endif DIRS = \ find \ + $(NULL) + +ifdef MOZ_RDF +DIRS += \ intl \ windowds \ $(NULL) +endif ifdef MOZ_HAVE_BROWSER DIRS += \ diff --git a/mozilla/xpfe/components/build/nsModule.cpp b/mozilla/xpfe/components/build/nsModule.cpp index 827f5f4261a..c6381b2f062 100644 --- a/mozilla/xpfe/components/build/nsModule.cpp +++ b/mozilla/xpfe/components/build/nsModule.cpp @@ -37,10 +37,13 @@ #include "nsIGenericFactory.h" #include "nsICategoryManager.h" -#include "rdf.h" +#include "nsNetUtil.h" #include "nsXPIDLString.h" #include "nsDirectoryViewer.h" +#ifdef MOZ_RDF +#include "rdf.h" #include "nsRDFCID.h" +#endif #ifdef MOZ_SUITE #include "nsRelatedLinksHandlerImpl.h" @@ -81,8 +84,10 @@ #define NS_GLOBALHISTORY_DATASOURCE_CONTRACTID \ "@mozilla.org/rdf/datasource;1?name=history" +#ifdef MOZ_RDF // Factory constructors NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHTTPIndex, Init) +#endif NS_GENERIC_FACTORY_CONSTRUCTOR(nsDirectoryViewerFactory) #if !defined(MOZ_MACBROWSER) @@ -156,10 +161,12 @@ static const nsModuleComponentInfo components[] = { { "Directory Viewer", NS_DIRECTORYVIEWERFACTORY_CID, "@mozilla.org/xpfe/http-index-format-factory-constructor", nsDirectoryViewerFactoryConstructor, RegisterProc, UnregisterProc }, +#ifdef MOZ_RDF { "Directory Viewer", NS_HTTPINDEX_SERVICE_CID, NS_HTTPINDEX_SERVICE_CONTRACTID, nsHTTPIndexConstructor }, { "Directory Viewer", NS_HTTPINDEX_SERVICE_CID, NS_HTTPINDEX_DATASOURCE_CONTRACTID, nsHTTPIndexConstructor }, +#endif #ifdef MOZ_SUITE { "Download Manager", NS_DOWNLOADMANAGER_CID, NS_DOWNLOADMANAGER_CONTRACTID, diff --git a/mozilla/xpfe/components/directory/nsDirectoryViewer.cpp b/mozilla/xpfe/components/directory/nsDirectoryViewer.cpp index a49fff4bad3..8ce1f7b1fe7 100644 --- a/mozilla/xpfe/components/directory/nsDirectoryViewer.cpp +++ b/mozilla/xpfe/components/directory/nsDirectoryViewer.cpp @@ -58,18 +58,20 @@ #include "nsCRT.h" #include "nsEscape.h" #include "nsIEnumerator.h" +#ifdef MOZ_RDF #include "nsIRDFService.h" +#include "nsRDFCID.h" +#include "rdf.h" +#endif #include "nsIScriptContext.h" #include "nsIScriptGlobalObject.h" #include "nsIServiceManager.h" #include "nsISupportsArray.h" #include "nsIXPConnect.h" #include "nsEnumeratorUtils.h" -#include "nsRDFCID.h" #include "nsString.h" #include "nsXPIDLString.h" #include "nsReadableUtils.h" -#include "rdf.h" #include "nsITextToSubURI.h" #include "nsIInterfaceRequestor.h" #include "nsIInterfaceRequestorUtils.h" @@ -98,7 +100,9 @@ static const int FORMAT_XUL = 3; // Common CIDs // +#ifdef MOZ_RDF static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); +#endif // Various protocols we have to special case static const char kFTPProtocol[] = "ftp://"; @@ -109,6 +113,7 @@ static const char kGopherProtocol[] = "gopher://"; // nsHTTPIndex // +#ifdef MOZ_RDF NS_IMPL_THREADSAFE_ISUPPORTS7(nsHTTPIndex, nsIHTTPIndex, nsIRDFDataSource, @@ -1337,6 +1342,7 @@ nsHTTPIndex::GetAllCmds(nsIRDFResource *aSource, nsISimpleEnumerator **_retval) return(rv); } +#endif /* MOZ_RDF */ //---------------------------------------------------------------------- @@ -1374,15 +1380,16 @@ nsDirectoryViewerFactory::CreateInstance(const char *aCommand, nsCOMPtr prefSrv = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv); if (NS_FAILED(rv)) return rv; - PRBool useXUL = PR_FALSE; + PRBool useXUL = PR_FALSE; + PRBool viewSource = (PL_strstr(aContentType,"view-source") != 0); + +#ifdef MOZ_RDF PRInt32 dirPref; rv = prefSrv->GetIntPref("network.dir.format", &dirPref); if (NS_SUCCEEDED(rv) && dirPref == FORMAT_XUL) { useXUL = PR_TRUE; } - PRBool viewSource = (PL_strstr(aContentType,"view-source") != 0); - if ((NS_FAILED(rv) || useXUL) && !viewSource) { // ... and setup the original channel's content type (void)aChannel->SetContentType(NS_LITERAL_CSTRING("application/vnd.mozilla.xul+xml")); @@ -1441,6 +1448,7 @@ nsDirectoryViewerFactory::CreateInstance(const char *aCommand, return NS_OK; } +#endif // setup the original channel's content type (void)aChannel->SetContentType(NS_LITERAL_CSTRING("text/html")); diff --git a/mozilla/xpfe/components/directory/nsDirectoryViewer.h b/mozilla/xpfe/components/directory/nsDirectoryViewer.h index dd0fc1d07d5..3e179bf0350 100644 --- a/mozilla/xpfe/components/directory/nsDirectoryViewer.h +++ b/mozilla/xpfe/components/directory/nsDirectoryViewer.h @@ -44,13 +44,15 @@ #include "nsIStreamListener.h" #include "nsIContentViewer.h" #include "nsIDocument.h" +#ifdef MOZ_RDF #include "nsIHTTPIndex.h" #include "nsIRDFService.h" #include "nsIRDFDataSource.h" +#include "nsIRDFLiteral.h" +#endif #include "nsIDocumentLoaderFactory.h" #include "nsITimer.h" #include "nsISupportsArray.h" -#include "nsIRDFLiteral.h" #include "nsXPIDLString.h" #include "nsIDirIndexListener.h" #include "nsIFTPChannel.h" @@ -66,7 +68,7 @@ public: NS_DECL_NSIDOCUMENTLOADERFACTORY }; - +#ifdef MOZ_RDF class nsHTTPIndex : public nsIHTTPIndex, public nsIRDFDataSource, public nsIStreamListener, @@ -76,8 +78,8 @@ class nsHTTPIndex : public nsIHTTPIndex, { private: - // note: these are NOT statics due to the native of nsHTTPIndex - // where it may or may not be treated as a singleton + // note: these are NOT statics due to the native of nsHTTPIndex + // where it may or may not be treated as a singleton nsCOMPtr kNC_Child; nsCOMPtr kNC_Comment; @@ -92,31 +94,31 @@ private: nsCOMPtr kTrueLiteral; nsCOMPtr kFalseLiteral; - nsCOMPtr mDirRDF; + nsCOMPtr mDirRDF; protected: - // We grab a reference to the content viewer container (which - // indirectly owns us) so that we can insert ourselves as a global - // in the script context _after_ the XUL doc has been embedded into - // content viewer. We'll know that this has happened once we receive - // an OnStartRequest() notification + // We grab a reference to the content viewer container (which + // indirectly owns us) so that we can insert ourselves as a global + // in the script context _after_ the XUL doc has been embedded into + // content viewer. We'll know that this has happened once we receive + // an OnStartRequest() notification - nsCOMPtr mInner; - nsCOMPtr mConnectionList; - nsCOMPtr mNodeList; - nsCOMPtr mTimer; + nsCOMPtr mInner; + nsCOMPtr mConnectionList; + nsCOMPtr mNodeList; + nsCOMPtr mTimer; nsCOMPtr mParser; - nsCString mBaseURL; - nsCString mEncoding; + nsCString mBaseURL; + nsCString mEncoding; PRBool mBindToGlobalObject; nsIInterfaceRequestor* mRequestor; // WEAK nsCOMPtr mDirectory; nsHTTPIndex(nsIInterfaceRequestor* aRequestor); - nsresult CommonInit(void); - nsresult Init(nsIURI* aBaseURL); + nsresult CommonInit(void); + nsresult Init(nsIURI* aBaseURL); void GetDestination(nsIRDFResource* r, nsXPIDLCString& dest); - PRBool isWellknownContainerURI(nsIRDFResource *r); + PRBool isWellknownContainerURI(nsIRDFResource *r); nsresult AddElement(nsIRDFResource *parent, nsIRDFResource *prop, nsIRDFNode *child); @@ -124,17 +126,17 @@ protected: public: nsHTTPIndex(); - virtual ~nsHTTPIndex(); - nsresult Init(void); + virtual ~nsHTTPIndex(); + nsresult Init(void); - static nsresult Create(nsIURI* aBaseURI, nsIInterfaceRequestor* aContainer, - nsIHTTPIndex** aResult); + static nsresult Create(nsIURI* aBaseURI, nsIInterfaceRequestor* aContainer, + nsIHTTPIndex** aResult); - // nsIHTTPIndex interface - NS_DECL_NSIHTTPINDEX + // nsIHTTPIndex interface + NS_DECL_NSIHTTPINDEX - // NSIRDFDataSource interface - NS_DECL_NSIRDFDATASOURCE + // NSIRDFDataSource interface + NS_DECL_NSIRDFDATASOURCE NS_DECL_NSIREQUESTOBSERVER NS_DECL_NSISTREAMLISTENER @@ -143,9 +145,10 @@ public: NS_DECL_NSIINTERFACEREQUESTOR NS_DECL_NSIFTPEVENTSINK - // nsISupports interface - NS_DECL_ISUPPORTS + // nsISupports interface + NS_DECL_ISUPPORTS }; +#endif // {82776710-5690-11d3-BE36-00104BDE6048} #define NS_DIRECTORYVIEWERFACTORY_CID \