DataForm class. Used for manipulating dataforms in XMPP. Relevant
XEPs: 0004, 0068, 0122. Can be used in disco, pub-sub and many other
applications.
|
__init__(self,
typ=None,
data=[ ] ,
title=None,
node=None)
Create new dataform of type 'typ'; 'data' is the list of
DataReported, DataItem and DataField instances that this dataform
contains; 'title' is the title string. |
source code
|
|
|
|
|
setType(self,
typ)
Set the type of dataform. |
source code
|
|
|
getTitle(self)
Return the title of dataform. |
source code
|
|
|
setTitle(self,
text)
Set the title of dataform. |
source code
|
|
|
getInstructions(self)
Return the instructions of dataform. |
source code
|
|
|
setInstructions(self,
text)
Set the instructions of dataform. |
source code
|
|
|
addInstructions(self,
text)
Add one more instruction to the dataform. |
source code
|
|
|
getField(self,
name)
Return the datafield object with name 'name' (if exists). |
source code
|
|
|
setField(self,
name)
Create if nessessary or get the existing datafield object with name
'name' and return it. |
source code
|
|
|
asDict(self)
Represent dataform as simple dictionary mapping of datafield names to
their values. |
source code
|
|
|
|
|
__setitem__(self,
name,
val)
Simple dictionary interface for setting datafields values by their
names. |
source code
|
|
Inherited from simplexml.Node :
__delitem__ ,
__getattr__ ,
__str__ ,
addChild ,
addData ,
clearData ,
delAttr ,
delChild ,
getAttr ,
getAttrs ,
getCDATA ,
getChildren ,
getData ,
getName ,
getNamespace ,
getParent ,
getPayload ,
getTag ,
getTagAttr ,
getTagData ,
getTags ,
has_attr ,
iterTags ,
lookup_nsp ,
setAttr ,
setData ,
setName ,
setNamespace ,
setParent ,
setPayload ,
setTag ,
setTagAttr ,
setTagData
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|