summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0128.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-03-22 20:42:43 -0400
committerLance Stout <lancestout@gmail.com>2011-03-22 20:42:43 -0400
commit4b1fadde4bd87a8763131165701c08a3035005eb (patch)
treef5408e05793dbdad7e4b02427ec67cfece66e432 /sleekxmpp/plugins/xep_0128.py
parent86a6b40fd81daa7d0e976dbc63f33544060c75d1 (diff)
downloadslixmpp-4b1fadde4bd87a8763131165701c08a3035005eb.tar.gz
slixmpp-4b1fadde4bd87a8763131165701c08a3035005eb.tar.bz2
slixmpp-4b1fadde4bd87a8763131165701c08a3035005eb.tar.xz
slixmpp-4b1fadde4bd87a8763131165701c08a3035005eb.zip
Updated XEP-0128 plugin to work with the new XEP-0030 plugin.
Required fixing a few bugs in StanzaBase related to iterable substanzas.
Diffstat (limited to 'sleekxmpp/plugins/xep_0128.py')
-rw-r--r--sleekxmpp/plugins/xep_0128.py51
1 files changed, 0 insertions, 51 deletions
diff --git a/sleekxmpp/plugins/xep_0128.py b/sleekxmpp/plugins/xep_0128.py
deleted file mode 100644
index 824977b6..00000000
--- a/sleekxmpp/plugins/xep_0128.py
+++ /dev/null
@@ -1,51 +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.
-"""
-
-import logging
-from . import base
-from .. xmlstream.handler.callback import Callback
-from .. xmlstream.matcher.xpath import MatchXPath
-from .. xmlstream.stanzabase import registerStanzaPlugin, ElementBase, ET, JID
-from .. stanza.iq import Iq
-from . xep_0030 import DiscoInfo, DiscoItems
-from . xep_0004 import Form
-
-
-class xep_0128(base.base_plugin):
- """
- XEP-0128 Service Discovery Extensions
- """
-
- def plugin_init(self):
- self.xep = '0128'
- self.description = 'Service Discovery Extensions'
-
- registerStanzaPlugin(DiscoInfo, Form)
- registerStanzaPlugin(DiscoItems, Form)
-
- def extend_info(self, node, data=None):
- if data is None:
- data = {}
- node = self.xmpp['xep_0030'].nodes.get(node, None)
- if node is None:
- self.xmpp['xep_0030'].add_node(node)
-
- info = node.info
- info['form']['type'] = 'result'
- info['form'].setFields(data, default=None)
-
- def extend_items(self, node, data=None):
- if data is None:
- data = {}
- node = self.xmpp['xep_0030'].nodes.get(node, None)
- if node is None:
- self.xmpp['xep_0030'].add_node(node)
-
- items = node.items
- items['form']['type'] = 'result'
- items['form'].setFields(data, default=None)