diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2014-02-06 11:10:53 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2014-09-05 11:28:10 +0200 |
commit | fbeee20d5b7789bd0bcd4e4ab1dce784390e5ebd (patch) | |
tree | 72b7b63e6e4191566d72db6769f7e9b3403be0d9 | |
parent | 02961c388b54fe3a00419004d2e9f1ce6025751c (diff) | |
download | ModemManager-fbeee20d5b7789bd0bcd4e4ab1dce784390e5ebd.tar.gz |
introspection,api: add SUPL server configuration in the Location interface
-rw-r--r-- | docs/reference/libmm-glib/libmm-glib-sections.txt | 7 | ||||
-rw-r--r-- | include/ModemManager-enums.h | 2 | ||||
-rw-r--r-- | introspection/org.freedesktop.ModemManager1.Modem.Location.xml | 25 | ||||
-rw-r--r-- | src/mm-iface-modem-location.c | 10 |
4 files changed, 41 insertions, 3 deletions
diff --git a/docs/reference/libmm-glib/libmm-glib-sections.txt b/docs/reference/libmm-glib/libmm-glib-sections.txt index febab6719..7795afbad 100644 --- a/docs/reference/libmm-glib/libmm-glib-sections.txt +++ b/docs/reference/libmm-glib/libmm-glib-sections.txt @@ -1895,6 +1895,8 @@ mm_gdbus_modem_location_get_capabilities mm_gdbus_modem_location_get_signals_location mm_gdbus_modem_location_get_location mm_gdbus_modem_location_dup_location +mm_gdbus_modem_location_dup_supl_server +mm_gdbus_modem_location_get_supl_server <SUBSECTION Methods> mm_gdbus_modem_location_call_get_location mm_gdbus_modem_location_call_get_location_finish @@ -1902,13 +1904,18 @@ mm_gdbus_modem_location_call_get_location_sync mm_gdbus_modem_location_call_setup mm_gdbus_modem_location_call_setup_finish mm_gdbus_modem_location_call_setup_sync +mm_gdbus_modem_location_call_set_supl_server +mm_gdbus_modem_location_call_set_supl_server_finish +mm_gdbus_modem_location_call_set_supl_server_sync <SUBSECTION Private> mm_gdbus_modem_location_set_capabilities mm_gdbus_modem_location_set_enabled mm_gdbus_modem_location_set_location mm_gdbus_modem_location_set_signals_location +mm_gdbus_modem_location_set_supl_server mm_gdbus_modem_location_complete_get_location mm_gdbus_modem_location_complete_setup +mm_gdbus_modem_location_complete_set_supl_server mm_gdbus_modem_location_interface_info mm_gdbus_modem_location_override_properties <SUBSECTION Standard> diff --git a/include/ModemManager-enums.h b/include/ModemManager-enums.h index 87e5c5e7a..57a2b2775 100644 --- a/include/ModemManager-enums.h +++ b/include/ModemManager-enums.h @@ -819,6 +819,7 @@ typedef enum { /*< underscore_name=mm_sms_cdma_service_category >*/ * @MM_MODEM_LOCATION_SOURCE_GPS_NMEA: GPS location given as NMEA traces. * @MM_MODEM_LOCATION_SOURCE_CDMA_BS: CDMA base station position. * @MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED: No location given, just GPS module setup. + * @MM_MODEM_LOCATION_SOURCE_AGPS: A-GPS location requested. * * Sources of location information supported by the modem. */ @@ -829,6 +830,7 @@ typedef enum { /*< underscore_name=mm_modem_location_source >*/ MM_MODEM_LOCATION_SOURCE_GPS_NMEA = 1 << 2, MM_MODEM_LOCATION_SOURCE_CDMA_BS = 1 << 3, MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED = 1 << 4, + MM_MODEM_LOCATION_SOURCE_AGPS = 1 << 5, } MMModemLocationSource; /** diff --git a/introspection/org.freedesktop.ModemManager1.Modem.Location.xml b/introspection/org.freedesktop.ModemManager1.Modem.Location.xml index 3763f628a..93cf64065 100644 --- a/introspection/org.freedesktop.ModemManager1.Modem.Location.xml +++ b/introspection/org.freedesktop.ModemManager1.Modem.Location.xml @@ -40,6 +40,14 @@ <link linkend="gdbus-method-org-freedesktop-ModemManager1-Modem-Location.GetLocation">GetLocation()</link> ) to get location information. + + The optional + <link linkend="MM-MODEM-LOCATION-SOURCE-AGPS:CAPS">MM_MODEM_LOCATION_SOURCE_AGPS</link> + allows to request A-GPS operation, and it must be given along with either + <link linkend="MM-MODEM-LOCATION-SOURCE-GPS-RAW:CAPS">MM_MODEM_LOCATION_SOURCE_GPS_RAW</link> + or + <link linkend="MM-MODEM-LOCATION-SOURCE-GPS-NMEA:CAPS">MM_MODEM_LOCATION_SOURCE_GPS_NMEA</link>. + --> <method name="Setup"> <arg name="sources" type="u" direction="in" /> @@ -62,6 +70,16 @@ </method> <!-- + SetSuplServer: + @supl: SUPL server configuration, given either as IP:PORT or with a full URL. + + Configure the SUPL server for A-GPS. + --> + <method name="SetSuplServer"> + <arg name="supl" type="s" direction="in" /> + </method> + + <!-- Capabilities: Bitmask of <link linkend="MMModemLocationSource">MMModemLocationSource</link> @@ -265,5 +283,12 @@ --> <property name="Location" type="a{uv}" access="read" /> + <!-- + SuplServer: + + SUPL server configuration for A-GPS, given either as IP:PORT or with a full URL. + --> + <property name="SuplServer" type="s" access="read" /> + </interface> </node> diff --git a/src/mm-iface-modem-location.c b/src/mm-iface-modem-location.c index 57d5f2c1e..d67c42702 100644 --- a/src/mm-iface-modem-location.c +++ b/src/mm-iface-modem-location.c @@ -139,6 +139,8 @@ build_location_dictionary (GVariant *previous, break; case MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED: g_assert_not_reached (); + case MM_MODEM_LOCATION_SOURCE_AGPS: + g_assert_not_reached (); default: g_warn_if_reached (); break; @@ -508,6 +510,7 @@ update_location_source_status (MMIfaceModemLocation *self, g_clear_object (&ctx->location_cdma_bs); break; case MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED: + case MM_MODEM_LOCATION_SOURCE_AGPS: /* Nothing to setup in the context */ default: break; @@ -616,7 +619,7 @@ setup_gathering_step (SetupGatheringContext *ctx) return; } - while (ctx->current <= MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED) { + while (ctx->current <= MM_MODEM_LOCATION_SOURCE_AGPS) { gchar *source_str; if (ctx->to_enable & ctx->current) { @@ -713,7 +716,7 @@ setup_gathering (MMIfaceModemLocation *self, /* Loop through all known bits in the bitmask to enable/disable specific location sources */ for (source = MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI; - source <= MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED; + source <= MM_MODEM_LOCATION_SOURCE_AGPS; source = source << 1) { /* skip unsupported sources */ if (!(mm_gdbus_modem_location_get_capabilities (ctx->skeleton) & source)) @@ -1184,7 +1187,8 @@ interface_enabling_step (EnablingContext *ctx) default_sources = mm_gdbus_modem_location_get_capabilities (ctx->skeleton); default_sources &= ~(MM_MODEM_LOCATION_SOURCE_GPS_RAW | MM_MODEM_LOCATION_SOURCE_GPS_NMEA | - MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED); + MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED | + MM_MODEM_LOCATION_SOURCE_AGPS); setup_gathering (ctx->self, default_sources, |