summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/templates/interface.html30
-rw-r--r--doc/templates/style.css8
-rw-r--r--tools/specparser.py35
3 files changed, 61 insertions, 12 deletions
diff --git a/doc/templates/interface.html b/doc/templates/interface.html
index 26650b41..4019e307 100644
--- a/doc/templates/interface.html
+++ b/doc/templates/interface.html
@@ -13,6 +13,7 @@
<a href="index.html">Interface Index</a>
(<a href="interfaces.html">Compact</a>)
| <a href="#summary">Summary</a>
+ #if $interface.client_interests: | <a href="#client-interests">Client Interests</a>
#if $interface.docstring: | <a href="#description">Description</a>
#if $interface.methods: | <a href="#methods">Methods</a>
#if $interface.signals: | <a href="#signals">Signals</a>
@@ -27,6 +28,14 @@
#if $interface.methods or $interface.signals or $interface.properties or $interface.types or $interface.tpproperties
<div class="summary">
<a name="summary"></a>
+ #if $interface.client_interests
+ <h3>Client Interests</h3>
+ <table class="summary">
+ #for $interest in $interface.client_interests
+ <td><a href="$interest.get_url()">$interest.name</a></td>
+ #end for
+ </table>
+ #end if
#if $interface.methods
<h3>Methods</h3>
<table class="summary">
@@ -194,6 +203,27 @@
$interface.get_docstring()
#end if
+ #if $interface.client_interests
+ <div class="outset client-interests client-interest">
+ <a name="client-interests"></a>
+ <h1>Client Interests</h1>
+ <div>
+ Set using the
+ <a href="Connection.html#org.freedesktop.Telepathy.Connection.AddClientInterest">AddClientInterest</a> and
+ <a href="Connection.html#org.freedesktop.Telepathy.Connection.RemoveClientInterest">RemoveClientInterest</a> methods.
+ </div>
+ #for $interest in $interface.client_interests
+ <div class="inset client-interest">
+ <a name="$interest.name"></a>
+ <span class="permalink">(<a href="$interest.get_url()">Permalink</a>)</span>
+ <h2>$interest.name</h2>
+
+ $interest.get_docstring()
+ </div>
+ #end for
+ </div>
+ #end if
+
#if $interface.methods
<div class="outset methods method">
<a name="methods"></a>
diff --git a/doc/templates/style.css b/doc/templates/style.css
index 16d9f382..bca3d8da 100644
--- a/doc/templates/style.css
+++ b/doc/templates/style.css
@@ -120,6 +120,14 @@ div.handler-capability-token {
border: 1px solid #228822;
}
+div.client-interests {
+ background-color: #729fcf;
+}
+
+div.client-interest {
+ border: 1px solid #204a87;
+}
+
div.types {
background-color: #e9b96e;
}
diff --git a/tools/specparser.py b/tools/specparser.py
index 828075d3..b07a55ef 100644
--- a/tools/specparser.py
+++ b/tools/specparser.py
@@ -699,6 +699,9 @@ class Interface(Base):
self.contact_attributes = build_list(self, ContactAttribute, self.name,
dom.getElementsByTagNameNS(XMLNS_TP, 'contact-attribute'))
+ self.client_interests = build_list(self, ClientInterest, self.name,
+ dom.getElementsByTagNameNS(XMLNS_TP, 'client-interest'))
+
# build a list of types in this interface
self.types = parse_types(self, dom, self.name)
@@ -760,6 +763,7 @@ WARNING: Interface not known: '%s'
(XMLNS_TP, 'handler-capability-token'),
(XMLNS_TP, 'hct'),
(XMLNS_TP, 'contact-attribute'),
+ (XMLNS_TP, 'client-interest'),
(XMLNS_TP, 'simple-type'),
(XMLNS_TP, 'enum'),
(XMLNS_TP, 'flags'),
@@ -1062,6 +1066,19 @@ class HandlerCapabilityToken(TokenBase):
assert is_family in ('yes', 'no', '')
self.is_family = (is_family == 'yes')
+class ClientInterest(Base):
+
+ def __init__(self, parent, namespace, dom):
+ super(ClientInterest, self).__init__(parent, namespace, dom)
+
+ self.short_name = self.name
+
+ def get_type_name(self):
+ return 'Client Interest'
+
+ def validate(self):
+ pass
+
class SectionBase(object):
"""A SectionBase is an abstract base class for any type of node that can
contain a <tp:section>, which means the top-level Spec object, or any
@@ -1153,18 +1170,12 @@ class Spec(SectionBase):
for interface in self.interfaces:
self.everything[interface.name] = interface
- for method in interface.methods:
- self.everything[method.name] = method
- for signal in interface.signals:
- self.everything[signal.name] = signal
- for property in interface.properties:
- self.everything[property.name] = property
- for property in interface.tpproperties:
- self.everything[property.name] = property
- for token in interface.contact_attributes:
- self.everything[token.name] = token
- for token in interface.handler_capability_tokens:
- self.everything[token.name] = token
+ for things in [ 'methods', 'signals', 'properties',
+ 'tpproperties', 'contact_attributes',
+ 'handler_capability_tokens',
+ 'client_interests' ]:
+ for thing in getattr(interface, things):
+ self.everything[thing.name] = thing
for type in interface.types:
self.types[type.name] = type