aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-05-19 12:34:44 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-07-03 16:08:54 +0200
commitfe3d7e34ccc5ee6defcf4f32177e57832ee359d4 (patch)
tree8bc386c9f351fcfd642fadd3b834aa5fd300206a
parent16f5dc0e8e777ed3a76436f1bac35ef91ed11403 (diff)
downloadexternal_libqmi-fe3d7e34ccc5ee6defcf4f32177e57832ee359d4.zip
external_libqmi-fe3d7e34ccc5ee6defcf4f32177e57832ee359d4.tar.gz
external_libqmi-fe3d7e34ccc5ee6defcf4f32177e57832ee359d4.tar.bz2
data: let the `Result' TLV be a common type
-rw-r--r--data/qmi-common.json12
-rw-r--r--data/qmi-service-ctl.json51
-rw-r--r--src/Makefile.am1
3 files changed, 21 insertions, 43 deletions
diff --git a/data/qmi-common.json b/data/qmi-common.json
new file mode 100644
index 0000000..6087534
--- /dev/null
+++ b/data/qmi-common.json
@@ -0,0 +1,12 @@
+[
+
+ { "name" : "Result",
+ "id" : "0x02",
+ "mandatory" : "yes",
+ "type" : "TLV",
+ "format" : "struct",
+ "contents" : [ { "name" : "Error Status",
+ "type" : "guint16" },
+ { "name" : "Error Code",
+ "type" : "guint16" } ] }
+]
diff --git a/data/qmi-service-ctl.json b/data/qmi-service-ctl.json
index a1ee85c..0bf182d 100644
--- a/data/qmi-service-ctl.json
+++ b/data/qmi-service-ctl.json
@@ -10,17 +10,8 @@
"type" : "Message",
"service" : "CTL",
"id" : "0x0021",
- "output" : [
- { "name" : "Result",
- "id" : "0x02",
- "mandatory" : "yes",
- "type" : "TLV",
- "format" : "struct",
- "contents" : [ { "name" : "Error Status",
- "type" : "guint16" },
- { "name" : "Error Code",
- "type" : "guint16" } ] },
-
+ "output" : [ { "name" : "Result",
+ "type" : "common-TLV" },
{ "name" : "Service list",
"id" : "0x01",
"mandatory" : "yes",
@@ -47,17 +38,8 @@
"mandatory" : "yes",
"type" : "TLV",
"format" : "guint8" } ],
- "output" : [
- { "name" : "Result",
- "id" : "0x02",
- "mandatory" : "yes",
- "type" : "TLV",
- "format" : "struct",
- "contents" : [ { "name" : "Error Status",
- "type" : "guint16" },
- { "name" : "Error Code",
- "type" : "guint16" } ] },
-
+ "output" : [ { "name" : "Result",
+ "type" : "common-TLV" },
{ "name" : "Allocation Info",
"id" : "0x01",
"mandatory" : "yes",
@@ -84,17 +66,8 @@
"type" : "guint8" },
{ "name" : "Cid",
"type" : "guint8" } ] } ],
- "output" : [
- { "name" : "Result",
- "id" : "0x02",
- "mandatory" : "yes",
- "type" : "TLV",
- "format" : "struct",
- "contents" : [ { "name" : "Error Status",
- "type" : "guint16" },
- { "name" : "Error Code",
- "type" : "guint16" } ] },
-
+ "output" : [ { "name" : "Result",
+ "type" : "common-TLV" },
{ "name" : "Release Info",
"id" : "0x01",
"mandatory" : "yes",
@@ -112,14 +85,6 @@
"type" : "Message",
"service" : "CTL",
"id" : "0x0027",
- "output" : [
- { "name" : "Result",
- "id" : "0x02",
- "mandatory" : "yes",
- "type" : "TLV",
- "format" : "struct",
- "contents" : [ { "name" : "Error Status",
- "type" : "guint16" },
- { "name" : "Error Code",
- "type" : "guint16" } ] } ] }
+ "output" : [ { "name" : "Result",
+ "type" : "common-TLV" } ] }
]
diff --git a/src/Makefile.am b/src/Makefile.am
index e3d4ae7..6b33e23 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -41,6 +41,7 @@ qmi-enum-types.c: $(ENUMS) qmi-enum-types.h $(top_srcdir)/build-aux/templates/qm
qmi-ctl.stamp: $(top_srcdir)/data/qmi-service-ctl.json $(top_srcdir)/build-aux/qmi-codegen/*.py $(top_srcdir)/build-aux/qmi-codegen/qmi-codegen
$(AM_V_GEN) $(top_srcdir)/build-aux/qmi-codegen/qmi-codegen \
--input $(top_srcdir)/data/qmi-service-ctl.json \
+ --include $(top_srcdir)/data/qmi-common.json \
--output qmi-ctl && \
touch $@