Bug 29320 - Expose resources
Summary: Expose resources
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-spec (show other bugs)
Version: git master
Hardware: Other All
: low enhancement
Assignee: Jonny Lamb
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/jo...
Whiteboard: review+ as draft
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-07-30 08:17 UTC by Jonny Lamb
Modified: 2010-09-29 05:02 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Comment 1 Jonny Lamb 2010-07-30 12:24:32 UTC
Simon, I added a ro property to specify whether the resources are human readable as you suggested.
Comment 2 Jonny Lamb 2010-07-31 15:25:52 UTC
So I implemented this in gabble. I missed out client type because that branch hasn't been merged and I wanted to make the branches independent. It'll be easy to add it later.

http://git.collabora.co.uk/?p=user/jonny/telepathy-gabble.git;a=shortlog;h=refs/heads/resources

Seems to work fine.
Comment 3 Simon McVittie 2010-09-03 04:28:30 UTC
The spec looks good as a draft.

> +  <tp:copyright>Copyright (C) 2010 Collabora Ltd.</tp:copyright>

Nitpicking: s/(C)/©/?
Comment 4 Simon McVittie 2010-09-03 04:36:01 UTC
Regarding Gabble:

Regression tests are good, and should have caught this:

> +  if (name == g_quark_from_static_string ("MailNotificationFlags"))
> +    g_value_set_uint (value, GABBLE_RESOURCES_HUMAN_READABILITY_MAYBE);
                                              ^^^^^^^^^^^^^^^^^^^^^

> +static const gchar *
> +presence_id_to_status (GabblePresenceId id,
> +    TpConnectionPresenceType *type)

Surely this *must* be duplicating something in conn-presence.c? (It's entirely possible that the information exists in conn-presence.c but needs some refactoring, though.)

(Be particularly careful about Senko's new plugin-defined presences, which can be visible on the self-handle (if the self-resource is exposed) and didn't exist when you wrote this branch...)

> +      val = tp_g_value_slice_new_boxed (
> +          GABBLE_HASH_TYPE_RESOURCE_INFORMATION_MAP, resources);
[...]
> +      g_hash_table_unref (resources);

Just take_boxed to avoid a copy?
Comment 5 Simon McVittie 2010-09-29 04:48:38 UTC
Nitpicking:

> This is the case in XMPP --
> +          most resources are set in a way that the user can deduce some
> +          information from them, such as <em>this guy is in the
> +          office</em> or <em>this guy is chilling at home</em>

I don't think the ", such as..." adds much to this :-)

> absense

absence

> +          XMPP, the resource string could still be useless, like in the
> +          case of using gtalk where your resource is forced.</p>

the resource string could be partially human-readable (as on Google Talk, where a resource of "home" is changed by the server to a unique string like "home_1234fdec") or not at all human-readable.
Comment 6 Jonny Lamb 2010-09-29 05:02:40 UTC
I merged my draft spec, thanks.

I'll open another bug about my gabble branch.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.