Age | Commit message (Collapse) | Author |
|
The new system is backward compatible and will load older style plugins.
The new plugin framework allows plugins to track their dependencies, and
will auto-enable plugins as needed.
Dependencies are tracked via a class-level set named `dependencies` in
each plugin.
Plugin names are no longer tightly coupled with the plugin class name,
Pso EP8 style class names may be used.
Disabling plugins is now allowed, but ensuring proper cleanup is left to
the plugin implementation.
The use of a `post_init()` method is no longer needed for new style
plugins, but plugins following the old style will still require a
`post_init()` method.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The post_init() system can only reliably handle a single layer
of dependencies between plugins, but PEP plugins with XEP-0115
exceed that limit and plugins can be post_init'ed out of order. To
resolve this, we will special case XEP-0115 to be post_init'ed
first until the new plugin system with dependency tracking is
stable.
|
|
|
|
|
|
See examples/user_tune.py for a demonstration using the currently
playing song in iTunes.
|
|
|
|
|
|
This is just a very simple wrapper for XEP-0030, XEP-0115, and XEP-0060
for adding interests to caps information, and publishing.
|
|
Publishes, retractions, purges, and deletions now raise the events:
- pubsub_publish
- pubsub_retract
- pubsub_purge
- pubsub_delete
In addition, custom events may be raised based on the node that
generated the notification. For example:
xmpp['xep_0060'].map_node_event('http://jabber.org/protocol/tune',
'user_tune')
will allow for using the events:
- user_tune_publish
- user_tune_retract
- user_tune_purge
- user_tune_delete
|
|
|
|
Each state element must have its own stanza class now. A stanza class
with an empty name field causes errors in ElementTree, even though
it works fine with cElementTree.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is inspired by the version from macdiesel and tomstrummer, but
their version was heavily linked with XEP-0096 and focused solely
on file transfer. This version is a more generic implementation.
|
|
|
|
|
|
|
|
|
|
|
|
As part of adding this feature:
- fixed bug in update_caps() not assigning verstrings
- fixed xep_0004 typo
- can now use None as a roster key which will map to boundjid.bare
- fixed using JID objects in disco node handlers
- fixed failing test related to get_roster
Several of these bugs I've fixed before, so I either didn't push them
earlier, or I clobbered something when merging. *shrug*
|
|
|
|
Fix a typo in several files.
|
|
This fixes several instances of "intial" for "initial".
|
|
|
|
Protip: Don't test using a custom disco handler that always returns the
same feature set :p
|
|
|
|
Finally
|
|
XEP-0115 needs to use the raw XML character data.
|
|
XEP-0115 requires detecting duplicates, so we can't always silently
ignore them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|