[Bug 43826] avoid downloading the roster at every connection

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jan 19 16:12:46 CET 2012


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

--- Comment #4 from Alban Crequy <alban.crequy at collabora.co.uk> 2012-01-19 07:12:46 PST ---
(In reply to comment #3)
> + * tp_base_contact_list_get_download_at_connection:
> ...
> + * The default implementation always returns %TRUE, which is correct for most
> + * protocols;
> 
> Yep, seems good. However:
> 
> + g_return_val_if_fail (TP_IS_BASE_CONTACT_LIST (self), FALSE);
> 
> and
> 
> + if (!TP_IS_MUTABLE_CONTACT_LIST (self))
> +   return FALSE;
> 
> and
> 
> + g_return_val_if_fail (iface != NULL, FALSE);
> 
> and
> 
> + g_return_val_if_fail (iface->get_download_at_connection != NULL, FALSE);
> 
> I realise these are corner cases but surely these should be returning TRUE in
> the error case?

Ok.

> It might be nice time to check that all the other functions
> that use tp_base_contact_list_true_func actually do the right thing?

Other tp_base_contact_list_true_func functions are:
- tp_base_contact_list_can_change_contact_list
- tp_base_contact_list_get_request_uses_message
- tp_base_contact_list_can_block

But it does not make sense to return TRUE in case of error, because in case of
programmable error, it will not go further (changing the contact list,
block...). And if the object does not implement the mutable interface, we must
return FALSE. It breaks the tests when I tried to return TRUE.

> +typedef void (*TpBaseContactListFunc) (
> + TpBaseContactList *self,
> + GAsyncReadyCallback callback,
> + gpointer user_data);
> 
> I don't like this name? It seems way too vague.

I changed it to TpBaseContactListAsyncFunc. The other names (such as
TpBaseContactListActOnContactsFunc) are named after their signature only since
they are used for several purposes.

I still would like a reply on questions from Comment #2. I also updated the
documentation of TpMutableContactListInterface and it says "Since: 0.13.0". Is
it correct? How does it work when some fields are added in different versions?

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



More information about the telepathy-bugs mailing list