diff options
author | Zeeshan Ali <zeeshanak@gnome.org> | 2018-04-17 12:24:02 +0200 |
---|---|---|
committer | Zeeshan Ali <zeeshanak@gnome.org> | 2018-04-19 00:23:45 +0200 |
commit | db47f58dbe9922dca4abb929ca0262e7e4a21221 (patch) | |
tree | b55de5496dd25d63e7038c0ab1905af49ca1c749 /src/gclue-modem-gps.c | |
parent | 6e4a99333d3eeeaaa77c16d2fe6621a0932aa433 (diff) | |
download | geoclue-db47f58dbe9922dca4abb929ca0262e7e4a21221.tar.gz |
modem-gps: Forward time-threshold to modem
https://bugs.freedesktop.org/show_bug.cgi?id=105993
Diffstat (limited to 'src/gclue-modem-gps.c')
-rw-r--r-- | src/gclue-modem-gps.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gclue-modem-gps.c b/src/gclue-modem-gps.c index 1a44f22..bd0c473 100644 --- a/src/gclue-modem-gps.c +++ b/src/gclue-modem-gps.c @@ -107,6 +107,18 @@ on_is_gps_available_notify (GObject *gobject, } static void +on_time_threshold_changed (GObject *gobject, + GParamSpec *pspec, + gpointer user_data) +{ + GClueModemGPS *source = GCLUE_MODEM_GPS (user_data); + guint threshold; + + threshold = gclue_min_uint_get_value (GCLUE_MIN_UINT (gobject)); + gclue_modem_set_time_threshold (source->priv->modem, threshold); +} + +static void gclue_modem_gps_finalize (GObject *ggps) { GClueModemGPSPrivate *priv = GCLUE_MODEM_GPS (ggps)->priv; @@ -140,6 +152,7 @@ static void gclue_modem_gps_init (GClueModemGPS *source) { GClueModemGPSPrivate *priv; + GClueMinUINT *threshold; source->priv = G_TYPE_INSTANCE_GET_PRIVATE ((source), GCLUE_TYPE_MODEM_GPS, GClueModemGPSPrivate); priv = source->priv; @@ -152,6 +165,12 @@ gclue_modem_gps_init (GClueModemGPS *source) "notify::is-gps-available", G_CALLBACK (on_is_gps_available_notify), source); + threshold = gclue_location_source_get_time_threshold + (GCLUE_LOCATION_SOURCE (source)); + g_signal_connect (threshold, + "notify::value", + G_CALLBACK (on_time_threshold_changed), + source); } static void |