[Telepathy-commits] [telepathy-spec/master] specparser: add support for old-style Telepathy Properties

Simon McVittie simon.mcvittie at collabora.co.uk
Fri Mar 20 09:34:29 PDT 2009


These aren't quite deprecated, but they're close.
---
 tools/specparser.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/tools/specparser.py b/tools/specparser.py
index 6b2dd9a..c391363 100644
--- a/tools/specparser.py
+++ b/tools/specparser.py
@@ -328,6 +328,9 @@ class Property(Typed):
         elif self.access & self.ACCESS_WRITE:
             return 'Write only'
 
+class AwkwardTelepathyProperty(Typed):
+    pass
+
 class Arg(Typed):
     DIRECTION_IN, DIRECTION_OUT, DIRECTION_UNSPECIFIED = range(3)
 
@@ -395,6 +398,9 @@ class Interface(Base):
         # build a list of signals in this interface
         self.signals = build_list(self, Signal, self.name,
                                   dom.getElementsByTagName('signal'))
+        # build a list of old-style Telepathy Properties in this interface
+        self.tpproperties = build_list(self, AwkwardTelepathyProperty,
+                self.name, dom.getElementsByTagNameNS(XMLNS_TP, 'property'))
 
         # build a list of types in this interface
         self.types = parse_types(self, dom, self.name)
@@ -646,6 +652,8 @@ class Spec(object):
                     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 type in interface.types:
                     self.types[type.short_name] = type
-- 
1.5.6.5




More information about the telepathy-commits mailing list