aboutsummaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-02-10 00:18:16 +0100
committerAleksander Morgado <aleksander@aleksander.es>2017-02-10 18:57:05 +0100
commit307de425d5390e6d8e5673a127035670eb73470f (patch)
tree256d0223d30469603774d27eab2338c1620d4346 /build-aux
parent5c3113f099a3c637820f6d6e35a314f1f179bb46 (diff)
data: specify 'since' tags for all messages and TLVs
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/qmi-codegen/Field.py2
-rw-r--r--build-aux/qmi-codegen/FieldResult.py2
-rw-r--r--build-aux/qmi-codegen/Variable.py2
-rw-r--r--build-aux/qmi-codegen/VariableArray.py4
-rw-r--r--build-aux/qmi-codegen/VariableSequence.py4
-rw-r--r--build-aux/qmi-codegen/VariableStruct.py9
6 files changed, 13 insertions, 10 deletions
diff --git a/build-aux/qmi-codegen/Field.py b/build-aux/qmi-codegen/Field.py
index 0f73b06..3c57fb5 100644
--- a/build-aux/qmi-codegen/Field.py
+++ b/build-aux/qmi-codegen/Field.py
@@ -92,7 +92,7 @@ class Field:
def emit_types(self, hfile, cfile):
if TypeFactory.is_type_emitted(self.fullname) is False:
TypeFactory.set_type_emitted(self.fullname)
- self.variable.emit_types(hfile)
+ self.variable.emit_types(hfile, self.since)
self.variable.emit_helper_methods(hfile, cfile)
diff --git a/build-aux/qmi-codegen/FieldResult.py b/build-aux/qmi-codegen/FieldResult.py
index 9b39e82..4247151 100644
--- a/build-aux/qmi-codegen/FieldResult.py
+++ b/build-aux/qmi-codegen/FieldResult.py
@@ -37,7 +37,7 @@ class FieldResult(Field):
def emit_types(self, hfile, cfile):
if TypeFactory.is_type_emitted(self.fullname) is False:
TypeFactory.set_type_emitted(self.fullname)
- self.variable.emit_types(cfile)
+ self.variable.emit_types(cfile, self.since)
"""
diff --git a/build-aux/qmi-codegen/Variable.py b/build-aux/qmi-codegen/Variable.py
index 2a8d2e7..42ed1a7 100644
--- a/build-aux/qmi-codegen/Variable.py
+++ b/build-aux/qmi-codegen/Variable.py
@@ -68,7 +68,7 @@ class Variable:
"""
Emits the code to declare specific new types required by the variable.
"""
- def emit_types(self, f):
+ def emit_types(self, f, since):
pass
diff --git a/build-aux/qmi-codegen/VariableArray.py b/build-aux/qmi-codegen/VariableArray.py
index 7f677f8..fcf8cd7 100644
--- a/build-aux/qmi-codegen/VariableArray.py
+++ b/build-aux/qmi-codegen/VariableArray.py
@@ -83,8 +83,8 @@ class VariableArray(Variable):
"""
Emit the type for the array element
"""
- def emit_types(self, f):
- self.array_element.emit_types(f)
+ def emit_types(self, f, since):
+ self.array_element.emit_types(f, since)
"""
diff --git a/build-aux/qmi-codegen/VariableSequence.py b/build-aux/qmi-codegen/VariableSequence.py
index b762133..5dce938 100644
--- a/build-aux/qmi-codegen/VariableSequence.py
+++ b/build-aux/qmi-codegen/VariableSequence.py
@@ -56,10 +56,10 @@ class VariableSequence(Variable):
"""
Emit all types for the members of the sequence
"""
- def emit_types(self, f):
+ def emit_types(self, f, since):
# Emit types for each member
for member in self.members:
- member['object'].emit_types(f)
+ member['object'].emit_types(f, since)
"""
diff --git a/build-aux/qmi-codegen/VariableStruct.py b/build-aux/qmi-codegen/VariableStruct.py
index 996c279..ec9355c 100644
--- a/build-aux/qmi-codegen/VariableStruct.py
+++ b/build-aux/qmi-codegen/VariableStruct.py
@@ -62,12 +62,13 @@ class VariableStruct(Variable):
"""
Emit all types for the members of the struct plus the new struct type itself
"""
- def emit_types(self, f):
+ def emit_types(self, f, since):
# Emit types for each member
for member in self.members:
- member['object'].emit_types(f)
+ member['object'].emit_types(f, since)
- translations = { 'format' : self.public_format }
+ translations = { 'format' : self.public_format,
+ 'since' : since }
template = (
'\n'
'/**\n'
@@ -79,6 +80,8 @@ class VariableStruct(Variable):
template = (
' *\n'
' * A ${format} struct.\n'
+ ' *\n'
+ ' * Since: ${since}\n'
' */\n'
'typedef struct _${format} {\n')
f.write(string.Template(template).substitute(translations))