Package pyxmpp :: Package jabber :: Module dataforms :: Class Option
[show private | hide private]
[frames | no frames]

Type Option

         object --+    
                  |    
StanzaPayloadObject --+
                      |
                     Option


One of optional data form field values.

:Ivariables:
    - `label`: option label.
    - `values`: option values.
:Types:
    - `label`: `unicode`
    - `values`: `list` of `unicode`

Method Summary
  __init__(self, values, label)
Initialize an `Option` object.
  complete_xml_element(self, xmlnode, doc)
Complete the XML node with `self` content.
  _new_from_xml(cls, xmlnode)
Create a new `Option` object from an XML element. (Class method)
    Inherited from StanzaPayloadObject
  as_xml(self, parent, doc)
Get the XML representation of `self`.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
str xml_element_name = 'option'
str xml_element_namespace = 'jabber:x:data'

Instance Method Details

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

Initialize an `Option` object.

:Parameters:
    - `values`: option values.
    - `label`: option label (human-readable description).
:Types:
    - `label`: `unicode`
    - `values`: `list` of `unicode`
Overrides:
__builtin__.object.__init__

complete_xml_element(self, xmlnode, doc)

Complete the XML node with `self` content.

:Parameters:
    - `xmlnode`: XML node with the element being built. It has already
      right name and namespace, but no attributes or content.
    - `doc`: document to which the element belongs.
:Types:
    - `xmlnode`: `libxml2.xmlNode`
    - `doc`: `libxml2.xmlDoc`
Overrides:
pyxmpp.objects.StanzaPayloadObject.complete_xml_element

Class Method Details

_new_from_xml(cls, xmlnode)

Create a new `Option` object from an XML element.

:Parameters:
    - `xmlnode`: the XML element.
:Types:
    - `xmlnode`: `libxml2.xmlNode`

:return: the object created.
:returntype: `Option`

Class Variable Details

xml_element_name

Type:
str
Value:
'option'                                                               

xml_element_namespace

Type:
str
Value:
'jabber:x:data'                                                        

Generated by Epydoc 2.1 on Wed May 31 22:37:01 2006 http://epydoc.sf.net