diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | data/qmi-service-nas.json | 23 | ||||
-rw-r--r-- | libqmi-glib/Makefile.am | 31 | ||||
-rw-r--r-- | libqmi-glib/libqmi-glib.h | 1 | ||||
-rw-r--r-- | libqmi-glib/qmi-device.c | 5 | ||||
-rw-r--r-- | libqmi-glib/qmi-enums-nas.h | 26 |
6 files changed, 81 insertions, 7 deletions
@@ -46,6 +46,8 @@ libqmi-glib/qmi-dms.h libqmi-glib/qmi-dms.c libqmi-glib/qmi-wds.h libqmi-glib/qmi-wds.c +libqmi-glib/qmi-nas.h +libqmi-glib/qmi-nas.c libqmi-glib/*.stamp libqmi-glib/test/.libs diff --git a/data/qmi-service-nas.json b/data/qmi-service-nas.json new file mode 100644 index 00000000..597c093e --- /dev/null +++ b/data/qmi-service-nas.json @@ -0,0 +1,23 @@ + +[ + // ********************************************************************************* + { "name" : "NAS", + "type" : "Service" }, + + // ********************************************************************************* + { "name" : "QMI Client NAS", + "type" : "Client" }, + + // ********************************************************************************* + { "name" : "QMI Message NAS", + "type" : "Message-ID-Enum" }, + + // ********************************************************************************* + { "name" : "Reset", + "type" : "Message", + "service" : "NAS", + "id" : "0x0000", + "version" : "1.0", + "output" : [ { "common-ref" : "Operation Result" } ] } + +] diff --git a/libqmi-glib/Makefile.am b/libqmi-glib/Makefile.am index 050cda5c..0b6093d3 100644 --- a/libqmi-glib/Makefile.am +++ b/libqmi-glib/Makefile.am @@ -25,10 +25,10 @@ qmi-error-types.c: qmi-errors.h qmi-error-types.h $(top_srcdir)/build-aux/templa qmi-errors.h > $@ # Enum types -ENUMS = qmi-enums.h qmi-enums-wds.h qmi-enums-dms.h qmi-dms.h qmi-wds.h qmi-ctl.h -qmi-enum-types.h: $(ENUMS) $(top_srcdir)/build-aux/templates/qmi-enum-types-template.h qmi-ctl.stamp qmi-dms.stamp qmi-wds.stamp +ENUMS = qmi-enums.h qmi-enums-wds.h qmi-enums-dms.h qmi-enums-nas.h qmi-dms.h qmi-wds.h qmi-nas.h qmi-ctl.h +qmi-enum-types.h: $(ENUMS) $(top_srcdir)/build-aux/templates/qmi-enum-types-template.h qmi-ctl.stamp qmi-dms.stamp qmi-wds.stamp qmi-nas.stamp $(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-ctl.h\"\n#include \"qmi-dms.h\"\n#include \"qmi-wds.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-ctl.h\"\n#include \"qmi-dms.h\"\n#include \"qmi-wds.h\"\n#include \"qmi-nas.h\"\n" \ --template $(top_srcdir)/build-aux/templates/qmi-enum-types-template.h \ --ftail "#endif /* __LIBQMI_GLIB_ENUM_TYPES_H__ */\n" \ $(ENUMS) > $@ @@ -72,22 +72,36 @@ qmi-wds.stamp: $(top_srcdir)/data/qmi-service-wds.json $(top_srcdir)/build-aux/q --output qmi-wds && \ touch $@ +# NAS service +qmi-nas.stamp: $(top_srcdir)/data/qmi-service-nas.json $(top_srcdir)/build-aux/qmi-codegen/*.py $(top_srcdir)/build-aux/qmi-codegen/qmi-codegen + $(AM_V_GEN) \ + rm -f qmi-nas.h && \ + rm -f qmi-nas.c && \ + $(top_srcdir)/build-aux/qmi-codegen/qmi-codegen \ + --input $(top_srcdir)/data/qmi-service-nas.json \ + --include $(top_srcdir)/data/qmi-common.json \ + --output qmi-nas && \ + touch $@ + # Additional dependencies qmi-device.c: qmi-error-types.h qmi-enum-types.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-message.c: qmi-error-types.h qmi-enum-types.h qmi-ctl.h qmi-dms.h qmi-wds.h qmi-nas.h qmi-ctl.h: qmi-ctl.stamp qmi-ctl.c: qmi-error-types.h qmi-enum-types.h qmi-ctl.stamp qmi-dms.h: qmi-dms.stamp qmi-dms.c: qmi-error-types.h qmi-enum-types.h qmi-dms.stamp qmi-wds.h: qmi-wds.stamp qmi-wds.c: qmi-error-types.h qmi-enum-types.h qmi-wds.stamp +qmi-nas.h: qmi-nas.stamp +qmi-nas.c: qmi-error-types.h qmi-enum-types.h qmi-nas.stamp libqmi_glib_la_SOURCES = \ libqmi-glib.h \ qmi-errors.h qmi-error-types.h qmi-error-types.c \ qmi-enums-wds.h \ qmi-enums-dms.h \ + qmi-enums-nas.h \ qmi-enums.h qmi-enum-types.h qmi-enum-types.c \ qmi-enum-types-static.h qmi-enum-types-static.c \ qmi-utils.h qmi-utils.c \ @@ -98,7 +112,8 @@ libqmi_glib_la_SOURCES = \ nodist_libqmi_glib_la_SOURCES = \ qmi-ctl.c qmi-ctl.h \ qmi-dms.c qmi-dms.h \ - qmi-wds.c qmi-wds.h + qmi-wds.c qmi-wds.h \ + qmi-nas.c qmi-nas.h libqmi_glib_la_LIBADD = \ $(LIBQMI_GLIB_LIBS) @@ -113,9 +128,11 @@ include_HEADERS = \ qmi-client.h \ qmi-ctl.h \ qmi-enums-dms.h qmi-dms.h \ - qmi-enums-wds.h qmi-wds.h + qmi-enums-wds.h qmi-wds.h \ + qmi-enums-nas.h qmi-nas.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-wds.h qmi-wds.c qmi-wds.stamp \ + qmi-nas.h qmi-nas.c qmi-nas.stamp diff --git a/libqmi-glib/libqmi-glib.h b/libqmi-glib/libqmi-glib.h index 5f4de17e..33f782ef 100644 --- a/libqmi-glib/libqmi-glib.h +++ b/libqmi-glib/libqmi-glib.h @@ -32,5 +32,6 @@ #include "qmi-client.h" #include "qmi-dms.h" #include "qmi-wds.h" +#include "qmi-nas.h" #endif /* _LIBQMI_GLIB_H_ */ diff --git a/libqmi-glib/qmi-device.c b/libqmi-glib/qmi-device.c index 4bd45c98..998ab2b6 100644 --- a/libqmi-glib/qmi-device.c +++ b/libqmi-glib/qmi-device.c @@ -32,6 +32,7 @@ #include "qmi-ctl.h" #include "qmi-dms.h" #include "qmi-wds.h" +#include "qmi-nas.h" #include "qmi-utils.h" #include "qmi-error-types.h" #include "qmi-enum-types.h" @@ -665,6 +666,10 @@ qmi_device_allocate_client (QmiDevice *self, ctx->client_type = QMI_TYPE_CLIENT_WDS; break; + case QMI_SERVICE_NAS: + ctx->client_type = QMI_TYPE_CLIENT_NAS; + break; + default: g_simple_async_result_set_error (ctx->result, QMI_CORE_ERROR, diff --git a/libqmi-glib/qmi-enums-nas.h b/libqmi-glib/qmi-enums-nas.h new file mode 100644 index 00000000..41f3f973 --- /dev/null +++ b/libqmi-glib/qmi-enums-nas.h @@ -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_NAS_H_ +#define _LIBQMI_GLIB_QMI_ENUMS_NAS_H_ + +#endif /* _LIBQMI_GLIB_QMI_ENUMS_NAS_H_ */ |