From 091bf4dbd811a7e556613397cd0efa7b8998a2cd Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 2 Jul 2018 00:25:54 +0200 Subject: api: support location assistance data Sometimes SUPL-server based A-GPS is not possible, e.g. if the module doesn't have Internet connectivity. In such cases, the modem may support injecting additional "assistance data" that may be downloaded from the Internet using external means (e.g. WiFi), in order to keep having a quick time to first fix. We now support using this location assistance data, with the following new API elements: * A new mask of supported assistance data types is provided in the SupportedAssistanceData property. * A new list of URLs from where the aassistance data may be downloaded is also provided in a new AssistanceDataServers property. * A new InjectAssistanceData() method is provided, to perform the data injection in the module once it's been downloaded to the host system. --- libmm-glib/mm-modem-location.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'libmm-glib/mm-modem-location.h') diff --git a/libmm-glib/mm-modem-location.h b/libmm-glib/mm-modem-location.h index 2d806bef..e9ab9ea0 100644 --- a/libmm-glib/mm-modem-location.h +++ b/libmm-glib/mm-modem-location.h @@ -76,9 +76,14 @@ MMModemLocationSource mm_modem_location_get_enabled (MMModemLocation *self) gboolean mm_modem_location_signals_location (MMModemLocation *self); +MMModemLocationAssistanceDataType mm_modem_location_get_supported_assistance_data (MMModemLocation *self); + const gchar *mm_modem_location_get_supl_server (MMModemLocation *self); gchar *mm_modem_location_dup_supl_server (MMModemLocation *self); +const gchar **mm_modem_location_get_assistance_data_servers (MMModemLocation *self); +gchar **mm_modem_location_dup_assistance_data_servers (MMModemLocation *self); + guint mm_modem_location_get_gps_refresh_rate (MMModemLocation *self); void mm_modem_location_setup (MMModemLocation *self, @@ -109,6 +114,21 @@ gboolean mm_modem_location_set_supl_server_sync (MMModemLocation *self, GCancellable *cancellable, GError **error); +void mm_modem_location_inject_assistance_data (MMModemLocation *self, + const guint8 *data, + gsize data_size, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean mm_modem_location_inject_assistance_data_finish (MMModemLocation *self, + GAsyncResult *res, + GError **error); +gboolean mm_modem_location_inject_assistance_data_sync (MMModemLocation *self, + const guint8 *data, + gsize data_size, + GCancellable *cancellable, + GError **error); + void mm_modem_location_set_gps_refresh_rate (MMModemLocation *self, guint rate, GCancellable *cancellable, -- cgit v1.2.3-70-g09d2