Commit graph

6 commits

Author SHA1 Message Date
Lance Stout
e8a3e92ceb Update plugins to use session_bind handler for disco, and use plugin_end 2012-07-10 01:37:44 -07:00
Lance Stout
e0dd9c3618 Simplify registering API handler defaults. 2012-04-06 15:09:26 -04:00
Lance Stout
488f7ed886 Begin experiment with a centralized API callback registry.
The API registry generalizes the node handler system from the xep_0030
plugin so that other plugins can use it.
2012-04-06 15:09:25 -04:00
Lance Stout
34a7a62c35 Move XEP-0128 to new system. 2012-03-12 19:32:19 -07:00
Lance Stout
d979b5f2b9 Add caching support to xep_0030.
New plugin configuration options:

    use_cache    - Enable caching disco info results. Defaults to True
    wrap_results - Always return disco results in an Iq stanza. Defaults
                   to False

Node handler changes:

    Handlers now take four arguments: jid, node, ifrom, data

    Most older style handlers will still work, depending on if they
    raise a TypeError for incorrect number of arguments. Handlers that
    used *args may not work.

New get_info options:

    cached - Passing cached=True to get_info() will attempt to load
             results from the cache. If nothing is found, a query
             will be sent as normal. If set to False, the cache
             will be skipped, even if it contains results.

New method:

    supports() - Given a JID/node pair and a feature, return True
                 if the feature is supported, False if not, and
                 None if there was a timeout. By default, the search
                 will use the cache.
2011-12-28 10:16:31 -05:00
Lance Stout
4b1fadde4b Updated XEP-0128 plugin to work with the new XEP-0030 plugin.
Required fixing a few bugs in StanzaBase related to iterable
substanzas.
2011-03-22 20:42:43 -04:00