wms: setup generation of the WMS service support

Including "WMS Reset".
This commit is contained in:
Aleksander Morgado 2012-09-03 13:04:25 +02:00
parent c9e0877226
commit 787b02287f
7 changed files with 80 additions and 10 deletions

2
.gitignore vendored
View File

@ -52,6 +52,8 @@ libqmi-glib/qmi-wds.h
libqmi-glib/qmi-wds.c
libqmi-glib/qmi-nas.h
libqmi-glib/qmi-nas.c
libqmi-glib/qmi-wms.h
libqmi-glib/qmi-wms.c
libqmi-glib/*.stamp
libqmi-glib/test/.libs

View File

@ -74,8 +74,8 @@ def add_header_start(f, output_name, service):
if service != 'CTL':
template += (
"#include \"qmi-enums-${service}.h\"\n")
# CTL and WDS don't have flags64
if service != 'CTL' and service != 'WDS':
# CTL, WDS and WMS don't have flags64
if service != 'CTL' and service != 'WDS' and service != 'WMS':
template += (
"#include \"qmi-flags64-${service}.h\"\n")
template += (

View File

@ -5,4 +5,5 @@ EXTRA_DIST = \
qmi-service-ctl.json \
qmi-service-dms.json \
qmi-service-wds.json \
qmi-service-nas.json
qmi-service-nas.json \
qmi-service-wms.json

23
data/qmi-service-wms.json Normal file
View File

@ -0,0 +1,23 @@
[
// *********************************************************************************
{ "name" : "WMS",
"type" : "Service" },
// *********************************************************************************
{ "name" : "QMI Client WMS",
"type" : "Client" },
// *********************************************************************************
{ "name" : "QMI Message WMS",
"type" : "Message-ID-Enum" },
// *********************************************************************************
{ "name" : "Reset",
"type" : "Message",
"service" : "WMS",
"id" : "0x0000",
"version" : "1.1",
"output" : [ { "common-ref" : "Operation Result" } ] }
]

View File

@ -31,10 +31,10 @@ qmi-error-quarks.c: qmi-errors.h qmi-error-types.h $(top_srcdir)/build-aux/templ
qmi-errors.h > $@
# Enum/Flag types
ENUMS = qmi-enums.h qmi-enums-wds.h qmi-enums-dms.h qmi-enums-nas.h
ENUMS = qmi-enums.h qmi-enums-wds.h qmi-enums-dms.h qmi-enums-nas.h qmi-enums-wms.h
qmi-enum-types.h: $(ENUMS) $(top_srcdir)/build-aux/templates/qmi-enum-types-template.h
$(AM_V_GEN) $(GLIB_MKENUMS) \
--fhead "#ifndef __LIBQMI_GLIB_ENUM_TYPES_H__\n#define __LIBQMI_GLIB_ENUM_TYPES_H__\n#include \"qmi-enums.h\"\n#include \"qmi-enums-wds.h\"\n#include \"qmi-enums-dms.h\"\n#include \"qmi-enums-nas.h\"\n" \
--fhead "#ifndef __LIBQMI_GLIB_ENUM_TYPES_H__\n#define __LIBQMI_GLIB_ENUM_TYPES_H__\n#include \"qmi-enums.h\"\n#include \"qmi-enums-wds.h\"\n#include \"qmi-enums-dms.h\"\n#include \"qmi-enums-nas.h\"\n#include \"qmi-enums-wms.h\"\n" \
--template $(top_srcdir)/build-aux/templates/qmi-enum-types-template.h \
--ftail "#endif /* __LIBQMI_GLIB_ENUM_TYPES_H__ */\n" \
$(ENUMS) > $@
@ -104,10 +104,21 @@ qmi-nas.stamp: $(top_srcdir)/data/qmi-service-nas.json $(top_srcdir)/build-aux/q
--output qmi-nas && \
touch $@
# WMS service
qmi-wms.stamp: $(top_srcdir)/data/qmi-service-wms.json $(top_srcdir)/build-aux/qmi-codegen/*.py $(top_srcdir)/build-aux/qmi-codegen/qmi-codegen
$(AM_V_GEN) \
rm -f qmi-wms.h && \
rm -f qmi-wms.c && \
$(top_srcdir)/build-aux/qmi-codegen/qmi-codegen \
--input $(top_srcdir)/data/qmi-service-wms.json \
--include $(top_srcdir)/data/qmi-common.json \
--output qmi-wms && \
touch $@
# Additional dependencies
qmi-device.c: qmi-error-types.h qmi-enum-types.h qmi-ctl.h qmi-dms.h qmi-wds.h qmi-nas.h
qmi-device.c: qmi-error-types.h qmi-enum-types.h qmi-ctl.h qmi-dms.h qmi-wds.h qmi-nas.h qmi-wms.h
qmi-client.c: qmi-error-types.h qmi-enum-types.h
qmi-message.c: qmi-error-types.h qmi-enum-types.h qmi-ctl.h qmi-dms.h qmi-wds.h qmi-nas.h
qmi-message.c: qmi-error-types.h qmi-enum-types.h qmi-ctl.h qmi-dms.h qmi-wds.h qmi-nas.h qmi-wms.h
qmi-ctl.h: qmi-ctl.stamp
qmi-ctl.c: qmi-error-types.h qmi-enum-types.h qmi-ctl.h
qmi-dms.h: qmi-dms.stamp qmi-enums-dms.h
@ -117,6 +128,8 @@ qmi-wds.c: qmi-error-types.h qmi-enum-types.h qmi-wds.h
qmi-enums-wds.c: qmi-enum-types.h qmi-enums-wds.h
qmi-nas.h: qmi-nas.stamp qmi-enums-nas.h
qmi-nas.c: qmi-error-types.h qmi-enum-types.h qmi-flags64-types.h qmi-nas.h
qmi-wms.h: qmi-wms.stamp qmi-enums-wms.h
qmi-wms.c: qmi-error-types.h qmi-enum-types.h qmi-wms.h
libqmi_glib_la_SOURCES = \
libqmi-glib.h \
@ -124,6 +137,7 @@ libqmi_glib_la_SOURCES = \
qmi-enums-wds.h qmi-enums-wds.c \
qmi-enums-dms.h \
qmi-enums-nas.h \
qmi-enums-wms.h \
qmi-enums.h qmi-enum-types.h qmi-enum-types.c qmi-flags64-types.h qmi-flags64-types.c \
qmi-utils.h qmi-utils.c \
qmi-message.h qmi-message.c \
@ -134,7 +148,8 @@ nodist_libqmi_glib_la_SOURCES = \
qmi-ctl.c qmi-ctl.h \
qmi-dms.c qmi-dms.h \
qmi-wds.c qmi-wds.h \
qmi-nas.c qmi-nas.h
qmi-nas.c qmi-nas.h \
qmi-wms.c qmi-wms.h
libqmi_glib_la_LIBADD = \
$(LIBQMI_GLIB_LIBS)
@ -150,10 +165,12 @@ include_HEADERS = \
qmi-ctl.h \
qmi-enums-dms.h qmi-flags64-dms.h qmi-dms.h \
qmi-enums-wds.h qmi-wds.h \
qmi-enums-nas.h qmi-flags64-nas.h qmi-nas.h
qmi-enums-nas.h qmi-flags64-nas.h qmi-nas.h \
qmi-enums-wms.h qmi-wms.h
CLEANFILES = \
qmi-ctl.h qmi-ctl.c qmi-ctl.stamp \
qmi-dms.h qmi-dms.c qmi-dms.stamp \
qmi-wds.h qmi-wds.c qmi-wds.stamp \
qmi-nas.h qmi-nas.c qmi-nas.stamp
qmi-nas.h qmi-nas.c qmi-nas.stamp \
qmi-wms.h qmi-wms.c qmi-wms.stamp

View File

@ -32,5 +32,6 @@
#include "qmi-dms.h"
#include "qmi-wds.h"
#include "qmi-nas.h"
#include "qmi-wms.h"
#endif /* _LIBQMI_GLIB_H_ */

View File

@ -0,0 +1,26 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* libqmi-glib -- GLib/GIO based library to control QMI devices
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2012 Google Inc.
*/
#ifndef _LIBQMI_GLIB_QMI_ENUMS_WMS_H_
#define _LIBQMI_GLIB_QMI_ENUMS_WMS_H_
#endif /* _LIBQMI_GLIB_QMI_ENUMS_WMS_H_ */