summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/IoT_TestDevice.py20
-rwxr-xr-xexamples/adhoc_provider.py16
-rwxr-xr-xexamples/adhoc_user.py16
-rwxr-xr-xexamples/admin_commands.py16
-rwxr-xr-xexamples/custom_stanzas/custom_stanza_provider.py26
-rwxr-xr-xexamples/custom_stanzas/custom_stanza_user.py22
-rw-r--r--examples/custom_stanzas/stanza.py8
-rwxr-xr-xexamples/disco_browser.py16
-rwxr-xr-xexamples/download_avatars.py16
-rwxr-xr-xexamples/echo_client.py16
-rwxr-xr-xexamples/echo_component.py14
-rwxr-xr-xexamples/gtalk_custom_domain.py18
-rwxr-xr-xexamples/ibb_transfer/ibb_receiver.py14
-rwxr-xr-xexamples/ibb_transfer/ibb_sender.py14
-rwxr-xr-xexamples/migrate_roster.py10
-rwxr-xr-xexamples/muc.py16
-rwxr-xr-xexamples/ping.py16
-rwxr-xr-xexamples/proxy_echo_client.py16
-rwxr-xr-xexamples/pubsub_client.py10
-rwxr-xr-xexamples/pubsub_events.py14
-rwxr-xr-xexamples/register_account.py18
-rwxr-xr-xexamples/roster_browser.py16
-rwxr-xr-xexamples/rpc_async.py6
-rwxr-xr-xexamples/rpc_client_side.py6
-rwxr-xr-xexamples/rpc_server_side.py6
-rwxr-xr-xexamples/send_client.py16
-rwxr-xr-xexamples/set_avatar.py16
-rwxr-xr-xexamples/thirdparty_auth.py20
-rwxr-xr-xexamples/user_location.py2
-rwxr-xr-xexamples/user_tune.py2
30 files changed, 211 insertions, 211 deletions
diff --git a/examples/IoT_TestDevice.py b/examples/IoT_TestDevice.py
index 8105aaff..1d99c61e 100755
--- a/examples/IoT_TestDevice.py
+++ b/examples/IoT_TestDevice.py
@@ -2,11 +2,11 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
Implementation of xeps for Internet of Things
http://wiki.xmpp.org/web/Tech_pages/IoT_systems
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.
"""
@@ -14,7 +14,7 @@
import os
import sys
# 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 unittest
@@ -26,28 +26,28 @@ from os.path import splitext, basename, join as pjoin
from optparse import OptionParser
from urllib import urlopen
-import sleekxmpp
+import slixmpp
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
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
"""
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("message", self.message)
self.device=None
diff --git a/examples/adhoc_provider.py b/examples/adhoc_provider.py
index 86a575c9..c709fead 100755
--- a/examples/adhoc_provider.py
+++ b/examples/adhoc_provider.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -14,28 +14,28 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
+import slixmpp
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
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.
"""
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 bot establishes its connection with the server
diff --git a/examples/adhoc_user.py b/examples/adhoc_user.py
index 7df9f793..d4b650bc 100755
--- a/examples/adhoc_user.py
+++ b/examples/adhoc_user.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -14,28 +14,28 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
+import slixmpp
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
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.
"""
def __init__(self, jid, password, other, greeting):
- sleekxmpp.ClientXMPP.__init__(self, jid, password)
+ slixmpp.ClientXMPP.__init__(self, jid, password)
self.command_provider = other
self.greeting = greeting
diff --git a/examples/admin_commands.py b/examples/admin_commands.py
index 5d9bf841..ed81b885 100755
--- a/examples/admin_commands.py
+++ b/examples/admin_commands.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -14,28 +14,28 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
+import slixmpp
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
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.
"""
def __init__(self, jid, password, command):
- sleekxmpp.ClientXMPP.__init__(self, jid, password)
+ slixmpp.ClientXMPP.__init__(self, jid, password)
self.command = command
diff --git a/examples/custom_stanzas/custom_stanza_provider.py b/examples/custom_stanzas/custom_stanza_provider.py
index 0ebdb77e..163f307d 100755
--- a/examples/custom_stanzas/custom_stanza_provider.py
+++ b/examples/custom_stanzas/custom_stanza_provider.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -14,35 +14,35 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
+import slixmpp
-from sleekxmpp import ClientXMPP, Iq
-from sleekxmpp.exceptions import IqError, IqTimeout, XMPPError
-from sleekxmpp.xmlstream import register_stanza_plugin
-from sleekxmpp.xmlstream.handler import Callback
-from sleekxmpp.xmlstream.matcher import StanzaPath
+from slixmpp import ClientXMPP, Iq
+from slixmpp.exceptions import IqError, IqTimeout, XMPPError
+from slixmpp.xmlstream import register_stanza_plugin
+from slixmpp.xmlstream.handler import Callback
+from slixmpp.xmlstream.matcher import StanzaPath
from stanza import Action
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
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.
"""
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 bot establishes its connection with the server
diff --git a/examples/custom_stanzas/custom_stanza_user.py b/examples/custom_stanzas/custom_stanza_user.py
index 418e3218..ceadb036 100755
--- a/examples/custom_stanzas/custom_stanza_user.py
+++ b/examples/custom_stanzas/custom_stanza_user.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -14,33 +14,33 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
-from sleekxmpp import Iq
-from sleekxmpp.exceptions import XMPPError
-from sleekxmpp.xmlstream import register_stanza_plugin
+import slixmpp
+from slixmpp import Iq
+from slixmpp.exceptions import XMPPError
+from slixmpp.xmlstream import register_stanza_plugin
from stanza import Action
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
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.
"""
def __init__(self, jid, password, other):
- sleekxmpp.ClientXMPP.__init__(self, jid, password)
+ slixmpp.ClientXMPP.__init__(self, jid, password)
self.action_provider = other
diff --git a/examples/custom_stanzas/stanza.py b/examples/custom_stanzas/stanza.py
index 50d0f9f2..ba109b06 100644
--- a/examples/custom_stanzas/stanza.py
+++ b/examples/custom_stanzas/stanza.py
@@ -1,11 +1,11 @@
-from sleekxmpp.xmlstream import ElementBase
+from slixmpp.xmlstream import ElementBase
class Action(ElementBase):
"""
A stanza class for XML content of the form:
- <action xmlns="sleekxmpp:custom:actions">
+ <action xmlns="slixmpp:custom:actions">
<method>X</method>
<param>X</param>
<status>X</status>
@@ -17,7 +17,7 @@ class Action(ElementBase):
name = 'action'
#: 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
#: 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
#: look like:
#:
- #: <action xmlns="sleekxmpp:custom:actions">
+ #: <action xmlns="slixmpp:custom:actions">
#: <method>foo</method>
#: </action>
sub_interfaces = interfaces
diff --git a/examples/disco_browser.py b/examples/disco_browser.py
index aeb4fb5e..9df22bbc 100755
--- a/examples/disco_browser.py
+++ b/examples/disco_browser.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -14,22 +14,22 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
-from sleekxmpp.exceptions import IqError, IqTimeout
+import slixmpp
+from slixmpp.exceptions import IqError, IqTimeout
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
raw_input = input
-class Disco(sleekxmpp.ClientXMPP):
+class Disco(slixmpp.ClientXMPP):
"""
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=''):
- sleekxmpp.ClientXMPP.__init__(self, jid, password)
+ slixmpp.ClientXMPP.__init__(self, jid, password)
# Using service discovery requires the XEP-0030 plugin.
self.register_plugin('xep_0030')
diff --git a/examples/download_avatars.py b/examples/download_avatars.py
index 64300cff..bd505432 100755
--- a/examples/download_avatars.py
+++ b/examples/download_avatars.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -15,16 +15,16 @@ import getpass
import threading
from optparse import OptionParser
-import sleekxmpp
-from sleekxmpp.exceptions import XMPPError
+import slixmpp
+from slixmpp.exceptions import XMPPError
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
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.
"""
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("changed_status", self.wait_for_presences)
diff --git a/examples/echo_client.py b/examples/echo_client.py
index f2d38847..2c992155 100755
--- a/examples/echo_client.py
+++ b/examples/echo_client.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -14,28 +14,28 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
+import slixmpp
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
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.
"""
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 bot establishes its connection with the server
diff --git a/examples/echo_component.py b/examples/echo_component.py
index 9a24f2fa..a20f8c15 100755
--- a/examples/echo_component.py
+++ b/examples/echo_component.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -14,15 +14,15 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
-from sleekxmpp.componentxmpp import ComponentXMPP
+import slixmpp
+from slixmpp.componentxmpp import ComponentXMPP
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
raw_input = input
@@ -31,7 +31,7 @@ else:
class EchoComponent(ComponentXMPP):
"""
- A simple SleekXMPP component that echoes messages.
+ A simple Slixmpp component that echoes messages.
"""
def __init__(self, jid, secret, server, port):
diff --git a/examples/gtalk_custom_domain.py b/examples/gtalk_custom_domain.py
index c974fc55..b12a047f 100755
--- a/examples/gtalk_custom_domain.py
+++ b/examples/gtalk_custom_domain.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -14,33 +14,33 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
+import slixmpp
import ssl
-from sleekxmpp.xmlstream import cert
+from slixmpp.xmlstream import cert
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
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
validation.
"""
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 bot establishes its connection with the server
diff --git a/examples/ibb_transfer/ibb_receiver.py b/examples/ibb_transfer/ibb_receiver.py
index 6aba98e3..625dd456 100755
--- a/examples/ibb_transfer/ibb_receiver.py
+++ b/examples/ibb_transfer/ibb_receiver.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -14,27 +14,27 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
+import slixmpp
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
raw_input = input
-class IBBReceiver(sleekxmpp.ClientXMPP):
+class IBBReceiver(slixmpp.ClientXMPP):
"""
A basic example of creating and using an in-band bytestream.
"""
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_0047', {
diff --git a/examples/ibb_transfer/ibb_sender.py b/examples/ibb_transfer/ibb_sender.py
index 7c380b68..e89e3239 100755
--- a/examples/ibb_transfer/ibb_sender.py
+++ b/examples/ibb_transfer/ibb_sender.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -14,27 +14,27 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
+import slixmpp
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
raw_input = input
-class IBBSender(sleekxmpp.ClientXMPP):
+class IBBSender(slixmpp.ClientXMPP):
"""
A basic example of creating and using an in-band bytestream.
"""
def __init__(self, jid, password, receiver, filename):
- sleekxmpp.ClientXMPP.__init__(self, jid, password)
+ slixmpp.ClientXMPP.__init__(self, jid, password)
self.receiver = receiver
self.filename = filename
diff --git a/examples/migrate_roster.py b/examples/migrate_roster.py
index 797e4f44..7aed1d30 100755
--- a/examples/migrate_roster.py
+++ b/examples/migrate_roster.py
@@ -6,14 +6,14 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
+import slixmpp
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
raw_input = input
@@ -62,7 +62,7 @@ if opts.new_password is None:
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
# X-FACEBOOK-PLATFORM authentication mechanism, you will need
@@ -98,7 +98,7 @@ if not roster:
print('No roster to migrate')
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):
new_xmpp.get_roster()
new_xmpp.send_presence()
diff --git a/examples/muc.py b/examples/muc.py
index 5b5c764c..083c4c2f 100755
--- a/examples/muc.py
+++ b/examples/muc.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -14,29 +14,29 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
+import slixmpp
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
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
that mentions the bot's nickname.
"""
def __init__(self, jid, password, room, nick):
- sleekxmpp.ClientXMPP.__init__(self, jid, password)
+ slixmpp.ClientXMPP.__init__(self, jid, password)
self.room = room
self.nick = nick
diff --git a/examples/ping.py b/examples/ping.py
index 1a1c2e94..b079c41a 100755
--- a/examples/ping.py
+++ b/examples/ping.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -14,28 +14,28 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
+import slixmpp
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
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.
"""
def __init__(self, jid, password, pingjid):
- sleekxmpp.ClientXMPP.__init__(self, jid, password)
+ slixmpp.ClientXMPP.__init__(self, jid, password)
if pingjid is None:
pingjid = self.boundjid.bare
self.pingjid = pingjid
diff --git a/examples/proxy_echo_client.py b/examples/proxy_echo_client.py
index 98935b9c..966dd0ab 100755
--- a/examples/proxy_echo_client.py
+++ b/examples/proxy_echo_client.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -14,28 +14,28 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
+import slixmpp
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
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.
"""
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 bot establishes its connection with the server
diff --git a/examples/pubsub_client.py b/examples/pubsub_client.py
index 9a65553b..56135ec1 100755
--- a/examples/pubsub_client.py
+++ b/examples/pubsub_client.py
@@ -6,22 +6,22 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
-from sleekxmpp.xmlstream import ET, tostring
+import slixmpp
+from slixmpp.xmlstream import ET, tostring
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
raw_input = input
-class PubsubClient(sleekxmpp.ClientXMPP):
+class PubsubClient(slixmpp.ClientXMPP):
def __init__(self, jid, password, server,
node=None, action='list', data=''):
diff --git a/examples/pubsub_events.py b/examples/pubsub_events.py
index 12c33a76..679112af 100755
--- a/examples/pubsub_events.py
+++ b/examples/pubsub_events.py
@@ -6,24 +6,24 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
-from sleekxmpp.xmlstream import ET, tostring
-from sleekxmpp.xmlstream.matcher import StanzaPath
-from sleekxmpp.xmlstream.handler import Callback
+import slixmpp
+from slixmpp.xmlstream import ET, tostring
+from slixmpp.xmlstream.matcher import StanzaPath
+from slixmpp.xmlstream.handler import Callback
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
raw_input = input
-class PubsubEvents(sleekxmpp.ClientXMPP):
+class PubsubEvents(slixmpp.ClientXMPP):
def __init__(self, jid, password):
super(PubsubEvents, self).__init__(jid, password)
diff --git a/examples/register_account.py b/examples/register_account.py
index 422e5602..199f697c 100755
--- a/examples/register_account.py
+++ b/examples/register_account.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -14,21 +14,21 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
-from sleekxmpp.exceptions import IqError, IqTimeout
+import slixmpp
+from slixmpp.exceptions import IqError, IqTimeout
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
raw_input = input
-class RegisterBot(sleekxmpp.ClientXMPP):
+class RegisterBot(slixmpp.ClientXMPP):
"""
A basic bot that will attempt to register an account
@@ -40,7 +40,7 @@ class RegisterBot(sleekxmpp.ClientXMPP):
"""
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 bot establishes its connection with the server
@@ -54,7 +54,7 @@ class RegisterBot(sleekxmpp.ClientXMPP):
# the basic registration fields, a data form, an
# out-of-band URL, or any combination. For more advanced
# 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.
self.add_event_handler("register", self.register, threaded=True)
diff --git a/examples/roster_browser.py b/examples/roster_browser.py
index 485ac941..1f08796c 100755
--- a/examples/roster_browser.py
+++ b/examples/roster_browser.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -15,22 +15,22 @@ import getpass
import threading
from optparse import OptionParser
-import sleekxmpp
-from sleekxmpp.exceptions import IqError, IqTimeout
+import slixmpp
+from slixmpp.exceptions import IqError, IqTimeout
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
raw_input = input
-class RosterBrowser(sleekxmpp.ClientXMPP):
+class RosterBrowser(slixmpp.ClientXMPP):
"""
A basic script for dumping a client's roster to
@@ -38,7 +38,7 @@ class RosterBrowser(sleekxmpp.ClientXMPP):
"""
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 bot establishes its connection with the server
# and the XML streams are ready for use. We want to
diff --git a/examples/rpc_async.py b/examples/rpc_async.py
index e3e23b69..edbad554 100755
--- a/examples/rpc_async.py
+++ b/examples/rpc_async.py
@@ -2,14 +2,14 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
Copyright (C) 2011 Dann Martens
- This file is part of SleekXMPP.
+ This file is part of Slixmpp.
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
import time
diff --git a/examples/rpc_client_side.py b/examples/rpc_client_side.py
index e792fc94..57c0dd58 100755
--- a/examples/rpc_client_side.py
+++ b/examples/rpc_client_side.py
@@ -2,14 +2,14 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
Copyright (C) 2011 Dann Martens
- This file is part of SleekXMPP.
+ This file is part of Slixmpp.
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
import threading
import time
diff --git a/examples/rpc_server_side.py b/examples/rpc_server_side.py
index 9e8b48d6..438828b9 100755
--- a/examples/rpc_server_side.py
+++ b/examples/rpc_server_side.py
@@ -2,14 +2,14 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
Copyright (C) 2011 Dann Martens
- This file is part of SleekXMPP.
+ This file is part of Slixmpp.
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
import threading
diff --git a/examples/send_client.py b/examples/send_client.py
index 192469ae..d40ac1cb 100755
--- a/examples/send_client.py
+++ b/examples/send_client.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -14,28 +14,28 @@ import logging
import getpass
from optparse import OptionParser
-import sleekxmpp
+import slixmpp
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
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.
"""
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
# will receive it.
diff --git a/examples/set_avatar.py b/examples/set_avatar.py
index cae93c99..647bbd8c 100755
--- a/examples/set_avatar.py
+++ b/examples/set_avatar.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -17,29 +17,29 @@ import getpass
import threading
from optparse import OptionParser
-import sleekxmpp
-from sleekxmpp.exceptions import XMPPError
+import slixmpp
+from slixmpp.exceptions import XMPPError
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
raw_input = input
-class AvatarSetter(sleekxmpp.ClientXMPP):
+class AvatarSetter(slixmpp.ClientXMPP):
"""
A basic script for downloading the avatars for a user's contacts.
"""
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)
diff --git a/examples/thirdparty_auth.py b/examples/thirdparty_auth.py
index f4d5c400..94d4a02a 100755
--- a/examples/thirdparty_auth.py
+++ b/examples/thirdparty_auth.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
"""
- SleekXMPP: The Sleek XMPP Library
+ Slixmpp: The Slick XMPP Library
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.
"""
@@ -21,24 +21,24 @@ except ImportError:
from urllib.parse import urlencode
from http.client import HTTPSConnection
-import sleekxmpp
-from sleekxmpp.xmlstream import JID
+import slixmpp
+from slixmpp.xmlstream import JID
# Python versions before 3.0 do not use UTF-8 encoding
# 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.
if sys.version_info < (3, 0):
- from sleekxmpp.util.misc_ops import setdefaultencoding
+ from slixmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
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.
This version uses a thirdpary service for authentication,
@@ -46,7 +46,7 @@ class ThirdPartyAuthBot(sleekxmpp.ClientXMPP):
"""
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
# 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
# it using:
#
- # sleekxmpp.ClientXMPP.__init__(self, jid, password,
+ # slixmpp.ClientXMPP.__init__(self, jid, password,
# sasl_mech="X-GOOGLE-TOKEN")
# The session_start event will be triggered when
diff --git a/examples/user_location.py b/examples/user_location.py
index 2a64cada..1ef78666 100755
--- a/examples/user_location.py
+++ b/examples/user_location.py
@@ -16,7 +16,7 @@ except ImportError:
print('This demo requires the requests package for using HTTP.')
sys.exit()
-from sleekxmpp import ClientXMPP
+from slixmpp import ClientXMPP
class LocationBot(ClientXMPP):
diff --git a/examples/user_tune.py b/examples/user_tune.py
index 09e050f0..afaa0c2d 100755
--- a/examples/user_tune.py
+++ b/examples/user_tune.py
@@ -11,7 +11,7 @@ except ImportError:
print('This demo requires the appscript package to interact with iTunes.')
sys.exit()
-from sleekxmpp import ClientXMPP
+from slixmpp import ClientXMPP
class TuneBot(ClientXMPP):