nsIModule

The nsIModule interface.

Methods

getClassObject(aCompMgr, aClass, aIID, aResult)

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.

Parameters

aCompMgr : The global component manager
aClass : ClassID of object instance requested
aIID : IID of interface requested

registerSelf(aCompMgr, aLocation, aLoaderStr, aType)

One time registration callback

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

Parameters

aCompMgr : The global component manager
aLocation : The location of the nsIModule on disk
aLoaderStr: Opaque loader specific string
aType : Loader Type being used to load this module

unregisterSelf(aCompMgr, aLocation, aLoaderStr)

One time unregistration callback

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

Parameters

aCompMgr : The global component manager
aLocation : The location of the nsIModule on disk
aLoaderStr : Opaque loader specific string

canUnload(aCompMgr)

Module load management

Parameters

aCompMgr : 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.