Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
xpcom.components._Class Class Reference

List of all members.

Public Member Functions

def __init__
def __getattr__
def createInstance
def getService

Public Attributes

 contractid
 clsid

Detailed Description

Definition at line 173 of file components.py.


Constructor & Destructor Documentation

def xpcom.components._Class.__init__ (   self,
  contractid 
)

Definition at line 174 of file components.py.

00174 
00175     def __init__(self, contractid):
        self.contractid = contractid

Member Function Documentation

def xpcom.components._Class.__getattr__ (   self,
  attr 
)

Definition at line 176 of file components.py.

00176 
00177     def __getattr__(self, attr):
00178         if attr == "clsid":
00179             rc = registrar.contractIDToCID(self.contractid)
00180             # stash it away - it can never change!
00181             self.clsid = rc
00182             return rc
        raise AttributeError, "%s class has no attribute '%s'" % (self.contractid, attr)
def xpcom.components._Class.createInstance (   self,
  iid = None 
)

Definition at line 183 of file components.py.

00183 
00184     def createInstance(self, iid = None):
00185         import xpcom.client
00186         try:
00187             return xpcom.client.Component(self.contractid, _get_good_iid(iid))
00188         except xpcom.COMException, details:
00189             import nsError
00190             # Handle "no such component" in a cleaner way for the user.
00191             if details.errno == nsError.NS_ERROR_FACTORY_NOT_REGISTERED:
00192                 raise xpcom.COMException(details.errno, "No such component '%s'" % (self.contractid,))
            raise # Any other exception reraise.

Here is the call graph for this function:

def xpcom.components._Class.getService (   self,
  iid = None 
)

Definition at line 193 of file components.py.

00193 
00194     def getService(self, iid = None):
00195         return serviceManager.getServiceByContractID(self.contractid, _get_good_iid(iid))

Here is the call graph for this function:


Member Data Documentation

Definition at line 180 of file components.py.

Definition at line 175 of file components.py.


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