[Bug 26883] InterfaceFactory._valid_interfaces is not really valid before connection

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Mar 4 16:38:46 CET 2010


http://bugs.freedesktop.org/show_bug.cgi?id=26883





--- Comment #3 from Simon McVittie <simon.mcvittie at collabora.co.uk>  2010-03-04 07:38:45 PST ---
The attribute can't always be valid (without blocking the main loop, which is
bad - <http://smcv.pseudorandom.co.uk/2008/11/nonblocking/>), since on a newly
created Connection we just don't have that information yet - we have to ask
over D-Bus, which takes time.

I think what you need to pre-load SimplePresence is something that resembles
ready_handler, but can run as soon as the initial Status and Interfaces have
been fetched, without waiting for CONNECTED. telepathy-qt4 has a mechanism like
that, and putting a similar thing into telepathy-glib is among my medium-term
plans for Telepathy.

I'm not sure exactly how this should be implemented in telepathy-python, which
doesn't natively have any mechanism for signals; perhaps binding telepathy-glib
into Python would be a better long-term solution for this sort of thing.

(In the meantime, if you know through out-of-band information, or your own call
to GetInterfaces, that the Connection has the SimplePresence interface, I
believe you should be able to just make a dbus.Interface for it, and call the
method on that?)


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the telepathy-bugs mailing list