class documentation

class IQ(domish.Element): (source)

View In Hierarchy

Wrapper for a Info/Query packet.

This provides the necessary functionality to send IQs and get notified when a result comes back. It's a subclass from domish.Element, so you can use the standard DOM manipulation calls to add data to the outbound request.

Method __init__
Method add​Callback Register a callback for notification when the IQ result is available.
Method send Call this method to send this IQ request via the associated XmlStream.
Instance Variable callbacks Callback list to be notified when response comes back
Method _result​Event Undocumented
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​Child Add a child to this Element.
Method add​Content Add some text data to this Element.
Method add​Element Create an element and add as child.
Method add​Raw​Xml Add a pre-serialized chunk o' XML as a child of this Element.
Method add​Unique​Id Add a unique (across a given Python session) id attribute to this Element.
Method compare​Attribute 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​Child​Element Undocumented
Method get​Attribute Retrieve the value of attribname, if it exists
Method has​Attribute Determine if the specified attribute exists
Method swap​Attribute​Values Swap the values of two attribute.
Method to​Xml 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 URI this Element exists within
Instance Variable local​Prefixes 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​Counter Undocumented
def __init__(self, xmlstream, type='set'): (source)
Parameters
xmlstream:xmlstream.XmlStreamXmlStream to use for transmission of this IQ
type:strIQ type identifier ('get' or 'set')
def addCallback(self, fn, *args, **kwargs): (source)
Register a callback for notification when the IQ result is available.
def send(self, to=None): (source)
Call this method to send this IQ request via the associated XmlStream.
Parameters
to:strJabber ID of the entity to send the request to
Returns
Callback list for this IQ. Any callbacks added to this list will be fired when the result comes back.
Callback list to be notified when response comes back
def _resultEvent(self, iq): (source)

Undocumented

_xmlstream = (source)

Undocumented