Rename to slixmpp
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.. module:: sleekxmpp.xmlstream.filesocket
|
||||
.. module:: slixmpp.xmlstream.filesocket
|
||||
|
||||
.. _filesocket:
|
||||
|
||||
|
||||
@@ -3,14 +3,14 @@ Stanza Handlers
|
||||
|
||||
The Basic Handler
|
||||
-----------------
|
||||
.. module:: sleekxmpp.xmlstream.handler.base
|
||||
.. module:: slixmpp.xmlstream.handler.base
|
||||
|
||||
.. autoclass:: BaseHandler
|
||||
:members:
|
||||
|
||||
Callback
|
||||
--------
|
||||
.. module:: sleekxmpp.xmlstream.handler.callback
|
||||
.. module:: slixmpp.xmlstream.handler.callback
|
||||
|
||||
.. autoclass:: Callback
|
||||
:members:
|
||||
@@ -18,7 +18,7 @@ Callback
|
||||
|
||||
Waiter
|
||||
------
|
||||
.. module:: sleekxmpp.xmlstream.handler.waiter
|
||||
.. module:: slixmpp.xmlstream.handler.waiter
|
||||
|
||||
.. autoclass:: Waiter
|
||||
:members:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Jabber IDs (JID)
|
||||
=================
|
||||
|
||||
.. module:: sleekxmpp.xmlstream.jid
|
||||
.. module:: slixmpp.xmlstream.jid
|
||||
|
||||
.. autoclass:: JID
|
||||
:members:
|
||||
|
||||
@@ -3,7 +3,7 @@ Stanza Matchers
|
||||
|
||||
The Basic Matcher
|
||||
-----------------
|
||||
.. module:: sleekxmpp.xmlstream.matcher.base
|
||||
.. module:: slixmpp.xmlstream.matcher.base
|
||||
|
||||
.. autoclass:: MatcherBase
|
||||
:members:
|
||||
@@ -11,7 +11,7 @@ The Basic Matcher
|
||||
|
||||
ID Matching
|
||||
-----------
|
||||
.. module:: sleekxmpp.xmlstream.matcher.id
|
||||
.. module:: slixmpp.xmlstream.matcher.id
|
||||
|
||||
.. autoclass:: MatcherId
|
||||
:members:
|
||||
@@ -19,7 +19,7 @@ ID Matching
|
||||
|
||||
Stanza Path Matching
|
||||
--------------------
|
||||
.. module:: sleekxmpp.xmlstream.matcher.stanzapath
|
||||
.. module:: slixmpp.xmlstream.matcher.stanzapath
|
||||
|
||||
.. autoclass:: StanzaPath
|
||||
:members:
|
||||
@@ -27,7 +27,7 @@ Stanza Path Matching
|
||||
|
||||
XPath
|
||||
-----
|
||||
.. module:: sleekxmpp.xmlstream.matcher.xpath
|
||||
.. module:: slixmpp.xmlstream.matcher.xpath
|
||||
|
||||
.. autoclass:: MatchXPath
|
||||
:members:
|
||||
@@ -35,7 +35,7 @@ XPath
|
||||
|
||||
XMLMask
|
||||
-------
|
||||
.. module:: sleekxmpp.xmlstream.matcher.xmlmask
|
||||
.. module:: slixmpp.xmlstream.matcher.xmlmask
|
||||
|
||||
.. autoclass:: MatchXMLMask
|
||||
:members:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Scheduler
|
||||
=========
|
||||
|
||||
.. module:: sleekxmpp.xmlstream.scheduler
|
||||
.. module:: slixmpp.xmlstream.scheduler
|
||||
|
||||
.. autoclass:: Task
|
||||
:members:
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
Stanza Objects
|
||||
==============
|
||||
|
||||
.. module:: sleekxmpp.xmlstream.stanzabase
|
||||
.. module:: slixmpp.xmlstream.stanzabase
|
||||
|
||||
The :mod:`~sleekmxpp.xmlstream.stanzabase` module provides a wrapper for the
|
||||
The :mod:`~slixmpp.xmlstream.stanzabase` module provides a wrapper for the
|
||||
standard :mod:`~xml.etree.ElementTree` module that makes working with XML
|
||||
less painful. Instead of having to manually move up and down an element
|
||||
tree and insert subelements and attributes, you can interact with an object
|
||||
@@ -52,9 +52,9 @@ elements of the original XML chunk.
|
||||
.. seealso::
|
||||
:ref:`create-stanza-interfaces`.
|
||||
|
||||
Because the :mod:`~sleekxmpp.xmlstream.stanzabase` module was developed
|
||||
Because the :mod:`~slixmpp.xmlstream.stanzabase` module was developed
|
||||
as part of an `XMPP <http://xmpp.org>`_ library, these chunks of XML are
|
||||
referred to as :term:`stanzas <stanza>`, and in SleekXMPP we refer to a
|
||||
referred to as :term:`stanzas <stanza>`, and in Slixmpp we refer to a
|
||||
subclass of :class:`ElementBase` which defines the interfaces needed for
|
||||
interacting with a given :term:`stanza` a :term:`stanza object`.
|
||||
|
||||
@@ -72,7 +72,7 @@ plugin stanza object. Here is an example:
|
||||
|
||||
<iq type="result">
|
||||
<query xmlns="http://jabber.org/protocol/disco#info">
|
||||
<identity category="client" type="bot" name="SleekXMPP Bot" />
|
||||
<identity category="client" type="bot" name="Slixmpp Bot" />
|
||||
</query>
|
||||
</iq>
|
||||
|
||||
@@ -84,13 +84,13 @@ we can access the plugin as so::
|
||||
|
||||
>>> iq['disco_info']
|
||||
'<query xmlns="http://jabber.org/protocol/disco#info">
|
||||
<identity category="client" type="bot" name="SleekXMPP Bot" />
|
||||
<identity category="client" type="bot" name="Slixmpp Bot" />
|
||||
</query>'
|
||||
|
||||
We can then drill down through the plugin object's interfaces as desired::
|
||||
|
||||
>>> iq['disco_info']['identities']
|
||||
[('client', 'bot', 'SleekXMPP Bot')]
|
||||
[('client', 'bot', 'Slixmpp Bot')]
|
||||
|
||||
Plugins may also add new interfaces to the parent stanza object as if they
|
||||
had been defined by the parent directly, and can also override the behaviour
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
.. module:: sleekxmpp.xmlstream.tostring
|
||||
.. module:: slixmpp.xmlstream.tostring
|
||||
|
||||
.. _tostring:
|
||||
|
||||
XML Serialization
|
||||
=================
|
||||
|
||||
Since the XML layer of SleekXMPP is based on :mod:`~xml.etree.ElementTree`,
|
||||
Since the XML layer of Slixmpp is based on :mod:`~xml.etree.ElementTree`,
|
||||
why not just use the built-in :func:`~xml.etree.ElementTree.tostring`
|
||||
method? The answer is that using that method produces ugly results when
|
||||
using namespaces. The :func:`tostring()` method used here intelligently
|
||||
hides namespaces when able and does not introduce excessive namespace
|
||||
prefixes::
|
||||
|
||||
>>> from sleekxmpp.xmlstream.tostring import tostring
|
||||
>>> from slixmpp.xmlstream.tostring import tostring
|
||||
>>> from xml.etree import cElementTree as ET
|
||||
>>> xml = ET.fromstring('<foo xmlns="bar"><baz /></foo>')
|
||||
>>> ET.tostring(xml)
|
||||
@@ -25,7 +25,7 @@ produce unexpected results depending on how the :func:`tostring()` method
|
||||
is invoked. For example, when sending XML on the wire, the main XMPP
|
||||
stanzas with their namespace of ``jabber:client`` will not include the
|
||||
namespace because that is already declared by the stream header. But, if
|
||||
you create a :class:`~sleekxmpp.stanza.message.Message` instance and dump
|
||||
you create a :class:`~slixmpp.stanza.message.Message` instance and dump
|
||||
it to the terminal, the ``jabber:client`` namespace will appear.
|
||||
|
||||
.. autofunction:: tostring
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
XML Stream
|
||||
==========
|
||||
|
||||
.. module:: sleekxmpp.xmlstream.xmlstream
|
||||
.. module:: slixmpp.xmlstream.xmlstream
|
||||
|
||||
.. autoexception:: RestartStream
|
||||
|
||||
|
||||
Reference in New Issue
Block a user