Bug 29190 - Protocol objects don't define a serialization for all their properties
Summary: Protocol objects don't define a serialization for all their properties
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-spec (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Simon McVittie
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/sm...
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-07-21 05:35 UTC by Simon McVittie
Modified: 2010-08-05 03:53 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Simon McVittie 2010-07-21 05:35:17 UTC
Protocol objects don't define how the EnglishName, VCardField and Icon are represented in the .manager file.

telepathy-glib's TpProtocol interprets them in the obvious way (keys in the protocol's group, of the same name as the property); the referenced branch says so in the spec, and adds a somewhat complete example based on the example CM in telepathy-glib.
Comment 1 Senko Rasic 2010-07-22 05:01:24 UTC
Review of 9a71e0:

+RequestableChannelClasses=text

Shouldn't that be "RequestableChannelClasses=text;", since it's a string list?

Also, AFAICT, there are no names associated with the channel classes, so the section names must be autogenerated. Of course, the names aren't actually used for anything except serialization here, but it'd be helpful if the spec could give guidance on how to generate them.

We could e.g. use the channel type suffix and (a representation of) target handle type, to make the names somewhat human-readable, and append a counter to each name to ensure uniqueness. This is what I've implemented in gabble branch implementing Protocol support.

The rest looks fine to me.
Comment 2 Simon McVittie 2010-07-22 07:49:06 UTC
(In reply to comment #1)
> Review of 9a71e0:
> 
> +RequestableChannelClasses=text
> 
> Shouldn't that be "RequestableChannelClasses=text;", since it's a string list?

Well spotted; there was also a pre-existing instance of the same error. Fixed in the updated branch.

> Also, AFAICT, there are no names associated with the channel classes, so the
> section names must be autogenerated. Of course, the names aren't actually used
> for anything except serialization here, but it'd be helpful if the spec could
> give guidance on how to generate them.

I've explicitly said that they're not significant, and given one example of a mnemonic name, and one example of sequential names. Is that OK from your point of view?

> We could e.g. use the channel type suffix and (a representation of) target
> handle type, to make the names somewhat human-readable, and append a counter to
> each name to ensure uniqueness. This is what I've implemented in gabble branch
> implementing Protocol support.

That sounds reasonable, but is an implementation detail of Gabble. I must admit that I was mostly assuming .manager files would be hand-written (the auto-generation that Gabble does prevents cross-compilation, which is a long-standing bug).
Comment 3 Senko Rasic 2010-08-05 02:48:35 UTC
(In reply to comment #2)
> I've explicitly said that they're not significant, and given one example of a
> mnemonic name, and one example of sequential names. Is that OK from your point
> of view?

Yeah, that looks fine to me.

Overall ++ for the branch, merge away :)
Comment 4 Simon McVittie 2010-08-05 03:53:42 UTC
Fixed in git for 0.19.10


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.