nsIComponentManagerObsolete

IID:8458a740-d5dc-11d2-92fb-00e09805570f
Inherits From:nsISupports

Constants

ID values for 'when'
PRInt32 NS_Startup = 0
PRInt32 NS_Script = 1
PRInt32 NS_Timer = 2
PRInt32 NS_Shutdown = 3

Methods

void autoRegister ( PRInt32 when , nsIFile directory ) void autoRegisterComponent ( PRInt32 when , nsIFile fileLocation ) void autoUnregisterComponent ( PRInt32 when , nsIFile fileLocation ) char* CLSIDToContractID ( nsCIDRef class , out char* className ) [notxpcom] nsresult contractIDToClassID ( char* contractID , out nsCID class ) [noscript] voidPtr* createInstance ( nsCIDRef class , nsISupports delegate , nsIIDRef IID ) [noscript] voidPtr* createInstanceByContractID ( char* contractID , nsISupports delegate , nsIIDRef IID ) nsIEnumerator enumerateCLSIDs ( ) nsIEnumerator enumerateContractIDs ( ) nsIFactory findFactory ( nsCIDRef class ) void freeLibraries ( ) [noscript] voidPtr* getClassObject ( nsCIDRef class , nsIIDRef IID ) PRBool isRegistered ( nsCIDRef class ) void registerComponent ( nsCIDRef class , char* className , char* contractID , char* location , PRBool replace , PRBool persist ) void registerComponentLib ( nsCIDRef class , char* className , char* contractID , char* dllName , PRBool replace , PRBool persist ) void registerComponentSpec ( nsCIDRef class , char* className , char* contractID , nsIFile library , PRBool replace , PRBool persist ) void registerComponentWithType ( nsCIDRef class , char* className , char* contractID , nsIFile spec , char* location , PRBool replace , PRBool persist , char* type ) void registerFactory ( nsCIDRef class , char* className , char* contractID , nsIFactory factory , PRBool replace ) char* registryLocationForSpec ( nsIFile spec ) nsIFile specForRegistryLocation ( char* location ) void unregisterComponent ( nsCIDRef class , char* location ) void unregisterComponentSpec ( nsCIDRef class , nsIFile librarySpec ) void unregisterFactory ( nsCIDRef class , nsIFactory factory )

void autoRegister ( PRInt32 when , nsIFile directory )

Enumerates directory looking for modules of all types and registers modules who have changed (modtime or size) since the last time autoRegister() was invoked.

Arguments:
when: : ID values of when the call is being made.
directory: : Directory the will be enumerated.

void autoRegisterComponent ( PRInt32 when , nsIFile fileLocation )

Loads module using appropriate loader and gives it an opportunity to register its CIDs if module's modtime or size changed since the last time this was called.

Arguments:
when: : ID values of when the call is being made.
fileLocation: : File specification of module.

void autoUnregisterComponent ( PRInt32 when , nsIFile fileLocation )

Loads module using approriate loader and gives it an opportunity to unregister its CIDs

Arguments:
when
fileLocation

char* CLSIDToContractID ( nsCIDRef class , out char* className )

ClassIDToContractid

Get the ContractID for a given ClassID. A ClassIDs may implement multiple ContractIDs. This function return the last registered ContractID.

Arguments:
class: : ClassID for which ContractID is requested.
className
Returns:
: ContractID last registered for aClass

[notxpcom] nsresult contractIDToClassID ( char* contractID , out nsCID class )

Get the ClassID for a given ContractID. Many ClassIDs may implement a ContractID. In such a situation, this returns the preferred ClassID, which happens to be the last registered ClassID.

Arguments:
contractID: : Contractid for which ClassID is requested
class
Returns:
aClass : ClassID return

voidPtr* createInstance ( nsCIDRef class , nsISupports delegate , nsIIDRef IID )

Create an instance of the CID class and return the interface iID.

Arguments:
class: : ClassID of object instance requested
delegate: : Used for aggregation
IID: : IID of interface requested

voidPtr* createInstanceByContractID ( char* contractID , nsISupports delegate , nsIIDRef IID )

Create an instance of the CID that implements contractID and return the interface iID. This is a convenience function that effectively does ContractIDToClassID() followed by CreateInstance().

Arguments:
contractID: : contractID of object instance requested
delegate: : Used for aggregation
IID: : IID of interface requested

nsIEnumerator enumerateCLSIDs ( )

Enumerate the list of all registered ClassIDs.

Returns:
: enumerator for ClassIDs.

nsIEnumerator enumerateContractIDs ( )

Enumerate the list of all registered ContractIDs.

Returns:
: enumerator for ContractIDs.

nsIFactory findFactory ( nsCIDRef class )

Returns the factory object that can be used to create instances of CID class

Arguments:
class: The classid of the factory that is being requested

void freeLibraries ( )

Enumerates all loaded modules and unloads unused modules.


voidPtr* getClassObject ( nsCIDRef class , nsIIDRef IID )

Arguments:
class: : CID of the class whose class object is requested
IID: : IID of an interface that the class object is known to to implement. nsISupports and nsIFactory are known to be implemented by the class object.

PRBool isRegistered ( nsCIDRef class )

Returns true if a factory or module is registered for CID class.

Arguments:
class: : ClassID queried for registeration
Returns:
: true if a factory or module is registered for CID aClass. false otherwise.

void registerComponent ( nsCIDRef class , char* className , char* contractID , char* location , PRBool replace , PRBool persist )

Register a native dll module via its registry representation as returned by registryLocationForSpec() as the container of CID implemenation class and associate contractID and className to the CID class. Native dll component type is assumed.

Arguments:
class: : CID implemenation contained in module
className: : Class name associated with CID class
contractID: : ContractID associated with CID class
location: : Location of module (dll). Format of this is the registry representation as returned by registryLocationForSpec()
replace: : Boolean that indicates whether to replace a previous module registration for class.
persist: : Remember this registration across sessions.

void registerComponentLib ( nsCIDRef class , char* className , char* contractID , char* dllName , PRBool replace , PRBool persist )

Register a native dll module via its dll name (not full path) as the container of CID implemenation class and associate contractID and className to the CID class. Native dll component type is assumed and the system services will be used to load this dll.

Arguments:
class: : CID implemenation contained in module
className: : Class name associated with CID class
contractID: : ContractID associated with CID class
dllName
replace: : Boolean that indicates whether to replace a previous module registration for class.
persist: : Remember this registration across sessions.

void registerComponentSpec ( nsCIDRef class , char* className , char* contractID , nsIFile library , PRBool replace , PRBool persist )

Register a native dll module via its file specification as the container of CID implemenation class and associate contractID and className to the CID class. Native dll component type is assumed.

Arguments:
class: : CID implemenation contained in module
className: : Class name associated with CID class
contractID: : ContractID associated with CID class
library: : File specification Location of module (dll).
replace: : Boolean that indicates whether to replace a previous module registration for class.
persist: : Remember this registration across sessions.

void registerComponentWithType ( nsCIDRef class , char* className , char* contractID , nsIFile spec , char* location , PRBool replace , PRBool persist , char* type )

Register a module's location via its registry representation as returned by registryLocationForSpec() as the container of CID implemenation class of type type and associate contractID and className to the CID class.

Arguments:
class: : CID implemenation contained in module
className: : Class name associated with CID class
contractID: : ContractID associated with CID class
spec: : Filename spec for module's location.
location: : Location of module of type type. Format of this string is the registry representation as returned by registryLocationForSpec()
replace: : Boolean that indicates whether to replace a previous loader registration for class.
persist: : Remember this registration across sessions.
type: : Component Type of CID class.

void registerFactory ( nsCIDRef class , char* className , char* contractID , nsIFactory factory , PRBool replace )

Register a factory and ContractID associated with CID class

Arguments:
class: : CID of object
className: : Class Name of CID
contractID: : ContractID associated with CID class
factory: : Factory that will be registered for CID class
replace: : Boolean that indicates whether to replace a previous registration for the CID class.

char* registryLocationForSpec ( nsIFile spec )

Given a file specification, return the registry representation of the filename. Files that are found relative to the components directory will have a registry representation "rel:" while filenames that are not, will have "abs:".

Arguments:
spec

nsIFile specForRegistryLocation ( char* location )

SpecForRegistyLocation

Create a file specification for the registry representation (rel:/abs:) got via registryLocationForSpec.

Arguments:
location

void unregisterComponent ( nsCIDRef class , char* location )

Disassociate module location represented as registry location as returned by registryLocationForSpec() as containing ClassID class.

Arguments:
class: : ClassID being unregistered
location: : Location of module. Format of this is the registry representation as returned by registryLocationForSpec(). Components of any type will be unregistered.

void unregisterComponentSpec ( nsCIDRef class , nsIFile librarySpec )

Disassociate module references by file specification librarySpec as containing ClassID class.

Arguments:
class
librarySpec

void unregisterFactory ( nsCIDRef class , nsIFactory factory )

Unregister a factory associated with CID class.

Arguments:
class: : ClassID being unregistered
factory: : Factory previously registered to create instances of ClassID class.

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com