diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2018-06-28 09:29:55 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2018-07-10 22:42:50 +0200 |
commit | 107b15a1b28f8a81e9cea079e61f87c5f4abb628 (patch) | |
tree | ab353b53942f2db70af23ba7cc54c0da6f01b1f5 | |
parent | 9a7da00d46a09a2ddb1e6bb685e3503044f8171f (diff) | |
download | libqmi-107b15a1b28f8a81e9cea079e61f87c5f4abb628.tar.gz |
loc: implement 'Get Server' request/response/indication
-rw-r--r-- | data/qmi-service-loc.json | 62 | ||||
-rw-r--r-- | docs/reference/libqmi-glib/libqmi-glib-common.sections | 10 | ||||
-rw-r--r-- | docs/reference/libqmi-glib/libqmi-glib-docs.xml | 2 | ||||
-rw-r--r-- | src/libqmi-glib/qmi-enums-loc.h | 48 |
4 files changed, 122 insertions, 0 deletions
diff --git a/data/qmi-service-loc.json b/data/qmi-service-loc.json index 39ceb28a..9bf6bfaf 100644 --- a/data/qmi-service-loc.json +++ b/data/qmi-service-loc.json @@ -360,6 +360,68 @@ // ********************************************************************************* + { "name" : "Get Server", + "type" : "Message", + "service" : "LOC", + "id" : "0x0043", + "since" : "1.22", + "input" : [ { "name" : "Server Type", + "id" : "0x01", + "type" : "TLV", + "since" : "1.22", + "format" : "guint32", + "public-format" : "QmiLocServerType" }, + { "name" : "Server Address Type", + "id" : "0x10", + "type" : "TLV", + "since" : "1.22", + "format" : "guint8", + "public-format" : "QmiLocServerAddressType" }], + "output" : [ { "common-ref" : "Operation Result" } ] }, + + { "name" : "Get Server", + "type" : "Indication", + "service" : "LOC", + "id" : "0x0043", + "since" : "1.22", + "output" : [ { "common-ref" : "LOC Indication Status" }, + { "name" : "Server Type", + "id" : "0x02", + "type" : "TLV", + "since" : "1.22", + "format" : "guint32", + "public-format" : "QmiLocServerType" }, + { "name" : "IPv4", + "id" : "0x10", + "type" : "TLV", + "since" : "1.22", + "format" : "sequence", + "contents" : [ { "name" : "IPv4 Address", + "format" : "guint32", + "endian" : "little" }, + { "name" : "IPv4 Port", + "format" : "guint16" } ] }, + { "name" : "IPv6", + "id" : "0x11", + "type" : "TLV", + "since" : "1.22", + "format" : "sequence", + "contents" : [ { "name" : "IPv6 Address", + "format" : "array", + "array-element" : { "format" : "guint16", + "endian" : "network" } , + "fixed-size" : "8" }, + { "name" : "IPv6 Port", + "format" : "guint32" } ] }, + { "name" : "URL", + "id" : "0x12", + "type" : "TLV", + "since" : "1.22", + "format" : "string", + "max-size" : "256" } ] }, + + // ********************************************************************************* + { "name" : "Set Operation Mode", "type" : "Message", "service" : "LOC", diff --git a/docs/reference/libqmi-glib/libqmi-glib-common.sections b/docs/reference/libqmi-glib/libqmi-glib-common.sections index 314646bc..f0c72c4f 100644 --- a/docs/reference/libqmi-glib/libqmi-glib-common.sections +++ b/docs/reference/libqmi-glib/libqmi-glib-common.sections @@ -1085,6 +1085,8 @@ QmiLocTimeSource QmiLocTechnologyUsed QmiLocReliability QmiLocSessionStatus +QmiLocServerType +QmiLocServerAddressType <SUBSECTION Methods> qmi_loc_intermediate_report_state_get_string qmi_loc_fix_recurrence_type_get_string @@ -1100,6 +1102,8 @@ qmi_loc_session_status_get_string qmi_loc_system_get_string qmi_loc_technology_used_build_string_from_mask qmi_loc_time_source_get_string +qmi_loc_server_type_get_string +qmi_loc_server_address_type_build_string_from_mask <SUBSECTION Private> qmi_loc_intermediate_report_state_build_string_from_mask qmi_loc_operation_mode_build_string_from_mask @@ -1117,6 +1121,8 @@ qmi_loc_session_status_build_string_from_mask qmi_loc_system_build_string_from_mask qmi_loc_technology_used_get_string qmi_loc_time_source_build_string_from_mask +qmi_loc_server_type_build_string_from_mask +qmi_loc_server_address_type_get_string <SUBSECTION Standard> QMI_TYPE_LOC_INTERMEDIATE_REPORT_STATE QMI_TYPE_LOC_FIX_RECURRENCE_TYPE @@ -1132,6 +1138,8 @@ QMI_TYPE_LOC_SESSION_STATUS QMI_TYPE_LOC_SYSTEM QMI_TYPE_LOC_TECHNOLOGY_USED QMI_TYPE_LOC_TIME_SOURCE +QMI_TYPE_LOC_SERVER_TYPE +QMI_TYPE_LOC_SERVER_ADDRESS_TYPE qmi_loc_intermediate_report_state_get_type qmi_loc_fix_recurrence_type_get_type qmi_loc_operation_mode_get_type @@ -1146,6 +1154,8 @@ qmi_loc_session_status_get_type qmi_loc_system_get_type qmi_loc_technology_used_get_type qmi_loc_time_source_get_type +qmi_loc_server_type_get_type +qmi_loc_server_address_type_get_type </SECTION> <SECTION> diff --git a/docs/reference/libqmi-glib/libqmi-glib-docs.xml b/docs/reference/libqmi-glib/libqmi-glib-docs.xml index bebf17af..693548c4 100644 --- a/docs/reference/libqmi-glib/libqmi-glib-docs.xml +++ b/docs/reference/libqmi-glib/libqmi-glib-docs.xml @@ -385,6 +385,7 @@ <xi:include href="xml/qmi-indication-loc-engine-state.xml"/> <xi:include href="xml/qmi-indication-loc-fix-recurrence-type.xml"/> <xi:include href="xml/qmi-indication-loc-get-operation-mode.xml"/> + <xi:include href="xml/qmi-indication-loc-get-server.xml"/> </section> <section> <title>LOC Requests</title> @@ -393,6 +394,7 @@ <xi:include href="xml/qmi-message-loc-register-events.xml"/> <xi:include href="xml/qmi-message-loc-get-operation-mode.xml"/> <xi:include href="xml/qmi-message-loc-set-operation-mode.xml"/> + <xi:include href="xml/qmi-message-loc-get-server.xml"/> </section> </chapter> diff --git a/src/libqmi-glib/qmi-enums-loc.h b/src/libqmi-glib/qmi-enums-loc.h index 64a2f930..9c4ab87e 100644 --- a/src/libqmi-glib/qmi-enums-loc.h +++ b/src/libqmi-glib/qmi-enums-loc.h @@ -419,4 +419,52 @@ typedef enum { * Since: 1.22 */ +/** + * QmiLocServerType: + * @QMI_LOC_SERVER_TYPE_UNKNOWN: Unknown. + * @QMI_LOC_SERVER_TYPE_CDMA_PDE: CDMA Position Determining System. + * @QMI_LOC_SERVER_TYPE_CDMA_MPC: CDMA Mobile Positioning Center. + * @QMI_LOC_SERVER_TYPE_UMTS_SLP: SUPL Location Platform. + * @QMI_LOC_SERVER_TYPE_CUSTOM_PDE: Custom position determining system. + * + * Server type for Assisted-GPS. + * + * Since: 1.22 + */ +typedef enum { + QMI_LOC_SERVER_TYPE_UNKNOWN = 0, + QMI_LOC_SERVER_TYPE_CDMA_PDE = 1, + QMI_LOC_SERVER_TYPE_CDMA_MPC = 2, + QMI_LOC_SERVER_TYPE_UMTS_SLP = 3, + QMI_LOC_SERVER_TYPE_CUSTOM_PDE = 4, +} QmiLocServerType; + +/** + * qmi_loc_server_type_get_string + * + * Since: 1.22 + */ + +/** + * QmiLocServerAddressType: + * @QMI_LOC_SERVER_ADDRESS_TYPE_NONE: None. + * @QMI_LOC_SERVER_ADDRESS_TYPE_IPV4: IPv4 server address. + * @QMI_LOC_SERVER_ADDRESS_TYPE_IPV6: IPv6 server address. + * @QMI_LOC_SERVER_ADDRESS_TYPE_URL: URL server address. + * + * Type of server address for Assisted-GPS. + */ +typedef enum { + QMI_LOC_SERVER_ADDRESS_TYPE_NONE = 0, + QMI_LOC_SERVER_ADDRESS_TYPE_IPV4 = 1 << 0, + QMI_LOC_SERVER_ADDRESS_TYPE_IPV6 = 1 << 1, + QMI_LOC_SERVER_ADDRESS_TYPE_URL = 1 << 2, +} QmiLocServerAddressType; + +/** + * qmi_loc_server_address_type_build_string_from_mask + * + * Since: 1.22 + */ + #endif /* _LIBQMI_GLIB_QMI_ENUMS_LOC_H_ */ |