mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 02:31:59 +00:00
46775. consolodating xpfe components into a root module to reduce system overhead bloat. built on win, linux, mac. precheckin tests on windows. general testing on mac and linux.
This commit is contained in:
parent
b0a08db1fe
commit
c41fae5a69
@ -26,7 +26,7 @@ VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = public bookmarks directory filepicker find history search sidebar related regviewer ucth xfer prefwindow shistory remote timebomb console autocomplete urlbarhistory
|
||||
DIRS = public bookmarks directory filepicker find history search sidebar related regviewer ucth xfer prefwindow shistory remote timebomb console autocomplete urlbarhistory build
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -26,20 +26,13 @@ VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = autocomplete
|
||||
LIBRARY_NAME = autocomplete
|
||||
IS_COMPONENT = 1
|
||||
SHORT_LIBNAME = autocomp
|
||||
MODULE=appcomps
|
||||
LIBRARY_NAME = autocomplete_s
|
||||
|
||||
CPPSRCS = nsAutoComplete.cpp
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
-L$(DIST)/bin \
|
||||
-L$(DIST)/lib \
|
||||
$(XPCOM_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(NULL)
|
||||
override NO_SHARED_LIB=1
|
||||
override NO_STATIC_LIB=
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -29,36 +29,12 @@
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH = ..\..\..\..
|
||||
include <$(DEPTH)/config/config.mak>
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any Public Make Variables here: (ie. PDFFILE, MAPFILE, ...)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
DLLNAME = autocomp
|
||||
DLL1NAME = autocomp
|
||||
PDBFILE = $(DLLNAME).pdb
|
||||
MAPFILE = $(DLLNAME).map
|
||||
DLL =.\$(OBJDIR)\$(DLLNAME).dll
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
MODULE=appcomps
|
||||
LIBRARY_NAME=autocomplete_s
|
||||
LCFLAGS = -DWIN32_LEAN_AND_MEAN
|
||||
|
||||
LINCS = \
|
||||
-I$(PUBLIC)/xpcom \
|
||||
# -I$(PUBLIC)/txtsvc \
|
||||
# -I$(PUBLIC)/xpfe/components \
|
||||
# -I$(PUBLIC)/raptor \
|
||||
# -I$(PUBLIC)/rdf \
|
||||
# -I$(PUBLIC)/dom \
|
||||
$(NULL)
|
||||
|
||||
LLIBS = \
|
||||
$(LIBNSPR) \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
# $(DIST)\lib\js3250.lib \
|
||||
!ifndef NECKO
|
||||
# $(DIST)\lib\netlib.lib \
|
||||
!endif
|
||||
$(NULL)
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
@ -70,14 +46,6 @@ OBJS = \
|
||||
.\$(OBJDIR)\nsAutoComplete.obj \
|
||||
$(NULL)
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any Public Targets here (ie. PROGRAM, LIBRARY, DLL, ...)
|
||||
#// (these must be defined before the common makefiles are included)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
LIBRARY=.\$(OBJDIR)\$(LIBNAME).lib
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Include the common makefile rules
|
||||
@ -85,8 +53,8 @@ LIBRARY=.\$(OBJDIR)\$(LIBNAME).lib
|
||||
#//------------------------------------------------------------------------
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin\components
|
||||
install:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\bin\components\$(DLLNAME).dll
|
||||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
||||
|
@ -24,45 +24,8 @@
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "prtypes.h"
|
||||
#include "nsIModule.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
|
||||
#include "nsAutoComplete.h"
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAutoCompleteItem)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAutoCompleteResults)
|
||||
|
||||
|
||||
static nsModuleComponentInfo components[] =
|
||||
{
|
||||
{ "AutoComplete Search Results", NS_AUTOCOMPLETERESULTS_CID, NS_AUTOCOMPLETERESULTS_PROGID,
|
||||
nsAutoCompleteResultsConstructor,
|
||||
nsnull,
|
||||
nsnull,
|
||||
},
|
||||
{ "AutoComplete Search Item", NS_AUTOCOMPLETEITEM_CID, NS_AUTOCOMPLETEITEM_PROGID,
|
||||
nsAutoCompleteItemConstructor,
|
||||
nsnull,
|
||||
nsnull,
|
||||
}
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Implement the NSGetModule() exported function for your module
|
||||
// and the entire implementation of the module object.
|
||||
//
|
||||
// NOTE: If you want to use the module shutdown to release any
|
||||
// module specific resources, use the macro
|
||||
// NS_IMPL_NSGETMODULE_WITH_DTOR() instead of the vanilla
|
||||
// NS_IMPL_NSGETMODULE()
|
||||
//
|
||||
|
||||
// e.g. xpconnect uses this to release some singletons;
|
||||
// xdr search on ..._WITH_DTOR
|
||||
|
||||
NS_IMPL_NSGETMODULE("nsAutoCompleteModule", components)
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* nsAutoCompleteItem
|
||||
******************************************************************************/
|
||||
|
@ -26,18 +26,15 @@ VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = bookmarks
|
||||
LIBRARY_NAME = bookmarks
|
||||
SHORT_LIBNAME = bookmark
|
||||
IS_COMPONENT = 1
|
||||
MODULE = appcomps
|
||||
LIBRARY_NAME = bookmarks_s
|
||||
|
||||
CPPSRCS = nsBookmarksService.cpp
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
-L$(DIST)/bin \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(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=
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -20,35 +20,24 @@
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=..\..\..\..
|
||||
MODULE=bookmarks
|
||||
|
||||
CPPSRCS= \
|
||||
nsBookmarksService.obj \
|
||||
$(NULL)
|
||||
MODULE=appcomps
|
||||
|
||||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\nsBookmarksService.obj \
|
||||
$(NULL)
|
||||
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
DLLNAME = bookmark
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
LIBRARY_NAME=bookmarks_s
|
||||
|
||||
LCFLAGS = \
|
||||
$(LCFLAGS) \
|
||||
$(DEFINES) \
|
||||
$(NULL)
|
||||
|
||||
# These are the libraries we need to link with to create the DLL
|
||||
LLIBS= \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(LIBNSPR) \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(DIST)\lib\js3250.lib \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) $(DLL) $(DIST)\bin\components
|
||||
install:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
||||
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include "nsFileStream.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsIProfile.h"
|
||||
#include "nsIRDFContainer.h"
|
||||
#include "nsIRDFContainerUtils.h"
|
||||
@ -61,7 +60,6 @@
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
|
||||
#include "nsISound.h"
|
||||
//#include "nsICommonDialogs.h"
|
||||
#include "nsINetSupportDialogService.h"
|
||||
#include "nsIPrompt.h"
|
||||
#include "nsAppShellCIDs.h"
|
||||
@ -91,6 +89,48 @@
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIXULWindow.h"
|
||||
|
||||
nsIRDFResource *kNC_IEFavoritesRoot;
|
||||
nsIRDFResource *kNC_Bookmark;
|
||||
nsIRDFResource *kNC_BookmarkSeparator;
|
||||
nsIRDFResource *kNC_BookmarkAddDate;
|
||||
nsIRDFResource *kNC_BookmarksRoot;
|
||||
nsIRDFResource *kNC_Description;
|
||||
nsIRDFResource *kNC_Folder;
|
||||
nsIRDFResource *kNC_FolderType;
|
||||
nsIRDFResource *kNC_IEFavorite;
|
||||
nsIRDFResource *kNC_IEFavoriteFolder;
|
||||
nsIRDFResource *kNC_Name;
|
||||
nsIRDFResource *kNC_NewBookmarkFolder;
|
||||
nsIRDFResource *kNC_NewSearchFolder;
|
||||
nsIRDFResource *kNC_PersonalToolbarFolder;
|
||||
nsIRDFResource *kNC_ShortcutURL;
|
||||
nsIRDFResource *kNC_URL;
|
||||
nsIRDFResource *kRDF_type;
|
||||
nsIRDFResource *kRDF_nextVal;
|
||||
nsIRDFResource *kWEB_LastModifiedDate;
|
||||
nsIRDFResource *kWEB_LastVisitDate;
|
||||
nsIRDFResource *kWEB_Schedule;
|
||||
nsIRDFResource *kWEB_Status;
|
||||
nsIRDFResource *kWEB_LastPingDate;
|
||||
nsIRDFResource *kWEB_LastPingETag;
|
||||
nsIRDFResource *kWEB_LastPingModDate;
|
||||
nsIRDFResource *kWEB_LastCharset;
|
||||
nsIRDFResource *kWEB_LastPingContentLen;
|
||||
|
||||
nsIRDFResource *kNC_Parent;
|
||||
|
||||
nsIRDFResource *kNC_BookmarkCommand_NewBookmark;
|
||||
nsIRDFResource *kNC_BookmarkCommand_NewFolder;
|
||||
nsIRDFResource *kNC_BookmarkCommand_NewSeparator;
|
||||
nsIRDFResource *kNC_BookmarkCommand_DeleteBookmark;
|
||||
nsIRDFResource *kNC_BookmarkCommand_DeleteBookmarkFolder;
|
||||
nsIRDFResource *kNC_BookmarkCommand_DeleteBookmarkSeparator;
|
||||
nsIRDFResource *kNC_BookmarkCommand_SetNewBookmarkFolder = nsnull;
|
||||
nsIRDFResource *kNC_BookmarkCommand_SetPersonalToolbarFolder;
|
||||
nsIRDFResource *kNC_BookmarkCommand_SetNewSearchFolder;
|
||||
nsIRDFResource *kNC_BookmarkCommand_Import;
|
||||
nsIRDFResource *kNC_BookmarkCommand_Export;
|
||||
|
||||
#define BOOKMARK_TIMEOUT 15000 // fire every 15 seconds
|
||||
// #define DEBUG_BOOKMARK_PING_OUTPUT 1
|
||||
|
||||
@ -3174,6 +3214,25 @@ nsBookmarksService::Move(nsIRDFResource* aOldSource,
|
||||
return(rv);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBookmarksService::HasAssertion(nsIRDFResource* source,
|
||||
nsIRDFResource* property,
|
||||
nsIRDFNode* target,
|
||||
PRBool tv,
|
||||
PRBool* hasAssertion)
|
||||
{
|
||||
#ifdef XP_MAC
|
||||
// on the Mac, IE favorites are stored in an HTML file.
|
||||
// Defer importing this files contents until necessary.
|
||||
|
||||
if ((source == kNC_IEFavoritesRoot) && (mIEFavoritesAvailable == PR_FALSE))
|
||||
{
|
||||
ReadFavorites();
|
||||
}
|
||||
#endif
|
||||
return mInner->HasAssertion(source, property, target, tv, hasAssertion);
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBookmarksService::AddObserver(nsIRDFObserver* aObserver)
|
||||
@ -3205,7 +3264,65 @@ nsBookmarksService::RemoveObserver(nsIRDFObserver* aObserver)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBookmarksService::HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, PRBool *_retval)
|
||||
{
|
||||
#ifdef XP_MAC
|
||||
// on the Mac, IE favorites are stored in an HTML file.
|
||||
// Defer importing this files contents until necessary.
|
||||
|
||||
if ((aNode == kNC_IEFavoritesRoot) && (mIEFavoritesAvailable == PR_FALSE))
|
||||
{
|
||||
ReadFavorites();
|
||||
}
|
||||
#endif
|
||||
return mInner->HasArcIn(aNode, aArc, _retval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBookmarksService::HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc, PRBool *_retval)
|
||||
{
|
||||
#ifdef XP_MAC
|
||||
// on the Mac, IE favorites are stored in an HTML file.
|
||||
// Defer importing this files contents until necessary.
|
||||
|
||||
if ((aSource == kNC_IEFavoritesRoot) && (mIEFavoritesAvailable == PR_FALSE))
|
||||
{
|
||||
ReadFavorites();
|
||||
}
|
||||
#endif
|
||||
return mInner->HasArcOut(aSource, aArc, _retval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBookmarksService::ArcLabelsOut(nsIRDFResource* source,
|
||||
nsISimpleEnumerator** labels)
|
||||
{
|
||||
#ifdef XP_MAC
|
||||
|
||||
// on the Mac, IE favorites are stored in an HTML file.
|
||||
// Defer importing this files contents until necessary.
|
||||
|
||||
if ((source == kNC_IEFavoritesRoot) && (mIEFavoritesAvailable == PR_FALSE))
|
||||
{
|
||||
ReadFavorites();
|
||||
}
|
||||
#endif
|
||||
|
||||
return mInner->ArcLabelsOut(source, labels);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBookmarksService::GetAllResources(nsISimpleEnumerator** aResult)
|
||||
{
|
||||
#ifdef XP_MAC
|
||||
if (mIEFavoritesAvailable == PR_FALSE)
|
||||
{
|
||||
ReadFavorites();
|
||||
}
|
||||
#endif
|
||||
return mInner->GetAllResources(aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBookmarksService::GetAllCommands(nsIRDFResource* source,
|
||||
@ -4717,18 +4834,3 @@ nsBookmarksService::EndUpdateBatch(nsIRDFDataSource* aDataSource)
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Module implementation and export
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsBookmarksService, Init)
|
||||
|
||||
// The list of components we register
|
||||
static nsModuleComponentInfo components[] = {
|
||||
{ "Bookmarks", NS_BOOKMARKS_SERVICE_CID, NS_BOOKMARKS_SERVICE_PROGID,
|
||||
nsBookmarksServiceConstructor },
|
||||
{ "Bookmarks", NS_BOOKMARKS_SERVICE_CID, NS_BOOKMARKS_DATASOURCE_PROGID,
|
||||
nsBookmarksServiceConstructor },
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE("nsBookmarkModule", components)
|
||||
|
@ -41,48 +41,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
nsIRDFResource *kNC_Bookmark;
|
||||
nsIRDFResource *kNC_BookmarkSeparator;
|
||||
nsIRDFResource *kNC_BookmarkAddDate;
|
||||
nsIRDFResource *kNC_BookmarksRoot;
|
||||
nsIRDFResource *kNC_Description;
|
||||
nsIRDFResource *kNC_Folder;
|
||||
nsIRDFResource *kNC_FolderType;
|
||||
nsIRDFResource *kNC_IEFavorite;
|
||||
nsIRDFResource *kNC_IEFavoriteFolder;
|
||||
nsIRDFResource *kNC_IEFavoritesRoot;
|
||||
nsIRDFResource *kNC_Name;
|
||||
nsIRDFResource *kNC_NewBookmarkFolder;
|
||||
nsIRDFResource *kNC_NewSearchFolder;
|
||||
nsIRDFResource *kNC_PersonalToolbarFolder;
|
||||
nsIRDFResource *kNC_ShortcutURL;
|
||||
nsIRDFResource *kNC_URL;
|
||||
nsIRDFResource *kRDF_type;
|
||||
nsIRDFResource *kRDF_nextVal;
|
||||
nsIRDFResource *kWEB_LastModifiedDate;
|
||||
nsIRDFResource *kWEB_LastVisitDate;
|
||||
nsIRDFResource *kWEB_Schedule;
|
||||
nsIRDFResource *kWEB_Status;
|
||||
nsIRDFResource *kWEB_LastPingDate;
|
||||
nsIRDFResource *kWEB_LastPingETag;
|
||||
nsIRDFResource *kWEB_LastPingModDate;
|
||||
nsIRDFResource *kWEB_LastCharset;
|
||||
nsIRDFResource *kWEB_LastPingContentLen;
|
||||
|
||||
nsIRDFResource *kNC_Parent;
|
||||
|
||||
nsIRDFResource *kNC_BookmarkCommand_NewBookmark;
|
||||
nsIRDFResource *kNC_BookmarkCommand_NewFolder;
|
||||
nsIRDFResource *kNC_BookmarkCommand_NewSeparator;
|
||||
nsIRDFResource *kNC_BookmarkCommand_DeleteBookmark;
|
||||
nsIRDFResource *kNC_BookmarkCommand_DeleteBookmarkFolder;
|
||||
nsIRDFResource *kNC_BookmarkCommand_DeleteBookmarkSeparator;
|
||||
nsIRDFResource *kNC_BookmarkCommand_SetNewBookmarkFolder;
|
||||
nsIRDFResource *kNC_BookmarkCommand_SetPersonalToolbarFolder;
|
||||
nsIRDFResource *kNC_BookmarkCommand_SetNewSearchFolder;
|
||||
nsIRDFResource *kNC_BookmarkCommand_Import;
|
||||
nsIRDFResource *kNC_BookmarkCommand_Export;
|
||||
|
||||
class nsBookmarksService : public nsIBookmarksService,
|
||||
public nsIRDFDataSource,
|
||||
public nsIRDFRemoteDataSource,
|
||||
@ -200,87 +158,28 @@ public:
|
||||
nsIRDFResource* aNewSource,
|
||||
nsIRDFResource* aProperty,
|
||||
nsIRDFNode* aTarget);
|
||||
|
||||
|
||||
NS_IMETHOD HasAssertion(nsIRDFResource* source,
|
||||
nsIRDFResource* property,
|
||||
nsIRDFNode* target,
|
||||
PRBool tv,
|
||||
PRBool* hasAssertion)
|
||||
{
|
||||
#ifdef XP_MAC
|
||||
// on the Mac, IE favorites are stored in an HTML file.
|
||||
// Defer importing this files contents until necessary.
|
||||
|
||||
if ((source == kNC_IEFavoritesRoot) && (mIEFavoritesAvailable == PR_FALSE))
|
||||
{
|
||||
ReadFavorites();
|
||||
}
|
||||
#endif
|
||||
return mInner->HasAssertion(source, property, target, tv, hasAssertion);
|
||||
}
|
||||
PRBool* hasAssertion);
|
||||
|
||||
NS_IMETHOD AddObserver(nsIRDFObserver* aObserver);
|
||||
NS_IMETHOD RemoveObserver(nsIRDFObserver* aObserver);
|
||||
|
||||
NS_IMETHOD HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, PRBool *_retval)
|
||||
{
|
||||
#ifdef XP_MAC
|
||||
// on the Mac, IE favorites are stored in an HTML file.
|
||||
// Defer importing this files contents until necessary.
|
||||
|
||||
if ((aNode == kNC_IEFavoritesRoot) && (mIEFavoritesAvailable == PR_FALSE))
|
||||
{
|
||||
ReadFavorites();
|
||||
}
|
||||
#endif
|
||||
return mInner->HasArcIn(aNode, aArc, _retval);
|
||||
}
|
||||
|
||||
NS_IMETHOD HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc, PRBool *_retval) {
|
||||
#ifdef XP_MAC
|
||||
// on the Mac, IE favorites are stored in an HTML file.
|
||||
// Defer importing this files contents until necessary.
|
||||
|
||||
if ((aSource == kNC_IEFavoritesRoot) && (mIEFavoritesAvailable == PR_FALSE))
|
||||
{
|
||||
ReadFavorites();
|
||||
}
|
||||
#endif
|
||||
return mInner->HasArcOut(aSource, aArc, _retval);
|
||||
}
|
||||
NS_IMETHOD HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, PRBool *_retval);
|
||||
NS_IMETHOD HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc, PRBool *_retval);
|
||||
|
||||
NS_IMETHOD ArcLabelsIn(nsIRDFNode* node,
|
||||
nsISimpleEnumerator** labels) {
|
||||
return mInner->ArcLabelsIn(node, labels);
|
||||
}
|
||||
|
||||
NS_IMETHOD ArcLabelsOut(nsIRDFResource* source,
|
||||
nsISimpleEnumerator** labels)
|
||||
{
|
||||
#ifdef XP_MAC
|
||||
NS_IMETHOD ArcLabelsOut(nsIRDFResource* source,
|
||||
nsISimpleEnumerator** labels);
|
||||
|
||||
// on the Mac, IE favorites are stored in an HTML file.
|
||||
// Defer importing this files contents until necessary.
|
||||
|
||||
if ((source == kNC_IEFavoritesRoot) && (mIEFavoritesAvailable == PR_FALSE))
|
||||
{
|
||||
ReadFavorites();
|
||||
}
|
||||
#endif
|
||||
|
||||
return mInner->ArcLabelsOut(source, labels);
|
||||
}
|
||||
|
||||
NS_IMETHOD GetAllResources(nsISimpleEnumerator** aResult)
|
||||
{
|
||||
#ifdef XP_MAC
|
||||
if (mIEFavoritesAvailable == PR_FALSE)
|
||||
{
|
||||
ReadFavorites();
|
||||
}
|
||||
#endif
|
||||
return mInner->GetAllResources(aResult);
|
||||
}
|
||||
NS_IMETHOD GetAllResources(nsISimpleEnumerator** aResult);
|
||||
|
||||
NS_IMETHOD GetAllCommands(nsIRDFResource* source,
|
||||
nsIEnumerator/*<nsIRDFResource>*/** commands);
|
||||
|
@ -33,41 +33,35 @@ IS_COMPONENT = 1
|
||||
CPPSRCS = nsModule.cpp
|
||||
|
||||
SHARED_LIBRARY_LIBS = \
|
||||
$(DIST)/lib/libautocomplete_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libbookmarks_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libdirectory_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libhistory_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/librelated_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libsearch_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libtimebomb_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/liburlbarhistory_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/lib.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/lib.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/lib.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/lib.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/lib.$(LIB_SUFFIX) \
|
||||
|
||||
$(NULL)
|
||||
$(DIST)/lib/libautocomplete_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libbookmarks_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libdirectory_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libhistory_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/librelated_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libsearch_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libtimebomb_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/liburlbarhistory_s.$(LIB_SUFFIX) \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_PERF_METRICS
|
||||
SHARED_LIBRARY_LIBS += $(DIST)/lib/libmozutil_s.$(LIB_SUFFIX)
|
||||
endif
|
||||
|
||||
LOCAL_INCLUDES = \
|
||||
-I$(srcdir)/../autocomplete/src \
|
||||
-I$(srcdir)/../bookmarks/src \
|
||||
-I$(srcdir)/../directory \
|
||||
-I$(srcdir)/../history/src \
|
||||
-I$(srcdir)/../related/src \
|
||||
-I$(srcdir)/../search/src \
|
||||
-I$(srcdir)/../timebomb \
|
||||
-I$(srcdir)/../urlbarhistory/src \
|
||||
$(NULL)
|
||||
-I$(srcdir)/../autocomplete/src \
|
||||
-I$(srcdir)/../bookmarks/src \
|
||||
-I$(srcdir)/../directory \
|
||||
-I$(srcdir)/../history/src \
|
||||
-I$(srcdir)/../related/src \
|
||||
-I$(srcdir)/../search/src \
|
||||
-I$(srcdir)/../timebomb \
|
||||
-I$(srcdir)/../urlbarhistory/src \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(NULL)
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -26,11 +26,10 @@ VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = directory
|
||||
LIBRARY_NAME = directory
|
||||
MODULE = appcomps
|
||||
LIBRARY_NAME = directory_s
|
||||
SHORT_LIBNAME = directry
|
||||
IS_COMPONENT = 1
|
||||
|
||||
XPIDL_MODULE=directory
|
||||
XPIDLSRCS = nsIHTTPIndex.idl
|
||||
|
||||
CPPSRCS = nsDirectoryViewer.cpp
|
||||
@ -48,12 +47,10 @@ CHROME_L10N = \
|
||||
locale/en-US/directory.dtd \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
-L$(DIST)/bin \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(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=
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -36,38 +36,27 @@ CHROME_L10N = \
|
||||
.\locale\en-US\directory.dtd \
|
||||
$(NULL)
|
||||
|
||||
MODULE=directory
|
||||
|
||||
MODULE=appcomps
|
||||
XPIDL_MODULE=directory
|
||||
XPIDLSRCS = \
|
||||
.\nsIHTTPIndex.idl \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS= \
|
||||
nsDirectoryViewer.cpp \
|
||||
$(NULL)
|
||||
|
||||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\nsDirectoryViewer.obj \
|
||||
$(NULL)
|
||||
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
DLLNAME = directry
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
LIBRARY_NAME = directory_s
|
||||
|
||||
LCFLAGS = \
|
||||
$(LCFLAGS) \
|
||||
$(DEFINES) \
|
||||
$(NULL)
|
||||
|
||||
# These are the libraries we need to link with to create the DLL
|
||||
LLIBS= \
|
||||
$(DIST)\lib\js3250.lib \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(LIBNSPR) \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) $(DLL) $(DIST)\bin\components
|
||||
install:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
@ -42,7 +42,6 @@
|
||||
#include "nsIDocumentLoader.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIEnumerator.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsIRDFService.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
@ -66,7 +65,6 @@
|
||||
|
||||
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
static NS_DEFINE_CID(kRDFInMemoryDataSourceCID, NS_RDFINMEMORYDATASOURCE_CID);
|
||||
static NS_DEFINE_CID(kTextToSubURICID, NS_TEXTTOSUBURI_CID);
|
||||
|
||||
// Note: due to aggregation, the HTTPINDEX namespace should match
|
||||
// what's used in the rest of the application
|
||||
@ -149,7 +147,7 @@ public:
|
||||
|
||||
|
||||
|
||||
nsIRDFService *gRDF = nsnull;
|
||||
nsIRDFService *gDirRDF = nsnull;
|
||||
|
||||
nsrefcnt nsHTTPIndexParser::gRefCntParser = 0;
|
||||
nsIRDFService* nsHTTPIndexParser::gRDF;
|
||||
@ -205,7 +203,7 @@ nsHTTPIndexParser::Init()
|
||||
if (gRefCntParser++ == 0) {
|
||||
rv = nsServiceManager::GetService("component://netscape/rdf/rdf-service",
|
||||
NS_GET_IID(nsIRDFService),
|
||||
NS_REINTERPRET_CAST(nsISupports**, &gRDF));
|
||||
NS_REINTERPRET_CAST(nsISupports**, &gDirRDF));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = nsServiceManager::GetService(NS_ITEXTTOSUBURI_PROGID,
|
||||
@ -213,30 +211,30 @@ nsHTTPIndexParser::Init()
|
||||
NS_REINTERPRET_CAST(nsISupports**, &gTextToSubURI));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = gRDF->GetResource(HTTPINDEX_NAMESPACE_URI "Comment", &kHTTPIndex_Comment);
|
||||
rv = gDirRDF->GetResource(HTTPINDEX_NAMESPACE_URI "Comment", &kHTTPIndex_Comment);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = gRDF->GetResource(HTTPINDEX_NAMESPACE_URI "Name", &kHTTPIndex_Filename);
|
||||
rv = gDirRDF->GetResource(HTTPINDEX_NAMESPACE_URI "Name", &kHTTPIndex_Filename);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = gRDF->GetResource(HTTPINDEX_NAMESPACE_URI "File-Type", &kHTTPIndex_Filetype);
|
||||
rv = gDirRDF->GetResource(HTTPINDEX_NAMESPACE_URI "File-Type", &kHTTPIndex_Filetype);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = gRDF->GetResource(HTTPINDEX_NAMESPACE_URI "loading", &kHTTPIndex_Loading);
|
||||
rv = gDirRDF->GetResource(HTTPINDEX_NAMESPACE_URI "loading", &kHTTPIndex_Loading);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = gRDF->GetResource(NC_NAMESPACE_URI "child", &kNC_Child);
|
||||
rv = gDirRDF->GetResource(NC_NAMESPACE_URI "child", &kNC_Child);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = gRDF->GetLiteral(NS_ConvertASCIItoUCS2("true").GetUnicode(), &kTrueLiteral);
|
||||
rv = gDirRDF->GetLiteral(NS_ConvertASCIItoUCS2("true").GetUnicode(), &kTrueLiteral);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
rv = gRDF->GetLiteral(NS_ConvertASCIItoUCS2("false").GetUnicode(), &kFalseLiteral);
|
||||
rv = gDirRDF->GetLiteral(NS_ConvertASCIItoUCS2("false").GetUnicode(), &kFalseLiteral);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
for (Field* field = gFieldTable; field->mName; ++field) {
|
||||
nsCAutoString str(field->mResName);
|
||||
|
||||
rv = gRDF->GetResource(str, &field->mProperty);
|
||||
rv = gDirRDF->GetResource(str, &field->mProperty);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
}
|
||||
@ -260,10 +258,10 @@ nsHTTPIndexParser::~nsHTTPIndexParser()
|
||||
NS_IF_RELEASE(field->mProperty);
|
||||
}
|
||||
|
||||
if (gRDF)
|
||||
if (gDirRDF)
|
||||
{
|
||||
nsServiceManager::ReleaseService("component://netscape/rdf/rdf-service", gRDF);
|
||||
gRDF = nsnull;
|
||||
nsServiceManager::ReleaseService("component://netscape/rdf/rdf-service", gDirRDF);
|
||||
gDirRDF = nsnull;
|
||||
}
|
||||
if (gTextToSubURI)
|
||||
{
|
||||
@ -378,7 +376,7 @@ nsHTTPIndexParser::OnStartRequest(nsIChannel* aChannel, nsISupports* aContext)
|
||||
mURI.Append('/');
|
||||
}
|
||||
|
||||
rv = gRDF->GetResource(mURI, getter_AddRefs(mDirectory));
|
||||
rv = gDirRDF->GetResource(mURI, getter_AddRefs(mDirectory));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// Mark the directory as "loading"
|
||||
@ -416,7 +414,7 @@ nsHTTPIndexParser::OnStopRequest(nsIChannel* aChannel,
|
||||
nsresult rv;
|
||||
|
||||
nsCOMPtr<nsIRDFLiteral> comment;
|
||||
rv = gRDF->GetLiteral(mComment.GetUnicode(), getter_AddRefs(comment));
|
||||
rv = gDirRDF->GetLiteral(mComment.GetUnicode(), getter_AddRefs(comment));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = mDataSource->Assert(mDirectory, kHTTPIndex_Comment, comment, PR_TRUE);
|
||||
@ -771,7 +769,7 @@ nsHTTPIndexParser::ParseData(nsString* values, const char *baseStr, const char *
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIRDFResource> entry;
|
||||
rv = gRDF->GetResource(entryuriC, getter_AddRefs(entry));
|
||||
rv = gDirRDF->GetResource(entryuriC, getter_AddRefs(entry));
|
||||
|
||||
// At this point, we'll (hopefully) have found the filename and
|
||||
// constructed a resource for it, stored in entry. So now take a
|
||||
@ -821,14 +819,14 @@ nsHTTPIndexParser::ParseLiteral(nsIRDFResource *arc, const nsString& aValue, nsI
|
||||
{
|
||||
nsAutoString temp(aValue);
|
||||
temp.SetLength(len - 1);
|
||||
rv = gRDF->GetLiteral(temp.GetUnicode(), getter_AddRefs(result));
|
||||
rv = gDirRDF->GetLiteral(temp.GetUnicode(), getter_AddRefs(result));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!result)
|
||||
{
|
||||
rv = gRDF->GetLiteral(aValue.GetUnicode(), getter_AddRefs(result));
|
||||
rv = gDirRDF->GetLiteral(aValue.GetUnicode(), getter_AddRefs(result));
|
||||
}
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
@ -849,7 +847,7 @@ nsHTTPIndexParser::ParseDate(nsIRDFResource *arc, const nsString& aValue, nsIRDF
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIRDFDate> result;
|
||||
rv = gRDF->GetDateLiteral(tm, getter_AddRefs(result));
|
||||
rv = gDirRDF->GetDateLiteral(tm, getter_AddRefs(result));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
return result->QueryInterface(NS_GET_IID(nsIRDFNode), (void**) aResult);
|
||||
@ -874,7 +872,7 @@ nsHTTPIndexParser::ParseInt(nsIRDFResource *arc, const nsString& aValue, nsIRDFN
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIRDFInt> result;
|
||||
rv = gRDF->GetIntLiteral(i, getter_AddRefs(result));
|
||||
rv = gDirRDF->GetIntLiteral(i, getter_AddRefs(result));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
return result->QueryInterface(NS_GET_IID(nsIRDFNode), (void**) aResult);
|
||||
@ -924,16 +922,16 @@ nsHTTPIndex::~nsHTTPIndex()
|
||||
mConnectionList = nsnull;
|
||||
mNodeList = nsnull;
|
||||
|
||||
if (gRDF)
|
||||
if (gDirRDF)
|
||||
{
|
||||
// this may fail; just ignore errors
|
||||
gRDF->UnregisterDataSource(this);
|
||||
gDirRDF->UnregisterDataSource(this);
|
||||
}
|
||||
|
||||
if (gRDF)
|
||||
if (gDirRDF)
|
||||
{
|
||||
nsServiceManager::ReleaseService(kRDFServiceCID, gRDF);
|
||||
gRDF = nsnull;
|
||||
nsServiceManager::ReleaseService(kRDFServiceCID, gDirRDF);
|
||||
gDirRDF = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
@ -948,7 +946,7 @@ nsHTTPIndex::CommonInit()
|
||||
mEncoding = "ISO-8859-1";
|
||||
|
||||
rv = nsServiceManager::GetService(kRDFServiceCID,
|
||||
NS_GET_IID(nsIRDFService), (nsISupports**) &gRDF);
|
||||
NS_GET_IID(nsIRDFService), (nsISupports**) &gDirRDF);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get RDF service");
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
@ -958,12 +956,12 @@ nsHTTPIndex::CommonInit()
|
||||
return(rv);
|
||||
}
|
||||
|
||||
gRDF->GetResource(NC_NAMESPACE_URI "child", &kNC_Child);
|
||||
gRDF->GetResource(NC_NAMESPACE_URI "loading", &kNC_loading);
|
||||
gDirRDF->GetResource(NC_NAMESPACE_URI "child", &kNC_Child);
|
||||
gDirRDF->GetResource(NC_NAMESPACE_URI "loading", &kNC_loading);
|
||||
|
||||
rv = gRDF->GetLiteral(NS_ConvertASCIItoUCS2("true").GetUnicode(), &kTrueLiteral);
|
||||
rv = gDirRDF->GetLiteral(NS_ConvertASCIItoUCS2("true").GetUnicode(), &kTrueLiteral);
|
||||
if (NS_FAILED(rv)) return(rv);
|
||||
rv = gRDF->GetLiteral(NS_ConvertASCIItoUCS2("false").GetUnicode(), &kFalseLiteral);
|
||||
rv = gDirRDF->GetLiteral(NS_ConvertASCIItoUCS2("false").GetUnicode(), &kFalseLiteral);
|
||||
if (NS_FAILED(rv)) return(rv);
|
||||
|
||||
rv = NS_NewISupportsArray(getter_AddRefs(mConnectionList));
|
||||
@ -988,7 +986,7 @@ nsHTTPIndex::Init()
|
||||
if (NS_FAILED(rv)) return(rv);
|
||||
|
||||
// (do this last) register this as a named data source with the RDF service
|
||||
rv = gRDF->RegisterDataSource(this, PR_FALSE);
|
||||
rv = gDirRDF->RegisterDataSource(this, PR_FALSE);
|
||||
if (NS_FAILED(rv)) return(rv);
|
||||
|
||||
return(NS_OK);
|
||||
@ -1740,24 +1738,3 @@ nsDirectoryViewerFactory::CreateInstanceForDocument(nsISupports* aContainer,
|
||||
NS_NOTYETIMPLEMENTED("didn't expect to get here");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Component Exports
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHTTPIndex, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDirectoryViewerFactory)
|
||||
|
||||
// The list of components we register
|
||||
static nsModuleComponentInfo components[] = {
|
||||
{ "Directory Viewer", NS_DIRECTORYVIEWERFACTORY_CID,
|
||||
NS_DOCUMENT_LOADER_FACTORY_PROGID_PREFIX "view/application/http-index-format",
|
||||
nsDirectoryViewerFactoryConstructor,
|
||||
},
|
||||
{ "Directory Viewer", NS_HTTPINDEX_SERVICE_CID, NS_HTTPINDEX_SERVICE_PROGID,
|
||||
nsHTTPIndexConstructor },
|
||||
{ "Directory Viewer", NS_HTTPINDEX_SERVICE_CID, NS_HTTPINDEX_DATASOURCE_PROGID,
|
||||
nsHTTPIndexConstructor },
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE("nsDirectoryViewerModule", components)
|
||||
|
@ -26,19 +26,16 @@ VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = history
|
||||
LIBRARY_NAME = history
|
||||
IS_COMPONENT = 1
|
||||
MODULE = appcomps
|
||||
LIBRARY_NAME = history_s
|
||||
|
||||
CPPSRCS = nsGlobalHistory.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
-L$(DIST)/bin \
|
||||
-L$(DIST)/lib \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(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=
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -20,33 +20,24 @@
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=..\..\..\..
|
||||
MODULE=history
|
||||
|
||||
CPPSRCS= \
|
||||
nsGlobalHistory.obj \
|
||||
$(NULL)
|
||||
MODULE=appcomps
|
||||
|
||||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\nsGlobalHistory.obj \
|
||||
$(NULL)
|
||||
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
DLLNAME = history
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
LIBRARY_NAME=history_s
|
||||
|
||||
LCFLAGS = \
|
||||
$(LCFLAGS) \
|
||||
$(DEFINES) \
|
||||
$(NULL)
|
||||
|
||||
# These are the libraries we need to link with to create the DLL
|
||||
LLIBS= \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(LIBNSPR) \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) $(DLL) $(DIST)\bin\components
|
||||
install:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
||||
|
||||
|
@ -40,7 +40,6 @@
|
||||
#include "nsCRT.h"
|
||||
#include "nsFileStream.h"
|
||||
#include "nsIEnumerator.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsEnumeratorUtils.h"
|
||||
#include "nsRDFCID.h"
|
||||
@ -60,6 +59,19 @@
|
||||
|
||||
#include "nsIPref.h"
|
||||
|
||||
PRInt32 nsGlobalHistory::gRefCnt;
|
||||
nsIRDFService* nsGlobalHistory::gRDFService;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_Page;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_Date;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_VisitCount;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_Name;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_Referrer;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_child;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_URL;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_HistoryRoot;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_HistoryBySite;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_HistoryByDate;
|
||||
|
||||
#ifdef DEBUG_sspitzer
|
||||
#define DEBUG_LAST_PAGE_VISITED 1
|
||||
#endif /* DEBUG_sspitzer */
|
||||
@ -1676,23 +1688,3 @@ nsGlobalHistory::URLEnumerator::ConvertToISupports(nsIMdbRow* aRow, nsISupports*
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//
|
||||
// Global History Module
|
||||
//
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGlobalHistory, Init)
|
||||
|
||||
static nsModuleComponentInfo components[] =
|
||||
{
|
||||
{ "Global History", NS_GLOBALHISTORY_CID, NS_GLOBALHISTORY_PROGID,
|
||||
nsGlobalHistoryConstructor,
|
||||
},
|
||||
{ "Global History", NS_GLOBALHISTORY_CID, NS_GLOBALHISTORY_DATASOURCE_PROGID,
|
||||
nsGlobalHistoryConstructor,
|
||||
}
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE("nsGlobalHistoryModule", components)
|
||||
|
@ -173,17 +173,4 @@ protected:
|
||||
friend class URLEnumerator;
|
||||
};
|
||||
|
||||
PRInt32 nsGlobalHistory::gRefCnt;
|
||||
nsIRDFService* nsGlobalHistory::gRDFService;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_Page;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_Date;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_VisitCount;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_Name;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_Referrer;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_child;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_URL;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_HistoryRoot;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_HistoryBySite;
|
||||
nsIRDFResource* nsGlobalHistory::kNC_HistoryByDate;
|
||||
|
||||
#endif // nsglobalhistory__h____
|
||||
|
@ -42,6 +42,7 @@ DIRS= \
|
||||
urlbarhistory \
|
||||
winhooks \
|
||||
urlwidget \
|
||||
build \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
@ -26,17 +26,15 @@ VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = related
|
||||
LIBRARY_NAME = related
|
||||
IS_COMPONENT = 1
|
||||
MODULE = appcomps
|
||||
LIBRARY_NAME = related_s
|
||||
|
||||
CPPSRCS = nsRelatedLinksHandler.cpp
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
-L$(DIST)/bin \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(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=
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -20,30 +20,24 @@
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=..\..\..\..
|
||||
MODULE=related
|
||||
MODULE=appcomps
|
||||
include <$(DEPTH)/config/config.mak>
|
||||
|
||||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\nsRelatedLinksHandler.obj \
|
||||
$(NULL)
|
||||
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
DLLNAME = related
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
LIBRARY_NAME = related_s
|
||||
|
||||
LCFLAGS = \
|
||||
$(LCFLAGS) \
|
||||
$(DEFINES) \
|
||||
$(NULL)
|
||||
|
||||
# These are the libraries we need to link with to create the DLL
|
||||
LLIBS= \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(LIBNSPR) \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) $(DLL) $(DIST)\bin\components
|
||||
install:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
@ -30,7 +30,6 @@
|
||||
#include "nsRelatedLinksHandlerImpl.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsEnumeratorUtils.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsIRDFNode.h"
|
||||
#include "nsIRDFObserver.h"
|
||||
@ -63,6 +62,14 @@ static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
|
||||
static const char kURINC_RelatedLinksRoot[] = "NC:RelatedLinks";
|
||||
|
||||
nsString RelatedLinksHandlerImpl::mRLServerURL;
|
||||
PRInt32 RelatedLinksHandlerImpl::gRefCnt;
|
||||
nsIRDFService *RelatedLinksHandlerImpl::gRDFService;
|
||||
nsIRDFResource *RelatedLinksHandlerImpl::kNC_RelatedLinksRoot;
|
||||
nsIRDFResource *RelatedLinksHandlerImpl::kNC_Child;
|
||||
nsIRDFResource *RelatedLinksHandlerImpl::kRDF_type;
|
||||
nsIRDFResource *RelatedLinksHandlerImpl::kNC_RelatedLinksTopic;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// RelatedLinksStreamListener
|
||||
@ -953,19 +960,3 @@ RelatedLinksHandlerImpl::DoCommand(nsISupportsArray/*<nsIRDFResource>*/* aSource
|
||||
{
|
||||
return mInner->DoCommand(aSources, aCommand, aArguments);
|
||||
}
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Component Exports
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(RelatedLinksHandlerImpl, Init)
|
||||
|
||||
// The list of components we register
|
||||
static nsModuleComponentInfo components[] = {
|
||||
{ "Related Links Handler", NS_RELATEDLINKSHANDLER_CID, NS_RELATEDLINKSHANDLER_PROGID,
|
||||
RelatedLinksHandlerImplConstructor
|
||||
},
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE("nsRelatedLinksModule", components)
|
||||
|
@ -61,12 +61,4 @@ public:
|
||||
NS_DECL_NSIRDFDATASOURCE
|
||||
};
|
||||
|
||||
nsString RelatedLinksHandlerImpl::mRLServerURL;
|
||||
PRInt32 RelatedLinksHandlerImpl::gRefCnt;
|
||||
nsIRDFService *RelatedLinksHandlerImpl::gRDFService;
|
||||
nsIRDFResource *RelatedLinksHandlerImpl::kNC_RelatedLinksRoot;
|
||||
nsIRDFResource *RelatedLinksHandlerImpl::kNC_Child;
|
||||
nsIRDFResource *RelatedLinksHandlerImpl::kRDF_type;
|
||||
nsIRDFResource *RelatedLinksHandlerImpl::kNC_RelatedLinksTopic;
|
||||
|
||||
#endif // relatedlinkshandler____h____
|
||||
|
@ -26,22 +26,18 @@ VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = search
|
||||
LIBRARY_NAME = search
|
||||
IS_COMPONENT = 1
|
||||
MODULE = appcomps
|
||||
LIBRARY_NAME = search_s
|
||||
|
||||
CPPSRCS = \
|
||||
nsInternetSearchService.cpp \
|
||||
nsLocalSearchService.cpp \
|
||||
nsRegisterSearch.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
-L$(DIST)/bin \
|
||||
$(XPCOM_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(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=
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -20,39 +20,25 @@
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=..\..\..\..
|
||||
MODULE=search
|
||||
|
||||
CPPSRCS= \
|
||||
nsLocalSearchService.cpp \
|
||||
nsInternetSearchService.cpp \
|
||||
nsRegisterSearch.cpp \
|
||||
$(NULL)
|
||||
MODULE=appcomps
|
||||
|
||||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\nsLocalSearchService.obj \
|
||||
.\$(OBJDIR)\nsInternetSearchService.obj \
|
||||
.\$(OBJDIR)\nsRegisterSearch.obj \
|
||||
$(NULL)
|
||||
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
DLLNAME = search
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
LIBRARY_NAME = search_s
|
||||
|
||||
LCFLAGS = \
|
||||
$(LCFLAGS) \
|
||||
$(DEFINES) \
|
||||
$(NULL)
|
||||
|
||||
# These are the libraries we need to link with to create the DLL
|
||||
LLIBS= \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(LIBNSPR) \
|
||||
$(DIST)\lib\js3250.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) $(DLL) $(DIST)\bin\components
|
||||
install:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
||||
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
// Interfaces Needed
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsILayoutHistoryState.h"
|
||||
#include "nsIDocShellLoadInfo.h"
|
||||
#include "nsXPIDLString.h"
|
||||
@ -35,6 +34,7 @@
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsIDocShellTreeNode.h"
|
||||
#include "nsIDocShellLoadInfo.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
//*****************************************************************************
|
||||
//*** nsSHistory: Object Management
|
||||
|
@ -5,27 +5,22 @@ VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
IS_COMPONENT = 1
|
||||
|
||||
|
||||
DIRS = tools resources
|
||||
|
||||
MODULE = tbmb
|
||||
LIBRARY_NAME = tbmb
|
||||
MODULE = appcomps
|
||||
LIBRARY_NAME = timebomb_s
|
||||
XPIDL_MODULE = timebomb
|
||||
|
||||
XPIDLSRCS = nsITimeBomb.idl
|
||||
|
||||
CPPSRCS = \
|
||||
nsTimeBomb.cpp \
|
||||
$(NULL)
|
||||
CPPSRCS = nsTimeBomb.cpp
|
||||
|
||||
EXPORTS = \
|
||||
nsTimeBomb.h \
|
||||
$(NULL)
|
||||
EXPORTS = nsTimeBomb.h
|
||||
|
||||
EXTRA_DSO_LDOPTS += \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(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=
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -22,9 +22,8 @@
|
||||
|
||||
|
||||
DEPTH = ..\..\..
|
||||
MODULE = tbmb
|
||||
DLL = .\$(OBJDIR)\$(MODULE).dll
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
MODULE = appcomps
|
||||
LIBRARY_NAME=timebomb_s
|
||||
|
||||
include <$(DEPTH)/config/config.mak>
|
||||
|
||||
@ -43,21 +42,14 @@ LINCS = \
|
||||
-I$(PUBLIC)/xpcom \
|
||||
$(NULL)
|
||||
|
||||
LLIBS = \
|
||||
$(LIBNSPR) \
|
||||
$(DIST)\lib\js3250.lib \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(NULL)
|
||||
|
||||
|
||||
OBJS = \
|
||||
.\$(OBJDIR)\nsTimeBomb.obj \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(MODULE).dll $(DIST)\bin\components
|
||||
install:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\bin\components\$(MODULE).dll
|
||||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
||||
|
@ -22,9 +22,7 @@
|
||||
*/
|
||||
|
||||
#include "nsTimeBomb.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIPref.h"
|
||||
#include "nspr.h"
|
||||
#include "plstr.h"
|
||||
|
||||
@ -75,22 +73,6 @@ static nsresult DisplayURI(const char *urlStr, PRBool block)
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
class nsTimeBomb : public nsITimeBomb
|
||||
{
|
||||
public:
|
||||
|
||||
nsTimeBomb();
|
||||
virtual ~nsTimeBomb();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSITIMEBOMB
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsIPref> mPrefs;
|
||||
nsresult GetInt64ForPref(const char* pref, PRInt64* time);
|
||||
};
|
||||
|
||||
nsTimeBomb::nsTimeBomb()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
@ -392,19 +374,3 @@ nsTimeBomb::GetInt64ForPref(const char* pref, PRInt64* time)
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTimeBomb)
|
||||
|
||||
static nsModuleComponentInfo components[] =
|
||||
{
|
||||
{ "Netscape TimeBomb",
|
||||
NS_TIMEBOMB_CID,
|
||||
NS_TIMEBOMB_PROGID,
|
||||
nsTimeBombConstructor
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE("nsTimeBomb", components)
|
||||
|
||||
|
@ -20,7 +20,28 @@
|
||||
* Contributor(s):
|
||||
* Doug Turner <dougt@netscape.com>
|
||||
*/
|
||||
#ifndef nstimebomb_h___
|
||||
#define nstimebomb_h___
|
||||
|
||||
#include "nsITimeBomb.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIPref.h"
|
||||
|
||||
#define NS_TIMEBOMB_CID { 0x141917dc, 0xe1c3, 0x11d3, {0xac, 0x71, 0x00, 0xc0, 0x4f, 0xa0, 0xd2, 0x6b}}
|
||||
|
||||
class nsTimeBomb : public nsITimeBomb
|
||||
{
|
||||
public:
|
||||
|
||||
nsTimeBomb();
|
||||
virtual ~nsTimeBomb();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSITIMEBOMB
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsIPref> mPrefs;
|
||||
nsresult GetInt64ForPref(const char* pref, PRInt64* time);
|
||||
};
|
||||
|
||||
#endif // nstimebomb_h___
|
||||
|
@ -26,20 +26,14 @@ VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = urlbarhistory
|
||||
LIBRARY_NAME = urlbarhistory
|
||||
IS_COMPONENT = 1
|
||||
SHORT_LIBNAME = urlbhist
|
||||
MODULE = appcomps
|
||||
LIBRARY_NAME = urlbarhistory_s
|
||||
|
||||
CPPSRCS = nsUrlbarHistory.cpp \
|
||||
nsUBHistoryModule.cpp \
|
||||
$(NULL)
|
||||
CPPSRCS = nsUrlbarHistory.cpp
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
-L$(DIST)/bin \
|
||||
-L$(DIST)/lib \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(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=
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -19,34 +19,22 @@
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=..\..\..\..
|
||||
MODULE=urlbarhistory
|
||||
|
||||
CPPSRCS= \
|
||||
nsUrlbarHistory.obj \
|
||||
nsUBHistoryModule.obj \
|
||||
$(NULL)
|
||||
MODULE=appcomps
|
||||
LIBRARY_NAME=urlbarhistory_s
|
||||
|
||||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\nsUrlbarHistory.obj \
|
||||
.\$(OBJDIR)\nsUBHistoryModule.obj \
|
||||
$(NULL)
|
||||
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
DLLNAME = urlbarhistory
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
|
||||
LCFLAGS = \
|
||||
$(LCFLAGS) \
|
||||
$(DEFINES) \
|
||||
$(NULL)
|
||||
|
||||
# These are the libraries we need to link with to create the DLL
|
||||
LLIBS= \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(LIBNSPR) \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) $(DLL) $(DIST)\bin\components
|
||||
install:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
||||
|
@ -28,10 +28,10 @@
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
// Interfaces Needed
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIAutoCompleteResults.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
|
||||
@ -151,7 +151,7 @@ nsUrlbarHistory::GetCount(PRInt32 * aResult)
|
||||
|
||||
printf("In nsUrlbarHistory::GetCount\n");
|
||||
nsCOMPtr<nsISimpleEnumerator> entries;
|
||||
nsresult rv = mDataSource->GetTargets(kNC_URLBARHISTORY,
|
||||
(void)mDataSource->GetTargets(kNC_URLBARHISTORY,
|
||||
kNC_CHILD,
|
||||
PR_TRUE,
|
||||
getter_AddRefs(entries));
|
||||
|
@ -19,7 +19,7 @@
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
MODULE=urlwidgt
|
||||
MODULE=appcomps
|
||||
|
||||
DEPTH=..\..\..
|
||||
|
||||
@ -31,19 +31,7 @@ XPIDLSRCS=\
|
||||
|
||||
include <$(DEPTH)/config/config.mak>
|
||||
|
||||
DLLNAME = urlwidgt
|
||||
DLL1NAME = urlwidgt
|
||||
PDBFILE = $(DLLNAME).pdb
|
||||
MAPFILE = $(DLLNAME).map
|
||||
DLL =.\$(OBJDIR)\$(DLLNAME).dll
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
|
||||
LINCS = \
|
||||
$(NULL)
|
||||
|
||||
LLIBS = \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(NULL)
|
||||
LIBRARY_NAME=urlwidgt_s
|
||||
|
||||
OBJS = \
|
||||
.\$(OBJDIR)\nsUrlWidget.obj \
|
||||
@ -51,9 +39,9 @@ OBJS = \
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin\components
|
||||
install:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\bin\components\$(DLLNAME).dll
|
||||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
||||
|
||||
|
@ -25,8 +25,7 @@
|
||||
// Filename: nsIUrlWidget.cpp
|
||||
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIUrlWidget.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsUrlWidget.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
@ -36,26 +35,12 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
// {1802EE82-34A1-11d4-82EE-0050DA2DA771}
|
||||
#define NS_IURLWIDGET_CID { 0x1802EE82, 0x34A1, 0x11d4, { 0x82, 0xEE, 0x00, 0x50, 0xDA, 0x2D, 0xA7, 0x71 } }
|
||||
|
||||
// Define this macro to turn on console debug output.
|
||||
//#define DEBUG_URLWIDGET
|
||||
|
||||
// Implementation of the nsIUrlWidget interface.
|
||||
class nsUrlWidget : public nsIUrlWidget {
|
||||
public:
|
||||
|
||||
nsUrlWidget();
|
||||
virtual ~nsUrlWidget();
|
||||
|
||||
private:
|
||||
|
||||
// Declare all interface methods we must implement.
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
// Simple initialization function.
|
||||
NS_IMETHODIMP
|
||||
nsresult
|
||||
nsUrlWidget::Init()
|
||||
{
|
||||
|
||||
@ -131,7 +116,6 @@ nsUrlWidget::SetURLToHiddenControl( char const *aURL, nsIDOMWindowInternal *pare
|
||||
|
||||
return rv;
|
||||
}
|
||||
}; // End of nsUrlWidget class definition.
|
||||
|
||||
// Use standard implementation of nsISupports stuff.
|
||||
NS_IMPL_ISUPPORTS1( nsUrlWidget, nsIUrlWidget );
|
||||
@ -149,16 +133,3 @@ nsUrlWidget::~nsUrlWidget() {
|
||||
printf( "nsUrlWidget dtor called\n" );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsUrlWidget, Init)
|
||||
|
||||
nsModuleComponentInfo components[] = {
|
||||
{ NS_IURLWIDGET_CLASSNAME,
|
||||
NS_IURLWIDGET_CID,
|
||||
NS_IURLWIDGET_PROGID,
|
||||
nsUrlWidgetConstructor },
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE( "nsUrlWidget", components )
|
||||
|
||||
|
42
xpfe/components/urlwidget/nsUrlWidget.h
Normal file
42
xpfe/components/urlwidget/nsUrlWidget.h
Normal file
@ -0,0 +1,42 @@
|
||||
/* -*- 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.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#ifndef nsurlwidget_h___
|
||||
#define nsurlwidget_h___
|
||||
|
||||
#include "nsIUrlWidget.h"
|
||||
|
||||
// {1802EE82-34A1-11d4-82EE-0050DA2DA771}
|
||||
#define NS_IURLWIDGET_CID { 0x1802EE82, 0x34A1, 0x11d4, { 0x82, 0xEE, 0x00, 0x50, 0xDA, 0x2D, 0xA7, 0x71 } }
|
||||
|
||||
// nsUrlWidget declaration
|
||||
class nsUrlWidget : public nsIUrlWidget {
|
||||
public:
|
||||
nsUrlWidget();
|
||||
virtual ~nsUrlWidget();
|
||||
nsresult Init();
|
||||
|
||||
// Declare all interface methods we must implement.
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIURLWIDGET
|
||||
};
|
||||
#endif // nsurlwidget_h___
|
@ -20,7 +20,7 @@
|
||||
# Contributor(s):
|
||||
# Bill Law <law@netscape.com>
|
||||
|
||||
MODULE=winhooks
|
||||
MODULE=appcomps
|
||||
|
||||
DEPTH=..\..\..
|
||||
|
||||
@ -32,19 +32,7 @@ XPIDLSRCS=\
|
||||
|
||||
include <$(DEPTH)/config/config.mak>
|
||||
|
||||
DLLNAME = winhooks
|
||||
DLL1NAME = winhooks
|
||||
PDBFILE = $(DLLNAME).pdb
|
||||
MAPFILE = $(DLLNAME).map
|
||||
DLL =.\$(OBJDIR)\$(DLLNAME).dll
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
|
||||
LINCS = \
|
||||
$(NULL)
|
||||
|
||||
LLIBS = \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(NULL)
|
||||
LIBRARY_NAME = winhooks_s
|
||||
|
||||
OBJS = \
|
||||
.\$(OBJDIR)\nsWindowsHooks.obj \
|
||||
@ -52,9 +40,9 @@ OBJS = \
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin\components
|
||||
install:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\bin\components\$(DLLNAME).dll
|
||||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
||||
|
||||
|
@ -20,9 +20,7 @@
|
||||
* Contributor(s):
|
||||
* Bill Law <law@netscape.com>
|
||||
*/
|
||||
#include "nsIWindowsHooks.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
|
||||
#include "nsWindowsHooks.h"
|
||||
#include <windows.h>
|
||||
|
||||
// Implementation utilities.
|
||||
@ -52,52 +50,7 @@ static FileTypeRegistryEntry
|
||||
static EditableFileTypeRegistryEntry
|
||||
mozillaMarkup( htmExts, "MozillaHTML", "Mozilla Hypertext Markup Language Document" );
|
||||
|
||||
|
||||
/* c09bc130-0a71-11d4-8076-00600811a9c3 */
|
||||
#define NS_IWINDOWSHOOKS_CID \
|
||||
{ 0xc09bc130, 0x0a71, 0x11d4, {0x80, 0x76, 0x00, 0x60, 0x08, 0x11, 0xa9, 0xc3} }
|
||||
|
||||
// Implementation of the nsIWindowsHooksSettings interface.
|
||||
class nsWindowsHooksSettings : public nsIWindowsHooksSettings {
|
||||
public:
|
||||
// ctor/dtor
|
||||
nsWindowsHooksSettings();
|
||||
virtual ~nsWindowsHooksSettings();
|
||||
|
||||
// Declare all interface methods we must implement.
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIWINDOWSHOOKSSETTINGS
|
||||
|
||||
// Typedef for nsIWindowsHooksSettings getter/setter member functions.
|
||||
typedef nsresult (__stdcall nsIWindowsHooksSettings::*getter)( PRBool* );
|
||||
typedef nsresult (__stdcall nsIWindowsHooksSettings::*setter)( PRBool );
|
||||
|
||||
protected:
|
||||
// General purpose getter.
|
||||
NS_IMETHOD Get( PRBool *result, PRBool nsWindowsHooksSettings::*member );
|
||||
// General purpose setter.
|
||||
NS_IMETHOD Set( PRBool value, PRBool nsWindowsHooksSettings::*member );
|
||||
|
||||
private:
|
||||
// Internet shortcut protocols.
|
||||
struct {
|
||||
PRBool mHandleHTTP;
|
||||
PRBool mHandleHTTPS;
|
||||
PRBool mHandleFTP;
|
||||
PRBool mHandleCHROME;
|
||||
};
|
||||
// File types.
|
||||
struct {
|
||||
PRBool mHandleHTML;
|
||||
PRBool mHandleJPEG;
|
||||
PRBool mHandleGIF;
|
||||
PRBool mHandlePNG;
|
||||
PRBool mHandleXML;
|
||||
PRBool mHandleXUL;
|
||||
};
|
||||
friend class nsWindowsHooks;
|
||||
}; // nsWindowsHooksSettings
|
||||
|
||||
// Use standard implementation of nsISupports stuff.
|
||||
NS_IMPL_ISUPPORTS1( nsWindowsHooksSettings, nsIWindowsHooksSettings );
|
||||
|
||||
@ -150,24 +103,6 @@ DEFINE_GETTER_AND_SETTER( IsHandlingCHROME, mHandleCHROME )
|
||||
|
||||
|
||||
// Implementation of the nsIWindowsHooks interface.
|
||||
class nsWindowsHooks : public nsIWindowsHooks {
|
||||
public:
|
||||
// ctor/dtor
|
||||
nsWindowsHooks();
|
||||
virtual ~nsWindowsHooks();
|
||||
|
||||
// Declare all interface methods we must implement.
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIWINDOWSHOOKS
|
||||
|
||||
protected:
|
||||
// Internal flavor of GetPreferences.
|
||||
NS_IMETHOD GetSettings( nsWindowsHooksSettings ** );
|
||||
|
||||
// Set registry according to settings.
|
||||
NS_IMETHOD SetRegistry();
|
||||
}; // nsWindowsHooksSettings
|
||||
|
||||
// Use standard implementation of nsISupports stuff.
|
||||
NS_IMPL_ISUPPORTS1( nsWindowsHooks, nsIWindowsHooks );
|
||||
|
||||
@ -330,15 +265,3 @@ nsWindowsHooks::SetRegistry() {
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsHooks)
|
||||
|
||||
nsModuleComponentInfo components[] = {
|
||||
{ NS_IWINDOWSHOOKS_CLASSNAME,
|
||||
NS_IWINDOWSHOOKS_CID,
|
||||
NS_IWINDOWSHOOKS_PROGID,
|
||||
nsWindowsHooksConstructor },
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE( "nsWindowsHooks", components )
|
||||
|
||||
|
90
xpfe/components/winhooks/nsWindowsHooks.h
Normal file
90
xpfe/components/winhooks/nsWindowsHooks.h
Normal file
@ -0,0 +1,90 @@
|
||||
/* -*- 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.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#ifndef nswindowshooks_h____
|
||||
#define nswindowshooks_h____
|
||||
|
||||
#include "nsIWindowsHooks.h"
|
||||
|
||||
/* c09bc130-0a71-11d4-8076-00600811a9c3 */
|
||||
#define NS_IWINDOWSHOOKS_CID \
|
||||
{ 0xc09bc130, 0x0a71, 0x11d4, {0x80, 0x76, 0x00, 0x60, 0x08, 0x11, 0xa9, 0xc3} }
|
||||
|
||||
class nsWindowsHooksSettings : public nsIWindowsHooksSettings {
|
||||
public:
|
||||
// ctor/dtor
|
||||
nsWindowsHooksSettings();
|
||||
virtual ~nsWindowsHooksSettings();
|
||||
|
||||
// Declare all interface methods we must implement.
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIWINDOWSHOOKSSETTINGS
|
||||
|
||||
// Typedef for nsIWindowsHooksSettings getter/setter member functions.
|
||||
typedef nsresult (__stdcall nsIWindowsHooksSettings::*getter)( PRBool* );
|
||||
typedef nsresult (__stdcall nsIWindowsHooksSettings::*setter)( PRBool );
|
||||
|
||||
protected:
|
||||
// General purpose getter.
|
||||
NS_IMETHOD Get( PRBool *result, PRBool nsWindowsHooksSettings::*member );
|
||||
// General purpose setter.
|
||||
NS_IMETHOD Set( PRBool value, PRBool nsWindowsHooksSettings::*member );
|
||||
|
||||
private:
|
||||
// Internet shortcut protocols.
|
||||
struct {
|
||||
PRBool mHandleHTTP;
|
||||
PRBool mHandleHTTPS;
|
||||
PRBool mHandleFTP;
|
||||
PRBool mHandleCHROME;
|
||||
};
|
||||
// File types.
|
||||
struct {
|
||||
PRBool mHandleHTML;
|
||||
PRBool mHandleJPEG;
|
||||
PRBool mHandleGIF;
|
||||
PRBool mHandlePNG;
|
||||
PRBool mHandleXML;
|
||||
PRBool mHandleXUL;
|
||||
};
|
||||
friend class nsWindowsHooks;
|
||||
}; // nsWindowsHooksSettings
|
||||
|
||||
class nsWindowsHooks : public nsIWindowsHooks {
|
||||
public:
|
||||
// ctor/dtor
|
||||
nsWindowsHooks();
|
||||
virtual ~nsWindowsHooks();
|
||||
|
||||
// Declare all interface methods we must implement.
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIWINDOWSHOOKS
|
||||
|
||||
protected:
|
||||
// Internal flavor of GetPreferences.
|
||||
NS_IMETHOD GetSettings( nsWindowsHooksSettings ** );
|
||||
|
||||
// Set registry according to settings.
|
||||
NS_IMETHOD SetRegistry();
|
||||
}; // nsWindowsHooksSettings
|
||||
|
||||
#endif // nswindowshooks_h____
|
Loading…
Reference in New Issue
Block a user