slixmpp/sleekxmpp/plugins/xep_0065/stanza.py

42 lines
978 B
Python
Raw Normal View History

from sleekxmpp import Iq
from sleekxmpp.xmlstream import ElementBase, register_stanza_plugin
# 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.
"""
2012-06-04 05:57:14 +00:00
namespace = namespace
name = 'streamhost-used'
plugin_attrib = 'streamhost-used'
interfaces = set(('jid',))
class Query(ElementBase):
""" The query xml element.
"""
2012-06-04 05:57:14 +00:00
namespace = namespace
name = 'query'
plugin_attrib = 'q'
interfaces = set(('sid', 'activate'))
sub_interfaces = set(('activate',))
register_stanza_plugin(Iq, Query)
register_stanza_plugin(Query, StreamHost)
register_stanza_plugin(Query, StreamHostUsed)