diff --git a/docs/reference/libmm-glib/libmm-glib-sections.txt b/docs/reference/libmm-glib/libmm-glib-sections.txt index febab671..7795afba 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 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 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 diff --git a/include/ModemManager-enums.h b/include/ModemManager-enums.h index 87e5c5e7..57a2b277 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 3763f628..93cf6406 100644 --- a/introspection/org.freedesktop.ModemManager1.Modem.Location.xml +++ b/introspection/org.freedesktop.ModemManager1.Modem.Location.xml @@ -40,6 +40,14 @@ GetLocation() ) to get location information. + + The optional + MM_MODEM_LOCATION_SOURCE_AGPS + allows to request A-GPS operation, and it must be given along with either + MM_MODEM_LOCATION_SOURCE_GPS_RAW + or + MM_MODEM_LOCATION_SOURCE_GPS_NMEA. + --> @@ -61,6 +69,16 @@ + + + + + + + + diff --git a/src/mm-iface-modem-location.c b/src/mm-iface-modem-location.c index 57d5f2c1..d67c4270 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,