VirtualBox

source: vbox/trunk/src/libs/xpcom18a4/xpcom/build/nsXPCOMPrivate.h

Last change on this file was 101861, checked in by vboxsync, 7 months ago

libs/xpcom: Get rid of unused NS_GetFrozenFunctions, bugref:10545

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.7 KB
Line 
1/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/* vim:set ts=4 sw=4 et cindent: */
3/* ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * The Original Code is mozilla.org code.
17 *
18 * The Initial Developer of the Original Code is
19 * Netscape Communications Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 1998
21 * the Initial Developer. All Rights Reserved.
22 *
23 * Contributor(s):
24 *
25 * Alternatively, the contents of this file may be used under the terms of
26 * either of the GNU General Public License Version 2 or later (the "GPL"),
27 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
36 *
37 * ***** END LICENSE BLOCK ***** */
38
39#ifndef nsXPComPrivate_h__
40#define nsXPComPrivate_h__
41
42#include "nscore.h"
43#include "nsXPCOM.h"
44
45class nsStringContainer;
46class nsCStringContainer;
47
48#ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
49#define NS_RegisterXPCOMExitRoutine VBoxNsxpNS_RegisterXPCOMExitRoutine
50#define NS_UnregisterXPCOMExitRoutine VBoxNsxpNS_UnregisterXPCOMExitRoutine
51#endif /* VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */
52
53/**
54 * Private Method to register an exit routine. This method
55 * allows you to setup a callback that will be called from
56 * the NS_ShutdownXPCOM function after all services and
57 * components have gone away.
58 *
59 * This API is for the exclusive use of the xpcom glue library.
60 *
61 * Note that these APIs are NOT threadsafe and must be called on the
62 * main thread.
63 *
64 * @status FROZEN
65 * @param exitRoutine pointer to user defined callback function
66 * of type XPCOMExitRoutine.
67 * @param priority higher priorities are called before lower
68 * priorities.
69 *
70 * @return NS_OK for success;
71 * other error codes indicate a failure.
72 *
73 */
74typedef NS_CALLBACK(XPCOMExitRoutine)(void);
75
76extern "C" NS_COM nsresult
77NS_RegisterXPCOMExitRoutine(XPCOMExitRoutine exitRoutine, PRUint32 priority);
78
79extern "C" NS_COM nsresult
80NS_UnregisterXPCOMExitRoutine(XPCOMExitRoutine exitRoutine);
81
82
83// think hard before changing this
84#define XPCOM_GLUE_VERSION 1
85
86
87/* XPCOM Specific Defines
88 *
89 * XPCOM_DLL - name of the loadable xpcom library on disk.
90 * XPCOM_SEARCH_KEY - name of the environment variable that can be
91 * modified to include additional search paths.
92 * GRE_CONF_NAME - Name of the GRE Configuration file
93 */
94
95#ifdef XPCOM_DLL_BASE
96#define XPCOM_DLL XPCOM_DLL_BASE MOZ_DLL_SUFFIX
97#endif
98
99#if defined(XP_WIN32) || defined(XP_OS2)
100
101#define XPCOM_SEARCH_KEY "PATH"
102#define GRE_CONF_NAME "gre.config"
103#define GRE_WIN_REG_LOC "Software\\mozilla.org\\GRE\\"
104#ifndef XPCOM_DLL
105#define XPCOM_DLL "xpcom"MOZ_DLL_SUFFIX
106#endif
107
108#elif defined(XP_BEOS)
109
110#define XPCOM_SEARCH_KEY "ADDON_PATH"
111#define GRE_CONF_NAME ".gre.config"
112#define GRE_CONF_PATH "/boot/home/config/settings/GRE/gre.conf"
113#ifndef XPCOM_DLL
114#define XPCOM_DLL "libxpcom"MOZ_DLL_SUFFIX
115#endif
116
117#else // Unix
118
119#ifndef XPCOM_DLL
120#define XPCOM_DLL "libxpcom"MOZ_DLL_SUFFIX
121#endif
122
123// you have to love apple..
124#ifdef XP_MACOSX
125#define XPCOM_SEARCH_KEY "DYLD_LIBRARY_PATH"
126#else
127#define XPCOM_SEARCH_KEY "LD_LIBRARY_PATH"
128#endif
129
130#define GRE_CONF_NAME ".gre.config"
131#define GRE_CONF_PATH "/etc/gre.conf"
132#define GRE_CONF_DIR "/etc/gre.d/"
133#endif
134
135#if defined(XP_WIN) || defined(XP_OS2)
136 #define XPCOM_FILE_PATH_SEPARATOR "\\"
137 #define XPCOM_ENV_PATH_SEPARATOR ";"
138#elif defined(XP_UNIX) || defined(XP_BEOS)
139 #define XPCOM_FILE_PATH_SEPARATOR "/"
140 #define XPCOM_ENV_PATH_SEPARATOR ":"
141#else
142 #error need_to_define_your_file_path_separator_and_illegal_characters
143#endif
144
145#endif
146
147
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use