wda: new 'WDA' service

This commit is contained in:
Aleksander Morgado 2014-05-20 19:29:49 +02:00
parent 07ea29dc9c
commit d23de16803
10 changed files with 202 additions and 7 deletions

View File

@ -10,4 +10,5 @@ EXTRA_DIST = \
qmi-service-pds.json \
qmi-service-pbm.json \
qmi-service-uim.json \
qmi-service-oma.json
qmi-service-oma.json \
qmi-service-wda.json

69
data/qmi-service-wda.json Normal file
View File

@ -0,0 +1,69 @@
[
// *********************************************************************************
{ "name" : "WDA",
"type" : "Service" },
// *********************************************************************************
{ "name" : "QMI Client WDA",
"type" : "Client" },
// *********************************************************************************
{ "name" : "QMI Message WDA",
"type" : "Message-ID-Enum" },
// *********************************************************************************
{ "name" : "Get Data Format",
"type" : "Message",
"service" : "WDA",
"id" : "0x0021",
"version" : "1.0",
"output" : [ { "common-ref" : "Operation Result" },
{ "name" : "QoS Format",
"id" : "0x10",
"mandatory" : "no",
"type" : "TLV",
"format" : "guint8",
"public-format" : "gboolean",
"prerequisites": [ { "common-ref" : "Success" } ] },
{ "name" : "Link Layer Protocol",
"id" : "0x11",
"mandatory" : "no",
"type" : "TLV",
"format" : "guint32",
"public-format" : "QmiWdaLinkLayerProtocol",
"prerequisites" : [ { "common-ref" : "Success" } ] },
{ "name" : "Uplink Data Aggregation Protocol",
"id" : "0x12",
"mandatory" : "no",
"type" : "TLV",
"format" : "guint32",
"public-format" : "QmiWdaDataAggregationProtocol",
"prerequisites" : [ { "common-ref" : "Success" } ] },
{ "name" : "Downlink Data Aggregation Protocol",
"id" : "0x13",
"mandatory" : "no",
"type" : "TLV",
"format" : "guint32",
"public-format" : "QmiWdaDataAggregationProtocol",
"prerequisites" : [ { "common-ref" : "Success" } ] },
{ "name" : "NDP Signature",
"id" : "0x14",
"mandatory" : "no",
"type" : "TLV",
"format" : "guint32",
"prerequisites" : [ { "common-ref" : "Success" } ] },
{ "name" : "Uplink Data Aggregation Max Size",
"id" : "0x15",
"mandatory" : "no",
"type" : "TLV",
"format" : "guint32",
"prerequisites" : [ { "common-ref" : "Success" } ] },
{ "name" : "Downlink Data Aggregation Max Size",
"id" : "0x16",
"mandatory" : "no",
"type" : "TLV",
"format" : "guint32",
"prerequisites" : [ { "common-ref" : "Success" } ] } ] }
]

View File

@ -15,7 +15,8 @@ ALL_SECTIONS = \
$(top_builddir)/src/libqmi-glib/generated/qmi-pds.sections \
$(top_builddir)/src/libqmi-glib/generated/qmi-pbm.sections \
$(top_builddir)/src/libqmi-glib/generated/qmi-uim.sections \
$(top_builddir)/src/libqmi-glib/generated/qmi-oma.sections
$(top_builddir)/src/libqmi-glib/generated/qmi-oma.sections \
$(top_builddir)/src/libqmi-glib/generated/qmi-wda.sections
$(DOC_MODULE)-sections.mstamp: $(ALL_SECTIONS)
$(AM_V_GEN) \

View File

@ -770,6 +770,23 @@ qmi_oma_session_failed_reason_get_type
qmi_oma_hfa_feature_done_state_get_type
</SECTION>
<SECTION>
<FILE>qmi-enums-wda</FILE>
QmiWdaLinkLayerProtocol
QmiWdaDataAggregationProtocol
<SUBSECTION Methods>
qmi_wda_link_layer_protocol_get_string
qmi_wda_data_aggregation_protocol_get_string
<SUBSECTION Private>
qmi_wda_link_layer_protocol_build_string_from_mask
qmi_wda_data_aggregation_protocol_build_string_from_mask
<SUBSECTION Standard>
QMI_TYPE_WDA_LINK_LAYER_PROTOCOL
QMI_TYPE_WDA_DATA_AGGREGATION_PROTOCOL
qmi_wda_link_layer_protocol_get_type
qmi_wda_data_aggregation_protocol_get_type
</SECTION>
<SECTION>
<FILE>qmi-errors</FILE>
QmiCoreError

View File

@ -257,6 +257,16 @@
</section>
</chapter>
<chapter>
<title>Wireless Data Administrative Service (WDA)</title>
<xi:include href="xml/qmi-client-wda.xml"/>
<xi:include href="xml/qmi-enums-wda.xml"/>
<section>
<title>WDA Requests</title>
<xi:include href="xml/qmi-message-wda-get-data-format.xml"/>
</section>
</chapter>
<chapter id="object-tree">
<title>Object Hierarchy</title>
<xi:include href="xml/tree_index.sgml"/>

View File

@ -27,6 +27,7 @@ libqmi_glib_la_SOURCES = \
qmi-enums-pbm.h \
qmi-enums-uim.h \
qmi-enums-oma.h \
qmi-enums-wda.h \
qmi-enums.h qmi-enums-private.h \
qmi-utils.h qmi-utils.c \
qmi-message.h qmi-message.c \
@ -56,6 +57,7 @@ include_HEADERS = \
qmi-enums-pbm.h \
qmi-enums-uim.h \
qmi-enums-oma.h \
qmi-enums-wda.h \
qmi-utils.h \
qmi-message.h \
qmi-device.h \

View File

@ -14,7 +14,8 @@ GENERATED_H = \
qmi-pds.h \
qmi-pbm.h \
qmi-uim.h \
qmi-oma.h
qmi-oma.h \
qmi-wda.h
GENERATED_C = \
qmi-error-types.c \
@ -30,7 +31,8 @@ GENERATED_C = \
qmi-pds.c \
qmi-pbm.c \
qmi-uim.c \
qmi-oma.c
qmi-oma.c \
qmi-wda.c
GENERATED_SECTIONS = \
qmi-ctl.sections \
@ -41,7 +43,8 @@ GENERATED_SECTIONS = \
qmi-pds.sections \
qmi-pbm.sections \
qmi-uim.sections \
qmi-oma.sections
qmi-oma.sections \
qmi-wda.sections
# Error types
qmi-error-types.h: $(top_srcdir)/src/libqmi-glib/qmi-errors.h $(top_srcdir)/build-aux/templates/qmi-error-types-template.h
@ -74,10 +77,11 @@ ENUMS = \
$(top_srcdir)/src/libqmi-glib/qmi-enums-pbm.h \
$(top_srcdir)/src/libqmi-glib/qmi-enums-uim.h \
$(top_srcdir)/src/libqmi-glib/qmi-enums-oma.h \
$(top_srcdir)/src/libqmi-glib/qmi-enums-wda.h \
$(top_srcdir)/src/libqmi-glib/qmi-device.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#include \"qmi-enums-pds.h\"\n#include \"qmi-enums-pbm.h\"\n#include \"qmi-enums-uim.h\"\n#include \"qmi-enums-oma.h\"\n#include \"qmi-device.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#include \"qmi-enums-pbm.h\"\n#include \"qmi-enums-uim.h\"\n#include \"qmi-enums-oma.h\"\n#include \"qmi-enums-wda.h\"\n#include \"qmi-device.h\"\n" \
--template $(top_srcdir)/build-aux/templates/qmi-enum-types-template.h \
--ftail "#endif /* __LIBQMI_GLIB_ENUM_TYPES_H__ */\n" \
$(ENUMS) > $@
@ -209,6 +213,16 @@ qmi-oma.h qmi-oma.c qmi-oma.sections: $(top_srcdir)/data/qmi-service-oma.json $(
--include $(top_srcdir)/data/qmi-common.json \
--output qmi-oma
# WDA service
qmi-wda.h qmi-wda.c qmi-wda.sections: $(top_srcdir)/data/qmi-service-wda.json $(top_srcdir)/build-aux/qmi-codegen/*.py $(top_srcdir)/build-aux/qmi-codegen/qmi-codegen
$(AM_V_GEN) \
rm -f qmi-wda.h && \
rm -f qmi-wda.c && \
$(top_srcdir)/build-aux/qmi-codegen/qmi-codegen \
--input $(top_srcdir)/data/qmi-service-wda.json \
--include $(top_srcdir)/data/qmi-common.json \
--output qmi-wda
BUILT_SOURCES = $(GENERATED_H) $(GENERATED_C)
nodist_libqmi_glib_generated_la_SOURCES = \
@ -239,6 +253,7 @@ nodist_include_HEADERS = \
qmi-pds.h \
qmi-pbm.h \
qmi-uim.h \
qmi-oma.h
qmi-oma.h \
qmi-wda.h
CLEANFILES = $(GENERATED_H) $(GENERATED_C) $(GENERATED_SECTIONS)

View File

@ -62,6 +62,9 @@
#include "qmi-enums-oma.h"
#include "qmi-oma.h"
#include "qmi-enums-wda.h"
#include "qmi-wda.h"
/* generated */
#include "qmi-error-types.h"
#include "qmi-enum-types.h"

View File

@ -41,6 +41,7 @@
#include "qmi-pbm.h"
#include "qmi-uim.h"
#include "qmi-oma.h"
#include "qmi-wda.h"
#include "qmi-utils.h"
#include "qmi-error-types.h"
#include "qmi-enum-types.h"
@ -879,6 +880,10 @@ qmi_device_allocate_client (QmiDevice *self,
ctx->client_type = QMI_TYPE_CLIENT_OMA;
break;
case QMI_SERVICE_WDA:
ctx->client_type = QMI_TYPE_CLIENT_WDA;
break;
default:
g_simple_async_result_set_error (ctx->result,
QMI_CORE_ERROR,

View File

@ -0,0 +1,72 @@
/* -*- 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) 2014 Aleksander Morgado <aleksander@aleksander.es>
*/
#ifndef _LIBQMI_GLIB_QMI_ENUMS_WDA_H_
#define _LIBQMI_GLIB_QMI_ENUMS_WDA_H_
#if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION)
#error "Only <libqmi-glib.h> can be included directly."
#endif
/**
* SECTION: qmi-enums-wda
* @title: WDA enumerations and flags
*
* This section defines enumerations and flags used in the WDA service
* interface.
*/
/**
* QmiWdaLinkLayerProtocol:
* @QMI_WDA_LINK_LAYER_PROTOCOL_UNKNOWN: Unknown.
* @QMI_WDA_LINK_LAYER_PROTOCOL_802_3: 802.3 ethernet mode.
* @QMI_WDA_LINK_LAYER_PROTOCOL_IP: IP mode.
*
* Link layer protocol.
*/
typedef enum {
QMI_WDA_LINK_LAYER_PROTOCOL_UNKNOWN = 0x00,
QMI_WDA_LINK_LAYER_PROTOCOL_802_3 = 0x01,
QMI_WDA_LINK_LAYER_PROTOCOL_IP = 0x02,
} QmiWdaLinkLayerProtocol;
/**
* QmiWdaDataAggregationProtocol:
* @QMI_WDA_DATA_AGGREGATION_PROTOCOL_DISABLED: Disabled.
* @QMI_WDA_DATA_AGGREGATION_PROTOCOL_TLP: TLP enabled.
* @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QC_NCM: QC NCM enabled.
* @QMI_WDA_DATA_AGGREGATION_PROTOCOL_MBIM: MBIM enabled.
* @QMI_WDA_DATA_AGGREGATION_PROTOCOL_RNDIS: RNDIS enabled.
* @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAP: QMAP enabled.
*
* Data aggregation protocol in uplink or downlink.
*/
typedef enum {
QMI_WDA_DATA_AGGREGATION_PROTOCOL_DISABLED = 0x00,
QMI_WDA_DATA_AGGREGATION_PROTOCOL_TLP = 0x01,
QMI_WDA_DATA_AGGREGATION_PROTOCOL_QC_NCM = 0x02,
QMI_WDA_DATA_AGGREGATION_PROTOCOL_MBIM = 0x03,
QMI_WDA_DATA_AGGREGATION_PROTOCOL_RNDIS = 0x04,
QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAP = 0x05,
} QmiWdaDataAggregationProtocol;
#endif /* _LIBQMI_GLIB_QMI_ENUMS_WDA_H_ */