Classes | Public Types | Public Attributes | Static Public Attributes

mozilla::Module Struct Reference

A module implements one or more XPCOM components. More...

#include <Module.h>

Collaboration diagram for mozilla::Module:

List of all members.

Classes

struct  CategoryEntry
struct  CIDEntry
 The constructor callback is an implementation detail of the default binary loader and may be null. More...
struct  ContractIDEntry

Public Types

typedef already_AddRefed
< nsIFactory >(* 
GetFactoryProcPtr )(const Module &module, const CIDEntry &entry)
typedef nsresult(* ConstructorProcPtr )(nsISupports *aOuter, const nsIID &aIID, void **aResult)
typedef nsresult(* LoadFuncPtr )()
typedef void(* UnloadFuncPtr )()

Public Attributes

unsigned int mVersion
 Binary compatibility check, should be kModuleVersion.
const CIDEntrymCIDs
 An array of CIDs (class IDs) implemented by this module.
const ContractIDEntrymContractIDs
 An array of mappings from contractid to CID.
const CategoryEntrymCategoryEntries
 An array of category manager entries.
GetFactoryProcPtr getFactoryProc
 When the component manager tries to get the factory for a CID, it first checks for this module-level getfactory callback.
LoadFuncPtr loadProc
 Optional Function which are called when this module is loaded and at shutdown.
UnloadFuncPtr unloadProc

Static Public Attributes

static const int kVersion = 1

Detailed Description

A module implements one or more XPCOM components.

This structure is used for both binary and script modules, but the registration members (cids/contractids/categoryentries) are unused for modules which are loaded via a module loader.


Member Typedef Documentation

typedef nsresult(* mozilla::Module::ConstructorProcPtr)(nsISupports *aOuter, const nsIID &aIID, void **aResult)
typedef void(* mozilla::Module::UnloadFuncPtr)()

Member Data Documentation

When the component manager tries to get the factory for a CID, it first checks for this module-level getfactory callback.

If this function is not implemented, it checks the CIDEntry getfactory callback. If that is also NULL, a generic factory is generated using the CIDEntry constructor callback which must be non-NULL.

const int mozilla::Module::kVersion = 1 [static]

Optional Function which are called when this module is loaded and at shutdown.

These are not C++ constructor/destructors to avoid calling them too early in startup or too late in shutdown.

An array of category manager entries.

The final entry should be { NULL }.

An array of CIDs (class IDs) implemented by this module.

The final entry should be { NULL }.

An array of mappings from contractid to CID.

The final entry should be { NULL }.

Binary compatibility check, should be kModuleVersion.


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