Commit Graph

341 Commits

Author SHA1 Message Date
Simon McVittie
a5ba8541a4 services/presence/activity: wrap long lines, remove trailing whitespace 2007-05-25 10:56:14 +01:00
Simon McVittie
b96de811d3 services/presence/server_plugin: fix logging of join/share error 2007-05-24 18:59:32 +01:00
Simon McVittie
7b20bacdf5 services/presence/presenceservice: check against None with 'is' 2007-05-24 18:59:25 +01:00
Simon McVittie
0410ed28ba services/presence/presenceservice: add some missing in_signature arguments 2007-05-24 18:59:19 +01:00
Simon McVittie
570a485d84 services/presence/presenceservice: don't use deprecated dbus.glib
Importing dbus.glib has strange magical side-effects. Instead, make it more
explicit that the default dbus-python main loop is being set to the GLib main
loop.
2007-05-24 18:59:13 +01:00
Simon McVittie
2abcd89c1f services/presence/: Move internal_get_activity to TestPresenceService 2007-05-24 18:59:06 +01:00
Simon McVittie
f7ba2aa1e2 services/presence/: separate test code into a separate module 2007-05-24 18:58:58 +01:00
Simon McVittie
f75747015d services/presence/activity: Document constructor arguments 2007-05-24 18:58:50 +01:00
Simon McVittie
e7f10dd2aa services/presence/presenceservice: fix broken syntax 2007-05-24 18:58:43 +01:00
Simon McVittie
4e188059e3 services/presence/server_plugin: Use telepathy-python helper function request_channel()
Also request the subscribe and publish handles at the same time, to reduce
D-Bus roundtrips.
2007-05-24 18:58:35 +01:00
Simon McVittie
a450a82e59 services/presence/server_plugin: Call _handle_connection_status_change with appropriate arguments
Also reduce number of methods by using nested functions for trivial Connect()
reply handlers.
2007-05-24 18:58:28 +01:00
Simon McVittie
e13728f347 services/presence/server_plugin: various cosmetic cleanups
* wrap most long lines at 80 characters
* don't preformat log messages, let the logging framework do it
2007-05-24 18:58:17 +01:00
Simon McVittie
0d5dd24166 services/presence/server_plugin: delete unused InvalidBuddyError 2007-05-24 18:58:10 +01:00
Simon McVittie
e11389d813 services/presence/server_plugin: reformat, document signal definitions 2007-05-24 18:58:02 +01:00
Simon McVittie
1026fce013 services/presence/presenceservice: various cosmetic cleanups
* wrap long lines at 80 characters
* don't preformat log messages, let the logging framework do it
* eradicate trailing whitespace
2007-05-24 18:57:53 +01:00
Simon McVittie
55c0d9cb07 services/presence/server_plugin: remove trailing whitespace 2007-05-24 18:56:42 +01:00
Simon McVittie
2d76475682 services/presence/psutils: Remove bytes_to_string - no longer needed 2007-05-24 18:56:35 +01:00
Simon McVittie
43453124bd services/presence/presenceservice: Make bytes_to_string() unnecessary by requesting a ByteArray from dbus-python 2007-05-24 18:56:29 +01:00
Simon McVittie
c3e54133a4 services/presence/server_plugin: make bytes_to_string() unnecessary by requesting a dbus.ByteArray 2007-05-24 18:56:20 +01:00
Simon McVittie
cb279a1418 services/presence/server_plugin: reorder imports 2007-05-24 18:56:12 +01:00
Simon McVittie
417fd7cc8a services/presence/server_plugin: Use more conventional conditional import for md5 2007-05-24 18:56:06 +01:00
Simon McVittie
71951848a6 services/presence/server_plugin: error_handler always takes exactly 1 argument.
Instead of using lambdas with arbitrary arguments, use a lambda that takes
1 argument.
2007-05-24 18:55:57 +01:00
Simon McVittie
f69e06247f services/presence/server_plugin: Use non-deprecated handle type constants.
(CONNECTION_HANDLE_TYPE_foo is deprecated in favour of HANDLE_TYPE_foo.)
Also rewrap imports to be 80 characters wide.
2007-05-24 18:55:50 +01:00
Simon McVittie
3c2bdfc346 services/presence/server_plugin: implement _new_channel_cb asynchronously 2007-05-24 18:55:31 +01:00
Simon McVittie
3444acae8f services/presence/server_plugin: Stop using private API of telepathy-python and dbus-python 2007-05-24 18:52:26 +01:00
Simon McVittie
b16bb9d6cc services/presence/server_plugin: Fix error logging for RequestHandles 2007-05-24 18:52:15 +01:00
Simon McVittie
f4327759fc services/presence/server_plugin: When creating a room, make it non-anonymous.
Otherwise clients joining the room won't be able to convert other clients'
channel-specific handles into global handles in order to make Buddy objects,
because they're not the moderator of the room.
2007-05-24 18:48:13 +01:00
Simon McVittie
7b1a38af1c services/presence/: keep track of the owner's Telepathy handles 2007-05-24 18:47:55 +01:00
Simon McVittie
10e1daf8c6 services/presence/buddy.py: Don't allow the Owner to disappear, even if they have no handles left 2007-05-24 18:46:16 +01:00
Simon McVittie
a6e809a9ef services/presence/: move more of the handle tracking into the Buddy object 2007-05-24 18:46:09 +01:00
Simon McVittie
161605ccb1 services/presence/server_plugin: Initialize attributes with empty values 2007-05-24 17:45:05 +01:00
Simon McVittie
494e17b3cd Revert "services/presence/: move more of the handle tracking into the Buddy object".
It shouldn't have been applied before "services/presence: buddy: add mapping
to/from Telepathy handles" which has not yet been reviewed.

This reverts commit 78356b1956.

Conflicts:

	services/presence/presenceservice.py
2007-05-24 12:34:36 +01:00
Simon McVittie
1d79d93627 Fix syntax 2007-05-21 11:50:29 +01:00
Simon McVittie
66c5e882f3 Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar 2007-05-21 11:30:38 +01:00
Simon McVittie
8c8dffe662 Merge commit 'origin' into submit 2007-05-21 11:27:47 +01:00
Simon McVittie
78356b1956 services/presence/: move more of the handle tracking into the Buddy object 2007-05-18 15:22:32 +01:00
Simon McVittie
bf84eca102 services/presence/server_plugin.py: Ensure _conn always exists (even if None)
This means cleanup() will not fail on an uninitialized server plugin,
and get_connection() will return None rather than raising AttributeError.
2007-05-18 15:21:36 +01:00
Dan Williams
7b9c59fb9c Correctly send IPv4 address when NM already has a connection 2007-05-17 13:54:26 -04:00
Simon McVittie
f3a2d532f5 services/presence: buddy: add mapping to/from Telepathy handles 2007-05-17 17:41:42 +01:00
Dan Williams
d72ff8c6fb Don't try to shove None through dbus 2007-05-17 09:32:34 -04:00
Simon McVittie
531321740c Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
Conflicts:

	services/presence/server_plugin.py
2007-05-16 12:30:49 +01:00
Simon McVittie
35d190b55e services/presence/server_plugin.py: Handle presence more correctly.
This avoids unnecessary attempts to look up the buddy properties of
channel-specific handles (which doesn't work) by only looking up the buddy
properties of people we're subscribed to.
Also, this approves subscription requests that come in while we're online,
rather than handling them when we next go from offline to online.
2007-05-16 11:39:16 +01:00
Dan Williams
5d9e19a892 Retry getting buddy properties a few times 2007-05-16 01:03:55 -04:00
Dan Williams
82095ea26a Some PS reliability fixes 2007-05-15 15:25:30 -04:00
Simon McVittie
5d77ff680a services/presence: Stop using deprecated keyword argument named_service 2007-05-15 15:20:02 +01:00
Simon McVittie
4b26840333 sugar.presence.presenceservice, services/presence: Use named loggers.
This causes events in the log to be annotated with the module that emitted the
message.

Before: DEBUG - root: Starting up...
After: DEBUG - s-p-s.server_plugin: Starting up...

I've used a log domain of "sugar.presence..." for the client library and
e.g. "s-p-s.activity" for the service internals.
2007-05-15 14:58:15 +01:00
Dan Williams
871828f307 Set alias twice so server actually gets it 2007-05-14 22:48:53 -04:00
Dan Williams
79aad47327 Don't drop buddies on failure to retrieve their activity list 2007-05-14 16:20:23 -04:00
Dan Williams
9b978f014f Fix setting owner OLPC properties 2007-05-14 16:17:33 -04:00
Dan Williams
a05d804949 Make reconnection to the jabber server work again 2007-05-14 13:58:26 -04:00