__init__ – headstock init

Module author: Sylvain Hellegouarch <sh@defuze.org>

headstock.xmpphandler(name, ns, once=False, forget=True)

Decorator to wrap a callable so that it can be used as a XMPP handler by the headstock client.

It will set various attributes to the wrapped callable:

  • handler: set to True to indicate the callable can participate to the dispatching
  • xmpp_local_name: XML element name
  • xmpp_ns: XML element namespace
  • fire_once: if True, this handler will be removed once it has been used.
  • forget: if set to True, the dispatched element will be automatically deleted once the handler has been called.

name XMPP stanza name

ns XMPP stanza namespace

once False - flag indicating if the handler should be called only once and unregistered automatically

forget True - flag indicating if the dispatched bridge.Element instance should be automatically forgotten once dispatched.

Previous topic

headstock Modules

Next topic

client – XMPP client

This Page