Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions | Variables
xpcom.xpt Namespace Reference

Classes

class  Interface
class  Methods
class  Method
class  Parameter
class  Constants
class  Constant
class  TypeDescriber

Functions

def MakeReprForInvoke
def dump_interface

Variables

dictionary type_info_map
string mode = "Python"

Function Documentation

def xpcom.xpt.dump_interface (   iid,
  mode 
)

Definition at line 452 of file xpt.py.

00452 
00453 def dump_interface(iid, mode):
00454     interface = Interface(iid)
00455     describer_name = "Describe"
00456     if mode == "xptinfo": mode = None
00457     if mode is not None:
00458         describer_name = describer_name + "_" + mode.capitalize()
00459     describer = getattr(interface, describer_name)
00460     print describer()

def xpcom.xpt.MakeReprForInvoke (   param)

Definition at line 356 of file xpt.py.

00356 
00357 def MakeReprForInvoke(param):
00358     tag = param.type_desc[0] & XPT_TDP_TAGMASK
00359     if tag == T_INTERFACE:
00360         i_info = param.interface_info
00361         try:
00362             iid = i_info.GetIIDForParam(param.method_index, param.param_index)
00363         except xpcom.Exception:
00364             # IID not available (probably not scriptable) - just use nsISupports.
00365             iid = xpcom._xpcom.IID_nsISupports
00366         return param.type_desc[0], 0, 0, str(iid)
00367     elif tag == T_ARRAY:
00368         i_info = param.interface_info
00369         array_desc = i_info.GetTypeForParam(param.method_index, param.param_index, 1)
00370         return param.type_desc[:-1] + array_desc[:1]
00371     return param.type_desc
00372 


Variable Documentation

list xpcom.xpt.mode = "Python"

Definition at line 471 of file xpt.py.

Initial value:
00001 {
00002     T_I8                : ("int8",),
00003     T_I16               : ("int16",),
00004     T_I32               : ("int32",),
00005     T_I64               : ("int64",),
00006     T_U8                : ("uint8",),
00007     T_U16               : ("uint16",),
00008     T_U32               : ("uint32",),
00009     T_U64               : ("uint64",),
00010     T_FLOAT             : ("float",),
00011     T_DOUBLE            : ("double",),
00012     T_BOOL              : ("boolean",),
00013     T_CHAR              : ("char",),
00014     T_WCHAR             : ("wchar_t", "wstring"),
00015     T_VOID              : ("void",),
00016     T_IID               : ("reserved", "nsIID *", "nsIID &"),
00017     T_DOMSTRING         : ("DOMString",),
00018     T_CHAR_STR          : ("reserved", "string"),
00019     T_WCHAR_STR         : ("reserved", "wstring"),
00020     T_INTERFACE         : ("reserved", "Interface"),
00021     T_INTERFACE_IS      : ("reserved", "InterfaceIs *"),
00022     T_ARRAY             : ("reserved", "Array"),
00023     T_PSTRING_SIZE_IS   : ("reserved", "string_s"),
00024     T_PWSTRING_SIZE_IS  : ("reserved", "wstring_s"),
00025 }

Definition at line 426 of file xpt.py.