Package pyxmpp :: Package jabber :: Module dataforms :: Class Option
[hide private]

Class Option

source code

                 object --+    
                          |    
objects.StanzaPayloadObject --+
                              |
                             Option

One of optional data form field values.
Instance Methods [hide private]
 
__init__(self, value=None, label=None, values=None)
Initialize an Option object.
source code
 
complete_xml_element(self, xmlnode, doc)
Complete the XML node with self content.
source code

Inherited from objects.StanzaPayloadObject: as_xml

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
Option
_new_from_xml(cls, xmlnode)
Create a new Option object from an XML element.
source code
Class Variables [hide private]
: unicode xml_element_name = 'option'
: name for the XML element provided by the class.
: unicode xml_element_namespace = 'jabber:x:data'
: namespace URI for the XML element provided by the class.
Instance Variables [hide private]
: unicode label
: option label.
: unicode value
: option value.
Properties [hide private]
  values
Return list of option values (always single element).

Inherited from object: __class__

Method Details [hide private]

__init__(self, value=None, label=None, values=None)
(Constructor)

source code 
Initialize an Option object.
Parameters:
  • value (: unicode) - : option value (mandatory).
  • label (: unicode) - : option label (human-readable description).
  • values - : for backward compatibility only.
Overrides: object.__init__

complete_xml_element(self, xmlnode, doc)

source code 
Complete the XML node with self content.
Parameters:
  • xmlnode (: libxml2.xmlNode) - : XML node with the element being built. It has already right name and namespace, but no attributes or content.
  • doc (: libxml2.xmlDoc) - : document to which the element belongs.
Overrides: objects.StanzaPayloadObject.complete_xml_element

_new_from_xml(cls, xmlnode)
Class Method

source code 
Create a new Option object from an XML element.
Parameters:
  • xmlnode (: libxml2.xmlNode) - : the XML element.
Returns: Option
the object created.

Property Details [hide private]

values

Return list of option values (always single element). Obsolete. For backwards compatibility only.
Get Method:
unreachable.values(self) - Return list of option values (always single element).