WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIModule

IID:7392D032-5371-11d3-994E-00805FD26FEE
Inherits From:nsISupports
Status:FROZEN

The nsIModule interface.


Methods

PRBool canUnload ( nsIComponentManager compMgr ) void getClassObject ( nsIComponentManager compMgr , nsCIDRef class , nsIIDRef IID , out nsQIResult* result ) void registerSelf ( nsIComponentManager compMgr , nsIFile location , char* loaderStr , char* type ) void unregisterSelf ( nsIComponentManager compMgr , nsIFile location , char* loaderStr )

PRBool canUnload ( nsIComponentManager compMgr )

Module load management

Arguments:
compMgr: : The global component manager
Returns:
indicates to the caller if the module can be unloaded. Returning PR_TRUE isn't a guarantee that the module will be unloaded. It constitues only willingness of the module to be unloaded. It is very important to ensure that no outstanding references to the module's code/data exist before returning PR_TRUE. Returning PR_FALSE guaratees that the module won't be unloaded.

void getClassObject ( nsIComponentManager compMgr , nsCIDRef class , nsIIDRef IID , out nsQIResult* result )

Object Instance Creation

Obtains a Class Object from a nsIModule for a given CID and IID pair. This class object can either be query to a nsIFactory or a may be query to a nsIClassInfo.

Arguments:
compMgr: : The global component manager
class: : ClassID of object instance requested
IID: : IID of interface requested
result

void registerSelf ( nsIComponentManager compMgr , nsIFile location , char* loaderStr , char* type )

One time registration callback

When the nsIModule is discovered, this method will be called so that any setup registration can be preformed.

Arguments:
compMgr: : The global component manager
location: : The location of the nsIModule on disk
loaderStr: : Opaque loader specific string
type: : Loader Type being used to load this module

void unregisterSelf ( nsIComponentManager compMgr , nsIFile location , char* loaderStr )

One time unregistration callback

When the nsIModule is being unregistered, this method will be called so that any unregistration can be preformed

Arguments:
compMgr: : The global component manager
location: : The location of the nsIModule on disk
loaderStr: : Opaque loader specific string

References

This interface is returned from the following methods:

nsIModuleLoader.loadModule

Reference documentation is generated from Mozilla's source.

Copyright © 1999-2006 XULPlanet.com