[Bug 43826] avoid downloading the roster at every connection

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Mar 27 18:33:35 CEST 2012


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

--- Comment #16 from Alban Crequy <alban.crequy at collabora.co.uk> 2012-03-27 09:33:35 PDT ---
(In reply to comment #15)
> > + * @download_async: the implementation of
> > + * tp_base_contact_list_download_async(); if a subclass does not implement
> > + * this itself, the default implementation raise TP_ERROR_NOT_IMPLEMENTED,
> > + * asynchronously. Since: 0.UNRELEASED
> 
> implementation *will* raise TP_…

Fixed

> > + * If the #TpBaseContactList subclass does not override
> > + * download_async, the default implementation raise TP_ERROR_NOT_IMPLEMENTED,
> > + * asynchronously.
> 
> same thing here.

Fixed

> > + * This is a virtual method which may be implemented using
> > + * #TpContactList.download_finish. If the @result
> > + * will be a #GSimpleAsyncResult, the default implementation may be used.
> 
> You mean #TpContactListClass.download_finish

Fixed

> Also, the docs make out that not implementing download_async() isn't /so/ bad
> as it'll just return NotImplemented but then we have this in constructed:
> 
> >   g_return_if_fail (cls->get_contact_list_persists != NULL);
> > + g_return_if_fail (cls->download_async != NULL);
> 
> and this will prevent the rest of the base class being set up properly, no? I'm
> not sure what the best thing to do is here... perhaps g_warn_if_fail?

tp_base_contact_list_class_init() sets up a default function:
  cls->download_async = tp_base_contact_list_download_async_default;

And the default function just returns TP_ERROR_NOT_IMPLEMENTED. So it should
not happen.

> > +gboolean
> > +tp_base_contact_list_get_download_at_connection (TpBaseContactList *self)
> 
> This isn't added to -sections.txt

Added. I also moved the declarations outside of the <SUBSECTION changes>
because it is no longer implemented with TP_TYPE_MUTABLE_CONTACT_LIST.

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