pds: setup generation of the PDS service support
Including "PDS Reset".
This commit is contained in:
parent
1f2c21aba1
commit
3d26f41300
|
@ -54,6 +54,8 @@ libqmi-glib/qmi-nas.h
|
|||
libqmi-glib/qmi-nas.c
|
||||
libqmi-glib/qmi-wms.h
|
||||
libqmi-glib/qmi-wms.c
|
||||
libqmi-glib/qmi-pds.h
|
||||
libqmi-glib/qmi-pds.c
|
||||
libqmi-glib/*.stamp
|
||||
|
||||
libqmi-glib/test/.libs
|
||||
|
|
|
@ -74,8 +74,8 @@ def add_header_start(f, output_name, service):
|
|||
if service != 'CTL':
|
||||
template += (
|
||||
"#include \"qmi-enums-${service}.h\"\n")
|
||||
# CTL, WDS and WMS don't have flags64
|
||||
if service != 'CTL' and service != 'WDS' and service != 'WMS':
|
||||
# CTL, WDS, WMS and PDS don't have flags64
|
||||
if service != 'CTL' and service != 'WDS' and service != 'WMS' and service != 'PDS':
|
||||
template += (
|
||||
"#include \"qmi-flags64-${service}.h\"\n")
|
||||
template += (
|
||||
|
|
|
@ -6,4 +6,5 @@ EXTRA_DIST = \
|
|||
qmi-service-dms.json \
|
||||
qmi-service-wds.json \
|
||||
qmi-service-nas.json \
|
||||
qmi-service-wms.json
|
||||
qmi-service-wms.json \
|
||||
qmi-service-pds.json
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
[
|
||||
// *********************************************************************************
|
||||
{ "name" : "PDS",
|
||||
"type" : "Service" },
|
||||
|
||||
// *********************************************************************************
|
||||
{ "name" : "QMI Client PDS",
|
||||
"type" : "Client" },
|
||||
|
||||
// *********************************************************************************
|
||||
{ "name" : "QMI Message PDS",
|
||||
"type" : "Message-ID-Enum" },
|
||||
|
||||
// *********************************************************************************
|
||||
{ "name" : "Reset",
|
||||
"type" : "Message",
|
||||
"service" : "PDS",
|
||||
"id" : "0x0000",
|
||||
"version" : "1.0",
|
||||
"output" : [ { "common-ref" : "Operation Result" } ] }
|
||||
|
||||
]
|
|
@ -81,6 +81,12 @@
|
|||
<xi:include href="xml/qmi-enums-wms.xml"/>
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Position Determination Service (PDS)</title>
|
||||
<xi:include href="xml/qmi-pds.xml"/>
|
||||
<xi:include href="xml/qmi-enums-pds.xml"/>
|
||||
</chapter>
|
||||
|
||||
<chapter id="object-tree">
|
||||
<title>Object Hierarchy</title>
|
||||
<xi:include href="xml/tree_index.sgml"/>
|
||||
|
|
|
@ -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 qmi-enums-wms.h
|
||||
ENUMS = qmi-enums.h qmi-enums-wds.h qmi-enums-dms.h qmi-enums-nas.h qmi-enums-wms.h qmi-enums-pds.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#include \"qmi-enums-wms.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#include \"qmi-enums-pds.h\"\n" \
|
||||
--template $(top_srcdir)/build-aux/templates/qmi-enum-types-template.h \
|
||||
--ftail "#endif /* __LIBQMI_GLIB_ENUM_TYPES_H__ */\n" \
|
||||
$(ENUMS) > $@
|
||||
|
@ -115,10 +115,21 @@ qmi-wms.stamp: $(top_srcdir)/data/qmi-service-wms.json $(top_srcdir)/build-aux/q
|
|||
--output qmi-wms && \
|
||||
touch $@
|
||||
|
||||
# PDS service
|
||||
qmi-pds.stamp: $(top_srcdir)/data/qmi-service-pds.json $(top_srcdir)/build-aux/qmi-codegen/*.py $(top_srcdir)/build-aux/qmi-codegen/qmi-codegen
|
||||
$(AM_V_GEN) \
|
||||
rm -f qmi-pds.h && \
|
||||
rm -f qmi-pds.c && \
|
||||
$(top_srcdir)/build-aux/qmi-codegen/qmi-codegen \
|
||||
--input $(top_srcdir)/data/qmi-service-pds.json \
|
||||
--include $(top_srcdir)/data/qmi-common.json \
|
||||
--output qmi-pds && \
|
||||
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-wms.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-pds.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-wms.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-pds.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
|
||||
|
@ -130,6 +141,8 @@ 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
|
||||
qmi-pds.h: qmi-pds.stamp qmi-enums-pds.h
|
||||
qmi-pds.c: qmi-error-types.h qmi-enum-types.h qmi-pds.h
|
||||
|
||||
libqmi_glib_la_SOURCES = \
|
||||
libqmi-glib.h \
|
||||
|
@ -138,6 +151,7 @@ libqmi_glib_la_SOURCES = \
|
|||
qmi-enums-dms.h \
|
||||
qmi-enums-nas.h \
|
||||
qmi-enums-wms.h \
|
||||
qmi-enums-pds.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 \
|
||||
|
@ -149,7 +163,8 @@ nodist_libqmi_glib_la_SOURCES = \
|
|||
qmi-dms.c qmi-dms.h \
|
||||
qmi-wds.c qmi-wds.h \
|
||||
qmi-nas.c qmi-nas.h \
|
||||
qmi-wms.c qmi-wms.h
|
||||
qmi-wms.c qmi-wms.h \
|
||||
qmi-pds.c qmi-pds.h
|
||||
|
||||
libqmi_glib_la_LIBADD = \
|
||||
$(LIBQMI_GLIB_LIBS)
|
||||
|
@ -166,11 +181,13 @@ include_HEADERS = \
|
|||
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-wms.h qmi-wms.h
|
||||
qmi-enums-wms.h qmi-wms.h \
|
||||
qmi-enums-pds.h qmi-pds.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-wms.h qmi-wms.c qmi-wms.stamp
|
||||
qmi-wms.h qmi-wms.c qmi-wms.stamp \
|
||||
qmi-pds.h qmi-pds.c qmi-pds.stamp
|
||||
|
|
|
@ -33,5 +33,6 @@
|
|||
#include "qmi-wds.h"
|
||||
#include "qmi-nas.h"
|
||||
#include "qmi-wms.h"
|
||||
#include "qmi-pds.h"
|
||||
|
||||
#endif /* _LIBQMI_GLIB_H_ */
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "qmi-wds.h"
|
||||
#include "qmi-nas.h"
|
||||
#include "qmi-wms.h"
|
||||
#include "qmi-pds.h"
|
||||
#include "qmi-utils.h"
|
||||
#include "qmi-error-types.h"
|
||||
#include "qmi-enum-types.h"
|
||||
|
@ -700,6 +701,10 @@ qmi_device_allocate_client (QmiDevice *self,
|
|||
ctx->client_type = QMI_TYPE_CLIENT_WMS;
|
||||
break;
|
||||
|
||||
case QMI_SERVICE_PDS:
|
||||
ctx->client_type = QMI_TYPE_CLIENT_PDS;
|
||||
break;
|
||||
|
||||
default:
|
||||
g_simple_async_result_set_error (ctx->result,
|
||||
QMI_CORE_ERROR,
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
/* -*- 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_PDS_H_
|
||||
#define _LIBQMI_GLIB_QMI_ENUMS_PDS_H_
|
||||
|
||||
|
||||
#endif /* _LIBQMI_GLIB_QMI_ENUMS_PDS_H_ */
|
|
@ -43,6 +43,7 @@
|
|||
#include "qmi-wds.h"
|
||||
#include "qmi-nas.h"
|
||||
#include "qmi-wms.h"
|
||||
#include "qmi-pds.h"
|
||||
|
||||
#define PACKED __attribute__((packed))
|
||||
|
||||
|
@ -702,6 +703,9 @@ qmi_message_get_printable (QmiMessage *self,
|
|||
case QMI_SERVICE_WMS:
|
||||
contents = qmi_message_wms_get_printable (self, line_prefix);
|
||||
break;
|
||||
case QMI_SERVICE_PDS:
|
||||
contents = qmi_message_pds_get_printable (self, line_prefix);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -738,6 +742,9 @@ qmi_message_get_version_introduced (QmiMessage *self,
|
|||
case QMI_SERVICE_WMS:
|
||||
return qmi_message_wms_get_version_introduced (self, major, minor);
|
||||
|
||||
case QMI_SERVICE_PDS:
|
||||
return qmi_message_pds_get_version_introduced (self, major, minor);
|
||||
|
||||
default:
|
||||
/* For the still unsupported services, cannot do anything */
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in New Issue