Reference

Reference

XPCOM module

Terms

component-spec

a contract id or a cid

interface-spec

an interface name, iid or a module that reflect an interface

Class Method

XPCOM.instance(component-spec,interface-spec)

Return instance of an XPCOM component.

XPCOM.interface(interface-spec)

Return a module reflecting specified interface.

XPCOM.IID(interface-spec)

Return a IID for specified interface. Internally used to convert an interface name to an IID.

XPCOM.CID(component-spec)

Return a CID for specified component. Internally used to a contract id to a CID

XPCOM.register(class, cid, name, contract-id)

Register a component written in Ruby. class is a Class object that implement the component. name is a human readable string of the component name. This method must be called from a file which defines the class, because that file is treated as the entry point for the component. The mapping between the CID and the file is registered to component registry.

XPCOM.require(interface-spec)

Declare use of an interface. This method make the interface access method for that interface available in XPCOM::Interfaces module.

Constants

ComponentManager

The global component manager. This object supports nsIComponentManagerinterface.

ServiceManager

The global service manager. This object supports nsIServiceManagerinterface.

XPCOM::QueryInterfaceBasic

This module provides a basic implementation of QueryInterface method.

XPCOM::Interfaces

Interface Reflection Module

Module returned by XPCOM.interface methods. XPCOM is extended by this module, so that you can access these interfaces by just XPCOM::nsISupports.