XEP 0369

1.6 Documentation

«  XEP 0363   ::   Contents   ::   XEP 0377  »

XEP 0369

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

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

Dict[str, Any]

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.

Parameters
  • channel (JID) – JID of the MIX channel

  • nick (str) – Desired nickname on that channel

  • subscribe (Set[str]) – Set of notes to subscribe to when joining. If empty, all nodes will be subscribed by default.

Return type

Set[str]

Returns

The nodes that failed to subscribe, if any

async leave_channel(channel, *, ifrom=None, **iqkwargs)[source]

” Leave a MIX channel :param JID channel: JID of the channel to leave

Return type

None

async list_channels(service, *, ifrom=None, **discokwargs)[source]

List the channels on a MIX service

Parameters

service (JID) – MIX service JID

Return type

List[Tuple[JID, str]]

Returns

A list of channels with their JID and name

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)

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 = <module 'slixmpp.plugins.xep_0369.stanza' from '/home/docs/checkouts/readthedocs.org/user_builds/slixmpp/checkouts/slix-1.6.0/slixmpp/plugins/xep_0369/stanza.py'>
async update_subscription(channel, subscribe=None, unsubscribe=None, *, ifrom=None, **iqkwargs)[source]

Update a MIX channel subscription.

Parameters
  • channel (JID) – JID of the MIX channel

  • subscribe (Set[str]) – Set of notes to subscribe to additionally.

  • unsubscribe (Set[str]) – Set of notes to unsubscribe from.

Return type

Tuple[Set[str], Set[str]]

Returns

A tuple containing the set of nodes that failed to subscribe and the set of nodes that failed to unsubscribe.

Stanza elements

Slixmpp: The Slick XMPP Library Copyright (C) 2020 Mathieu Pasquet <mathieui@mathieui.net> This file is part of Slixmpp.

See the file LICENSE for copying permissio

class slixmpp.plugins.xep_0369.stanza.Create(xml=None, parent=None)[source]
interfaces = {'channel'}
name = 'create'
namespace = 'urn:xmpp:mix:core:1'
plugin_attrib = 'mix_create'
class slixmpp.plugins.xep_0369.stanza.Destroy(xml=None, parent=None)[source]
interfaces = {'channel'}
name = 'destroy'
namespace = 'urn:xmpp:mix:core:1'
plugin_attrib = 'mix_destroy'
class slixmpp.plugins.xep_0369.stanza.Join(xml=None, parent=None)[source]
interfaces = {'id', 'nick'}
name = 'join'
namespace = 'urn:xmpp:mix:core:1'
plugin_attrib = 'mix_join'
sub_interfaces = {'nick'}
class slixmpp.plugins.xep_0369.stanza.Leave(xml=None, parent=None)[source]
name = 'leave'
namespace = 'urn:xmpp:mix:core:1'
plugin_attrib = 'mix_leave'
class slixmpp.plugins.xep_0369.stanza.MIX(xml=None, parent=None)[source]
interfaces = {'jid', 'nick'}
name = 'mix'
namespace = 'urn:xmpp:mix:core:1'
plugin_attrib = 'mix'
sub_interfaces = {'jid', 'nick'}
class slixmpp.plugins.xep_0369.stanza.Participant(xml=None, parent=None)[source]
interfaces = {'jid', 'nick'}
name = 'participant'
namespace = 'urn:xmpp:mix:core:1'
plugin_attrib = 'mix_participant'
sub_interfaces = {'jid', 'nick'}
class slixmpp.plugins.xep_0369.stanza.Setnick(xml=None, parent=None)[source]
interfaces = {'nick'}
name = 'setnick'
namespace = 'urn:xmpp:mix:core:1'
plugin_attrib = 'mix_setnick'
sub_interfaces = {'nick'}
class slixmpp.plugins.xep_0369.stanza.Subscribe(xml=None, parent=None)[source]
interfaces = {'node'}
name = 'subscribe'
namespace = 'urn:xmpp:mix:core:1'
plugin_attrib = 'subscribe'
class slixmpp.plugins.xep_0369.stanza.Unsubscribe(xml=None, parent=None)[source]
interfaces = {'node'}
name = 'unsubscribe'
namespace = 'urn:xmpp:mix:core:1'
plugin_attrib = 'unsubscribe'
class slixmpp.plugins.xep_0369.stanza.UpdateSubscription(xml=None, parent=None)[source]
interfaces = {'jid'}
name = 'update-subscription'
namespace = 'urn:xmpp:mix:core:1'
plugin_attrib = 'mix_updatesub'
slixmpp.plugins.xep_0369.stanza.register_plugins()[source]

«  XEP 0363   ::   Contents   ::   XEP 0377  »