Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIComponentRegistrar Interface Reference

import "nsIComponentRegistrar.idl";

Inheritance diagram for nsIComponentRegistrar:
Inheritance graph
[legend]
Collaboration diagram for nsIComponentRegistrar:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void autoRegister (in nsIFile aSpec)
 autoRegister
void autoUnregister (in nsIFile aSpec)
 autoUnregister
void registerFactory (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFactory aFactory)
 registerFactory
void unregisterFactory (in nsCIDRef aClass, in nsIFactory aFactory)
 unregisterFactory
void registerFactoryLocation (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFile aFile, in string aLoaderStr, in string aType)
 registerFactoryLocation
void unregisterFactoryLocation (in nsCIDRef aClass, in nsIFile aFile)
 unregisterFactoryLocation
boolean isCIDRegistered (in nsCIDRef aClass)
 isCIDRegistered
boolean isContractIDRegistered (in string aContractID)
 isContractIDRegistered
nsISimpleEnumerator enumerateCIDs ()
 enumerateCIDs
nsISimpleEnumerator enumerateContractIDs ()
 enumerateContractIDs
string CIDToContractID (in nsCIDRef aClass)
 CIDToContractID.
nsCIDPtr contractIDToCID (in string aContractID)
 contractIDToCID

Detailed Description

Definition at line 48 of file nsIComponentRegistrar.idl.


Member Function Documentation

autoRegister

Register a component file or all component files in a directory.

Component files must have an associated loader and export the required symbols which this loader defines. For example, if the given file is a native library (which is built into XPCOM), it must export the symbol "NSGetModule". Other loaders may have different semantics.

This method may only be called from the main thread.

Parameters:
aSpec: Filename spec for component file's location. If aSpec is a directory, then every component file in the directory will be registered. If the aSpec is null, then the application component's directory as defined by NS_XPCOM_COMPONENT_DIR will be registered (see nsIDirectoryService.idl)
Returns:
NS_OK : Registration was successful. NS_ERROR: Method failure.

autoUnregister

Unregister a component file or all component files in a directory. This method may only be called from the main thread.

Parameters:
aSpec: Filename spec for component file's location. If aSpec is a directory, the every component file in the directory will be registered. If aSpec is null, then the application component's directory as defined by NS_XPCOM_COMPONENT_DIR will be registered. (see nsIDirectoryService.idl)
Returns:
NS_OK Unregistration was successful. NS_ERROR* Method failure.

CIDToContractID.

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

Returns:
: Contract ID.

contractIDToCID

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

Returns:
: Contract ID.

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

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.

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

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.
void nsIComponentRegistrar::registerFactory ( in nsCIDRef  aClass,
in string  aClassName,
in string  aContractID,
in nsIFactory  aFactory 
)

registerFactory

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

Parameters:
aClass: CID of object
aClassName: Class Name of CID
aContractID: ContractID associated with CID aClass
aFactory: Factory that will be registered for CID aClass
Returns:
NS_OK Registration was successful. NS_ERROR* method failure.
void nsIComponentRegistrar::registerFactoryLocation ( in nsCIDRef  aClass,
in string  aClassName,
in string  aContractID,
in nsIFile  aFile,
in string  aLoaderStr,
in string  aType 
)

registerFactoryLocation

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

Parameters:
aClass: CID of object
aClassName: Class Name of CID
aContractID: ContractID associated with CID aClass
aFile: Component File. This file must have an associated loader and export the required symbols which this loader specifies.
aLoaderStr: Opaque loader specific string. This value is passed into the nsIModule's registerSelf callback and must be fowarded unmodified when registering factories via their location.
aType: Component Type of CID aClass. This value is passed into the nsIModule's registerSelf callback and must be fowarded unmodified when registering factories via their location.
Returns:
NS_OK Registration was successful. NS_ERROR* Method failure.
void nsIComponentRegistrar::unregisterFactory ( in nsCIDRef  aClass,
in nsIFactory  aFactory 
)

unregisterFactory

Unregister a factory associated with CID aClass.

Parameters:
aClass: CID being unregistered
aFactory: Factory previously registered to create instances of CID aClass.
Returns:
NS_OK Unregistration was successful. NS_ERROR* Method failure.

unregisterFactoryLocation

Unregister a factory associated with CID aClass.

Parameters:
aClass: CID being unregistered
aFile: Component File previously registered
Returns:
NS_OK Unregistration was successful. NS_ERROR* Method failure.

The documentation for this interface was generated from the following file: