[Bug 27769] TpConnection needs AVATAR_REQUIREMENTS feature

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Apr 21 17:06:44 CEST 2010


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

--- Comment #4 from Xavier Claessens <xclaesse at gmail.com> 2010-04-21 08:06:44 PDT ---
(In reply to comment #3)
> (In reply to comment #2)
> > Note that we also want to know the avatar requirements when offline, so maybe
> > the TpConnectionAvatarRequirements struct could be renamed to
> > TpAvatarRequirements so it can be used in any other APIs like TpProtocol.
> 
> Yes please. Also, it should have a boxed type (look at recent patches that make
> TpIntSet into a boxed type - basically you need a get_type function, a copy
> function and a free function), and a spare pointer or two in case we need to
> add more fields (I can't think of any, but I'd have said that before we added
> the "recommended" ones too).

done

> The struct needs documentation; as a minimum, please `make check` with
> --enable-gtk-doc and add docs in the source, and entries in sections.txt, until
> it stops complaining.

done

> > +  ar->supported_mime_types = g_strdupv ((GStrv) tp_asv_get_strv (properties,
> > +      TP_PROP_CONNECTION_INTERFACE_AVATARS_SUPPORTED_AVATAR_MIME_TYPES));
> 
> This doesn't work, and neither do any of the other properties. The key in the
> a{sv} returned by GetAll isn't namespaced, so you need to use
> "SupportedAvatarMIMETypes".

done

> It would be nice if you replaced NULL with { NULL } (i.e. an empty GStrv) after
> retrieving SupportedAvatarMIMETypes, so that you could guarantee to API users
> that the GStrv was non-NULL.

done

> > +finally:
> > +  _tp_proxy_set_feature_prepared (proxy, TP_CONNECTION_FEATURE_AVATAR_REQUIREMENTS,
> > +      TRUE);
> 
> The third argument should be FALSE if getting the properties failed. You can
> use (self->priv->avatar_requirements != NULL), probably.

I copied from tp_connection_get_rcc_cb() where it also give TRUE even in case
of failure. Is that a bug in both functions?

I updated my branch.

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