XEP-0191: Blocking Command¶
- class slixmpp.plugins.xep_0191.XEP_0191(xmpp, config=None)[source]¶
-
- dependencies: ClassVar[set[str]] = {'xep_0030'}¶
Some plugins may depend on others in order to function properly. Any plugin names included in
dependencieswill be initialized as needed if this plugin is enabled.
- description: str = 'XEP-0191: Blocking Command'¶
A longer name for the plugin, describing its purpose. For example, a plugin for XEP-0030 would use ‘Service Discovery’ as its description value.
- get_blocked(ifrom=None, **iqkwargs)[source]¶
Get the iq containing the blocklist.
- Return type:
Future
- name: str = 'xep_0191'¶
A short name for the plugin based on the implemented specification. For example, a plugin for XEP-0030 would use ‘xep_0030’.
Stanza elements¶
- class slixmpp.plugins.xep_0191.stanza.Block(xml=None, parent=None)[source]¶
- name: ClassVar[str] = 'block'¶
The XML tag name of the element, not including any namespace prefixes. For example, an
ElementBaseobject for<message />would usename = 'message'.
- plugin_attrib: ClassVar[str] = 'block'¶
For
ElementBasesubclasses which are intended to be used as plugins, theplugin_attribvalue defines the plugin name. Plugins may be accessed by using theplugin_attribvalue 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_0191.stanza.BlockItem(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_attribvalue of any registered stanza plugins.
- name: ClassVar[str] = 'item'¶
The XML tag name of the element, not including any namespace prefixes. For example, an
ElementBaseobject for<message />would usename = 'message'.
- namespace: str = 'urn:xmpp:blocking'¶
The XML namespace for the element. Given
<foo xmlns="bar" />, thennamespace = "bar"should be used. The default namespace isjabber:clientsince this is being used in an XMPP library.
- plugin_attrib: ClassVar[str] = 'item'¶
For
ElementBasesubclasses which are intended to be used as plugins, theplugin_attribvalue defines the plugin name. Plugins may be accessed by using theplugin_attribvalue as the interface. An example usingplugin_attrib = 'foo':register_stanza_plugin(Message, FooPlugin) msg = Message() msg['foo']['an_interface_from_the_foo_plugin']
- plugin_multi_attrib: ClassVar[str] = 'items'¶
For
ElementBasesubclasses that are intended to be an iterable group of items, theplugin_multi_attribvalue defines an interface for the parent stanza which returns the entire group of matching substanzas. So the following are equivalent:# Given stanza class Foo, with plugin_multi_attrib = 'foos' parent['foos'] filter(isinstance(item, Foo), parent['substanzas'])
- class slixmpp.plugins.xep_0191.stanza.BlockList(xml=None, parent=None)[source]¶
- name: ClassVar[str] = 'blocklist'¶
The XML tag name of the element, not including any namespace prefixes. For example, an
ElementBaseobject for<message />would usename = 'message'.
- namespace: str = 'urn:xmpp:blocking'¶
The XML namespace for the element. Given
<foo xmlns="bar" />, thennamespace = "bar"should be used. The default namespace isjabber:clientsince this is being used in an XMPP library.
- plugin_attrib: ClassVar[str] = 'blocklist'¶
For
ElementBasesubclasses which are intended to be used as plugins, theplugin_attribvalue defines the plugin name. Plugins may be accessed by using theplugin_attribvalue 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_0191.stanza.Unblock(xml=None, parent=None)[source]¶
- name: ClassVar[str] = 'unblock'¶
The XML tag name of the element, not including any namespace prefixes. For example, an
ElementBaseobject for<message />would usename = 'message'.
- plugin_attrib: ClassVar[str] = 'unblock'¶
For
ElementBasesubclasses which are intended to be used as plugins, theplugin_attribvalue defines the plugin name. Plugins may be accessed by using theplugin_attribvalue as the interface. An example usingplugin_attrib = 'foo':register_stanza_plugin(Message, FooPlugin) msg = Message() msg['foo']['an_interface_from_the_foo_plugin']