[Telepathy-commits] [telepathy-spec/master] Support tp:causes-havoc on interface
Davyd Madeley
davyd at madeley.id.au
Mon Mar 23 12:29:23 PDT 2009
---
doc/spec/style.css | 6 ++++--
doc/templates/interface.html | 7 +++++++
tools/specparser.py | 4 ++++
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/doc/spec/style.css b/doc/spec/style.css
index 1198398..8fed44d 100644
--- a/doc/spec/style.css
+++ b/doc/spec/style.css
@@ -99,13 +99,15 @@ div.added span.version {
font-weight: bold;
}
-div.deprecated {
+div.deprecated,
+div.havoc {
border-left: 2px solid #a40000;
margin: 1ex;
padding-left: 1ex;
}
-div.deprecated span.version {
+div.deprecated span.version,
+span.warning {
color: #a40000;
font-weight: bold;
}
diff --git a/doc/templates/interface.html b/doc/templates/interface.html
index d8491a3..ee95243 100644
--- a/doc/templates/interface.html
+++ b/doc/templates/interface.html
@@ -15,6 +15,13 @@
#if $interface.types: | <a href="#types">Types</a>
</div>
<div class="main">
+ #if $interface.causes_havoc
+ <div class="havoc"><span class="warning">WARNING:</span>
+ This interface is $interface.causes_havoc and is likely to cause havoc
+ to your API/ABI if bindings are generated. Do not include this interface
+ in libraries that care about compatibility.
+ </div>
+ #end if
$interface.get_added_html()
$interface.get_deprecated_html()
$interface.get_docstring()
diff --git a/tools/specparser.py b/tools/specparser.py
index c2fc7d7..5de525a 100644
--- a/tools/specparser.py
+++ b/tools/specparser.py
@@ -294,6 +294,10 @@ class Interface (base):
# build a list of types in this interface
self.types = parse_types (self, dom)
+ # find out if this interface causes havoc
+ self.causes_havoc = dom.getAttributeNS (XMLNS_TP, 'causes-havoc')
+ if self.causes_havoc == '': self.causes_havoc = None
+
def get_interface (self):
return self
--
1.5.6.5
More information about the telepathy-commits
mailing list