shim — Stanza Headers and Internet Metadata (XEP-0131)¶
This module provides support for XEP-0131 stanza headers. The following attributes are added by this module to the existing stanza classes:
- aioxmpp.stanza.Message.xep0131_headers¶
A xso.Headers instance or None. Represents the SHIM headers of the stanza.
- aioxmpp.stanza.Presence.xep0131_headers¶
A xso.Headers instance or None. Represents the SHIM headers of the stanza.
The attributes are available as soon as aioxmpp.shim is loaded.
- class aioxmpp.shim.Service(client, **kwargs)¶
This service implements XEP-0131 feature advertisment.
It registers the http://jabber.org/protocol/shim node with the disco.Service. It publishes the supported headers on that node as specified in the XEP.
To announce supported headers, use the register_header() and unregister_header() methods.
- register_header(name)¶
Register support for the SHIM header with the given name.
If the header has already been registered as supported, ValueError is raised.
- class aioxmpp.shim.xso.Headers(*args, **kwargs)[source]¶
Represent stanza headers. The headers are accessible at the headers attribute.
- headers¶
A multidict.CIMultiDict which provides access to the headers. The keys are the header names and the values are the values of the header. Both must be strings.
See also
- Message.xep0131_headers
- SHIM headers for Message stanzas
- Presence.xep0131_headers
- SHIM headers for Presence stanzas