1999-03-10 12:53:25 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2001-09-29 00:14:13 +04:00
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2004-04-18 18:21:17 +04:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1999-03-09 12:44:27 +03:00
|
|
|
*
|
2004-04-18 18:21:17 +04:00
|
|
|
* The contents of this file are subject to the Mozilla 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/MPL/
|
2001-09-29 00:14:13 +04:00
|
|
|
*
|
|
|
|
* 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.
|
1999-03-09 12:44:27 +03:00
|
|
|
*
|
1999-11-06 06:43:54 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2004-04-18 18:21:17 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
2001-09-29 00:14:13 +04:00
|
|
|
* 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
|
2004-04-18 18:21:17 +04:00
|
|
|
* either of 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"),
|
2001-09-29 00:14:13 +04:00
|
|
|
* 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
|
2004-04-18 18:21:17 +04:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2001-09-29 00:14:13 +04:00
|
|
|
* 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
|
2004-04-18 18:21:17 +04:00
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
1999-11-06 06:43:54 +03:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* ***** END LICENSE BLOCK ***** */
|
1999-03-09 12:44:27 +03:00
|
|
|
|
|
|
|
#ifndef nsComponentManager_h__
|
|
|
|
#define nsComponentManager_h__
|
|
|
|
|
2001-10-16 07:35:52 +04:00
|
|
|
#include "nsXPCOM.h"
|
|
|
|
|
2003-10-31 23:50:22 +03:00
|
|
|
#include "xpcom-private.h"
|
1999-03-09 12:44:27 +03:00
|
|
|
#include "nsIComponentManager.h"
|
2002-01-30 00:22:13 +03:00
|
|
|
#include "nsIComponentRegistrar.h"
|
2001-12-19 03:12:41 +03:00
|
|
|
#include "nsIComponentManagerObsolete.h"
|
2003-06-18 15:26:27 +04:00
|
|
|
#include "nsCategoryManager.h"
|
2001-09-07 01:13:11 +04:00
|
|
|
#include "nsIServiceManager.h"
|
2005-12-13 20:55:43 +03:00
|
|
|
#include "nsILocalFile.h"
|
|
|
|
#include "nsIModule.h"
|
|
|
|
#include "nsIModuleLoader.h"
|
|
|
|
#include "nsStaticComponentLoader.h"
|
|
|
|
#include "nsNativeComponentLoader.h"
|
1999-09-01 01:40:21 +04:00
|
|
|
#include "nsIFactory.h"
|
2000-01-12 01:54:46 +03:00
|
|
|
#include "nsIInterfaceRequestor.h"
|
2001-09-06 01:28:38 +04:00
|
|
|
#include "nsIInterfaceRequestorUtils.h"
|
2001-10-23 06:28:12 +04:00
|
|
|
#include "pldhash.h"
|
1999-03-09 12:44:27 +03:00
|
|
|
#include "prtime.h"
|
1999-03-09 13:15:54 +03:00
|
|
|
#include "prmon.h"
|
1999-09-01 01:40:21 +04:00
|
|
|
#include "nsCOMPtr.h"
|
1999-10-16 01:14:43 +04:00
|
|
|
#include "nsWeakReference.h"
|
2000-01-25 00:28:28 +03:00
|
|
|
#include "nsIFile.h"
|
2002-05-03 01:25:08 +04:00
|
|
|
#include "plarena.h"
|
2005-12-13 20:55:43 +03:00
|
|
|
#include "nsCOMArray.h"
|
|
|
|
#include "nsDataHashtable.h"
|
|
|
|
#include "nsTArray.h"
|
1999-03-09 12:44:27 +03:00
|
|
|
|
2005-12-13 20:55:43 +03:00
|
|
|
struct nsFactoryEntry;
|
1999-07-31 09:55:26 +04:00
|
|
|
class nsIServiceManager;
|
2008-09-05 02:44:41 +04:00
|
|
|
struct PRThread;
|
1999-03-09 12:44:27 +03:00
|
|
|
|
2004-11-23 23:53:38 +03:00
|
|
|
#define NS_COMPONENTMANAGER_CID \
|
|
|
|
{ /* 91775d60-d5dc-11d2-92fb-00e09805570f */ \
|
|
|
|
0x91775d60, \
|
|
|
|
0xd5dc, \
|
|
|
|
0x11d2, \
|
|
|
|
{0x92, 0xfb, 0x00, 0xe0, 0x98, 0x05, 0x57, 0x0f} \
|
|
|
|
}
|
|
|
|
|
|
|
|
/* keys for registry use */
|
|
|
|
extern const char xpcomKeyName[];
|
|
|
|
extern const char xpcomComponentsKeyName[];
|
|
|
|
extern const char lastModValueName[];
|
|
|
|
extern const char fileSizeValueName[];
|
|
|
|
extern const char nativeComponentType[];
|
|
|
|
extern const char staticComponentType[];
|
1999-03-09 12:44:27 +03:00
|
|
|
|
2005-12-13 20:55:43 +03:00
|
|
|
typedef int LoaderType;
|
2001-08-30 18:10:41 +04:00
|
|
|
|
2005-12-13 20:55:43 +03:00
|
|
|
// Predefined loader types.
|
|
|
|
#define NS_LOADER_TYPE_NATIVE -1
|
|
|
|
#define NS_LOADER_TYPE_STATIC -2
|
|
|
|
#define NS_LOADER_TYPE_INVALID -3
|
2003-03-12 06:58:33 +03:00
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
#define XPCOM_CHECK_PENDING_CIDS
|
|
|
|
#endif
|
1999-03-09 12:44:27 +03:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2002-06-15 01:33:05 +04:00
|
|
|
// Array of Loaders and their type strings
|
|
|
|
struct nsLoaderdata {
|
2005-12-13 20:55:43 +03:00
|
|
|
nsCOMPtr<nsIModuleLoader> loader;
|
|
|
|
nsCString type;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Deferred modules are kept as a nsTArray of this type. This is not a nested
|
|
|
|
// class so that nsStaticComponentLoader.h can forward-declare it.
|
|
|
|
struct DeferredModule
|
|
|
|
{
|
|
|
|
DeferredModule() :
|
|
|
|
type(nsnull), modTime(0) { }
|
|
|
|
|
|
|
|
const char *type;
|
|
|
|
nsCOMPtr<nsILocalFile> file;
|
|
|
|
nsCString location;
|
|
|
|
nsCOMPtr<nsIModule> module;
|
|
|
|
PRInt64 modTime;
|
2002-06-15 01:33:05 +04:00
|
|
|
};
|
2001-12-19 03:12:41 +03:00
|
|
|
|
2000-01-12 01:54:46 +03:00
|
|
|
class nsComponentManagerImpl
|
2001-09-07 01:13:11 +04:00
|
|
|
: public nsIComponentManager,
|
|
|
|
public nsIServiceManager,
|
2002-01-30 00:22:13 +03:00
|
|
|
public nsIComponentRegistrar,
|
2001-09-07 01:13:11 +04:00
|
|
|
public nsSupportsWeakReference,
|
2001-10-17 03:39:20 +04:00
|
|
|
public nsIInterfaceRequestor,
|
2001-12-19 03:12:41 +03:00
|
|
|
public nsIServiceManagerObsolete,
|
|
|
|
public nsIComponentManagerObsolete
|
2001-10-17 03:39:20 +04:00
|
|
|
{
|
1999-03-09 12:44:27 +03:00
|
|
|
public:
|
1999-03-10 12:53:25 +03:00
|
|
|
NS_DECL_ISUPPORTS
|
2000-01-12 01:54:46 +03:00
|
|
|
NS_DECL_NSIINTERFACEREQUESTOR
|
2001-12-19 03:12:41 +03:00
|
|
|
// Since the nsIComponentManagerObsolete and nsIComponentManager share some of the
|
2002-01-30 00:22:13 +03:00
|
|
|
// same interface function names, we have to manually define the functions here.
|
2001-12-19 03:12:41 +03:00
|
|
|
// The only function that is in nsIComponentManagerObsolete and is in nsIComponentManager
|
|
|
|
// is GetClassObjectContractID.
|
|
|
|
//
|
|
|
|
// nsIComponentManager function not in nsIComponentManagerObsolete:
|
|
|
|
NS_IMETHOD GetClassObjectByContractID(const char *aContractID,
|
|
|
|
const nsIID &aIID,
|
|
|
|
void **_retval);
|
|
|
|
|
2001-10-17 03:39:20 +04:00
|
|
|
|
2002-01-30 00:22:13 +03:00
|
|
|
NS_DECL_NSICOMPONENTMANAGEROBSOLETE
|
2001-10-17 03:39:20 +04:00
|
|
|
|
2002-01-30 00:22:13 +03:00
|
|
|
// Since the nsIComponentManagerObsolete and nsIComponentRegistrar share some of the
|
|
|
|
// same interface function names, we have to manually define the functions here.
|
2004-04-18 21:35:29 +04:00
|
|
|
// the only function that is shared is UnregisterFactory
|
2002-01-30 00:22:13 +03:00
|
|
|
NS_IMETHOD AutoRegister(nsIFile *aSpec);
|
|
|
|
NS_IMETHOD AutoUnregister(nsIFile *aSpec);
|
|
|
|
NS_IMETHOD RegisterFactory(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFactory *aFactory);
|
|
|
|
// NS_IMETHOD UnregisterFactory(const nsCID & aClass, nsIFactory *aFactory);
|
|
|
|
NS_IMETHOD RegisterFactoryLocation(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aFile, const char *loaderStr, const char *aType);
|
|
|
|
NS_IMETHOD UnregisterFactoryLocation(const nsCID & aClass, nsIFile *aFile);
|
|
|
|
NS_IMETHOD IsCIDRegistered(const nsCID & aClass, PRBool *_retval);
|
|
|
|
NS_IMETHOD IsContractIDRegistered(const char *aClass, PRBool *_retval);
|
|
|
|
NS_IMETHOD EnumerateCIDs(nsISimpleEnumerator **_retval);
|
|
|
|
NS_IMETHOD EnumerateContractIDs(nsISimpleEnumerator **_retval);
|
|
|
|
NS_IMETHOD CIDToContractID(const nsCID & aClass, char **_retval);
|
|
|
|
NS_IMETHOD ContractIDToCID(const char *aContractID, nsCID * *_retval);
|
|
|
|
|
2005-12-13 20:55:43 +03:00
|
|
|
nsresult RegistryLocationForFile(nsIFile* aFile,
|
|
|
|
nsCString& aResult);
|
|
|
|
nsresult FileForRegistryLocation(const nsCString &aLocation,
|
|
|
|
nsILocalFile **aSpec);
|
|
|
|
|
2002-01-30 00:22:13 +03:00
|
|
|
NS_DECL_NSISERVICEMANAGER
|
|
|
|
NS_DECL_NSISERVICEMANAGEROBSOLETE
|
2001-09-07 01:13:11 +04:00
|
|
|
|
1999-03-10 12:53:25 +03:00
|
|
|
// nsComponentManagerImpl methods:
|
|
|
|
nsComponentManagerImpl();
|
|
|
|
|
|
|
|
static nsComponentManagerImpl* gComponentManager;
|
2005-07-21 17:33:43 +04:00
|
|
|
nsresult Init(nsStaticModuleInfo const *aStaticModules,
|
|
|
|
PRUint32 aStaticModuleCount);
|
2005-12-13 20:55:43 +03:00
|
|
|
// NOTE: XPCOM initialization must call either ReadPersistentRegistry or
|
|
|
|
// AutoRegister to fully initialize the nsComponentManagerImpl.
|
2002-06-15 01:33:05 +04:00
|
|
|
|
|
|
|
nsresult WritePersistentRegistry();
|
|
|
|
nsresult ReadPersistentRegistry();
|
|
|
|
|
1999-10-22 01:34:39 +04:00
|
|
|
nsresult Shutdown(void);
|
1999-03-09 12:44:27 +03:00
|
|
|
|
2001-10-16 07:35:52 +04:00
|
|
|
nsresult FreeServices();
|
|
|
|
|
2003-07-08 02:11:36 +04:00
|
|
|
nsresult
|
2001-09-25 04:38:44 +04:00
|
|
|
NS_GetService(const char *aContractID, const nsIID& aIID, PRBool aDontCreate, nsISupports** result);
|
2001-10-16 07:35:52 +04:00
|
|
|
|
1999-09-01 01:40:21 +04:00
|
|
|
nsresult RegisterComponentCommon(const nsCID &aClass,
|
|
|
|
const char *aClassName,
|
2000-09-14 03:57:52 +04:00
|
|
|
const char *aContractID,
|
2003-03-14 08:07:24 +03:00
|
|
|
PRUint32 aContractIDLen,
|
1999-11-19 05:14:23 +03:00
|
|
|
const char *aRegistryName,
|
2003-03-14 08:07:24 +03:00
|
|
|
PRUint32 aRegistryNameLen,
|
1999-09-01 01:40:21 +04:00
|
|
|
PRBool aReplace, PRBool aPersist,
|
|
|
|
const char *aType);
|
2005-12-13 20:55:43 +03:00
|
|
|
// Convert a loader type string into an index into the loader data
|
|
|
|
// array. Empty loader types are converted to NATIVE. Returns
|
|
|
|
// NS_LOADER_TYPE_INVALID if loader type cannot be determined.
|
|
|
|
LoaderType GetLoaderType(const char *typeStr);
|
|
|
|
LoaderType AddLoaderType(const char *typeStr);
|
|
|
|
const char* StringForLoaderType(LoaderType aType) {
|
|
|
|
return mLoaderData[aType].type.get();
|
|
|
|
}
|
|
|
|
nsIModuleLoader* LoaderForType(LoaderType aType);
|
|
|
|
int GetLoaderCount() { return mLoaderData.Length(); }
|
|
|
|
void GetAllLoaders();
|
|
|
|
|
2003-03-14 08:07:24 +03:00
|
|
|
nsresult FindFactory(const char *contractID, PRUint32 aContractIDLen, nsIFactory **aFactory) ;
|
1999-03-10 12:53:25 +03:00
|
|
|
nsresult LoadFactory(nsFactoryEntry *aEntry, nsIFactory **aFactory);
|
2001-08-22 02:42:35 +04:00
|
|
|
|
2003-03-14 08:07:24 +03:00
|
|
|
nsFactoryEntry *GetFactoryEntry(const char *aContractID,
|
|
|
|
PRUint32 aContractIDLen);
|
2002-06-15 01:33:05 +04:00
|
|
|
nsFactoryEntry *GetFactoryEntry(const nsCID &aClass);
|
1999-04-03 00:28:22 +04:00
|
|
|
|
2000-01-25 00:28:28 +03:00
|
|
|
nsresult SyncComponentsInDir(PRInt32 when, nsIFile *dirSpec);
|
2009-01-08 11:41:55 +03:00
|
|
|
|
|
|
|
// NOTE: HashContractID operates on the hash table with ContractIDs,
|
|
|
|
// for thread-safety it should only be invoked from inside mMon.
|
2003-03-14 08:07:24 +03:00
|
|
|
nsresult HashContractID(const char *acontractID, PRUint32 aContractIDLen,
|
|
|
|
nsFactoryEntry *fe_ptr);
|
2002-01-30 00:22:13 +03:00
|
|
|
|
|
|
|
void DeleteContractIDEntriesByCID(const nsCID* aClass, nsIFactory* factory);
|
2005-12-13 20:55:43 +03:00
|
|
|
nsresult AutoRegisterImpl(nsIFile* inDirSpec,
|
|
|
|
nsCOMArray<nsILocalFile> &aLeftovers,
|
|
|
|
nsTArray<DeferredModule> &aDeferred);
|
|
|
|
nsresult AutoRegisterDirectory(nsIFile* aComponentFile,
|
|
|
|
nsCOMArray<nsILocalFile> &aLeftovers,
|
|
|
|
nsTArray<DeferredModule> &aDeferred);
|
2009-11-05 17:08:49 +03:00
|
|
|
nsresult AutoRegisterComponentsList(nsIFile* inDir,
|
|
|
|
PRFileDesc* fd,
|
|
|
|
nsCOMArray<nsILocalFile>& aLeftovers,
|
|
|
|
nsTArray<DeferredModule>& aDeferred);
|
2005-12-13 20:55:43 +03:00
|
|
|
nsresult AutoRegisterComponent(nsILocalFile* aComponentFile,
|
|
|
|
nsTArray<DeferredModule> &aDeferred,
|
|
|
|
LoaderType minLoader = NS_LOADER_TYPE_NATIVE);
|
|
|
|
void LoadLeftoverComponents(nsCOMArray<nsILocalFile> &aLeftovers,
|
|
|
|
nsTArray<DeferredModule> &aDeferred,
|
|
|
|
LoaderType minLoader);
|
|
|
|
|
|
|
|
void LoadDeferredModules(nsTArray<DeferredModule> &aDeferred);
|
2000-09-08 05:51:45 +04:00
|
|
|
|
2001-10-23 06:28:12 +04:00
|
|
|
PLDHashTable mFactories;
|
|
|
|
PLDHashTable mContractIDs;
|
1999-07-28 12:01:03 +04:00
|
|
|
PRMonitor* mMon;
|
2001-12-19 03:12:41 +03:00
|
|
|
|
2005-12-13 20:55:43 +03:00
|
|
|
nsNativeModuleLoader mNativeModuleLoader;
|
|
|
|
nsStaticModuleLoader mStaticModuleLoader;
|
2000-01-29 02:37:27 +03:00
|
|
|
nsCOMPtr<nsIFile> mComponentsDir;
|
2001-12-14 04:27:16 +03:00
|
|
|
PRInt32 mComponentsOffset;
|
2000-02-01 10:54:46 +03:00
|
|
|
|
2003-03-05 06:22:12 +03:00
|
|
|
nsCOMPtr<nsIFile> mGREComponentsDir;
|
|
|
|
PRInt32 mGREComponentsOffset;
|
|
|
|
|
2003-03-12 00:36:59 +03:00
|
|
|
nsCOMPtr<nsIFile> mRegistryFile;
|
|
|
|
|
1999-10-22 01:34:39 +04:00
|
|
|
// Shutdown
|
|
|
|
#define NS_SHUTDOWN_NEVERHAPPENED 0
|
|
|
|
#define NS_SHUTDOWN_INPROGRESS 1
|
|
|
|
#define NS_SHUTDOWN_COMPLETE 2
|
|
|
|
PRUint32 mShuttingDown;
|
2001-08-30 18:10:41 +04:00
|
|
|
|
2005-12-13 20:55:43 +03:00
|
|
|
nsTArray<nsLoaderdata> mLoaderData;
|
|
|
|
|
|
|
|
nsDataHashtable<nsHashableHashKey, PRInt64> mAutoRegEntries;
|
2002-05-03 01:25:08 +04:00
|
|
|
|
2002-06-15 01:33:05 +04:00
|
|
|
PRBool mRegistryDirty;
|
2003-06-18 15:26:27 +04:00
|
|
|
nsCOMPtr<nsCategoryManager> mCategoryManager;
|
2002-06-15 01:33:05 +04:00
|
|
|
|
2002-05-03 01:25:08 +04:00
|
|
|
PLArenaPool mArena;
|
2003-03-12 06:58:33 +03:00
|
|
|
|
2008-09-05 02:44:41 +04:00
|
|
|
struct PendingServiceInfo {
|
|
|
|
const nsCID* cid;
|
|
|
|
PRThread* thread;
|
|
|
|
};
|
2003-03-12 06:58:33 +03:00
|
|
|
|
2008-09-05 02:44:41 +04:00
|
|
|
inline PendingServiceInfo* AddPendingService(const nsCID& aServiceCID,
|
|
|
|
PRThread* aThread);
|
|
|
|
inline void RemovePendingService(const nsCID& aServiceCID);
|
|
|
|
inline PRThread* GetPendingServiceThread(const nsCID& aServiceCID) const;
|
|
|
|
|
|
|
|
nsTArray<PendingServiceInfo> mPendingServices;
|
2003-03-12 06:58:33 +03:00
|
|
|
|
2004-01-15 09:14:18 +03:00
|
|
|
private:
|
|
|
|
~nsComponentManagerImpl();
|
1999-03-09 12:44:27 +03:00
|
|
|
};
|
|
|
|
|
2001-09-07 01:13:11 +04:00
|
|
|
|
1999-03-09 12:44:27 +03:00
|
|
|
#define NS_MAX_FILENAME_LEN 1024
|
|
|
|
|
|
|
|
#define NS_ERROR_IS_DIR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCOM, 24)
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
/**
|
|
|
|
* Class: nsFactoryEntry()
|
|
|
|
*
|
|
|
|
* There are two types of FactoryEntries.
|
|
|
|
*
|
|
|
|
* 1. {CID, dll} mapping.
|
|
|
|
* Factory is a consequence of the dll. These can be either session
|
|
|
|
* specific or persistent based on whether we write this
|
|
|
|
* to the registry or not.
|
|
|
|
*
|
|
|
|
* 2. {CID, factory} mapping
|
|
|
|
* These are strictly session specific and in memory only.
|
|
|
|
*/
|
|
|
|
|
2005-12-13 20:55:43 +03:00
|
|
|
struct nsFactoryEntry {
|
|
|
|
nsFactoryEntry(const nsCID &aClass,
|
|
|
|
LoaderType aLoaderType,
|
|
|
|
const char *aLocationKey,
|
|
|
|
nsFactoryEntry *aParent = nsnull);
|
|
|
|
|
|
|
|
nsFactoryEntry(const nsCID &aClass,
|
|
|
|
nsIFactory *aFactory,
|
|
|
|
nsFactoryEntry *aParent = nsnull) :
|
|
|
|
mCid(aClass),
|
|
|
|
mLoaderType(NS_LOADER_TYPE_INVALID),
|
|
|
|
mFactory(aFactory),
|
|
|
|
mParent(aParent) {
|
|
|
|
mLocationKey = nsnull;
|
|
|
|
}
|
2005-12-03 18:27:17 +03:00
|
|
|
|
2005-12-13 20:55:43 +03:00
|
|
|
~nsFactoryEntry();
|
2005-12-03 18:27:17 +03:00
|
|
|
|
2005-12-13 20:55:43 +03:00
|
|
|
void ReInit(LoaderType aLoaderType,
|
|
|
|
const char *aLocationKey);
|
2005-12-03 18:27:17 +03:00
|
|
|
|
2005-12-13 20:55:43 +03:00
|
|
|
nsresult GetFactory(nsIFactory **aFactory);
|
1999-09-01 01:40:21 +04:00
|
|
|
|
2005-12-13 20:55:43 +03:00
|
|
|
nsCID mCid;
|
|
|
|
LoaderType mLoaderType;
|
|
|
|
const char *mLocationKey;
|
|
|
|
nsCOMPtr<nsIFactory> mFactory;
|
|
|
|
nsCOMPtr<nsISupports> mServiceObject;
|
|
|
|
nsFactoryEntry *mParent;
|
1999-03-09 12:44:27 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2001-10-23 06:28:12 +04:00
|
|
|
struct nsFactoryTableEntry : public PLDHashEntryHdr {
|
|
|
|
nsFactoryEntry *mFactoryEntry;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct nsContractIDTableEntry : public PLDHashEntryHdr {
|
|
|
|
char *mContractID;
|
2003-03-14 08:07:24 +03:00
|
|
|
PRUint32 mContractIDLen;
|
2001-10-23 06:28:12 +04:00
|
|
|
nsFactoryEntry *mFactoryEntry;
|
|
|
|
};
|
2003-03-12 06:58:33 +03:00
|
|
|
|
1999-03-09 12:44:27 +03:00
|
|
|
#endif // nsComponentManager_h__
|
2002-06-15 01:33:05 +04:00
|
|
|
|