diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2019-07-09 13:54:42 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2019-07-11 23:21:00 +0200 |
commit | b9a3290871166a7044d9db2f701e36cccc20d13f (patch) | |
tree | b4fe5c0c022112ae0c3413aa053a5ded85bdcc58 | |
parent | 63ccd363615a678c0cd86ce65e030b1a70df9bb5 (diff) |
iface-modem-time: allow updating network timezone via URCs
-rw-r--r-- | src/mm-iface-modem-time.c | 21 | ||||
-rw-r--r-- | src/mm-iface-modem-time.h | 6 |
2 files changed, 25 insertions, 2 deletions
diff --git a/src/mm-iface-modem-time.c b/src/mm-iface-modem-time.c index d1a0dfbd..b8d35bf8 100644 --- a/src/mm-iface-modem-time.c +++ b/src/mm-iface-modem-time.c @@ -354,6 +354,27 @@ mm_iface_modem_time_update_network_time (MMIfaceModemTime *self, g_object_unref (skeleton); } +void +mm_iface_modem_time_update_network_timezone (MMIfaceModemTime *self, + MMNetworkTimezone *tz) +{ + MmGdbusModemTime *skeleton; + GVariant *dictionary; + + g_object_get (self, + MM_IFACE_MODEM_TIME_DBUS_SKELETON, &skeleton, + NULL); + if (!skeleton) + return; + + dictionary = mm_network_timezone_get_dictionary (tz); + mm_gdbus_modem_time_set_network_timezone (skeleton, dictionary); + if (dictionary) + g_variant_unref (dictionary); + + g_object_unref (skeleton); +} + /*****************************************************************************/ typedef struct _DisablingContext DisablingContext; diff --git a/src/mm-iface-modem-time.h b/src/mm-iface-modem-time.h index 7712e4cf..462d8b96 100644 --- a/src/mm-iface-modem-time.h +++ b/src/mm-iface-modem-time.h @@ -130,7 +130,9 @@ void mm_iface_modem_time_bind_simple_status (MMIfaceModemTime *self, /* Implementations of the unsolicited events handling should call this method * to notify about the updated time */ -void mm_iface_modem_time_update_network_time (MMIfaceModemTime *self, - const gchar *network_time); +void mm_iface_modem_time_update_network_time (MMIfaceModemTime *self, + const gchar *network_time); +void mm_iface_modem_time_update_network_timezone (MMIfaceModemTime *self, + MMNetworkTimezone *tz); #endif /* MM_IFACE_MODEM_TIME_H */ |