Commit Graph

47 Commits

Author SHA1 Message Date
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
161605ccb1 services/presence/server_plugin: Initialize attributes with empty values 2007-05-24 17:45:05 +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
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
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
Dan Williams
9e1e851884 Make deferred connection actually work 2007-05-14 02:46:51 -04:00
Dan Williams
5e2ea16e3a Redo PS connection handling; ensure valid network connection before talking to server 2007-05-13 21:34:15 -04:00
Dan Williams
a86293dcb4 Only set our own properties when we're connected 2007-05-11 17:25:44 -04:00
Dan Williams
a67d87c2a6 Fix server-based registration 2007-05-08 16:28:55 -04:00
Dan Williams
66b7210481 Ignore network properties for the owner when their jabber contact comes online 2007-05-03 00:43:53 -04:00
Dan Williams
46d97015e6 Fix arguments 2007-05-02 23:20:38 -04:00
Dan Williams
570c7e6052 Add buddy ip4-address property (temporary) 2007-04-30 23:44:39 -04:00
Dafydd Harries
f6c5b63a58 don't return unused value from D-Bus signal callback 2007-04-30 18:43:43 +01:00
Dan Williams
274cc65c4e Use hashlib on python 2.5 2007-04-26 12:34:05 -04:00
Tomeu Vizoso
1c249a216b Fix for using with python 2.4. 2007-04-26 18:25:40 +02:00
Mike's Primary Account
a0348a565c Initial documentation for psutils and server_plugin 2007-04-20 21:09:51 -04:00
Mike's Primary Account
79d17c14f4 Initial documentation of presence service overview.
Fix weird indent in server_plugin module
2007-04-20 13:10:40 -04:00
Dan Williams
4449b4e237 Work around server not figuring out conference server address 2007-04-16 22:40:20 -04:00
Dan Williams
5f30901e62 Always set key; new buddy properties replace old ones 2007-04-16 22:39:07 -04:00
Dan Williams
8b47d93ad2 Fix debug output; print handle 2007-04-16 22:37:56 -04:00
Dan Williams
f169628cbd Query non-local activity properties on discovery 2007-04-13 15:42:54 -04:00
Dan Williams
15febc6620 Correctly handle blank activity list 2007-04-13 15:05:21 -04:00
Dan Williams
02900bbfbb Fix traceback when sharing activity 2007-04-13 14:06:49 -04:00
Dan Williams
773ae4965e Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar 2007-04-13 13:12:04 -04:00
Dan Williams
31000f6c3e Asynchronize activity join/share in the PS 2007-04-13 13:11:59 -04:00
Guillaume Desmottes
6b6b72f9c9 implement org.laptop.Sugar.Presence.GetPreferredConnection 2007-04-13 18:29:50 +02:00
Dan Williams
7b40f9bf60 Asynchronize set_activity_properties 2007-04-12 17:03:30 -04:00
Dan Williams
6e070996c9 Asynchronize setting owner properties 2007-04-12 16:48:40 -04:00
Dan Williams
3d6bff9278 Ignore invalid handles on avatar updates 2007-04-11 23:45:20 -04:00
Dan Williams
162a87f882 Create test owner for presence service
This owner changes properties periodically so we can test out the PS's handling
of property changes.  To execute, run Sugar and then make sure that the D-Bus
address is the one sugar is using (get it from ~/.sugar/default/session.info).
Then run:

build/bin/sugar-presence-service X

where X is a number 1 -> 9 inclusive.  It will generate fake buddy info for that
test buddy and then start up a presence service for that buddy, changing a random
property of the buddy every 10 seconds.
2007-04-11 22:49:14 -04:00
Dan Williams
8d4d87a081 Make contact-online handler async; print -> logging.debug 2007-04-10 15:00:49 -04:00
Dan Williams
48cab08b33 PS fixes; use correct type on public keys and hide invalid buddies 2007-04-10 10:59:35 -04:00
Dan Williams
76a0f45aa8 More new PS fixes 2007-04-09 16:05:32 -04:00
Dan Williams
2509d990e4 Cut over to new PresenceService 2007-04-09 14:40:50 -04:00