зеркало из https://github.com/mozilla/gecko-dev.git
Bug 181136 remove xpfe/components/regviewer
r=dveditz sr=bz
This commit is contained in:
Родитель
dc76dfa0c6
Коммит
dd7bb3a66f
|
@ -654,7 +654,6 @@ xpfe/components/download-manager/src/Makefile
|
|||
xpfe/components/download-manager/public/Makefile
|
||||
xpfe/components/timebomb/Makefile
|
||||
xpfe/components/timebomb/tools/Makefile
|
||||
xpfe/components/regviewer/Makefile
|
||||
xpfe/components/find/Makefile
|
||||
xpfe/components/find/public/Makefile
|
||||
xpfe/components/find/src/Makefile
|
||||
|
@ -1493,8 +1492,6 @@ MAKEFILES_rdf="js/src/fdlibm/Makefile js/src/Makefile modules/libreg/Makefile st
|
|||
|
||||
MAKEFILES_rdfutil="js/src/fdlibm/Makefile js/src/Makefile modules/libreg/Makefile string/Makefile xpcom/Makefile expat/Makefile intl/Makefile embedding/components/windowwatcher/Makefile intl/lwbrk/Makefile sun-java/stubs/Makefile js/jsd/classes/Makefile js/src/liveconnect/Makefile modules/zlib/Makefile modules/libjar/Makefile modules/libimg/png/Makefile jpeg/Makefile netwerk/cache/Makefile modules/libpr0n/public/Makefile modules/libpr0n/src/Makefile webshell/Makefile embedding/components/ui/helperAppDlg/Makefile gfx/src/xlibrgb/Makefile widget/src/gtkxtbin/Makefile modules/plugin/Makefile uriloader/exthandler/Makefile view/Makefile editor/composer/Makefile editor/txtsvc/Makefile content/xul/content/Makefile content/xul/templates/Makefile profile/pref-migrator/Makefile profile/Makefile embedding/components/jsconsole/Makefile embedding/components/commandhandler/Makefile xpfe/components/find/Makefile embedding/components/find/Makefile embedding/components/appstartup/Makefile embedding/components/windowwatcher/Makefile embedding/components/printingui/Makefile embedding/components/build/Makefile embedding/base/Makefile xpfe/appshell/Makefile rdf/chrome/Makefile content/xul/document/Makefile editor/txmgr/Makefile editor/Makefile intl/chardet/Makefile modules/libutil/Makefile content/Makefile embedding/components/webbrowserpersist/Makefile embedding/browser/webBrowser/Makefile embedding/browser/build/Makefile modules/oji/Makefile accessible/Makefile layout/Makefile xpfe/components/shistory/Makefile xpfe/browser/Makefile embedding/components/ui/progressDlg/Makefile xpfe/components/download-manager/Makefile db/mork/Makefile db/mdb/Makefile directory/xpcom/base/Makefile xpfe/components/Makefile docshell/Makefile uriloader/Makefile xpfe/components/xremote/Makefile widget/Makefile gfx/Makefile intl/locale/Makefile intl/uconv/Makefile intl/unicharutil/Makefile htmlparser/Makefile xpfe/components/sidebar/Makefile dom/Makefile caps/Makefile js/src/xpconnect/Makefile modules/libpref/Makefile netwerk/mime/Makefile netwerk/protocol/ftp/Makefile netwerk/protocol/gopher/Makefile netwerk/protocol/viewsource/Makefile netwerk/build2/Makefile netwerk/base/Makefile netwerk/protocol/about/Makefile netwerk/protocol/data/Makefile netwerk/protocol/file/Makefile netwerk/protocol/http/Makefile netwerk/protocol/jar/Makefile netwerk/protocol/keyword/Makefile netwerk/protocol/res/Makefile netwerk/dns/Makefile netwerk/socket/Makefile netwerk/streamconv/Makefile netwerk/cookie/Makefile netwerk/build/Makefile rdf/Makefile rdf/util/Makefile"
|
||||
|
||||
MAKEFILES_regviewer="js/src/fdlibm/Makefile js/src/Makefile modules/libreg/Makefile string/Makefile xpcom/Makefile expat/Makefile intl/Makefile embedding/components/windowwatcher/Makefile intl/lwbrk/Makefile sun-java/stubs/Makefile js/jsd/classes/Makefile js/src/liveconnect/Makefile modules/zlib/Makefile modules/libjar/Makefile modules/libimg/png/Makefile jpeg/Makefile netwerk/cache/Makefile modules/libpr0n/public/Makefile modules/libpr0n/src/Makefile webshell/Makefile embedding/components/ui/helperAppDlg/Makefile gfx/src/xlibrgb/Makefile widget/src/gtkxtbin/Makefile modules/plugin/Makefile uriloader/exthandler/Makefile view/Makefile editor/composer/Makefile editor/txtsvc/Makefile content/xul/content/Makefile content/xul/templates/Makefile profile/pref-migrator/Makefile profile/Makefile embedding/components/jsconsole/Makefile embedding/components/commandhandler/Makefile xpfe/components/find/Makefile embedding/components/find/Makefile embedding/components/appstartup/Makefile embedding/components/windowwatcher/Makefile embedding/components/printingui/Makefile embedding/components/build/Makefile embedding/base/Makefile xpfe/appshell/Makefile rdf/chrome/Makefile content/xul/document/Makefile editor/txmgr/Makefile editor/Makefile intl/chardet/Makefile modules/libutil/Makefile content/Makefile embedding/components/webbrowserpersist/Makefile embedding/browser/webBrowser/Makefile embedding/browser/build/Makefile modules/oji/Makefile accessible/Makefile layout/Makefile xpfe/components/shistory/Makefile xpfe/browser/Makefile embedding/components/ui/progressDlg/Makefile xpfe/components/download-manager/Makefile db/mork/Makefile db/mdb/Makefile directory/xpcom/base/Makefile xpfe/components/Makefile docshell/Makefile uriloader/Makefile xpfe/components/xremote/Makefile widget/Makefile gfx/Makefile intl/locale/Makefile intl/uconv/Makefile intl/unicharutil/Makefile htmlparser/Makefile xpfe/components/sidebar/Makefile dom/Makefile caps/Makefile js/src/xpconnect/Makefile modules/libpref/Makefile netwerk/mime/Makefile netwerk/protocol/ftp/Makefile netwerk/protocol/gopher/Makefile netwerk/protocol/viewsource/Makefile netwerk/build2/Makefile netwerk/base/Makefile netwerk/protocol/about/Makefile netwerk/protocol/data/Makefile netwerk/protocol/file/Makefile netwerk/protocol/http/Makefile netwerk/protocol/jar/Makefile netwerk/protocol/keyword/Makefile netwerk/protocol/res/Makefile netwerk/dns/Makefile netwerk/socket/Makefile netwerk/streamconv/Makefile netwerk/cookie/Makefile netwerk/build/Makefile rdf/util/Makefile rdf/Makefile xpfe/components/regviewer/Makefile"
|
||||
|
||||
MAKEFILES_shistory="js/src/fdlibm/Makefile js/src/Makefile modules/libreg/Makefile string/Makefile xpcom/Makefile expat/Makefile intl/Makefile embedding/components/windowwatcher/Makefile modules/zlib/Makefile modules/libimg/png/Makefile jpeg/Makefile netwerk/cache/Makefile modules/libpr0n/public/Makefile modules/libpr0n/src/Makefile intl/lwbrk/Makefile webshell/Makefile embedding/components/ui/helperAppDlg/Makefile rdf/util/Makefile sun-java/stubs/Makefile js/jsd/classes/Makefile js/src/liveconnect/Makefile modules/libjar/Makefile gfx/src/xlibrgb/Makefile widget/src/gtkxtbin/Makefile modules/plugin/Makefile modules/oji/Makefile editor/composer/Makefile editor/txtsvc/Makefile view/Makefile content/xul/content/Makefile content/xul/templates/Makefile profile/pref-migrator/Makefile profile/Makefile embedding/components/jsconsole/Makefile embedding/components/commandhandler/Makefile xpfe/components/find/Makefile embedding/components/find/Makefile embedding/components/appstartup/Makefile embedding/components/windowwatcher/Makefile embedding/components/printingui/Makefile embedding/components/build/Makefile embedding/base/Makefile xpfe/appshell/Makefile rdf/chrome/Makefile content/xul/document/Makefile editor/txmgr/Makefile editor/Makefile accessible/Makefile modules/libutil/Makefile layout/Makefile rdf/Makefile uriloader/exthandler/Makefile intl/chardet/Makefile content/Makefile embedding/components/webbrowserpersist/Makefile embedding/browser/webBrowser/Makefile embedding/browser/build/Makefile xpfe/browser/Makefile embedding/components/ui/progressDlg/Makefile xpfe/components/download-manager/Makefile db/mork/Makefile db/mdb/Makefile directory/xpcom/base/Makefile xpfe/components/Makefile docshell/Makefile uriloader/Makefile xpfe/components/xremote/Makefile widget/Makefile gfx/Makefile intl/locale/Makefile intl/uconv/Makefile intl/unicharutil/Makefile htmlparser/Makefile xpfe/components/sidebar/Makefile dom/Makefile caps/Makefile js/src/xpconnect/Makefile modules/libpref/Makefile netwerk/mime/Makefile netwerk/protocol/ftp/Makefile netwerk/protocol/gopher/Makefile netwerk/protocol/viewsource/Makefile netwerk/build2/Makefile netwerk/base/Makefile netwerk/protocol/about/Makefile netwerk/protocol/data/Makefile netwerk/protocol/file/Makefile netwerk/protocol/http/Makefile netwerk/protocol/jar/Makefile netwerk/protocol/keyword/Makefile netwerk/protocol/res/Makefile netwerk/dns/Makefile netwerk/socket/Makefile netwerk/streamconv/Makefile netwerk/cookie/Makefile netwerk/build/Makefile xpfe/components/shistory/Makefile"
|
||||
|
||||
MAKEFILES_sidebar="xpfe/components/sidebar/Makefile"
|
||||
|
@ -1696,7 +1693,6 @@ MAKEFILES_zlib="modules/zlib/Makefile"
|
|||
progressDlg) add_makefiles "$MAKEFILES_progressDlg" ;;
|
||||
rdf) add_makefiles "$MAKEFILES_rdf" ;;
|
||||
rdfutil) add_makefiles "$MAKEFILES_rdfutil" ;;
|
||||
regviewer) add_makefiles "$MAKEFILES_regviewer" ;;
|
||||
shistory) add_makefiles "$MAKEFILES_shistory" ;;
|
||||
sidebar) add_makefiles "$MAKEFILES_sidebar" ;;
|
||||
string) add_makefiles "$MAKEFILES_string" ;;
|
||||
|
|
|
@ -1122,8 +1122,6 @@ sub BuildClientDist()
|
|||
|
||||
# directory
|
||||
InstallFromManifest(":mozilla:xpfe:components:directory:MANIFEST_IDL", "$distdirectory:idl:");
|
||||
# regviewer
|
||||
InstallFromManifest(":mozilla:xpfe:components:regviewer:MANIFEST_IDL", "$distdirectory:idl:");
|
||||
|
||||
InstallFromManifest(":mozilla:xpfe:components:intl:MANIFEST", "$distdirectory:xpfe:");
|
||||
|
||||
|
@ -1497,7 +1495,6 @@ sub BuildIDLProjects()
|
|||
BuildIDLProject(":mozilla:extensions:xml-rpc:macbuild:xml-rpcIDL.xml","xml-rpc");
|
||||
BuildIDLProject(":mozilla:xpfe:components:bookmarks:macbuild:BookmarksIDL.xml", "bookmarks");
|
||||
BuildIDLProject(":mozilla:xpfe:components:directory:DirectoryIDL.xml", "Directory");
|
||||
BuildIDLProject(":mozilla:xpfe:components:regviewer:RegViewerIDL.xml", "RegViewer");
|
||||
BuildIDLProject(":mozilla:xpfe:components:history:macbuild:historyIDL.xml", "history");
|
||||
BuildIDLProject(":mozilla:xpfe:components:shistory:macbuild:shistoryIDL.xml", "shistory");
|
||||
BuildIDLProject(":mozilla:xpfe:components:related:macbuild:RelatedIDL.xml", "related");
|
||||
|
@ -2254,7 +2251,6 @@ sub BuildXPAppProjects()
|
|||
|
||||
# Components
|
||||
BuildOneProject(":mozilla:xpfe:components:find:macbuild:FindComponent.xml", "FindComponent$D.$S", 1, $main::ALIAS_SYM_FILES, 1);
|
||||
BuildOneProject(":mozilla:xpfe:components:regviewer:RegViewer.xml", "RegViewer$D.$S", 1, $main::ALIAS_SYM_FILES, 1);
|
||||
BuildOneProject(":mozilla:xpfe:components:shistory:macbuild:shistory.xml", "shistory$D.$S", 1, $main::ALIAS_SYM_FILES, 1);
|
||||
BuildOneProject(":mozilla:xpfe:components:macbuild:appcomps.xml", "appcomps$D.$S", 1, $main::ALIAS_SYM_FILES, 1);
|
||||
InstallFromManifest(":mozilla:xpfe:appshell:src:MANIFEST_COMPONENTS", "${dist_dir}Components:");
|
||||
|
|
|
@ -43,7 +43,7 @@ ifneq ($(BUILD_MODULES),all)
|
|||
#### Generated lines go after this line.
|
||||
|
||||
# Available modules are:
|
||||
# TestStreamConv TestXPC TestXPTC accessibility accessproxy addrbook appcomps apprunner appshell autoconfig browser caps chardet chrome commandhandler composer content cookie dbm docshell dom downloadmanager editor embed_base embedcomponents expat exthandler filepicker find gfx gtkembedmoz gtkxtbin helperAppDlg htmlparser i18n iiextras imgbmp imggif imgjpeg imglib2 imgmng imgpng imgppm imgxbm impComm4xMail impText import inspector intl jar java jpeg js jsconsole jsdebug jsloader jsurl layout libart_lgpl libreg liveconnect locale lwbrk mailnews mime mimeemitter mimetype mng mork mozldap mpfilelocprovider msgbase msgbaseutil msgcompose msgdb msgimap msglocal msgmdn msgnews msgsmime necko necko2 nkcache nkdatetime nkfinger npsimple oji p3p plugin png pref prefetch prefmigr profile progressDlg rdf rdfutil regviewer shistory sidebar string svg_doc test_necko timebombgen transformiix txmgr txtsvc typeaheadfind uconv ucvcn ucvibm ucvja ucvko ucvlatin ucvmath ucvtw ucvtw2 unicharutil universalchardet uriloader util vcard view wallet walletviewers webbrowserpersist webbrwsr webshell webshell_tests widget windowwatcher xlibrgb xml-rpc xmlextras xmlterm xpcom xpcomsample xpconnect xpconnect_tests xpcshell xpctest xpinstall xpistub xpnet xremoteservice xul xuldoc xultmpl zlib
|
||||
# TestStreamConv TestXPC TestXPTC accessibility accessproxy addrbook appcomps apprunner appshell autoconfig browser caps chardet chrome commandhandler composer content cookie dbm docshell dom downloadmanager editor embed_base embedcomponents expat exthandler filepicker find gfx gtkembedmoz gtkxtbin helperAppDlg htmlparser i18n iiextras imgbmp imggif imgjpeg imglib2 imgmng imgpng imgppm imgxbm impComm4xMail impText import inspector intl jar java jpeg js jsconsole jsdebug jsloader jsurl layout libart_lgpl libreg liveconnect locale lwbrk mailnews mime mimeemitter mimetype mng mork mozldap mpfilelocprovider msgbase msgbaseutil msgcompose msgdb msgimap msglocal msgmdn msgnews msgsmime necko necko2 nkcache nkdatetime nkfinger npsimple oji p3p plugin png pref prefetch prefmigr profile progressDlg rdf rdfutil shistory sidebar string svg_doc test_necko timebombgen transformiix txmgr txtsvc typeaheadfind uconv ucvcn ucvibm ucvja ucvko ucvlatin ucvmath ucvtw ucvtw2 unicharutil universalchardet uriloader util vcard view wallet walletviewers webbrowserpersist webbrwsr webshell webshell_tests widget windowwatcher xlibrgb xml-rpc xmlextras xmlterm xpcom xpcomsample xpconnect xpconnect_tests xpcshell xpctest xpinstall xpistub xpnet xremoteservice xul xuldoc xultmpl zlib
|
||||
|
||||
BM_DIRS_TestStreamConv = js/src/fdlibm js/src modules/libreg string xpcom expat intl embedding/components/windowwatcher intl/lwbrk sun-java/stubs js/jsd/classes js/src/liveconnect modules/zlib modules/libjar modules/libimg/png jpeg netwerk/cache modules/libpr0n/public modules/libpr0n/src webshell embedding/components/ui/helperAppDlg rdf/util rdf gfx/src/xlibrgb widget/src/gtkxtbin modules/plugin uriloader/exthandler view editor/composer editor/txtsvc content/xul/content content/xul/templates profile/pref-migrator profile embedding/components/jsconsole embedding/components/commandhandler xpfe/components/find embedding/components/find embedding/components/appstartup embedding/components/windowwatcher embedding/components/printingui embedding/components/build embedding/base xpfe/appshell rdf/chrome content/xul/document editor/txmgr editor intl/chardet modules/libutil content embedding/components/webbrowserpersist embedding/browser/webBrowser embedding/browser/build modules/oji accessible layout xpfe/components/shistory xpfe/browser embedding/components/ui/progressDlg xpfe/components/download-manager db/mork db/mdb directory/xpcom/base xpfe/components docshell uriloader xpfe/components/xremote widget gfx intl/locale intl/uconv intl/unicharutil htmlparser xpfe/components/sidebar dom caps js/src/xpconnect modules/libpref netwerk/mime netwerk/protocol/ftp netwerk/protocol/gopher netwerk/protocol/viewsource netwerk/build2 netwerk/base netwerk/protocol/about netwerk/protocol/data netwerk/protocol/file netwerk/protocol/http netwerk/protocol/jar netwerk/protocol/keyword netwerk/protocol/res netwerk/dns netwerk/socket netwerk/streamconv netwerk/cookie netwerk/build netwerk/streamconv/test
|
||||
BM_CVS_TestStreamConv = js/src/fdlibm js/src modules/libreg string xpcom expat intl embedding/components/windowwatcher intl/lwbrk sun-java/stubs js/jsd/classes js/src/liveconnect modules/zlib modules/libjar modules/libimg/png jpeg netwerk/cache modules/libpr0n/public modules/libpr0n/src webshell embedding/components/ui/helperAppDlg rdf/util rdf gfx/src/xlibrgb widget/src/gtkxtbin modules/plugin uriloader/exthandler view editor/composer editor/txtsvc content/xul/content content/xul/templates profile/pref-migrator profile embedding/components/jsconsole embedding/components/commandhandler xpfe/components/find embedding/components/find embedding/components/appstartup embedding/components/windowwatcher embedding/components/printingui embedding/components/build embedding/base xpfe/appshell rdf/chrome content/xul/document editor/txmgr editor intl/chardet modules/libutil content embedding/components/webbrowserpersist embedding/browser/webBrowser embedding/browser/build modules/oji accessible layout xpfe/components/shistory xpfe/browser embedding/components/ui/progressDlg xpfe/components/download-manager db/mork db/mdb directory/xpcom/base xpfe/components docshell uriloader xpfe/components/xremote widget gfx intl/locale intl/uconv intl/unicharutil htmlparser xpfe/components/sidebar dom caps js/src/xpconnect modules/libpref netwerk/mime netwerk/protocol/ftp netwerk/protocol/gopher netwerk/protocol/viewsource netwerk/build2 netwerk/base netwerk/protocol/about netwerk/protocol/data netwerk/protocol/file netwerk/protocol/http netwerk/protocol/jar netwerk/protocol/keyword netwerk/protocol/res netwerk/dns netwerk/socket netwerk/streamconv netwerk/cookie netwerk/build netwerk/streamconv/test
|
||||
|
@ -435,10 +435,6 @@ BM_DIRS_rdfutil = js/src/fdlibm js/src modules/libreg string xpcom expat intl em
|
|||
BM_CVS_rdfutil = js/src/fdlibm js/src modules/libreg string xpcom expat intl embedding/components/windowwatcher intl/lwbrk sun-java/stubs js/jsd/classes js/src/liveconnect modules/zlib modules/libjar modules/libimg/png jpeg netwerk/cache modules/libpr0n/public modules/libpr0n/src webshell embedding/components/ui/helperAppDlg gfx/src/xlibrgb widget/src/gtkxtbin modules/plugin uriloader/exthandler view editor/composer editor/txtsvc content/xul/content content/xul/templates profile/pref-migrator profile embedding/components/jsconsole embedding/components/commandhandler xpfe/components/find embedding/components/find embedding/components/appstartup embedding/components/windowwatcher embedding/components/printingui embedding/components/build embedding/base xpfe/appshell rdf/chrome content/xul/document editor/txmgr editor intl/chardet modules/libutil content embedding/components/webbrowserpersist embedding/browser/webBrowser embedding/browser/build modules/oji accessible layout xpfe/components/shistory xpfe/browser embedding/components/ui/progressDlg xpfe/components/download-manager db/mork db/mdb directory/xpcom/base xpfe/components docshell uriloader xpfe/components/xremote widget gfx intl/locale intl/uconv intl/unicharutil htmlparser xpfe/components/sidebar dom caps js/src/xpconnect modules/libpref netwerk/mime netwerk/protocol/ftp netwerk/protocol/gopher netwerk/protocol/viewsource netwerk/build2 netwerk/base netwerk/protocol/about netwerk/protocol/data netwerk/protocol/file netwerk/protocol/http netwerk/protocol/jar netwerk/protocol/keyword netwerk/protocol/res netwerk/dns netwerk/socket netwerk/streamconv netwerk/cookie netwerk/build rdf rdf/util
|
||||
|
||||
|
||||
BM_DIRS_regviewer = js/src/fdlibm js/src modules/libreg string xpcom expat intl embedding/components/windowwatcher intl/lwbrk sun-java/stubs js/jsd/classes js/src/liveconnect modules/zlib modules/libjar modules/libimg/png jpeg netwerk/cache modules/libpr0n/public modules/libpr0n/src webshell embedding/components/ui/helperAppDlg gfx/src/xlibrgb widget/src/gtkxtbin modules/plugin uriloader/exthandler view editor/composer editor/txtsvc content/xul/content content/xul/templates profile/pref-migrator profile embedding/components/jsconsole embedding/components/commandhandler xpfe/components/find embedding/components/find embedding/components/appstartup embedding/components/windowwatcher embedding/components/printingui embedding/components/build embedding/base xpfe/appshell rdf/chrome content/xul/document editor/txmgr editor intl/chardet modules/libutil content embedding/components/webbrowserpersist embedding/browser/webBrowser embedding/browser/build modules/oji accessible layout xpfe/components/shistory xpfe/browser embedding/components/ui/progressDlg xpfe/components/download-manager db/mork db/mdb directory/xpcom/base xpfe/components docshell uriloader xpfe/components/xremote widget gfx intl/locale intl/uconv intl/unicharutil htmlparser xpfe/components/sidebar dom caps js/src/xpconnect modules/libpref netwerk/mime netwerk/protocol/ftp netwerk/protocol/gopher netwerk/protocol/viewsource netwerk/build2 netwerk/base netwerk/protocol/about netwerk/protocol/data netwerk/protocol/file netwerk/protocol/http netwerk/protocol/jar netwerk/protocol/keyword netwerk/protocol/res netwerk/dns netwerk/socket netwerk/streamconv netwerk/cookie netwerk/build rdf/util rdf xpfe/components/regviewer
|
||||
BM_CVS_regviewer = js/src/fdlibm js/src modules/libreg string xpcom expat intl embedding/components/windowwatcher intl/lwbrk sun-java/stubs js/jsd/classes js/src/liveconnect modules/zlib modules/libjar modules/libimg/png jpeg netwerk/cache modules/libpr0n/public modules/libpr0n/src webshell embedding/components/ui/helperAppDlg gfx/src/xlibrgb widget/src/gtkxtbin modules/plugin uriloader/exthandler view editor/composer editor/txtsvc content/xul/content content/xul/templates profile/pref-migrator profile embedding/components/jsconsole embedding/components/commandhandler xpfe/components/find embedding/components/find embedding/components/appstartup embedding/components/windowwatcher embedding/components/printingui embedding/components/build embedding/base xpfe/appshell rdf/chrome content/xul/document editor/txmgr editor intl/chardet modules/libutil content embedding/components/webbrowserpersist embedding/browser/webBrowser embedding/browser/build modules/oji accessible layout xpfe/components/shistory xpfe/browser embedding/components/ui/progressDlg xpfe/components/download-manager db/mork db/mdb directory/xpcom/base xpfe/components docshell uriloader xpfe/components/xremote widget gfx intl/locale intl/uconv intl/unicharutil htmlparser xpfe/components/sidebar dom caps js/src/xpconnect modules/libpref netwerk/mime netwerk/protocol/ftp netwerk/protocol/gopher netwerk/protocol/viewsource netwerk/build2 netwerk/base netwerk/protocol/about netwerk/protocol/data netwerk/protocol/file netwerk/protocol/http netwerk/protocol/jar netwerk/protocol/keyword netwerk/protocol/res netwerk/dns netwerk/socket netwerk/streamconv netwerk/cookie netwerk/build rdf/util rdf xpfe/components/regviewer
|
||||
|
||||
|
||||
BM_DIRS_shistory = js/src/fdlibm js/src modules/libreg string xpcom expat intl embedding/components/windowwatcher modules/zlib modules/libimg/png jpeg netwerk/cache modules/libpr0n/public modules/libpr0n/src intl/lwbrk webshell embedding/components/ui/helperAppDlg rdf/util sun-java/stubs js/jsd/classes js/src/liveconnect modules/libjar gfx/src/xlibrgb widget/src/gtkxtbin modules/plugin modules/oji editor/composer editor/txtsvc view content/xul/content content/xul/templates profile/pref-migrator profile embedding/components/jsconsole embedding/components/commandhandler xpfe/components/find embedding/components/find embedding/components/appstartup embedding/components/windowwatcher embedding/components/printingui embedding/components/build embedding/base xpfe/appshell rdf/chrome content/xul/document editor/txmgr editor accessible modules/libutil layout rdf uriloader/exthandler intl/chardet content embedding/components/webbrowserpersist embedding/browser/webBrowser embedding/browser/build xpfe/browser embedding/components/ui/progressDlg xpfe/components/download-manager db/mork db/mdb directory/xpcom/base xpfe/components docshell uriloader xpfe/components/xremote widget gfx intl/locale intl/uconv intl/unicharutil htmlparser xpfe/components/sidebar dom caps js/src/xpconnect modules/libpref netwerk/mime netwerk/protocol/ftp netwerk/protocol/gopher netwerk/protocol/viewsource netwerk/build2 netwerk/base netwerk/protocol/about netwerk/protocol/data netwerk/protocol/file netwerk/protocol/http netwerk/protocol/jar netwerk/protocol/keyword netwerk/protocol/res netwerk/dns netwerk/socket netwerk/streamconv netwerk/cookie netwerk/build xpfe/components/shistory
|
||||
BM_CVS_shistory = js/src/fdlibm js/src modules/libreg string xpcom expat intl embedding/components/windowwatcher modules/zlib modules/libimg/png jpeg netwerk/cache modules/libpr0n/public modules/libpr0n/src intl/lwbrk webshell embedding/components/ui/helperAppDlg rdf/util sun-java/stubs js/jsd/classes js/src/liveconnect modules/libjar gfx/src/xlibrgb widget/src/gtkxtbin modules/plugin modules/oji editor/composer editor/txtsvc view content/xul/content content/xul/templates profile/pref-migrator profile embedding/components/jsconsole embedding/components/commandhandler xpfe/components/find embedding/components/find embedding/components/appstartup embedding/components/windowwatcher embedding/components/printingui embedding/components/build embedding/base xpfe/appshell rdf/chrome content/xul/document editor/txmgr editor accessible modules/libutil layout rdf uriloader/exthandler intl/chardet content embedding/components/webbrowserpersist embedding/browser/webBrowser embedding/browser/build xpfe/browser embedding/components/ui/progressDlg xpfe/components/download-manager db/mork db/mdb directory/xpcom/base xpfe/components docshell uriloader xpfe/components/xremote widget gfx intl/locale intl/uconv intl/unicharutil htmlparser xpfe/components/sidebar dom caps js/src/xpconnect modules/libpref netwerk/mime netwerk/protocol/ftp netwerk/protocol/gopher netwerk/protocol/viewsource netwerk/build2 netwerk/base netwerk/protocol/about netwerk/protocol/data netwerk/protocol/file netwerk/protocol/http netwerk/protocol/jar netwerk/protocol/keyword netwerk/protocol/res netwerk/dns netwerk/socket netwerk/streamconv netwerk/cookie netwerk/build xpfe/components/shistory
|
||||
|
||||
|
|
|
@ -142,7 +142,6 @@ my %map = (
|
|||
'rdf', 'rdf',
|
||||
'rdfutil', 'rdf/util',
|
||||
'rdfldapds', 'directory/xpcom/tests',
|
||||
'regviewer', 'xpfe/components/regviewer',
|
||||
'SanePlugin', 'modules/plugin/samples/SanePlugin',
|
||||
'shistory', 'xpfe/components/shistory',
|
||||
'sidebar', 'xpfe/components/sidebar',
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -34,7 +34,6 @@ DIRS = \
|
|||
search \
|
||||
sidebar \
|
||||
related \
|
||||
regviewer \
|
||||
prefwindow \
|
||||
shistory \
|
||||
timebomb \
|
||||
|
|
|
@ -68,8 +68,6 @@ comm.jar:
|
|||
content/communicator/pref/pref-mousewheel.xul (prefwindow/resources/content/pref-mousewheel.xul)
|
||||
content/communicator/pref/pref-winhooks.xul (prefwindow/resources/content/pref-winhooks.xul)
|
||||
content/communicator/pref/pref-winhooks.js (prefwindow/resources/content/pref-winhooks.js)
|
||||
content/communicator/regviewer/regviewer.js (regviewer/regviewer.js)
|
||||
content/communicator/regviewer/regviewer.xul (regviewer/regviewer.xul)
|
||||
content/communicator/related/related-panel.xul (related/resources/related-panel.xul)
|
||||
content/communicator/related/related-panel.js (related/resources/related-panel.js)
|
||||
content/communicator/search/search.js (search/resources/search.js)
|
||||
|
@ -143,7 +141,6 @@ en-US.jar:
|
|||
locale/en-US/communicator/pref/pref.dtd (prefwindow/resources/locale/en-US/pref.dtd)
|
||||
locale/en-US/communicator/pref/pref-mousewheel.dtd (prefwindow/resources/locale/en-US/pref-mousewheel.dtd)
|
||||
locale/en-US/communicator/pref/pref-winhooks.dtd (prefwindow/resources/locale/en-US/pref-winhooks.dtd)
|
||||
locale/en-US/communicator/regviewer/regviewer.dtd (regviewer/locale/en-US/regviewer.dtd)
|
||||
locale/en-US/communicator/search/find.dtd (search/resources/locale/en-US/find.dtd)
|
||||
locale/en-US/communicator/search/findresults.dtd (search/resources/locale/en-US/findresults.dtd)
|
||||
locale/en-US/communicator/search/internet.dtd (search/resources/locale/en-US/internet.dtd)
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Makefile
|
|
@ -1,2 +0,0 @@
|
|||
regviewer.xul
|
||||
regviewer.js
|
|
@ -1 +0,0 @@
|
|||
regviewer.css
|
|
@ -1 +0,0 @@
|
|||
nsIRegistryDataSource.idl
|
|
@ -1,49 +0,0 @@
|
|||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = regviewer
|
||||
LIBRARY_NAME = regviewer
|
||||
EXPORT_LIBRARY = 1
|
||||
SHORT_LIBNAME = regviewr
|
||||
IS_COMPONENT = 1
|
||||
MODULE_NAME = nsRegistryViewerModule
|
||||
REQUIRES = xpcom \
|
||||
string \
|
||||
rdf \
|
||||
$(NULL)
|
||||
|
||||
XPIDLSRCS = nsIRegistryDataSource.idl
|
||||
|
||||
CPPSRCS = nsRegistryDataSource.cpp
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,41 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* 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 the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* Defining the following causes NS_APPSHELL to be defined as NS_EXPORT. */
|
||||
#define _IMPL_NS_APPSHELL
|
||||
|
||||
#include "MacSharedPrefix.h"
|
|
@ -1,41 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* 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 the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* Defining the following causes NS_APPSHELL to be defined as NS_EXPORT. */
|
||||
#define _IMPL_NS_APPSHELL
|
||||
|
||||
#include "MacSharedPrefix_debug.h"
|
|
@ -1 +0,0 @@
|
|||
en-US:regviewer.dtd
|
|
@ -1 +0,0 @@
|
|||
regviewer.dtd
|
|
@ -1,2 +0,0 @@
|
|||
<!ENTITY regviewerWindowTitle.label "Registry">
|
||||
<!ENTITY regviewerWindow.key.label "Key">
|
|
@ -1,73 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* 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 the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
|
||||
Registry viewer interface
|
||||
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIFile;
|
||||
|
||||
[scriptable, uuid(8FA81100-6F88-11d3-BE43-00104BDE6048)]
|
||||
interface nsIRegistryDataSource : nsISupports
|
||||
{
|
||||
const long ApplicationComponentRegistry = 1;
|
||||
|
||||
/**
|
||||
* Open and initialize the registry viewer
|
||||
*/
|
||||
void open(in nsIFile aFile);
|
||||
|
||||
/**
|
||||
* Open a stock registry
|
||||
*/
|
||||
void openWellKnownRegistry(in long aID);
|
||||
|
||||
/**
|
||||
* Open the profile registry
|
||||
*/
|
||||
void openDefaultRegistry();
|
||||
};
|
||||
|
||||
%{C++
|
||||
// {8FA81101-6F88-11d3-BE43-00104BDE6048}
|
||||
#define NS_REGISTRYVIEWER_CID \
|
||||
{ 0x8fa81101, 0x6f88, 0x11d3, { 0xbe, 0x43, 0x0, 0x10, 0x4b, 0xde, 0x60, 0x48 } }
|
||||
%}
|
|
@ -1,856 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* 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 Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Pierre Phaneuf <pp@ludusdesign.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
|
||||
A datasource that wraps an nsIRegstry object
|
||||
|
||||
*/
|
||||
|
||||
#include "nsRegistryDataSource.h"
|
||||
#include "nsIFileSpec.h"
|
||||
#include "nsIModule.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsRDFCID.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "plstr.h"
|
||||
#include "rdf.h"
|
||||
#include "nsCRT.h"
|
||||
|
||||
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
static NS_DEFINE_CID(kRegistryCID, NS_REGISTRY_CID);
|
||||
|
||||
#define NS_REGISTRY_NAMESPACE_URI "urn:mozilla-registry:"
|
||||
static const char kKeyPrefix[] = NS_REGISTRY_NAMESPACE_URI "key:";
|
||||
static const char kValuePrefix[] = NS_REGISTRY_NAMESPACE_URI "value:";
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
nsrefcnt nsRegistryDataSource::gRefCnt = 0;
|
||||
nsIRDFService* nsRegistryDataSource::gRDF;
|
||||
|
||||
nsIRDFResource* nsRegistryDataSource::kKeyRoot;
|
||||
nsIRDFResource* nsRegistryDataSource::kSubkeys;
|
||||
nsIRDFLiteral* nsRegistryDataSource::kBinaryLiteral;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
//
|
||||
// Constructors, destructors.
|
||||
//
|
||||
|
||||
nsRegistryDataSource::nsRegistryDataSource()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
nsRegistryDataSource::~nsRegistryDataSource()
|
||||
{
|
||||
if (--gRefCnt == 0) {
|
||||
if (gRDF) nsServiceManager::ReleaseService(kRDFServiceCID, gRDF);
|
||||
|
||||
NS_IF_RELEASE(kKeyRoot);
|
||||
NS_IF_RELEASE(kSubkeys);
|
||||
NS_IF_RELEASE(kBinaryLiteral);
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
NS_IMPL_ADDREF(nsRegistryDataSource);
|
||||
NS_IMPL_RELEASE(nsRegistryDataSource);
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::QueryInterface(const nsIID& aIID, void** aResult)
|
||||
{
|
||||
NS_PRECONDITION(aResult != nsnull, "null ptr");
|
||||
if (! aResult)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if (aIID.Equals(NS_GET_IID(nsIRDFDataSource)) ||
|
||||
aIID.Equals(NS_GET_IID(nsISupports))) {
|
||||
*aResult = NS_STATIC_CAST(nsIRDFDataSource*, this);
|
||||
}
|
||||
else if (aIID.Equals(NS_GET_IID(nsIRegistryDataSource))) {
|
||||
*aResult = NS_STATIC_CAST(nsIRegistryDataSource*, this);
|
||||
}
|
||||
else {
|
||||
*aResult = nsnull;
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
NS_ADDREF(NS_REINTERPRET_CAST(nsISupports*, *aResult));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
nsresult
|
||||
nsRegistryDataSource::Init()
|
||||
{
|
||||
if (gRefCnt++ == 0) {
|
||||
nsresult rv;
|
||||
rv = nsServiceManager::GetService(kRDFServiceCID,
|
||||
NS_GET_IID(nsIRDFService),
|
||||
(nsISupports**) &gRDF);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = gRDF->GetResource(NS_REGISTRY_NAMESPACE_URI "key:/", &kKeyRoot);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = gRDF->GetResource(NS_REGISTRY_NAMESPACE_URI "subkeys", &kSubkeys);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = gRDF->GetLiteral(NS_LITERAL_STRING("[binary data]").get(), &kBinaryLiteral);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
PRInt32
|
||||
nsRegistryDataSource::GetKey(nsIRDFResource* aResource)
|
||||
{
|
||||
// Quick check for common resources
|
||||
if (aResource == kKeyRoot) {
|
||||
return nsIRegistry::Common;
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
const char* uri;
|
||||
rv = aResource->GetValueConst(&uri);
|
||||
if (NS_FAILED(rv)) return PR_FALSE;
|
||||
|
||||
if (PL_strncmp(uri, kKeyPrefix, sizeof(kKeyPrefix) - 1) != 0)
|
||||
return -1;
|
||||
|
||||
nsRegistryKey key;
|
||||
const char* path = uri + sizeof(kKeyPrefix); // one extra to skip initial '/'
|
||||
rv = mRegistry->GetSubtree(nsIRegistry::Common, path, &key);
|
||||
if (NS_FAILED(rv)) return -1;
|
||||
|
||||
return key;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
//
|
||||
// nsIRegistryViewer interface
|
||||
//
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::Open(nsIFile *aFile)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aFile);
|
||||
|
||||
nsresult rv;
|
||||
rv = nsComponentManager::CreateInstance(kRegistryCID,
|
||||
nsnull,
|
||||
NS_GET_IID(nsIRegistry),
|
||||
getter_AddRefs(mRegistry));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = mRegistry->Open(aFile);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::OpenWellKnownRegistry(PRInt32 aID)
|
||||
{
|
||||
nsresult rv;
|
||||
rv = nsComponentManager::CreateInstance(kRegistryCID,
|
||||
nsnull,
|
||||
NS_GET_IID(nsIRegistry),
|
||||
getter_AddRefs(mRegistry));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = mRegistry->OpenWellKnownRegistry(aID);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::OpenDefaultRegistry()
|
||||
{
|
||||
nsresult rv;
|
||||
rv = nsComponentManager::CreateInstance(kRegistryCID,
|
||||
nsnull,
|
||||
NS_GET_IID(nsIRegistry),
|
||||
getter_AddRefs(mRegistry));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = mRegistry->OpenWellKnownRegistry(nsIRegistry::ApplicationRegistry);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
//
|
||||
// nsIRDFDataSource interface
|
||||
//
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::GetURI(char * *aURI)
|
||||
{
|
||||
*aURI = nsCRT::strdup("rdf:registry");
|
||||
return *aURI ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::GetSource(nsIRDFResource *aProperty, nsIRDFNode *aTarget, PRBool aTruthValue, nsIRDFResource **_retval)
|
||||
{
|
||||
NS_NOTYETIMPLEMENTED("write me");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::GetSources(nsIRDFResource *aProperty, nsIRDFNode *aTarget, PRBool aTruthValue, nsISimpleEnumerator **_retval)
|
||||
{
|
||||
NS_NOTYETIMPLEMENTED("write me");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::GetTarget(nsIRDFResource *aSource, nsIRDFResource *aProperty, PRBool aTruthValue, nsIRDFNode **_retval)
|
||||
{
|
||||
NS_PRECONDITION(aSource != nsnull, "null ptr");
|
||||
if (! aSource)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
NS_PRECONDITION(aProperty != nsnull, "null ptr");
|
||||
if (! aProperty)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
PRInt32 key;
|
||||
if (aTruthValue && ((key = GetKey(aSource)) != -1)) {
|
||||
nsresult rv;
|
||||
|
||||
if (aProperty == kSubkeys) {
|
||||
nsCOMPtr<nsISimpleEnumerator> results;
|
||||
rv = GetTargets(aSource, aProperty, aTruthValue, getter_AddRefs(results));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
PRBool hasMore;
|
||||
rv = results->HasMoreElements(&hasMore);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (hasMore) {
|
||||
nsCOMPtr<nsISupports> isupports;
|
||||
rv = results->GetNext(getter_AddRefs(isupports));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
return isupports->QueryInterface(NS_GET_IID(nsIRDFNode), (void**) _retval);
|
||||
}
|
||||
}
|
||||
else {
|
||||
const char* uri;
|
||||
rv = aProperty->GetValueConst(&uri);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (PL_strncmp(uri, kValuePrefix, sizeof(kValuePrefix) -1) == 0) {
|
||||
const char* path = uri + sizeof(kValuePrefix) - 1;
|
||||
|
||||
PRUint32 type;
|
||||
rv = mRegistry->GetValueType(key, path, &type);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
switch (type) {
|
||||
case nsIRegistry::String: {
|
||||
nsXPIDLCString value;
|
||||
rv = mRegistry->GetStringUTF8(key, path, getter_Copies(value));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIRDFLiteral> literal;
|
||||
rv = gRDF->GetLiteral(NS_ConvertASCIItoUCS2(value).get(), getter_AddRefs(literal));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
return literal->QueryInterface(NS_GET_IID(nsIRDFNode), (void**) _retval);
|
||||
}
|
||||
|
||||
case nsIRegistry::Int32: {
|
||||
PRInt32 value;
|
||||
rv = mRegistry->GetInt(key, path, &value);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIRDFInt> literal;
|
||||
rv = gRDF->GetIntLiteral(value, getter_AddRefs(literal));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
return literal->QueryInterface(NS_GET_IID(nsIRDFNode), (void**) _retval);
|
||||
}
|
||||
|
||||
case nsIRegistry::Bytes:
|
||||
case nsIRegistry::File:
|
||||
default:
|
||||
*_retval = kBinaryLiteral;
|
||||
NS_ADDREF(*_retval);
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*_retval = nsnull;
|
||||
return NS_RDF_NO_VALUE;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::GetTargets(nsIRDFResource *aSource, nsIRDFResource *aProperty, PRBool aTruthValue, nsISimpleEnumerator **_retval)
|
||||
{
|
||||
NS_PRECONDITION(aSource != nsnull, "null ptr");
|
||||
if (! aSource)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
NS_PRECONDITION(aProperty != nsnull, "null ptr");
|
||||
if (! aProperty)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
do {
|
||||
if (! aTruthValue)
|
||||
break;
|
||||
|
||||
if (aProperty == kSubkeys) {
|
||||
return SubkeyEnumerator::Create(this, aSource, _retval);
|
||||
}
|
||||
else {
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIRDFNode> node;
|
||||
rv = GetTarget(aSource, aProperty, aTruthValue, getter_AddRefs(node));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (node) {
|
||||
return NS_NewSingletonEnumerator(_retval, node);
|
||||
}
|
||||
}
|
||||
} while (0);
|
||||
|
||||
return NS_NewEmptyEnumerator(_retval);
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::Assert(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget, PRBool aTruthValue)
|
||||
{
|
||||
return NS_RDF_ASSERTION_REJECTED;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::Unassert(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget)
|
||||
{
|
||||
return NS_RDF_ASSERTION_REJECTED;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::Change(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aOldTarget, nsIRDFNode *aNewTarget)
|
||||
{
|
||||
return NS_RDF_ASSERTION_REJECTED;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::Move(nsIRDFResource *aOldSource, nsIRDFResource *aNewSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget)
|
||||
{
|
||||
return NS_RDF_ASSERTION_REJECTED;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::HasAssertion(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget, PRBool aTruthValue, PRBool *_retval)
|
||||
{
|
||||
NS_PRECONDITION(aSource != nsnull, "null ptr");
|
||||
if (! aSource)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
NS_PRECONDITION(aProperty != nsnull, "null ptr");
|
||||
if (! aProperty)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
NS_PRECONDITION(aTarget != nsnull, "null ptr");
|
||||
if (! aTarget)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
PRInt32 key;
|
||||
if (aTruthValue && ((key = GetKey(aSource)) != -1)) {
|
||||
nsresult rv;
|
||||
|
||||
if (aProperty == kSubkeys) {
|
||||
nsCOMPtr<nsISimpleEnumerator> results;
|
||||
rv = GetTargets(aSource, aProperty, aTruthValue, getter_AddRefs(results));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
do {
|
||||
PRBool hasMore;
|
||||
rv = results->HasMoreElements(&hasMore);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (! hasMore)
|
||||
break;
|
||||
|
||||
nsCOMPtr<nsISupports> isupports;
|
||||
rv = results->GetNext(getter_AddRefs(isupports));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIRDFNode> node = do_QueryInterface(isupports);
|
||||
NS_ASSERTION(node != nsnull, "not an nsIRDFNode");
|
||||
if (! node)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
if (node.get() == aTarget) {
|
||||
*_retval = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
} while (0);
|
||||
}
|
||||
else {
|
||||
nsCOMPtr<nsIRDFNode> node;
|
||||
rv = GetTarget(aSource, aProperty, aTruthValue, getter_AddRefs(node));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (node.get() == aTarget) {
|
||||
*_retval = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*_retval = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::AddObserver(nsIRDFObserver *aObserver)
|
||||
{
|
||||
NS_PRECONDITION(aObserver != nsnull, "null ptr");
|
||||
if (! aObserver)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if (! mObservers) {
|
||||
nsresult rv;
|
||||
rv = NS_NewISupportsArray(getter_AddRefs(mObservers));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
|
||||
mObservers->AppendElement(aObserver);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::RemoveObserver(nsIRDFObserver *aObserver)
|
||||
{
|
||||
NS_PRECONDITION(aObserver != nsnull, "null ptr");
|
||||
if (! aObserver)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if (mObservers) {
|
||||
mObservers->RemoveElement(aObserver);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, PRBool *result)
|
||||
{
|
||||
*result = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc, PRBool *result)
|
||||
{
|
||||
NS_PRECONDITION(aSource != nsnull, "null ptr");
|
||||
if (! aSource)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
PRInt32 key = GetKey(aSource);
|
||||
if (key == -1) {
|
||||
*result = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
|
||||
if (aArc == kSubkeys) {
|
||||
*result = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (key != nsIRegistry::Common) {
|
||||
// XXX In hopes that we'll all be using nsISimpleEnumerator someday
|
||||
nsCOMPtr<nsIEnumerator> values0;
|
||||
rv = mRegistry->EnumerateValues(key, getter_AddRefs(values0));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsISimpleEnumerator> values;
|
||||
rv = NS_NewAdapterEnumerator(getter_AddRefs(values), values0);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
do {
|
||||
PRBool hasMore;
|
||||
rv = values->HasMoreElements(&hasMore);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (! hasMore)
|
||||
break;
|
||||
|
||||
nsCOMPtr<nsISupports> isupports;
|
||||
rv = values->GetNext(getter_AddRefs(isupports));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIRegistryValue> value = do_QueryInterface(isupports);
|
||||
NS_ASSERTION(value != nsnull, "not a registry value");
|
||||
if (! value)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
nsXPIDLCString valueStr;
|
||||
rv = value->GetNameUTF8(getter_Copies(valueStr));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCAutoString propertyStr(kValuePrefix);
|
||||
propertyStr += (const char*) valueStr;
|
||||
|
||||
nsCOMPtr<nsIRDFResource> property;
|
||||
rv = gRDF->GetResource(propertyStr.get(), getter_AddRefs(property));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (aArc == property.get()) {
|
||||
*result = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
} while (1);
|
||||
}
|
||||
|
||||
*result = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::ArcLabelsIn(nsIRDFNode *aNode, nsISimpleEnumerator **_retval)
|
||||
{
|
||||
NS_NOTYETIMPLEMENTED("write me");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::ArcLabelsOut(nsIRDFResource *aSource, nsISimpleEnumerator **_retval)
|
||||
{
|
||||
NS_PRECONDITION(aSource != nsnull, "null ptr");
|
||||
if (! aSource)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
PRInt32 key = GetKey(aSource);
|
||||
if (key == -1)
|
||||
return NS_NewEmptyEnumerator(_retval);
|
||||
|
||||
nsresult rv;
|
||||
|
||||
nsCOMPtr<nsISupportsArray> array;
|
||||
rv = NS_NewISupportsArray(getter_AddRefs(array));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
array->AppendElement(kSubkeys);
|
||||
|
||||
if (key != nsIRegistry::Common) {
|
||||
// XXX In hopes that we'll all be using nsISimpleEnumerator someday
|
||||
nsCOMPtr<nsIEnumerator> values0;
|
||||
rv = mRegistry->EnumerateValues(key, getter_AddRefs(values0));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsISimpleEnumerator> values;
|
||||
rv = NS_NewAdapterEnumerator(getter_AddRefs(values), values0);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
do {
|
||||
PRBool hasMore;
|
||||
rv = values->HasMoreElements(&hasMore);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (! hasMore)
|
||||
break;
|
||||
|
||||
nsCOMPtr<nsISupports> isupports;
|
||||
rv = values->GetNext(getter_AddRefs(isupports));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIRegistryValue> value = do_QueryInterface(isupports);
|
||||
NS_ASSERTION(value != nsnull, "not a registry value");
|
||||
if (! value)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
nsXPIDLCString valueStr;
|
||||
rv = value->GetNameUTF8(getter_Copies(valueStr));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCAutoString propertyStr(kValuePrefix);
|
||||
propertyStr += (const char*) valueStr;
|
||||
|
||||
nsCOMPtr<nsIRDFResource> property;
|
||||
rv = gRDF->GetResource(propertyStr.get(), getter_AddRefs(property));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
array->AppendElement(property);
|
||||
} while (1);
|
||||
}
|
||||
|
||||
return NS_NewArrayEnumerator(_retval, array);
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::GetAllResources(nsISimpleEnumerator **_retval)
|
||||
{
|
||||
return NS_NewEmptyEnumerator(_retval);
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::IsCommandEnabled(nsISupportsArray *aSources, nsIRDFResource *aCommand, nsISupportsArray *aArguments, PRBool *_retval)
|
||||
{
|
||||
*_retval = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::DoCommand(nsISupportsArray *aSources, nsIRDFResource *aCommand, nsISupportsArray *aArguments)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::GetAllCmds(nsIRDFResource *aSource, nsISimpleEnumerator **_retval)
|
||||
{
|
||||
return NS_NewEmptyEnumerator(_retval);
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
//
|
||||
// nsSubkeyEnumerator
|
||||
//
|
||||
|
||||
nsRegistryDataSource::SubkeyEnumerator::SubkeyEnumerator(nsRegistryDataSource* aViewer, nsIRDFResource* aRootKey)
|
||||
: mViewer(aViewer),
|
||||
mRootKey(aRootKey),
|
||||
mStarted(PR_FALSE)
|
||||
{
|
||||
NS_ADDREF(mViewer);
|
||||
}
|
||||
|
||||
nsRegistryDataSource::SubkeyEnumerator::~SubkeyEnumerator()
|
||||
{
|
||||
NS_RELEASE(mViewer);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsRegistryDataSource::SubkeyEnumerator::Init()
|
||||
{
|
||||
NS_PRECONDITION(mViewer->mRegistry != nsnull, "null ptr");
|
||||
if (! mViewer->mRegistry)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
nsresult rv;
|
||||
|
||||
PRInt32 key = mViewer->GetKey(mRootKey);
|
||||
if (key == -1)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
rv = mViewer->mRegistry->EnumerateSubtrees(key, getter_AddRefs(mEnum));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsRegistryDataSource::SubkeyEnumerator::Create(nsRegistryDataSource* aViewer,
|
||||
nsIRDFResource* aRootKey,
|
||||
nsISimpleEnumerator** aResult)
|
||||
{
|
||||
SubkeyEnumerator* result = new SubkeyEnumerator(aViewer, aRootKey);
|
||||
if (! result)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
nsresult rv;
|
||||
rv = result->Init();
|
||||
if (NS_FAILED(rv)) {
|
||||
delete result;
|
||||
return rv;
|
||||
}
|
||||
|
||||
*aResult = result;
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsRegistryDataSource::SubkeyEnumerator::ConvertRegistryNodeToResource(nsISupports* aRegistryNode,
|
||||
nsIRDFResource** aResult)
|
||||
{
|
||||
nsCOMPtr<nsIRegistryNode> node = do_QueryInterface(aRegistryNode);
|
||||
NS_ASSERTION(node != nsnull, "not a registry node");
|
||||
if (! node)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
nsresult rv;
|
||||
|
||||
const char* rootURI;
|
||||
rv = mRootKey->GetValueConst(&rootURI);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsXPIDLCString path;
|
||||
rv = node->GetNameUTF8(getter_Copies(path));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCAutoString newURI(rootURI);
|
||||
if (newURI.Last() != '/') newURI += '/';
|
||||
newURI.Append(path);
|
||||
|
||||
rv = gRDF->GetResource(newURI.get(), aResult);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsRegistryDataSource::SubkeyEnumerator, nsISimpleEnumerator)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::SubkeyEnumerator::HasMoreElements(PRBool* _retval)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
if (mCurrent) {
|
||||
*_retval = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (! mStarted) {
|
||||
mStarted = PR_TRUE;
|
||||
rv = mEnum->First();
|
||||
if (rv == NS_OK) {
|
||||
nsCOMPtr<nsISupports> isupports;
|
||||
mEnum->CurrentItem(getter_AddRefs(isupports));
|
||||
|
||||
rv = ConvertRegistryNodeToResource(isupports, getter_AddRefs(mCurrent));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
*_retval = PR_TRUE;
|
||||
}
|
||||
else {
|
||||
*_retval = PR_FALSE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
*_retval = PR_FALSE;
|
||||
|
||||
rv = mEnum->IsDone();
|
||||
if (rv != NS_OK) {
|
||||
// We're not done. Advance to the next one.
|
||||
rv = mEnum->Next();
|
||||
if (rv == NS_OK) {
|
||||
nsCOMPtr<nsISupports> isupports;
|
||||
mEnum->CurrentItem(getter_AddRefs(isupports));
|
||||
|
||||
rv = ConvertRegistryNodeToResource(isupports, getter_AddRefs(mCurrent));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
*_retval = PR_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsRegistryDataSource::SubkeyEnumerator::GetNext(nsISupports** _retval)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
PRBool hasMore;
|
||||
rv = HasMoreElements(&hasMore);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (! hasMore)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
*_retval = mCurrent;
|
||||
NS_ADDREF(*_retval);
|
||||
mCurrent = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
//
|
||||
// Module implementation
|
||||
//
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsRegistryDataSource, Init)
|
||||
|
||||
// The list of components we register
|
||||
static const nsModuleComponentInfo components[] = {
|
||||
{ "Registry Viewer", NS_REGISTRYVIEWER_CID,
|
||||
"@mozilla.org/registry-viewer;1", nsRegistryDataSourceConstructor,
|
||||
},
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE(nsRegistryViewerModule, components)
|
|
@ -1,102 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* 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 the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsregistrydatasource___h____
|
||||
#define nsregistrydatasource___h____
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIRDFDataSource.h"
|
||||
#include "nsEnumeratorUtils.h"
|
||||
#include "nsIRegistryDataSource.h"
|
||||
#include "nsIRegistry.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIRDFService.h"
|
||||
|
||||
class nsRegistryDataSource : public nsIRDFDataSource,
|
||||
public nsIRegistryDataSource
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_DECL_NSIRDFDATASOURCE
|
||||
|
||||
NS_DECL_NSIREGISTRYDATASOURCE
|
||||
|
||||
// Implementation methods
|
||||
PRInt32 GetKey(nsIRDFResource* aResource);
|
||||
|
||||
nsCOMPtr<nsIRegistry> mRegistry;
|
||||
nsCOMPtr<nsISupportsArray> mObservers;
|
||||
|
||||
static nsrefcnt gRefCnt;
|
||||
static nsIRDFService* gRDF;
|
||||
|
||||
static nsIRDFResource* kKeyRoot;
|
||||
static nsIRDFResource* kSubkeys;
|
||||
static nsIRDFLiteral* kBinaryLiteral;
|
||||
|
||||
class SubkeyEnumerator : public nsISimpleEnumerator
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_DECL_NSISIMPLEENUMERATOR
|
||||
|
||||
static nsresult
|
||||
Create(nsRegistryDataSource* aViewer, nsIRDFResource* aRootKey, nsISimpleEnumerator** aResult);
|
||||
|
||||
protected:
|
||||
nsRegistryDataSource* mViewer;
|
||||
nsCOMPtr<nsIRDFResource> mRootKey;
|
||||
nsCOMPtr<nsIEnumerator> mEnum;
|
||||
nsCOMPtr<nsIRDFResource> mCurrent;
|
||||
PRBool mStarted;
|
||||
|
||||
SubkeyEnumerator(nsRegistryDataSource* aViewer, nsIRDFResource* aRootKey);
|
||||
virtual ~SubkeyEnumerator();
|
||||
nsresult Init();
|
||||
|
||||
nsresult
|
||||
ConvertRegistryNodeToResource(nsISupports* aRegistryNode, nsIRDFResource** aResult);
|
||||
};
|
||||
|
||||
nsRegistryDataSource();
|
||||
virtual ~nsRegistryDataSource();
|
||||
nsresult Init();
|
||||
};
|
||||
|
||||
#endif // nsregistrydatasource___h____
|
|
@ -1,44 +0,0 @@
|
|||
/* -*- Mode: C; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* 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 the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
|
||||
Style rules specific to the registry viewer window.
|
||||
|
||||
*/
|
||||
|
||||
@import url(chrome://global/skin);
|
|
@ -1,134 +0,0 @@
|
|||
/* -*- Mode: Java; tab-width: 4; c-basic-offset: 4; -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* 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 the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
|
||||
Script for the registry viewer window
|
||||
|
||||
*/
|
||||
|
||||
var RDF = Components.classes['@mozilla.org/rdf/rdf-service;1'].getService();
|
||||
RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService);
|
||||
|
||||
var Registry;
|
||||
var REGISTRY_NAMESPACE_URI = 'urn:mozilla-registry:'
|
||||
var REGISTRY_VALUE_PREFIX = REGISTRY_NAMESPACE_URI + 'value:';
|
||||
var kRegistry_Subkeys = RDF.GetResource(REGISTRY_NAMESPACE_URI + 'subkeys');
|
||||
|
||||
function debug(msg)
|
||||
{
|
||||
//dump(msg + '\n');
|
||||
}
|
||||
|
||||
function OnLoad()
|
||||
{
|
||||
Registry = Components.classes['@mozilla.org/registry-viewer;1'].createInstance();
|
||||
Registry = Registry.QueryInterface(Components.interfaces.nsIRegistryDataSource);
|
||||
|
||||
Registry.openWellKnownRegistry(Registry.ApplicationComponentRegistry);
|
||||
|
||||
Registry = Registry.QueryInterface(Components.interfaces.nsIRDFDataSource);
|
||||
|
||||
var tree = document.getElementById('tree');
|
||||
tree.database.AddDataSource(Registry);
|
||||
|
||||
tree.setAttribute('ref', 'urn:mozilla-registry:key:/');
|
||||
}
|
||||
|
||||
function OnSelect(event)
|
||||
{
|
||||
var tree = event.target;
|
||||
var items = tree.selectedItems;
|
||||
|
||||
var properties = document.getElementById('properties');
|
||||
if (properties.firstChild) {
|
||||
properties.removeChild(properties.firstChild);
|
||||
}
|
||||
|
||||
if (items.length == 1) {
|
||||
// Exactly one item is selected. Show as much information as we
|
||||
// can about it.
|
||||
var table = document.createElement('html:table');
|
||||
|
||||
debug('selected item = ' + items[0].getAttribute('id'));
|
||||
var uri = items[0].getAttribute('id');
|
||||
|
||||
var source = RDF.GetResource(uri);
|
||||
var arcs = Registry.ArcLabelsOut(source);
|
||||
while (arcs.hasMoreElements()) {
|
||||
var property = arcs.getNext().QueryInterface(Components.interfaces.nsIRDFResource);
|
||||
if (property == kRegistry_Subkeys)
|
||||
continue;
|
||||
|
||||
var propstr = property.Value.substr(REGISTRY_VALUE_PREFIX.length);
|
||||
debug('propstr = ' + propstr);
|
||||
|
||||
var target = Registry.GetTarget(source, property, true);
|
||||
var targetstr;
|
||||
|
||||
var literal;
|
||||
literal = target.QueryInterface(Components.interfaces.nsIRDFLiteral);
|
||||
if (literal) {
|
||||
targetstr = literal.Value;
|
||||
}
|
||||
else {
|
||||
literal = target.QueryInterface(Components.interfaces.nsIRDFInt)
|
||||
if (literal) {
|
||||
targetstr = literal.Value;
|
||||
}
|
||||
else {
|
||||
// Hmm. Not sure!
|
||||
}
|
||||
}
|
||||
|
||||
debug('targetstr = ' + targetstr);
|
||||
|
||||
var tr = document.createElement('html:tr');
|
||||
table.appendChild(tr);
|
||||
|
||||
var td1 = document.createElement('html:td');
|
||||
td1.appendChild(document.createTextNode(propstr));
|
||||
tr.appendChild(td1);
|
||||
|
||||
var td2 = document.createElement('html:td');
|
||||
td2.appendChild(document.createTextNode(targetstr));
|
||||
tr.appendChild(td2);
|
||||
}
|
||||
|
||||
properties.appendChild(table);
|
||||
}
|
||||
}
|
|
@ -1,68 +0,0 @@
|
|||
<?xml version="1.0"?> <!-- -*- Mode: SGML -*- -->
|
||||
<!--
|
||||
|
||||
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):
|
||||
|
||||
-->
|
||||
|
||||
<?xml-stylesheet type="text/css" href="chrome://communicator/skin/regviewer/regviewer.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://communicator/locale/regviewer/regviewer.dtd">
|
||||
|
||||
<window title="®viewerWindowTitle.label;"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
orient="horizontal"
|
||||
onload="OnLoad();">
|
||||
|
||||
<script type="application/x-javascript" src="regviewer.js" />
|
||||
<hbox flex="1*">
|
||||
<html:div style="width:100px;height:100px;" flex="1*">
|
||||
<tree id="tree" style="width:100%;height:100%" datasources="rdf:null"
|
||||
containment="urn:mozilla-registry:subkeys"
|
||||
onselect="OnSelect(event);">
|
||||
<treecols>
|
||||
<treecol id="regCol" flex="1" primary="true"/>
|
||||
</treecols>
|
||||
|
||||
<template>
|
||||
<treechildren>
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow>
|
||||
<treecell label="rdf:*" />
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</template>
|
||||
|
||||
<treehead>
|
||||
<treerow>
|
||||
<treecell label="®viewerWindow.key.label;" />
|
||||
</treerow>
|
||||
</treehead>
|
||||
</tree>
|
||||
</html:div>
|
||||
</hbox>
|
||||
<splitter collapse="before"/>
|
||||
<hbox flex="1*">
|
||||
<html:div id="properties" style="width:100%;height:100%" flex="1*" />
|
||||
</hbox>
|
||||
</window>
|
||||
|
|
@ -1 +0,0 @@
|
|||
_NSGetModule ; 1
|
|
@ -168,8 +168,6 @@ viewer:Components:profile.shlb
|
|||
viewer:Components:profileservices.xpt
|
||||
viewer:Components:rdf.xpt
|
||||
viewer:Components:RDFLibrary.shlb
|
||||
viewer:Components:RegViewer.shlb
|
||||
viewer:Components:RegViewer.xpt
|
||||
viewer:Components:related.xpt
|
||||
viewer:Components:search.xpt
|
||||
viewer:Components:shistory.shlb
|
||||
|
|
|
@ -192,8 +192,6 @@ bin/components/profile.xpt
|
|||
bin/components/proxyObjInst.xpt
|
||||
bin/components/rdf.dll
|
||||
bin/components/rdf.xpt
|
||||
bin/components/regviewer.xpt
|
||||
bin/components/regviewr.dll
|
||||
bin/components/shistory.dll
|
||||
bin/components/shistory.xpt
|
||||
bin/components/sidebar.xpt
|
||||
|
|
|
@ -155,7 +155,6 @@ bin/components/xuldoc.xpt
|
|||
bin/components/xultmpl.xpt
|
||||
bin/components/prefmigr.xpt
|
||||
bin/components/profile.xpt
|
||||
bin/components/regviewer.xpt
|
||||
bin/components/uconv.xpt
|
||||
bin/components/util.xpt
|
||||
bin/components/xpcom_components.xpt
|
||||
|
|
|
@ -152,7 +152,6 @@ bin\components\prefmigr.xpt
|
|||
bin\components\profile.xpt
|
||||
bin\components\proxyObject.xpt
|
||||
bin\components\rdf.xpt
|
||||
bin\components\regviewer.xpt
|
||||
bin\components\shistory.xpt
|
||||
bin\components\sidebar.xpt
|
||||
bin\components\signonviewer.xpt
|
||||
|
|
|
@ -207,10 +207,8 @@ bin/components/layout_xul_tree.xpt
|
|||
bin/components/xuldoc.xpt
|
||||
bin/components/xultmpl.xpt
|
||||
bin/components/libnsprefm.so
|
||||
bin/components/libregviewer.so
|
||||
bin/components/prefmigr.xpt
|
||||
bin/components/profile.xpt
|
||||
bin/components/regviewer.xpt
|
||||
bin/components/uconv.xpt
|
||||
bin/components/util.xpt
|
||||
bin/components/xpcom_components.xpt
|
||||
|
|
|
@ -118,8 +118,6 @@ bin\components\nsprefm.dll
|
|||
bin\components\nsSidebar.js
|
||||
bin\components\prefmigr.xpt
|
||||
bin\components\proxyObject.xpt
|
||||
bin\components\regviewer.xpt
|
||||
bin\components\regviewr.dll
|
||||
bin\components\sidebar.xpt
|
||||
bin\components\signonviewer.xpt
|
||||
bin\components\tridentprofile.dll
|
||||
|
|
Загрузка…
Ссылка в новой задаче