XEP-0369: MIX-CORE#
- class slixmpp.plugins.xep_0369.XEP_0369(xmpp, config=None)[source]#
XEP-0369: MIX-CORE
- async can_create_channel(service)[source]#
Check if the current user can create a channel on the MIX service
- Parameters:
service (JID) – MIX service jid
- Return type:
bool
- async create_channel(service, channel=None, *, ifrom=None, **iqkwargs)[source]#
Create a MIX channel.
- Parameters:
service (JID) – MIX service JID
channel (Optional[str]) – Channel name (or leave empty to let the service generate it)
- Return type:
str
- Returns:
The channel name, as created by the service
- dependencies: ClassVar[Set[str]] = {'xep_0004', 'xep_0030', 'xep_0060', 'xep_0082'}#
Some plugins may depend on others in order to function properly. Any plugin names included in
dependencies
will be initialized as needed if this plugin is enabled.
- description: str = 'XEP-0369: MIX-CORE'#
A longer name for the plugin, describing its purpose. For example, a plugin for XEP-0030 would use ‘Service Discovery’ as its description value.
- async destroy_channel(channel, *, ifrom=None, **iqkwargs)[source]#
Destroy a MIX channel. :param JID channel: MIX channelJID
- async get_channel_info(channel)[source]#
” Get the contents of the channel info node.
- Parameters:
channel (
JID
) – The MIX channel- Return type:
InfoType
- Returns:
a dict containing the last modified time and form contents (Name, Description, Contact per the spec, YMMV)
- async join_channel(channel, nick, subscribe=None, *, ifrom=None, **iqkwargs)[source]#
Join a MIX channel.
- async leave_channel(channel, *, ifrom=None, **iqkwargs)[source]#
” :rtype:
None
Leave a MIX channel :param JID channel: JID of the channel to leave
- async list_channels(service, *, ifrom=None, **discokwargs)[source]#
List the channels on a MIX service
- async list_mix_nodes(channel, ifrom=None, **discokwargs)[source]#
List mix nodes for a channel.
- Parameters:
channel (JID) – The MIX channel
- Return type:
Set
[str
]- Returns:
List of nodes available
- async list_participants(channel, *, ifrom=None, **pubsubkwargs)[source]#
List the participants of a MIX channel :param JID channel: The MIX channel
- Return type:
List
[Tuple
[str
,str
,Optional
[JID
]]]- Returns:
A list of tuples containing the participant id, nick, and jid (if available)
- name: str = 'xep_0369'#
A short name for the plugin based on the implemented specification. For example, a plugin for XEP-0030 would use ‘xep_0030’.
- async set_nick(channel, nick, *, ifrom=None, **iqkwargs)[source]#
Set your nick on a channel. The returned nick MAY be different from the one provided, depending on service configuration. :param JID channel: MIX channel JID :param str nick: desired nick :rtype: str :return: The nick saved on the MIX channel
Stanza elements#
- class slixmpp.plugins.xep_0369.stanza.Create(xml=None, parent=None)[source]#
- interfaces: ClassVar[Set[str]] = {'channel'}#
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] = 'create'#
The XML tag name of the element, not including any namespace prefixes. For example, an
ElementBase
object for<message />
would usename = 'message'
.
- namespace: str = 'urn:xmpp:mix:core:1'#
The XML namespace for the element. Given
<foo xmlns="bar" />
, thennamespace = "bar"
should be used. The default namespace isjabber:client
since this is being used in an XMPP library.
- plugin_attrib: ClassVar[str] = 'mix_create'#
For
ElementBase
subclasses which are intended to be used as plugins, theplugin_attrib
value defines the plugin name. Plugins may be accessed by using theplugin_attrib
value as the interface. An example usingplugin_attrib = 'foo'
:register_stanza_plugin(Message, FooPlugin) msg = Message() msg['foo']['an_interface_from_the_foo_plugin']
- class slixmpp.plugins.xep_0369.stanza.Destroy(xml=None, parent=None)[source]#
- interfaces: ClassVar[Set[str]] = {'channel'}#
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] = 'destroy'#
The XML tag name of the element, not including any namespace prefixes. For example, an
ElementBase
object for<message />
would usename = 'message'
.
- namespace: str = 'urn:xmpp:mix:core:1'#
The XML namespace for the element. Given
<foo xmlns="bar" />
, thennamespace = "bar"
should be used. The default namespace isjabber:client
since this is being used in an XMPP library.
- plugin_attrib: ClassVar[str] = 'mix_destroy'#
For
ElementBase
subclasses which are intended to be used as plugins, theplugin_attrib
value defines the plugin name. Plugins may be accessed by using theplugin_attrib
value as the interface. An example usingplugin_attrib = 'foo'
:register_stanza_plugin(Message, FooPlugin) msg = Message() msg['foo']['an_interface_from_the_foo_plugin']
- class slixmpp.plugins.xep_0369.stanza.Join(xml=None, parent=None)[source]#
- interfaces: ClassVar[Set[str]] = {'id', 'nick'}#
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] = 'join'#
The XML tag name of the element, not including any namespace prefixes. For example, an
ElementBase
object for<message />
would usename = 'message'
.
- namespace: str = 'urn:xmpp:mix:core:1'#
The XML namespace for the element. Given
<foo xmlns="bar" />
, thennamespace = "bar"
should be used. The default namespace isjabber:client
since this is being used in an XMPP library.
- plugin_attrib: ClassVar[str] = 'mix_join'#
For
ElementBase
subclasses which are intended to be used as plugins, theplugin_attrib
value defines the plugin name. Plugins may be accessed by using theplugin_attrib
value as the interface. An example usingplugin_attrib = 'foo'
:register_stanza_plugin(Message, FooPlugin) msg = Message() msg['foo']['an_interface_from_the_foo_plugin']
- sub_interfaces: ClassVar[Set[str]] = {'nick'}#
A subset of
interfaces
which maps interfaces to direct subelements of the underlying XML object. Using this set, the text of these subelements may be set, retrieved, or removed without needing to define custom methods.
- class slixmpp.plugins.xep_0369.stanza.Leave(xml=None, parent=None)[source]#
- name: ClassVar[str] = 'leave'#
The XML tag name of the element, not including any namespace prefixes. For example, an
ElementBase
object for<message />
would usename = 'message'
.
- namespace: str = 'urn:xmpp:mix:core:1'#
The XML namespace for the element. Given
<foo xmlns="bar" />
, thennamespace = "bar"
should be used. The default namespace isjabber:client
since this is being used in an XMPP library.
- plugin_attrib: ClassVar[str] = 'mix_leave'#
For
ElementBase
subclasses which are intended to be used as plugins, theplugin_attrib
value defines the plugin name. Plugins may be accessed by using theplugin_attrib
value as the interface. An example usingplugin_attrib = 'foo'
:register_stanza_plugin(Message, FooPlugin) msg = Message() msg['foo']['an_interface_from_the_foo_plugin']
- class slixmpp.plugins.xep_0369.stanza.MIX(xml=None, parent=None)[source]#
- interfaces: ClassVar[Set[str]] = {'jid', 'nick'}#
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] = 'mix'#
The XML tag name of the element, not including any namespace prefixes. For example, an
ElementBase
object for<message />
would usename = 'message'
.
- namespace: str = 'urn:xmpp:mix:core:1'#
The XML namespace for the element. Given
<foo xmlns="bar" />
, thennamespace = "bar"
should be used. The default namespace isjabber:client
since this is being used in an XMPP library.
- plugin_attrib: ClassVar[str] = 'mix'#
For
ElementBase
subclasses which are intended to be used as plugins, theplugin_attrib
value defines the plugin name. Plugins may be accessed by using theplugin_attrib
value as the interface. An example usingplugin_attrib = 'foo'
:register_stanza_plugin(Message, FooPlugin) msg = Message() msg['foo']['an_interface_from_the_foo_plugin']
- sub_interfaces: ClassVar[Set[str]] = {'jid', 'nick'}#
A subset of
interfaces
which maps interfaces to direct subelements of the underlying XML object. Using this set, the text of these subelements may be set, retrieved, or removed without needing to define custom methods.
- class slixmpp.plugins.xep_0369.stanza.Participant(xml=None, parent=None)[source]#
- interfaces: ClassVar[Set[str]] = {'jid', 'nick'}#
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] = 'participant'#
The XML tag name of the element, not including any namespace prefixes. For example, an
ElementBase
object for<message />
would usename = 'message'
.
- namespace: str = 'urn:xmpp:mix:core:1'#
The XML namespace for the element. Given
<foo xmlns="bar" />
, thennamespace = "bar"
should be used. The default namespace isjabber:client
since this is being used in an XMPP library.
- plugin_attrib: ClassVar[str] = 'mix_participant'#
For
ElementBase
subclasses which are intended to be used as plugins, theplugin_attrib
value defines the plugin name. Plugins may be accessed by using theplugin_attrib
value as the interface. An example usingplugin_attrib = 'foo'
:register_stanza_plugin(Message, FooPlugin) msg = Message() msg['foo']['an_interface_from_the_foo_plugin']
- sub_interfaces: ClassVar[Set[str]] = {'jid', 'nick'}#
A subset of
interfaces
which maps interfaces to direct subelements of the underlying XML object. Using this set, the text of these subelements may be set, retrieved, or removed without needing to define custom methods.
- class slixmpp.plugins.xep_0369.stanza.Setnick(xml=None, parent=None)[source]#
- interfaces: ClassVar[Set[str]] = {'nick'}#
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] = 'setnick'#
The XML tag name of the element, not including any namespace prefixes. For example, an
ElementBase
object for<message />
would usename = 'message'
.
- namespace: str = 'urn:xmpp:mix:core:1'#
The XML namespace for the element. Given
<foo xmlns="bar" />
, thennamespace = "bar"
should be used. The default namespace isjabber:client
since this is being used in an XMPP library.
- plugin_attrib: ClassVar[str] = 'mix_setnick'#
For
ElementBase
subclasses which are intended to be used as plugins, theplugin_attrib
value defines the plugin name. Plugins may be accessed by using theplugin_attrib
value as the interface. An example usingplugin_attrib = 'foo'
:register_stanza_plugin(Message, FooPlugin) msg = Message() msg['foo']['an_interface_from_the_foo_plugin']
- sub_interfaces: ClassVar[Set[str]] = {'nick'}#
A subset of
interfaces
which maps interfaces to direct subelements of the underlying XML object. Using this set, the text of these subelements may be set, retrieved, or removed without needing to define custom methods.
- class slixmpp.plugins.xep_0369.stanza.Subscribe(xml=None, parent=None)[source]#
- interfaces: ClassVar[Set[str]] = {'node'}#
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] = 'subscribe'#
The XML tag name of the element, not including any namespace prefixes. For example, an
ElementBase
object for<message />
would usename = 'message'
.
- namespace: str = 'urn:xmpp:mix:core:1'#
The XML namespace for the element. Given
<foo xmlns="bar" />
, thennamespace = "bar"
should be used. The default namespace isjabber:client
since this is being used in an XMPP library.
- plugin_attrib: ClassVar[str] = 'subscribe'#
For
ElementBase
subclasses which are intended to be used as plugins, theplugin_attrib
value defines the plugin name. Plugins may be accessed by using theplugin_attrib
value as the interface. An example usingplugin_attrib = 'foo'
:register_stanza_plugin(Message, FooPlugin) msg = Message() msg['foo']['an_interface_from_the_foo_plugin']
- class slixmpp.plugins.xep_0369.stanza.Unsubscribe(xml=None, parent=None)[source]#
- interfaces: ClassVar[Set[str]] = {'node'}#
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] = 'unsubscribe'#
The XML tag name of the element, not including any namespace prefixes. For example, an
ElementBase
object for<message />
would usename = 'message'
.
- namespace: str = 'urn:xmpp:mix:core:1'#
The XML namespace for the element. Given
<foo xmlns="bar" />
, thennamespace = "bar"
should be used. The default namespace isjabber:client
since this is being used in an XMPP library.
- plugin_attrib: ClassVar[str] = 'unsubscribe'#
For
ElementBase
subclasses which are intended to be used as plugins, theplugin_attrib
value defines the plugin name. Plugins may be accessed by using theplugin_attrib
value as the interface. An example usingplugin_attrib = 'foo'
:register_stanza_plugin(Message, FooPlugin) msg = Message() msg['foo']['an_interface_from_the_foo_plugin']
- class slixmpp.plugins.xep_0369.stanza.UpdateSubscription(xml=None, parent=None)[source]#
- interfaces: ClassVar[Set[str]] = {'jid'}#
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] = 'update-subscription'#
The XML tag name of the element, not including any namespace prefixes. For example, an
ElementBase
object for<message />
would usename = 'message'
.
- namespace: str = 'urn:xmpp:mix:core:1'#
The XML namespace for the element. Given
<foo xmlns="bar" />
, thennamespace = "bar"
should be used. The default namespace isjabber:client
since this is being used in an XMPP library.
- plugin_attrib: ClassVar[str] = 'mix_updatesub'#
For
ElementBase
subclasses which are intended to be used as plugins, theplugin_attrib
value defines the plugin name. Plugins may be accessed by using theplugin_attrib
value as the interface. An example usingplugin_attrib = 'foo'
:register_stanza_plugin(Message, FooPlugin) msg = Message() msg['foo']['an_interface_from_the_foo_plugin']