diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2015-12-03 17:06:16 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2015-12-19 12:22:30 +0100 |
commit | 6c35878f12ab37604d85cb3a864e3859973bd195 (patch) | |
tree | 8cb47c2e08eed2a95be75c580a37ffbc8519cfec /libmm-glib/mm-modem-location.h | |
parent | aae96778c54a59dcf3955c2d81bee393c0348077 (diff) |
location: support updating the GPS refresh time
The default setup uses a refresh time of 30s, which means that even if the GPS
location updates are received at a higher frequency, the DBus interface will
still expose at most one update every 30s.
This patch includes a new "SetGpsRefreshTime()" method in the Location
interface, which takes a single 'u' parameter, specifying the refresh rate to
use, in seconds. This method also allows 0 being passed, which will make the
implementation to publish the GPS location updates are soon as ModemManager
detects them.
Along with the new method, a "GpsRefreshTime" read-only property is exposed
to specify the refresh time in effect.
The new method and property will only be applicable if the device has GPS
capabilities.
https://bugs.freedesktop.org/show_bug.cgi?id=89924
Diffstat (limited to 'libmm-glib/mm-modem-location.h')
-rw-r--r-- | libmm-glib/mm-modem-location.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libmm-glib/mm-modem-location.h b/libmm-glib/mm-modem-location.h index 279288d7..2d806bef 100644 --- a/libmm-glib/mm-modem-location.h +++ b/libmm-glib/mm-modem-location.h @@ -79,6 +79,8 @@ gboolean mm_modem_location_signals_location (MMModemLocation *self) const gchar *mm_modem_location_get_supl_server (MMModemLocation *self); gchar *mm_modem_location_dup_supl_server (MMModemLocation *self); +guint mm_modem_location_get_gps_refresh_rate (MMModemLocation *self); + void mm_modem_location_setup (MMModemLocation *self, MMModemLocationSource sources, gboolean signal_location, @@ -107,6 +109,19 @@ gboolean mm_modem_location_set_supl_server_sync (MMModemLocation *self, GCancellable *cancellable, GError **error); +void mm_modem_location_set_gps_refresh_rate (MMModemLocation *self, + guint rate, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean mm_modem_location_set_gps_refresh_rate_finish (MMModemLocation *self, + GAsyncResult *res, + GError **error); +gboolean mm_modem_location_set_gps_refresh_rate_sync (MMModemLocation *self, + guint rate, + GCancellable *cancellable, + GError **error); + void mm_modem_location_get_3gpp (MMModemLocation *self, GCancellable *cancellable, GAsyncReadyCallback callback, |