Event index documentation updated
This commit is contained in:
parent
a0c77c04a5
commit
020197718f
@ -6,14 +6,20 @@ Event Index
|
|||||||
|
|
||||||
connected
|
connected
|
||||||
- **Data:** ``{}``
|
- **Data:** ``{}``
|
||||||
- **Source:** :py:class:`~sleekxmpp.clientxmpp.ClientXMPP`
|
- **Source:** :py:class:`~sleekxmpp.xmlstream.XMLstream`
|
||||||
|
|
||||||
Signal that a connection has been made with the XMPP server, but a session
|
Signal that a connection has been made with the XMPP server, but a session
|
||||||
has not yet been established.
|
has not yet been established.
|
||||||
|
|
||||||
|
connection_failed
|
||||||
|
- **Data:** ``{}``
|
||||||
|
- **Source:** :py:class:`~sleekxmpp.xmlstream.XMLstream`
|
||||||
|
|
||||||
|
Signal that a connection can not be established after number of attempts.
|
||||||
|
|
||||||
changed_status
|
changed_status
|
||||||
- **Data:** :py:class:`~sleekxmpp.Presence`
|
- **Data:** :py:class:`~sleekxmpp.Presence`
|
||||||
- **Source:** :py:class:`~sleekxmpp.BaseXMPP`
|
- **Source:** :py:class:`~sleekxmpp.roster.item.RosterItem`
|
||||||
|
|
||||||
Triggered when a presence stanza is received from a JID with a show type
|
Triggered when a presence stanza is received from a JID with a show type
|
||||||
different than the last presence stanza from the same JID.
|
different than the last presence stanza from the same JID.
|
||||||
@ -65,8 +71,8 @@ Event Index
|
|||||||
|
|
||||||
disconnected
|
disconnected
|
||||||
- **Data:** ``{}``
|
- **Data:** ``{}``
|
||||||
- **Source:** :py:class:`~sleekxmpp.ClientXMPP`
|
- **Source:** :py:class:`~sleekxmpp.xmlstream.XMLstream`
|
||||||
|
|
||||||
Signal that the connection with the XMPP server has been lost.
|
Signal that the connection with the XMPP server has been lost.
|
||||||
|
|
||||||
entity_time
|
entity_time
|
||||||
@ -93,16 +99,16 @@ Event Index
|
|||||||
|
|
||||||
got_online
|
got_online
|
||||||
- **Data:** :py:class:`~sleekxmpp.Presence`
|
- **Data:** :py:class:`~sleekxmpp.Presence`
|
||||||
- **Source:** :py:class:`~sleekxmpp.BaseXMPP`
|
- **Source:** :py:class:`~sleekxmpp.roster.item.RosterItem`
|
||||||
|
|
||||||
If a presence stanza is received from a JID which was previously marked as
|
If a presence stanza is received from a JID which was previously marked as
|
||||||
offline, and the presence has a show type of '``chat``', '``dnd``', '``away``',
|
offline, and the presence has a show type of '``chat``', '``dnd``', '``away``',
|
||||||
or '``xa``', then this event is triggered as well.
|
or '``xa``', then this event is triggered as well.
|
||||||
|
|
||||||
got_offline
|
got_offline
|
||||||
- **Data:** :py:class:`~sleekxmpp.Presence`
|
- **Data:** :py:class:`~sleekxmpp.Presence`
|
||||||
- **Source:** :py:class:`~sleekxmpp.BaseXMPP`
|
- **Source:** :py:class:`~sleekxmpp.roster.item.RosterItem`
|
||||||
|
|
||||||
Signal that an unavailable presence stanza has been received from a JID.
|
Signal that an unavailable presence stanza has been received from a JID.
|
||||||
|
|
||||||
groupchat_invite
|
groupchat_invite
|
||||||
@ -110,7 +116,7 @@ Event Index
|
|||||||
- **Source:**
|
- **Source:**
|
||||||
|
|
||||||
groupchat_direct_invite
|
groupchat_direct_invite
|
||||||
- **Data:** :py:class:`~sleekxmpp.Message`
|
- **Data:** :py:class:`~sleekxmpp.Message`
|
||||||
- **Source:** :py:class:`~sleekxmpp.plugins.xep_0249.direct`
|
- **Source:** :py:class:`~sleekxmpp.plugins.xep_0249.direct`
|
||||||
|
|
||||||
groupchat_message
|
groupchat_message
|
||||||
@ -147,18 +153,18 @@ Event Index
|
|||||||
sure to check the message type in order to handle error messages.
|
sure to check the message type in order to handle error messages.
|
||||||
|
|
||||||
message_form
|
message_form
|
||||||
- **Data:** :py:class:`~sleekxmpp.plugins.xep_0004.Form`
|
- **Data:** :py:class:`~sleekxmpp.plugins.xep_0004.Form`
|
||||||
- **Source:** :py:class:`~sleekxmpp.plugins.xep_0004.xep_0004`
|
- **Source:** :py:class:`~sleekxmpp.plugins.xep_0004.xep_0004`
|
||||||
|
|
||||||
Currently the same as :term:`message_xform`.
|
Currently the same as :term:`message_xform`.
|
||||||
|
|
||||||
message_xform
|
message_xform
|
||||||
- **Data:** :py:class:`~sleekxmpp.plugins.xep_0004.Form`
|
- **Data:** :py:class:`~sleekxmpp.plugins.xep_0004.Form`
|
||||||
- **Source:** :py:class:`~sleekxmpp.plugins.xep_0004.xep_0004`
|
- **Source:** :py:class:`~sleekxmpp.plugins.xep_0004.xep_0004`
|
||||||
|
|
||||||
Triggered whenever a data form is received inside a message.
|
Triggered whenever a data form is received inside a message.
|
||||||
|
|
||||||
mucc::[room]::got_offline
|
muc::[room]::got_offline
|
||||||
- **Data:**
|
- **Data:**
|
||||||
- **Source:**
|
- **Source:**
|
||||||
|
|
||||||
@ -187,8 +193,8 @@ Event Index
|
|||||||
A presence stanza with a type of '``error``' is received.
|
A presence stanza with a type of '``error``' is received.
|
||||||
|
|
||||||
presence_form
|
presence_form
|
||||||
- **Data:** :py:class:`~sleekxmpp.plugins.xep_0004.Form`
|
- **Data:** :py:class:`~sleekxmpp.plugins.xep_0004.Form`
|
||||||
- **Source:** :py:class:`~sleekxmpp.plugins.xep_0004.xep_0004`
|
- **Source:** :py:class:`~sleekxmpp.plugins.xep_0004.xep_0004`
|
||||||
|
|
||||||
This event is present in the XEP-0004 plugin code, but is currently not used.
|
This event is present in the XEP-0004 plugin code, but is currently not used.
|
||||||
|
|
||||||
@ -229,22 +235,20 @@ Event Index
|
|||||||
A presence stanza with a type of '``unsubscribed``' is received.
|
A presence stanza with a type of '``unsubscribed``' is received.
|
||||||
|
|
||||||
roster_update
|
roster_update
|
||||||
- **Data:** :py:class:`~sleekxmpp.stanza.Roster`
|
- **Data:** :py:class:`~sleekxmpp.stanza.Roster`
|
||||||
- **Source:** :py:class:`~sleekxmpp.ClientXMPP`
|
- **Source:** :py:class:`~sleekxmpp.ClientXMPP`
|
||||||
|
|
||||||
An IQ result containing roster entries is received.
|
An IQ result containing roster entries is received.
|
||||||
|
|
||||||
sent_presence
|
sent_presence
|
||||||
- **Data:** ``{}``
|
- **Data:** ``{}``
|
||||||
- **Source:** :py:class:`BaseXMPP <sleekxmpp.BaseXMPP>`
|
- **Source:** :py:class:`~sleekxmpp.roster.multi.Roster`
|
||||||
|
|
||||||
Signal that an initial presence stanza has been written to the XML stream.
|
Signal that an initial presence stanza has been written to the XML stream.
|
||||||
|
|
||||||
session_end
|
session_end
|
||||||
- **Data:** ``{}``
|
- **Data:** ``{}``
|
||||||
- **Source:** :py:class:`ClientXMPP <sleekxmpp.ClientXMPP>`,
|
- **Source:** :py:class:`~sleekxmpp.xmlstream.XMLstream`
|
||||||
:py:class:`ComponentXMPP <sleekxmpp.ComponentXMPP>`
|
|
||||||
:py:class:`XEP-0078 <sleekxmpp.plugins.xep_0078>`
|
|
||||||
|
|
||||||
Signal that a connection to the XMPP server has been lost and the current
|
Signal that a connection to the XMPP server has been lost and the current
|
||||||
stream session has ended. Currently equivalent to :term:`disconnected`, but
|
stream session has ended. Currently equivalent to :term:`disconnected`, but
|
||||||
@ -256,14 +260,14 @@ Event Index
|
|||||||
|
|
||||||
session_start
|
session_start
|
||||||
- **Data:** ``{}``
|
- **Data:** ``{}``
|
||||||
- **Source:** :py:class:`ClientXMPP <sleekxmpp.ClientXMPP>`,
|
- **Source:** :py:class:`ClientXMPP <sleekxmpp.ClientXMPP>`,
|
||||||
:py:class:`ComponentXMPP <sleekxmpp.ComponentXMPP>`
|
:py:class:`ComponentXMPP <sleekxmpp.ComponentXMPP>`
|
||||||
:py:class:`XEP-0078 <sleekxmpp.plugins.xep_0078>`
|
:py:class:`XEP-0078 <sleekxmpp.plugins.xep_0078>`
|
||||||
|
|
||||||
Signal that a connection to the XMPP server has been made and a session has been established.
|
Signal that a connection to the XMPP server has been made and a session has been established.
|
||||||
|
|
||||||
socket_error
|
socket_error
|
||||||
- **Data:** ``Socket`` exception object
|
- **Data:** ``Socket`` exception object
|
||||||
- **Source:** :py:class:`~sleekxmpp.xmlstream.XMLstream`
|
- **Source:** :py:class:`~sleekxmpp.xmlstream.XMLstream`
|
||||||
|
|
||||||
stream_error
|
stream_error
|
||||||
|
@ -158,8 +158,8 @@ class ComponentXMPP(BaseXMPP):
|
|||||||
"""
|
"""
|
||||||
self.session_bind_event.set()
|
self.session_bind_event.set()
|
||||||
self.session_started_event.set()
|
self.session_started_event.set()
|
||||||
self.event("session_bind", self.boundjid, direct=True)
|
self.event('session_bind', self.boundjid, direct=True)
|
||||||
self.event("session_start")
|
self.event('session_start')
|
||||||
|
|
||||||
def _handle_probe(self, pres):
|
def _handle_probe(self, pres):
|
||||||
self.roster[pres['to']][pres['from']].handle_probe(pres)
|
self.roster[pres['to']][pres['from']].handle_probe(pres)
|
||||||
|
@ -62,4 +62,4 @@ class FeatureBind(BasePlugin):
|
|||||||
log.debug("Established Session")
|
log.debug("Established Session")
|
||||||
self.xmpp.sessionstarted = True
|
self.xmpp.sessionstarted = True
|
||||||
self.xmpp.session_started_event.set()
|
self.xmpp.session_started_event.set()
|
||||||
self.xmpp.event("session_start")
|
self.xmpp.event('session_start')
|
||||||
|
@ -51,4 +51,4 @@ class FeatureSession(BasePlugin):
|
|||||||
log.debug("Established Session")
|
log.debug("Established Session")
|
||||||
self.xmpp.sessionstarted = True
|
self.xmpp.sessionstarted = True
|
||||||
self.xmpp.session_started_event.set()
|
self.xmpp.session_started_event.set()
|
||||||
self.xmpp.event("session_start")
|
self.xmpp.event('session_start')
|
||||||
|
@ -559,7 +559,7 @@ class XMLStream(object):
|
|||||||
|
|
||||||
self.set_socket(self.socket, ignore=True)
|
self.set_socket(self.socket, ignore=True)
|
||||||
#this event is where you should set your application state
|
#this event is where you should set your application state
|
||||||
self.event("connected", direct=True)
|
self.event('connected', direct=True)
|
||||||
return True
|
return True
|
||||||
except (Socket.error, ssl.SSLError) as serr:
|
except (Socket.error, ssl.SSLError) as serr:
|
||||||
error_msg = "Could not connect to %s:%s. Socket Error #%s: %s"
|
error_msg = "Could not connect to %s:%s. Socket Error #%s: %s"
|
||||||
@ -718,7 +718,7 @@ class XMLStream(object):
|
|||||||
self.event('socket_error', serr, direct=True)
|
self.event('socket_error', serr, direct=True)
|
||||||
finally:
|
finally:
|
||||||
#clear your application state
|
#clear your application state
|
||||||
self.event("disconnected", direct=True)
|
self.event('disconnected', direct=True)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def abort(self):
|
def abort(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user