Module Expr Str Assign NameStore Str ImportFrom alias alias ImportFrom alias ImportFrom alias Assign NameStore TupleLoad Str Str Str Str Str Str Str Str Str Assign NameStore Dict Str Str Str Str Str Str Str Str Assign NameStore Dict Str Str Str Str Str Str Str Str ClassDef bases NameLoad body Expr Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num If CompareIs NameLoad NameLoad body Assign NameStore Str orelse If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad BinOpAdd Str Call NameLoad NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad CompareNotIn NameLoad NameLoad body Raise Call NameLoad Str orelse If CompareEq NameLoad Str body Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If CompareNotEq AttributeLoad NameLoad attr Str body Raise Call NameLoad Str Assign AttributeStore NameLoad attr BinOpAdd AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr BinOpAdd AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr BinOpAdd AttributeLoad NameLoad attr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr orelse If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr orelse If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body TryExcept body Assign AttributeStore NameLoad attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr If BoolOpOr CompareLt AttributeLoad NameLoad attr Num CompareGt AttributeLoad NameLoad attr Num body Raise NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad If BoolOpOr CompareLt NameLoad Num CompareGt NameLoad Num body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str If CompareNotIn AttributeLoad NameLoad attr TupleLoad Str Str Str Str body Raise Call NameLoad Str Assign NameStore Call NameLoad keyword SubscriptLoad NameLoad Index AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareNotIn AttributeLoad NameLoad attr TupleLoad Str Str Str Str body Raise Call NameLoad Str Assign NameStore Call NameLoad keyword SubscriptLoad NameLoad Index AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr Str body Raise Call NameLoad Str Assign NameStore Call NameLoad keyword Str keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list decorator_list
N/A N/A Presence XMPP stanza handling

Normative reference:
  - `RFC 3920 <http://www.ietf.org/rfc/rfc3920.txt>`__
 N/A __docformat__ restructuredtext en etree ElementTree ElementClass exceptions BadRequestProtocolError stanza Stanza N/A PRESENCE_TYPES N/A available unavailable probe subscribe unsubscribe subscribed unsubscribed invisible error N/A ACCEPT_RESPONSES N/A subscribe subscribed unsubscribe unsubscribed subscribed subscribe unsubscribed unsubscribe N/A DENY_RESPONSES N/A subscribe subscribed unsubscribe unsubscribed unsubscribed unsubscribe subscribed subscribe Presence N/A Stanza N/A N/A <presence /> stanza.
    
     N/A element_name presence __init__ N/A N/A self element from_jid to_jid stanza_type stanza_id error error_cond return_path language show status priority N/A None None None None None None None None None None None None N/A N/A Initialize a `Presence` object.

        :Parameters:
            - `element`: XML element 
            - `from_jid`: sender JID.
            - `to_jid`: recipient JID.
            - `stanza_type`: staza type: one of: None, "available",
              "unavailable", "subscribe", "subscribed", "unsubscribe",
              "unsubscribed" or "error". "available" is automaticaly changed to
              None.
            - `stanza_id`: stanza id -- value of stanza's "id" attribute
            - `language`: default language for the stanza content
            - `show`: "show" field of presence stanza. One of: None, "away",
              "xa", "dnd", "chat".
            - `status`: descriptive text for the presence stanza.
            - `priority`: presence priority.
            - `error_cond`: error condition name. Ignored if `stanza_type` is
              not "error"
        :Types:
            - `element`: :etree:`ElementTree.Element`
            - `from_jid`: `JID`
            - `to_jid`: `JID`
            - `stanza_type`: `str`
            - `stanza_id`: `str`
            - `language`: `str`
            - `show`: `str`
            - `status`: `str`
            - `priority`: `int`
            - `error_cond`: `str`
         N/A N/A self _show None N/A N/A self _status None N/A N/A self _priority 0 N/A N/A element None N/A N/A element presence N/A N/A N/A N/A isinstance element ElementClass N/A N/A N/A TypeError N/A Couldn't make Presence from  N/A repr element N/A N/A N/A stanza_type None N/A stanza_type PRESENCE_TYPES N/A N/A N/A ValueError Bad presence type N/A N/A N/A stanza_type available N/A N/A stanza_type None N/A N/A N/A Stanza __init__ self element from_jid from_jid to_jid to_jid stanza_type stanza_type stanza_id stanza_id error error error_cond error_cond return_path return_path language language N/A N/A N/A self element_name presence N/A N/A N/A ValueError The element is not <presence /> N/A N/A self _show_tag N/A N/A self _ns_prefix show N/A N/A self _status_tag N/A N/A self _ns_prefix status N/A N/A self _priority_tag N/A N/A self _ns_prefix priority N/A N/A N/A self _element None N/A N/A N/A N/A self _decode_subelements N/A N/A show None N/A N/A N/A self show show N/A N/A status None N/A N/A N/A self status status N/A N/A priority None N/A N/A N/A self priority priority N/A _decode_subelements N/A N/A self N/A N/A N/A Decode the stanza subelements. N/A child N/A self _element N/A N/A N/A N/A child tag N/A self _show_tag N/A N/A N/A self _show N/A child text N/A N/A N/A N/A child tag N/A self _status_tag N/A N/A N/A self _status N/A child text N/A N/A N/A N/A child tag N/A self _priority_tag N/A N/A N/A N/A N/A self _priority N/A int N/A N/A N/A child text strip N/A N/A N/A N/A self _priority -128 N/A N/A self _priority 127 N/A N/A ValueError N/A N/A N/A ValueError N/A N/A N/A BadRequestProtocolError Presence priority not an integer N/A as_xml N/A N/A self N/A N/A N/A Return the XML stanza representation.

        Always return an independent copy of the stanza XML representation,
        which can be freely modified without affecting the stanza.

        :returntype: :etree:`ElementTree.Element` N/A result N/A N/A Stanza as_xml self N/A N/A self _show N/A N/A child N/A N/A ElementTree SubElement result N/A self _show_tag N/A N/A child text N/A self _show N/A N/A self _status N/A N/A child N/A N/A ElementTree SubElement result N/A self _status_tag N/A N/A child text N/A self _status N/A N/A self _priority N/A N/A child N/A N/A ElementTree SubElement result N/A self _priority_tag N/A N/A child text N/A str N/A self _priority N/A result N/A copy N/A N/A self N/A N/A N/A Create a deep copy of the stanza.

        :returntype: `Presence` N/A result N/A Presence None N/A self from_jid N/A self to_jid N/A self stanza_type N/A self stanza_id N/A self error N/A N/A self _return_path N/A self _show N/A self _status N/A self _priority N/A N/A N/A self _payload None N/A N/A N/A N/A self decode_payload N/A payload N/A self _payload N/A N/A N/A N/A result add_payload N/A N/A payload copy N/A result N/A show N/A N/A self N/A N/A N/A Presence status type.

        :returntype: `str`
         N/A N/A self _show N/A property show N/A N/A self show N/A N/A N/A N/A self _show N/A str show N/A N/A self _dirty True N/A N/A show setter status N/A N/A self N/A N/A N/A Presence status message.

        :returntype: `str`
         N/A N/A self _status N/A property status N/A N/A self status N/A N/A N/A N/A self _status N/A str status N/A N/A self _dirty True N/A N/A status setter priority N/A N/A self N/A N/A N/A Presence priority.

        :returntype: `str`
         N/A N/A self _priority N/A property priority N/A N/A self priority N/A N/A N/A priority N/A int priority N/A N/A N/A priority -128 N/A priority 127 N/A N/A N/A ValueError Priority must be in the (-128, 128) range N/A N/A self _priority priority N/A N/A self _dirty True N/A N/A priority setter make_accept_response N/A N/A self N/A N/A N/A Create "accept" response for the "subscribe" / "subscribed" /
        "unsubscribe" / "unsubscribed" presence stanza.

        :return: new stanza.
        :returntype: `Presence`
         N/A N/A N/A self stanza_type N/A subscribe subscribed unsubscribe unsubscribed N/A N/A N/A ValueError Results may only be generated for 'subscribe','subscribed','unsubscribe' or 'unsubscribed' presence N/A stanza N/A Presence stanza_type N/A ACCEPT_RESPONSES N/A N/A self stanza_type from_jid N/A self to_jid to_jid N/A self from_jid stanza_id N/A self stanza_id N/A stanza N/A make_deny_response N/A N/A self N/A N/A N/A Create "deny" response for the "subscribe" / "subscribed" /
        "unsubscribe" / "unsubscribed" presence stanza.

        :return: new presence stanza.
        :returntype: `Presence`
         N/A N/A N/A self stanza_type N/A subscribe subscribed unsubscribe unsubscribed N/A N/A N/A ValueError Results may only be generated for 'subscribe','subscribed','unsubscribe' or 'unsubscribed' presence N/A stanza N/A Presence stanza_type N/A DENY_RESPONSES N/A N/A self stanza_type from_jid N/A self to_jid to_jid N/A self from_jid stanza_id N/A self stanza_id N/A stanza N/A make_error_response N/A N/A self cond N/A N/A N/A Create error response for the any non-error presence stanza.

        :Parameters:
            - `cond`: error condition name, as defined in XMPP specification.
        :Types:
            - `cond`: `str`

        :return: new presence stanza.
        :returntype: `Presence`
         N/A N/A N/A self stanza_type error N/A N/A N/A ValueError Errors may not be generated in response to errors N/A stanza N/A Presence stanza_type error from_jid N/A self from_jid to_jid N/A self to_jid stanza_id N/A self stanza_id status N/A self _status show N/A self _show priority N/A self _priority error_cond cond N/A N/A N/A self _payload None N/A N/A N/A N/A self decode_payload N/A payload N/A self _payload N/A N/A N/A N/A stanza add_payload payload N/A stanza N/A N/A