Event index documentation updated
This commit is contained in:
parent
a0c77c04a5
commit
020197718f
5 changed files with 36 additions and 32 deletions
|
@ -6,14 +6,20 @@ Event Index
|
|||
|
||||
connected
|
||||
- **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
|
||||
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
|
||||
- **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
|
||||
different than the last presence stanza from the same JID.
|
||||
|
@ -65,7 +71,7 @@ Event Index
|
|||
|
||||
disconnected
|
||||
- **Data:** ``{}``
|
||||
- **Source:** :py:class:`~sleekxmpp.ClientXMPP`
|
||||
- **Source:** :py:class:`~sleekxmpp.xmlstream.XMLstream`
|
||||
|
||||
Signal that the connection with the XMPP server has been lost.
|
||||
|
||||
|
@ -93,7 +99,7 @@ Event Index
|
|||
|
||||
got_online
|
||||
- **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
|
||||
offline, and the presence has a show type of '``chat``', '``dnd``', '``away``',
|
||||
|
@ -101,7 +107,7 @@ Event Index
|
|||
|
||||
got_offline
|
||||
- **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.
|
||||
|
||||
|
@ -158,7 +164,7 @@ Event Index
|
|||
|
||||
Triggered whenever a data form is received inside a message.
|
||||
|
||||
mucc::[room]::got_offline
|
||||
muc::[room]::got_offline
|
||||
- **Data:**
|
||||
- **Source:**
|
||||
|
||||
|
@ -236,15 +242,13 @@ Event Index
|
|||
|
||||
sent_presence
|
||||
- **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.
|
||||
|
||||
session_end
|
||||
- **Data:** ``{}``
|
||||
- **Source:** :py:class:`ClientXMPP <sleekxmpp.ClientXMPP>`,
|
||||
:py:class:`ComponentXMPP <sleekxmpp.ComponentXMPP>`
|
||||
:py:class:`XEP-0078 <sleekxmpp.plugins.xep_0078>`
|
||||
- **Source:** :py:class:`~sleekxmpp.xmlstream.XMLstream`
|
||||
|
||||
Signal that a connection to the XMPP server has been lost and the current
|
||||
stream session has ended. Currently equivalent to :term:`disconnected`, but
|
||||
|
|
|
@ -158,8 +158,8 @@ class ComponentXMPP(BaseXMPP):
|
|||
"""
|
||||
self.session_bind_event.set()
|
||||
self.session_started_event.set()
|
||||
self.event("session_bind", self.boundjid, direct=True)
|
||||
self.event("session_start")
|
||||
self.event('session_bind', self.boundjid, direct=True)
|
||||
self.event('session_start')
|
||||
|
||||
def _handle_probe(self, pres):
|
||||
self.roster[pres['to']][pres['from']].handle_probe(pres)
|
||||
|
|
|
@ -62,4 +62,4 @@ class FeatureBind(BasePlugin):
|
|||
log.debug("Established Session")
|
||||
self.xmpp.sessionstarted = True
|
||||
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")
|
||||
self.xmpp.sessionstarted = True
|
||||
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)
|
||||
#this event is where you should set your application state
|
||||
self.event("connected", direct=True)
|
||||
self.event('connected', direct=True)
|
||||
return True
|
||||
except (Socket.error, ssl.SSLError) as serr:
|
||||
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)
|
||||
finally:
|
||||
#clear your application state
|
||||
self.event("disconnected", direct=True)
|
||||
self.event('disconnected', direct=True)
|
||||
return True
|
||||
|
||||
def abort(self):
|
||||
|
|
Loading…
Reference in a new issue