class documentation
Wrapper for an iq stanza.
Iq stanzas are used for communications with a request-response behaviour. Each iq request is associated with an XML stream and has its own unique id to be able to track the response.
| Method | __init__ |
No summary |
| Method | send |
Send out this iq. |
| Instance Variable | timeout |
if set, a timeout period after which the deferred returned by send will have its errback called with a TimeoutError failure. |
| Instance Variable | _xmlstream |
Undocumented |
Inherited from Element:
| Method | __bytes__ |
Retrieve the first character data node as UTF-8 bytes. |
| Method | __delitem__ |
Undocumented |
| Method | __getattr__ |
Undocumented |
| Method | __getitem__ |
Undocumented |
| Method | __setitem__ |
Undocumented |
| Method | __unicode__ |
Retrieve the first CData (content) node |
| Method | add |
Add a child to this Element. |
| Method | add |
Add some text data to this Element. |
| Method | add |
Create an element and add as child. |
| Method | add |
Add a pre-serialized chunk o' XML as a child of this Element. |
| Method | add |
Add a unique (across a given Python session) id attribute to this Element. |
| Method | compare |
Safely compare the value of an attribute against a provided value. |
| Method | elements |
Iterate across all children of this Element that are Elements. |
| Method | first |
Undocumented |
| Method | get |
Retrieve the value of attribname, if it exists |
| Method | has |
Determine if the specified attribute exists |
| Method | swap |
Swap the values of two attribute. |
| Method | to |
Serialize this Element and all children to a string. |
| Instance Variable | attributes |
Dictionary of attributes associated with this Element. |
| Instance Variable | children |
List of child Elements and content |
| Instance Variable | default |
URI this Element exists within |
| Instance Variable | local |
Dictionary of namespace declarations on this element. The key is the prefix to bind the namespace uri to. |
| Instance Variable | name |
Name of this Element |
| Instance Variable | parent |
Reference to the parent Element, if any. |
| Instance Variable | uri |
URI of this Element's name |
| Method | _dqa |
Dequalify an attribute key as needed |
| Class Variable | _id |
Undocumented |
| Parameters | |
xmlstream:xmlstream.XmlStream | XmlStream to use for transmission of this IQ |
| stanza | IQ type identifier ('get' or 'set') |
Send out this iq.
Returns a deferred that is fired when an iq response with the same id is received. Result responses will be passed to the deferred callback. Error responses will be transformed into a StanzaError and result in the errback of the deferred being invoked.
| Returns | |
defer.Deferred | Undocumented |
if set, a timeout period after which the deferred returned by send will have its errback called with a TimeoutError failure.