[Bug 20035] Avatar cache reference implementation

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue May 18 15:52:46 CEST 2010


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

--- Comment #25 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-05-18 06:52:46 PDT ---
I do think commit 9d44a19e51eae78b52117ee8538a91a23565b49c ("Use
g_return_if_fail() in case a feature is unknown") should be included when this
branch is merged.

I happened to notice that the regression test uses a directory in
g_get_tmpdir() (i.e. in practice, /tmp) without checking whether it already
exists. Please do handle this, even if the handling is as simple as trying
g_mkdir (that_directory, 0700) and aborting if it fails (with EEXIST or
otherwise).

I haven't reviewed the implementation in detail, just looked at the API and
docs. I'd like one (cosmetic) API change and some documentation tweaks before
it's merged, but there's nothing else I want to veto.

> +tp_contact_get_avatar_mimetype
> +    gchar *avatar_mimetype;
> +tp_contact_get_avatar_mimetype (TpContact *self)
> +    case PROP_AVATAR_MIMETYPE:
[etc.]

I'd prefer with a "space" (i.e. "_" or "-"), at least where it appears in API -
avatar_mime_type, etc.

> + * Returns: the same #Gfile as the #TpContact:avatar-file property

...the same #GFile as... (and please grep for any other occurrences)

> + * Returns: the same token as the #TpContact:avatar-mimetype property

...the same MIME type as the...

> +   * When #TpContact:avatar-token change, this property is not updated directly,

>From the not-en_BE department: s/change/changes/ and possibly
s/directly/immediately/

> +   * but will be once the new avatar data is retrieved and stored in cache.

I'd phrase this as "but will be updated when the new...", which I think is a
bit clearer.

> +   * implicitely set %TP_CONTACT_FEATURE_AVATAR_TOKEN.

implicitly (and please grep for any other occurrences)

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