michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /** michael@0: * The nsIComponentRegistrar interface. michael@0: */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIFile; michael@0: interface nsIFactory; michael@0: interface nsISimpleEnumerator; michael@0: michael@0: [scriptable, uuid(2417cbfe-65ad-48a6-b4b6-eb84db174392)] michael@0: interface nsIComponentRegistrar : nsISupports michael@0: { michael@0: /** michael@0: * autoRegister michael@0: * michael@0: * Register a .manifest file, or an entire directory containing michael@0: * these files. Registration lasts for this run only, and is not cached. michael@0: * michael@0: * @note Formerly this method would register component files directly. This michael@0: * is no longer supported. michael@0: */ michael@0: void autoRegister(in nsIFile aSpec); michael@0: michael@0: /** michael@0: * autoUnregister michael@0: * @status OBSOLETE: This method is no longer implemented, but preserved michael@0: * in this interface for binary compatibility with michael@0: * Mozilla 1.9.2. michael@0: */ michael@0: void autoUnregister(in nsIFile aSpec); michael@0: michael@0: michael@0: /** michael@0: * registerFactory michael@0: * michael@0: * Register a factory with a given ContractID, CID and Class Name. michael@0: * michael@0: * @param aClass : CID of object michael@0: * @param aClassName : Class Name of CID (unused) michael@0: * @param aContractID : ContractID associated with CID aClass. May be null michael@0: * if no contract ID is needed. michael@0: * @param aFactory : Factory that will be registered for CID aClass. michael@0: * If aFactory is null, the contract will be associated michael@0: * with a previously registered CID. michael@0: */ michael@0: void registerFactory(in nsCIDRef aClass, michael@0: in string aClassName, michael@0: in string aContractID, michael@0: in nsIFactory aFactory); michael@0: michael@0: /** michael@0: * unregisterFactory michael@0: * michael@0: * Unregister a factory associated with CID aClass. michael@0: * michael@0: * @param aClass : CID being unregistered michael@0: * @param aFactory : Factory previously registered to create instances of michael@0: * CID aClass. michael@0: * michael@0: * @throws NS_ERROR* Method failure. michael@0: */ michael@0: void unregisterFactory(in nsCIDRef aClass, michael@0: in nsIFactory aFactory); michael@0: michael@0: /** michael@0: * registerFactoryLocation michael@0: * @status OBSOLETE: This method is no longer implemented, but preserved michael@0: * in this interface for binary compatibility with michael@0: * Mozilla 1.9.2. michael@0: */ michael@0: void registerFactoryLocation(in nsCIDRef aClass, michael@0: in string aClassName, michael@0: in string aContractID, michael@0: in nsIFile aFile, michael@0: in string aLoaderStr, michael@0: in string aType); michael@0: michael@0: /** michael@0: * unregisterFactoryLocation michael@0: * @status OBSOLETE: This method is no longer implemented, but preserved michael@0: * in this interface for binary compatibility with michael@0: * Mozilla 1.9.2. michael@0: */ michael@0: void unregisterFactoryLocation(in nsCIDRef aClass, michael@0: in nsIFile aFile); michael@0: michael@0: /** michael@0: * isCIDRegistered michael@0: * michael@0: * Returns true if a factory is registered for the CID. michael@0: * michael@0: * @param aClass : CID queried for registeration michael@0: * @return : true if a factory is registered for CID michael@0: * false otherwise. michael@0: */ michael@0: boolean isCIDRegistered(in nsCIDRef aClass); michael@0: michael@0: /** michael@0: * isContractIDRegistered michael@0: * michael@0: * Returns true if a factory is registered for the contract id. michael@0: * michael@0: * @param aClass : contract id queried for registeration michael@0: * @return : true if a factory is registered for contract id michael@0: * false otherwise. michael@0: */ michael@0: boolean isContractIDRegistered(in string aContractID); michael@0: michael@0: /** michael@0: * enumerateCIDs michael@0: * michael@0: * Enumerate the list of all registered CIDs. michael@0: * michael@0: * @return : enumerator for CIDs. Elements of the enumeration can be QI'ed michael@0: * for the nsISupportsID interface. From the nsISupportsID, you michael@0: * can obtain the actual CID. michael@0: */ michael@0: nsISimpleEnumerator enumerateCIDs(); michael@0: michael@0: /** michael@0: * enumerateContractIDs michael@0: * michael@0: * Enumerate the list of all registered ContractIDs. michael@0: * michael@0: * @return : enumerator for ContractIDs. Elements of the enumeration can be michael@0: * QI'ed for the nsISupportsCString interface. From the michael@0: * nsISupportsCString interface, you can obtain the actual michael@0: * Contract ID string. michael@0: */ michael@0: nsISimpleEnumerator enumerateContractIDs(); michael@0: michael@0: /** michael@0: * CIDToContractID michael@0: * @status OBSOLETE: This method is no longer implemented, but preserved michael@0: * in this interface for binary compatibility with michael@0: * Mozilla 1.9.2. michael@0: */ michael@0: string CIDToContractID(in nsCIDRef aClass); michael@0: michael@0: /** michael@0: * contractIDToCID michael@0: * michael@0: * Returns the CID for a given Contract ID, if one exists and is registered. michael@0: * michael@0: * @return : Contract ID. michael@0: */ michael@0: nsCIDPtr contractIDToCID(in string aContractID); michael@0: }; michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: michael@0: