1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 2001
20 * the Initial Developer. All Rights Reserved.
23 * Christopher Seawood <cls@seawood.org>
24 * Chris Waterson <waterson@netscape.com>
25 * Benjamin Smedberg <bsmedberg@covad.net>
27 * Alternatively, the contents of this file may be used under the terms of
28 * either the GNU General Public License Version 2 or later (the "GPL"), or
29 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30 * in which case the provisions of the GPL or the LGPL are applicable instead
31 * of those above. If you wish to allow use of your version of this file only
32 * under the terms of either the GPL or the LGPL, and not to allow others to
33 * use your version of this file under the terms of the MPL, indicate your
34 * decision by deleting the provisions above and replace them with the notice
35 * and other provisions required by the GPL or the LGPL. If you do not delete
36 * the provisions above, a recipient may use your version of this file under
37 * the terms of any one of the MPL, the GPL or the LGPL.
39 * ***** END LICENSE BLOCK ***** */
41 #define XPCOM_TRANSLATE_NSGM_ENTRY_POINT 1
43 #include "nsIGenericFactory.h"
45 #include "nsStaticComponents.h"
48 #define NSGETMODULE(_name) _name##_NSGetModule
50 #ifdef MOZ_AUTH_EXTENSION
51 #define AUTH_MODULE MODULE(nsAuthModule)
56 #ifdef MOZ_PERMISSIONS
57 #define PERMISSIONS_MODULES \
58 MODULE(nsCookieModule) \
59 MODULE(nsPermissionsModule)
61 #define PERMISSIONS_MODULES
64 #ifdef MOZ_UNIVERSALCHARDET
65 #define UNIVERSALCHARDET_MODULE MODULE(nsUniversalCharDetModule)
67 #define UNIVERSALCHARDET_MODULE
71 #define MATHML_MODULES MODULE(nsUCvMathModule)
73 #define MATHML_MODULES
77 #define IPC_MODULE MODULE(ipcdclient)
82 #define GFX_MODULES MODULE(nsGfxModule)
85 # define WIDGET_MODULES MODULE(nsWidgetModule)
86 #elif defined(XP_MACOSX)
87 # define WIDGET_MODULES MODULE(nsWidgetMacModule)
88 #elif defined(XP_BEOS)
89 # define WIDGET_MODULES MODULE(nsWidgetBeOSModule)
91 # define WIDGET_MODULES MODULE(nsWidgetOS2Module)
92 #elif defined(MOZ_WIDGET_GTK2)
93 # define WIDGET_MODULES MODULE(nsWidgetGtk2Module)
94 #elif defined(MOZ_WIDGET_PHOTON)
95 # define WIDGET_MODULES MODULE(nsWidgetPhModule)
97 # error Unknown widget module.
101 #define ICON_MODULE MODULE(nsIconDecoderModule)
107 #define RDF_MODULE MODULE(nsRDFModule)
113 #define OJI_MODULES MODULE(nsCJVMManagerModule)
118 #ifdef MOZ_PLAINTEXT_EDITOR_ONLY
119 #define COMPOSER_MODULE
121 #define COMPOSER_MODULE MODULE(nsComposerModule)
125 #define ACCESS_MODULES MODULE(nsAccessibilityModule)
127 #define ACCESS_MODULES
130 #ifdef MOZ_ENABLE_XREMOTE
131 #define XREMOTE_MODULES MODULE(RemoteServiceModule)
133 #define XREMOTE_MODULES
136 #ifdef MOZ_ENABLE_GTK2
137 #ifdef MOZ_PREF_EXTENSIONS
138 #define SYSTEMPREF_MODULES MODULE(nsSystemPrefModule)
140 #define SYSTEMPREF_MODULES
143 #define SYSTEMPREF_MODULES
146 #ifdef MOZ_ENABLE_EXTENSION_LAYOUT_DEBUG
147 #define LAYOUT_DEBUG_MODULE MODULE(nsLayoutDebugModule)
149 #define LAYOUT_DEBUG_MODULE
153 #define PLUGINS_MODULES \
154 MODULE(nsPluginModule)
156 #define PLUGINS_MODULES
159 #ifdef MOZ_WEBSERVICES
160 #define WEBSERVICES_MODULES \
161 MODULE(nsWebServicesModule)
163 #define WEBSERVICES_MODULES
166 #ifdef MOZ_XPFE_COMPONENTS
168 #define RDFAPP_MODULES \
169 MODULE(nsXPIntlModule) \
170 MODULE(nsWindowDataSourceModule)
172 #define RDFAPP_MODULES
174 #define APPLICATION_MODULES \
175 MODULE(application) \
176 MODULE(nsFindComponent)
178 #define APPLICATION_MODULES
179 #define RDFAPP_MODULES
183 #define XPINSTALL_MODULES \
184 MODULE(nsSoftwareUpdate)
186 #define XPINSTALL_MODULES
189 #ifdef MOZ_JSDEBUGGER
190 #define JSDEBUGGER_MODULES \
191 MODULE(JavaScript_Debugger)
193 #define JSDEBUGGER_MODULES
196 #if defined(MOZ_FILEVIEW) && defined(MOZ_XPFE_COMPONENTS) && defined(MOZ_XUL)
197 #define FILEVIEW_MODULE MODULE(nsFileViewModule)
199 #define FILEVIEW_MODULE
203 #define STORAGE_MODULE MODULE(mozStorageModule)
205 #define STORAGE_MODULE
209 #define ZIPWRITER_MODULE MODULE(ZipWriterModule)
211 #define ZIPWRITER_MODULE
215 #define PLACES_MODULES \
216 MODULE(nsPlacesModule)
218 #if (defined(MOZ_MORK) && defined(MOZ_XUL))
219 #define PLACES_MODULES \
220 MODULE(nsMorkModule) \
221 MODULE(nsToolkitHistory)
223 #define PLACES_MODULES
228 #define XULENABLED_MODULES \
229 MODULE(tkAutoCompleteModule) \
233 #define XULENABLED_MODULES
236 #ifdef MOZ_SPELLCHECK
237 #define SPELLCHECK_MODULE MODULE(mozSpellCheckerModule)
239 #define SPELLCHECK_MODULE
243 #define XMLEXTRAS_MODULE MODULE(nsXMLExtrasModule)
245 #define XMLEXTRAS_MODULE
249 #ifdef MOZ_ENABLE_GTK2
250 #define UNIXPROXY_MODULE MODULE(nsUnixProxyModule)
253 #ifndef UNIXPROXY_MODULE
254 #define UNIXPROXY_MODULE
257 #if defined(XP_MACOSX)
258 #define OSXPROXY_MODULE MODULE(nsOSXProxyModule)
260 #define OSXPROXY_MODULE
263 #define XUL_MODULES \
266 MODULE(nsUConvModule) \
267 MODULE(nsI18nModule) \
268 MODULE(nsChardetModule) \
269 UNIVERSALCHARDET_MODULE \
271 PERMISSIONS_MODULES \
274 MODULE(nsJarModule) \
276 MODULE(nsPrefModule) \
277 MODULE(nsSecurityManagerModule) \
280 MODULE(nsParserModule) \
283 MODULE(nsImageLib2Module) \
286 MODULE(nsLayoutModule) \
287 WEBSERVICES_MODULES \
288 MODULE(docshell_provider) \
289 MODULE(embedcomponents) \
290 MODULE(Browser_Embedding_Module) \
294 MODULE(nsTransactionManagerModule) \
296 MODULE(nsChromeModule) \
297 APPLICATION_MODULES \
299 MODULE(CommandLineModule) \
304 MODULE(nsToolkitCompsModule) \
310 MODULE(nsAutoConfigModule) \
314 LAYOUT_DEBUG_MODULE \
319 #define MODULE(_name) \
320 NSGETMODULE_ENTRY_POINT(_name) (nsIComponentManager*, nsIFile*, nsIModule**);
326 #define MODULE(_name) { #_name, NSGETMODULE(_name) },
329 * The nsStaticModuleInfo
331 static nsStaticModuleInfo
const gStaticModuleInfo
[] = {
335 nsStaticModuleInfo
const *const kPStaticModules
= gStaticModuleInfo
;
336 PRUint32
const kStaticModuleCount
= NS_ARRAY_LENGTH(gStaticModuleInfo
);