Package common :: 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)
You can specify type, query namespace any additional attributes, recipient of the iq, sender of the iq, any additional payload (f.e.
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)
Build and return another Iq object of specified type.
source code

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

Inherited from simplexml.Node: __contains__, __delitem__, __getattr__, __getitem__, __str__, addChild, addData, clearData, delAttr, delChild, getAttr, getAttrs, 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__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Variables [hide private]

Inherited from simplexml.Node: FORCE_NODE_RECREATION

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

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

source code 

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: object.__init__

getQueryNS(self)

source code 
Return the namespace of the 'query' child element

getQuerynode(self)

source code 
Return the 'node' attribute value of the 'query' child element

getQueryPayload(self)

source code 
Return the 'query' child element payload

getQueryChildren(self)

source code 
Return the 'query' child element child nodes

setQueryNS(self, namespace)

source code 
Set the namespace of the 'query' child element

setQueryPayload(self, payload)

source code 
Set the 'query' child element payload

setQuerynode(self, node)

source code 
Set the 'node' attribute value of the 'query' child element

buildReply(self, typ)

source code 
Build and return another Iq object of specified type. The to, from and query child node of new Iq are pre-set as reply to this Iq.