Rename to slixmpp
This commit is contained in:
		
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -6,7 +6,7 @@ docs/_build/ | |||||||
| *.swp | *.swp | ||||||
| .tox/ | .tox/ | ||||||
| .coverage | .coverage | ||||||
| sleekxmpp.egg-info/ | slixmpp.egg-info/ | ||||||
| .ropeproject/ | .ropeproject/ | ||||||
| 4913 | 4913 | ||||||
| *~ | *~ | ||||||
|   | |||||||
							
								
								
									
										97
									
								
								README.rst
									
									
									
									
									
								
							
							
						
						
									
										97
									
								
								README.rst
									
									
									
									
									
								
							| @@ -1,76 +1,12 @@ | |||||||
| SleekXMPP | Slixmpp | ||||||
| ######### | ######### | ||||||
|  |  | ||||||
| SleekXMPP is an MIT licensed XMPP library for Python 2.6/3.1+, | Slixmpp is an MIT licensed XMPP library for Python 3.4+. It is a fork of | ||||||
| and is featured in examples in | SleekXMPP. | ||||||
| `XMPP: The Definitive Guide <http://oreilly.com/catalog/9780596521271>`_  |  | ||||||
| by Kevin Smith, Remko Tronçon, and Peter Saint-Andre. If you've arrived |  | ||||||
| here from reading the Definitive Guide, please see the notes on updating |  | ||||||
| the examples to the latest version of SleekXMPP. |  | ||||||
|  |  | ||||||
| SleekXMPP's design goals and philosphy are: | Slixmpp's goals is to only rewrite the core of the library (the low level | ||||||
|  | socket handling, the timers, the events dispatching) in order to remove all | ||||||
| **Low number of dependencies** | threads. | ||||||
|     Installing and using SleekXMPP should be as simple as possible, without |  | ||||||
|     having to deal with long dependency chains. |  | ||||||
|  |  | ||||||
|     As part of reducing the number of dependencies, some third party |  | ||||||
|     modules are included with SleekXMPP in the ``thirdparty`` directory. |  | ||||||
|     Imports from this module first try to import an existing installed |  | ||||||
|     version before loading the packaged version, when possible. |  | ||||||
|  |  | ||||||
| **Every XEP as a plugin** |  | ||||||
|     Following Python's "batteries included" approach, the goal is to |  | ||||||
|     provide support for all currently active XEPs (final and draft). Since |  | ||||||
|     adding XEP support is done through easy to create plugins, the hope is |  | ||||||
|     to also provide a solid base for implementing and creating experimental |  | ||||||
|     XEPs. |  | ||||||
|  |  | ||||||
| **Rewarding to work with** |  | ||||||
|     As much as possible, SleekXMPP should allow things to "just work" using |  | ||||||
|     sensible defaults and appropriate abstractions. XML can be ugly to work |  | ||||||
|     with, but it doesn't have to be that way. |  | ||||||
|  |  | ||||||
|  |  | ||||||
| Get the Code |  | ||||||
| ------------ |  | ||||||
|  |  | ||||||
| Get the latest stable version from PyPI:: |  | ||||||
|  |  | ||||||
|     pip install sleekxmpp |  | ||||||
|  |  | ||||||
| The latest source code for SleekXMPP may be found on `Github |  | ||||||
| <http://github.com/fritzy/SleekXMPP>`_. Releases can be found in the |  | ||||||
| ``master`` branch, while the latest development version is in the |  | ||||||
| ``develop`` branch. |  | ||||||
|  |  | ||||||
| **Latest Release** |  | ||||||
|     - `1.3.1 <http://github.com/fritzy/SleekXMPP/zipball/1.3.1>`_ |  | ||||||
|  |  | ||||||
| **Develop Releases** |  | ||||||
|     - `Latest Develop Version <http://github.com/fritzy/SleekXMPP/zipball/develop>`_ |  | ||||||
|  |  | ||||||
|  |  | ||||||
| Installing DNSPython |  | ||||||
| --------------------- |  | ||||||
| If you are using Python3 and wish to use dnspython, you will have to checkout and |  | ||||||
| install the ``python3`` branch:: |  | ||||||
|  |  | ||||||
|     git clone http://github.com/rthalley/dnspython |  | ||||||
|     cd dnspython |  | ||||||
|     git checkout python3 |  | ||||||
|     python3 setup.py install |  | ||||||
|  |  | ||||||
| Discussion |  | ||||||
| ---------- |  | ||||||
| A mailing list and XMPP chat room are available for discussing and getting |  | ||||||
| help with SleekXMPP. |  | ||||||
|  |  | ||||||
| **Mailing List** |  | ||||||
|     `SleekXMPP Discussion on Google Groups <http://groups.google.com/group/sleekxmpp-discussion>`_ |  | ||||||
|  |  | ||||||
| **Chat** |  | ||||||
|     `sleek@conference.jabber.org <xmpp:sleek@conference.jabber.org?join>`_ |  | ||||||
|  |  | ||||||
|  |  | ||||||
| Documentation and Testing | Documentation and Testing | ||||||
| @@ -83,22 +19,22 @@ be in ``docs/_build/html``:: | |||||||
|     make html |     make html | ||||||
|     open _build/html/index.html |     open _build/html/index.html | ||||||
|  |  | ||||||
| To run the test suite for SleekXMPP:: | To run the test suite for Slixmpp:: | ||||||
|  |  | ||||||
|     python testall.py |     python testall.py | ||||||
|  |  | ||||||
|  |  | ||||||
| The SleekXMPP Boilerplate | The Slixmpp Boilerplate | ||||||
| ------------------------- | ------------------------- | ||||||
| Projects using SleekXMPP tend to follow a basic pattern for setting up client/component | Projects using Slixmpp tend to follow a basic pattern for setting up client/component | ||||||
| connections and configuration. Here is the gist of the boilerplate needed for a SleekXMPP | connections and configuration. Here is the gist of the boilerplate needed for a Slixmpp | ||||||
| based project. See the documetation or examples directory for more detailed archetypes for | based project. See the documetation or examples directory for more detailed archetypes for | ||||||
| SleekXMPP projects:: | Slixmpp projects:: | ||||||
|  |  | ||||||
|     import logging |     import logging | ||||||
|  |  | ||||||
|     from sleekxmpp import ClientXMPP |     from slixmpp import ClientXMPP | ||||||
|     from sleekxmpp.exceptions import IqError, IqTimeout |     from slixmpp.exceptions import IqError, IqTimeout | ||||||
|  |  | ||||||
|  |  | ||||||
|     class EchoBot(ClientXMPP): |     class EchoBot(ClientXMPP): | ||||||
| @@ -155,8 +91,15 @@ SleekXMPP projects:: | |||||||
|         xmpp.process(block=True) |         xmpp.process(block=True) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | Slixmpp Credits | ||||||
|  | --------------- | ||||||
|  |  | ||||||
|  | **Maintainer of the slixmpp fork:** Florent Le Coz | ||||||
|  |     `louiz@louiz.org <xmpp:louiz@louiz.org?message>`_, | ||||||
|  |  | ||||||
| Credits | Credits | ||||||
| ------- | ------- | ||||||
|  |  | ||||||
| **Main Author:** Nathan Fritz | **Main Author:** Nathan Fritz | ||||||
|     `fritzy@netflint.net <xmpp:fritzy@netflint.net?message>`_,  |     `fritzy@netflint.net <xmpp:fritzy@netflint.net?message>`_,  | ||||||
|     `@fritzy <http://twitter.com/fritzy>`_ |     `@fritzy <http://twitter.com/fritzy>`_ | ||||||
|   | |||||||
| @@ -72,17 +72,17 @@ qthelp: | |||||||
| 	@echo | 	@echo | ||||||
| 	@echo "Build finished; now you can run "qcollectiongenerator" with the" \ | 	@echo "Build finished; now you can run "qcollectiongenerator" with the" \ | ||||||
| 	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:" | 	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:" | ||||||
| 	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/SleekXMPP.qhcp" | 	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Slixmpp.qhcp" | ||||||
| 	@echo "To view the help file:" | 	@echo "To view the help file:" | ||||||
| 	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/SleekXMPP.qhc" | 	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Slixmpp.qhc" | ||||||
|  |  | ||||||
| devhelp: | devhelp: | ||||||
| 	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp | 	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp | ||||||
| 	@echo | 	@echo | ||||||
| 	@echo "Build finished." | 	@echo "Build finished." | ||||||
| 	@echo "To view the help file:" | 	@echo "To view the help file:" | ||||||
| 	@echo "# mkdir -p $$HOME/.local/share/devhelp/SleekXMPP" | 	@echo "# mkdir -p $$HOME/.local/share/devhelp/Slixmpp" | ||||||
| 	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/SleekXMPP" | 	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Slixmpp" | ||||||
| 	@echo "# devhelp" | 	@echo "# devhelp" | ||||||
|  |  | ||||||
| epub: | epub: | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
| BaseXMPP | BaseXMPP | ||||||
| ======== | ======== | ||||||
|  |  | ||||||
| .. module:: sleekxmpp.basexmpp | .. module:: slixmpp.basexmpp | ||||||
|  |  | ||||||
| .. autoclass:: BaseXMPP | .. autoclass:: BaseXMPP | ||||||
|     :members: |     :members: | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
| ClientXMPP | ClientXMPP | ||||||
| ========== | ========== | ||||||
|  |  | ||||||
| .. module:: sleekxmpp.clientxmpp | .. module:: slixmpp.clientxmpp | ||||||
|  |  | ||||||
| .. autoclass:: ClientXMPP | .. autoclass:: ClientXMPP | ||||||
|     :members: |     :members: | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
| ComponentXMPP | ComponentXMPP | ||||||
| ============= | ============= | ||||||
|  |  | ||||||
| .. module:: sleekxmpp.componentxmpp | .. module:: slixmpp.componentxmpp | ||||||
|  |  | ||||||
| .. autoclass:: ComponentXMPP | .. autoclass:: ComponentXMPP | ||||||
|     :members: |     :members: | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| Exceptions | Exceptions | ||||||
| ========== | ========== | ||||||
|  |  | ||||||
| .. module:: sleekxmpp.exceptions | .. module:: slixmpp.exceptions | ||||||
|  |  | ||||||
|      |      | ||||||
| .. autoexception:: XMPPError | .. autoexception:: XMPPError | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| .. module:: sleekxmpp.xmlstream.filesocket | .. module:: slixmpp.xmlstream.filesocket | ||||||
|  |  | ||||||
| .. _filesocket: | .. _filesocket: | ||||||
|  |  | ||||||
|   | |||||||
| @@ -3,14 +3,14 @@ Stanza Handlers | |||||||
|  |  | ||||||
| The Basic Handler | The Basic Handler | ||||||
| ----------------- | ----------------- | ||||||
| .. module:: sleekxmpp.xmlstream.handler.base | .. module:: slixmpp.xmlstream.handler.base | ||||||
|  |  | ||||||
| .. autoclass:: BaseHandler | .. autoclass:: BaseHandler | ||||||
|     :members: |     :members: | ||||||
|  |  | ||||||
| Callback | Callback | ||||||
| -------- | -------- | ||||||
| .. module:: sleekxmpp.xmlstream.handler.callback | .. module:: slixmpp.xmlstream.handler.callback | ||||||
|  |  | ||||||
| .. autoclass:: Callback | .. autoclass:: Callback | ||||||
|     :members: |     :members: | ||||||
| @@ -18,7 +18,7 @@ Callback | |||||||
|  |  | ||||||
| Waiter | Waiter | ||||||
| ------ | ------ | ||||||
| .. module:: sleekxmpp.xmlstream.handler.waiter | .. module:: slixmpp.xmlstream.handler.waiter | ||||||
|  |  | ||||||
| .. autoclass:: Waiter | .. autoclass:: Waiter | ||||||
|     :members: |     :members: | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| Jabber IDs (JID) | Jabber IDs (JID) | ||||||
| ================= | ================= | ||||||
|  |  | ||||||
| .. module:: sleekxmpp.xmlstream.jid | .. module:: slixmpp.xmlstream.jid | ||||||
|  |  | ||||||
| .. autoclass:: JID | .. autoclass:: JID | ||||||
|     :members: |     :members: | ||||||
|   | |||||||
| @@ -3,7 +3,7 @@ Stanza Matchers | |||||||
|  |  | ||||||
| The Basic Matcher | The Basic Matcher | ||||||
| ----------------- | ----------------- | ||||||
| .. module:: sleekxmpp.xmlstream.matcher.base | .. module:: slixmpp.xmlstream.matcher.base | ||||||
|  |  | ||||||
| .. autoclass:: MatcherBase | .. autoclass:: MatcherBase | ||||||
|     :members: |     :members: | ||||||
| @@ -11,7 +11,7 @@ The Basic Matcher | |||||||
|  |  | ||||||
| ID Matching | ID Matching | ||||||
| ----------- | ----------- | ||||||
| .. module:: sleekxmpp.xmlstream.matcher.id | .. module:: slixmpp.xmlstream.matcher.id | ||||||
|  |  | ||||||
| .. autoclass:: MatcherId | .. autoclass:: MatcherId | ||||||
|     :members: |     :members: | ||||||
| @@ -19,7 +19,7 @@ ID Matching | |||||||
|  |  | ||||||
| Stanza Path Matching | Stanza Path Matching | ||||||
| -------------------- | -------------------- | ||||||
| .. module:: sleekxmpp.xmlstream.matcher.stanzapath | .. module:: slixmpp.xmlstream.matcher.stanzapath | ||||||
|  |  | ||||||
| .. autoclass:: StanzaPath | .. autoclass:: StanzaPath | ||||||
|     :members: |     :members: | ||||||
| @@ -27,7 +27,7 @@ Stanza Path Matching | |||||||
|  |  | ||||||
| XPath | XPath | ||||||
| ----- | ----- | ||||||
| .. module:: sleekxmpp.xmlstream.matcher.xpath | .. module:: slixmpp.xmlstream.matcher.xpath | ||||||
|  |  | ||||||
| .. autoclass:: MatchXPath | .. autoclass:: MatchXPath | ||||||
|     :members: |     :members: | ||||||
| @@ -35,7 +35,7 @@ XPath | |||||||
|  |  | ||||||
| XMLMask | XMLMask | ||||||
| ------- | ------- | ||||||
| .. module:: sleekxmpp.xmlstream.matcher.xmlmask | .. module:: slixmpp.xmlstream.matcher.xmlmask | ||||||
|  |  | ||||||
| .. autoclass:: MatchXMLMask | .. autoclass:: MatchXMLMask | ||||||
|     :members: |     :members: | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
| Scheduler | Scheduler | ||||||
| ========= | ========= | ||||||
|  |  | ||||||
| .. module:: sleekxmpp.xmlstream.scheduler | .. module:: slixmpp.xmlstream.scheduler | ||||||
|  |  | ||||||
| .. autoclass:: Task | .. autoclass:: Task | ||||||
|     :members: |     :members: | ||||||
|   | |||||||
| @@ -4,9 +4,9 @@ | |||||||
| Stanza Objects | 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 | standard :mod:`~xml.etree.ElementTree` module that makes working with XML | ||||||
| less painful. Instead of having to manually move up and down an element | 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 | tree and insert subelements and attributes, you can interact with an object | ||||||
| @@ -52,9 +52,9 @@ elements of the original XML chunk. | |||||||
| .. seealso:: | .. seealso:: | ||||||
|     :ref:`create-stanza-interfaces`. |     :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 | 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 | subclass of :class:`ElementBase` which defines the interfaces needed for | ||||||
| interacting with a given :term:`stanza` a :term:`stanza object`. | interacting with a given :term:`stanza` a :term:`stanza object`. | ||||||
|  |  | ||||||
| @@ -72,7 +72,7 @@ plugin stanza object. Here is an example: | |||||||
|  |  | ||||||
|     <iq type="result"> |     <iq type="result"> | ||||||
|       <query xmlns="http://jabber.org/protocol/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> |       </query> | ||||||
|     </iq> |     </iq> | ||||||
|  |  | ||||||
| @@ -84,13 +84,13 @@ we can access the plugin as so:: | |||||||
|  |  | ||||||
|     >>> iq['disco_info'] |     >>> iq['disco_info'] | ||||||
|     '<query xmlns="http://jabber.org/protocol/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>' |     </query>' | ||||||
|  |  | ||||||
| We can then drill down through the plugin object's interfaces as desired:: | We can then drill down through the plugin object's interfaces as desired:: | ||||||
|  |  | ||||||
|     >>> iq['disco_info']['identities'] |     >>> 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 | 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 | 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: | .. _tostring: | ||||||
|  |  | ||||||
| XML Serialization | 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` | why not just use the built-in :func:`~xml.etree.ElementTree.tostring` | ||||||
| method? The answer is that using that method produces ugly results when | method? The answer is that using that method produces ugly results when | ||||||
| using namespaces. The :func:`tostring()` method used here intelligently | using namespaces. The :func:`tostring()` method used here intelligently | ||||||
| hides namespaces when able and does not introduce excessive namespace | hides namespaces when able and does not introduce excessive namespace | ||||||
| prefixes:: | prefixes:: | ||||||
|  |  | ||||||
|     >>> from sleekxmpp.xmlstream.tostring import tostring |     >>> from slixmpp.xmlstream.tostring import tostring | ||||||
|     >>> from xml.etree import cElementTree as ET |     >>> from xml.etree import cElementTree as ET | ||||||
|     >>> xml = ET.fromstring('<foo xmlns="bar"><baz /></foo>') |     >>> xml = ET.fromstring('<foo xmlns="bar"><baz /></foo>') | ||||||
|     >>> ET.tostring(xml) |     >>> 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 | is invoked. For example, when sending XML on the wire, the main XMPP | ||||||
| stanzas with their namespace of ``jabber:client`` will not include the | stanzas with their namespace of ``jabber:client`` will not include the | ||||||
| namespace because that is already declared by the stream header. But, if | 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. | it to the terminal, the ``jabber:client`` namespace will appear. | ||||||
|  |  | ||||||
| .. autofunction:: tostring | .. autofunction:: tostring | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
| XML Stream | XML Stream | ||||||
| ========== | ========== | ||||||
|  |  | ||||||
| .. module:: sleekxmpp.xmlstream.xmlstream | .. module:: slixmpp.xmlstream.xmlstream | ||||||
|  |  | ||||||
| .. autoexception:: RestartStream | .. autoexception:: RestartStream | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,9 +1,9 @@ | |||||||
| .. index:: XMLStream, BaseXMPP, ClientXMPP, ComponentXMPP | .. index:: XMLStream, BaseXMPP, ClientXMPP, ComponentXMPP | ||||||
|  |  | ||||||
| SleekXMPP Architecture | Slixmpp Architecture | ||||||
| ====================== | ====================== | ||||||
|  |  | ||||||
| The core of SleekXMPP is contained in four classes: ``XMLStream``, | The core of Slixmpp is contained in four classes: ``XMLStream``, | ||||||
| ``BaseXMPP``, ``ClientXMPP``, and ``ComponentXMPP``. Along side this | ``BaseXMPP``, ``ClientXMPP``, and ``ComponentXMPP``. Along side this | ||||||
| stack is a library for working with XML objects that eliminates most | stack is a library for working with XML objects that eliminates most | ||||||
| of the tedium of creating/manipulating XML. | of the tedium of creating/manipulating XML. | ||||||
| @@ -17,7 +17,7 @@ of the tedium of creating/manipulating XML. | |||||||
|  |  | ||||||
| The Foundation: XMLStream | The Foundation: XMLStream | ||||||
| ------------------------- | ------------------------- | ||||||
| :class:`~sleekxmpp.xmlstream.xmlstream.XMLStream` is a mostly XMPP-agnostic | :class:`~slixmpp.xmlstream.xmlstream.XMLStream` is a mostly XMPP-agnostic | ||||||
| class whose purpose is to read and write from a bi-directional XML stream. | class whose purpose is to read and write from a bi-directional XML stream. | ||||||
| It also allows for callback functions to execute when XML matching given | It also allows for callback functions to execute when XML matching given | ||||||
| patterns is received; these callbacks are also referred to as :term:`stream | patterns is received; these callbacks are also referred to as :term:`stream | ||||||
| @@ -26,7 +26,7 @@ which can be triggered either manually or on a timed schedule. | |||||||
|  |  | ||||||
| The Main Threads | The Main Threads | ||||||
| ~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~~~~ | ||||||
| :class:`~sleekxmpp.xmlstream.xmlstream.XMLStream` instances run using at | :class:`~slixmpp.xmlstream.xmlstream.XMLStream` instances run using at | ||||||
| least three background threads: the send thread, the read thread, and the | least three background threads: the send thread, the read thread, and the | ||||||
| scheduler thread. The send thread is in charge of monitoring the send queue | scheduler thread. The send thread is in charge of monitoring the send queue | ||||||
| and writing text to the outgoing XML stream. The read thread pulls text off | and writing text to the outgoing XML stream. The read thread pulls text off | ||||||
| @@ -34,7 +34,7 @@ of the incoming XML stream and stores the results in an event queue. The | |||||||
| scheduler thread is used to emit events after a given period of time. | scheduler thread is used to emit events after a given period of time. | ||||||
|  |  | ||||||
| Additionally, the main event processing loop may be executed in its | Additionally, the main event processing loop may be executed in its | ||||||
| own thread if SleekXMPP is being used in the background for another | own thread if Slixmpp is being used in the background for another | ||||||
| application. | application. | ||||||
|  |  | ||||||
| Short-lived threads may also be spawned as requested for threaded | Short-lived threads may also be spawned as requested for threaded | ||||||
| @@ -61,10 +61,10 @@ when this bit of XML is received (with an assumed namespace of | |||||||
|    new object is determined using a map of namespaced element names to |    new object is determined using a map of namespaced element names to | ||||||
|    classes. |    classes. | ||||||
|  |  | ||||||
|    Our incoming XML is thus turned into a :class:`~sleekxmpp.stanza.Message` |    Our incoming XML is thus turned into a :class:`~slixmpp.stanza.Message` | ||||||
|    :term:`stanza object` because the namespaced element name |    :term:`stanza object` because the namespaced element name | ||||||
|    ``{jabber:client}message`` is associated with the class |    ``{jabber:client}message`` is associated with the class | ||||||
|    :class:`~sleekxmpp.stanza.Message`. |    :class:`~slixmpp.stanza.Message`. | ||||||
|  |  | ||||||
| 2. **Match stanza objects to callbacks.** | 2. **Match stanza objects to callbacks.** | ||||||
|  |  | ||||||
| @@ -73,14 +73,14 @@ when this bit of XML is received (with an assumed namespace of | |||||||
|    :term:`stanza object` is paired with a reference to the handler and |    :term:`stanza object` is paired with a reference to the handler and | ||||||
|    placed into the event queue. |    placed into the event queue. | ||||||
|  |  | ||||||
|    Our :class:`~sleekxmpp.stanza.Message` object is thus paired with the message stanza handler |    Our :class:`~slixmpp.stanza.Message` object is thus paired with the message stanza handler | ||||||
|    :meth:`BaseXMPP._handle_message` to create the tuple:: |    :meth:`BaseXMPP._handle_message` to create the tuple:: | ||||||
|  |  | ||||||
|        ('stanza', stanza_obj, handler) |        ('stanza', stanza_obj, handler) | ||||||
|  |  | ||||||
| 3. **Process the event queue.** | 3. **Process the event queue.** | ||||||
|  |  | ||||||
|    The event queue is the heart of SleekXMPP. Nearly every action that |    The event queue is the heart of Slixmpp. Nearly every action that | ||||||
|    takes place is first inserted into this queue, whether that be received |    takes place is first inserted into this queue, whether that be received | ||||||
|    stanzas, custom events, or scheduled events. |    stanzas, custom events, or scheduled events. | ||||||
|  |  | ||||||
| @@ -97,7 +97,7 @@ when this bit of XML is received (with an assumed namespace of | |||||||
|  |  | ||||||
|    Since a :term:`stream handler` shouldn't block, if extensive processing |    Since a :term:`stream handler` shouldn't block, if extensive processing | ||||||
|    for a stanza is required (such as needing to send and receive an |    for a stanza is required (such as needing to send and receive an | ||||||
|    :class:`~sleekxmpp.stanza.Iq` stanza), then custom events must be used. |    :class:`~slixmpp.stanza.Iq` stanza), then custom events must be used. | ||||||
|    These events are not explicitly tied to the incoming XML stream and may |    These events are not explicitly tied to the incoming XML stream and may | ||||||
|    be raised at any time. Importantly, these events may be handled in their |    be raised at any time. Importantly, these events may be handled in their | ||||||
|    own thread. |    own thread. | ||||||
| @@ -148,8 +148,8 @@ when this bit of XML is received (with an assumed namespace of | |||||||
|  |  | ||||||
| Raising XMPP Awareness: BaseXMPP | Raising XMPP Awareness: BaseXMPP | ||||||
| -------------------------------- | -------------------------------- | ||||||
| While :class:`~sleekxmpp.xmlstream.xmlstream.XMLStream` attempts to shy away | While :class:`~slixmpp.xmlstream.xmlstream.XMLStream` attempts to shy away | ||||||
| from anything too XMPP specific, :class:`~sleekxmpp.basexmpp.BaseXMPP`'s | from anything too XMPP specific, :class:`~slixmpp.basexmpp.BaseXMPP`'s | ||||||
| sole purpose is to provide foundational support for sending and receiving | sole purpose is to provide foundational support for sending and receiving | ||||||
| XMPP stanzas. This support includes registering the basic message, | XMPP stanzas. This support includes registering the basic message, | ||||||
| presence, and iq stanzas, methods for creating and sending stanzas, and | presence, and iq stanzas, methods for creating and sending stanzas, and | ||||||
| @@ -157,14 +157,14 @@ default handlers for incoming messages and keeping track of presence | |||||||
| notifications. | notifications. | ||||||
|  |  | ||||||
| The plugin system for adding new XEP support is also maintained by | The plugin system for adding new XEP support is also maintained by | ||||||
| :class:`~sleekxmpp.basexmpp.BaseXMPP`. | :class:`~slixmpp.basexmpp.BaseXMPP`. | ||||||
|  |  | ||||||
| .. index:: ClientXMPP, BaseXMPP | .. index:: ClientXMPP, BaseXMPP | ||||||
|  |  | ||||||
| ClientXMPP | ClientXMPP | ||||||
| ---------- | ---------- | ||||||
| :class:`~sleekxmpp.clientxmpp.ClientXMPP` extends | :class:`~slixmpp.clientxmpp.ClientXMPP` extends | ||||||
| :class:`~sleekxmpp.clientxmpp.BaseXMPP` with additional logic for connecting | :class:`~slixmpp.clientxmpp.BaseXMPP` with additional logic for connecting | ||||||
| to an XMPP server by performing DNS lookups. It also adds support for stream | to an XMPP server by performing DNS lookups. It also adds support for stream | ||||||
| features such as STARTTLS and SASL. | features such as STARTTLS and SASL. | ||||||
|  |  | ||||||
| @@ -172,6 +172,6 @@ features such as STARTTLS and SASL. | |||||||
|  |  | ||||||
| ComponentXMPP | ComponentXMPP | ||||||
| ------------- | ------------- | ||||||
| :class:`~sleekxmpp.componentxmpp.ComponentXMPP` is only a thin layer on top of | :class:`~slixmpp.componentxmpp.ComponentXMPP` is only a thin layer on top of | ||||||
| :class:`~sleekxmpp.basexmpp.BaseXMPP` that implements the component handshake | :class:`~slixmpp.basexmpp.BaseXMPP` that implements the component handshake | ||||||
| protocol. | protocol. | ||||||
|   | |||||||
							
								
								
									
										12
									
								
								docs/conf.py
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								docs/conf.py
									
									
									
									
									
								
							| @@ -1,6 +1,6 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
| # | # | ||||||
| # SleekXMPP documentation build configuration file, created by | # Slixmpp documentation build configuration file, created by | ||||||
| # sphinx-quickstart on Tue Aug  9 22:27:06 2011. | # sphinx-quickstart on Tue Aug  9 22:27:06 2011. | ||||||
| # | # | ||||||
| # This file is execfile()d with the current directory set to its containing dir. | # This file is execfile()d with the current directory set to its containing dir. | ||||||
| @@ -40,7 +40,7 @@ source_suffix = '.rst' | |||||||
| master_doc = 'index' | master_doc = 'index' | ||||||
|  |  | ||||||
| # General information about the project. | # General information about the project. | ||||||
| project = u'SleekXMPP' | project = u'Slixmpp' | ||||||
| copyright = u'2011, Nathan Fritz, Lance Stout' | copyright = u'2011, Nathan Fritz, Lance Stout' | ||||||
|  |  | ||||||
| # The version info for the project you're documenting, acts as replacement for | # The version info for the project you're documenting, acts as replacement for | ||||||
| @@ -105,7 +105,7 @@ html_theme = 'haiku' | |||||||
|  |  | ||||||
| # The name for this set of Sphinx documents.  If None, it defaults to | # The name for this set of Sphinx documents.  If None, it defaults to | ||||||
| # "<project> v<release> documentation". | # "<project> v<release> documentation". | ||||||
| html_title = 'SleekXMPP' | html_title = 'Slixmpp' | ||||||
|  |  | ||||||
| # A shorter title for the navigation bar.  Default is the same as html_title. | # A shorter title for the navigation bar.  Default is the same as html_title. | ||||||
| html_short_title = '%s Documentation' % release | html_short_title = '%s Documentation' % release | ||||||
| @@ -168,7 +168,7 @@ html_additional_pages = { | |||||||
| #html_file_suffix = None | #html_file_suffix = None | ||||||
|  |  | ||||||
| # Output file base name for HTML help builder. | # Output file base name for HTML help builder. | ||||||
| htmlhelp_basename = 'SleekXMPPdoc' | htmlhelp_basename = 'Slixmppdoc' | ||||||
|  |  | ||||||
|  |  | ||||||
| # -- Options for LaTeX output -------------------------------------------------- | # -- Options for LaTeX output -------------------------------------------------- | ||||||
| @@ -182,7 +182,7 @@ htmlhelp_basename = 'SleekXMPPdoc' | |||||||
| # Grouping the document tree into LaTeX files. List of tuples | # Grouping the document tree into LaTeX files. List of tuples | ||||||
| # (source start file, target name, title, author, documentclass [howto/manual]). | # (source start file, target name, title, author, documentclass [howto/manual]). | ||||||
| latex_documents = [ | latex_documents = [ | ||||||
|   ('index', 'SleekXMPP.tex', u'SleekXMPP Documentation', |   ('index', 'Slixmpp.tex', u'Slixmpp Documentation', | ||||||
|    u'Nathan Fritz, Lance Stout', 'manual'), |    u'Nathan Fritz, Lance Stout', 'manual'), | ||||||
| ] | ] | ||||||
|  |  | ||||||
| @@ -215,7 +215,7 @@ latex_documents = [ | |||||||
| # One entry per manual page. List of tuples | # One entry per manual page. List of tuples | ||||||
| # (source start file, name, description, authors, manual section). | # (source start file, name, description, authors, manual section). | ||||||
| man_pages = [ | man_pages = [ | ||||||
|     ('index', 'sleekxmpp', u'SleekXMPP Documentation', |     ('index', 'slixmpp', u'Slixmpp Documentation', | ||||||
|      [u'Nathan Fritz, Lance Stout'], 1) |      [u'Nathan Fritz, Lance Stout'], 1) | ||||||
| ] | ] | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,10 +1,10 @@ | |||||||
| .. _create-plugin: | .. _create-plugin: | ||||||
|  |  | ||||||
| Creating a SleekXMPP Plugin | Creating a Slixmpp Plugin | ||||||
| =========================== | =========================== | ||||||
|  |  | ||||||
| One of the goals of SleekXMPP is to provide support for every draft or final | One of the goals of Slixmpp is to provide support for every draft or final | ||||||
| XMPP extension (`XEP <http://xmpp.org/extensions/>`_). To do this, SleekXMPP has a | XMPP extension (`XEP <http://xmpp.org/extensions/>`_). To do this, Slixmpp has a | ||||||
| plugin mechanism for adding the functionalities required by each XEP. But even | plugin mechanism for adding the functionalities required by each XEP. But even | ||||||
| though plugins were made to quickly implement and prototype the official XMPP | though plugins were made to quickly implement and prototype the official XMPP | ||||||
| extensions, there is no reason you can't create your own plugin to implement | extensions, there is no reason you can't create your own plugin to implement | ||||||
| @@ -14,11 +14,11 @@ This guide will help walk you through the steps to | |||||||
| implement a rudimentary version of `XEP-0077 In-band | implement a rudimentary version of `XEP-0077 In-band | ||||||
| Registration <http://xmpp.org/extensions/xep-0077.html>`_. In-band registration | Registration <http://xmpp.org/extensions/xep-0077.html>`_. In-band registration | ||||||
| was implemented in example 14-6 (page 223) of `XMPP: The Definitive | was implemented in example 14-6 (page 223) of `XMPP: The Definitive | ||||||
| Guide <http://oreilly.com/catalog/9780596521271>`_ because there was no SleekXMPP | Guide <http://oreilly.com/catalog/9780596521271>`_ because there was no Slixmpp | ||||||
| plugin for XEP-0077 at the time of writing. We will partially fix that issue | plugin for XEP-0077 at the time of writing. We will partially fix that issue | ||||||
| here by turning the example implementation from *XMPP: The Definitive Guide* | here by turning the example implementation from *XMPP: The Definitive Guide* | ||||||
| into a plugin. Again, note that this will not a complete implementation, and a | into a plugin. Again, note that this will not a complete implementation, and a | ||||||
| different, more robust, official plugin for XEP-0077 may be added to SleekXMPP | different, more robust, official plugin for XEP-0077 may be added to Slixmpp | ||||||
| in the future. | in the future. | ||||||
|  |  | ||||||
| .. note:: | .. note:: | ||||||
| @@ -29,10 +29,10 @@ in the future. | |||||||
|  |  | ||||||
| First Steps | First Steps | ||||||
| ----------- | ----------- | ||||||
| Every plugin inherits from the class :mod:`base_plugin <sleekxmpp.plugins.base.base_plugin>`, | Every plugin inherits from the class :mod:`base_plugin <slixmpp.plugins.base.base_plugin>`, | ||||||
| and must include a ``plugin_init`` method. While the | and must include a ``plugin_init`` method. While the | ||||||
| plugins distributed with SleekXMPP must be placed in the plugins directory | plugins distributed with Slixmpp must be placed in the plugins directory | ||||||
| ``sleekxmpp/plugins`` to be loaded, custom plugins may be loaded from any | ``slixmpp/plugins`` to be loaded, custom plugins may be loaded from any | ||||||
| module. To do so, use the following form when registering the plugin: | module. To do so, use the following form when registering the plugin: | ||||||
|  |  | ||||||
| .. code-block:: python | .. code-block:: python | ||||||
| @@ -42,7 +42,7 @@ module. To do so, use the following form when registering the plugin: | |||||||
| The plugin name must be the same as the plugin's class name. | The plugin name must be the same as the plugin's class name. | ||||||
|   |   | ||||||
| Now, we can open our favorite text editors and create ``xep_0077.py`` in | Now, we can open our favorite text editors and create ``xep_0077.py`` in | ||||||
| ``SleekXMPP/sleekxmpp/plugins``. We want to do some basic house-keeping and | ``Slixmpp/slixmpp/plugins``. We want to do some basic house-keeping and | ||||||
| declare the name and description of the XEP we are implementing. If you | declare the name and description of the XEP we are implementing. If you | ||||||
| are creating your own custom plugin, you don't need to include the ``xep`` | are creating your own custom plugin, you don't need to include the ``xep`` | ||||||
| attribute. | attribute. | ||||||
| @@ -50,13 +50,13 @@ attribute. | |||||||
| .. code-block:: python | .. code-block:: python | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     Creating a SleekXMPP Plugin |     Creating a Slixmpp Plugin | ||||||
|  |  | ||||||
|     This is a minimal implementation of XEP-0077 to serve |     This is a minimal implementation of XEP-0077 to serve | ||||||
|     as a tutorial for creating SleekXMPP plugins. |     as a tutorial for creating Slixmpp plugins. | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     from sleekxmpp.plugins.base import base_plugin |     from slixmpp.plugins.base import base_plugin | ||||||
|  |  | ||||||
|     class xep_0077(base_plugin): |     class xep_0077(base_plugin): | ||||||
|         """ |         """ | ||||||
| @@ -68,7 +68,7 @@ attribute. | |||||||
|             self.xep = "0077" |             self.xep = "0077" | ||||||
|  |  | ||||||
| Now that we have a basic plugin, we need to edit | Now that we have a basic plugin, we need to edit | ||||||
| ``sleekxmpp/plugins/__init__.py`` to include our new plugin by adding | ``slixmpp/plugins/__init__.py`` to include our new plugin by adding | ||||||
| ``'xep_0077'`` to the ``__all__`` declaration. | ``'xep_0077'`` to the ``__all__`` declaration. | ||||||
|  |  | ||||||
| Interacting with Other Plugins | Interacting with Other Plugins | ||||||
| @@ -83,12 +83,12 @@ finish activating the plugin. | |||||||
|  |  | ||||||
| The ``post_init`` method needs to call ``base_plugin.post_init(self)`` | The ``post_init`` method needs to call ``base_plugin.post_init(self)`` | ||||||
| which will mark that ``post_init`` has been called for the plugin. Once the | which will mark that ``post_init`` has been called for the plugin. Once the | ||||||
| SleekXMPP object begins processing, ``post_init`` will be called on any plugins | Slixmpp object begins processing, ``post_init`` will be called on any plugins | ||||||
| that have not already run ``post_init``. This allows you to register plugins and | that have not already run ``post_init``. This allows you to register plugins and | ||||||
| their dependencies without needing to worry about the order in which you do so. | their dependencies without needing to worry about the order in which you do so. | ||||||
|  |  | ||||||
| **Note:** by adding this call we have introduced a dependency on the XEP-0030 | **Note:** by adding this call we have introduced a dependency on the XEP-0030 | ||||||
| plugin. Be sure to register ``'xep_0030'`` as well as ``'xep_0077'``. SleekXMPP | plugin. Be sure to register ``'xep_0030'`` as well as ``'xep_0077'``. Slixmpp | ||||||
| does not automatically load plugin dependencies for you. | does not automatically load plugin dependencies for you. | ||||||
|  |  | ||||||
| .. code-block:: python | .. code-block:: python | ||||||
| @@ -141,7 +141,7 @@ behaviour: | |||||||
|     **Note:** The accessor methods currently use title case, and not camel case. |     **Note:** The accessor methods currently use title case, and not camel case. | ||||||
|     Thus if you need to access an item named ``"methodName"`` you will need to |     Thus if you need to access an item named ``"methodName"`` you will need to | ||||||
|     use ``getMethodname``. This naming convention might change to full camel |     use ``getMethodname``. This naming convention might change to full camel | ||||||
|     case in a future version of SleekXMPP. |     case in a future version of Slixmpp. | ||||||
|  |  | ||||||
| * ``sub_interfaces`` | * ``sub_interfaces`` | ||||||
|     A subset of ``interfaces``, but these keys map to the text of any |     A subset of ``interfaces``, but these keys map to the text of any | ||||||
| @@ -156,8 +156,8 @@ behaviour: | |||||||
|  |  | ||||||
| .. code-block:: python | .. code-block:: python | ||||||
|  |  | ||||||
|     from sleekxmpp.xmlstream import ElementBase, ET, JID, register_stanza_plugin |     from slixmpp.xmlstream import ElementBase, ET, JID, register_stanza_plugin | ||||||
|     from sleekxmpp import Iq |     from slixmpp import Iq | ||||||
|  |  | ||||||
|     class Registration(ElementBase): |     class Registration(ElementBase): | ||||||
|         namespace = 'jabber:iq:register' |         namespace = 'jabber:iq:register' | ||||||
| @@ -209,7 +209,7 @@ registration to our ``plugin_init`` method. | |||||||
|  |  | ||||||
| Also, we need to associate our ``Registration`` class with IQ stanzas; | Also, we need to associate our ``Registration`` class with IQ stanzas; | ||||||
| that requires the use of the ``register_stanza_plugin`` function (in | that requires the use of the ``register_stanza_plugin`` function (in | ||||||
| ``sleekxmpp.xmlstream.stanzabase``) which takes the class of a parent stanza | ``slixmpp.xmlstream.stanzabase``) which takes the class of a parent stanza | ||||||
| type followed by the substanza type. In our case, the parent stanza is an IQ | type followed by the substanza type. In our case, the parent stanza is an IQ | ||||||
| stanza, and the substanza is our registration query. | stanza, and the substanza is our registration query. | ||||||
|  |  | ||||||
| @@ -484,12 +484,12 @@ and that we specified the form fields we wish to use with | |||||||
|  |  | ||||||
| .. code-block:: python | .. code-block:: python | ||||||
|  |  | ||||||
|     import sleekxmpp.componentxmpp |     import slixmpp.componentxmpp | ||||||
|  |  | ||||||
|     class Example(sleekxmpp.componentxmpp.ComponentXMPP): |     class Example(slixmpp.componentxmpp.ComponentXMPP): | ||||||
|  |  | ||||||
|         def __init__(self, jid, password): |         def __init__(self, jid, password): | ||||||
|             sleekxmpp.componentxmpp.ComponentXMPP.__init__(self, jid, password, 'localhost', 8888) |             slixmpp.componentxmpp.ComponentXMPP.__init__(self, jid, password, 'localhost', 8888) | ||||||
|  |  | ||||||
|             self.registerPlugin('xep_0030') |             self.registerPlugin('xep_0030') | ||||||
|             self.registerPlugin('xep_0077') |             self.registerPlugin('xep_0077') | ||||||
| @@ -517,17 +517,17 @@ with some additional registration fields implemented. | |||||||
| .. code-block:: python | .. code-block:: python | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     Creating a SleekXMPP Plugin |     Creating a Slixmpp Plugin | ||||||
|  |  | ||||||
|     This is a minimal implementation of XEP-0077 to serve |     This is a minimal implementation of XEP-0077 to serve | ||||||
|     as a tutorial for creating SleekXMPP plugins. |     as a tutorial for creating Slixmpp plugins. | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     from sleekxmpp.plugins.base import base_plugin |     from slixmpp.plugins.base import base_plugin | ||||||
|     from sleekxmpp.xmlstream.handler.callback import Callback |     from slixmpp.xmlstream.handler.callback import Callback | ||||||
|     from sleekxmpp.xmlstream.matcher.xpath import MatchXPath |     from slixmpp.xmlstream.matcher.xpath import MatchXPath | ||||||
|     from sleekxmpp.xmlstream import ElementBase, ET, JID, register_stanza_plugin |     from slixmpp.xmlstream import ElementBase, ET, JID, register_stanza_plugin | ||||||
|     from sleekxmpp import Iq |     from slixmpp import Iq | ||||||
|     import copy |     import copy | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -6,33 +6,33 @@ Event Index | |||||||
|  |  | ||||||
|     connected |     connected | ||||||
|         - **Data:** ``{}`` |         - **Data:** ``{}`` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.xmlstream.XMLstream` |         - **Source:** :py:class:`~slixmpp.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 |     connection_failed | ||||||
|         - **Data:** ``{}`` or ``Failure Stanza`` if available |         - **Data:** ``{}`` or ``Failure Stanza`` if available | ||||||
|         - **Source:** :py:class:`~sleekxmpp.xmlstream.XMLstream` |         - **Source:** :py:class:`~slixmpp.xmlstream.XMLstream` | ||||||
|  |  | ||||||
|         Signal that a connection can not be established after number of attempts. |         Signal that a connection can not be established after number of attempts. | ||||||
|  |  | ||||||
|     changed_status |     changed_status | ||||||
|         - **Data:** :py:class:`~sleekxmpp.Presence` |         - **Data:** :py:class:`~slixmpp.Presence` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.roster.item.RosterItem` |         - **Source:** :py:class:`~slixmpp.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. | ||||||
|  |  | ||||||
|     changed_subscription |     changed_subscription | ||||||
|         - **Data:** :py:class:`~sleekxmpp.Presence` |         - **Data:** :py:class:`~slixmpp.Presence` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.BaseXMPP` |         - **Source:** :py:class:`~slixmpp.BaseXMPP` | ||||||
|  |  | ||||||
|         Triggered whenever a presence stanza with a type of ``subscribe``, |         Triggered whenever a presence stanza with a type of ``subscribe``, | ||||||
|         ``subscribed``, ``unsubscribe``, or ``unsubscribed`` is received. |         ``subscribed``, ``unsubscribe``, or ``unsubscribed`` is received. | ||||||
|  |  | ||||||
|         Note that if the values ``xmpp.auto_authorize`` and ``xmpp.auto_subscribe`` |         Note that if the values ``xmpp.auto_authorize`` and ``xmpp.auto_subscribe`` | ||||||
|         are set to ``True`` or ``False``, and not ``None``, then SleekXMPP will |         are set to ``True`` or ``False``, and not ``None``, then Slixmpp will | ||||||
|         either accept or reject all subscription requests before your event handlers |         either accept or reject all subscription requests before your event handlers | ||||||
|         are called. Set these values to ``None`` if you wish to make more complex |         are called. Set these values to ``None`` if you wish to make more complex | ||||||
|         subscription decisions. |         subscription decisions. | ||||||
| @@ -58,20 +58,20 @@ Event Index | |||||||
|         - **Source:** |         - **Source:** | ||||||
|  |  | ||||||
|     disco_info |     disco_info | ||||||
|         - **Data:** :py:class:`~sleekxmpp.plugins.xep_0030.stanza.DiscoInfo` |         - **Data:** :py:class:`~slixmpp.plugins.xep_0030.stanza.DiscoInfo` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.plugins.xep_0030.disco.xep_0030` |         - **Source:** :py:class:`~slixmpp.plugins.xep_0030.disco.xep_0030` | ||||||
|          |          | ||||||
|         Triggered whenever a ``disco#info`` result stanza is received. |         Triggered whenever a ``disco#info`` result stanza is received. | ||||||
|  |  | ||||||
|     disco_items |     disco_items | ||||||
|         - **Data:** :py:class:`~sleekxmpp.plugins.xep_0030.stanza.DiscoItems` |         - **Data:** :py:class:`~slixmpp.plugins.xep_0030.stanza.DiscoItems` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.plugins.xep_0030.disco.xep_0030` |         - **Source:** :py:class:`~slixmpp.plugins.xep_0030.disco.xep_0030` | ||||||
|          |          | ||||||
|         Triggered whenever a ``disco#items`` result stanza is received. |         Triggered whenever a ``disco#items`` result stanza is received. | ||||||
|  |  | ||||||
|     disconnected |     disconnected | ||||||
|         - **Data:** ``{}`` |         - **Data:** ``{}`` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.xmlstream.XMLstream` |         - **Source:** :py:class:`~slixmpp.xmlstream.XMLstream` | ||||||
|  |  | ||||||
|         Signal that the connection with the XMPP server has been lost. |         Signal that the connection with the XMPP server has been lost. | ||||||
|  |  | ||||||
| @@ -81,33 +81,33 @@ Event Index | |||||||
|  |  | ||||||
|     failed_auth |     failed_auth | ||||||
|         - **Data:** ``{}`` |         - **Data:** ``{}`` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.ClientXMPP`, :py:class:`~sleekxmpp.plugins.xep_0078.xep_0078` |         - **Source:** :py:class:`~slixmpp.ClientXMPP`, :py:class:`~slixmpp.plugins.xep_0078.xep_0078` | ||||||
|  |  | ||||||
|         Signal that the server has rejected the provided login credentials. |         Signal that the server has rejected the provided login credentials. | ||||||
|  |  | ||||||
|     gmail_notify |     gmail_notify | ||||||
|         - **Data:** ``{}`` |         - **Data:** ``{}`` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.plugins.gmail_notify.gmail_notify` |         - **Source:** :py:class:`~slixmpp.plugins.gmail_notify.gmail_notify` | ||||||
|          |          | ||||||
|         Signal that there are unread emails for the Gmail account associated with the current XMPP account. |         Signal that there are unread emails for the Gmail account associated with the current XMPP account. | ||||||
|  |  | ||||||
|     gmail_messages |     gmail_messages | ||||||
|         - **Data:** :py:class:`~sleekxmpp.Iq` |         - **Data:** :py:class:`~slixmpp.Iq` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.plugins.gmail_notify.gmail_notify` |         - **Source:** :py:class:`~slixmpp.plugins.gmail_notify.gmail_notify` | ||||||
|          |          | ||||||
|         Signal that there are unread emails for the Gmail account associated with the current XMPP account. |         Signal that there are unread emails for the Gmail account associated with the current XMPP account. | ||||||
|  |  | ||||||
|     got_online |     got_online | ||||||
|         - **Data:** :py:class:`~sleekxmpp.Presence` |         - **Data:** :py:class:`~slixmpp.Presence` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.roster.item.RosterItem` |         - **Source:** :py:class:`~slixmpp.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:`~slixmpp.Presence` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.roster.item.RosterItem` |         - **Source:** :py:class:`~slixmpp.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. | ||||||
|  |  | ||||||
| @@ -116,24 +116,24 @@ Event Index | |||||||
|         - **Source:** |         - **Source:** | ||||||
|  |  | ||||||
|     groupchat_direct_invite |     groupchat_direct_invite | ||||||
|         - **Data:** :py:class:`~sleekxmpp.Message` |         - **Data:** :py:class:`~slixmpp.Message` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.plugins.xep_0249.direct` |         - **Source:** :py:class:`~slixmpp.plugins.xep_0249.direct` | ||||||
|  |  | ||||||
|     groupchat_message |     groupchat_message | ||||||
|         - **Data:** :py:class:`~sleekxmpp.Message` |         - **Data:** :py:class:`~slixmpp.Message` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.plugins.xep_0045.xep_0045` |         - **Source:** :py:class:`~slixmpp.plugins.xep_0045.xep_0045` | ||||||
|          |          | ||||||
|         Triggered whenever a message is received from a multi-user chat room. |         Triggered whenever a message is received from a multi-user chat room. | ||||||
|  |  | ||||||
|     groupchat_presence |     groupchat_presence | ||||||
|         - **Data:** :py:class:`~sleekxmpp.Presence` |         - **Data:** :py:class:`~slixmpp.Presence` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.plugins.xep_0045.xep_0045` |         - **Source:** :py:class:`~slixmpp.plugins.xep_0045.xep_0045` | ||||||
|          |          | ||||||
|         Triggered whenever a presence stanza is received from a user in a multi-user chat room. |         Triggered whenever a presence stanza is received from a user in a multi-user chat room. | ||||||
|  |  | ||||||
|     groupchat_subject |     groupchat_subject | ||||||
|         - **Data:** :py:class:`~sleekxmpp.Message` |         - **Data:** :py:class:`~slixmpp.Message` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.plugins.xep_0045.xep_0045` |         - **Source:** :py:class:`~slixmpp.plugins.xep_0045.xep_0045` | ||||||
|          |          | ||||||
|         Triggered whenever the subject of a multi-user chat room is changed, or announced when joining a room. |         Triggered whenever the subject of a multi-user chat room is changed, or announced when joining a room. | ||||||
|  |  | ||||||
| @@ -146,21 +146,21 @@ Event Index | |||||||
|         - **Source:** |         - **Source:** | ||||||
|  |  | ||||||
|     message |     message | ||||||
|         - **Data:** :py:class:`~sleekxmpp.Message` |         - **Data:** :py:class:`~slixmpp.Message` | ||||||
|         - **Source:** :py:class:`BaseXMPP <sleekxmpp.BaseXMPP>` |         - **Source:** :py:class:`BaseXMPP <slixmpp.BaseXMPP>` | ||||||
|          |          | ||||||
|         Makes the contents of message stanzas available whenever one is received. Be |         Makes the contents of message stanzas available whenever one is received. Be | ||||||
|         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:`~slixmpp.plugins.xep_0004.Form` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.plugins.xep_0004.xep_0004` |         - **Source:** :py:class:`~slixmpp.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:`~slixmpp.plugins.xep_0004.Form` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.plugins.xep_0004.xep_0004` |         - **Source:** :py:class:`~slixmpp.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. | ||||||
|  |  | ||||||
| @@ -181,74 +181,74 @@ Event Index | |||||||
|         - **Source:** |         - **Source:** | ||||||
|  |  | ||||||
|     presence_available |     presence_available | ||||||
|         - **Data:** :py:class:`~sleekxmpp.Presence` |         - **Data:** :py:class:`~slixmpp.Presence` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.BaseXMPP` |         - **Source:** :py:class:`~slixmpp.BaseXMPP` | ||||||
|          |          | ||||||
|         A presence stanza with a type of '``available``' is received. |         A presence stanza with a type of '``available``' is received. | ||||||
|  |  | ||||||
|     presence_error |     presence_error | ||||||
|         - **Data:** :py:class:`~sleekxmpp.Presence` |         - **Data:** :py:class:`~slixmpp.Presence` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.BaseXMPP` |         - **Source:** :py:class:`~slixmpp.BaseXMPP` | ||||||
|          |          | ||||||
|         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:`~slixmpp.plugins.xep_0004.Form` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.plugins.xep_0004.xep_0004` |         - **Source:** :py:class:`~slixmpp.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. | ||||||
|  |  | ||||||
|     presence_probe |     presence_probe | ||||||
|         - **Data:** :py:class:`~sleekxmpp.Presence` |         - **Data:** :py:class:`~slixmpp.Presence` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.BaseXMPP` |         - **Source:** :py:class:`~slixmpp.BaseXMPP` | ||||||
|          |          | ||||||
|         A presence stanza with a type of '``probe``' is received. |         A presence stanza with a type of '``probe``' is received. | ||||||
|  |  | ||||||
|     presence_subscribe |     presence_subscribe | ||||||
|         - **Data:** :py:class:`~sleekxmpp.Presence` |         - **Data:** :py:class:`~slixmpp.Presence` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.BaseXMPP` |         - **Source:** :py:class:`~slixmpp.BaseXMPP` | ||||||
|          |          | ||||||
|         A presence stanza with a type of '``subscribe``' is received. |         A presence stanza with a type of '``subscribe``' is received. | ||||||
|  |  | ||||||
|     presence_subscribed |     presence_subscribed | ||||||
|         - **Data:** :py:class:`~sleekxmpp.Presence` |         - **Data:** :py:class:`~slixmpp.Presence` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.BaseXMPP` |         - **Source:** :py:class:`~slixmpp.BaseXMPP` | ||||||
|          |          | ||||||
|         A presence stanza with a type of '``subscribed``' is received. |         A presence stanza with a type of '``subscribed``' is received. | ||||||
|  |  | ||||||
|     presence_unavailable |     presence_unavailable | ||||||
|         - **Data:** :py:class:`~sleekxmpp.Presence` |         - **Data:** :py:class:`~slixmpp.Presence` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.BaseXMPP` |         - **Source:** :py:class:`~slixmpp.BaseXMPP` | ||||||
|          |          | ||||||
|         A presence stanza with a type of '``unavailable``' is received. |         A presence stanza with a type of '``unavailable``' is received. | ||||||
|  |  | ||||||
|     presence_unsubscribe |     presence_unsubscribe | ||||||
|         - **Data:** :py:class:`~sleekxmpp.Presence` |         - **Data:** :py:class:`~slixmpp.Presence` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.BaseXMPP` |         - **Source:** :py:class:`~slixmpp.BaseXMPP` | ||||||
|          |          | ||||||
|         A presence stanza with a type of '``unsubscribe``' is received. |         A presence stanza with a type of '``unsubscribe``' is received. | ||||||
|  |  | ||||||
|     presence_unsubscribed |     presence_unsubscribed | ||||||
|         - **Data:** :py:class:`~sleekxmpp.Presence` |         - **Data:** :py:class:`~slixmpp.Presence` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.BaseXMPP` |         - **Source:** :py:class:`~slixmpp.BaseXMPP` | ||||||
|          |          | ||||||
|         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:`~slixmpp.stanza.Roster` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.ClientXMPP` |         - **Source:** :py:class:`~slixmpp.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:`~sleekxmpp.roster.multi.Roster` |         - **Source:** :py:class:`~slixmpp.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:`~sleekxmpp.xmlstream.XMLstream` |         - **Source:** :py:class:`~slixmpp.xmlstream.XMLstream` | ||||||
|  |  | ||||||
|         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 | ||||||
| @@ -260,16 +260,16 @@ Event Index | |||||||
|  |  | ||||||
|     session_start |     session_start | ||||||
|         - **Data:** ``{}`` |         - **Data:** ``{}`` | ||||||
|         - **Source:** :py:class:`ClientXMPP <sleekxmpp.ClientXMPP>`, |         - **Source:** :py:class:`ClientXMPP <slixmpp.ClientXMPP>`, | ||||||
|           :py:class:`ComponentXMPP <sleekxmpp.ComponentXMPP>` |           :py:class:`ComponentXMPP <slixmpp.ComponentXMPP>` | ||||||
|           :py:class:`XEP-0078 <sleekxmpp.plugins.xep_0078>` |           :py:class:`XEP-0078 <slixmpp.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:`~slixmpp.xmlstream.XMLstream` | ||||||
|  |  | ||||||
|     stream_error |     stream_error | ||||||
|         - **Data:** :py:class:`~sleekxmpp.stanza.StreamError` |         - **Data:** :py:class:`~slixmpp.stanza.StreamError` | ||||||
|         - **Source:** :py:class:`~sleekxmpp.BaseXMPP` |         - **Source:** :py:class:`~slixmpp.BaseXMPP` | ||||||
|   | |||||||
| @@ -8,17 +8,17 @@ Create and Run a Server Component | |||||||
|      |      | ||||||
|     If you have any issues working through this quickstart guide |     If you have any issues working through this quickstart guide | ||||||
|     or the other tutorials here, please either send a message to the |     or the other tutorials here, please either send a message to the | ||||||
|     `mailing list <http://groups.google.com/group/sleekxmpp-discussion>`_ |     `mailing list <http://groups.google.com/group/slixmpp-discussion>`_ | ||||||
|     or join the chat room at `sleek@conference.jabber.org |     or join the chat room at `sleek@conference.jabber.org | ||||||
|     <xmpp:sleek@conference.jabber.org?join>`_. |     <xmpp:sleek@conference.jabber.org?join>`_. | ||||||
|  |  | ||||||
| If you have not yet installed SleekXMPP, do so now by either checking out a version | If you have not yet installed Slixmpp, do so now by either checking out a version | ||||||
| from `Github <http://github.com/fritzy/SleekXMPP>`_, or installing it using ``pip`` | from `Github <http://github.com/fritzy/Slixmpp>`_, or installing it using ``pip`` | ||||||
| or ``easy_install``. | or ``easy_install``. | ||||||
|  |  | ||||||
| .. code-block:: sh | .. code-block:: sh | ||||||
|  |  | ||||||
|     pip install sleekxmpp  # Or: easy_install sleekxmpp |     pip install slixmpp  # Or: easy_install slixmpp | ||||||
|  |  | ||||||
|  |  | ||||||
| Many XMPP applications eventually graduate to requiring to run as a server  | Many XMPP applications eventually graduate to requiring to run as a server  | ||||||
| @@ -30,7 +30,7 @@ The first difference is that we will add an additional import statement: | |||||||
|  |  | ||||||
| .. code-block:: python | .. code-block:: python | ||||||
|  |  | ||||||
|     from sleekxmpp.componentxmpp import ComponentXMPP |     from slixmpp.componentxmpp import ComponentXMPP | ||||||
|  |  | ||||||
| Likewise, we will change the bot's class definition to match: | Likewise, we will change the bot's class definition to match: | ||||||
|  |  | ||||||
| @@ -48,7 +48,7 @@ a MUC component, the following could be used: | |||||||
|  |  | ||||||
| .. code-block:: python | .. code-block:: python | ||||||
|  |  | ||||||
|     muc = ComponentXMPP('muc.sleekxmpp.com', '******', 'sleekxmpp.com', 5555) |     muc = ComponentXMPP('muc.slixmpp.com', '******', 'slixmpp.com', 5555) | ||||||
|  |  | ||||||
| .. note:: | .. note:: | ||||||
|  |  | ||||||
| @@ -62,10 +62,10 @@ with presence. | |||||||
| The other, main difference with components is that the | The other, main difference with components is that the | ||||||
| ``'from'`` value for every stanza must be explicitly set, since | ``'from'`` value for every stanza must be explicitly set, since | ||||||
| components may send stanzas from multiple JIDs. To do so, | components may send stanzas from multiple JIDs. To do so, | ||||||
| the :meth:`~sleekxmpp.basexmpp.BaseXMPP.send_message()` and | the :meth:`~slixmpp.basexmpp.BaseXMPP.send_message()` and | ||||||
| :meth:`~sleekxmpp.basexmpp.BaseXMPP.send_presence()` accept the parameters | :meth:`~slixmpp.basexmpp.BaseXMPP.send_presence()` accept the parameters | ||||||
| ``mfrom`` and ``pfrom``, respectively. For any method that uses | ``mfrom`` and ``pfrom``, respectively. For any method that uses | ||||||
| :class:`~sleekxmpp.stanza.iq.Iq` stanzas, ``ifrom`` may be used. | :class:`~slixmpp.stanza.iq.Iq` stanzas, ``ifrom`` may be used. | ||||||
|  |  | ||||||
|  |  | ||||||
| Final Product | Final Product | ||||||
|   | |||||||
| @@ -1,24 +1,24 @@ | |||||||
| .. _echobot: | .. _echobot: | ||||||
|  |  | ||||||
| =============================== | =============================== | ||||||
| SleekXMPP Quickstart - Echo Bot | Slixmpp Quickstart - Echo Bot | ||||||
| =============================== | =============================== | ||||||
|  |  | ||||||
| .. note:: | .. note:: | ||||||
|      |      | ||||||
|     If you have any issues working through this quickstart guide |     If you have any issues working through this quickstart guide | ||||||
|     or the other tutorials here, please either send a message to the |     or the other tutorials here, please either send a message to the | ||||||
|     `mailing list <http://groups.google.com/group/sleekxmpp-discussion>`_ |     `mailing list <http://groups.google.com/group/slixmpp-discussion>`_ | ||||||
|     or join the chat room at `sleek@conference.jabber.org |     or join the chat room at `sleek@conference.jabber.org | ||||||
|     <xmpp:sleek@conference.jabber.org?join>`_. |     <xmpp:sleek@conference.jabber.org?join>`_. | ||||||
|  |  | ||||||
| If you have not yet installed SleekXMPP, do so now by either checking out a version | If you have not yet installed Slixmpp, do so now by either checking out a version | ||||||
| from `Github <http://github.com/fritzy/SleekXMPP>`_, or installing it using ``pip`` | from `Github <http://github.com/fritzy/Slixmpp>`_, or installing it using ``pip`` | ||||||
| or ``easy_install``. | or ``easy_install``. | ||||||
|  |  | ||||||
| .. code-block:: sh | .. code-block:: sh | ||||||
|  |  | ||||||
|     pip install sleekxmpp  # Or: easy_install sleekxmpp |     pip install slixmpp  # Or: easy_install slixmpp | ||||||
|  |  | ||||||
|  |  | ||||||
| As a basic starting project, we will create an echo bot which will reply to any | As a basic starting project, we will create an echo bot which will reply to any | ||||||
| @@ -48,7 +48,7 @@ To get started, here is a brief outline of the structure that the final project | |||||||
|     import getpass |     import getpass | ||||||
|     from optparse import OptionParser |     from optparse import OptionParser | ||||||
|  |  | ||||||
|     import sleekxmpp |     import slixmpp | ||||||
|  |  | ||||||
|     '''Here we will create out echo bot class''' |     '''Here we will create out echo bot class''' | ||||||
|  |  | ||||||
| @@ -61,7 +61,7 @@ To get started, here is a brief outline of the structure that the final project | |||||||
|  |  | ||||||
| Default Encoding | Default Encoding | ||||||
| ---------------- | ---------------- | ||||||
| XMPP requires support for UTF-8 and so SleekXMPP must use UTF-8 as well. In | XMPP requires support for UTF-8 and so Slixmpp must use UTF-8 as well. In | ||||||
| Python3 this is simple because Unicode is the default string type. For Python2.6+ | Python3 this is simple because Unicode is the default string type. For Python2.6+ | ||||||
| the situation is not as easy because standard strings are simply byte arrays and | the situation is not as easy because standard strings are simply byte arrays and | ||||||
| use ASCII. We can get Python to use UTF-8 as the default encoding by including: | use ASCII. We can get Python to use UTF-8 as the default encoding by including: | ||||||
| @@ -69,13 +69,13 @@ use ASCII. We can get Python to use UTF-8 as the default encoding by including: | |||||||
| .. code-block:: python | .. code-block:: python | ||||||
|  |  | ||||||
|     if sys.version_info < (3, 0): |     if sys.version_info < (3, 0): | ||||||
|         from sleekxmpp.util.misc_ops import setdefaultencoding |         from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|         setdefaultencoding('utf8') |         setdefaultencoding('utf8') | ||||||
|  |  | ||||||
| .. warning:: | .. warning:: | ||||||
|  |  | ||||||
|     Until we are able to ensure that SleekXMPP will always use Unicode in Python2.6+, this |     Until we are able to ensure that Slixmpp will always use Unicode in Python2.6+, this | ||||||
|     may cause issues embedding SleekXMPP into other applications which assume ASCII encoding. |     may cause issues embedding Slixmpp into other applications which assume ASCII encoding. | ||||||
|  |  | ||||||
| Creating the EchoBot Class | Creating the EchoBot Class | ||||||
| -------------------------- | -------------------------- | ||||||
| @@ -85,14 +85,14 @@ clients. Since our echo bot will only be responding to a few people, and won't n | |||||||
| to remember thousands of users, we will use a client connection. A client connection | to remember thousands of users, we will use a client connection. A client connection | ||||||
| is the same type that you use with your standard IM client such as Pidgin or Psi. | is the same type that you use with your standard IM client such as Pidgin or Psi. | ||||||
|  |  | ||||||
| SleekXMPP comes with a :class:`ClientXMPP <sleekxmpp.clientxmpp.ClientXMPP>` class | Slixmpp comes with a :class:`ClientXMPP <slixmpp.clientxmpp.ClientXMPP>` class | ||||||
| which we can extend to add our message echoing feature. :class:`ClientXMPP <sleekxmpp.clientxmpp.ClientXMPP>` | which we can extend to add our message echoing feature. :class:`ClientXMPP <slixmpp.clientxmpp.ClientXMPP>` | ||||||
| requires the parameters ``jid`` and ``password``, so we will let our ``EchoBot`` class accept those | requires the parameters ``jid`` and ``password``, so we will let our ``EchoBot`` class accept those | ||||||
| as well. | as well. | ||||||
|  |  | ||||||
| .. code-block:: python | .. code-block:: python | ||||||
|  |  | ||||||
|     class EchoBot(sleekxmpp.ClientXMPP): |     class EchoBot(slixmpp.ClientXMPP): | ||||||
|          |          | ||||||
|         def __init__(self, jid, password): |         def __init__(self, jid, password): | ||||||
|             super(EchoBot, self).__init__(jid, password) |             super(EchoBot, self).__init__(jid, password) | ||||||
| @@ -132,8 +132,8 @@ Our event handler, like every event handler, accepts a single parameter which ty | |||||||
| that was received that caused the event. In this case, ``event`` will just be an empty dictionary since | that was received that caused the event. In this case, ``event`` will just be an empty dictionary since | ||||||
| there is no associated data. | there is no associated data. | ||||||
|  |  | ||||||
| Our first task of sending an initial presence is done using :meth:`send_presence <sleekxmpp.basexmpp.BaseXMPP.send_presence>`. | Our first task of sending an initial presence is done using :meth:`send_presence <slixmpp.basexmpp.BaseXMPP.send_presence>`. | ||||||
| Calling :meth:`send_presence <sleekxmpp.basexmpp.BaseXMPP.send_presence>` without any arguments will send the simplest | Calling :meth:`send_presence <slixmpp.basexmpp.BaseXMPP.send_presence>` without any arguments will send the simplest | ||||||
| stanza allowed in XMPP: | stanza allowed in XMPP: | ||||||
|  |  | ||||||
| .. code-block:: xml | .. code-block:: xml | ||||||
| @@ -141,17 +141,17 @@ stanza allowed in XMPP: | |||||||
|     <presence /> |     <presence /> | ||||||
|  |  | ||||||
|  |  | ||||||
| The second requirement is fulfilled using :meth:`get_roster <sleekxmpp.clientxmpp.ClientXMPP.get_roster>`, which | The second requirement is fulfilled using :meth:`get_roster <slixmpp.clientxmpp.ClientXMPP.get_roster>`, which | ||||||
| will send an IQ stanza requesting the roster to the server and then wait for the response. You may be wondering | will send an IQ stanza requesting the roster to the server and then wait for the response. You may be wondering | ||||||
| what :meth:`get_roster <sleekxmpp.clientxmpp.ClientXMPP.get_roster>` returns since we are not saving any return | what :meth:`get_roster <slixmpp.clientxmpp.ClientXMPP.get_roster>` returns since we are not saving any return | ||||||
| value. The roster data is saved by an internal handler to ``self.roster``, and in the case of a :class:`ClientXMPP | value. The roster data is saved by an internal handler to ``self.roster``, and in the case of a :class:`ClientXMPP | ||||||
| <sleekxmpp.clientxmpp.ClientXMPP>` instance to ``self.client_roster``. (The difference between ``self.roster`` and | <slixmpp.clientxmpp.ClientXMPP>` instance to ``self.client_roster``. (The difference between ``self.roster`` and | ||||||
| ``self.client_roster`` is that ``self.roster`` supports storing roster information for multiple JIDs, which is useful | ``self.client_roster`` is that ``self.roster`` supports storing roster information for multiple JIDs, which is useful | ||||||
| for components, whereas ``self.client_roster`` stores roster data for just the client's JID.) | for components, whereas ``self.client_roster`` stores roster data for just the client's JID.) | ||||||
|  |  | ||||||
| It is possible for a timeout to occur while waiting for the server to respond, which can happen if the | It is possible for a timeout to occur while waiting for the server to respond, which can happen if the | ||||||
| network is excessively slow or the server is no longer responding. In that case, an :class:`IQTimeout | network is excessively slow or the server is no longer responding. In that case, an :class:`IQTimeout | ||||||
| <sleekxmpp.exceptions.IQTimeout>` is raised. Similarly, an :class:`IQError <sleekxmpp.exceptions.IQError>` exception can | <slixmpp.exceptions.IQTimeout>` is raised. Similarly, an :class:`IQError <slixmpp.exceptions.IQError>` exception can | ||||||
| be raised if the request contained bad data or requested the roster for the wrong user. In either case, you can wrap the | be raised if the request contained bad data or requested the roster for the wrong user. In either case, you can wrap the | ||||||
| ``get_roster()`` call in a ``try``/``except`` block to retry the roster retrieval process. | ``get_roster()`` call in a ``try``/``except`` block to retry the roster retrieval process. | ||||||
|  |  | ||||||
| @@ -201,7 +201,7 @@ Let's take a closer look at the ``.reply()`` method used above. For message stan | |||||||
| which is then used as the value of the ``<body />`` element of the message.  | which is then used as the value of the ``<body />`` element of the message.  | ||||||
| Setting the appropriate ``to`` JID is also handled by ``.reply()``. | Setting the appropriate ``to`` JID is also handled by ``.reply()``. | ||||||
|  |  | ||||||
| Another way to have sent the reply message would be to use :meth:`send_message <sleekxmpp.basexmpp.BaseXMPP.send_message>`, | Another way to have sent the reply message would be to use :meth:`send_message <slixmpp.basexmpp.BaseXMPP.send_message>`, | ||||||
| which is a convenience method for generating and sending a message based on the values passed to it. If we were to use | which is a convenience method for generating and sending a message based on the values passed to it. If we were to use | ||||||
| this method, the above code would look as so: | this method, the above code would look as so: | ||||||
|  |  | ||||||
| @@ -229,13 +229,13 @@ Whichever method you choose to use, the results in action will look like this: | |||||||
|     XMPP does not require stanzas sent by a client to include a ``from`` attribute, and |     XMPP does not require stanzas sent by a client to include a ``from`` attribute, and | ||||||
|     leaves that responsibility to the XMPP server. However, if a sent stanza does |     leaves that responsibility to the XMPP server. However, if a sent stanza does | ||||||
|     include a ``from`` attribute, it must match the full JID of the client or some |     include a ``from`` attribute, it must match the full JID of the client or some | ||||||
|     servers will reject it. SleekXMPP thus leaves out the ``from`` attribute when replying |     servers will reject it. Slixmpp thus leaves out the ``from`` attribute when replying | ||||||
|     using a client connection. |     using a client connection. | ||||||
|  |  | ||||||
| Command Line Arguments and Logging | Command Line Arguments and Logging | ||||||
| ---------------------------------- | ---------------------------------- | ||||||
|  |  | ||||||
| While this isn't part of SleekXMPP itself, we do want our echo bot program to be able | While this isn't part of Slixmpp itself, we do want our echo bot program to be able | ||||||
| to accept a JID and password from the command line instead of hard coding them. We will | to accept a JID and password from the command line instead of hard coding them. We will | ||||||
| use the ``optparse`` module for this, though there are several alternative methods, including | use the ``optparse`` module for this, though there are several alternative methods, including | ||||||
| the newer ``argparse`` module. | the newer ``argparse`` module. | ||||||
| @@ -305,7 +305,7 @@ the ``EchoBot.__init__`` method instead. | |||||||
|  |  | ||||||
|     If you are using the OpenFire server, you will need to include an additional  |     If you are using the OpenFire server, you will need to include an additional  | ||||||
|     configuration step. OpenFire supports a different version of SSL than what |     configuration step. OpenFire supports a different version of SSL than what | ||||||
|     most servers and SleekXMPP support. |     most servers and Slixmpp support. | ||||||
|  |  | ||||||
|     .. code-block:: python |     .. code-block:: python | ||||||
|      |      | ||||||
| @@ -313,11 +313,11 @@ the ``EchoBot.__init__`` method instead. | |||||||
|         xmpp.ssl_version = ssl.PROTOCOL_SSLv3 |         xmpp.ssl_version = ssl.PROTOCOL_SSLv3 | ||||||
|  |  | ||||||
| Now we're ready to connect and begin echoing messages. If you have the package | Now we're ready to connect and begin echoing messages. If you have the package | ||||||
| ``dnspython`` installed, then the :meth:`sleekxmpp.clientxmpp.ClientXMPP` method | ``dnspython`` installed, then the :meth:`slixmpp.clientxmpp.ClientXMPP` method | ||||||
| will perform a DNS query to find the appropriate server to connect to for the | will perform a DNS query to find the appropriate server to connect to for the | ||||||
| given JID. If you do not have ``dnspython``, then SleekXMPP will attempt to  | given JID. If you do not have ``dnspython``, then Slixmpp will attempt to  | ||||||
| connect to the hostname used by the JID, unless an address tuple is supplied | connect to the hostname used by the JID, unless an address tuple is supplied | ||||||
| to :meth:`sleekxmpp.clientxmpp.ClientXMPP`.  | to :meth:`slixmpp.clientxmpp.ClientXMPP`.  | ||||||
|  |  | ||||||
| .. code-block:: python | .. code-block:: python | ||||||
|  |  | ||||||
| @@ -346,19 +346,19 @@ to :meth:`sleekxmpp.clientxmpp.ClientXMPP`. | |||||||
|             else: |             else: | ||||||
|                 print('Unable to connect') |                 print('Unable to connect') | ||||||
|  |  | ||||||
| To begin responding to messages, you'll see we called :meth:`sleekxmpp.basexmpp.BaseXMPP.process` | To begin responding to messages, you'll see we called :meth:`slixmpp.basexmpp.BaseXMPP.process` | ||||||
| which will start the event handling, send queue, and XML reader threads. It will also call | which will start the event handling, send queue, and XML reader threads. It will also call | ||||||
| the :meth:`sleekxmpp.plugins.base.base_plugin.post_init` method on all registered plugins. By | the :meth:`slixmpp.plugins.base.base_plugin.post_init` method on all registered plugins. By | ||||||
| passing ``block=True`` to :meth:`sleekxmpp.basexmpp.BaseXMPP.process` we are running the  | passing ``block=True`` to :meth:`slixmpp.basexmpp.BaseXMPP.process` we are running the  | ||||||
| main processing loop in the main thread of execution. The :meth:`sleekxmpp.basexmpp.BaseXMPP.process` | main processing loop in the main thread of execution. The :meth:`slixmpp.basexmpp.BaseXMPP.process` | ||||||
| call will not return until after SleekXMPP disconnects. If you need to run the client in the background | call will not return until after Slixmpp disconnects. If you need to run the client in the background | ||||||
| for another program, use ``block=False`` to spawn the processing loop in its own thread. | for another program, use ``block=False`` to spawn the processing loop in its own thread. | ||||||
|  |  | ||||||
| .. note::  | .. note::  | ||||||
|  |  | ||||||
|     Before 1.0, controlling the blocking behaviour of :meth:`sleekxmpp.basexmpp.BaseXMPP.process` was |     Before 1.0, controlling the blocking behaviour of :meth:`slixmpp.basexmpp.BaseXMPP.process` was | ||||||
|     done via the ``threaded`` argument. This arrangement was a source of confusion because some users |     done via the ``threaded`` argument. This arrangement was a source of confusion because some users | ||||||
|     interpreted that as controlling whether or not SleekXMPP used threads at all, instead of how |     interpreted that as controlling whether or not Slixmpp used threads at all, instead of how | ||||||
|     the processing loop itself was spawned. |     the processing loop itself was spawned. | ||||||
|  |  | ||||||
|     The statements ``xmpp.process(threaded=False)`` and ``xmpp.process(block=True)`` are equivalent. |     The statements ``xmpp.process(threaded=False)`` and ``xmpp.process(block=True)`` are equivalent. | ||||||
| @@ -370,7 +370,7 @@ The Final Product | |||||||
| ----------------- | ----------------- | ||||||
|  |  | ||||||
| Here then is what the final result should look like after working through the guide above. The code | Here then is what the final result should look like after working through the guide above. The code | ||||||
| can also be found in the SleekXMPP `examples directory <http://github.com/fritzy/SleekXMPP/tree/master/examples>`_. | can also be found in the Slixmpp `examples directory <http://github.com/fritzy/Slixmpp/tree/master/examples>`_. | ||||||
|  |  | ||||||
| .. compound:: | .. compound:: | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,17 +1,17 @@ | |||||||
| Send/Receive IQ Stanzas | Send/Receive IQ Stanzas | ||||||
| ======================= | ======================= | ||||||
|  |  | ||||||
| Unlike :class:`~sleekxmpp.stanza.message.Message` and | Unlike :class:`~slixmpp.stanza.message.Message` and | ||||||
| :class:`~sleekxmpp.stanza.presence.Presence` stanzas which only use | :class:`~slixmpp.stanza.presence.Presence` stanzas which only use | ||||||
| text data for basic usage, :class:`~sleekxmpp.stanza.iq.Iq` stanzas | text data for basic usage, :class:`~slixmpp.stanza.iq.Iq` stanzas | ||||||
| require using XML payloads, and generally entail creating a new | require using XML payloads, and generally entail creating a new | ||||||
| SleekXMPP plugin to provide the necessary convenience methods to | Slixmpp plugin to provide the necessary convenience methods to | ||||||
| make working with them easier. | make working with them easier. | ||||||
|  |  | ||||||
| Basic Use | Basic Use | ||||||
| --------- | --------- | ||||||
|  |  | ||||||
| XMPP's use of :class:`~sleekxmpp.stanza.iq.Iq` stanzas is built around | XMPP's use of :class:`~slixmpp.stanza.iq.Iq` stanzas is built around | ||||||
| namespaced ``<query />`` elements. For clients, just sending the | namespaced ``<query />`` elements. For clients, just sending the | ||||||
| empty ``<query />`` element will suffice for retrieving information. For | empty ``<query />`` element will suffice for retrieving information. For | ||||||
| example, a very basic implementation of service discovery would just | example, a very basic implementation of service discovery would just | ||||||
| @@ -26,18 +26,18 @@ need to be able to send: | |||||||
| Creating Iq Stanzas | Creating Iq Stanzas | ||||||
| ~~~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~~~~~~~ | ||||||
|  |  | ||||||
| SleekXMPP provides built-in support for creating basic :class:`~sleekxmpp.stanza.iq.Iq` | Slixmpp provides built-in support for creating basic :class:`~slixmpp.stanza.iq.Iq` | ||||||
| stanzas this way. The relevant methods are: | stanzas this way. The relevant methods are: | ||||||
|  |  | ||||||
| * :meth:`~sleekxmpp.basexmpp.BaseXMPP.make_iq` | * :meth:`~slixmpp.basexmpp.BaseXMPP.make_iq` | ||||||
| * :meth:`~sleekxmpp.basexmpp.BaseXMPP.make_iq_get` | * :meth:`~slixmpp.basexmpp.BaseXMPP.make_iq_get` | ||||||
| * :meth:`~sleekxmpp.basexmpp.BaseXMPP.make_iq_set` | * :meth:`~slixmpp.basexmpp.BaseXMPP.make_iq_set` | ||||||
| * :meth:`~sleekxmpp.basexmpp.BaseXMPP.make_iq_result` | * :meth:`~slixmpp.basexmpp.BaseXMPP.make_iq_result` | ||||||
| * :meth:`~sleekxmpp.basexmpp.BaseXMPP.make_iq_error` | * :meth:`~slixmpp.basexmpp.BaseXMPP.make_iq_error` | ||||||
| * :meth:`~sleekxmpp.basexmpp.BaseXMPP.make_iq_query` | * :meth:`~slixmpp.basexmpp.BaseXMPP.make_iq_query` | ||||||
|  |  | ||||||
| These methods all follow the same pattern: create or modify an existing  | These methods all follow the same pattern: create or modify an existing  | ||||||
| :class:`~sleekxmpp.stanza.iq.Iq` stanza, set the ``'type'`` value based | :class:`~slixmpp.stanza.iq.Iq` stanza, set the ``'type'`` value based | ||||||
| on the method name, and finally add a ``<query />`` element with the given | on the method name, and finally add a ``<query />`` element with the given | ||||||
| namespace. For example, to produce the query above, you would use: | namespace. For example, to produce the query above, you would use: | ||||||
|  |  | ||||||
| @@ -50,14 +50,14 @@ namespace. For example, to produce the query above, you would use: | |||||||
| Sending Iq Stanzas | Sending Iq Stanzas | ||||||
| ~~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~~~~~~ | ||||||
|  |  | ||||||
| Once an :class:`~sleekxmpp.stanza.iq.Iq` stanza is created, sending it | Once an :class:`~slixmpp.stanza.iq.Iq` stanza is created, sending it | ||||||
| over the wire is done using its :meth:`~sleekxmpp.stanza.iq.Iq.send()` | over the wire is done using its :meth:`~slixmpp.stanza.iq.Iq.send()` | ||||||
| method, like any other stanza object. However, there are a few extra | method, like any other stanza object. However, there are a few extra | ||||||
| options to control how to wait for the query's response. | options to control how to wait for the query's response. | ||||||
|  |  | ||||||
| These options are: | These options are: | ||||||
|  |  | ||||||
| * ``block``: The default behaviour is that :meth:`~sleekxmpp.stanza.iq.Iq.send()` | * ``block``: The default behaviour is that :meth:`~slixmpp.stanza.iq.Iq.send()` | ||||||
|   will block until a response is received and the response stanza will be the |   will block until a response is received and the response stanza will be the | ||||||
|   return value. Setting ``block`` to ``False`` will cause the call to return |   return value. Setting ``block`` to ``False`` will cause the call to return | ||||||
|   immediately. In which case, you will need to arrange some way to capture |   immediately. In which case, you will need to arrange some way to capture | ||||||
| @@ -90,11 +90,11 @@ These options are: | |||||||
|        # ... later if we need to cancel |        # ... later if we need to cancel | ||||||
|        self.remove_handler(cb_name) |        self.remove_handler(cb_name) | ||||||
|  |  | ||||||
| Properly working with :class:`~sleekxmpp.stanza.iq.Iq` stanzas requires | Properly working with :class:`~slixmpp.stanza.iq.Iq` stanzas requires | ||||||
| handling the intended, normal flow, error responses, and timed out | handling the intended, normal flow, error responses, and timed out | ||||||
| requests. To make this easier, two exceptions may be thrown by | requests. To make this easier, two exceptions may be thrown by | ||||||
| :meth:`~sleekxmpp.stanza.iq.Iq.send()`: :exc:`~sleekxmpp.exceptions.IqError` | :meth:`~slixmpp.stanza.iq.Iq.send()`: :exc:`~slixmpp.exceptions.IqError` | ||||||
| and :exc:`~sleekxmpp.exceptions.IqTimeout`. These exceptions only | and :exc:`~slixmpp.exceptions.IqTimeout`. These exceptions only | ||||||
| apply to the default, blocking calls. | apply to the default, blocking calls. | ||||||
|  |  | ||||||
| .. code-block:: python | .. code-block:: python | ||||||
| @@ -110,7 +110,7 @@ apply to the default, blocking calls. | |||||||
|         pass |         pass | ||||||
|  |  | ||||||
| If you do not care to distinguish between errors and timeouts, then you | If you do not care to distinguish between errors and timeouts, then you | ||||||
| can combine both cases with a generic :exc:`~sleekxmpp.exceptions.XMPPError` | can combine both cases with a generic :exc:`~slixmpp.exceptions.XMPPError` | ||||||
| exception: | exception: | ||||||
|  |  | ||||||
| .. code-block:: python | .. code-block:: python | ||||||
| @@ -124,9 +124,9 @@ exception: | |||||||
| Advanced Use | Advanced Use | ||||||
| ------------ | ------------ | ||||||
|  |  | ||||||
| Going beyond the basics provided by SleekXMPP requires building at least a | Going beyond the basics provided by Slixmpp requires building at least a | ||||||
| rudimentary SleekXMPP plugin to create a :term:`stanza object` for | rudimentary Slixmpp plugin to create a :term:`stanza object` for | ||||||
| interfacting with the :class:`~sleekxmpp.stanza.iq.Iq` payload. | interfacting with the :class:`~slixmpp.stanza.iq.Iq` payload. | ||||||
|  |  | ||||||
| .. seealso:: | .. seealso:: | ||||||
|  |  | ||||||
| @@ -135,13 +135,13 @@ interfacting with the :class:`~sleekxmpp.stanza.iq.Iq` payload. | |||||||
|     * :ref:`using-handlers-matchers` |     * :ref:`using-handlers-matchers` | ||||||
|      |      | ||||||
|  |  | ||||||
| The typical way to respond to :class:`~sleekxmpp.stanza.iq.Iq` requests is | The typical way to respond to :class:`~slixmpp.stanza.iq.Iq` requests is | ||||||
| to register stream handlers. As an example, suppose we create a stanza class | to register stream handlers. As an example, suppose we create a stanza class | ||||||
| named ``CustomXEP`` which uses the XML element ``<query xmlns="custom-xep" />``, | named ``CustomXEP`` which uses the XML element ``<query xmlns="custom-xep" />``, | ||||||
| and has a :attr:`~sleekxmpp.xmlstream.stanzabase.ElementBase.plugin_attrib` value | and has a :attr:`~slixmpp.xmlstream.stanzabase.ElementBase.plugin_attrib` value | ||||||
| of ``custom_xep``. | of ``custom_xep``. | ||||||
|  |  | ||||||
| There are two types of incoming :class:`~sleekxmpp.stanza.iq.Iq` requests: | There are two types of incoming :class:`~slixmpp.stanza.iq.Iq` requests: | ||||||
| ``get`` and ``set``. You can register a handler that will accept both and then | ``get`` and ``set``. You can register a handler that will accept both and then | ||||||
| filter by type as needed, as so: | filter by type as needed, as so: | ||||||
|  |  | ||||||
| @@ -167,7 +167,7 @@ filter by type as needed, as so: | |||||||
|  |  | ||||||
| If you want to filter out query types beforehand, you can adjust the matching | If you want to filter out query types beforehand, you can adjust the matching | ||||||
| filter by using ``@type=get`` or ``@type=set`` if you are using the recommended | filter by using ``@type=get`` or ``@type=set`` if you are using the recommended | ||||||
| :class:`~sleekxmpp.xmlstream.matcher.stanzapath.StanzaPath` matcher. | :class:`~slixmpp.xmlstream.matcher.stanzapath.StanzaPath` matcher. | ||||||
|  |  | ||||||
| .. code-block:: python | .. code-block:: python | ||||||
|  |  | ||||||
|   | |||||||
| @@ -8,20 +8,20 @@ Mulit-User Chat (MUC) Bot | |||||||
|  |  | ||||||
|     If you have any issues working through this quickstart guide |     If you have any issues working through this quickstart guide | ||||||
|     or the other tutorials here, please either send a message to the |     or the other tutorials here, please either send a message to the | ||||||
|     `mailing list <http://groups.google.com/group/sleekxmpp-discussion>`_ |     `mailing list <http://groups.google.com/group/slixmpp-discussion>`_ | ||||||
|     or join the chat room at `sleek@conference.jabber.org |     or join the chat room at `sleek@conference.jabber.org | ||||||
|     <xmpp:sleek@conference.jabber.org?join>`_. |     <xmpp:sleek@conference.jabber.org?join>`_. | ||||||
|  |  | ||||||
| If you have not yet installed SleekXMPP, do so now by either checking out a version | If you have not yet installed Slixmpp, do so now by either checking out a version | ||||||
| from `Github <http://github.com/fritzy/SleekXMPP>`_, or installing it using ``pip`` | from `Github <http://github.com/fritzy/Slixmpp>`_, or installing it using ``pip`` | ||||||
| or ``easy_install``. | or ``easy_install``. | ||||||
|  |  | ||||||
| .. code-block:: sh | .. code-block:: sh | ||||||
|  |  | ||||||
|     pip install sleekxmpp  # Or: easy_install sleekxmpp |     pip install slixmpp  # Or: easy_install slixmpp | ||||||
|  |  | ||||||
|  |  | ||||||
| Now that you've got the basic gist of using SleekXMPP by following the | Now that you've got the basic gist of using Slixmpp by following the | ||||||
| echobot example (:ref:`echobot`), we can use one of the bundled plugins | echobot example (:ref:`echobot`), we can use one of the bundled plugins | ||||||
| to create a very popular XMPP starter project: a `Multi-User Chat`_ | to create a very popular XMPP starter project: a `Multi-User Chat`_ | ||||||
| (MUC) bot. Our bot will login to an XMPP server, join an MUC chat room | (MUC) bot. Our bot will login to an XMPP server, join an MUC chat room | ||||||
| @@ -36,7 +36,7 @@ Joining The Room | |||||||
|  |  | ||||||
| As usual, our code will be based on the pattern explained in :ref:`echobot`. | As usual, our code will be based on the pattern explained in :ref:`echobot`. | ||||||
| To start, we create an ``MUCBot`` class based on | To start, we create an ``MUCBot`` class based on | ||||||
| :class:`ClientXMPP <sleekxmpp.clientxmpp.ClientXMPP>` and which accepts | :class:`ClientXMPP <slixmpp.clientxmpp.ClientXMPP>` and which accepts | ||||||
| parameters for the JID of the MUC room to join, and the nick that the | parameters for the JID of the MUC room to join, and the nick that the | ||||||
| bot will use inside the chat room.  We also register an | bot will use inside the chat room.  We also register an | ||||||
| :term:`event handler` for the :term:`session_start` event. | :term:`event handler` for the :term:`session_start` event. | ||||||
| @@ -44,12 +44,12 @@ bot will use inside the chat room.  We also register an | |||||||
|  |  | ||||||
| .. code-block:: python | .. code-block:: python | ||||||
|  |  | ||||||
|     import sleekxmpp |     import slixmpp | ||||||
|  |  | ||||||
|     class MUCBot(sleekxmpp.ClientXMPP): |     class MUCBot(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|         def __init__(self, jid, password, room, nick): |         def __init__(self, jid, password, room, nick): | ||||||
|             sleekxmpp.ClientXMPP.__init__(self, jid, password) |             slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|             self.room = room |             self.room = room | ||||||
|             self.nick = nick |             self.nick = nick | ||||||
| @@ -81,7 +81,7 @@ the roster. Next, we want to join the group chat, so we call the | |||||||
|  |  | ||||||
| .. note:: | .. note:: | ||||||
|  |  | ||||||
|     The :attr:`plugin <sleekxmpp.basexmpp.BaseXMPP.plugin>` attribute is |     The :attr:`plugin <slixmpp.basexmpp.BaseXMPP.plugin>` attribute is | ||||||
|     dictionary that maps to instances of plugins that we have previously |     dictionary that maps to instances of plugins that we have previously | ||||||
|     registered, by their names. |     registered, by their names. | ||||||
|  |  | ||||||
| @@ -115,7 +115,7 @@ event inside the bot's ``__init__`` function. | |||||||
| .. code-block:: python | .. code-block:: python | ||||||
|  |  | ||||||
|     def __init__(self, jid, password, room, nick): |     def __init__(self, jid, password, room, nick): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|         self.room = room |         self.room = room | ||||||
|         self.nick = nick |         self.nick = nick | ||||||
| @@ -159,7 +159,7 @@ event so it's a good idea to register an event handler for it. | |||||||
| .. code-block:: python | .. code-block:: python | ||||||
|  |  | ||||||
|     def __init__(self, jid, password, room, nick): |     def __init__(self, jid, password, room, nick): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|         self.room = room |         self.room = room | ||||||
|         self.nick = nick |         self.nick = nick | ||||||
|   | |||||||
| @@ -8,16 +8,16 @@ Enable HTTP Proxy Support | |||||||
|      |      | ||||||
|     If you have any issues working through this quickstart guide |     If you have any issues working through this quickstart guide | ||||||
|     or the other tutorials here, please either send a message to the |     or the other tutorials here, please either send a message to the | ||||||
|     `mailing list <http://groups.google.com/group/sleekxmpp-discussion>`_ |     `mailing list <http://groups.google.com/group/slixmpp-discussion>`_ | ||||||
|     or join the chat room at `sleek@conference.jabber.org |     or join the chat room at `sleek@conference.jabber.org | ||||||
|     <xmpp:sleek@conference.jabber.org?join>`_. |     <xmpp:sleek@conference.jabber.org?join>`_. | ||||||
|  |  | ||||||
| In some instances, you may wish to route XMPP traffic through | In some instances, you may wish to route XMPP traffic through | ||||||
| an HTTP proxy, probably to get around restrictive firewalls. | an HTTP proxy, probably to get around restrictive firewalls. | ||||||
| SleekXMPP provides support for basic HTTP proxying with DIGEST | Slixmpp provides support for basic HTTP proxying with DIGEST | ||||||
| authentication. | authentication. | ||||||
|  |  | ||||||
| Enabling proxy support is done in two steps. The first is to instruct SleekXMPP | Enabling proxy support is done in two steps. The first is to instruct Slixmpp | ||||||
| to use a proxy, and the second is to configure the proxy details: | to use a proxy, and the second is to configure the proxy details: | ||||||
|  |  | ||||||
| .. code-block:: python | .. code-block:: python | ||||||
|   | |||||||
| @@ -5,25 +5,25 @@ Sign in, Send a Message, and Disconnect | |||||||
|      |      | ||||||
|     If you have any issues working through this quickstart guide |     If you have any issues working through this quickstart guide | ||||||
|     or the other tutorials here, please either send a message to the |     or the other tutorials here, please either send a message to the | ||||||
|     `mailing list <http://groups.google.com/group/sleekxmpp-discussion>`_ |     `mailing list <http://groups.google.com/group/slixmpp-discussion>`_ | ||||||
|     or join the chat room at `sleek@conference.jabber.org |     or join the chat room at `sleek@conference.jabber.org | ||||||
|     <xmpp:sleek@conference.jabber.org?join>`_. |     <xmpp:sleek@conference.jabber.org?join>`_. | ||||||
|  |  | ||||||
| A common use case for SleekXMPP is to send one-off messages from | A common use case for Slixmpp is to send one-off messages from | ||||||
| time to time. For example, one use case could be sending out a notice when  | time to time. For example, one use case could be sending out a notice when  | ||||||
| a shell script finishes a task. | a shell script finishes a task. | ||||||
|  |  | ||||||
| We will create our one-shot bot based on the pattern explained in :ref:`echobot`. To | We will create our one-shot bot based on the pattern explained in :ref:`echobot`. To | ||||||
| start, we create a client class based on :class:`ClientXMPP <sleekxmpp.clientxmpp.ClientXMPP>` and | start, we create a client class based on :class:`ClientXMPP <slixmpp.clientxmpp.ClientXMPP>` and | ||||||
| register a handler for the :term:`session_start` event. We will also accept parameters | register a handler for the :term:`session_start` event. We will also accept parameters | ||||||
| for the JID that will receive our message, and the string content of the message. | for the JID that will receive our message, and the string content of the message. | ||||||
|  |  | ||||||
| .. code-block:: python | .. code-block:: python | ||||||
|  |  | ||||||
|     import sleekxmpp |     import slixmpp | ||||||
|  |  | ||||||
|  |  | ||||||
|     class SendMsgBot(sleekxmpp.ClientXMPP): |     class SendMsgBot(slixmpp.ClientXMPP): | ||||||
|          |          | ||||||
|         def __init__(self, jid, password, recipient, msg): |         def __init__(self, jid, password, recipient, msg): | ||||||
|             super(SendMsgBot, self).__init__(jid, password) |             super(SendMsgBot, self).__init__(jid, password) | ||||||
| @@ -38,7 +38,7 @@ for the JID that will receive our message, and the string content of the message | |||||||
|             self.get_roster() |             self.get_roster() | ||||||
|  |  | ||||||
| Note that as in :ref:`echobot`, we need to include send an initial presence and request | Note that as in :ref:`echobot`, we need to include send an initial presence and request | ||||||
| the roster. Next, we want to send our message, and to do that we will use :meth:`send_message <sleekxmpp.basexmpp.BaseXMPP.send_message>`. | the roster. Next, we want to send our message, and to do that we will use :meth:`send_message <slixmpp.basexmpp.BaseXMPP.send_message>`. | ||||||
|  |  | ||||||
| .. code-block:: python | .. code-block:: python | ||||||
|  |  | ||||||
| @@ -48,12 +48,12 @@ the roster. Next, we want to send our message, and to do that we will use :meth: | |||||||
|  |  | ||||||
|         self.send_message(mto=self.recipient, mbody=self.msg) |         self.send_message(mto=self.recipient, mbody=self.msg) | ||||||
|  |  | ||||||
| Finally, we need to disconnect the client using :meth:`disconnect <sleekxmpp.xmlstream.XMLStream.disconnect>`. | Finally, we need to disconnect the client using :meth:`disconnect <slixmpp.xmlstream.XMLStream.disconnect>`. | ||||||
| Now, sent stanzas are placed in a queue to pass them to the send thread. If we were to call | Now, sent stanzas are placed in a queue to pass them to the send thread. If we were to call | ||||||
| :meth:`disconnect <sleekxmpp.xmlstream.XMLStream.disconnect>` without any parameters, then it is possible | :meth:`disconnect <slixmpp.xmlstream.XMLStream.disconnect>` without any parameters, then it is possible | ||||||
| for the client to disconnect before the send queue is processed and the message is actually | for the client to disconnect before the send queue is processed and the message is actually | ||||||
| sent on the wire. To ensure that our message is processed, we use  | sent on the wire. To ensure that our message is processed, we use  | ||||||
| :meth:`disconnect(wait=True) <sleekxmpp.xmlstream.XMLStream.disconnect>`. | :meth:`disconnect(wait=True) <slixmpp.xmlstream.XMLStream.disconnect>`. | ||||||
|  |  | ||||||
| .. code-block:: python | .. code-block:: python | ||||||
|  |  | ||||||
| @@ -68,7 +68,7 @@ sent on the wire. To ensure that our message is processed, we use | |||||||
| .. warning:: | .. warning:: | ||||||
|  |  | ||||||
|     If you happen to be adding stanzas to the send queue faster than the send thread |     If you happen to be adding stanzas to the send queue faster than the send thread | ||||||
|     can process them, then :meth:`disconnect(wait=True) <sleekxmpp.xmlstream.XMLStream.disconnect>` |     can process them, then :meth:`disconnect(wait=True) <slixmpp.xmlstream.XMLStream.disconnect>` | ||||||
|     will block and not disconnect. |     will block and not disconnect. | ||||||
|  |  | ||||||
| Final Product | Final Product | ||||||
|   | |||||||
| @@ -18,7 +18,7 @@ Working with service discovery is about creating and querying these nodes. | |||||||
| According to XEP-0030, a node may contain three types of information: | According to XEP-0030, a node may contain three types of information: | ||||||
| identities, features, and items. (Further, extensible, information types are | identities, features, and items. (Further, extensible, information types are | ||||||
| defined in `XEP-0128 <http://xmpp.org/extensions/xep-0128.html>`_, but they are | defined in `XEP-0128 <http://xmpp.org/extensions/xep-0128.html>`_, but they are | ||||||
| not yet implemented by SleekXMPP.) SleekXMPP provides methods to configure each | not yet implemented by Slixmpp.) Slixmpp provides methods to configure each | ||||||
| of these node attributes. | of these node attributes. | ||||||
|  |  | ||||||
| Configuring Service Discovery | Configuring Service Discovery | ||||||
| @@ -119,7 +119,7 @@ the same order as expected using positional arguments. | |||||||
|  |  | ||||||
|     xmpp['xep_0030'].add_identity(category='client', |     xmpp['xep_0030'].add_identity(category='client', | ||||||
|                                   itype='bot', |                                   itype='bot', | ||||||
|                                   name='Sleek', |                                   name='Slixmpp', | ||||||
|                                   node='foo', |                                   node='foo', | ||||||
|                                   jid=xmpp.boundjid.full, |                                   jid=xmpp.boundjid.full, | ||||||
|                                   lang='no') |                                   lang='no') | ||||||
|   | |||||||
| @@ -1,49 +1,49 @@ | |||||||
| SleekXMPP | Slixmpp | ||||||
| ######### | ######### | ||||||
|  |  | ||||||
| .. sidebar:: Get the Code | .. sidebar:: Get the Code | ||||||
|  |  | ||||||
|     .. code-block:: sh |     .. code-block:: sh | ||||||
|  |  | ||||||
|         pip install sleekxmpp |         pip install slixmpp | ||||||
|  |  | ||||||
|     The latest source code for SleekXMPP may be found on `Github |     The latest source code for Slixmpp may be found on `Github | ||||||
|     <http://github.com/fritzy/SleekXMPP>`_. Releases can be found in the |     <http://github.com/fritzy/Slixmpp>`_. Releases can be found in the | ||||||
|     ``master`` branch, while the latest development version is in the |     ``master`` branch, while the latest development version is in the | ||||||
|     ``develop`` branch. |     ``develop`` branch. | ||||||
|  |  | ||||||
|     **Latest Stable Release** |     **Latest Stable Release** | ||||||
|         - `1.0 <http://github.com/fritzy/SleekXMPP/zipball/1.0>`_ |         - `1.0 <http://github.com/fritzy/Slixmpp/zipball/1.0>`_ | ||||||
|  |  | ||||||
|     **Develop Releases** |     **Develop Releases** | ||||||
|         - `Latest Develop Version <http://github.com/fritzy/SleekXMPP/zipball/develop>`_ |         - `Latest Develop Version <http://github.com/fritzy/Slixmpp/zipball/develop>`_ | ||||||
|  |  | ||||||
|  |  | ||||||
|     A mailing list and XMPP chat room are available for discussing and getting |     A mailing list and XMPP chat room are available for discussing and getting | ||||||
|     help with SleekXMPP. |     help with Slixmpp. | ||||||
|  |  | ||||||
|     **Mailing List** |     **Mailing List** | ||||||
|         `SleekXMPP Discussion on Google Groups <http://groups.google.com/group/sleekxmpp-discussion>`_ |         `Slixmpp Discussion on Google Groups <http://groups.google.com/group/slixmpp-discussion>`_ | ||||||
|  |  | ||||||
|     **Chat** |     **Chat** | ||||||
|         `sleek@conference.jabber.org <xmpp:sleek@conference.jabber.org?join>`_ |         `sleek@conference.jabber.org <xmpp:sleek@conference.jabber.org?join>`_ | ||||||
|  |  | ||||||
|  |  | ||||||
| SleekXMPP is an :ref:`MIT licensed <license>` XMPP library for Python 2.6/3.1+, | Slixmpp is an :ref:`MIT licensed <license>` XMPP library for Python 2.6/3.1+, | ||||||
| and is featured in examples in | and is featured in examples in | ||||||
| `XMPP: The Definitive Guide <http://oreilly.com/catalog/9780596521271>`_  | `XMPP: The Definitive Guide <http://oreilly.com/catalog/9780596521271>`_  | ||||||
| by Kevin Smith, Remko Tronçon, and Peter Saint-Andre. If you've arrived | by Kevin Smith, Remko Tronçon, and Peter Saint-Andre. If you've arrived | ||||||
| here from reading the Definitive Guide, please see the notes on updating | here from reading the Definitive Guide, please see the notes on updating | ||||||
| the examples to the latest version of SleekXMPP. | the examples to the latest version of Slixmpp. | ||||||
|  |  | ||||||
| SleekXMPP's design goals and philosphy are: | Slixmpp's design goals and philosphy are: | ||||||
|  |  | ||||||
| **Low number of dependencies** | **Low number of dependencies** | ||||||
|     Installing and using SleekXMPP should be as simple as possible, without |     Installing and using Slixmpp should be as simple as possible, without | ||||||
|     having to deal with long dependency chains. |     having to deal with long dependency chains. | ||||||
|  |  | ||||||
|     As part of reducing the number of dependencies, some third party |     As part of reducing the number of dependencies, some third party | ||||||
|     modules are included with SleekXMPP in the ``thirdparty`` directory. |     modules are included with Slixmpp in the ``thirdparty`` directory. | ||||||
|     Imports from this module first try to import an existing installed |     Imports from this module first try to import an existing installed | ||||||
|     version before loading the packaged version, when possible. |     version before loading the packaged version, when possible. | ||||||
|  |  | ||||||
| @@ -55,19 +55,19 @@ SleekXMPP's design goals and philosphy are: | |||||||
|     XEPs. |     XEPs. | ||||||
|  |  | ||||||
| **Rewarding to work with** | **Rewarding to work with** | ||||||
|     As much as possible, SleekXMPP should allow things to "just work" using |     As much as possible, Slixmpp should allow things to "just work" using | ||||||
|     sensible defaults and appropriate abstractions. XML can be ugly to work |     sensible defaults and appropriate abstractions. XML can be ugly to work | ||||||
|     with, but it doesn't have to be that way. |     with, but it doesn't have to be that way. | ||||||
|  |  | ||||||
| Here's your first SleekXMPP Bot: | Here's your first Slixmpp Bot: | ||||||
| -------------------------------- | -------------------------------- | ||||||
|  |  | ||||||
| .. code-block:: python | .. code-block:: python | ||||||
|  |  | ||||||
|     import logging |     import logging | ||||||
|  |  | ||||||
|     from sleekxmpp import ClientXMPP |     from slixmpp import ClientXMPP | ||||||
|     from sleekxmpp.exceptions import IqError, IqTimeout |     from slixmpp.exceptions import IqError, IqTimeout | ||||||
|  |  | ||||||
|  |  | ||||||
|     class EchoBot(ClientXMPP): |     class EchoBot(ClientXMPP): | ||||||
| @@ -161,7 +161,7 @@ Plugin Guides | |||||||
|  |  | ||||||
|     guide_xep_0030 |     guide_xep_0030 | ||||||
|  |  | ||||||
| SleekXMPP Architecture and Design | Slixmpp Architecture and Design | ||||||
| --------------------------------- | --------------------------------- | ||||||
| .. toctree:: | .. toctree:: | ||||||
|     :maxdepth: 3 |     :maxdepth: 3 | ||||||
|   | |||||||
| @@ -95,9 +95,9 @@ if "%1" == "qthelp" ( | |||||||
| 	echo. | 	echo. | ||||||
| 	echo.Build finished; now you can run "qcollectiongenerator" with the ^ | 	echo.Build finished; now you can run "qcollectiongenerator" with the ^ | ||||||
| .qhcp project file in %BUILDDIR%/qthelp, like this: | .qhcp project file in %BUILDDIR%/qthelp, like this: | ||||||
| 	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\SleekXMPP.qhcp | 	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Slixmpp.qhcp | ||||||
| 	echo.To view the help file: | 	echo.To view the help file: | ||||||
| 	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\SleekXMPP.ghc | 	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Slixmpp.ghc | ||||||
| 	goto end | 	goto end | ||||||
| ) | ) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,20 +1,20 @@ | |||||||
| Following *XMPP: The Definitive Guide* | Following *XMPP: The Definitive Guide* | ||||||
| ====================================== | ====================================== | ||||||
|  |  | ||||||
| SleekXMPP was featured in the first edition of the O'Reilly book  | Slixmpp was featured in the first edition of the O'Reilly book  | ||||||
| `XMPP: The Definitive Guide <http://oreilly.com/catalog/9780596521271/>`_ | `XMPP: The Definitive Guide <http://oreilly.com/catalog/9780596521271/>`_ | ||||||
| by Peter Saint-Andre, Kevin Smith, and Remko Tronçon. The original source code | by Peter Saint-Andre, Kevin Smith, and Remko Tronçon. The original source code | ||||||
| for the book's examples can be found at http://github.com/remko/xmpp-tdg. An | for the book's examples can be found at http://github.com/remko/xmpp-tdg. An | ||||||
| updated version of the source code, maintained to stay current with the latest | updated version of the source code, maintained to stay current with the latest | ||||||
| SleekXMPP release, is available at http://github.com/legastero/xmpp-tdg. | Slixmpp release, is available at http://github.com/legastero/xmpp-tdg. | ||||||
|  |  | ||||||
| However, since publication, SleekXMPP has advanced from version 0.2.1 to version | However, since publication, Slixmpp has advanced from version 0.2.1 to version | ||||||
| 1.0 and there have been several major API changes. The most notable is the | 1.0 and there have been several major API changes. The most notable is the | ||||||
| introduction of :term:`stanza objects <stanza object>` which have simplified and | introduction of :term:`stanza objects <stanza object>` which have simplified and | ||||||
| standardized interactions with the XMPP XML stream. | standardized interactions with the XMPP XML stream. | ||||||
|  |  | ||||||
| What follows is a walk-through of *The Definitive Guide* highlighting the | What follows is a walk-through of *The Definitive Guide* highlighting the | ||||||
| changes needed to make the code examples work with version 1.0 of SleekXMPP. | changes needed to make the code examples work with version 1.0 of Slixmpp. | ||||||
| These changes have been kept to a minimum to preserve the correlation with | These changes have been kept to a minimum to preserve the correlation with | ||||||
| the book's explanations, so be aware that some code may not use current best | the book's explanations, so be aware that some code may not use current best | ||||||
| practices. | practices. | ||||||
| @@ -47,7 +47,7 @@ Example 14-1. (Page 215) | |||||||
| **CheshiR IM bot implementation.** | **CheshiR IM bot implementation.** | ||||||
|  |  | ||||||
| The main event handling method in the Bot class is meant to process both message | The main event handling method in the Bot class is meant to process both message | ||||||
| events and presence update events. With the new changes in SleekXMPP 1.0, | events and presence update events. With the new changes in Slixmpp 1.0, | ||||||
| extracting a CheshiR status "message" from both types of stanzas | extracting a CheshiR status "message" from both types of stanzas | ||||||
| requires accessing different attributes. In the case of a message stanza, the | requires accessing different attributes. In the case of a message stanza, the | ||||||
| ``"body"`` attribute would contain the CheshiR message. For a presence event, | ``"body"`` attribute would contain the CheshiR message. For a presence event, | ||||||
| @@ -72,8 +72,8 @@ Updated Code | |||||||
| .. code-block:: python | .. code-block:: python | ||||||
|  |  | ||||||
|   def handleIncomingXMPPEvent(self, event): |   def handleIncomingXMPPEvent(self, event): | ||||||
|     msgLocations = {sleekxmpp.stanza.presence.Presence: "status", |     msgLocations = {slixmpp.stanza.presence.Presence: "status", | ||||||
|                     sleekxmpp.stanza.message.Message: "body"} |                     slixmpp.stanza.message.Message: "body"} | ||||||
|  |  | ||||||
|     message = event[msgLocations[type(event)]] |     message = event[msgLocations[type(event)]] | ||||||
|     user = self.backend.getUserFromJID(event["from"].jid) |     user = self.backend.getUserFromJID(event["from"].jid) | ||||||
| @@ -102,7 +102,7 @@ Example 14-3. (Page 217) | |||||||
|  |  | ||||||
| The main difference for the configurable IM bot is the handling for the | The main difference for the configurable IM bot is the handling for the | ||||||
| data form in ``handleConfigurationCommand``. The test for equality | data form in ``handleConfigurationCommand``. The test for equality | ||||||
| with the string ``"1"`` is no longer required; SleekXMPP converts | with the string ``"1"`` is no longer required; Slixmpp converts | ||||||
| boolean data form fields to the values ``True`` and ``False`` | boolean data form fields to the values ``True`` and ``False`` | ||||||
| automatically. | automatically. | ||||||
|  |  | ||||||
| @@ -192,7 +192,7 @@ After applying the changes from Example 14-4 above, the registrable component | |||||||
| implementation should work correctly. | implementation should work correctly. | ||||||
|  |  | ||||||
| .. tip:: | .. tip:: | ||||||
|     To see how to implement in-band registration as a SleekXMPP plugin, |     To see how to implement in-band registration as a Slixmpp plugin, | ||||||
|     see the tutorial :ref:`tutorial-create-plugin`. |     see the tutorial :ref:`tutorial-create-plugin`. | ||||||
|  |  | ||||||
| `View full source <http://github.com/legastero/xmpp-tdg/blob/master/code/CheshiR/RegistrableComponent.py>`_ | | `View full source <http://github.com/legastero/xmpp-tdg/blob/master/code/CheshiR/RegistrableComponent.py>`_ | | ||||||
| @@ -209,7 +209,7 @@ Example 14-7. (Page 225) | |||||||
|  |  | ||||||
| While the final code example can look daunting with all of the changes | While the final code example can look daunting with all of the changes | ||||||
| made, it requires very few modifications to work with the latest version of | made, it requires very few modifications to work with the latest version of | ||||||
| SleekXMPP. Most differences are the result of CheshiR's backend functions | Slixmpp. Most differences are the result of CheshiR's backend functions | ||||||
| expecting JIDs to be strings so that they can be stripped to bare JIDs. To | expecting JIDs to be strings so that they can be stripped to bare JIDs. To | ||||||
| resolve these, use the ``jid`` attribute of the JID objects. Also, | resolve these, use the ``jid`` attribute of the JID objects. Also, | ||||||
| references to ``"message"`` and ``"jid"`` attributes need to | references to ``"message"`` and ``"jid"`` attributes need to | ||||||
|   | |||||||
| @@ -2,11 +2,11 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Implementation of xeps for Internet of Things |     Implementation of xeps for Internet of Things | ||||||
|     http://wiki.xmpp.org/web/Tech_pages/IoT_systems |     http://wiki.xmpp.org/web/Tech_pages/IoT_systems | ||||||
|     Copyright (C) 2013 Sustainable Innovation, Joachim.lindborg@sust.se |     Copyright (C) 2013 Sustainable Innovation, Joachim.lindborg@sust.se | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -14,7 +14,7 @@ | |||||||
| import os | import os | ||||||
| import sys | import sys | ||||||
| # This can be used when you are in a test environment and need to make paths right | # This can be used when you are in a test environment and need to make paths right | ||||||
| sys.path=['/Users/jocke/Dropbox/06_dev/SleekXMPP']+sys.path | sys.path=['/Users/jocke/Dropbox/06_dev/Slixmpp']+sys.path | ||||||
|  |  | ||||||
| import logging | import logging | ||||||
| import unittest | import unittest | ||||||
| @@ -26,28 +26,28 @@ from os.path import splitext, basename, join as pjoin | |||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
| from urllib import urlopen | from urllib import urlopen | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0323.device import Device | from slixmpp.plugins.xep_0323.device import Device | ||||||
|  |  | ||||||
| #from sleekxmpp.exceptions import IqError, IqTimeout | #from slixmpp.exceptions import IqError, IqTimeout | ||||||
|  |  | ||||||
| class IoT_TestDevice(sleekxmpp.ClientXMPP): | class IoT_TestDevice(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A simple IoT device that can act as server or client |     A simple IoT device that can act as server or client | ||||||
|     """ |     """ | ||||||
|     def __init__(self, jid, password): |     def __init__(self, jid, password): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|         self.add_event_handler("session_start", self.session_start) |         self.add_event_handler("session_start", self.session_start) | ||||||
|         self.add_event_handler("message", self.message) |         self.add_event_handler("message", self.message) | ||||||
|         self.device=None |         self.device=None | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2010  Nathanael C. Fritz |     Copyright (C) 2010  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -14,28 +14,28 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class CommandBot(sleekxmpp.ClientXMPP): | class CommandBot(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A simple SleekXMPP bot that provides a basic |     A simple Slixmpp bot that provides a basic | ||||||
|     adhoc command. |     adhoc command. | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password): |     def __init__(self, jid, password): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|         # The session_start event will be triggered when |         # The session_start event will be triggered when | ||||||
|         # the bot establishes its connection with the server |         # the bot establishes its connection with the server | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2010  Nathanael C. Fritz |     Copyright (C) 2010  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -14,28 +14,28 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class CommandUserBot(sleekxmpp.ClientXMPP): | class CommandUserBot(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A simple SleekXMPP bot that uses the adhoc command |     A simple Slixmpp bot that uses the adhoc command | ||||||
|     provided by the adhoc_provider.py example. |     provided by the adhoc_provider.py example. | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password, other, greeting): |     def __init__(self, jid, password, other, greeting): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|         self.command_provider = other |         self.command_provider = other | ||||||
|         self.greeting = greeting |         self.greeting = greeting | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2010  Nathanael C. Fritz |     Copyright (C) 2010  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -14,28 +14,28 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class AdminCommands(sleekxmpp.ClientXMPP): | class AdminCommands(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A simple SleekXMPP bot that uses admin commands to |     A simple Slixmpp bot that uses admin commands to | ||||||
|     add a new user to a server. |     add a new user to a server. | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password, command): |     def __init__(self, jid, password, command): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|         self.command = command |         self.command = command | ||||||
|  |  | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2010  Nathanael C. Fritz |     Copyright (C) 2010  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -14,35 +14,35 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
|  |  | ||||||
| from sleekxmpp import ClientXMPP, Iq | from slixmpp import ClientXMPP, Iq | ||||||
| from sleekxmpp.exceptions import IqError, IqTimeout, XMPPError | from slixmpp.exceptions import IqError, IqTimeout, XMPPError | ||||||
| from sleekxmpp.xmlstream import register_stanza_plugin | from slixmpp.xmlstream import register_stanza_plugin | ||||||
| from sleekxmpp.xmlstream.handler import Callback | from slixmpp.xmlstream.handler import Callback | ||||||
| from sleekxmpp.xmlstream.matcher import StanzaPath | from slixmpp.xmlstream.matcher import StanzaPath | ||||||
| from stanza import Action | from stanza import Action | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class ActionBot(sleekxmpp.ClientXMPP): | class ActionBot(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A simple SleekXMPP bot that receives a custom stanza |     A simple Slixmpp bot that receives a custom stanza | ||||||
|     from another client. |     from another client. | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password): |     def __init__(self, jid, password): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|         # The session_start event will be triggered when |         # The session_start event will be triggered when | ||||||
|         # the bot establishes its connection with the server |         # the bot establishes its connection with the server | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2010  Nathanael C. Fritz |     Copyright (C) 2010  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -14,33 +14,33 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
| from sleekxmpp import Iq | from slixmpp import Iq | ||||||
| from sleekxmpp.exceptions import XMPPError | from slixmpp.exceptions import XMPPError | ||||||
| from sleekxmpp.xmlstream import register_stanza_plugin | from slixmpp.xmlstream import register_stanza_plugin | ||||||
|  |  | ||||||
| from stanza import Action | from stanza import Action | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class ActionUserBot(sleekxmpp.ClientXMPP): | class ActionUserBot(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A simple SleekXMPP bot that sends a custom action stanza |     A simple Slixmpp bot that sends a custom action stanza | ||||||
|     to another client. |     to another client. | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password, other): |     def __init__(self, jid, password, other): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|         self.action_provider = other |         self.action_provider = other | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,11 +1,11 @@ | |||||||
| from sleekxmpp.xmlstream import ElementBase | from slixmpp.xmlstream import ElementBase | ||||||
|  |  | ||||||
| class Action(ElementBase): | class Action(ElementBase): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A stanza class for XML content of the form: |     A stanza class for XML content of the form: | ||||||
|  |  | ||||||
|     <action xmlns="sleekxmpp:custom:actions"> |     <action xmlns="slixmpp:custom:actions"> | ||||||
|       <method>X</method> |       <method>X</method> | ||||||
|       <param>X</param> |       <param>X</param> | ||||||
|       <status>X</status> |       <status>X</status> | ||||||
| @@ -17,7 +17,7 @@ class Action(ElementBase): | |||||||
|     name = 'action' |     name = 'action' | ||||||
|  |  | ||||||
|     #: The namespace of the main XML tag. |     #: The namespace of the main XML tag. | ||||||
|     namespace = 'sleekxmpp:custom:actions' |     namespace = 'slixmpp:custom:actions' | ||||||
|  |  | ||||||
|     #: The `plugin_attrib` value is the name that can be used |     #: The `plugin_attrib` value is the name that can be used | ||||||
|     #: with a parent stanza to access this stanza. For example |     #: with a parent stanza to access this stanza. For example | ||||||
| @@ -50,7 +50,7 @@ class Action(ElementBase): | |||||||
|     #: are marked as sub_interfaces, and so the XML produced will |     #: are marked as sub_interfaces, and so the XML produced will | ||||||
|     #: look like: |     #: look like: | ||||||
|     #:  |     #:  | ||||||
|     #:     <action xmlns="sleekxmpp:custom:actions"> |     #:     <action xmlns="slixmpp:custom:actions"> | ||||||
|     #:       <method>foo</method> |     #:       <method>foo</method> | ||||||
|     #:     </action> |     #:     </action> | ||||||
|     sub_interfaces = interfaces |     sub_interfaces = interfaces | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2010  Nathanael C. Fritz |     Copyright (C) 2010  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -14,22 +14,22 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
| from sleekxmpp.exceptions import IqError, IqTimeout | from slixmpp.exceptions import IqError, IqTimeout | ||||||
|  |  | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class Disco(sleekxmpp.ClientXMPP): | class Disco(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A demonstration for using basic service discovery. |     A demonstration for using basic service discovery. | ||||||
| @@ -42,7 +42,7 @@ class Disco(sleekxmpp.ClientXMPP): | |||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password, target_jid, target_node='', get=''): |     def __init__(self, jid, password, target_jid, target_node='', get=''): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|         # Using service discovery requires the XEP-0030 plugin. |         # Using service discovery requires the XEP-0030 plugin. | ||||||
|         self.register_plugin('xep_0030') |         self.register_plugin('xep_0030') | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2012  Nathanael C. Fritz |     Copyright (C) 2012  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -15,16 +15,16 @@ import getpass | |||||||
| import threading | import threading | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
| from sleekxmpp.exceptions import XMPPError | from slixmpp.exceptions import XMPPError | ||||||
|  |  | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
| @@ -37,14 +37,14 @@ FILE_TYPES = { | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| class AvatarDownloader(sleekxmpp.ClientXMPP): | class AvatarDownloader(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A basic script for downloading the avatars for a user's contacts. |     A basic script for downloading the avatars for a user's contacts. | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password): |     def __init__(self, jid, password): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|         self.add_event_handler("session_start", self.start, threaded=True) |         self.add_event_handler("session_start", self.start, threaded=True) | ||||||
|         self.add_event_handler("changed_status", self.wait_for_presences) |         self.add_event_handler("changed_status", self.wait_for_presences) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2010  Nathanael C. Fritz |     Copyright (C) 2010  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -14,28 +14,28 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class EchoBot(sleekxmpp.ClientXMPP): | class EchoBot(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A simple SleekXMPP bot that will echo messages it |     A simple Slixmpp bot that will echo messages it | ||||||
|     receives, along with a short thank you message. |     receives, along with a short thank you message. | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password): |     def __init__(self, jid, password): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|         # The session_start event will be triggered when |         # The session_start event will be triggered when | ||||||
|         # the bot establishes its connection with the server |         # the bot establishes its connection with the server | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2010  Nathanael C. Fritz |     Copyright (C) 2010  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -14,15 +14,15 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
| from sleekxmpp.componentxmpp import ComponentXMPP | from slixmpp.componentxmpp import ComponentXMPP | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
| @@ -31,7 +31,7 @@ else: | |||||||
| class EchoComponent(ComponentXMPP): | class EchoComponent(ComponentXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A simple SleekXMPP component that echoes messages. |     A simple Slixmpp component that echoes messages. | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, secret, server, port): |     def __init__(self, jid, secret, server, port): | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2010  Nathanael C. Fritz |     Copyright (C) 2010  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -14,33 +14,33 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
|  |  | ||||||
| import ssl | import ssl | ||||||
| from sleekxmpp.xmlstream import cert | from slixmpp.xmlstream import cert | ||||||
|  |  | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class GTalkBot(sleekxmpp.ClientXMPP): | class GTalkBot(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A demonstration of using SleekXMPP with accounts from a Google Apps |     A demonstration of using Slixmpp with accounts from a Google Apps | ||||||
|     account with a custom domain, because it requires custom certificate |     account with a custom domain, because it requires custom certificate | ||||||
|     validation. |     validation. | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password): |     def __init__(self, jid, password): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|         # The session_start event will be triggered when |         # The session_start event will be triggered when | ||||||
|         # the bot establishes its connection with the server |         # the bot establishes its connection with the server | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2010  Nathanael C. Fritz |     Copyright (C) 2010  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -14,27 +14,27 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class IBBReceiver(sleekxmpp.ClientXMPP): | class IBBReceiver(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A basic example of creating and using an in-band bytestream. |     A basic example of creating and using an in-band bytestream. | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password): |     def __init__(self, jid, password): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|         self.register_plugin('xep_0030') # Service Discovery |         self.register_plugin('xep_0030') # Service Discovery | ||||||
|         self.register_plugin('xep_0047', { |         self.register_plugin('xep_0047', { | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2010  Nathanael C. Fritz |     Copyright (C) 2010  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -14,27 +14,27 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class IBBSender(sleekxmpp.ClientXMPP): | class IBBSender(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A basic example of creating and using an in-band bytestream. |     A basic example of creating and using an in-band bytestream. | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password, receiver, filename): |     def __init__(self, jid, password, receiver, filename): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|         self.receiver = receiver |         self.receiver = receiver | ||||||
|         self.filename = filename |         self.filename = filename | ||||||
|   | |||||||
| @@ -6,14 +6,14 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
| @@ -62,7 +62,7 @@ if opts.new_password is None: | |||||||
|     opts.new_password = getpass.getpass("New Password: ") |     opts.new_password = getpass.getpass("New Password: ") | ||||||
|  |  | ||||||
|  |  | ||||||
| old_xmpp = sleekxmpp.ClientXMPP(opts.old_jid, opts.old_password) | old_xmpp = slixmpp.ClientXMPP(opts.old_jid, opts.old_password) | ||||||
|  |  | ||||||
| # If you are connecting to Facebook and wish to use the | # If you are connecting to Facebook and wish to use the | ||||||
| # X-FACEBOOK-PLATFORM authentication mechanism, you will need | # X-FACEBOOK-PLATFORM authentication mechanism, you will need | ||||||
| @@ -98,7 +98,7 @@ if not roster: | |||||||
|     print('No roster to migrate') |     print('No roster to migrate') | ||||||
|     sys.exit() |     sys.exit() | ||||||
|  |  | ||||||
| new_xmpp = sleekxmpp.ClientXMPP(opts.new_jid, opts.new_password) | new_xmpp = slixmpp.ClientXMPP(opts.new_jid, opts.new_password) | ||||||
| def on_session2(event): | def on_session2(event): | ||||||
|     new_xmpp.get_roster() |     new_xmpp.get_roster() | ||||||
|     new_xmpp.send_presence() |     new_xmpp.send_presence() | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2010  Nathanael C. Fritz |     Copyright (C) 2010  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -14,29 +14,29 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class MUCBot(sleekxmpp.ClientXMPP): | class MUCBot(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A simple SleekXMPP bot that will greets those |     A simple Slixmpp bot that will greets those | ||||||
|     who enter the room, and acknowledge any messages |     who enter the room, and acknowledge any messages | ||||||
|     that mentions the bot's nickname. |     that mentions the bot's nickname. | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password, room, nick): |     def __init__(self, jid, password, room, nick): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|         self.room = room |         self.room = room | ||||||
|         self.nick = nick |         self.nick = nick | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2010  Nathanael C. Fritz |     Copyright (C) 2010  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -14,28 +14,28 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class PingTest(sleekxmpp.ClientXMPP): | class PingTest(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A simple SleekXMPP bot that will send a ping request |     A simple Slixmpp bot that will send a ping request | ||||||
|     to a given JID. |     to a given JID. | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password, pingjid): |     def __init__(self, jid, password, pingjid): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|         if pingjid is None: |         if pingjid is None: | ||||||
|             pingjid = self.boundjid.bare |             pingjid = self.boundjid.bare | ||||||
|         self.pingjid = pingjid |         self.pingjid = pingjid | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2010  Nathanael C. Fritz |     Copyright (C) 2010  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -14,28 +14,28 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class EchoBot(sleekxmpp.ClientXMPP): | class EchoBot(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A simple SleekXMPP bot that will echo messages it |     A simple Slixmpp bot that will echo messages it | ||||||
|     receives, along with a short thank you message. |     receives, along with a short thank you message. | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password): |     def __init__(self, jid, password): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|         # The session_start event will be triggered when |         # The session_start event will be triggered when | ||||||
|         # the bot establishes its connection with the server |         # the bot establishes its connection with the server | ||||||
|   | |||||||
| @@ -6,22 +6,22 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
| from sleekxmpp.xmlstream import ET, tostring | from slixmpp.xmlstream import ET, tostring | ||||||
|  |  | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class PubsubClient(sleekxmpp.ClientXMPP): | class PubsubClient(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     def __init__(self, jid, password, server, |     def __init__(self, jid, password, server, | ||||||
|                        node=None, action='list', data=''): |                        node=None, action='list', data=''): | ||||||
|   | |||||||
| @@ -6,24 +6,24 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
| from sleekxmpp.xmlstream import ET, tostring | from slixmpp.xmlstream import ET, tostring | ||||||
| from sleekxmpp.xmlstream.matcher import StanzaPath | from slixmpp.xmlstream.matcher import StanzaPath | ||||||
| from sleekxmpp.xmlstream.handler import Callback | from slixmpp.xmlstream.handler import Callback | ||||||
|  |  | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class PubsubEvents(sleekxmpp.ClientXMPP): | class PubsubEvents(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     def __init__(self, jid, password): |     def __init__(self, jid, password): | ||||||
|         super(PubsubEvents, self).__init__(jid, password) |         super(PubsubEvents, self).__init__(jid, password) | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2010  Nathanael C. Fritz |     Copyright (C) 2010  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -14,21 +14,21 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
| from sleekxmpp.exceptions import IqError, IqTimeout | from slixmpp.exceptions import IqError, IqTimeout | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class RegisterBot(sleekxmpp.ClientXMPP): | class RegisterBot(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A basic bot that will attempt to register an account |     A basic bot that will attempt to register an account | ||||||
| @@ -40,7 +40,7 @@ class RegisterBot(sleekxmpp.ClientXMPP): | |||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password): |     def __init__(self, jid, password): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|         # The session_start event will be triggered when |         # The session_start event will be triggered when | ||||||
|         # the bot establishes its connection with the server |         # the bot establishes its connection with the server | ||||||
| @@ -54,7 +54,7 @@ class RegisterBot(sleekxmpp.ClientXMPP): | |||||||
|         # the basic registration fields, a data form, an |         # the basic registration fields, a data form, an | ||||||
|         # out-of-band URL, or any combination. For more advanced |         # out-of-band URL, or any combination. For more advanced | ||||||
|         # cases, you will need to examine the fields provided |         # cases, you will need to examine the fields provided | ||||||
|         # and respond accordingly. SleekXMPP provides plugins |         # and respond accordingly. Slixmpp provides plugins | ||||||
|         # for data forms and OOB links that will make that easier. |         # for data forms and OOB links that will make that easier. | ||||||
|         self.add_event_handler("register", self.register, threaded=True) |         self.add_event_handler("register", self.register, threaded=True) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2011  Nathanael C. Fritz |     Copyright (C) 2011  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -15,22 +15,22 @@ import getpass | |||||||
| import threading | import threading | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
| from sleekxmpp.exceptions import IqError, IqTimeout | from slixmpp.exceptions import IqError, IqTimeout | ||||||
|  |  | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class RosterBrowser(sleekxmpp.ClientXMPP): | class RosterBrowser(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A basic script for dumping a client's roster to |     A basic script for dumping a client's roster to | ||||||
| @@ -38,7 +38,7 @@ class RosterBrowser(sleekxmpp.ClientXMPP): | |||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password): |     def __init__(self, jid, password): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|         # The session_start event will be triggered when |         # The session_start event will be triggered when | ||||||
|         # the bot establishes its connection with the server |         # the bot establishes its connection with the server | ||||||
|         # and the XML streams are ready for use. We want to |         # and the XML streams are ready for use. We want to | ||||||
|   | |||||||
| @@ -2,14 +2,14 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2011  Dann Martens |     Copyright (C) 2011  Dann Martens | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0009.remote import Endpoint, remote, Remote, \ | from slixmpp.plugins.xep_0009.remote import Endpoint, remote, Remote, \ | ||||||
|     ANY_ALL, Future |     ANY_ALL, Future | ||||||
| import time | import time | ||||||
|  |  | ||||||
|   | |||||||
| @@ -2,14 +2,14 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2011  Dann Martens |     Copyright (C) 2011  Dann Martens | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0009.remote import Endpoint, remote, Remote, \ | from slixmpp.plugins.xep_0009.remote import Endpoint, remote, Remote, \ | ||||||
|     ANY_ALL |     ANY_ALL | ||||||
| import threading | import threading | ||||||
| import time | import time | ||||||
|   | |||||||
| @@ -2,14 +2,14 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2011  Dann Martens |     Copyright (C) 2011  Dann Martens | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0009.remote import Endpoint, remote, Remote, \ | from slixmpp.plugins.xep_0009.remote import Endpoint, remote, Remote, \ | ||||||
|     ANY_ALL |     ANY_ALL | ||||||
| import threading | import threading | ||||||
|  |  | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2010  Nathanael C. Fritz |     Copyright (C) 2010  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -14,28 +14,28 @@ import logging | |||||||
| import getpass | import getpass | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class SendMsgBot(sleekxmpp.ClientXMPP): | class SendMsgBot(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A basic SleekXMPP bot that will log in, send a message, |     A basic Slixmpp bot that will log in, send a message, | ||||||
|     and then log out. |     and then log out. | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password, recipient, message): |     def __init__(self, jid, password, recipient, message): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|         # The message we wish to send, and the JID that |         # The message we wish to send, and the JID that | ||||||
|         # will receive it. |         # will receive it. | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2012  Nathanael C. Fritz |     Copyright (C) 2012  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -17,29 +17,29 @@ import getpass | |||||||
| import threading | import threading | ||||||
| from optparse import OptionParser | from optparse import OptionParser | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
| from sleekxmpp.exceptions import XMPPError | from slixmpp.exceptions import XMPPError | ||||||
|  |  | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class AvatarSetter(sleekxmpp.ClientXMPP): | class AvatarSetter(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A basic script for downloading the avatars for a user's contacts. |     A basic script for downloading the avatars for a user's contacts. | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password, filepath): |     def __init__(self, jid, password, filepath): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|         self.add_event_handler("session_start", self.start, threaded=True) |         self.add_event_handler("session_start", self.start, threaded=True) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -2,9 +2,9 @@ | |||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
|  |  | ||||||
| """ | """ | ||||||
|     SleekXMPP: The Sleek XMPP Library |     Slixmpp: The Slick XMPP Library | ||||||
|     Copyright (C) 2010  Nathanael C. Fritz |     Copyright (C) 2010  Nathanael C. Fritz | ||||||
|     This file is part of SleekXMPP. |     This file is part of Slixmpp. | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |     See the file LICENSE for copying permission. | ||||||
| """ | """ | ||||||
| @@ -21,24 +21,24 @@ except ImportError: | |||||||
|     from urllib.parse import urlencode |     from urllib.parse import urlencode | ||||||
|     from http.client import HTTPSConnection |     from http.client import HTTPSConnection | ||||||
|  |  | ||||||
| import sleekxmpp | import slixmpp | ||||||
| from sleekxmpp.xmlstream import JID | from slixmpp.xmlstream import JID | ||||||
|  |  | ||||||
| # Python versions before 3.0 do not use UTF-8 encoding | # Python versions before 3.0 do not use UTF-8 encoding | ||||||
| # by default. To ensure that Unicode is handled properly | # by default. To ensure that Unicode is handled properly | ||||||
| # throughout SleekXMPP, we will set the default encoding | # throughout Slixmpp, we will set the default encoding | ||||||
| # ourselves to UTF-8. | # ourselves to UTF-8. | ||||||
| if sys.version_info < (3, 0): | if sys.version_info < (3, 0): | ||||||
|     from sleekxmpp.util.misc_ops import setdefaultencoding |     from slixmpp.util.misc_ops import setdefaultencoding | ||||||
|     setdefaultencoding('utf8') |     setdefaultencoding('utf8') | ||||||
| else: | else: | ||||||
|     raw_input = input |     raw_input = input | ||||||
|  |  | ||||||
|  |  | ||||||
| class ThirdPartyAuthBot(sleekxmpp.ClientXMPP): | class ThirdPartyAuthBot(slixmpp.ClientXMPP): | ||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     A simple SleekXMPP bot that will echo messages it |     A simple Slixmpp bot that will echo messages it | ||||||
|     receives, along with a short thank you message. |     receives, along with a short thank you message. | ||||||
|  |  | ||||||
|     This version uses a thirdpary service for authentication, |     This version uses a thirdpary service for authentication, | ||||||
| @@ -46,7 +46,7 @@ class ThirdPartyAuthBot(sleekxmpp.ClientXMPP): | |||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, jid, password): |     def __init__(self, jid, password): | ||||||
|         sleekxmpp.ClientXMPP.__init__(self, jid, password) |         slixmpp.ClientXMPP.__init__(self, jid, password) | ||||||
|  |  | ||||||
|         # The X-GOOGLE-TOKEN mech is ranked lower than PLAIN |         # The X-GOOGLE-TOKEN mech is ranked lower than PLAIN | ||||||
|         # due to Google only allowing a single SASL attempt per |         # due to Google only allowing a single SASL attempt per | ||||||
| @@ -55,7 +55,7 @@ class ThirdPartyAuthBot(sleekxmpp.ClientXMPP): | |||||||
|         # X-GOOGLE-TOKEN with a TLS connection, explicitly select |         # X-GOOGLE-TOKEN with a TLS connection, explicitly select | ||||||
|         # it using: |         # it using: | ||||||
|         # |         # | ||||||
|         # sleekxmpp.ClientXMPP.__init__(self, jid, password, |         # slixmpp.ClientXMPP.__init__(self, jid, password, | ||||||
|         #                               sasl_mech="X-GOOGLE-TOKEN") |         #                               sasl_mech="X-GOOGLE-TOKEN") | ||||||
|  |  | ||||||
|         # The session_start event will be triggered when |         # The session_start event will be triggered when | ||||||
|   | |||||||
| @@ -16,7 +16,7 @@ except ImportError: | |||||||
|     print('This demo requires the requests package for using HTTP.') |     print('This demo requires the requests package for using HTTP.') | ||||||
|     sys.exit() |     sys.exit() | ||||||
|  |  | ||||||
| from sleekxmpp import ClientXMPP | from slixmpp import ClientXMPP | ||||||
|  |  | ||||||
|  |  | ||||||
| class LocationBot(ClientXMPP): | class LocationBot(ClientXMPP): | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ except ImportError: | |||||||
|     print('This demo requires the appscript package to interact with iTunes.') |     print('This demo requires the appscript package to interact with iTunes.') | ||||||
|     sys.exit() |     sys.exit() | ||||||
|  |  | ||||||
| from sleekxmpp import ClientXMPP | from slixmpp import ClientXMPP | ||||||
|  |  | ||||||
|  |  | ||||||
| class TuneBot(ClientXMPP): | class TuneBot(ClientXMPP): | ||||||
|   | |||||||
							
								
								
									
										190
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										190
									
								
								setup.py
									
									
									
									
									
								
							| @@ -16,7 +16,7 @@ except ImportError: | |||||||
| # from ez_setup import use_setuptools | # from ez_setup import use_setuptools | ||||||
|  |  | ||||||
| from testall import TestCommand | from testall import TestCommand | ||||||
| from sleekxmpp.version import __version__ | from slixmpp.version import __version__ | ||||||
| # if 'cygwin' in sys.platform.lower(): | # if 'cygwin' in sys.platform.lower(): | ||||||
| #     min_version = '0.6c6' | #     min_version = '0.6c6' | ||||||
| # else: | # else: | ||||||
| @@ -31,7 +31,7 @@ from sleekxmpp.version import __version__ | |||||||
| # from setuptools import setup, find_packages, Extension, Feature | # from setuptools import setup, find_packages, Extension, Feature | ||||||
|  |  | ||||||
| VERSION          = __version__ | VERSION          = __version__ | ||||||
| DESCRIPTION      = 'SleekXMPP is an elegant Python library for XMPP (aka Jabber, Google Talk, etc).' | DESCRIPTION      = 'Slixmpp is an elegant Python library for XMPP (aka Jabber, Google Talk, etc).' | ||||||
| with codecs.open('README.rst', 'r', encoding='UTF-8') as readme: | with codecs.open('README.rst', 'r', encoding='UTF-8') as readme: | ||||||
|     LONG_DESCRIPTION = ''.join(readme) |     LONG_DESCRIPTION = ''.join(readme) | ||||||
|  |  | ||||||
| @@ -46,107 +46,107 @@ CLASSIFIERS      = [ 'Intended Audience :: Developers', | |||||||
|                      'Topic :: Software Development :: Libraries :: Python Modules', |                      'Topic :: Software Development :: Libraries :: Python Modules', | ||||||
|                    ] |                    ] | ||||||
|  |  | ||||||
| packages     = [ 'sleekxmpp', | packages     = [ 'slixmpp', | ||||||
|                  'sleekxmpp/stanza', |                  'slixmpp/stanza', | ||||||
|                  'sleekxmpp/test', |                  'slixmpp/test', | ||||||
|                  'sleekxmpp/roster', |                  'slixmpp/roster', | ||||||
|                  'sleekxmpp/util', |                  'slixmpp/util', | ||||||
|                  'sleekxmpp/util/sasl', |                  'slixmpp/util/sasl', | ||||||
|                  'sleekxmpp/xmlstream', |                  'slixmpp/xmlstream', | ||||||
|                  'sleekxmpp/xmlstream/matcher', |                  'slixmpp/xmlstream/matcher', | ||||||
|                  'sleekxmpp/xmlstream/handler', |                  'slixmpp/xmlstream/handler', | ||||||
|                  'sleekxmpp/plugins', |                  'slixmpp/plugins', | ||||||
|                  'sleekxmpp/plugins/xep_0004', |                  'slixmpp/plugins/xep_0004', | ||||||
|                  'sleekxmpp/plugins/xep_0004/stanza', |                  'slixmpp/plugins/xep_0004/stanza', | ||||||
|                  'sleekxmpp/plugins/xep_0009', |                  'slixmpp/plugins/xep_0009', | ||||||
|                  'sleekxmpp/plugins/xep_0009/stanza', |                  'slixmpp/plugins/xep_0009/stanza', | ||||||
|                  'sleekxmpp/plugins/xep_0012', |                  'slixmpp/plugins/xep_0012', | ||||||
|                  'sleekxmpp/plugins/xep_0013', |                  'slixmpp/plugins/xep_0013', | ||||||
|                  'sleekxmpp/plugins/xep_0016', |                  'slixmpp/plugins/xep_0016', | ||||||
|                  'sleekxmpp/plugins/xep_0020', |                  'slixmpp/plugins/xep_0020', | ||||||
|                  'sleekxmpp/plugins/xep_0027', |                  'slixmpp/plugins/xep_0027', | ||||||
|                  'sleekxmpp/plugins/xep_0030', |                  'slixmpp/plugins/xep_0030', | ||||||
|                  'sleekxmpp/plugins/xep_0030/stanza', |                  'slixmpp/plugins/xep_0030/stanza', | ||||||
|                  'sleekxmpp/plugins/xep_0033', |                  'slixmpp/plugins/xep_0033', | ||||||
|                  'sleekxmpp/plugins/xep_0047', |                  'slixmpp/plugins/xep_0047', | ||||||
|                  'sleekxmpp/plugins/xep_0048', |                  'slixmpp/plugins/xep_0048', | ||||||
|                  'sleekxmpp/plugins/xep_0049', |                  'slixmpp/plugins/xep_0049', | ||||||
|                  'sleekxmpp/plugins/xep_0050', |                  'slixmpp/plugins/xep_0050', | ||||||
|                  'sleekxmpp/plugins/xep_0054', |                  'slixmpp/plugins/xep_0054', | ||||||
|                  'sleekxmpp/plugins/xep_0059', |                  'slixmpp/plugins/xep_0059', | ||||||
|                  'sleekxmpp/plugins/xep_0060', |                  'slixmpp/plugins/xep_0060', | ||||||
|                  'sleekxmpp/plugins/xep_0060/stanza', |                  'slixmpp/plugins/xep_0060/stanza', | ||||||
|                  'sleekxmpp/plugins/xep_0065', |                  'slixmpp/plugins/xep_0065', | ||||||
|                  'sleekxmpp/plugins/xep_0066', |                  'slixmpp/plugins/xep_0066', | ||||||
|                  'sleekxmpp/plugins/xep_0071', |                  'slixmpp/plugins/xep_0071', | ||||||
|                  'sleekxmpp/plugins/xep_0077', |                  'slixmpp/plugins/xep_0077', | ||||||
|                  'sleekxmpp/plugins/xep_0078', |                  'slixmpp/plugins/xep_0078', | ||||||
|                  'sleekxmpp/plugins/xep_0080', |                  'slixmpp/plugins/xep_0080', | ||||||
|                  'sleekxmpp/plugins/xep_0084', |                  'slixmpp/plugins/xep_0084', | ||||||
|                  'sleekxmpp/plugins/xep_0085', |                  'slixmpp/plugins/xep_0085', | ||||||
|                  'sleekxmpp/plugins/xep_0086', |                  'slixmpp/plugins/xep_0086', | ||||||
|                  'sleekxmpp/plugins/xep_0091', |                  'slixmpp/plugins/xep_0091', | ||||||
|                  'sleekxmpp/plugins/xep_0092', |                  'slixmpp/plugins/xep_0092', | ||||||
|                  'sleekxmpp/plugins/xep_0095', |                  'slixmpp/plugins/xep_0095', | ||||||
|                  'sleekxmpp/plugins/xep_0096', |                  'slixmpp/plugins/xep_0096', | ||||||
|                  'sleekxmpp/plugins/xep_0107', |                  'slixmpp/plugins/xep_0107', | ||||||
|                  'sleekxmpp/plugins/xep_0108', |                  'slixmpp/plugins/xep_0108', | ||||||
|                  'sleekxmpp/plugins/xep_0115', |                  'slixmpp/plugins/xep_0115', | ||||||
|                  'sleekxmpp/plugins/xep_0118', |                  'slixmpp/plugins/xep_0118', | ||||||
|                  'sleekxmpp/plugins/xep_0128', |                  'slixmpp/plugins/xep_0128', | ||||||
|                  'sleekxmpp/plugins/xep_0131', |                  'slixmpp/plugins/xep_0131', | ||||||
|                  'sleekxmpp/plugins/xep_0152', |                  'slixmpp/plugins/xep_0152', | ||||||
|                  'sleekxmpp/plugins/xep_0153', |                  'slixmpp/plugins/xep_0153', | ||||||
|                  'sleekxmpp/plugins/xep_0172', |                  'slixmpp/plugins/xep_0172', | ||||||
|                  'sleekxmpp/plugins/xep_0184', |                  'slixmpp/plugins/xep_0184', | ||||||
|                  'sleekxmpp/plugins/xep_0186', |                  'slixmpp/plugins/xep_0186', | ||||||
|                  'sleekxmpp/plugins/xep_0191', |                  'slixmpp/plugins/xep_0191', | ||||||
|                  'sleekxmpp/plugins/xep_0196', |                  'slixmpp/plugins/xep_0196', | ||||||
|                  'sleekxmpp/plugins/xep_0198', |                  'slixmpp/plugins/xep_0198', | ||||||
|                  'sleekxmpp/plugins/xep_0199', |                  'slixmpp/plugins/xep_0199', | ||||||
|                  'sleekxmpp/plugins/xep_0202', |                  'slixmpp/plugins/xep_0202', | ||||||
|                  'sleekxmpp/plugins/xep_0203', |                  'slixmpp/plugins/xep_0203', | ||||||
|                  'sleekxmpp/plugins/xep_0221', |                  'slixmpp/plugins/xep_0221', | ||||||
|                  'sleekxmpp/plugins/xep_0224', |                  'slixmpp/plugins/xep_0224', | ||||||
|                  'sleekxmpp/plugins/xep_0231', |                  'slixmpp/plugins/xep_0231', | ||||||
|                  'sleekxmpp/plugins/xep_0235', |                  'slixmpp/plugins/xep_0235', | ||||||
|                  'sleekxmpp/plugins/xep_0249', |                  'slixmpp/plugins/xep_0249', | ||||||
|                  'sleekxmpp/plugins/xep_0257', |                  'slixmpp/plugins/xep_0257', | ||||||
|                  'sleekxmpp/plugins/xep_0258', |                  'slixmpp/plugins/xep_0258', | ||||||
|                  'sleekxmpp/plugins/xep_0279', |                  'slixmpp/plugins/xep_0279', | ||||||
|                  'sleekxmpp/plugins/xep_0280', |                  'slixmpp/plugins/xep_0280', | ||||||
|                  'sleekxmpp/plugins/xep_0297', |                  'slixmpp/plugins/xep_0297', | ||||||
|                  'sleekxmpp/plugins/xep_0308', |                  'slixmpp/plugins/xep_0308', | ||||||
|                  'sleekxmpp/plugins/xep_0313', |                  'slixmpp/plugins/xep_0313', | ||||||
|                  'sleekxmpp/plugins/xep_0319', |                  'slixmpp/plugins/xep_0319', | ||||||
|                  'sleekxmpp/plugins/xep_0323', |                  'slixmpp/plugins/xep_0323', | ||||||
|                  'sleekxmpp/plugins/xep_0323/stanza', |                  'slixmpp/plugins/xep_0323/stanza', | ||||||
|                  'sleekxmpp/plugins/xep_0325', |                  'slixmpp/plugins/xep_0325', | ||||||
|                  'sleekxmpp/plugins/xep_0325/stanza', |                  'slixmpp/plugins/xep_0325/stanza', | ||||||
|                  'sleekxmpp/plugins/google', |                  'slixmpp/plugins/google', | ||||||
|                  'sleekxmpp/plugins/google/gmail', |                  'slixmpp/plugins/google/gmail', | ||||||
|                  'sleekxmpp/plugins/google/auth', |                  'slixmpp/plugins/google/auth', | ||||||
|                  'sleekxmpp/plugins/google/settings', |                  'slixmpp/plugins/google/settings', | ||||||
|                  'sleekxmpp/plugins/google/nosave', |                  'slixmpp/plugins/google/nosave', | ||||||
|                  'sleekxmpp/features', |                  'slixmpp/features', | ||||||
|                  'sleekxmpp/features/feature_mechanisms', |                  'slixmpp/features/feature_mechanisms', | ||||||
|                  'sleekxmpp/features/feature_mechanisms/stanza', |                  'slixmpp/features/feature_mechanisms/stanza', | ||||||
|                  'sleekxmpp/features/feature_starttls', |                  'slixmpp/features/feature_starttls', | ||||||
|                  'sleekxmpp/features/feature_bind', |                  'slixmpp/features/feature_bind', | ||||||
|                  'sleekxmpp/features/feature_session', |                  'slixmpp/features/feature_session', | ||||||
|                  'sleekxmpp/features/feature_rosterver', |                  'slixmpp/features/feature_rosterver', | ||||||
|                  'sleekxmpp/features/feature_preapproval', |                  'slixmpp/features/feature_preapproval', | ||||||
|                  'sleekxmpp/thirdparty', |                  'slixmpp/thirdparty', | ||||||
|                  ] |                  ] | ||||||
|  |  | ||||||
| setup( | setup( | ||||||
|     name             = "sleekxmpp", |     name             = "slixmpp", | ||||||
|     version          = VERSION, |     version          = VERSION, | ||||||
|     description      = DESCRIPTION, |     description      = DESCRIPTION, | ||||||
|     long_description = LONG_DESCRIPTION, |     long_description = LONG_DESCRIPTION, | ||||||
|     author       = 'Nathanael Fritz', |     author       = 'Nathanael Fritz', | ||||||
|     author_email = 'fritzy [at] netflint.net', |     author_email = 'fritzy [at] netflint.net', | ||||||
|     url          = 'http://github.com/fritzy/SleekXMPP', |     url          = 'http://github.com/fritzy/Slixmpp', | ||||||
|     license      = 'MIT', |     license      = 'MIT', | ||||||
|     platforms    = [ 'any' ], |     platforms    = [ 'any' ], | ||||||
|     packages     = packages, |     packages     = packages, | ||||||
|   | |||||||
| @@ -1,30 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2010  Nathanael C. Fritz |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| import logging |  | ||||||
| if hasattr(logging, 'NullHandler'): |  | ||||||
|     NullHandler = logging.NullHandler |  | ||||||
| else: |  | ||||||
|     class NullHandler(logging.Handler): |  | ||||||
|         def handle(self, record): |  | ||||||
|             pass |  | ||||||
| logging.getLogger(__name__).addHandler(NullHandler()) |  | ||||||
| del NullHandler |  | ||||||
|  |  | ||||||
|  |  | ||||||
| from sleekxmpp.stanza import Message, Presence, Iq |  | ||||||
| from sleekxmpp.jid import JID, InvalidJID |  | ||||||
| from sleekxmpp.xmlstream.stanzabase import ET, ElementBase, register_stanza_plugin |  | ||||||
| from sleekxmpp.xmlstream.handler import * |  | ||||||
| from sleekxmpp.xmlstream import XMLStream, RestartStream |  | ||||||
| from sleekxmpp.xmlstream.matcher import * |  | ||||||
| from sleekxmpp.basexmpp import BaseXMPP |  | ||||||
| from sleekxmpp.clientxmpp import ClientXMPP |  | ||||||
| from sleekxmpp.componentxmpp import ComponentXMPP |  | ||||||
|  |  | ||||||
| from sleekxmpp.version import __version__, __version_info__ |  | ||||||
| @@ -1,19 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2011  Nathanael C. Fritz |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.features.feature_bind.bind import FeatureBind |  | ||||||
| from sleekxmpp.features.feature_bind.stanza import Bind |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(FeatureBind) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Retain some backwards compatibility |  | ||||||
| feature_bind = FeatureBind |  | ||||||
| @@ -1,22 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2011  Nathanael C. Fritz |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.features.feature_mechanisms.mechanisms import FeatureMechanisms |  | ||||||
| from sleekxmpp.features.feature_mechanisms.stanza import Mechanisms |  | ||||||
| from sleekxmpp.features.feature_mechanisms.stanza import Auth |  | ||||||
| from sleekxmpp.features.feature_mechanisms.stanza import Success |  | ||||||
| from sleekxmpp.features.feature_mechanisms.stanza import Failure |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(FeatureMechanisms) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Retain some backwards compatibility |  | ||||||
| feature_mechanisms = FeatureMechanisms |  | ||||||
| @@ -1,16 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2011  Nathanael C. Fritz |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
|  |  | ||||||
| from sleekxmpp.features.feature_mechanisms.stanza.mechanisms import Mechanisms |  | ||||||
| from sleekxmpp.features.feature_mechanisms.stanza.auth import Auth |  | ||||||
| from sleekxmpp.features.feature_mechanisms.stanza.success import Success |  | ||||||
| from sleekxmpp.features.feature_mechanisms.stanza.failure import Failure |  | ||||||
| from sleekxmpp.features.feature_mechanisms.stanza.challenge import Challenge |  | ||||||
| from sleekxmpp.features.feature_mechanisms.stanza.response import Response |  | ||||||
| from sleekxmpp.features.feature_mechanisms.stanza.abort import Abort |  | ||||||
| @@ -1,15 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2012  Nathanael C. Fritz |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.features.feature_preapproval.preapproval import FeaturePreApproval |  | ||||||
| from sleekxmpp.features.feature_preapproval.stanza import PreApproval |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(FeaturePreApproval) |  | ||||||
| @@ -1,19 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2012  Nathanael C. Fritz |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.features.feature_rosterver.rosterver import FeatureRosterVer |  | ||||||
| from sleekxmpp.features.feature_rosterver.stanza import RosterVer |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(FeatureRosterVer) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Retain some backwards compatibility |  | ||||||
| feature_rosterver = FeatureRosterVer |  | ||||||
| @@ -1,19 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2011  Nathanael C. Fritz |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.features.feature_session.session import FeatureSession |  | ||||||
| from sleekxmpp.features.feature_session.stanza import Session |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(FeatureSession) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Retain some backwards compatibility |  | ||||||
| feature_session = FeatureSession |  | ||||||
| @@ -1,19 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2011  Nathanael C. Fritz |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.features.feature_starttls.starttls import FeatureSTARTTLS |  | ||||||
| from sleekxmpp.features.feature_starttls.stanza import * |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(FeatureSTARTTLS) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Retain some backwards compatibility |  | ||||||
| feature_starttls = FeatureSTARTTLS |  | ||||||
| @@ -1,10 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2013 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.google.auth import stanza |  | ||||||
| from sleekxmpp.plugins.google.auth.auth import GoogleAuth |  | ||||||
| @@ -1,10 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2013 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.google.gmail import stanza |  | ||||||
| from sleekxmpp.plugins.google.gmail.notifications import Gmail |  | ||||||
| @@ -1,10 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2013 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.google.nosave import stanza |  | ||||||
| from sleekxmpp.plugins.google.nosave.nosave import GoogleNoSave |  | ||||||
| @@ -1,10 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2013 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.google.settings import stanza |  | ||||||
| from sleekxmpp.plugins.google.settings.settings import GoogleSettings |  | ||||||
| @@ -1,22 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0004.stanza import Form |  | ||||||
| from sleekxmpp.plugins.xep_0004.stanza import FormField, FieldOption |  | ||||||
| from sleekxmpp.plugins.xep_0004.dataforms import XEP_0004 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0004) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Retain some backwards compatibility |  | ||||||
| xep_0004 = XEP_0004 |  | ||||||
| xep_0004.makeForm = xep_0004.make_form |  | ||||||
| xep_0004.buildForm = xep_0004.build_form |  | ||||||
| @@ -1,10 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0004.stanza.field import FormField, FieldOption |  | ||||||
| from sleekxmpp.plugins.xep_0004.stanza.form import Form |  | ||||||
| @@ -1,20 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2011 Nathanael C. Fritz, Dann Martens (TOMOTON). |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0009 import stanza |  | ||||||
| from sleekxmpp.plugins.xep_0009.rpc import XEP_0009 |  | ||||||
| from sleekxmpp.plugins.xep_0009.stanza import RPCQuery, MethodCall, MethodResponse |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0009) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Retain some backwards compatibility |  | ||||||
| xep_0009 = XEP_0009 |  | ||||||
| @@ -1,9 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2011 Nathanael C. Fritz, Dann Martens (TOMOTON). |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0009.stanza.RPC import RPCQuery, MethodCall, MethodResponse |  | ||||||
| @@ -1,19 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0012.stanza import LastActivity |  | ||||||
| from sleekxmpp.plugins.xep_0012.last_activity import XEP_0012 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0012) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Retain some backwards compatibility |  | ||||||
| xep_0004 = XEP_0012 |  | ||||||
| @@ -1,15 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permissio |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0013.stanza import Offline |  | ||||||
| from sleekxmpp.plugins.xep_0013.offline import XEP_0013 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0013) |  | ||||||
| @@ -1,16 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0016 import stanza |  | ||||||
| from sleekxmpp.plugins.xep_0016.stanza import Privacy |  | ||||||
| from sleekxmpp.plugins.xep_0016.privacy import XEP_0016 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0016) |  | ||||||
| @@ -1,16 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2013 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0020 import stanza |  | ||||||
| from sleekxmpp.plugins.xep_0020.stanza import FeatureNegotiation |  | ||||||
| from sleekxmpp.plugins.xep_0020.feature_negotiation import XEP_0020 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0020) |  | ||||||
| @@ -1,15 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0027.stanza import Signed, Encrypted |  | ||||||
| from sleekxmpp.plugins.xep_0027.gpg import XEP_0027 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0027) |  | ||||||
| @@ -1,23 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2010 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0030 import stanza |  | ||||||
| from sleekxmpp.plugins.xep_0030.stanza import DiscoInfo, DiscoItems |  | ||||||
| from sleekxmpp.plugins.xep_0030.static import StaticDisco |  | ||||||
| from sleekxmpp.plugins.xep_0030.disco import XEP_0030 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0030) |  | ||||||
|  |  | ||||||
| # Retain some backwards compatibility |  | ||||||
| xep_0030 = XEP_0030 |  | ||||||
| XEP_0030.getInfo = XEP_0030.get_info |  | ||||||
| XEP_0030.getItems = XEP_0030.get_items |  | ||||||
| XEP_0030.make_static = XEP_0030.restore_defaults |  | ||||||
| @@ -1,10 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2010 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0030.stanza.info import DiscoInfo |  | ||||||
| from sleekxmpp.plugins.xep_0030.stanza.items import DiscoItems |  | ||||||
| @@ -1,20 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0033 import stanza |  | ||||||
| from sleekxmpp.plugins.xep_0033.stanza import Addresses, Address |  | ||||||
| from sleekxmpp.plugins.xep_0033.addresses import XEP_0033 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0033) |  | ||||||
|  |  | ||||||
| # Retain some backwards compatibility |  | ||||||
| xep_0033 = XEP_0033 |  | ||||||
| Addresses.addAddress = Addresses.add_address |  | ||||||
| @@ -1,21 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0047 import stanza |  | ||||||
| from sleekxmpp.plugins.xep_0047.stanza import Open, Close, Data |  | ||||||
| from sleekxmpp.plugins.xep_0047.stream import IBBytestream |  | ||||||
| from sleekxmpp.plugins.xep_0047.ibb import XEP_0047 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0047) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Retain some backwards compatibility |  | ||||||
| xep_0047 = XEP_0047 |  | ||||||
| @@ -1,15 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2013 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0048.stanza import Bookmarks, Conference, URL |  | ||||||
| from sleekxmpp.plugins.xep_0048.bookmarks import XEP_0048 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0048) |  | ||||||
| @@ -1,15 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0049.stanza import PrivateXML |  | ||||||
| from sleekxmpp.plugins.xep_0049.private_storage import XEP_0049 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0049) |  | ||||||
| @@ -1,19 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0050.stanza import Command |  | ||||||
| from sleekxmpp.plugins.xep_0050.adhoc import XEP_0050 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0050) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Retain some backwards compatibility |  | ||||||
| xep_0050 = XEP_0050 |  | ||||||
| @@ -1,15 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0054.stanza import VCardTemp |  | ||||||
| from sleekxmpp.plugins.xep_0054.vcard_temp import XEP_0054 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0054) |  | ||||||
| @@ -1,18 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2010 Nathanael C. Fritz, Erik Reuterborg Larsson |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0059.stanza import Set |  | ||||||
| from sleekxmpp.plugins.xep_0059.rsm import ResultIterator, XEP_0059 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0059) |  | ||||||
|  |  | ||||||
| # Retain some backwards compatibility |  | ||||||
| xep_0059 = XEP_0059 |  | ||||||
| @@ -1,19 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0060.pubsub import XEP_0060 |  | ||||||
| from sleekxmpp.plugins.xep_0060 import stanza |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0060) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Retain some backwards compatibility |  | ||||||
| xep_0060 = XEP_0060 |  | ||||||
| @@ -1,12 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2011  Nathanael C. Fritz |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0060.stanza.pubsub import * |  | ||||||
| from sleekxmpp.plugins.xep_0060.stanza.pubsub_owner import * |  | ||||||
| from sleekxmpp.plugins.xep_0060.stanza.pubsub_event import * |  | ||||||
| from sleekxmpp.plugins.xep_0060.stanza.pubsub_errors import * |  | ||||||
| @@ -1,7 +0,0 @@ | |||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0065.stanza import Socks5 |  | ||||||
| from sleekxmpp.plugins.xep_0065.proxy import XEP_0065 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0065) |  | ||||||
| @@ -1,20 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0066 import stanza |  | ||||||
| from sleekxmpp.plugins.xep_0066.stanza import OOB, OOBTransfer |  | ||||||
| from sleekxmpp.plugins.xep_0066.oob import XEP_0066 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0066) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Retain some backwards compatibility |  | ||||||
| xep_0066 = XEP_0066 |  | ||||||
| @@ -1,15 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permissio |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0071.stanza import XHTML_IM |  | ||||||
| from sleekxmpp.plugins.xep_0071.xhtml_im import XEP_0071 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0071) |  | ||||||
| @@ -1,19 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0077.stanza import Register, RegisterFeature |  | ||||||
| from sleekxmpp.plugins.xep_0077.register import XEP_0077 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0077) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Retain some backwards compatibility |  | ||||||
| xep_0077 = XEP_0077 |  | ||||||
| @@ -1,20 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0078 import stanza |  | ||||||
| from sleekxmpp.plugins.xep_0078.stanza import IqAuth, AuthFeature |  | ||||||
| from sleekxmpp.plugins.xep_0078.legacyauth import XEP_0078 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0078) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Retain some backwards compatibility |  | ||||||
| xep_0078 = XEP_0078 |  | ||||||
| @@ -1,15 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2010 Nathanael C. Fritz, Erik Reuterborg Larsson |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0080.stanza import Geoloc |  | ||||||
| from sleekxmpp.plugins.xep_0080.geoloc import XEP_0080 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0080) |  | ||||||
| @@ -1,16 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permission. |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0084 import stanza |  | ||||||
| from sleekxmpp.plugins.xep_0084.stanza import Data, MetaData |  | ||||||
| from sleekxmpp.plugins.xep_0084.avatar import XEP_0084 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0084) |  | ||||||
| @@ -1,19 +0,0 @@ | |||||||
| """ |  | ||||||
|     SleekXMPP: The Sleek XMPP Library |  | ||||||
|     Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout |  | ||||||
|     This file is part of SleekXMPP. |  | ||||||
|  |  | ||||||
|     See the file LICENSE for copying permissio |  | ||||||
| """ |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.base import register_plugin |  | ||||||
|  |  | ||||||
| from sleekxmpp.plugins.xep_0085.stanza import ChatState |  | ||||||
| from sleekxmpp.plugins.xep_0085.chat_states import XEP_0085 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| register_plugin(XEP_0085) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Retain some backwards compatibility |  | ||||||
| xep_0085 = XEP_0085 |  | ||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user
	 Florent Le Coz
					Florent Le Coz