2015-04-09 20:25:05 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2001-10-16 07:35:52 +04:00
|
|
|
|
2002-03-22 02:43:21 +03:00
|
|
|
#ifndef nsXPCOM_h__
|
|
|
|
#define nsXPCOM_h__
|
2001-10-16 07:35:52 +04:00
|
|
|
|
|
|
|
#include "nscore.h"
|
2002-09-04 03:41:27 +04:00
|
|
|
#include "nsXPCOMCID.h"
|
2019-03-19 18:14:11 +03:00
|
|
|
#include "mozilla/Attributes.h"
|
2001-10-16 07:35:52 +04:00
|
|
|
|
2006-02-10 18:00:36 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
# define DECL_CLASS(c) class c
|
2009-05-07 00:46:04 +04:00
|
|
|
# define DECL_STRUCT(c) struct c
|
2006-02-10 18:00:36 +03:00
|
|
|
#else
|
|
|
|
# define DECL_CLASS(c) typedef struct c c
|
2009-05-07 00:46:04 +04:00
|
|
|
# define DECL_STRUCT(c) typedef struct c c
|
2006-02-10 18:00:36 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
DECL_CLASS(nsISupports);
|
|
|
|
DECL_CLASS(nsIModule);
|
|
|
|
DECL_CLASS(nsIComponentManager);
|
|
|
|
DECL_CLASS(nsIComponentRegistrar);
|
|
|
|
DECL_CLASS(nsIServiceManager);
|
|
|
|
DECL_CLASS(nsIFile);
|
|
|
|
DECL_CLASS(nsIDirectoryServiceProvider);
|
|
|
|
DECL_CLASS(nsIMemory);
|
2015-05-07 08:28:37 +03:00
|
|
|
DECL_CLASS(nsIDebug2);
|
2002-09-04 03:36:13 +04:00
|
|
|
|
2018-05-07 21:49:47 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern bool gXPCOMShuttingDown;
|
|
|
|
extern bool gXPCOMThreadsShutDown;
|
2020-04-29 00:18:19 +03:00
|
|
|
extern bool gXPCOMMainThreadEventsAreDoomed;
|
2018-05-07 21:49:47 +03:00
|
|
|
#endif
|
|
|
|
|
2010-06-10 22:11:11 +04:00
|
|
|
#ifdef __cplusplus
|
2017-08-17 02:48:52 +03:00
|
|
|
# include "nsStringFwd.h"
|
2010-06-10 22:11:11 +04:00
|
|
|
namespace mozilla {
|
|
|
|
struct Module;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace mozilla
|
2010-06-10 22:11:11 +04:00
|
|
|
#endif
|
2005-07-21 17:33:43 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialises XPCOM. You must call one of the NS_InitXPCOM methods
|
|
|
|
* before proceeding to use xpcom. The one exception is that you may
|
|
|
|
* call NS_NewLocalFile to create a nsIFile.
|
2014-08-13 22:45:37 +04:00
|
|
|
*
|
|
|
|
* @note Use <CODE>NS_NewLocalFile</CODE> or <CODE>NS_NewNativeLocalFile</CODE>
|
2002-06-11 23:26:04 +04:00
|
|
|
* to create the file object you supply as the bin directory path in this
|
2014-08-13 22:45:37 +04:00
|
|
|
* call. The function may be safely called before the rest of XPCOM or
|
2002-06-11 23:26:04 +04:00
|
|
|
* embedding has been initialised.
|
2001-10-16 07:35:52 +04:00
|
|
|
*
|
2014-08-13 22:45:37 +04:00
|
|
|
* @param aResult The service manager. You may pass null.
|
2001-10-16 07:35:52 +04:00
|
|
|
*
|
2014-08-13 22:45:37 +04:00
|
|
|
* @param aBinDirectory The directory containing the component
|
2001-10-16 07:35:52 +04:00
|
|
|
* registry and runtime libraries;
|
2012-07-30 18:20:58 +04:00
|
|
|
* or use <CODE>nullptr</CODE> to use the working
|
2001-10-16 07:35:52 +04:00
|
|
|
* directory.
|
|
|
|
*
|
2014-08-13 22:45:37 +04:00
|
|
|
* @param aAppFileLocationProvider The object to be used by Gecko that
|
|
|
|
* specifies to Gecko where to find profiles, the
|
|
|
|
* component registry preferences and so on; or use
|
2012-07-30 18:20:58 +04:00
|
|
|
* <CODE>nullptr</CODE> for the default behaviour.
|
2001-10-16 07:35:52 +04:00
|
|
|
*
|
2019-11-22 15:40:17 +03:00
|
|
|
* @param aInitJSContext Whether the nsXPCJSContext should be initialized at
|
|
|
|
* this point.
|
|
|
|
*
|
2001-10-16 07:35:52 +04:00
|
|
|
* @see NS_NewLocalFile
|
2012-06-06 06:08:30 +04:00
|
|
|
* @see nsIFile
|
2001-10-16 07:35:52 +04:00
|
|
|
* @see nsIDirectoryServiceProvider
|
|
|
|
*
|
|
|
|
* @return NS_OK for success;
|
2005-07-21 17:33:43 +04:00
|
|
|
* NS_ERROR_NOT_INITIALIZED if static globals were not initialized,
|
|
|
|
* which can happen if XPCOM is reloaded, but did not completly
|
|
|
|
* shutdown. Other error codes indicate a failure during
|
|
|
|
* initialisation.
|
2001-10-16 07:35:52 +04:00
|
|
|
*/
|
2005-11-08 21:17:49 +03:00
|
|
|
XPCOM_API(nsresult)
|
2019-03-15 09:38:09 +03:00
|
|
|
NS_InitXPCOM(nsIServiceManager** aResult, nsIFile* aBinDirectory,
|
2019-11-22 15:40:17 +03:00
|
|
|
nsIDirectoryServiceProvider* aAppFileLocationProvider,
|
|
|
|
bool aInitJSContext = true);
|
2005-07-21 17:33:43 +04:00
|
|
|
|
2016-08-23 08:57:36 +03:00
|
|
|
/**
|
|
|
|
* Initialize only minimal components of XPCOM. This ensures nsThreadManager,
|
|
|
|
* logging, and timers will work.
|
|
|
|
*/
|
|
|
|
XPCOM_API(nsresult)
|
|
|
|
NS_InitMinimalXPCOM();
|
|
|
|
|
2001-10-16 07:35:52 +04:00
|
|
|
/**
|
|
|
|
* Shutdown XPCOM. You must call this method after you are finished
|
2014-08-13 22:45:37 +04:00
|
|
|
* using xpcom.
|
2001-10-16 07:35:52 +04:00
|
|
|
*
|
2014-08-13 22:45:37 +04:00
|
|
|
* @param aServMgr The service manager which was returned by
|
2001-10-16 07:35:52 +04:00
|
|
|
* NS_InitXPCOM. This will release servMgr. You may pass null.
|
|
|
|
*
|
|
|
|
* @return NS_OK for success;
|
|
|
|
* other error codes indicate a failure during initialisation.
|
2019-03-19 18:14:11 +03:00
|
|
|
*
|
|
|
|
* MOZ_CAN_RUN_SCRIPT_BOUNDARY for now, but really it should maybe be
|
|
|
|
* MOZ_CAN_RUN_SCRIPT.
|
2001-10-16 07:35:52 +04:00
|
|
|
*/
|
2019-03-19 18:14:11 +03:00
|
|
|
XPCOM_API(MOZ_CAN_RUN_SCRIPT_BOUNDARY nsresult)
|
|
|
|
NS_ShutdownXPCOM(nsIServiceManager* aServMgr);
|
2001-10-16 07:35:52 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Public Method to access to the service manager.
|
2014-08-13 22:45:37 +04:00
|
|
|
*
|
|
|
|
* @param aResult Interface pointer to the service manager
|
2001-10-16 07:35:52 +04:00
|
|
|
*
|
|
|
|
* @return NS_OK for success;
|
|
|
|
* other error codes indicate a failure during initialisation.
|
|
|
|
*/
|
2014-08-13 22:45:37 +04:00
|
|
|
XPCOM_API(nsresult) NS_GetServiceManager(nsIServiceManager** aResult);
|
2001-10-16 07:35:52 +04:00
|
|
|
|
2001-12-19 03:12:41 +03:00
|
|
|
/**
|
|
|
|
* Public Method to access to the component manager.
|
2014-08-13 22:45:37 +04:00
|
|
|
*
|
|
|
|
* @param aResult Interface pointer to the service
|
2001-12-19 03:12:41 +03:00
|
|
|
*
|
|
|
|
* @return NS_OK for success;
|
|
|
|
* other error codes indicate a failure during initialisation.
|
|
|
|
*/
|
2014-08-13 22:45:37 +04:00
|
|
|
XPCOM_API(nsresult) NS_GetComponentManager(nsIComponentManager** aResult);
|
2001-12-19 03:12:41 +03:00
|
|
|
|
2002-01-30 00:22:13 +03:00
|
|
|
/**
|
|
|
|
* Public Method to access to the component registration manager.
|
2010-06-10 22:11:11 +04:00
|
|
|
*
|
2014-08-13 22:45:37 +04:00
|
|
|
* @param aResult Interface pointer to the service
|
2002-01-30 00:22:13 +03:00
|
|
|
*
|
|
|
|
* @return NS_OK for success;
|
|
|
|
* other error codes indicate a failure during initialisation.
|
|
|
|
*/
|
2014-08-13 22:45:37 +04:00
|
|
|
XPCOM_API(nsresult) NS_GetComponentRegistrar(nsIComponentRegistrar** aResult);
|
2002-01-30 00:22:13 +03:00
|
|
|
|
2001-12-07 22:54:16 +03:00
|
|
|
/**
|
|
|
|
* Public Method to access to the memory manager. See nsIMemory
|
2014-08-13 22:45:37 +04:00
|
|
|
*
|
|
|
|
* @param aResult Interface pointer to the memory manager
|
2001-12-07 22:54:16 +03:00
|
|
|
*
|
|
|
|
* @return NS_OK for success;
|
|
|
|
* other error codes indicate a failure during initialisation.
|
|
|
|
*/
|
2014-08-13 22:45:37 +04:00
|
|
|
XPCOM_API(nsresult) NS_GetMemoryManager(nsIMemory** aResult);
|
2001-12-07 22:54:16 +03:00
|
|
|
|
2002-06-11 23:26:04 +04:00
|
|
|
/**
|
2012-06-06 06:08:30 +04:00
|
|
|
* Public Method to create an instance of a nsIFile. This function
|
2005-07-21 17:33:43 +04:00
|
|
|
* may be called prior to NS_InitXPCOM.
|
2014-08-13 22:45:37 +04:00
|
|
|
*
|
|
|
|
* @param aPath
|
|
|
|
* A string which specifies a full file path to a
|
2002-06-11 23:26:04 +04:00
|
|
|
* location. Relative paths will be treated as an
|
2014-08-13 22:45:37 +04:00
|
|
|
* error (NS_ERROR_FILE_UNRECOGNIZED_PATH).
|
|
|
|
* |NS_NewNativeLocalFile|'s path must be in the
|
2002-06-11 23:26:04 +04:00
|
|
|
* filesystem charset.
|
2014-08-13 22:45:37 +04:00
|
|
|
* @param aFollowLinks
|
2002-06-11 23:26:04 +04:00
|
|
|
* This attribute will determine if the nsLocalFile will auto
|
|
|
|
* resolve symbolic links. By default, this value will be false
|
|
|
|
* on all non unix systems. On unix, this attribute is effectively
|
2014-08-13 22:45:37 +04:00
|
|
|
* a noop.
|
|
|
|
* @param aResult Interface pointer to a new instance of an nsIFile
|
2002-06-11 23:26:04 +04:00
|
|
|
*
|
|
|
|
* @return NS_OK for success;
|
|
|
|
* other error codes indicate a failure.
|
|
|
|
*/
|
|
|
|
|
2006-02-10 18:00:36 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
2014-08-13 22:45:37 +04:00
|
|
|
XPCOM_API(nsresult)
|
|
|
|
NS_NewLocalFile(const nsAString& aPath, bool aFollowLinks, nsIFile** aResult);
|
2002-06-11 23:26:04 +04:00
|
|
|
|
2014-08-13 22:45:37 +04:00
|
|
|
XPCOM_API(nsresult)
|
|
|
|
NS_NewNativeLocalFile(const nsACString& aPath, bool aFollowLinks,
|
|
|
|
nsIFile** aResult);
|
2002-06-11 23:26:04 +04:00
|
|
|
|
2017-01-21 09:48:56 +03:00
|
|
|
// Use NS_NewLocalFile if you already have a UTF-16 string.
|
|
|
|
// Otherwise non-ASCII paths will break on some platforms
|
|
|
|
// including Windows.
|
|
|
|
class NS_ConvertUTF16toUTF8;
|
|
|
|
nsresult NS_NewNativeLocalFile(const NS_ConvertUTF16toUTF8& aPath,
|
|
|
|
bool aFollowLinks, nsIFile** aResult) = delete;
|
|
|
|
|
2006-02-10 18:00:36 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Support for warnings, assertions, and debugging breaks.
|
|
|
|
*/
|
|
|
|
|
2014-08-13 22:45:37 +04:00
|
|
|
enum {
|
|
|
|
NS_DEBUG_WARNING = 0,
|
|
|
|
NS_DEBUG_ASSERTION = 1,
|
|
|
|
NS_DEBUG_BREAK = 2,
|
|
|
|
NS_DEBUG_ABORT = 3
|
2006-02-10 18:00:36 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Print a runtime assertion. This function is available in both debug and
|
|
|
|
* release builds.
|
2014-08-13 22:45:37 +04:00
|
|
|
*
|
2006-02-10 18:00:36 +03:00
|
|
|
* @note Based on the value of aSeverity and the XPCOM_DEBUG_BREAK
|
|
|
|
* environment variable, this function may cause the application to
|
|
|
|
* print the warning, print a stacktrace, break into a debugger, or abort
|
|
|
|
* immediately.
|
|
|
|
*
|
|
|
|
* @param aSeverity A NS_DEBUG_* value
|
|
|
|
* @param aStr A readable error message (ASCII, may be null)
|
|
|
|
* @param aExpr The expression evaluated (may be null)
|
|
|
|
* @param aFile The source file containing the assertion (may be null)
|
|
|
|
* @param aLine The source file line number (-1 indicates no line number)
|
|
|
|
*/
|
2014-08-13 22:45:37 +04:00
|
|
|
XPCOM_API(void)
|
|
|
|
NS_DebugBreak(uint32_t aSeverity, const char* aStr, const char* aExpr,
|
|
|
|
const char* aFile, int32_t aLine);
|
2006-02-10 18:00:36 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Perform a stack-walk to a debugging log under various
|
|
|
|
* circumstances. Used to aid debugging of leaked object graphs.
|
|
|
|
*
|
|
|
|
* The NS_Log* functions are available in both debug and release
|
|
|
|
* builds of XPCOM, but the output will be useless unless binary
|
|
|
|
* debugging symbols for all modules in the stacktrace are available.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* By default, refcount logging is enabled at NS_InitXPCOM and
|
|
|
|
* refcount statistics are printed at NS_ShutdownXPCOM. NS_LogInit and
|
|
|
|
* NS_LogTerm allow applications to enable logging earlier and delay
|
|
|
|
* printing of logging statistics. They should always be used as a
|
|
|
|
* matched pair.
|
|
|
|
*/
|
2014-08-13 22:45:37 +04:00
|
|
|
XPCOM_API(void) NS_LogInit();
|
2006-02-10 18:00:36 +03:00
|
|
|
|
2014-08-13 22:45:37 +04:00
|
|
|
XPCOM_API(void) NS_LogTerm();
|
2006-02-10 18:00:36 +03:00
|
|
|
|
2016-09-26 20:06:38 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
/**
|
|
|
|
* A helper class that calls NS_LogInit in its constructor and
|
|
|
|
* NS_LogTerm in its destructor.
|
|
|
|
*/
|
|
|
|
|
|
|
|
class ScopedLogging {
|
|
|
|
public:
|
|
|
|
ScopedLogging() { NS_LogInit(); }
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2016-09-26 20:06:38 +03:00
|
|
|
~ScopedLogging() { NS_LogTerm(); }
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2006-02-10 18:00:36 +03:00
|
|
|
/**
|
|
|
|
* Log construction and destruction of objects. Processing tools can use the
|
|
|
|
* stacktraces printed by these functions to identify objects that are being
|
|
|
|
* leaked.
|
|
|
|
*
|
|
|
|
* @param aPtr A pointer to the concrete object.
|
|
|
|
* @param aTypeName The class name of the type
|
|
|
|
* @param aInstanceSize The size of the type
|
|
|
|
*/
|
|
|
|
|
2014-08-13 22:45:37 +04:00
|
|
|
XPCOM_API(void)
|
|
|
|
NS_LogCtor(void* aPtr, const char* aTypeName, uint32_t aInstanceSize);
|
2006-02-10 18:00:36 +03:00
|
|
|
|
2014-08-13 22:45:37 +04:00
|
|
|
XPCOM_API(void)
|
|
|
|
NS_LogDtor(void* aPtr, const char* aTypeName, uint32_t aInstanceSize);
|
2006-02-10 18:00:36 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Log a stacktrace when an XPCOM object's refcount is incremented or
|
|
|
|
* decremented. Processing tools can use the stacktraces printed by these
|
|
|
|
* functions to identify objects that were leaked due to XPCOM references.
|
|
|
|
*
|
|
|
|
* @param aPtr A pointer to the concrete object
|
|
|
|
* @param aNewRefCnt The new reference count.
|
|
|
|
* @param aTypeName The class name of the type
|
|
|
|
* @param aInstanceSize The size of the type
|
|
|
|
*/
|
2014-08-13 22:45:37 +04:00
|
|
|
XPCOM_API(void)
|
|
|
|
NS_LogAddRef(void* aPtr, nsrefcnt aNewRefCnt, const char* aTypeName,
|
|
|
|
uint32_t aInstanceSize);
|
2006-02-10 18:00:36 +03:00
|
|
|
|
2014-08-13 22:45:37 +04:00
|
|
|
XPCOM_API(void)
|
|
|
|
NS_LogRelease(void* aPtr, nsrefcnt aNewRefCnt, const char* aTypeName);
|
2006-02-10 18:00:36 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Log reference counting performed by COMPtrs. Processing tools can
|
|
|
|
* use the stacktraces printed by these functions to simplify reports
|
|
|
|
* about leaked objects generated from the data printed by
|
|
|
|
* NS_LogAddRef/NS_LogRelease.
|
|
|
|
*
|
|
|
|
* @param aCOMPtr the address of the COMPtr holding a strong reference
|
|
|
|
* @param aObject the object being referenced by the COMPtr
|
|
|
|
*/
|
|
|
|
|
2014-08-13 22:45:37 +04:00
|
|
|
XPCOM_API(void) NS_LogCOMPtrAddRef(void* aCOMPtr, nsISupports* aObject);
|
2006-02-10 18:00:36 +03:00
|
|
|
|
2014-08-13 22:45:37 +04:00
|
|
|
XPCOM_API(void) NS_LogCOMPtrRelease(void* aCOMPtr, nsISupports* aObject);
|
2005-06-07 23:35:20 +04:00
|
|
|
|
2007-08-06 18:34:02 +04:00
|
|
|
/**
|
|
|
|
* The XPCOM cycle collector analyzes and breaks reference cycles between
|
|
|
|
* participating XPCOM objects. All objects in the cycle must implement
|
|
|
|
* nsCycleCollectionParticipant to break cycles correctly.
|
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
2012-08-24 20:50:06 +04:00
|
|
|
class nsCycleCollectionParticipant;
|
2013-07-09 21:30:58 +04:00
|
|
|
class nsCycleCollectingAutoRefCnt;
|
2012-08-24 20:50:06 +04:00
|
|
|
|
2014-08-13 22:45:37 +04:00
|
|
|
XPCOM_API(void)
|
|
|
|
NS_CycleCollectorSuspect3(void* aPtr, nsCycleCollectionParticipant* aCp,
|
|
|
|
nsCycleCollectingAutoRefCnt* aRefCnt,
|
|
|
|
bool* aShouldDelete);
|
2009-05-07 00:46:04 +04:00
|
|
|
|
2017-08-22 00:01:47 +03:00
|
|
|
XPCOM_API(void)
|
|
|
|
NS_CycleCollectorSuspectUsingNursery(void* aPtr,
|
|
|
|
nsCycleCollectionParticipant* aCp,
|
|
|
|
nsCycleCollectingAutoRefCnt* aRefCnt,
|
|
|
|
bool* aShouldDelete);
|
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
#endif
|
|
|
|
|
2005-06-07 23:35:20 +04:00
|
|
|
/**
|
|
|
|
* Categories (in the category manager service) used by XPCOM:
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A category which is read after component registration but before
|
|
|
|
* the "xpcom-startup" notifications. Each category entry is treated
|
|
|
|
* as the contract ID of a service which implements
|
|
|
|
* nsIDirectoryServiceProvider. Each directory service provider is
|
|
|
|
* installed in the global directory service.
|
|
|
|
*/
|
|
|
|
#define XPCOM_DIRECTORY_PROVIDER_CATEGORY "xpcom-directory-providers"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A category which is read after component registration but before
|
2005-07-21 17:33:43 +04:00
|
|
|
* NS_InitXPCOM returns. Each category entry is treated as the contractID of
|
2005-06-07 23:35:20 +04:00
|
|
|
* a service: each service is instantiated, and if it implements nsIObserver
|
|
|
|
* the nsIObserver.observe method is called with the "xpcom-startup" topic.
|
|
|
|
*/
|
|
|
|
#define NS_XPCOM_STARTUP_CATEGORY "xpcom-startup"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Observer topics (in the observer service) used by XPCOM:
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* At XPCOM startup after component registration is complete, the
|
|
|
|
* following topic is notified. In order to receive this notification,
|
|
|
|
* component must register their contract ID in the category manager,
|
|
|
|
*
|
|
|
|
* @see NS_XPCOM_STARTUP_CATEGORY
|
|
|
|
*/
|
|
|
|
#define NS_XPCOM_STARTUP_OBSERVER_ID "xpcom-startup"
|
|
|
|
|
2009-11-21 01:25:11 +03:00
|
|
|
/**
|
|
|
|
* At XPCOM shutdown, this topic is notified just before "xpcom-shutdown".
|
|
|
|
* Components should only use this to mark themselves as 'being destroyed'.
|
|
|
|
* Nothing should be dispatched to any event loop.
|
|
|
|
*/
|
|
|
|
#define NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID "xpcom-will-shutdown"
|
|
|
|
|
2005-06-07 23:35:20 +04:00
|
|
|
/**
|
|
|
|
* At XPCOM shutdown, this topic is notified. All components must
|
|
|
|
* release any interface references to objects in other modules when
|
|
|
|
* this topic is notified.
|
|
|
|
*/
|
|
|
|
#define NS_XPCOM_SHUTDOWN_OBSERVER_ID "xpcom-shutdown"
|
|
|
|
|
2005-06-18 01:07:47 +04:00
|
|
|
/**
|
|
|
|
* This topic is notified when an entry was added to a category in the
|
|
|
|
* category manager. The subject of the notification will be the name of
|
|
|
|
* the added entry as an nsISupportsCString, and the data will be the
|
2005-09-19 21:13:32 +04:00
|
|
|
* name of the category. The notification will occur on the main thread.
|
2005-06-18 01:07:47 +04:00
|
|
|
*/
|
|
|
|
#define NS_XPCOM_CATEGORY_ENTRY_ADDED_OBSERVER_ID "xpcom-category-entry-added"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This topic is notified when an entry was removed from a category in the
|
|
|
|
* category manager. The subject of the notification will be the name of
|
|
|
|
* the removed entry as an nsISupportsCString, and the data will be the
|
2005-09-19 21:13:32 +04:00
|
|
|
* name of the category. The notification will occur on the main thread.
|
2005-06-18 01:07:47 +04:00
|
|
|
*/
|
|
|
|
#define NS_XPCOM_CATEGORY_ENTRY_REMOVED_OBSERVER_ID \
|
|
|
|
"xpcom-category-entry-removed"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This topic is notified when an a category was cleared in the category
|
|
|
|
* manager. The subject of the notification will be the category manager,
|
|
|
|
* and the data will be the name of the cleared category.
|
2005-09-19 21:13:32 +04:00
|
|
|
* The notification will occur on the main thread.
|
2005-06-18 01:07:47 +04:00
|
|
|
*/
|
|
|
|
#define NS_XPCOM_CATEGORY_CLEARED_OBSERVER_ID "xpcom-category-cleared"
|
|
|
|
|
2015-05-07 08:28:37 +03:00
|
|
|
XPCOM_API(nsresult) NS_GetDebug(nsIDebug2** aResult);
|
2003-07-08 02:11:36 +04:00
|
|
|
|
2001-10-16 07:35:52 +04:00
|
|
|
#endif
|