summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2010-10-07 13:57:31 +0100
committerJonny Lamb <jonny.lamb@collabora.co.uk>2010-10-07 13:57:31 +0100
commitc5d2ffe43655e66a88573a0b317e6ec47550201b (patch)
treefff496f3f2d4b1f0ab5eae0297d7ce48552e4448 /tools
parent951442dd1cd26d3bfcecec451fcf06ac38704859 (diff)
specparser: add tp:immutable and tp:requestable attributes
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/specparser.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/specparser.py b/tools/specparser.py
index b8d45388..29b03345 100644
--- a/tools/specparser.py
+++ b/tools/specparser.py
@@ -532,6 +532,12 @@ class Property(DBusConstruct, Typed):
is_cp = dom.getAttributeNS(XMLNS_TP, 'is-connection-parameter')
self.is_connection_parameter = is_cp != ''
+ immutable = dom.getAttributeNS(XMLNS_TP, 'immutable')
+ self.immutable = immutable != ''
+
+ requestable = dom.getAttributeNS(XMLNS_TP, 'requestable')
+ self.requestable = requestable != ''
+
def get_access(self):
if self.access & self.ACCESS_READ and self.access & self.ACCESS_WRITE:
return 'Read/Write'
@@ -540,6 +546,16 @@ class Property(DBusConstruct, Typed):
elif self.access & self.ACCESS_WRITE:
return 'Write only'
+ def get_flag_summary(self):
+ descriptions = []
+
+ if self.immutable:
+ descriptions.append("Immutable")
+ if self.requestable:
+ descriptions.append("Requestable")
+
+ return ', '.join(descriptions)
+
class AwkwardTelepathyProperty(Typed):
def get_type_name(self):
return 'Telepathy Property'