summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-01-25 15:58:42 +0100
committerAleksander Morgado <aleksander@lanedo.com>2013-02-02 17:13:28 +0100
commit18998e9eec9ed8f471e61291f8a2e65355b8c81a (patch)
tree563a69b60e920247326f0b159ce082ac7c13f5c1 /build-aux
parent4d79d1f017b6e554e82a9de01ebe939a74b4468d (diff)
downloadlibmbim-18998e9eec9ed8f471e61291f8a2e65355b8c81a.tar.gz
libmbim-glib: implement 'uuid' type reading
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/mbim-codegen/Container.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/build-aux/mbim-codegen/Container.py b/build-aux/mbim-codegen/Container.py
index d1c47a8..7410528 100644
--- a/build-aux/mbim-codegen/Container.py
+++ b/build-aux/mbim-codegen/Container.py
@@ -86,7 +86,11 @@ class Container:
'static' : 'static ' if 'visibility' in field and field['visibility'] == 'private' else '',
'message_type_enum' : self.message_type_enum }
- if field['format'] == 'guint32':
+ if field['format'] == 'uuid':
+ translations['public_format'] = 'const MbimUuid *'
+ translations['format_description'] = 'a #MbimUuid. Do not free the returned value.'
+ translations['error_return'] = 'NULL';
+ elif field['format'] == 'guint32':
if 'public-format' in field:
translations['public_format'] = field['public-format']
else:
@@ -193,7 +197,9 @@ class Container:
cfile.write(string.Template(template).substitute(translations))
# Update offset
- if field['format'] == 'guint32':
+ if field['format'] == 'uuid':
+ offset += 16
+ elif field['format'] == 'guint32':
offset += 4
elif field['format'] == 'string':
offset += 8