67699: all your nsIClassInfo is belong to us

- teach nsGenericFactory about nsIClassInfo, and nsIClassInfo.idl to the
  builds
- add a heaping serving of macro love for classes that want to support it
- convert many modules to use nsGenericModule the new way
- handful of warning and modeline fixes
- nsSample and some XPConnect test classes now have nsIClassInfo support for
  testing


git-svn-id: svn://10.0.0.236/trunk@89354 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
shaver%mozilla.org
2001-03-12 20:43:02 +00:00
parent 3b60ed87ef
commit 823ae8572c
57 changed files with 1205 additions and 1786 deletions

View File

@@ -60,7 +60,8 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsSampleImpl)
static NS_METHOD nsSampleRegistrationProc(nsIComponentManager *aCompMgr,
nsIFile *aPath,
const char *registryLocation,
const char *componentType)
const char *componentType,
const nsModuleComponentInfo *info)
{
// Do any registration specific activity like adding yourself to a
// category. The Generic Module will take care of registering your
@@ -74,7 +75,8 @@ static NS_METHOD nsSampleRegistrationProc(nsIComponentManager *aCompMgr,
static NS_METHOD nsSampleUnregistrationProc(nsIComponentManager *aCompMgr,
nsIFile *aPath,
const char *registryLocation)
const char *registryLocation,
const nsModuleComponentInfo *info)
{
// Undo any component specific registration like adding yourself to a
// category here. The Generic Module will take care of unregistering your
@@ -87,11 +89,18 @@ static NS_METHOD nsSampleUnregistrationProc(nsIComponentManager *aCompMgr,
return NS_OK;
}
// For each class that wishes to support nsIClassInfo, add a line like this
NS_DECL_CLASSINFO(nsSampleImpl)
static nsModuleComponentInfo components[] =
{
{ "Sample Component", NS_SAMPLE_CID, NS_SAMPLE_CONTRACTID, nsSampleImplConstructor,
nsSampleRegistrationProc /* NULL if you dont need one */,
nsSampleUnregistrationProc /* NULL if you dont need one */
nsSampleUnregistrationProc /* NULL if you dont need one */,
NULL /* no factory destructor */,
NS_CI_INTERFACE_GETTER_NAME(nsSampleImpl),
NULL /* no language helper */,
&NS_CLASSINFO_NAME(nsSampleImpl)
}
};