[Bug 28200] TpBaseContactList

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Aug 3 18:35:34 CEST 2010


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

David Laban <david.laban at collabora.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david.laban at collabora.co.uk

--- Comment #39 from David Laban <david.laban at collabora.co.uk> 2010-08-03 09:35:34 PDT ---
Okay: thoughts while implementing
TpMutableContactListInterface->request_subscription_async

Needing to handle multiple contacts at the same time is a pain in the ass, if
you have to do everything async *before* calling the callback, as the API asks
you to (requires looping and counting the number of async calls you make). What
is the use-case for adding multiple contacts with the same message? (to be
honest, it's not really that much work, because you probably need to do this
for modifying groups etc too. It's just that I implemented this method first,
so I didn't have the helper-functions in place for it.)

Also, doing it GAsyncResult-based means that your function has two pointers
that get passed into it. If you immediately convert that into a
GSimpleAsyncResult, it brings it down to one, but I can't help thinking it
would be simpler to be passed in an opaque token for the request (which could
easily be a pointer to a GSimpleAsyncResult, with the agreement that you will
call tp_mutable_contact_list_request_subscription_finished (self, token); when
you're done.

Also, I can't think of a use-case for implementing a finish function,
especially if the whole point of the GAsyncResult API is that it doesn't
guarantee that it will ever be called. If you want to do cleanup, you can
either finish not in an idle, or do it in the function you pass into
set_op_res_gpointer().

Was going to wait until I'd implemented all of TpMutableContactListInterface
before commenting, but it's probably best to give feedback as I go along in
reality. More to come later.


While I was here, I added myself to the CC list and reviewed up to
4fd1fd62354a1abb12143792993ce66bd540e69a (contact-list-the-revenge).

Looks good.

-- 
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