diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-07-03 15:15:14 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-07-03 16:08:58 +0200 |
commit | dc694482f6bd9a420c22d777540ac8f4ab6113e4 (patch) | |
tree | 75d6cc18825a67258e8673fd86f05399aa888866 /build-aux | |
parent | 43440015a81b1be1a3dbc1ab2e6edaf3f4cf95c5 (diff) | |
download | external_libqmi-dc694482f6bd9a420c22d777540ac8f4ab6113e4.zip external_libqmi-dc694482f6bd9a420c22d777540ac8f4ab6113e4.tar.gz external_libqmi-dc694482f6bd9a420c22d777540ac8f4ab6113e4.tar.bz2 |
qmi-codegen: don't generate enums for the TLV ids
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/qmi-codegen/Container.py | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/build-aux/qmi-codegen/Container.py b/build-aux/qmi-codegen/Container.py index 2019b25..aa7a5e7 100644 --- a/build-aux/qmi-codegen/Container.py +++ b/build-aux/qmi-codegen/Container.py @@ -100,37 +100,14 @@ class Container: if self.fields is None: return - translations = { 'enum_type' : utils.build_camelcase_name (self.fullname + ' TLV') } - template = ( - '\n' - '/**\n' - ' * ${enum_type}:\n') - f.write(string.Template(template).substitute(translations)) - + f.write('\n') for tlv in self.fields: - translations['enum_name'] = tlv.id_enum_name - translations['enum_value'] = tlv.id + translations = { 'enum_name' : tlv.id_enum_name, + 'enum_value' : tlv.id } template = ( - ' * @${enum_name}: TODO,\n') + '#define ${enum_name} ${enum_value}\n') f.write(string.Template(template).substitute(translations)) - template = ( - ' * TODO: comment enum\n' - ' */\n' - 'typedef enum {\n') - f.write(string.Template(template).substitute(translations)) - - for tlv in self.fields: - translations['enum_name'] = tlv.id_enum_name - translations['enum_value'] = tlv.id - template = ( - ' ${enum_name} = ${enum_value},\n') - f.write(string.Template(template).substitute(translations)) - - template = ( - '} ${enum_type};\n') - f.write(string.Template(template).substitute(translations)) - """ Emit new container types |