Added a partial support of the XEP 0065 - Socks5 Bytestreams

This commit is contained in:
Sandro Munda
2012-06-03 19:56:56 +02:00
parent 40ef4a16b1
commit a14979375b
3 changed files with 346 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
from sleekxmpp.xmlstream import ElementBase
# The protocol namespace defined in the Socks5Bytestream (0065) spec.
namespace = 'http://jabber.org/protocol/bytestreams'
class StreamHost(ElementBase):
""" The streamhost xml element.
"""
namespace = namespace
name = 'streamhost'
plugin_attrib = 'streamhost'
interfaces = set(('host', 'jid', 'port'))
class StreamHostUsed(ElementBase):
""" The streamhost-used xml element.
"""
namespace = 'http://jabber.org/protocol/bytestreams'
name = 'streamhost-used'
plugin_attrib = 'streamhost-used'
interfaces = set(('jid',))
class Query(ElementBase):
""" The query xml element.
"""
namespace = 'http://jabber.org/protocol/bytestreams'
name = 'query'
plugin_attrib = 'q'
interfaces = set(('sid', 'activate'))
sub_interfaces = set(('activate',))