Home | Trees | Index | Help |
|
---|
Package pyxmpp :: Module iq :: Class Iq |
|
Stanza
--+
|
Iq
MucIq
Wraper object for <iq /> stanzas.
Method Summary | |
---|---|
Initialize an `Iq` object. | |
Create a deep copy of the iq stanza. | |
Get the payload element of the stanza. | |
Get a namespace of the stanza payload. | |
Create error response for the a "get" or "set" iq stanza. | |
Create result response for the a "get" or "set" iq stanza. | |
Create new payload element for the stanza. | |
Inherited from Stanza | |
| |
| |
| |
Add an XML node to the stanza's payload. | |
Add a new XML element to the stanza payload. | |
Free the node associated with this `Stanza` object. | |
Get stanza error information. | |
Get "from" attribute of the stanza. | |
Get "from" attribute of the stanza. | |
Get "id" attribute of the stanza. | |
Return the XML node wrapped into `self`. | |
Get "id" attribute of the stanza. | |
Get "type" attribute of the stanza. | |
Get "to" attribute of the stanza. | |
Get "to" attribute of the stanza. | |
Get "type" attribute of the stanza. | |
Serialize the stanza into an UTF-8 encoded XML string. | |
Set stanza content to an XML node. | |
Set "from" attribute of the stanza. | |
Set "id" attribute of the stanza. | |
Set stanza payload to a new XML element. | |
Set "to" attribute of the stanza. | |
Set "type" attribute of the stanza. | |
Evaluate an XPath expression on the stanza XML node. |
Class Variable Summary | |
---|---|
str |
stanza_type = 'iq'
|
Method Details |
---|
__init__(self,
xmlnode=None,
from_jid=None,
to_jid=None,
stanza_type=None,
stanza_id=None,
error=None,
error_cond=None)
|
copy(self)Create a deep copy of the iq stanza. :returntype: `Iq`
|
get_query(self)Get the payload element of the stanza. :return: the payload element or None if there is no payload. :returntype: `libxml2.xmlNode` |
get_query_ns(self)Get a namespace of the stanza payload. :return: XML namespace URI of the payload or None if there is no payload. :returntype: `str` |
make_error_response(self, cond)Create error response for the a "get" or "set" iq stanza. :Parameters: - `cond`: error condition name, as defined in XMPP specification. :return: new `Iq` object with the same "id" as self, "from" and "to" attributes swapped, type="error" and containing <error /> element plus payload of `self`. :returntype: `Iq` |
make_result_response(self)Create result response for the a "get" or "set" iq stanza. :return: new `Iq` object with the same "id" as self, "from" and "to" attributes replaced and type="result". :returntype: `Iq` |
new_query(self, ns_uri, name='query')Create new payload element for the stanza. :Parameters: - `ns_uri`: namespace URI of the element. - `name`: element name. :Types: - `ns_uri`: `str` - `name`: `unicode` :return: the new payload node. :returntype: `libxml2.xmlNode` |
Class Variable Details |
---|
stanza_type
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Wed May 31 22:37:02 2006 | http://epydoc.sf.net |