nsIComponentRegistrar

Methods

autoRegister(aSpec)

autoRegister

Register a .manifest file, or an entire directory containing
these files. Registration lasts for this run only, and is not cached.

@note Formerly this method would register component files directly. This
is no longer supported.

autoUnregister(aSpec)

autoUnregister
@status OBSOLETE: This method is no longer implemented, but preserved
in this interface for binary compatibility with
Mozilla 1.9.2.

registerFactory(aClass, aClassName, aContractID, aFactory)

registerFactory

Register a factory with a given ContractID, CID and Class Name.

Parameters

aClass : CID of object
aClassName : Class Name of CID (unused)
aContractID : ContractID associated with CID aClass. May be null if no contract ID is needed.
aFactory : Factory that will be registered for CID aClass. If aFactory is null, the contract will be associated with a previously registered CID.

unregisterFactory(aClass, aFactory)

unregisterFactory

Unregister a factory associated with CID aClass.

@throws NS_ERROR* Method failure.

Parameters

aClass : CID being unregistered
aFactory : Factory previously registered to create instances of CID aClass.

registerFactoryLocation(aClass, aClassName, aContractID, aFile, aLoaderStr, aType)

registerFactoryLocation
@status OBSOLETE: This method is no longer implemented, but preserved
in this interface for binary compatibility with
Mozilla 1.9.2.

unregisterFactoryLocation(aClass, aFile)

unregisterFactoryLocation
@status OBSOLETE: This method is no longer implemented, but preserved
in this interface for binary compatibility with
Mozilla 1.9.2.

isCIDRegistered(aClass)

isCIDRegistered

Returns true if a factory is registered for the CID.

Parameters

aClass : CID queried for registeration

Returns

: true if a factory is registered for CID false otherwise.

isContractIDRegistered(aContractID)

isContractIDRegistered

Returns true if a factory is registered for the contract id.

Parameters

aClass : contract id queried for registeration

Returns

: true if a factory is registered for contract id false otherwise.

enumerateCIDs()

enumerateCIDs

Enumerate the list of all registered CIDs.

Returns

: enumerator for CIDs. Elements of the enumeration can be QI'ed for the nsISupportsID interface. From the nsISupportsID, you can obtain the actual CID.

enumerateContractIDs()

enumerateContractIDs

Enumerate the list of all registered ContractIDs.

Returns

: enumerator for ContractIDs. Elements of the enumeration can be QI'ed for the nsISupportsCString interface. From the nsISupportsCString interface, you can obtain the actual Contract ID string.

CIDToContractID(aClass)

CIDToContractID
@status OBSOLETE: This method is no longer implemented, but preserved
in this interface for binary compatibility with
Mozilla 1.9.2.

contractIDToCID(aContractID)

contractIDToCID

Returns the CID for a given Contract ID, if one exists and is registered.

Returns

: Contract ID.