Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions | Variables
nsXFormsModule.cpp File Reference
#include "nsIGenericFactory.h"
#include "nsXFormsElementFactory.h"
#include "nsXFormsUtilityService.h"
#include "nsXFormsAtoms.h"
#include "nsXFormsModelElement.h"
#include "nsXFormsUtils.h"
#include "nsICategoryManager.h"
#include "nsIServiceManager.h"

Go to the source code of this file.

Defines

#define NS_XFORMSUTILITYSERVICE_CID   { 0xbb0d9c8b, 0x3096, 0x4b66, { 0x92, 0xa0, 0x6c, 0x1d, 0xdf, 0x80, 0xe6, 0x5f }}

Functions

static NS_IMETHODIMP RegisterXFormsModule (nsIComponentManager *aCompMgr, nsIFile *aPath, const char *aRegistryLocation, const char *aComponentType, const nsModuleComponentInfo *aInfo)
static NS_IMETHODIMP UnregisterXFormsModule (nsIComponentManager *aCompMgr, nsIFile *aPath, const char *aRegistryLocation, const nsModuleComponentInfo *aInfo)
 XFormsModuleCtor (nsIModule *aSelf)

Variables

static const nsModuleComponentInfo components []

Define Documentation

#define NS_XFORMSUTILITYSERVICE_CID   { 0xbb0d9c8b, 0x3096, 0x4b66, { 0x92, 0xa0, 0x6c, 0x1d, 0xdf, 0x80, 0xe6, 0x5f }}

Definition at line 49 of file nsXFormsModule.cpp.


Function Documentation

static NS_IMETHODIMP RegisterXFormsModule ( nsIComponentManager aCompMgr,
nsIFile aPath,
const char *  aRegistryLocation,
const char *  aComponentType,
const nsModuleComponentInfo aInfo 
) [static]

Definition at line 57 of file nsXFormsModule.cpp.

{
#ifdef DEBUG
  printf("XFORMS Module: Registering\n");
#endif

  nsCOMPtr<nsICategoryManager> catman =
    do_GetService(NS_CATEGORYMANAGER_CONTRACTID);

  if (!catman)
    return NS_ERROR_FAILURE;

  nsXPIDLCString previous;
  nsresult rv =
    catman->AddCategoryEntry(NS_DOMNS_FEATURE_PREFIX "org.w3c.xforms.dom",
                             "1.0",
                             NS_XTF_ELEMENT_FACTORY_CONTRACTID_PREFIX NS_NAMESPACE_XFORMS,
                             PR_TRUE, PR_TRUE, getter_Copies(previous));
  NS_ENSURE_SUCCESS(rv, rv);

  rv =
    catman->AddCategoryEntry(NS_DOMNS_FEATURE_PREFIX NS_XFORMS_INSTANCE_OWNER,
                             "1.0",
                             NS_XTF_ELEMENT_FACTORY_CONTRACTID_PREFIX NS_NAMESPACE_XFORMS,
                             PR_TRUE, PR_TRUE, getter_Copies(previous));
  NS_ENSURE_SUCCESS(rv, rv);

  return catman->AddCategoryEntry("agent-style-sheets",
                                  "xforms stylesheet",
                                  "chrome://xforms/content/xforms.css",
                                  PR_TRUE, PR_TRUE, getter_Copies(previous));
}

Here is the call graph for this function:

static NS_IMETHODIMP UnregisterXFormsModule ( nsIComponentManager aCompMgr,
nsIFile aPath,
const char *  aRegistryLocation,
const nsModuleComponentInfo aInfo 
) [static]

Definition at line 95 of file nsXFormsModule.cpp.

{
#ifdef DEBUG
  printf("XFORMS Module: Unregistering\n");
#endif

  nsCOMPtr<nsICategoryManager> catman =
    do_GetService(NS_CATEGORYMANAGER_CONTRACTID);

  if (!catman)
    return NS_ERROR_FAILURE;

  catman->DeleteCategoryEntry(NS_DOMNS_FEATURE_PREFIX "org.w3c.xforms.dom",
                              "1.0", PR_TRUE);

  catman->DeleteCategoryEntry(NS_DOMNS_FEATURE_PREFIX NS_XFORMS_INSTANCE_OWNER,
                              "1.0", PR_TRUE);

  return catman->DeleteCategoryEntry("agent-style-sheets",
                                     "xforms stylesheet", PR_TRUE);
}

Here is the call graph for this function:

Definition at line 135 of file nsXFormsModule.cpp.

{
  nsXFormsAtoms::InitAtoms();
  nsXFormsUtils::Init();
  nsXFormsModelElement::Startup();
  return NS_OK;
}

Here is the call graph for this function:


Variable Documentation

Initial value:
 {
  { "XForms element factory",
    NS_XFORMSELEMENTFACTORY_CID,
    NS_XTF_ELEMENT_FACTORY_CONTRACTID_PREFIX NS_NAMESPACE_XFORMS,
    nsXFormsElementFactoryConstructor,
    RegisterXFormsModule,
    UnregisterXFormsModule
  },
  { "XForms Utility Service",
    NS_XFORMSUTILITYSERVICE_CID,
    NS_XFORMS_UTILITY_CONTRACTID,
    nsXFormsUtilityServiceConstructor }
}

Definition at line 120 of file nsXFormsModule.cpp.