[PATCH 4/4] loc: add definitions for more messages

Thomas Weißschuh thomas at t-8ch.de
Sun Jan 28 15:50:41 UTC 2018


---
 build-aux/qmi-codegen/utils.py                     |   4 +-
 data/qmi-common.json                               |  20 +-
 data/qmi-service-loc.json                          | 335 ++++++++++++++++++++-
 .../libqmi-glib/libqmi-glib-common.sections        |  12 +
 src/libqmi-glib/Makefile.am                        |   4 +-
 src/libqmi-glib/generated/Makefile.am              |   4 +-
 src/libqmi-glib/libqmi-glib.h                      |   1 +
 src/libqmi-glib/qmi-enums-loc.h                    | 121 +++++++-
 src/libqmi-glib/qmi-flags64-loc.h                  |  64 ++++
 9 files changed, 551 insertions(+), 14 deletions(-)
 create mode 100644 src/libqmi-glib/qmi-flags64-loc.h

diff --git a/build-aux/qmi-codegen/utils.py b/build-aux/qmi-codegen/utils.py
index 5e6fee7..52cf615 100644
--- a/build-aux/qmi-codegen/utils.py
+++ b/build-aux/qmi-codegen/utils.py
@@ -78,8 +78,8 @@ def add_header_start(f, output_name, service):
     else:
         template += (
             "#include \"qmi-enums-private.h\"\n")
-    # DMS and NAS have flags64
-    if service == 'DMS' or service == 'NAS':
+    # DMS, NAS and LOC have flags64
+    if service in ('DMS', 'NAS', 'LOC'):
         template += (
             "#include \"qmi-flags64-${service}.h\"\n")
     template += (
diff --git a/data/qmi-common.json b/data/qmi-common.json
index 7b81360..3f6079c 100644
--- a/data/qmi-common.json
+++ b/data/qmi-common.json
@@ -503,6 +503,24 @@
                               { "name"          : "Long Name",
                                 "format"        : "string" },
                               { "name"          : "Short Name",
-                                "format"        : "string" } ] }
+                                "format"        : "string" } ] },
+
+  { "common-ref"    : "LOC Indication Status",
+    "name"          : "Indication Status",
+    "fullname"      : "Qmi LOC Message Status",
+    "id"            : "0x01",
+    "mandatory"     : "yes",
+    "type"          : "TLV",
+    "format"        : "guint32",
+    "public-format" : "QmiLocIndicationStatus"
+  },
+  { "common-ref"    : "LOC Fix Recurrence Type",
+    "name"          : "Fix Recurrence Type",
+    "id"            : "0x10",
+    "mandatory"     : "no",
+    "type"          : "TLV",
+    "since"         : "1.0",
+    "format"        : "guint32",
+    "public-format" : "QmiLocFixRecurrenceType" }
 
 ]
diff --git a/data/qmi-service-loc.json b/data/qmi-service-loc.json
index 235e82f..c5b6cda 100644
--- a/data/qmi-service-loc.json
+++ b/data/qmi-service-loc.json
@@ -17,6 +17,22 @@
   {  "name"    : "QMI Indication LOC",
      "type"    : "Indication-ID-Enum" },
 
+  {  "name"    : "Register Events",
+     "type"    : "Message",
+     "service" : "LOC",
+     "id"      : "0x0021",
+     "version" : "1.0",
+     "since"   : "1.20",
+     "input"   : [ { "name"          : "Event Registration Mask",
+                     "id"            : "0x01",
+                     "mandatory"     : "yes",
+                     "type"          : "TLV",
+                     "since"         : "1.20",
+                     "format"        : "guint64",
+                     "public-format" : "QmiLocEventRegistrationFlag"
+     } ],
+     "output"  : [ { "common-ref" : "Operation Result" } ] },
+
   // *********************************************************************************
   {  "name"    : "Start",
      "type"    : "Message",
@@ -26,17 +42,24 @@
      "since"   : "1.20",
      "input"   : [ { "name"          : "Session ID",
                      "id"            : "0x01",
-                     "mandatory"     : "no",
+                     "mandatory"     : "yes",
                      "type"          : "TLV",
                      "since"         : "1.20",
                      "format"        : "guint8" },
+                   { "common-ref"    : "LOC Fix Recurrence Type" },
                    { "name"          : "Intermediate Report State",
                      "id"            : "0x12",
                      "mandatory"     : "no",
                      "type"          : "TLV",
                      "since"         : "1.0",
                      "format"        : "guint32",
-                     "public-format" : "QmiLocIntermediateReportState" } ],
+                     "public-format" : "QmiLocIntermediateReportState" },
+                   { "name"          : "Minimum Interval between Position Reports",
+                     "id"            : "0x13",
+                     "mandatory"     : "no",
+                     "type"          : "TLV",
+                     "since"         : "1.0",
+                     "format"        : "guint32" } ],
     "output"  : [ { "common-ref" : "Operation Result" } ] },
 
   // *********************************************************************************
@@ -62,11 +85,315 @@
      "id"      : "0x0024",
      "since"   : "1.0",
      "version" : "1.20",
-     "output"  : [ { "name"      : "Session ID",
+     "output"  : [ { "name"          : "Session Status",
+                     "id"            : "0x01",
+                     "mandatory"     : "yes",
+                     "type"          : "TLV",
+                     "since"         : "1.0",
+                     "format"        : "guint32",
+                     "public-format" : "QmiLocSessionStatus" },
+                   { "name"      : "Session ID",
                      "id"        : "0x02",
                      "mandatory" : "no",
                      "type"      : "TLV",
                      "since"     : "1.0",
-                     "format"    : "guint8" } ] }
+                     "format"    : "guint8" },
+                   { "name"      : "Latitude",
+                     "id"        : "0x10",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "gdouble" },
+                   { "name"      : "Longitude",
+                     "id"        : "0x11",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "gdouble" },
+                   { "name"      : "Horizontal Uncertainty Circular",
+                     "id"        : "0x12",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "gfloat" },
+                   { "name"      : "Horizontal Uncertainty Elliptical Minor",
+                     "id"        : "0x13",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "gfloat" },
+                   { "name"      : "Horizontal Uncertainty Elliptical Major",
+                     "id"        : "0x14",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "gfloat" },
+                   { "name"      : "Horizontal Uncertainty Elliptical Azimuth",
+                     "id"        : "0x15",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "gfloat" },
+                   { "name"      : "Horizontal Confidence",
+                     "id"        : "0x16",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "guint8" },
+                   { "name"      : "Horizontal Reliability",
+                     "id"        : "0x17",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "guint32",
+                     "public-format" : "QmiLocReliability" },
+                   { "name"      : "Horizontal Speed",
+                     "id"        : "0x18",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "gfloat" },
+                   { "name"      : "Speed Uncertainty",
+                     "id"        : "0x19",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "gfloat" },
+                   { "name"      : "Altitude from Ellipsoid",
+                     "id"        : "0x1A",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "gfloat" },
+                   { "name"      : "Altitude from Sealevel",
+                     "id"        : "0x1B",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "gfloat" },
+                   { "name"      : "Vertical Uncertainty",
+                     "id"        : "0x1C",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "gfloat" },
+                   { "name"      : "Vertical Confidence",
+                     "id"        : "0x1D",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "guint8" },
+                   { "name"      : "Vertical Reliability",
+                     "id"        : "0x1E",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "guint32" },
+                   { "name"      : "Vertical Speed",
+                     "id"        : "0x20",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "gfloat" },
+                   { "name"      : "Magnetic Deviation",
+                     "id"        : "0x22",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "gfloat" },
+                   { "name"      : "Technology Used",
+                     "id"        : "0x23",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "guint32",
+                     "public-format" : "QmiLocTechnologyUsed" },
+                   { "name"      : "Dilution of Precision",
+                     "id"        : "0x24",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "struct",
+                     "contents"  : [
+                       { "name"   : "Position Dilution of Precision",
+                         "format" : "gfloat" },
+                       { "name"   : "Horizontal Dilution of Precision",
+                         "format" : "gfloat" },
+                       { "name"   : "Vertical Dilution of Precision",
+                         "format" : "gfloat" } ] },
+                   { "name"      : "UTC Timestamp",
+                     "id"        : "0x25",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "guint64" },
+                   { "name"      : "Leap Seconds",
+                     "id"        : "0x26",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "guint8" },
+                   { "name"      : "GPS Time",
+                     "id"        : "0x27",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "struct",
+                     "contents"  : [
+                       { "name"   : "GPS Weeks",
+                         "format" : "guint16" },
+                       { "name"   : "GPS Time of Week Milliseconds",
+                         "format" : "guint32" } ] },
+                   { "name"      : "Time Source",
+                     "id"        : "0x29",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "guint32",
+                     "public-format" : "QmiLocTimeSource" },
+                   { "name"      : "Sensor Data Usage",
+                     "id"        : "0x2A",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "guint64",
+                     "public-format" : "QmiLocSensorDataUsage" },
+                   { "name"      : "Session Fix Count",
+                     "id"        : "0x2B",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "guint32" },
+                   { "name"      : "Satellites Used",
+                     "id"        : "0x2C",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "struct",
+                     "format" : "array",
+                     "array-element": { "format" : "guint16" } },
+                   { "name"      : "Altitude Assumed",
+                     "id"        : "0x2D",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "gint8" }
+     ] },
+  {  "name"    : "NMEA Indication",
+     "type"    : "Indication",
+     "service" : "LOC",
+     "id"      : "0x0026",
+     "since"   : "1.0",
+     "version" : "1.20",
+     "output"  : [ { "name": "NMEA String",
+                     "id"        : "0x01",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "string" } ] },
+  {  "name"    : "Engine State",
+     "type"    : "Indication",
+     "service" : "LOC",
+     "id"      : "0x002B",
+     "since"   : "1.0",
+     "version" : "1.20",
+     "output"  : [ { "name": "Engine State",
+                     "id"        : "0x01",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format"    : "gint32",
+                     "public-format"    : "QmiLocEngineState" } ] },
+  {  "name"    : "Fix Recurrence Type",
+     "type"    : "Indication",
+     "service" : "LOC",
+     "id"      : "0x002C",
+     "since"   : "1.0",
+     "version" : "1.20",
+     "output"  : [{ "common-ref"    : "LOC Fix Recurrence Type" } ] },
+  {  "name"    : "GNSS Satellite Info",
+     "type"    : "Indication",
+     "service" : "LOC",
+     "id"      : "0x0025",
+     "since"   : "1.0",
+     "version" : "1.20",
+     "output"  : [ {
+                     "name": "Altitude Source",
+                     "id"        : "0x01",
+                     "mandatory" : "no",
+                     "type"      : "TLV",
+                     "since"     : "1.0",
+                     "format": "guint8",
+                     "public-format": "QmiLocAltitudeAssumed" },
+             { "name"             : "Satellite Info",
+               "id"               : "0x10",
+               "mandatory"        : "no",
+               "type"             : "TLV",
+               "since"            : "1.0",
+               "format"           : "array",
+               "array-element"  : {
+                       "name": "Element",
+                       "format": "struct",
+                       "contents": [
+                               { "name"   : "Valid Information",
+                                 "format" : "guint32",
+                                 "public-format": "QmiLocSatelliteValidInformation" },
+                               { "name"   : "System",
+                                 "format" : "guint32",
+                                 "public-format": "QmiLocSystem" },
+                               { "name"   : "GNSS Satellite ID",
+                                 "format" : "guint16" },
+                               { "name"   : "Health Status",
+                                 "format" : "guint8",
+                                 "public-format" : "QmiLocHealthStatus" },
+                               { "name"   : "Satellite Status",
+                                 "format" : "guint32",
+                                 "public-format" : "QmiLocSatelliteStatus" },
+                               { "name"   : "Navigation Data",
+                                 "format" : "guint8",
+                                 "public-format": "QmiLocNavigationData"},
+                               { "name"   : "Elevation Degrees",
+                                 "format" : "gfloat" },
+                               { "name"   : "Azimuth Degrees",
+                                 "format" : "gfloat" },
+                               { "name"   : "Signal to Noise Ratio BHz",
+                                 "format" : "gfloat" } ] } } ] },
+  {  "name"    : "Set Operation Mode",
+     "type"    : "Message",
+     "service" : "LOC",
+     "id"      : "0x004A",
+     "version" : "1.0",
+     "since"   : "1.20",
+     "input"   : [ { "name"          : "Operation Mode",
+                     "id"            : "0x01",
+                     "mandatory"     : "yes",
+                     "type"          : "TLV",
+                     "since"         : "1.20",
+                     "format"        : "guint32",
+                     "public-format" : "QmiLocOperationMode"
+     } ],
+     "output"  : [ { "common-ref" : "Operation Result" } ] },
+  {  "name"    : "Get Operation Mode",
+     "type"    : "Message",
+     "service" : "LOC",
+     "id"      : "0x004B",
+     "version" : "1.0",
+     "since"   : "1.20",
+     "input"   : [],
+     "output"  : [ { "common-ref" : "Operation Result" } ] },
 
+  {  "name"    : "Get Operation Mode",
+     "type"    : "Indication",
+     "service" : "LOC",
+     "id"      : "0x004B",
+     "version" : "1.0",
+     "since"   : "1.20",
+     "output"  : [ { "common-ref" : "LOC Indication Status" },
+                   { "name"          : "Operation Mode",
+                     "id"            : "0x10",
+                     "mandatory"     : "yes",
+                     "type"          : "TLV",
+                     "since"         : "1.20",
+                     "format"        : "guint32",
+                     "public-format" : "QmiLocOperationMode" } ] }
 ]
diff --git a/docs/reference/libqmi-glib/libqmi-glib-common.sections b/docs/reference/libqmi-glib/libqmi-glib-common.sections
index c1a5600..694e40d 100644
--- a/docs/reference/libqmi-glib/libqmi-glib-common.sections
+++ b/docs/reference/libqmi-glib/libqmi-glib-common.sections
@@ -1070,13 +1070,25 @@ qmi_voice_wcdma_amr_status_get_type
 <SECTION>
 <FILE>qmi-enums-loc</FILE>
 QmiLocIntermediateReportState
+QmiLocEventRegistrationFlag
+QmiLocFixRecurrenceType
+QmiLocOperationMode
 <SUBSECTION Methods>
 qmi_loc_intermediate_report_state_get_string
+qmi_loc_fix_recurrence_type_get_string
+qmi_loc_operation_mode_get_string
 <SUBSECTION Private>
 qmi_loc_intermediate_report_state_build_string_from_mask
+qmi_loc_operation_mode_build_string_from_mask
+qmi_loc_fix_recurrence_type_build_string_from_mask
+qmi_loc_event_registration_flag_build_string_from_mask
 <SUBSECTION Standard>
 QMI_TYPE_LOC_INTERMEDIATE_REPORT_STATE
+QMI_TYPE_LOC_FIX_RECURRENCE_TYPE
+QMI_TYPE_LOC_OPERATION_MODE
 qmi_loc_intermediate_report_state_get_type
+qmi_loc_fix_recurrence_type_get_type
+qmi_loc_operation_mode_get_type
 </SECTION>
 
 <SECTION>
diff --git a/src/libqmi-glib/Makefile.am b/src/libqmi-glib/Makefile.am
index 63723b0..0678216 100644
--- a/src/libqmi-glib/Makefile.am
+++ b/src/libqmi-glib/Makefile.am
@@ -31,7 +31,7 @@ libqmi_glib_la_SOURCES = \
 	qmi-enums-oma.h \
 	qmi-enums-wda.h \
 	qmi-enums-voice.h \
-	qmi-enums-loc.h \
+	qmi-enums-loc.h qmi-flags64-loc.h \
 	qmi-enums.h qmi-enums-private.h \
 	qmi-utils.h qmi-utils.c \
 	qmi-compat.h qmi-compat.c \
@@ -68,7 +68,7 @@ include_HEADERS = \
 	qmi-enums-oma.h \
 	qmi-enums-wda.h \
 	qmi-enums-voice.h \
-	qmi-enums-loc.h \
+	qmi-enums-loc.h qmi-flags64-loc.h \
 	qmi-utils.h \
 	qmi-message.h \
 	qmi-message-context.h \
diff --git a/src/libqmi-glib/generated/Makefile.am b/src/libqmi-glib/generated/Makefile.am
index 5b4ca02..f9bd365 100644
--- a/src/libqmi-glib/generated/Makefile.am
+++ b/src/libqmi-glib/generated/Makefile.am
@@ -121,10 +121,10 @@ qmi-enum-types-private.c: $(PRIVATE_ENUMS) qmi-enum-types-private.h $(top_srcdir
 		$(PRIVATE_ENUMS) > $@
 
 # 64bit flag types
-FLAGS64 = $(top_srcdir)/src/libqmi-glib/qmi-flags64-dms.h $(top_srcdir)/src/libqmi-glib/qmi-flags64-nas.h
+FLAGS64 = $(top_srcdir)/src/libqmi-glib/qmi-flags64-dms.h $(top_srcdir)/src/libqmi-glib/qmi-flags64-nas.h $(top_srcdir)/src/libqmi-glib/qmi-flags64-loc.h
 qmi-flags64-types.h:  $(FLAGS64) $(top_srcdir)/build-aux/templates/qmi-flags64-types-template.h
 	$(AM_V_GEN) $(GLIB_MKENUMS) \
-		--fhead "#ifndef __LIBQMI_GLIB_FLAGS64_TYPES_H__\n#define __LIBQMI_GLIB_FLAGS64_TYPES_H__\n#include \"qmi-flags64-dms.h\"\n#include \"qmi-flags64-nas.h\"\n" \
+		--fhead "#ifndef __LIBQMI_GLIB_FLAGS64_TYPES_H__\n#define __LIBQMI_GLIB_FLAGS64_TYPES_H__\n#include \"qmi-flags64-dms.h\"\n#include \"qmi-flags64-nas.h\"\n#include \"qmi-flags64-loc.h\"\n" \
 		--template $(top_srcdir)/build-aux/templates/qmi-flags64-types-template.h \
 		--ftail "#endif /* __LIBQMI_GLIB_FLAGS64_TYPES_H__ */\n" \
 		$(FLAGS64) > $@
diff --git a/src/libqmi-glib/libqmi-glib.h b/src/libqmi-glib/libqmi-glib.h
index 2ec1d3a..f28975a 100644
--- a/src/libqmi-glib/libqmi-glib.h
+++ b/src/libqmi-glib/libqmi-glib.h
@@ -74,6 +74,7 @@
 #include "qmi-enums-voice.h"
 #include "qmi-voice.h"
 
+#include "qmi-flags64-loc.h"
 #include "qmi-enums-loc.h"
 #include "qmi-loc.h"
 
diff --git a/src/libqmi-glib/qmi-enums-loc.h b/src/libqmi-glib/qmi-enums-loc.h
index d6e4f5a..52a262d 100644
--- a/src/libqmi-glib/qmi-enums-loc.h
+++ b/src/libqmi-glib/qmi-enums-loc.h
@@ -50,11 +50,126 @@
  * Since: 1.20
  */
 typedef enum {
-    QMI_LOC_INTERMEDIATE_REPORT_STATE_UNKNOWN = 0,
-    QMI_LOC_INTERMEDIATE_REPORT_STATE_ENABLE  = 1,
-    QMI_LOC_INTERMEDIATE_REPORT_STATE_DISABLE = 2,
+  QMI_LOC_INTERMEDIATE_REPORT_STATE_UNKNOWN = 0,
+  QMI_LOC_INTERMEDIATE_REPORT_STATE_ENABLE  = 1,
+  QMI_LOC_INTERMEDIATE_REPORT_STATE_DISABLE = 2,
 } QmiLocIntermediateReportState;
 
+typedef enum {
+  QMI_LOC_INDICATION_STATUS_SUCCESS          = 0,
+  QMI_LOC_INDICATION_STATUS_GENERALFAILURE   = 1,
+  QMI_LOC_INDICATION_STATUS_UNSUPPORTED      = 2,
+  QMI_LOC_INDICATION_STATUS_INVALIDPARAMETER = 3,
+  QMI_LOC_INDICATION_STATUS_ENGINEBUSY       = 4,
+  QMI_LOC_INDICATION_STATUS_PHONEOFFLINE     = 5,
+  QMI_LOC_INDICATION_STATUS_TIMEOUT          = 6,
+} QmiLocIndicationStatus;
+
+typedef enum {
+  QMI_LOC_SESSION_STATUS_SUCCESS         = 0,
+  QMI_LOC_SESSION_STATUS_IN_PROGRESS     = 1,
+  QMI_LOC_SESSION_STATUS_GENERAL_FAILURE = 2,
+  QMI_LOC_SESSION_STATUS_TIMEOUT         = 3,
+  QMI_LOC_SESSION_STATUS_USER_ENDED      = 4,
+  QMI_LOC_SESSION_STATUS_BAD_PARAMETER   = 5,
+  QMI_LOC_SESSION_STATUS_PHONE_OFFLINE   = 6,
+  QMI_LOC_SESSION_STATUS_ENGINE_LOCKED   = 6,
+} QmiLocSessionStatus;
+
+typedef enum {
+  QMI_LOC_FIX_RECURRENCE_TYPE_REQUEST_PERIODIC_FIXES = 1,
+  QMI_LOC_FIX_RECURRENCE_TYPE_REQUEST_SINGLE_FIX = 2,
+} QmiLocFixRecurrenceType;
+
+typedef enum {
+  QMI_LOC_OPERATION_MODE_DEFAULT    = 1,
+  QMI_LOC_OPERATION_MODE_MSB        = 2,
+  QMI_LOC_OPERATION_MODE_MSA        = 3,
+  QMI_LOC_OPERATION_MODE_STANDALONE = 4,
+  QMI_LOC_OPERATION_MODE_CELLID     = 5,
+  QMI_LOC_OPERATION_MODE_WWAN       = 6,
+} QmiLocOperationMode;
+
+typedef enum {
+  QMI_LOC_ENGINE_STATE_ON  = 1,
+  QMI_LOC_ENGINE_STATE_OFF = 2,
+} QmiLocEngineState;
+
+typedef enum {
+  QMI_LOC_TECHNOLOGY_USED_SATELLITE          = 1 << 0,
+  QMI_LOC_TECHNOLOGY_USED_CELLULAR           = 1 << 1,
+  QMI_LOC_TECHNOLOGY_USED_WIFI               = 1 << 2,
+  QMI_LOC_TECHNOLOGY_USED_SENSORS            = 1 << 3,
+  QMI_LOC_TECHNOLOGY_USED_REFERENCE_LOCATION = 1 << 4,
+  QMI_LOC_TECHNOLOGY_USED_INJECTED_POSITION  = 1 << 5,
+  QMI_LOC_TECHNOLOGY_USED_AFLT               = 1 << 6,
+  QMI_LOC_TECHNOLOGY_USED_HYBRID             = 1 << 7,
+} QmiLocTechnologyUsed;
+
+typedef enum {
+  QMI_LOC_RELIABILITY_NOT_SET  = 0,
+  QMI_LOC_RELIABILITY_VERY_LOW = 1,
+  QMI_LOC_RELIABILITY_LOW      = 2,
+  QMI_LOC_RELIABILITY_MEDIUM   = 3,
+  QMI_LOC_RELIABILITY_HIGH     = 4,
+} QmiLocReliability;
+
+typedef enum {
+  QMI_LOC_TIME_SOURCE_INVALID                =  0,
+  QMI_LOC_TIME_SOURCE_NETWORK_TIME_TRANSFER  =  1,
+  QMI_LOC_TIME_SOURCE_NETWORK_TIME_TAGGING   =  2,
+  QMI_LOC_TIME_SOURCE_EXTERNAL_INPUT         =  3,
+  QMI_LOC_TIME_SOURCE_TOW_DECODE             =  4,
+  QMI_LOC_TIME_SOURCE_TOW_CONFIRMED          =  5,
+  QMI_LOC_TIME_SOURCE_TOW_AND_WEEK_CONFIRMED =  6,
+  QMI_LOC_TIME_SOURCE_NAVIGATION_SOLUTION    =  7,
+  QMI_LOC_TIME_SOURCE_SOLVE_FOR_TIME         =  8,
+  QMI_LOC_TIME_SOURCE_GLTOW_DECODE           =  9,
+  QMI_LOC_TIME_SOURCE_TRANSFORM              = 10,
+  QMI_LOC_TIME_SOURCE_WCDMA_SLEEP_TIME_TAG   = 11,
+  QMI_LOC_TIME_SOURCE_GSM_SLEEP_TIME_TAG     = 12,
+} QmiLocTimeSource;
+
+typedef enum {
+  QMI_LOC_ALTITUDE_ASSUMED_ALTITUDE_IS_CALCULATED = 0,
+  QMI_LOC_ALTITUDE_ASSUMED_ALTITUDE_IS_ASSUMED    = 1,
+} QmiLocAltitudeAssumed;
+
+typedef enum {
+  QMI_LOC_SATELLITE_VALID_INFORMATION_SYSTEM                = 1 << 0,
+  QMI_LOC_SATELLITE_VALID_INFORMATION_GNSS_SATELLITE_ID     = 1 << 1,
+  QMI_LOC_SATELLITE_VALID_INFORMATION_HEALTH_STATUS         = 1 << 2,
+  QMI_LOC_SATELLITE_VALID_INFORMATION_PROCESS_STATUS        = 1 << 3,
+  QMI_LOC_SATELLITE_VALID_INFORMATION_SATELLITE_INFO_MASK   = 1 << 4,
+  QMI_LOC_SATELLITE_VALID_INFORMATION_ELEVATION             = 1 << 5,
+  QMI_LOC_SATELLITE_VALID_INFORMATION_AZIMUTH               = 1 << 6,
+  QMI_LOC_SATELLITE_VALID_INFORMATION_SIGNAL_TO_NOISE_RATIO = 1 << 7,
+} QmiLocSatelliteValidInformation;
+
+typedef enum {
+  QMI_LOC_SYSTEM_GPS     = 1,
+  QMI_LOC_SYSTEM_GALILEO = 2,
+  QMI_LOC_SYSTEM_SBAS    = 3,
+  QMI_LOC_SYSTEM_COMPASS = 4,
+  QMI_LOC_SYSTEM_GLONASS = 5,
+} QmiLocSystem;
+
+typedef enum {
+  QMI_LOC_HEALTH_STATUS_UNHEALTHY = 0,
+  QMI_LOC_HEALTH_STATUS_HEALTHY   = 1,
+} QmiLocHealthStatus;
+
+typedef enum {
+  QMI_LOC_NAVIGATION_DATA_HAS_EPHEMERIS = 0,
+  QMI_LOC_NAVIGATION_DATA_HAS_ALMANAC   = 1,
+} QmiLocNavigationData;
+
+typedef enum {
+  QMI_LOC_SATELLITE_STATUS_IDLE      = 0,
+  QMI_LOC_SATELLITE_STATUS_SEARCHING = 1,
+  QMI_LOC_SATELLITE_STATUS_TRACKING  = 2,
+} QmiLocSatelliteStatus;
+
 /**
  * qmi_loc_intermediate_report_state_get_string:
  *
diff --git a/src/libqmi-glib/qmi-flags64-loc.h b/src/libqmi-glib/qmi-flags64-loc.h
new file mode 100644
index 0000000..97ddda8
--- /dev/null
+++ b/src/libqmi-glib/qmi-flags64-loc.h
@@ -0,0 +1,64 @@
+/* -*- 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.
+ * Copyright (C) 2012-2017 Aleksander Morgado <aleksander at aleksander.es>
+ */
+
+#ifndef _LIBQMI_GLIB_QMI_FLAGS64_LOC_H_
+#define _LIBQMI_GLIB_QMI_FLAGS64_LOC_H_
+
+#if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION)
+#error "Only <libqmi-glib.h> can be included directly."
+#endif
+
+#include <glib.h>
+
+typedef enum {
+  QMI_LOC_EVENT_REGISTRATION_FLAG_POSITION_REPORT                    = 1 <<  0,
+  QMI_LOC_EVENT_REGISTRATION_FLAG_GNSS_SATELLITE_INFO                = 1 <<  1,
+  QMI_LOC_EVENT_REGISTRATION_FLAG_NMEA                               = 1 <<  2,
+  QMI_LOC_EVENT_REGISTRATION_FLAG_NI_NOTIFY_VERIFY_REQUEST           = 1 <<  3,
+  QMI_LOC_EVENT_REGISTRATION_FLAG_INJECT_TIME_REQUEST                = 1 <<  4,
+  QMI_LOC_EVENT_REGISTRATION_FLAG_INJECT_PREDICTED_ORBITS_REQUEST    = 1 <<  5,
+  QMI_LOC_EVENT_REGISTRATION_FLAG_INJECT_POSITION_REQUEST            = 1 <<  6,
+  QMI_LOC_EVENT_REGISTRATION_FLAG_ENGINE_STATE                       = 1 <<  7,
+  QMI_LOC_EVENT_REGISTRATION_FLAG_FIX_SESSION_STATE                  = 1 <<  8,
+  QMI_LOC_EVENT_REGISTRATION_FLAG_WIFI_REQUEST                       = 1 <<  9,
+  QMI_LOC_EVENT_REGISTRATION_FLAG_SENSOR_STREAMING_READY_STATUS      = 1 << 10,
+  QMI_LOC_EVENT_REGISTRATION_FLAG_TIME_SYNC_REQUEST                  = 1 << 11,
+  QMI_LOC_EVENT_REGISTRATION_FLAG_SET_SPI_STREAMING_REPORT           = 1 << 12,
+  QMI_LOC_EVENT_REGISTRATION_FLAG_LOCATION_SERVER_CONNECTION_REQUEST = 1 << 13,
+  QMI_LOC_EVENT_REGISTRATION_FLAG_NI_GEOFENCE_NOTIFICATION           = 1 << 14,
+  QMI_LOC_EVENT_REGISTRATION_FLAG_GEOFENCE_GENERAL_ALERT             = 1 << 15,
+  QMI_LOC_EVENT_REGISTRATION_FLAG_GEOFENCE_BREACH_NOTIFICATION       = 1 << 16,
+  QMI_LOC_EVENT_REGISTRATION_FLAG_PEDOMETER_CONTROL                  = 1 << 17,
+  QMI_LOC_EVENT_REGISTRATION_FLAG_MOTION_DATA_CONTROL                = 1 << 18,
+} QmiLocEventRegistrationFlag;
+
+typedef enum {
+  QMI_LOC_SENSOR_DATA_USAGE_ACCELEROMETER_USED = 1 <<  0,
+  QMI_LOC_SENSOR_DATA_USAGE_GYRO_USED          = 1 <<  1,
+  QMI_LOC_SENSOR_DATA_USAGE_AIDED_HEADING      = ((guint64) 1) << 32,
+  QMI_LOC_SENSOR_DATA_USAGE_AIDED_SPEED        = ((guint64) 1) << 33,
+  QMI_LOC_SENSOR_DATA_USAGE_AIDED_POSITION     = ((guint64) 1) << 34,
+  QMI_LOC_SENSOR_DATA_USAGE_AIDED_VELOCITY     = ((guint64) 1) << 35,
+} QmiLocSensorDataUsage;
+
+#endif /* _LIBQMI_GLIB_QMI_FLAGS64_LOC_H_ */
-- 
2.16.1



More information about the libqmi-devel mailing list