1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsXPCOMPrivate_h__
8 #define nsXPCOMPrivate_h__
12 #include "mozilla/Attributes.h"
15 * During this shutdown notification all threads which run XPCOM code must
18 #define NS_XPCOM_SHUTDOWN_THREADS_OBSERVER_ID "xpcom-shutdown-threads"
24 * Shutdown XPCOM. You must call this method after you are finished
27 * @param aServMgr The service manager which was returned by
28 * NS_InitXPCOM. This will release servMgr. You may pass null.
30 * @return NS_OK for success;
31 * other error codes indicate a failure during shutdown
35 nsresult
ShutdownXPCOM(nsIServiceManager
* aServMgr
);
37 void SetICUMemoryFunctions();
40 * C++ namespaced version of NS_LogTerm.
44 } // namespace mozilla
46 /* XPCOM Specific Defines
48 * XPCOM_DLL - name of the loadable xpcom library on disk.
49 * XUL_DLL - name of the loadable XUL library on disk
50 * XPCOM_SEARCH_KEY - name of the environment variable that can be
51 * modified to include additional search paths.
52 * GRE_CONF_NAME - Name of the GRE Configuration file
57 # define XPCOM_SEARCH_KEY "PATH"
58 # define GRE_CONF_NAME "gre.config"
59 # define GRE_WIN_REG_LOC L"Software\\mozilla.org\\GRE"
60 # define XPCOM_DLL XUL_DLL
61 # define LXPCOM_DLL LXUL_DLL
62 # define XUL_DLL "xul.dll"
63 # define LXUL_DLL L"xul.dll"
66 # include <limits.h> // for PATH_MAX
68 # define XPCOM_DLL XUL_DLL
70 // you have to love apple..
72 # define XPCOM_SEARCH_KEY "DYLD_LIBRARY_PATH"
73 # define GRE_FRAMEWORK_NAME "XUL.framework"
74 # define XUL_DLL "XUL"
76 # define XPCOM_SEARCH_KEY "LD_LIBRARY_PATH"
77 # define XUL_DLL "libxul" MOZ_DLL_SUFFIX
80 # define GRE_CONF_NAME ".gre.config"
81 # define GRE_CONF_PATH "/etc/gre.conf"
82 # define GRE_CONF_DIR "/etc/gre.d"
83 # define GRE_USER_CONF_DIR ".gre.d"
87 # define XPCOM_FILE_PATH_SEPARATOR "\\"
88 # define XPCOM_ENV_PATH_SEPARATOR ";"
89 #elif defined(XP_UNIX)
90 # define XPCOM_FILE_PATH_SEPARATOR "/"
91 # define XPCOM_ENV_PATH_SEPARATOR ":"
93 # error need_to_define_your_file_path_separator_and_illegal_characters
97 # include <sys/param.h>
102 # define MAXPATHLEN PATH_MAX
103 # elif defined(_MAX_PATH)
104 # define MAXPATHLEN _MAX_PATH
105 # elif defined(CCHMAXPATH)
106 # define MAXPATHLEN CCHMAXPATH
108 # define MAXPATHLEN 1024
112 // Needed by the IPC layer from off the main thread
113 extern char16_t
* gGREBinPath
;
119 * Clears service cache, sets gXPCOMShuttingDown
123 } // namespace services
124 } // namespace mozilla