summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-10-29 16:58:04 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-10-29 19:09:50 +0100
commit59405d50b4387f6adde435cb27b6ee1fce0b5104 (patch)
tree1bcfdc51d619eedf4a00ea731748e8292876c642
parent23eb154afdc0de627d62e53e7475dde222377c9e (diff)
uim: implement "Read Record" request/response
-rw-r--r--build-aux/qmi-codegen/utils.py4
-rw-r--r--data/qmi-service-uim.json80
-rw-r--r--docs/reference/libqmi-glib/libqmi-glib-common.sections12
-rw-r--r--docs/reference/libqmi-glib/libqmi-glib-docs.xml2
-rw-r--r--libqmi-glib/Makefile.am2
-rw-r--r--libqmi-glib/generated/Makefile.am5
-rw-r--r--libqmi-glib/qmi-enums-uim.h69
7 files changed, 169 insertions, 5 deletions
diff --git a/build-aux/qmi-codegen/utils.py b/build-aux/qmi-codegen/utils.py
index 3d00fbc..312d5e2 100644
--- a/build-aux/qmi-codegen/utils.py
+++ b/build-aux/qmi-codegen/utils.py
@@ -70,8 +70,8 @@ def add_header_start(f, output_name, service):
"#include <gio/gio.h>\n"
"\n"
"#include \"qmi-enums.h\"\n")
- # CTL, UIM don't have enums
- if service != 'CTL' and service != 'UIM':
+ # CTL doesn't have enums
+ if service != 'CTL':
template += (
"#include \"qmi-enums-${service}.h\"\n")
else:
diff --git a/data/qmi-service-uim.json b/data/qmi-service-uim.json
index de2ef0d..ad80662 100644
--- a/data/qmi-service-uim.json
+++ b/data/qmi-service-uim.json
@@ -18,6 +18,84 @@
"service" : "UIM",
"id" : "0x0000",
"version" : "1.0",
- "output" : [ { "common-ref" : "Operation Result" } ] }
+ "output" : [ { "common-ref" : "Operation Result" } ] },
+
+ // *********************************************************************************
+ { "name" : "Read Record",
+ "type" : "Message",
+ "service" : "UIM",
+ "id" : "0x0021",
+ "version" : "1.0",
+ "input" : [ { "name" : "Session Information",
+ "id" : "0x01",
+ "mandatory" : "yes",
+ "type" : "TLV",
+ "format" : "sequence",
+ "contents" : [ { "name" : "Session Type",
+ "format" : "guint8",
+ "public-format" : "QmiUimSessionType" },
+ { "name" : "Application Identifier",
+ "format" : "string" } ] },
+ { "name" : "File",
+ "id" : "0x02",
+ "mandatory" : "yes",
+ "type" : "TLV",
+ "format" : "sequence",
+ "contents" : [ { "name" : "File ID",
+ "format" : "guint16" },
+ { "name" : "File Path",
+ "format" : "array",
+ "array-element" : { "format" : "guint16" } } ] },
+ { "name" : "Record",
+ "id" : "0x03",
+ "mandatory" : "yes",
+ "type" : "TLV",
+ "format" : "sequence",
+ "contents" : [ { "name" : "Record Number",
+ "format" : "guint16" },
+ { "name" : "Record Length",
+ "format" : "guint16" } ] },
+ { "name" : "Last Record",
+ "id" : "0x10",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "guint16" },
+ { "name" : "Response In Indication Token",
+ "id" : "0x11",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "guint32" } ],
+ "output" : [ { "common-ref" : "Operation Result" },
+ { "name" : "Card result",
+ "id" : "0x10",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "sequence",
+ "contents" : [ { "name" : "SW1",
+ "format" : "guint8" },
+ { "name" : "SW2",
+ "format" : "guint8" } ] },
+ { "name" : "Read Result",
+ "id" : "0x11",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "array",
+ "size-prefix-format" : "guint16",
+ "array-element" : { "format" : "guint8" },
+ "prerequisites" : [ { "common-ref" : "Success" } ] },
+ { "name" : "Additional Read Result",
+ "id" : "0x12",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "array",
+ "size-prefix-format" : "guint16",
+ "array-element" : { "format" : "guint8" },
+ "prerequisites" : [ { "common-ref" : "Success" } ] },
+ { "name" : "Response In Indication Token",
+ "id" : "0x13",
+ "mandatory" : "no",
+ "type" : "TLV",
+ "format" : "guint32",
+ "prerequisites" : [ { "common-ref" : "Success" } ] } ] }
]
diff --git a/docs/reference/libqmi-glib/libqmi-glib-common.sections b/docs/reference/libqmi-glib/libqmi-glib-common.sections
index 097cd34..33bcbaf 100644
--- a/docs/reference/libqmi-glib/libqmi-glib-common.sections
+++ b/docs/reference/libqmi-glib/libqmi-glib-common.sections
@@ -593,6 +593,18 @@ qmi_pds_tracking_session_state_get_type
</SECTION>
<SECTION>
+<FILE>qmi-enums-uim</FILE>
+QmiUimSessionType
+<SUBSECTION Methods>
+qmi_uim_session_type_get_string
+<SUBSECTION Private>
+qmi_uim_session_type_build_string_from_mask
+<SUBSECTION Standard>
+QMI_TYPE_UIM_SESSION_TYPE
+qmi_uim_session_type_get_type
+</SECTION>
+
+<SECTION>
<FILE>qmi-errors</FILE>
QmiCoreError
QmiProtocolError
diff --git a/docs/reference/libqmi-glib/libqmi-glib-docs.xml b/docs/reference/libqmi-glib/libqmi-glib-docs.xml
index 2da1b28..f5220a5 100644
--- a/docs/reference/libqmi-glib/libqmi-glib-docs.xml
+++ b/docs/reference/libqmi-glib/libqmi-glib-docs.xml
@@ -204,9 +204,11 @@
<chapter>
<title>User Identity Module (UIM) service</title>
<xi:include href="xml/qmi-client-uim.xml"/>
+ <xi:include href="xml/qmi-enums-uim.xml"/>
<section>
<title>UIM Requests</title>
<xi:include href="xml/qmi-message-uim-reset.xml"/>
+ <xi:include href="xml/qmi-message-uim-read-record.xml"/>
</section>
</chapter>
diff --git a/libqmi-glib/Makefile.am b/libqmi-glib/Makefile.am
index d8ffc46..0a7c88d 100644
--- a/libqmi-glib/Makefile.am
+++ b/libqmi-glib/Makefile.am
@@ -20,6 +20,7 @@ libqmi_glib_la_SOURCES = \
qmi-enums-nas.h qmi-flags64-nas.h\
qmi-enums-wms.h \
qmi-enums-pds.h \
+ qmi-enums-uim.h \
qmi-enums.h qmi-enums-private.h \
qmi-utils.h qmi-utils.c \
qmi-message.h qmi-message.c \
@@ -41,6 +42,7 @@ include_HEADERS = \
qmi-enums-nas.h qmi-flags64-nas.h \
qmi-enums-wms.h \
qmi-enums-pds.h \
+ qmi-enums-uim.h \
qmi-utils.h \
qmi-message.h \
qmi-device.h \
diff --git a/libqmi-glib/generated/Makefile.am b/libqmi-glib/generated/Makefile.am
index 0477b89..1751a61 100644
--- a/libqmi-glib/generated/Makefile.am
+++ b/libqmi-glib/generated/Makefile.am
@@ -64,10 +64,11 @@ ENUMS = \
$(top_srcdir)/libqmi-glib/qmi-enums-dms.h \
$(top_srcdir)/libqmi-glib/qmi-enums-nas.h \
$(top_srcdir)/libqmi-glib/qmi-enums-wms.h \
- $(top_srcdir)/libqmi-glib/qmi-enums-pds.h
+ $(top_srcdir)/libqmi-glib/qmi-enums-pds.h \
+ $(top_srcdir)/libqmi-glib/qmi-enums-uim.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\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-uim.h\"\n\n" \
--template $(top_srcdir)/build-aux/templates/qmi-enum-types-template.h \
--ftail "#endif /* __LIBQMI_GLIB_ENUM_TYPES_H__ */\n" \
$(ENUMS) > $@
diff --git a/libqmi-glib/qmi-enums-uim.h b/libqmi-glib/qmi-enums-uim.h
new file mode 100644
index 0000000..6215a39
--- /dev/null
+++ b/libqmi-glib/qmi-enums-uim.h
@@ -0,0 +1,69 @@
+/* -*- 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_UIM_H_
+#define _LIBQMI_GLIB_QMI_ENUMS_UIM_H_
+
+#if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION)
+#error "Only <libqmi-glib.h> can be included directly."
+#endif
+
+/**
+ * SECTION: qmi-enums-uim
+ * @title: UIM enumerations and flags
+ *
+ * This section defines enumerations and flags used in the UIM service
+ * interface.
+ */
+
+/*****************************************************************************/
+/* Helper enums for the 'QMI UIM Read Record' request/response */
+
+/**
+ * QmiUimSessionType:
+ * @QMI_UIM_SESSION_TYPE_PRIMARY_GW_PROVISIONING: Primary GSM/WCDMA provisioning.
+ * @QMI_UIM_SESSION_TYPE_PRIMARY_1X_PROVISIONING: Primary CDMA1x provisioning.
+ * @QMI_UIM_SESSION_TYPE_SECONDARY_GW_PROVISIONING: Secondary GSM/WCDMA provisioning.
+ * @QMI_UIM_SESSION_TYPE_SECONDARY_1X_PROVISIONING: Secondary CDMA1x provisioning.
+ * @QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_1: Nonprovisioning on slot 1.
+ * @QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_2: Nonprovisioning on slot 2.
+ * @QMI_UIM_SESSION_TYPE_CARD_SLOT_1: Card on slot 1.
+ * @QMI_UIM_SESSION_TYPE_CARD_SLOT_2: Card on slot 2.
+ * @QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_1: Logical channel on slot 1.
+ * @QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_2: Logical channel on slot 2.
+ *
+ * Type of UIM session.
+ */
+typedef enum {
+ QMI_UIM_SESSION_TYPE_PRIMARY_GW_PROVISIONING = 0,
+ QMI_UIM_SESSION_TYPE_PRIMARY_1X_PROVISIONING = 1,
+ QMI_UIM_SESSION_TYPE_SECONDARY_GW_PROVISIONING = 2,
+ QMI_UIM_SESSION_TYPE_SECONDARY_1X_PROVISIONING = 3,
+ QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_1 = 4,
+ QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_2 = 5,
+ QMI_UIM_SESSION_TYPE_CARD_SLOT_1 = 6,
+ QMI_UIM_SESSION_TYPE_CARD_SLOT_2 = 7,
+ QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_1 = 8,
+ QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_2 = 9
+} QmiUimSessionType;
+
+#endif /* _LIBQMI_GLIB_QMI_ENUMS_UIM_H_ */