XEP-0095

class slixmpp.plugins.xep_0095.XEP_0095(xmpp, config=None)[source]
async accept(jid, sid, payload=None, ifrom=None, stream_handler=None)[source]

Accept a stream initiation.

Changed in version 1.8.0: This function is now a coroutine.

async decline(jid, sid, ifrom=None)[source]

Decline a stream initiation.

Changed in version 1.8.0: This function is now a coroutine.

Stanza elements

class slixmpp.plugins.xep_0095.stanza.SI(xml=None, parent=None)[source]
del_mime_type()[source]
get_mime_type()[source]
interfaces: ClassVar[set[str]] = {'id', 'mime_type', 'profile'}

The set of keys that the stanza provides for accessing and manipulating the underlying XML object. This set may be augmented with the plugin_attrib value of any registered stanza plugins.

name: ClassVar[str] = 'si'

The XML tag name of the element, not including any namespace prefixes. For example, an ElementBase object for <message /> would use name = 'message'.

namespace: str = 'http://jabber.org/protocol/si'

The XML namespace for the element. Given <foo xmlns="bar" />, then namespace = "bar" should be used. The default namespace is jabber:client since this is being used in an XMPP library.

plugin_attrib: ClassVar[str] = 'si'

For ElementBase subclasses which are intended to be used as plugins, the plugin_attrib value defines the plugin name. Plugins may be accessed by using the plugin_attrib value as the interface. An example using plugin_attrib = 'foo':

register_stanza_plugin(Message, FooPlugin)
msg = Message()
msg['foo']['an_interface_from_the_foo_plugin']
set_mime_type(value)[source]