Lance Stout
a2b47e5749
Move XEP-0108 to new system.
2012-03-12 19:32:20 -07:00
Lance Stout
14d4062f4a
Move XEP-0107 to new system.
2012-03-12 19:32:20 -07:00
Lance Stout
67972c5e84
Move XEP-0080 to the new system.
2012-03-12 19:32:20 -07:00
Lance Stout
3467ac18cc
Move XEP-0163 to new system.
...
Also includes new register_pep() method for doing the necessary stanza
and disco registration, plus pubsub node event mapping.
2012-03-12 19:32:20 -07:00
Lance Stout
cabf27424f
Cleanup plugin import logic.
...
Checking for a 'xep' or 'rfc' attribute is more reliable
for detecting an old style plugin than 'name'.
2012-03-12 19:32:20 -07:00
Lance Stout
162e955bd6
Enable using post_init() to resolve circular dependencies.
...
We really shouldn't have any. However, we may later introduce one
with XEP-0030 and XEP-0059.
2012-03-12 19:32:20 -07:00
Lance Stout
57d761b8a2
Move XEP-0115 to the new system.
2012-03-12 19:32:20 -07:00
Lance Stout
8b2023225c
Remove extra logging statement, add backward compatible references.
2012-03-12 19:32:20 -07:00
Lance Stout
f8f2b541db
Handle loading plugins on demand.
...
Plugins that are referenced as dependencies, but have not been
registered now will be imported. Newer plugins should register
themselves automatically, but older style plugins will be
explicitly registered after import.
2012-03-12 19:32:20 -07:00
Lance Stout
9d645ad5cd
Update the list of all stream feature plugins.
2012-03-12 19:32:20 -07:00
Lance Stout
610d366bdb
Ensure the adhoc command items node exists.
...
If the plugin is loaded and no commands are defined, we can at least
return a proper empty response instead of an item-not-found error.
2012-03-12 19:32:20 -07:00
Lance Stout
64c46562d3
Move XEP-0249 to the new system.
2012-03-12 19:32:20 -07:00
Lance Stout
87d6ade06d
Move XEP-0224 to new system.
2012-03-12 19:32:20 -07:00
Lance Stout
4a009515c1
Move XEP-0203 to new system.
2012-03-12 19:32:20 -07:00
Lance Stout
6497857495
Move XEP-0202 to new system.
2012-03-12 19:32:20 -07:00
Lance Stout
5a324c01de
Move XEP-0199 to new system.
2012-03-12 19:32:19 -07:00
Lance Stout
17279de4a3
Move XEP-0184 to new system.
2012-03-12 19:32:19 -07:00
Lance Stout
34a7a62c35
Move XEP-0128 to new system.
2012-03-12 19:32:19 -07:00
Lance Stout
2305cc61fd
Move XEP-0092 to new system.
2012-03-12 19:32:19 -07:00
Lance Stout
2f677c98f8
Move XEP-0086 to new system.
2012-03-12 19:32:19 -07:00
Lance Stout
3fda053606
Move XEP-0085 to the new system.
...
Optimized handlers so that only one is needed.
2012-03-12 19:32:19 -07:00
Lance Stout
6d855ec06c
Move XEP-0082 to new system.
2012-03-12 19:32:19 -07:00
Lance Stout
23cc62fe7c
Move XEP-0078 to new system.
2012-03-12 19:32:19 -07:00
Lance Stout
26ea67d211
Move XEP-0045 to new system.
...
Still needs updating to the new format.
2012-03-12 19:32:19 -07:00
Lance Stout
d43cd9fa54
Move XEP-0033 to new system.
...
Still needs updating to the new format.
2012-03-12 19:32:19 -07:00
Lance Stout
6f337b5425
Move XEP-0012 to new system.
...
Still needs to update to the current plugin format though.
2012-03-12 19:32:19 -07:00
Lance Stout
d104a5fe75
Move XEP-0009 to new system.
2012-03-12 19:32:19 -07:00
Lance Stout
cdd69c6842
Move XEP-0077 to the new system.
2012-03-12 19:32:19 -07:00
Lance Stout
4a3a9067d4
Move XEP-0066 to new system.
2012-03-12 19:32:19 -07:00
Lance Stout
1aecb2293a
Move XEP-0060 to new system.
2012-03-12 19:32:19 -07:00
Lance Stout
ad8fd91b7a
Move XEP-0050 to new system.
2012-03-12 19:32:19 -07:00
Lance Stout
1f5a3a4445
Move XEP-0047 to new system.
2012-03-12 19:32:19 -07:00
Lance Stout
be363e0b46
Move XEP-0004 to new system.
2012-03-12 19:32:19 -07:00
Lance Stout
a104cd6dae
Tidy up disco plugin.
2012-03-12 19:32:19 -07:00
Lance Stout
e287282782
Moving backwards compatibility shims to __init__ files.
2012-03-12 19:32:07 -07:00
Lance Stout
8b06d10415
Update XEP-0030 and XEP-0059 to new system.
2012-03-12 16:24:18 -07:00
Lance Stout
01b2499915
Introduce new plugin system.
...
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.
2012-03-12 16:24:18 -07:00
Lance Stout
9f43d31bf5
Add setting for maximum number of reconnection attempts.
...
Setting self.reconnect_max_attempts to a non-None value will limit
the number of times a connection attempt will be made before quiting
and raising a 'connection_failed' event.
2012-03-12 16:19:18 -07:00
Lance Stout
a318beded4
Update plugin list and use correct names.
2012-03-11 16:34:41 -07:00
Lance Stout
5f4b528e6b
Ensure that result stanzas are returned, as expected.
2012-03-11 16:13:19 -07:00
Lance Stout
f759b0ada1
Add support for XEP-0108: User Activity.
2012-03-11 12:37:54 -07:00
Lance Stout
7d89fa27a8
Expand support of XEP-0172 (user nickname) to include PEP.
2012-03-11 00:22:28 -08:00
Lance Stout
10ec92f7c6
Add support for XEP-0107, User Mood.
2012-03-10 23:32:20 -08:00
Lance Stout
58d2f317a0
Fix plugin loading logs for XEP-0118 and XEP-0163.
2012-03-10 23:31:54 -08:00
Lance Stout
34b094561f
Add support for XEP-0080.
2012-03-10 12:54:31 -08:00
Lance Stout
91155444c0
Resolve plugin dependency chains with XEP-0115.
...
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.
2012-03-10 12:48:35 -08:00
Lance Stout
7f71ac7e0a
Add user tune feature to disco, not just notifications.
2012-03-10 10:54:24 -08:00
Lance Stout
e5fc59a4c6
Ensure post init works for XEP-0118.
2012-03-10 10:44:53 -08:00
Lance Stout
549a9ab472
Add support for XEP-0118.
...
See examples/user_tune.py for a demonstration using the currently
playing song in iTunes.
2012-03-10 10:30:32 -08:00
Lance Stout
09720dcf42
Fix XEP-0163's updating of caps.
2012-03-10 10:20:06 -08:00
Lance Stout
ec044affd4
Only auto-broadcast caps changes after a session has started.
2012-03-10 10:19:43 -08:00
Lance Stout
af39945009
Add XEP-0163 plugin.
...
This is just a very simple wrapper for XEP-0030, XEP-0115, and XEP-0060
for adding interests to caps information, and publishing.
2012-03-10 09:23:47 -08:00
Lance Stout
78a50d0237
Add support for pubsub notification events.
...
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
2012-03-10 00:07:56 -08:00
Lance Stout
861d279b08
Correct missing pubsub#event stanzas and interfaces.
2012-03-10 00:07:15 -08:00
Lance Stout
4cb8a8d389
Modify the cert event to provide the PEM encoded cert in all cases.
2012-03-07 15:03:35 -08:00
Lance Stout
a71823dc04
Add support for roster versioning.
...
This was XEP-0237, but is now part of RFC 6121.
Roster backends should now expose two additional methods:
version(jid):
Return the version of the given JID's roster.
set_version(jid, version):
Update the version of the given JID's roster.
A new state field will be passed to the backend if an item
has been marked for removal. This is 'removed' which will
be set to True.
2012-03-07 14:55:27 -08:00
Lance Stout
d41ada6b66
Cleanup logging when loading a custom plugin.
2012-03-05 11:30:36 -08:00
Lance Stout
fdfe2cd64f
Propagate save option when setting a roster backend.
2012-03-05 11:28:10 -08:00
Lance Stout
7b51c6f5cc
Save existing roster content when setting a new backend.
2012-03-05 11:12:13 -08:00
Lance Stout
be7f07ad12
Prevent excess loading from the roster db.
...
Fixes issue #148
2012-03-05 11:11:35 -08:00
Lance Stout
830db11b41
Ensure that roster nodes aren't empty strings.
...
This would happen when receiving presence without a 'to' field, which
happens when receiving presence from other resources for the same account.
2012-03-05 11:08:57 -08:00
Lance Stout
53bcd33e1d
Let disconnect() wait for its lock for a few seconds.
...
This should eliminate most debug statements about not being
able to acquire a lock during disconnect.
2012-02-22 07:57:13 -08:00
Lance Stout
e3d596c9fa
Update XEP-0085 plugin to work with both ElementTree and cElementTree
...
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.
2012-02-19 20:28:31 -08:00
Lance Stout
ecd6ad6930
Fix incompatibility with clearing an element between ElementTree and cElementTree
2012-02-19 20:27:53 -08:00
Lance Stout
c36073b40e
xml.etree.ElementTree raises ExpatError instead of SyntaxError or ParseError.
2012-02-19 20:27:19 -08:00
Lance Stout
afe0d16797
Centralize references to ET to make switching implementations easier.
2012-02-19 20:26:40 -08:00
Lance Stout
977fcc0632
Fix instances of using undefined variables.
2012-02-18 11:56:10 -08:00
Lance Stout
94b57d232d
More pyflakes cleanup.
2012-02-18 11:44:05 -08:00
Lance Stout
7cdedb2ec0
More import cleanup based on pyflakes.
2012-02-18 11:40:34 -08:00
Lance Stout
676324805e
Use JID objects when dealing with roster items.
2012-02-18 11:39:47 -08:00
Lance Stout
7d74a7b027
More extraneous import cleanup.
2012-02-17 14:59:56 -08:00
Lance Stout
9d5eb864d1
More import cleanups based on pyflakes results.
2012-02-17 14:41:31 -08:00
Lance Stout
86a482e032
Fix pyflakes complaints for XEP-0115 plugin.
2012-02-17 11:40:51 -08:00
Lance Stout
c43c7be86c
Make last_xml usage a little more explict.
2012-02-17 11:40:07 -08:00
Lance Stout
c58462f154
Fix undeclared variable usage for reconnect.
2012-02-17 11:12:48 -08:00
Correl Roush
31d3e3b2b6
Updated XEP-0009 to handle unicode strings
2012-02-17 12:24:44 -05:00
Lance Stout
fb2582e53b
Fix fixing remove_stanza()
...
Fixes issue #146
2012-02-16 07:25:44 -08:00
Lance Stout
d807613117
Don't retrieve cert until a connection is made.
2012-02-16 07:02:56 -08:00
Lance Stout
6d922d00c3
Fix remove_stanza().
...
Fixes issue #146
2012-02-16 07:02:19 -08:00
Lance Stout
61ea84093b
Don't shutdown completely after handling SyntaxError.
...
The ``shutdown = True`` line was preventing the stream from reconnecting
after handling the error.
Fixes issues #101 , #145
2012-02-10 19:28:12 -08:00
Lance Stout
e76d6a481f
Fix undefined variable references when DNS timeouts.
2012-02-10 19:20:17 -08:00
Lance Stout
c1357717d9
Use '=' as base64 value for empty string SASL results.
2012-02-09 22:01:11 -08:00
Lance Stout
ca5145c210
Fix IPv6 query logging.
2012-02-10 06:46:51 +01:00
Lance Stout
1a272fd276
Add support for querying and connecting to IPv6 addresses.
...
Tested using servers provided by Florian Jensen (flosoft.biz)
during the 2012 FOSDEM XMPP Summit.
Fixes issue #94 .
2012-02-09 21:28:28 -08:00
Lance Stout
952260b423
Add ssl_cert event (direct).
...
The payload is a dictionary of parsed cert data, as provided by
Python's getpeercert() socket method. It unfortunately does not
provide much detail beyond basic info.
2012-02-04 14:16:37 +01:00
Lance Stout
caa967105c
Add more XEP-0047 tests.
2012-02-03 16:29:38 +01:00
Lance Stout
d565e4be20
Fix XEP-0184 imports
2012-02-03 16:08:27 +01:00
Lance Stout
85dd005abc
Fix infinite callback loop.
2012-02-03 16:03:46 +01:00
Lance Stout
021c57205f
Don't assume data is ASCII in saslprep.
2012-02-03 16:01:54 +01:00
Lance Stout
261a501afc
Merge remote-tracking branch 'whooo/master' into develop
2012-02-03 15:23:01 +01:00
Erik Larsson
9a38a101d2
Added fritzy to the copyright for xep_0184
2012-02-03 15:17:01 +01:00
Lance Stout
4665c5cf1a
Fix data stanza based on test results.
2012-02-02 19:19:50 +01:00
Lance Stout
bd52a5e6c1
Initial, mostly working XEP-0047 plugin.
...
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.
2012-02-02 18:27:23 +01:00
Lance Stout
f98e5a03de
Fix typo s/is_set/is_set()
2012-02-02 18:14:48 +01:00
Erik Larsson
2217c69757
Added plugin for XEP-0184
2012-02-02 14:29:27 +01:00
Lance Stout
3ab7c8bcc3
Make socket_error run as a direct event to ensure that it is handled.
...
Socket errors that occur before stream processing begins could not be
handled as the event loop would not be running yet.
Resolves issue #142
2012-01-28 18:54:46 -08:00
Lance Stout
8f25acd0f3
Bump version number in develop branch to 1.0.1dev.
2012-01-25 20:44:41 -08:00
Lance Stout
999f1932cc
Merge pull request #138 from rhcarvalho/patch-2
...
Set default argument value.
2012-01-25 20:41:45 -08:00
Lance Stout
13158e3cdf
Revert the X-GOOGLE-TOKEN mech to not perform HTTP requests.
...
Added new example for how to retrieve a Google token, following
the best case, non-browser, workflow. Other thirdparty auth
mechs (Facebook, MSN) follow a similar pattern of using an
access token.
2012-01-23 23:58:40 -08:00
Rodolfo Carvalho
2735b680b9
Fix ValueError when line has more than one '='.
2012-01-22 18:32:32 -02:00