XEP-0163: Personal Eventing Protocol (PEP)¶
- class slixmpp.plugins.xep_0163.XEP_0163(xmpp, config=None)[source]¶
XEP-0163: Personal Eventing Protocol (PEP)
- add_interest(namespace, jid=None)[source]¶
Mark an interest in a PEP subscription by including a disco feature with the ‘+notify’ extension.
- Parameters:
namespace (
str
) – The base namespace to register as an interest, such as ‘http://jabber.org/protocol/tune’. This may also be a list of such namespaces.jid (
Optional
[JID
]) – Optionally specify the JID.
- dependencies: ClassVar[Set[str]] = {'xep_0030', 'xep_0060', 'xep_0115'}¶
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-0163: Personal Eventing Protocol (PEP)'¶
A longer name for the plugin, describing its purpose. For example, a plugin for XEP-0030 would use ‘Service Discovery’ as its description value.
- name: str = 'xep_0163'¶
A short name for the plugin based on the implemented specification. For example, a plugin for XEP-0030 would use ‘xep_0030’.
- publish(stanza, node=None, id=None, options=None, ifrom=None, timeout_callback=None, callback=None, timeout=None)[source]¶
Publish a PEP update.
This is just a (very) thin wrapper around the XEP-0060 publish() method to set the defaults expected by PEP.
- Parameters:
stanza (
ElementBase
) – The PEP update stanza to publish.node (
Optional
[str
]) – The node to publish the item to. If not specified, the stanza’s namespace will be used.id (
Optional
[str
]) – Optionally specify the ID of the item.options (
Optional
[Form
]) – A form of publish options.
- register_pep(name, stanza)[source]¶
Setup and configure events and stanza registration for the given PEP stanza:
Add disco feature for the PEP content.
Register disco interest in the PEP content.
Map events from the PEP content’s namespace to the given name.
- Parameters:
name (str) – The event name prefix to use for PEP events.
stanza – The stanza class for the PEP content.
- remove_interest(namespace, jid=None)[source]¶
Mark an interest in a PEP subscription by including a disco feature with the ‘+notify’ extension.
- Parameters:
namespace (
str
) – The base namespace to remove as an interest, such as ‘http://jabber.org/protocol/tune’. This may also be a list of such namespaces.jid (
Optional
[JID
]) – Optionally specify the JID.