data: let the `Result' TLV be a common type

This commit is contained in:
Aleksander Morgado 2012-05-19 12:34:44 +02:00
parent 16f5dc0e8e
commit fe3d7e34cc
3 changed files with 21 additions and 43 deletions

12
data/qmi-common.json Normal file
View File

@ -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" } ] }
]

View File

@ -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" } ] }
]

View File

@ -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 $@