Package xmpp :: Module protocol
[show private | hide private]
[frames | no frames]

Module xmpp.protocol

Protocol module contains tools that is needed for processing of xmpp-related data structures.
Classes
DataField This class is used in the DataForm class to describe the single data item.
DataForm DataForm class.
Error Used to quickly transform received stanza into error reply.
ErrorNode XMPP-style error element.
Iq XMPP Iq object - get/set dialog mechanism.
JID JID object.
Message XMPP Message stanza - "push" mechanism.
Presence XMPP Presence object.
Protocol A "stanza" object class.

Exceptions
NodeProcessed Exception that should be raised by handler when the handling should be stopped.

Function Summary
  isErrorNode(node)
Returns true if the node is a negative reply.
  isResultNode(node)
Returns true if the node is a positive reply.

Variable Summary
dict ERRORS = {'urn:ietf:params:xml:ns:xmpp-sasl not-authoriz...
str NS_AGENTS = 'jabber:iq:agents'
str NS_AMP = 'http://jabber.org/protocol/amp'
str NS_AUTH = 'jabber:iq:auth'
str NS_BIND = 'urn:ietf:params:xml:ns:xmpp-bind'
str NS_BROWSE = 'jabber:iq:browse'
str NS_CLIENT = 'jabber:client'
str NS_COMPONENT_ACCEPT = 'jabber:component:accept'
str NS_DELAY = 'jabber:x:delay'
str NS_DIALBACK = 'jabber:server:dialback'
str NS_DISCO_INFO = 'http://jabber.org/protocol/disco#info'
str NS_DISCO_ITEMS = 'http://jabber.org/protocol/disco#items...
str NS_GROUPCHAT = 'gc-1.0'
str NS_IBB = 'http://jabber.org/protocol/ibb'
str NS_LAST = 'jabber:iq:last'
str NS_PRIVACY = 'jabber:iq:privacy'
str NS_PRIVATE = 'jabber:iq:private'
str NS_REGISTER = 'jabber:iq:register'
str NS_ROSTER = 'jabber:iq:roster'
str NS_SASL = 'urn:ietf:params:xml:ns:xmpp-sasl'
str NS_SEARCH = 'jabber:iq:search'
str NS_SERVER = 'jabber:server'
str NS_SESSION = 'urn:ietf:params:xml:ns:xmpp-session'
str NS_STANZAS = 'urn:ietf:params:xml:ns:xmpp-stanzas'
str NS_STREAMS = 'http://etherx.jabber.org/streams'
str NS_TIME = 'jabber:iq:time'
str NS_TLS = 'urn:ietf:params:xml:ns:xmpp-tls'
str NS_VACATION = 'http://jabber.org/protocol/vacation'
str NS_VCARD = 'vcard-temp'
str NS_VERSION = 'jabber:iq:version'
str NS_XMPP_STREAMS = 'urn:ietf:params:xml:ns:xmpp-streams'
str sasl_error_conditions = '\naborted --  --  -- The receiv...
str xmpp_stanza_error_conditions = "\nbad-request -- 400 -- ...
str xmpp_stream_error_conditions = '\nbad-format --  --  -- ...

Function Details

isErrorNode(node)

Returns true if the node is a negative reply.

isResultNode(node)

Returns true if the node is a positive reply.

Variable Details

ERRORS

Type:
dict
Value:
{'urn:ietf:params:xml:ns:xmpp-sasl aborted': ['',
                                              '',
                                              'The receiving entity ac\
knowledges an <abort/> element sent by the initiating entity; sent in \
reply to the <abort/> element.'],
 'urn:ietf:params:xml:ns:xmpp-sasl incorrect-encoding': ['',
                                                         '',
                                                         'The data pro\
...                                                                    

NS_AGENTS

Type:
str
Value:
'jabber:iq:agents'                                                     

NS_AMP

Type:
str
Value:
'http://jabber.org/protocol/amp'                                       

NS_AUTH

Type:
str
Value:
'jabber:iq:auth'                                                       

NS_BIND

Type:
str
Value:
'urn:ietf:params:xml:ns:xmpp-bind'                                     

NS_BROWSE

Type:
str
Value:
'jabber:iq:browse'                                                     

NS_CLIENT

Type:
str
Value:
'jabber:client'                                                        

NS_COMPONENT_ACCEPT

Type:
str
Value:
'jabber:component:accept'                                              

NS_DELAY

Type:
str
Value:
'jabber:x:delay'                                                       

NS_DIALBACK

Type:
str
Value:
'jabber:server:dialback'                                               

NS_DISCO_INFO

Type:
str
Value:
'http://jabber.org/protocol/disco#info'                                

NS_DISCO_ITEMS

Type:
str
Value:
'http://jabber.org/protocol/disco#items'                               

NS_GROUPCHAT

Type:
str
Value:
'gc-1.0'                                                               

NS_IBB

Type:
str
Value:
'http://jabber.org/protocol/ibb'                                       

NS_LAST

Type:
str
Value:
'jabber:iq:last'                                                       

NS_PRIVACY

Type:
str
Value:
'jabber:iq:privacy'                                                    

NS_PRIVATE

Type:
str
Value:
'jabber:iq:private'                                                    

NS_REGISTER

Type:
str
Value:
'jabber:iq:register'                                                   

NS_ROSTER

Type:
str
Value:
'jabber:iq:roster'                                                     

NS_SASL

Type:
str
Value:
'urn:ietf:params:xml:ns:xmpp-sasl'                                     

NS_SEARCH

Type:
str
Value:
'jabber:iq:search'                                                     

NS_SERVER

Type:
str
Value:
'jabber:server'                                                        

NS_SESSION

Type:
str
Value:
'urn:ietf:params:xml:ns:xmpp-session'                                  

NS_STANZAS

Type:
str
Value:
'urn:ietf:params:xml:ns:xmpp-stanzas'                                  

NS_STREAMS

Type:
str
Value:
'http://etherx.jabber.org/streams'                                     

NS_TIME

Type:
str
Value:
'jabber:iq:time'                                                       

NS_TLS

Type:
str
Value:
'urn:ietf:params:xml:ns:xmpp-tls'                                      

NS_VACATION

Type:
str
Value:
'http://jabber.org/protocol/vacation'                                  

NS_VCARD

Type:
str
Value:
'vcard-temp'                                                           

NS_VERSION

Type:
str
Value:
'jabber:iq:version'                                                    

NS_XMPP_STREAMS

Type:
str
Value:
'urn:ietf:params:xml:ns:xmpp-streams'                                  

sasl_error_conditions

Type:
str
Value:
'''
aborted --  --  -- The receiving entity acknowledges an <abort/> eleme\
nt sent by the initiating entity; sent in reply to the <abort/> elemen\
t.
incorrect-encoding --  --  -- The data provided by the initiating enti\
ty could not be processed because the [BASE64]Josefsson, S., The Base1\
6, Base32, and Base64 Data Encodings, July 2003. encoding is incorrect\
 (e.g., because the encoding does not adhere to the definition in Sect\
...                                                                    

xmpp_stanza_error_conditions

Type:
str
Value:
"""
bad-request -- 400 -- modify -- The sender has sent XML that is malfor\
med or that cannot be processed.
conflict -- 409 -- cancel -- Access cannot be granted because an exist\
ing resource or session exists with the same name or address.
feature-not-implemented -- 501 -- cancel -- The feature requested is n\
ot implemented by the recipient or server and therefore cannot be proc\
essed.
...                                                                    

xmpp_stream_error_conditions

Type:
str
Value:
'''
bad-format --  --  -- The entity has sent XML that cannot be processed\
.
bad-namespace-prefix --  --  -- The entity has sent a namespace prefix\
 that is unsupported, or has sent no namespace prefix on an element th\
at requires such a prefix.
conflict --  --  -- The server is closing the active stream for this e\
ntity because a new stream has been initiated that conflicts with the \
...                                                                    

Generated by Epydoc 2.1 on Sun Dec 26 09:52:57 2004 http://epydoc.sf.net