Bug 31982 - Document client-interests parsably
Summary: Document client-interests parsably
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-spec (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Danielle Madeley
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/da...
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-11-29 21:09 UTC by Danielle Madeley
Modified: 2010-12-01 04:05 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Danielle Madeley 2010-11-29 21:09:47 UTC
Add a <tp:client-interest> field to document client interests.
Comment 2 Simon McVittie 2010-11-30 02:47:30 UTC
Having client interests be machine-readable is good, but I'd like a test in test/test-specparser.py or something. (Does `make check` still pass, btw? I recently reinstated test-specparser, which wasn't run by `make check` and so hadn't worked for several releases.)

The syntax I had in mind was that client interests would either look like interface names (o.fd.T.C.I.MailNotification) or like contact attributes and other tokens (hypothetically, o.fd.T.C.I.MailNotification/count).

Perhaps rather than having name="" be magical (which makes the short_name be the empty string, which seems rather astonishing), it'd be better to have different markup for the two cases, something like this?

   <interface name="o.fd.T.C.I.MailNotification">
     <tp:is-client-interest>
       Clients MUST blah blah unless they enable <tp:token-ref>count</> instead
     </tp:is-client-interest>

     <tp:client-interest name="count">
       Clients MAY blah blah without adding the interface name as an interest
     </tp:client-interest>
Comment 3 Danielle Madeley 2010-11-30 16:26:04 UTC
I wondered if they were meant to be tokens like contact attributes. I should have read the rationales (which are the only place where this is explicit).

I personally don't like <tp:is-client-interest> (we don't have anything like this elsewhere). I would rather have a <tp:client-interest> where you omit the name attribute. Whatever we have, short_name is still going to be empty.
Comment 4 Danielle Madeley 2010-11-30 20:44:28 UTC
Updated to include tests.

Also added a new method for building the anchors (<a name="for-example">), Base.get_anchor(), and have changed both get_url() and the templates to use this method. This removes the duplicate building of the anchors, and makes it easier to change how anchors are constructed. Have then changed the anchors to include the item type, to prevent future potential namespace conflicts between things like client-interests and other tokens (idk it could happen). Also makes the URLs that little bit shorter, and includes the type in the URL (which is nice).

Example: http://people.freedesktop.org/~danni/telepathy-spec-client_interests/spec/Connection_Interface_Mail_Notification.html
Comment 5 Simon McVittie 2010-12-01 02:47:03 UTC
r+, thanks
Comment 6 Danielle Madeley 2010-12-01 04:05:43 UTC
Merged.


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.