diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-07-17 14:19:04 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-07-17 14:19:04 +0200 |
commit | 5ab77c745270d7d5c016c1dc7ef2a82533a4b16e (patch) | |
tree | 259377cc666f8b9c7954fc4e7b8f7a912bcfe101 /sleekxmpp/features/feature_session | |
parent | e5582694c07236e6830c20361840360a1dde37f3 (diff) | |
download | slixmpp-5ab77c745270d7d5c016c1dc7ef2a82533a4b16e.tar.gz slixmpp-5ab77c745270d7d5c016c1dc7ef2a82533a4b16e.tar.bz2 slixmpp-5ab77c745270d7d5c016c1dc7ef2a82533a4b16e.tar.xz slixmpp-5ab77c745270d7d5c016c1dc7ef2a82533a4b16e.zip |
Rename to slixmpp
Diffstat (limited to 'sleekxmpp/features/feature_session')
-rw-r--r-- | sleekxmpp/features/feature_session/__init__.py | 19 | ||||
-rw-r--r-- | sleekxmpp/features/feature_session/session.py | 54 | ||||
-rw-r--r-- | sleekxmpp/features/feature_session/stanza.py | 20 |
3 files changed, 0 insertions, 93 deletions
diff --git a/sleekxmpp/features/feature_session/__init__.py b/sleekxmpp/features/feature_session/__init__.py deleted file mode 100644 index 28bb3f77..00000000 --- a/sleekxmpp/features/feature_session/__init__.py +++ /dev/null @@ -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 diff --git a/sleekxmpp/features/feature_session/session.py b/sleekxmpp/features/feature_session/session.py deleted file mode 100644 index ceadd5f3..00000000 --- a/sleekxmpp/features/feature_session/session.py +++ /dev/null @@ -1,54 +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. -""" - -import logging - -from sleekxmpp.stanza import Iq, StreamFeatures -from sleekxmpp.xmlstream import register_stanza_plugin -from sleekxmpp.plugins import BasePlugin - -from sleekxmpp.features.feature_session import stanza - - -log = logging.getLogger(__name__) - - -class FeatureSession(BasePlugin): - - name = 'feature_session' - description = 'RFC 3920: Stream Feature: Start Session' - dependencies = set() - stanza = stanza - - def plugin_init(self): - self.xmpp.register_feature('session', - self._handle_start_session, - restart=False, - order=10001) - - register_stanza_plugin(Iq, stanza.Session) - register_stanza_plugin(StreamFeatures, stanza.Session) - - def _handle_start_session(self, features): - """ - Handle the start of the session. - - Arguments: - feature -- The stream features element. - """ - iq = self.xmpp.Iq() - iq['type'] = 'set' - iq.enable('session') - iq.send(now=True) - - self.xmpp.features.add('session') - - log.debug("Established Session") - self.xmpp.sessionstarted = True - self.xmpp.session_started_event.set() - self.xmpp.event('session_start') diff --git a/sleekxmpp/features/feature_session/stanza.py b/sleekxmpp/features/feature_session/stanza.py deleted file mode 100644 index 94e949ee..00000000 --- a/sleekxmpp/features/feature_session/stanza.py +++ /dev/null @@ -1,20 +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.xmlstream import ElementBase - - -class Session(ElementBase): - - """ - """ - - name = 'session' - namespace = 'urn:ietf:params:xml:ns:xmpp-session' - interfaces = set() - plugin_attrib = 'session' |