diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-09-18 09:16:44 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-09-18 13:14:38 +0200 |
commit | 202acdbdd2e10d3db3e08b96884aff5ff16606fd (patch) | |
tree | 18de325f2151ce0c097ad37e89d8fa41c0f3cf6c | |
parent | c8137b6d0f27ea7b012d9c0656b437140d42f68f (diff) |
pds: implement "Get/Set GPS Service State" requests/responses
-rw-r--r-- | data/qmi-service-pds.json | 38 | ||||
-rw-r--r-- | libqmi-glib/qmi-enums-pds.h | 17 |
2 files changed, 54 insertions, 1 deletions
diff --git a/data/qmi-service-pds.json b/data/qmi-service-pds.json index c45fb70..0a57e91 100644 --- a/data/qmi-service-pds.json +++ b/data/qmi-service-pds.json @@ -178,7 +178,7 @@ "mandatory" : "no", "type" : "TLV", "format" : "guint8", - "public-format" : "QmiPdsPositionSessionStatus" } ] } + "public-format" : "QmiPdsPositionSessionStatus" } ] }, // TODO: parse all TLVs of this indication // Reading gfloat/gdouble is still missing @@ -256,4 +256,40 @@ // "operation" : "<=", // "value" : "QMI_PDS_POSITION_SESSION_STATUS_IN_PROGRESS" } ] } ] } + // ********************************************************************************* + { "name" : "Get GPS Service State", + "type" : "Message", + "service" : "PDS", + "id" : "0x0020", + "version" : "1.0", + "output" : [ { "common-ref" : "Operation Result" }, + { "name" : "State", + "id" : "0x01", + "mandatory" : "yes", + "type" : "TLV", + "format" : "sequence", + "contents" : [ { "name" : "GPS Service State", + "format" : "guint8", + "public-format" : "gboolean" }, + { "name" : "Tracking Session State", + "format" : "guint8", + "public-format" : "QmiPdsTrackingSessionState" } ], + "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, + + // ********************************************************************************* + { "name" : "Set GPS Service State", + "type" : "Message", + "service" : "PDS", + "id" : "0x0021", + "version" : "1.0", + "input" : [ { "name" : "State", + "id" : "0x01", + "mandatory" : "yes", + "type" : "TLV", + "format" : "sequence", + "contents" : [ { "name" : "GPS Service State", + "format" : "guint8", + "public-format" : "gboolean" } ] } ], + "output" : [ { "common-ref" : "Operation Result" } ] } + ] diff --git a/libqmi-glib/qmi-enums-pds.h b/libqmi-glib/qmi-enums-pds.h index b20a0b9..bed6b26 100644 --- a/libqmi-glib/qmi-enums-pds.h +++ b/libqmi-glib/qmi-enums-pds.h @@ -122,4 +122,21 @@ typedef enum { QMI_PDS_DATA_VALID_OPERATING_MODE = 1 << 22 } QmiPdsDataValid; +/*****************************************************************************/ +/* Helper enums for the 'QMI PDS Get GPS Service State' request/response */ + +/** + * QmiPdsTrackingSessionState: + * @QMI_PDS_TRACKING_SESSION_STATE_UNKNOWN: Unknown state. + * @QMI_PDS_TRACKING_SESSION_STATE_INACTIVE: Session inactive. + * @QMI_PDS_TRACKING_SESSION_STATE_ACTIVE: Session active. + * + * State of the tracking session. + */ +typedef enum { + QMI_PDS_TRACKING_SESSION_STATE_UNKNOWN = 0, + QMI_PDS_TRACKING_SESSION_STATE_INACTIVE = 1, + QMI_PDS_TRACKING_SESSION_STATE_ACTIVE = 2 +} QmiPdsTrackingSessionState; + #endif /* _LIBQMI_GLIB_QMI_ENUMS_PDS_H_ */ |