qmi-enums-pds.h 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /*
  3. * uqmi -- tiny QMI support implementation
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General Public
  16. * License along with this library; if not, write to the
  17. * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  18. * Boston, MA 02110-1301 USA.
  19. *
  20. * Copyright (C) 2012 Google Inc.
  21. * Copyright (C) 2012-2017 Aleksander Morgado <aleksander@aleksander.es>
  22. */
  23. #ifndef _LIBQMI_GLIB_QMI_ENUMS_PDS_H_
  24. #define _LIBQMI_GLIB_QMI_ENUMS_PDS_H_
  25. /**
  26. * SECTION: qmi-enums-pds
  27. *
  28. * This section defines enumerations and flags used in the PDS service
  29. * interface.
  30. */
  31. /*****************************************************************************/
  32. /* Helper enums for the 'QMI PDS Event Report' indication */
  33. /**
  34. * QmiPdsOperationMode:
  35. * @QMI_PDS_OPERATION_MODE_UNKNOWN: Unknown (position not fixed yet).
  36. * @QMI_PDS_OPERATION_MODE_STANDALONE: Standalone.
  37. * @QMI_PDS_OPERATION_MODE_MS_BASED: Mobile Station Based (MSB) A-GPS.
  38. * @QMI_PDS_OPERATION_MODE_MS_ASSISTED: Mobile Station Assisted (MSA) A-GPS.
  39. *
  40. * Operation mode used to compute the position.
  41. *
  42. * Since: 1.0
  43. */
  44. typedef enum { /*< since=1.0 >*/
  45. QMI_PDS_OPERATION_MODE_UNKNOWN = -1,
  46. QMI_PDS_OPERATION_MODE_STANDALONE = 0,
  47. QMI_PDS_OPERATION_MODE_MS_BASED = 1,
  48. QMI_PDS_OPERATION_MODE_MS_ASSISTED = 2
  49. } QmiPdsOperationMode;
  50. /**
  51. * QmiPdsPositionSessionStatus:
  52. * @QMI_PDS_POSITION_SESSION_STATUS_SUCCESS: Success.
  53. * @QMI_PDS_POSITION_SESSION_STATUS_IN_PROGRESS: In progress.
  54. * @QMI_PDS_POSITION_SESSION_STATUS_GENERAL_FAILURE: General failure.
  55. * @QMI_PDS_POSITION_SESSION_STATUS_TIMEOUT: Timeout.
  56. * @QMI_PDS_POSITION_SESSION_STATUS_USER_ENDED_SESSION: User ended session.
  57. * @QMI_PDS_POSITION_SESSION_STATUS_BAD_PARAMETER: Bad parameter.
  58. * @QMI_PDS_POSITION_SESSION_STATUS_PHONE_OFFLINE: Phone is offline.
  59. * @QMI_PDS_POSITION_SESSION_STATUS_ENGINE_LOCKED: Engine locked.
  60. * @QMI_PDS_POSITION_SESSION_STATUS_E911_SESSION_IN_PROGRESS: Emergency call in progress.
  61. *
  62. * Status of the positioning session.
  63. *
  64. * Since: 1.0
  65. */
  66. typedef enum { /*< since=1.0 >*/
  67. QMI_PDS_POSITION_SESSION_STATUS_SUCCESS = 0x00,
  68. QMI_PDS_POSITION_SESSION_STATUS_IN_PROGRESS = 0x01,
  69. QMI_PDS_POSITION_SESSION_STATUS_GENERAL_FAILURE = 0x02,
  70. QMI_PDS_POSITION_SESSION_STATUS_TIMEOUT = 0x03,
  71. QMI_PDS_POSITION_SESSION_STATUS_USER_ENDED_SESSION = 0x04,
  72. QMI_PDS_POSITION_SESSION_STATUS_BAD_PARAMETER = 0x05,
  73. QMI_PDS_POSITION_SESSION_STATUS_PHONE_OFFLINE = 0x06,
  74. QMI_PDS_POSITION_SESSION_STATUS_ENGINE_LOCKED = 0x07,
  75. QMI_PDS_POSITION_SESSION_STATUS_E911_SESSION_IN_PROGRESS = 0x08
  76. } QmiPdsPositionSessionStatus;
  77. /**
  78. * QmiPdsDataValid:
  79. * @QMI_PDS_DATA_VALID_TIMESTAMP_CALENDAR: Timestamp calendar (GPS time).
  80. * @QMI_PDS_DATA_VALID_TIMESTAMP_UTC: Timestamp (UTC).
  81. * @QMI_PDS_DATA_VALID_LEAP_SECONDS: Leap seconds.
  82. * @QMI_PDS_DATA_VALID_TIME_UNCERTAINTY: Time uncertainty.
  83. * @QMI_PDS_DATA_VALID_LATITUDE: Latitude.
  84. * @QMI_PDS_DATA_VALID_LONGITUDE: Longitude.
  85. * @QMI_PDS_DATA_VALID_ELLIPSOID_ALTITUDE: Ellipsoid altitude.
  86. * @QMI_PDS_DATA_VALID_MEAN_SEA_LEVEL_ALTITUDE: Mean sea level altitude.
  87. * @QMI_PDS_DATA_VALID_HORIZONTAL_SPEED: Horizontal speed.
  88. * @QMI_PDS_DATA_VALID_VERTICAL_SPEED: Vertical speed.
  89. * @QMI_PDS_DATA_VALID_HEADING: Heading.
  90. * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_CIRCULAR: Horizontal uncertainty circular.
  91. * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MAJOR: Horizontal uncertainty ellipse semi-major.
  92. * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MINOR: Horizontal uncertainty ellipse semi-minor.
  93. * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_ORIENT_AZIMUTH: Horizontal uncertainty ellipse orient azimuth.
  94. * @QMI_PDS_DATA_VALID_VERTICAL_UNCERTAINTY: Vertical uncertainty.
  95. * @QMI_PDS_DATA_VALID_HORIZONTAL_VELOCITY_UNCERTAINTY: Horizontal velocity uncertainty.
  96. * @QMI_PDS_DATA_VALID_VERTICAL_VELOCITY_UNCERTAINTY: Vertical velocity uncertainty.
  97. * @QMI_PDS_DATA_VALID_HORIZONTAL_CONFIDENCE: Horizontal confidence.
  98. * @QMI_PDS_DATA_VALID_POSITION_DOP: Position dillution of precision.
  99. * @QMI_PDS_DATA_VALID_HORIZONTAL_DOP: Horizontal dillution of precision.
  100. * @QMI_PDS_DATA_VALID_VERTICAL_DOP: Vertical dillution of precision.
  101. * @QMI_PDS_DATA_VALID_OPERATING_MODE: Operating mode.
  102. *
  103. * Flags to indicate which position data parameters are valid.
  104. *
  105. * Since: 1.0
  106. */
  107. typedef enum { /*< since=1.0 >*/
  108. QMI_PDS_DATA_VALID_TIMESTAMP_CALENDAR = 1 << 0,
  109. QMI_PDS_DATA_VALID_TIMESTAMP_UTC = 1 << 1,
  110. QMI_PDS_DATA_VALID_LEAP_SECONDS = 1 << 2,
  111. QMI_PDS_DATA_VALID_TIME_UNCERTAINTY = 1 << 3,
  112. QMI_PDS_DATA_VALID_LATITUDE = 1 << 4,
  113. QMI_PDS_DATA_VALID_LONGITUDE = 1 << 5,
  114. QMI_PDS_DATA_VALID_ELLIPSOID_ALTITUDE = 1 << 6,
  115. QMI_PDS_DATA_VALID_MEAN_SEA_LEVEL_ALTITUDE = 1 << 7,
  116. QMI_PDS_DATA_VALID_HORIZONTAL_SPEED = 1 << 8,
  117. QMI_PDS_DATA_VALID_VERTICAL_SPEED = 1 << 9,
  118. QMI_PDS_DATA_VALID_HEADING = 1 << 10,
  119. QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_CIRCULAR = 1 << 11,
  120. QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MAJOR = 1 << 12,
  121. QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MINOR = 1 << 13,
  122. QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_ORIENT_AZIMUTH = 1 << 14,
  123. QMI_PDS_DATA_VALID_VERTICAL_UNCERTAINTY = 1 << 15,
  124. QMI_PDS_DATA_VALID_HORIZONTAL_VELOCITY_UNCERTAINTY = 1 << 16,
  125. QMI_PDS_DATA_VALID_VERTICAL_VELOCITY_UNCERTAINTY = 1 << 17,
  126. QMI_PDS_DATA_VALID_HORIZONTAL_CONFIDENCE = 1 << 18,
  127. QMI_PDS_DATA_VALID_POSITION_DOP = 1 << 19,
  128. QMI_PDS_DATA_VALID_HORIZONTAL_DOP = 1 << 20,
  129. QMI_PDS_DATA_VALID_VERTICAL_DOP = 1 << 21,
  130. QMI_PDS_DATA_VALID_OPERATING_MODE = 1 << 22
  131. } QmiPdsDataValid;
  132. /*****************************************************************************/
  133. /* Helper enums for the 'QMI PDS Get GPS Service State' request/response */
  134. /**
  135. * QmiPdsTrackingSessionState:
  136. * @QMI_PDS_TRACKING_SESSION_STATE_UNKNOWN: Unknown state.
  137. * @QMI_PDS_TRACKING_SESSION_STATE_INACTIVE: Session inactive.
  138. * @QMI_PDS_TRACKING_SESSION_STATE_ACTIVE: Session active.
  139. *
  140. * State of the tracking session.
  141. *
  142. * Since: 1.0
  143. */
  144. typedef enum { /*< since=1.0 >*/
  145. QMI_PDS_TRACKING_SESSION_STATE_UNKNOWN = 0,
  146. QMI_PDS_TRACKING_SESSION_STATE_INACTIVE = 1,
  147. QMI_PDS_TRACKING_SESSION_STATE_ACTIVE = 2
  148. } QmiPdsTrackingSessionState;
  149. /*****************************************************************************/
  150. /* Helper enums for the 'QMI PDS Get Default Tracking Session' request/response */
  151. /**
  152. * QmiPdsOperatingMode:
  153. * @QMI_PDS_OPERATING_MODE_STANDALONE: Standalone (GPS only).
  154. * @QMI_PDS_OPERATING_MODE_MS_BASED: Mobile Station Based (MSB) A-GPS
  155. * @QMI_PDS_OPERATING_MODE_MS_ASSISTED: Mobile Station Assisted (MSA) A-GPS.
  156. *
  157. * GPS operating mode.
  158. *
  159. * Since: 1.12
  160. */
  161. typedef enum { /*< since=1.12 >*/
  162. QMI_PDS_OPERATING_MODE_STANDALONE = 0,
  163. QMI_PDS_OPERATING_MODE_MS_BASED = 1,
  164. QMI_PDS_OPERATING_MODE_MS_ASSISTED = 2,
  165. } QmiPdsOperatingMode;
  166. /*****************************************************************************/
  167. /* Helper enums for the 'QMI PDS Get AGPS Config' request/response */
  168. /**
  169. * QmiPdsNetworkMode:
  170. * @QMI_PDS_NETWORK_MODE_UMTS: UMTS.
  171. * @QMI_PDS_NETWORK_MODE_CDMA: CDMA.
  172. *
  173. * Network mode used during the A-GPS setup.
  174. *
  175. * Since: 1.12
  176. */
  177. typedef enum { /*< since=1.12 >*/
  178. QMI_PDS_NETWORK_MODE_UMTS = 0,
  179. QMI_PDS_NETWORK_MODE_CDMA = 1,
  180. } QmiPdsNetworkMode;
  181. #endif /* _LIBQMI_GLIB_QMI_ENUMS_PDS_H_ */