[Bug 27769] TpConnection needs AVATAR_REQUIREMENTS feature

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Apr 21 14:21:40 CEST 2010


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

--- Comment #3 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-04-21 05:21:40 PDT ---
> Or maybe it can be done in CORE since it's just one dbus call with no
> update?

No, I prefer it as a feature. Most TpConnections won't care about this feature
(it's only useful to UIs that can set the avatar, like the Empathy main
window), so it'd be a waste of time and memory for (say) telepathy-logger,
Mission Control, a dedicated VoIP UI or a Tubes app to download and remember
this information.

(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).

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.

> +  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".

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.

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

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