Bug #26210 demonstrates that we should generate string constants for well-known contact attributes (and also capability tokens). I propose TP_TOKEN_${interface}_${token}, like TP_TOKEN_CONNECTION_INTERFACE_CONTACT_CAPABILITIES_CAPABILITIES.
Please review the TP_TOKEN_* constant generation. It ignores "is-family=yes" for tp:hct. It also replaces "-" and "." with "_" for both "tp:hct" and "contact-attribute" elements' constants. C.
Looks good so far, but all the #defines that result from this ought to be in the documentation (docs/reference/*sections.txt).
Added manually, this means that every token added in spec will have to be added in docs/reference/*sections.txt even though it's automatically recognized by tool/glib-interfaces-gen.py. It it's right, the branch is updated.
Fixed in 0.11.3
Actually, these constants are wrong in 0.11.3 and 0.11.4; they have a dot in, whereas we want a slash. I blame the reviewer (some guy called Simon...), who should have spotted this, and should also have insisted on a regression test. Here's a branch fixing this: http://git.collabora.co.uk/?p=user/smcv/telepathy-glib-smcv.git;a=shortlog;h=refs/heads/tokens
This could break people quite badly when doing the recommended thing, so major/high.
Not sure if I'm a tp-glib reviewer, but review+.
(In reply to comment #7) > Not sure if I'm a tp-glib reviewer, but review+. I think you qualify :-) Thanks, fixed in git for 0.11.5.
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.