aboutsummaryrefslogtreecommitdiffstats
path: root/build-aux/qmi-codegen/Message.py
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-07-23 12:19:04 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-07-23 12:20:25 +0200
commit75f3c85b100e4565dab08c3f8d58defa42f75e2c (patch)
tree764af3c3685d6641c8f4fc5378fea2945ac7931e /build-aux/qmi-codegen/Message.py
parenta6bee847c72a643aa4e6fcc7ee218fbb863b5cf4 (diff)
downloadexternal_libqmi-75f3c85b100e4565dab08c3f8d58defa42f75e2c.zip
external_libqmi-75f3c85b100e4565dab08c3f8d58defa42f75e2c.tar.gz
external_libqmi-75f3c85b100e4565dab08c3f8d58defa42f75e2c.tar.bz2
qmi-codegen: support a new 'version' tag in the messages
If the 'version' tag is given in the messages and the `QmiDevice' is opened with a explicit version info check, we will return an error if we're trying to send a message which was introduced in a newer version of a service we support.
Diffstat (limited to 'build-aux/qmi-codegen/Message.py')
-rw-r--r--build-aux/qmi-codegen/Message.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/build-aux/qmi-codegen/Message.py b/build-aux/qmi-codegen/Message.py
index 3f74c70..199b57d 100644
--- a/build-aux/qmi-codegen/Message.py
+++ b/build-aux/qmi-codegen/Message.py
@@ -42,6 +42,8 @@ class Message:
self.id = dictionary['id']
# The type, which must always be 'Message'
self.type = dictionary['type']
+ # The version info, optional
+ self.version_info = dictionary['version'].split('.') if 'version' in dictionary else []
# Create the composed full name (prefix + service + name),
# e.g. "Qmi Message Ctl Something Output Result"