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 *****
|
|
|
|
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
1999-03-09 12:44:27 +03:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* The contents of this file are subject to the Netscape 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/NPL/
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* 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
|
|
|
|
* either 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"),
|
|
|
|
* 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
|
|
|
|
* use your version of this file under the terms of the NPL, indicate your
|
|
|
|
* 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
|
|
|
|
* the terms of any one of the NPL, 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"
|
|
|
|
|
1999-09-01 01:40:21 +04:00
|
|
|
#include "nsIComponentLoader.h"
|
2003-10-31 23:50:22 +03:00
|
|
|
#include "xpcom-private.h"
|
1999-09-01 01:40:21 +04:00
|
|
|
#include "nsNativeComponentLoader.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"
|
2002-06-15 01:33:05 +04:00
|
|
|
#include "nsIComponentLoaderManager.h"
|
2003-06-18 15:26:27 +04:00
|
|
|
#include "nsCategoryManager.h"
|
2001-09-07 01:13:11 +04:00
|
|
|
#include "nsIServiceManager.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"
|
1999-11-10 03:28:34 +03:00
|
|
|
#include "nsXPIDLString.h"
|
2000-01-25 00:28:28 +03:00
|
|
|
#include "nsIFile.h"
|
2002-05-03 01:25:08 +04:00
|
|
|
#include "plarena.h"
|
1999-03-09 12:44:27 +03:00
|
|
|
|
|
|
|
class nsFactoryEntry;
|
|
|
|
class nsDll;
|
1999-07-31 09:55:26 +04:00
|
|
|
class nsIServiceManager;
|
1999-03-09 12:44:27 +03:00
|
|
|
|
|
|
|
|
2001-08-30 18:10:41 +04:00
|
|
|
// Predefined loader types. Do not change the numbers.
|
|
|
|
// NATIVE should be 0 as it is being used as the first array index.
|
|
|
|
#define NS_COMPONENT_TYPE_NATIVE 0
|
2001-09-07 01:13:11 +04:00
|
|
|
#define NS_COMPONENT_TYPE_FACTORY_ONLY -1
|
|
|
|
// this define means that the factory entry only has a ContractID
|
|
|
|
// to service mapping and has no cid mapping.
|
|
|
|
#define NS_COMPONENT_TYPE_SERVICE_ONLY -2
|
2001-08-30 18:10:41 +04:00
|
|
|
|
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 {
|
|
|
|
nsIComponentLoader *loader;
|
|
|
|
const char *type;
|
|
|
|
};
|
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,
|
2002-06-15 01:33:05 +04:00
|
|
|
public nsIComponentLoaderManager,
|
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.
|
|
|
|
// the only fuction that is shared is UnregisterFactory
|
|
|
|
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);
|
|
|
|
|
|
|
|
NS_DECL_NSISERVICEMANAGER
|
|
|
|
NS_DECL_NSISERVICEMANAGEROBSOLETE
|
2002-06-15 01:33:05 +04:00
|
|
|
NS_DECL_NSICOMPONENTLOADERMANAGER
|
2001-09-07 01:13:11 +04:00
|
|
|
|
1999-03-10 12:53:25 +03:00
|
|
|
// nsComponentManagerImpl methods:
|
|
|
|
nsComponentManagerImpl();
|
|
|
|
|
|
|
|
static nsComponentManagerImpl* gComponentManager;
|
|
|
|
nsresult Init(void);
|
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);
|
2001-08-30 18:10:41 +04:00
|
|
|
nsresult GetLoaderForType(int aType,
|
1999-09-01 01:40:21 +04:00
|
|
|
nsIComponentLoader **aLoader);
|
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);
|
|
|
|
nsFactoryEntry *GetFactoryEntry(const nsCID &aClass, nsIDKey &cidKey);
|
1999-04-03 00:28:22 +04:00
|
|
|
|
2000-01-25 00:28:28 +03:00
|
|
|
nsresult SyncComponentsInDir(PRInt32 when, nsIFile *dirSpec);
|
1999-03-10 12:53:25 +03:00
|
|
|
nsresult SelfRegisterDll(nsDll *dll);
|
|
|
|
nsresult SelfUnregisterDll(nsDll *dll);
|
2003-03-14 08:07:24 +03:00
|
|
|
nsresult HashContractID(const char *acontractID, PRUint32 aContractIDLen,
|
|
|
|
nsFactoryEntry *fe_ptr);
|
|
|
|
nsresult HashContractID(const char *acontractID, PRUint32 aContractIDLen,
|
|
|
|
const nsCID &aClass, nsFactoryEntry **fe_ptr = NULL);
|
|
|
|
nsresult HashContractID(const char *acontractID, PRUint32 aContractIDLen,
|
|
|
|
const nsCID &aClass, nsIDKey &cidKey, nsFactoryEntry **fe_ptr = NULL);
|
2002-01-30 00:22:13 +03:00
|
|
|
|
|
|
|
void DeleteContractIDEntriesByCID(const nsCID* aClass, const char*registryName);
|
|
|
|
void DeleteContractIDEntriesByCID(const nsCID* aClass, nsIFactory* factory);
|
|
|
|
|
1999-09-26 22:04:27 +04:00
|
|
|
nsresult UnloadLibraries(nsIServiceManager *servmgr, PRInt32 when);
|
2001-09-07 01:13:11 +04:00
|
|
|
|
2001-08-30 18:10:41 +04:00
|
|
|
// Convert a loader type string into an index into the loader data
|
|
|
|
// array. Empty loader types are converted to NATIVE. Returns -1 if
|
|
|
|
// loader type cannot be determined.
|
|
|
|
int GetLoaderType(const char *typeStr);
|
|
|
|
|
2004-03-10 09:40:36 +03:00
|
|
|
// Add a loader type if not already known. Out the typeIndex
|
|
|
|
// if the loader type is either added or already there;
|
|
|
|
// returns NS_OK or an error on failure.
|
|
|
|
nsresult AddLoaderType(const char *typeStr, int *typeIndex);
|
2001-08-30 18:10:41 +04:00
|
|
|
|
2003-01-29 01:07:53 +03:00
|
|
|
int GetLoaderCount() { return mNLoaderData + 1; }
|
|
|
|
|
|
|
|
// registers only the files in spec's location by loaders other than the
|
|
|
|
// native loader. This is an optimization method only.
|
|
|
|
nsresult AutoRegisterNonNativeComponents(nsIFile* spec);
|
|
|
|
|
2002-01-30 00:22:13 +03:00
|
|
|
nsresult AutoRegisterImpl(PRInt32 when, nsIFile *inDirSpec, PRBool fileIsCompDir=PR_TRUE);
|
2003-07-08 02:11:36 +04:00
|
|
|
nsresult RemoveEntries(nsIFile* file);
|
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
|
|
|
|
1999-09-01 01:40:21 +04:00
|
|
|
nsNativeComponentLoader *mNativeComponentLoader;
|
2003-03-05 06:22:12 +03:00
|
|
|
#ifdef ENABLE_STATIC_COMPONENT_LOADER
|
2001-06-21 00:21:49 +04:00
|
|
|
nsIComponentLoader *mStaticComponentLoader;
|
2003-03-05 06:22:12 +03:00
|
|
|
#endif
|
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
|
|
|
|
|
|
|
nsLoaderdata *mLoaderData;
|
|
|
|
int mNLoaderData;
|
|
|
|
int mMaxNLoaderData;
|
2002-05-03 01:25:08 +04:00
|
|
|
|
2002-06-15 01:33:05 +04:00
|
|
|
PRBool mRegistryDirty;
|
2003-03-05 06:22:12 +03:00
|
|
|
nsHashtable mAutoRegEntries;
|
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
|
|
|
|
|
|
|
#ifdef XPCOM_CHECK_PENDING_CIDS
|
|
|
|
nsresult AddPendingCID(const nsCID &aClass);
|
|
|
|
void RemovePendingCID(const nsCID &aClass);
|
|
|
|
|
|
|
|
nsVoidArray mPendingCIDs;
|
|
|
|
#endif
|
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
class nsFactoryEntry {
|
|
|
|
public:
|
2003-03-14 08:07:24 +03:00
|
|
|
nsFactoryEntry(const nsCID &aClass,
|
2003-05-14 02:50:03 +04:00
|
|
|
const char *location, PRUint32 locationlen, int aType, class nsFactoryEntry* parent = nsnull);
|
|
|
|
nsFactoryEntry(const nsCID &aClass, nsIFactory *aFactory, class nsFactoryEntry* parent = nsnull);
|
1999-03-10 12:53:25 +03:00
|
|
|
~nsFactoryEntry();
|
1999-03-09 12:44:27 +03:00
|
|
|
|
2001-08-30 18:10:41 +04:00
|
|
|
nsresult ReInit(const nsCID &aClass, const char *location, int aType);
|
2001-08-22 02:42:35 +04:00
|
|
|
|
1999-09-08 03:18:47 +04:00
|
|
|
nsresult GetFactory(nsIFactory **aFactory,
|
|
|
|
nsComponentManagerImpl * mgr) {
|
2003-05-14 02:50:03 +04:00
|
|
|
if (mFactory) {
|
|
|
|
*aFactory = mFactory.get();
|
1999-09-01 01:40:21 +04:00
|
|
|
NS_ADDREF(*aFactory);
|
|
|
|
return NS_OK;
|
|
|
|
}
|
1999-09-08 03:18:47 +04:00
|
|
|
|
2003-05-14 02:50:03 +04:00
|
|
|
if (mTypeIndex < 0)
|
2001-08-22 02:42:35 +04:00
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
|
1999-09-08 03:18:47 +04:00
|
|
|
nsresult rv;
|
2001-08-30 18:10:41 +04:00
|
|
|
nsCOMPtr<nsIComponentLoader> loader;
|
2003-05-14 02:50:03 +04:00
|
|
|
rv = mgr->GetLoaderForType(mTypeIndex, getter_AddRefs(loader));
|
2001-08-30 18:10:41 +04:00
|
|
|
if(NS_FAILED(rv))
|
|
|
|
return rv;
|
1999-09-09 04:48:30 +04:00
|
|
|
|
2003-05-14 02:50:03 +04:00
|
|
|
rv = loader->GetFactory(mCid, mLocation, mgr->mLoaderData[mTypeIndex].type, aFactory);
|
1999-09-01 01:40:21 +04:00
|
|
|
if (NS_SUCCEEDED(rv))
|
2003-05-14 02:50:03 +04:00
|
|
|
mFactory = do_QueryInterface(*aFactory);
|
1999-09-01 01:40:21 +04:00
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
2003-05-14 02:50:03 +04:00
|
|
|
nsCID mCid;
|
|
|
|
nsCOMPtr<nsIFactory> mFactory;
|
2001-10-23 06:28:12 +04:00
|
|
|
// This is an index into the mLoaderData array that holds the type string and the loader
|
2003-05-14 02:50:03 +04:00
|
|
|
int mTypeIndex;
|
2001-11-16 16:53:04 +03:00
|
|
|
nsCOMPtr<nsISupports> mServiceObject;
|
2003-05-14 02:50:03 +04:00
|
|
|
char* mLocation;
|
|
|
|
class 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
|
|
|
|
|
|
|
|
2002-06-15 01:33:05 +04:00
|
|
|
class AutoRegEntry
|
|
|
|
{
|
|
|
|
public:
|
2003-03-14 08:07:24 +03:00
|
|
|
AutoRegEntry(const nsACString& name, PRInt64* modDate);
|
2004-01-22 04:01:19 +03:00
|
|
|
~AutoRegEntry();
|
2002-06-15 01:33:05 +04:00
|
|
|
|
2003-03-14 08:07:24 +03:00
|
|
|
const nsDependentCString GetName()
|
|
|
|
{ return nsDependentCString(mName, mNameLen); }
|
2002-06-15 01:33:05 +04:00
|
|
|
PRInt64 GetDate() {return mModDate;}
|
|
|
|
void SetDate(PRInt64 *date) { mModDate = *date;}
|
|
|
|
PRBool Modified(PRInt64 *date);
|
2001-10-23 06:28:12 +04:00
|
|
|
|
2003-03-05 06:22:12 +03:00
|
|
|
// this is the optional field line in the compreg.dat.
|
|
|
|
// it must not contain any comma's and it must be null terminated.
|
|
|
|
char* GetOptionalData() {return mData;};
|
|
|
|
void SetOptionalData(const char* data);
|
|
|
|
|
2002-06-15 01:33:05 +04:00
|
|
|
private:
|
|
|
|
char* mName;
|
2003-03-14 08:07:24 +03:00
|
|
|
PRUint32 mNameLen;
|
2003-03-05 06:22:12 +03:00
|
|
|
char* mData;
|
2002-06-15 01:33:05 +04:00
|
|
|
PRInt64 mModDate;
|
|
|
|
};
|
1999-03-09 12:44:27 +03:00
|
|
|
#endif // nsComponentManager_h__
|
2002-06-15 01:33:05 +04:00
|
|
|
|