[Bug 27676] ContactInfo high-level API

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jun 2 17:42:22 CEST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=27676

--- Comment #21 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-06-02 08:42:21 PDT ---
(In reply to comment #20)
> None of our wrappers for tp_cli_foo_call_bar() are cancellable. IIRC the reason
> is the semantic of GCancellable is to stop a running operation (like reading a
> file) but a DBus call can't be stopped, we can just ignore the callback... So I
> get told (sjoerd IIRC) that our solution is to use TpWeakRef as user_data, and
> in the callback we can check if our object (the GtkDialog in empathy case) is
> still alive, and if it is NULL we can return directly.

Normally I'd agree, but normally our D-Bus calls time out after 25 seconds (and
the TpConnection and TpContact get unreffed at that point); if the timeout is
an hour, then the TpConnection and TpContact stay around for up to an hour too.
I wonder whether that's enough reason to offer a way to cancel.

However, thinking about it more, it's only the TpConnection, TpContact and
TpWeakRef that are affected, and a typical UI will keep the connection and
contact around anyway; if the connection disconnects, we hope the connection
manager will correctly reply with an error to all pending requests. Perhaps you
could add a test to Gabble to check that it does this?

(I agree that it would be misleading to offer a GCancellable on an operation
with side-effects, like a "set" call.)

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



More information about the telepathy-bugs mailing list