Package spade :: Package xmpp :: Module protocol :: Class Iq
[hide private]
[frames] | no frames]

Class Iq

source code


XMPP Iq object - get/set dialog mechanism.

Instance Methods [hide private]
 
__init__(self, typ=None, queryNS=None, attrs={}, to=None, frm=None, payload=[], xmlns='jabber:client', node=None)
Create Iq object.
source code
 
getQueryNS(self)
Return the namespace of the 'query' child element.
source code
 
getQuerynode(self)
Return the 'node' attribute value of the 'query' child element.
source code
 
getQueryPayload(self)
Return the 'query' child element payload.
source code
 
getQueryChildren(self)
Return the 'query' child element child nodes.
source code
 
setQueryNS(self, namespace)
Set the namespace of the 'query' child element.
source code
 
setQueryPayload(self, payload)
Set the 'query' child element payload.
source code
 
setQuerynode(self, node)
Set the 'node' attribute value of the 'query' child element.
source code
 
buildReply(self, typ)
Builds and returns another Iq object of specified type.
source code

Inherited from Protocol: __setitem__, getError, getErrorCode, getFrom, getID, getProperties, getTimestamp, getTo, getType, setError, setFrom, setID, setTimestamp, setTo, setType

Inherited from simplexml.Node: __delitem__, __getattr__, __getitem__, __str__, addChild, addData, clearData, delAttr, delChild, getAttr, getAttrs, getChildren, getData, getName, getNamespace, getParent, getPayload, getTag, getTagAttr, getTagData, getTags, has_attr, setAttr, setData, setName, setNamespace, setParent, setPayload, setTag, setTagAttr, setTagData

Class Variables [hide private]

Inherited from simplexml.Node: FORCE_NODE_RECREATION

Method Details [hide private]

__init__(self, typ=None, queryNS=None, attrs={}, to=None, frm=None, payload=[], xmlns='jabber:client', node=None)
(Constructor)

source code 

Create Iq object. You can specify type, query namespace any additional attributes, recipient of the iq, sender of the iq, any additional payload (f.e. jabber:x:data node) and namespace in one go. Alternatively you can pass in the other XML object as the 'node' parameted to replicate it as an iq.

Overrides: simplexml.Node.__init__

buildReply(self, typ)

source code 

Builds and returns another Iq object of specified type. The to, from and query child node of new Iq are pre-set as reply to this Iq.