iface-modem-time: allow updating network timezone via URCs

This commit is contained in:
Aleksander Morgado
2019-07-09 13:54:42 +02:00
parent 63ccd36361
commit b9a3290871
2 changed files with 25 additions and 2 deletions

View File

@@ -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;

View File

@@ -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 */