diff options
-rw-r--r-- | build-aux/qmi-codegen/utils.py | 4 | ||||
-rw-r--r-- | data/qmi-service-pbm.json | 36 | ||||
-rw-r--r-- | docs/reference/libqmi-glib/Makefile.am | 3 | ||||
-rw-r--r-- | docs/reference/libqmi-glib/libqmi-glib-common.sections | 12 | ||||
-rw-r--r-- | docs/reference/libqmi-glib/libqmi-glib-docs.xml | 10 | ||||
-rw-r--r-- | libqmi-glib/Makefile.am | 2 | ||||
-rw-r--r-- | libqmi-glib/generated/Makefile.am | 27 | ||||
-rw-r--r-- | libqmi-glib/libqmi-glib.h | 3 | ||||
-rw-r--r-- | libqmi-glib/qmi-enums-pbm.h | 61 |
9 files changed, 149 insertions, 9 deletions
diff --git a/build-aux/qmi-codegen/utils.py b/build-aux/qmi-codegen/utils.py index e9d4ea1..cb12962 100644 --- a/build-aux/qmi-codegen/utils.py +++ b/build-aux/qmi-codegen/utils.py @@ -76,8 +76,8 @@ def add_header_start(f, output_name, service): else: template += ( "#include \"qmi-enums-private.h\"\n") - # CTL, WDS, WMS and PDS don't have flags64 - if service != 'CTL' and service != 'WDS' and service != 'WMS' and service != 'PDS': + # CTL, WDS, WMS, PDS and PBM don't have flags64 + if service != 'CTL' and service != 'WDS' and service != 'WMS' and service != 'PDS' and service != 'PBM': template += ( "#include \"qmi-flags64-${service}.h\"\n") template += ( diff --git a/data/qmi-service-pbm.json b/data/qmi-service-pbm.json new file mode 100644 index 0000000..668ae9d --- /dev/null +++ b/data/qmi-service-pbm.json @@ -0,0 +1,36 @@ + +[ + // ********************************************************************************* + { "name" : "PBM", + "type" : "Service" }, + + // ********************************************************************************* + { "name" : "QMI Client PBM", + "type" : "Client" }, + + // ********************************************************************************* + { "name" : "QMI Message PBM", + "type" : "Message-ID-Enum" }, + + // ********************************************************************************* + { "name" : "Indication Register", + "type" : "Message", + "service" : "PBM", + "id" : "0x0001", + "version" : "1.0", + "input" : [ { "name" : "Event Registration Mask", + "id" : "0x01", + "mandatory" : "yes", + "type" : "TLV", + "format" : "guint32", + "public-format" : "QmiPbmEventRegistrationFlag" } ], + "output" : [ { "common-ref" : "Operation Result" }, + { "name" : "Event Registration Mask", + "id" : "0x10", + "mandatory" : "no", + "type" : "TLV", + "format" : "guint32", + "public-format" : "QmiPbmEventRegistrationFlag", + "prerequisites" : [ { "common-ref" : "Success" } ] } ] } + +] diff --git a/docs/reference/libqmi-glib/Makefile.am b/docs/reference/libqmi-glib/Makefile.am index dc60345..8bc6b2a 100644 --- a/docs/reference/libqmi-glib/Makefile.am +++ b/docs/reference/libqmi-glib/Makefile.am @@ -12,7 +12,8 @@ ALL_SECTIONS = \ $(top_builddir)/libqmi-glib/generated/qmi-nas.sections \ $(top_builddir)/libqmi-glib/generated/qmi-wds.sections \ $(top_builddir)/libqmi-glib/generated/qmi-wms.sections \ - $(top_builddir)/libqmi-glib/generated/qmi-pds.sections + $(top_builddir)/libqmi-glib/generated/qmi-pds.sections \ + $(top_builddir)/libqmi-glib/generated/qmi-pbm.sections $(DOC_MODULE)-sections.mstamp: $(ALL_SECTIONS) $(AM_V_GEN) \ diff --git a/docs/reference/libqmi-glib/libqmi-glib-common.sections b/docs/reference/libqmi-glib/libqmi-glib-common.sections index c6533d9..f8a4fa8 100644 --- a/docs/reference/libqmi-glib/libqmi-glib-common.sections +++ b/docs/reference/libqmi-glib/libqmi-glib-common.sections @@ -625,6 +625,18 @@ qmi_pds_tracking_session_state_get_type </SECTION> <SECTION> +<FILE>qmi-enums-pbm</FILE> +QmiPbmEventRegistrationFlag +<SUBSECTION Methods> +qmi_pbm_event_registration_flag_build_string_from_mask +<SUBSECTION Private> +qmi_pbm_event_registration_flag_get_string +<SUBSECTION Standard> +QMI_TYPE_PBM_EVENT_REGISTRATION_FLAG +qmi_pbm_event_registration_flag_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 316f970..861f6d8 100644 --- a/docs/reference/libqmi-glib/libqmi-glib-docs.xml +++ b/docs/reference/libqmi-glib/libqmi-glib-docs.xml @@ -206,6 +206,16 @@ </section> </chapter> + <chapter> + <title>Phonebook Management Service (PBM)</title> + <xi:include href="xml/qmi-client-pbm.xml"/> + <xi:include href="xml/qmi-enums-pbm.xml"/> + <section> + <title>PDS Requests</title> + <xi:include href="xml/qmi-message-pbm-indication-register.xml"/> + </section> + </chapter> + <chapter id="object-tree"> <title>Object Hierarchy</title> <xi:include href="xml/tree_index.sgml"/> diff --git a/libqmi-glib/Makefile.am b/libqmi-glib/Makefile.am index fdac069..20cb304 100644 --- a/libqmi-glib/Makefile.am +++ b/libqmi-glib/Makefile.am @@ -23,6 +23,7 @@ libqmi_glib_la_SOURCES = \ qmi-enums-nas.h qmi-flags64-nas.h\ qmi-enums-wms.h \ qmi-enums-pds.h \ + qmi-enums-pbm.h \ qmi-enums.h qmi-enums-private.h \ qmi-utils.h qmi-utils.c \ qmi-message.h qmi-message.c \ @@ -48,6 +49,7 @@ include_HEADERS = \ qmi-enums-nas.h qmi-flags64-nas.h \ qmi-enums-wms.h \ qmi-enums-pds.h \ + qmi-enums-pbm.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 25f4c48..a376ab2 100644 --- a/libqmi-glib/generated/Makefile.am +++ b/libqmi-glib/generated/Makefile.am @@ -11,7 +11,8 @@ GENERATED_H = \ qmi-nas.h \ qmi-wds.h \ qmi-wms.h \ - qmi-pds.h + qmi-pds.h \ + qmi-pbm.h GENERATED_C = \ qmi-error-types.c \ @@ -24,7 +25,8 @@ GENERATED_C = \ qmi-nas.c \ qmi-wds.c \ qmi-wms.c \ - qmi-pds.c + qmi-pds.c \ + qmi-pbm.c GENERATED_SECTIONS = \ qmi-ctl.sections \ @@ -32,7 +34,8 @@ GENERATED_SECTIONS = \ qmi-nas.sections \ qmi-wds.sections \ qmi-wms.sections \ - qmi-pds.sections + qmi-pds.sections \ + qmi-pbm.sections # Error types qmi-error-types.h: $(top_srcdir)/libqmi-glib/qmi-errors.h $(top_srcdir)/build-aux/templates/qmi-error-types-template.h @@ -61,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-pbm.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" \ + --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" \ --template $(top_srcdir)/build-aux/templates/qmi-enum-types-template.h \ --ftail "#endif /* __LIBQMI_GLIB_ENUM_TYPES_H__ */\n" \ $(ENUMS) > $@ @@ -166,6 +170,16 @@ qmi-pds.h qmi-pds.c qmi-pds.sections: $(top_srcdir)/data/qmi-service-pds.json $( --include $(top_srcdir)/data/qmi-common.json \ --output qmi-pds +# PBM service +qmi-pbm.h qmi-pbm.c qmi-pbm.sections: $(top_srcdir)/data/qmi-service-pbm.json $(top_srcdir)/build-aux/qmi-codegen/*.py $(top_srcdir)/build-aux/qmi-codegen/qmi-codegen + $(AM_V_GEN) \ + rm -f qmi-pbm.h && \ + rm -f qmi-pbm.c && \ + $(top_srcdir)/build-aux/qmi-codegen/qmi-codegen \ + --input $(top_srcdir)/data/qmi-service-pbm.json \ + --include $(top_srcdir)/data/qmi-common.json \ + --output qmi-pbm + BUILT_SOURCES = $(GENERATED_H) $(GENERATED_C) nodist_libqmi_glib_generated_la_SOURCES = \ @@ -193,6 +207,7 @@ nodist_include_HEADERS = \ qmi-nas.h \ qmi-wds.h \ qmi-wms.h \ - qmi-pds.h + qmi-pds.h \ + qmi-pbm.h CLEANFILES = $(GENERATED_H) $(GENERATED_C) $(GENERATED_SECTIONS) diff --git a/libqmi-glib/libqmi-glib.h b/libqmi-glib/libqmi-glib.h index 3d60111..c17685d 100644 --- a/libqmi-glib/libqmi-glib.h +++ b/libqmi-glib/libqmi-glib.h @@ -52,6 +52,9 @@ #include "qmi-enums-pds.h" #include "qmi-pds.h" +#include "qmi-enums-pbm.h" +#include "qmi-pbm.h" + /* generated */ #include "qmi-error-types.h" #include "qmi-enum-types.h" diff --git a/libqmi-glib/qmi-enums-pbm.h b/libqmi-glib/qmi-enums-pbm.h new file mode 100644 index 0000000..24db1e2 --- /dev/null +++ b/libqmi-glib/qmi-enums-pbm.h @@ -0,0 +1,61 @@ +/* -*- 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_PBM_H_ +#define _LIBQMI_GLIB_QMI_ENUMS_PBM_H_ + +#if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) +#error "Only <libqmi-glib.h> can be included directly." +#endif + +/** + * SECTION: qmi-enums-pbm + * @title: PBM enumerations and flags + * + * This section defines enumerations and flags used in the PBM service + * interface. + */ + +/*****************************************************************************/ +/* Helper enums for the 'QMI PBM Indication Register' indication */ + +/** + * QmiPbmEventRegistrationFlag: + * @QMI_PBM_EVENT_REGISTRATION_FLAG_RECORD_UPDATE: Request indications when records are added/edited/deleted. + * @QMI_PBM_EVENT_REGISTRATION_FLAG_PHONEBOOK_READY: Request indications when phonebooks are ready. + * @QMI_PBM_EVENT_REGISTRATION_FLAG_EMERGENCY_NUMBER_LIST: Request indications when emergency numbers are changed. + * @QMI_PBM_EVENT_REGISTRATION_FLAG_HIDDEN_RECORD_STATUS: Request indications when hidden record status is changed. + * @QMI_PBM_EVENT_REGISTRATION_FLAG_AAS_UPDATE: Request indications when Additional number Alpha String records are added/edited/deleted. + * @QMI_PBM_EVENT_REGISTRATION_FLAG_GAS_UPDATE: Request indications when Grouping information Alpha String records are added/edited/deleted. + * + * Flags to use to register to phonebook indications. + */ +typedef enum { + QMI_PBM_EVENT_REGISTRATION_FLAG_RECORD_UPDATE = 1 << 0, + QMI_PBM_EVENT_REGISTRATION_FLAG_PHONEBOOK_READY = 1 << 1, + QMI_PBM_EVENT_REGISTRATION_FLAG_EMERGENCY_NUMBER_LIST = 1 << 2, + QMI_PBM_EVENT_REGISTRATION_FLAG_HIDDEN_RECORD_STATUS = 1 << 3, + QMI_PBM_EVENT_REGISTRATION_FLAG_AAS_UPDATE = 1 << 4, + QMI_PBM_EVENT_REGISTRATION_FLAG_GAS_UPDATE = 1 << 5, +} QmiPbmEventRegistrationFlag; + +#endif /* _LIBQMI_GLIB_QMI_ENUMS_PBM_H_ */ |