Commit graph

8 commits

Author SHA1 Message Date
Florent Le Coz
5ab77c7452 Rename to slixmpp 2014-07-17 14:19:04 +02:00
Jean-Philippe Caruana
18dde97c8c refactor: no import * in tests 2013-07-26 13:02:26 +02: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
2a2ac73845 So using sys.excepthook to catch errors only works once.
The error bubbles through the event processing loop, breaking it and
hanging the application.

Instead, there is now a .exception(e) method on XMLStream which may
be overridden or reassigned that will receive all unhandled exceptions
(read: not XMPPError) from event and stream handlers.
2011-07-01 15:18:10 -07:00
Lance Stout
7c7fa0f008 Add support for XEP-0059 to XEP-0030 plugin. 2011-01-08 11:19:31 -05:00
Lance Stout
8749f5e09b Make the new XEP-30 plugin retain older API signatures. 2010-12-28 15:43:00 -05:00
Lance Stout
f4451fe6b7 First pass at a new XEP-0030 plugin.
Now with dynamic node handling goodness.

Some things are not quite working yet, in particular:
    set_items
    set_info
    set_identities
    set_features

And still need more unit tests to round things out.
2010-12-09 18:57:27 -05:00
Lance Stout
ab25301953 Adding stream tests for XEP-0030.
Fixed some errors when responding to disco requests.
2010-11-18 15:50:45 -05:00