samsung: user Icera-based timezone loading
This commit is contained in:
@@ -665,7 +665,8 @@ void mm_iface_icera_modem_reset (MMIfaceModem *self,
|
||||
static gboolean
|
||||
parse_tlts_query_reply (const gchar *response,
|
||||
gchar **iso8601,
|
||||
MMNetworkTimezone **tz)
|
||||
MMNetworkTimezone **tz,
|
||||
GError **error)
|
||||
{
|
||||
gint year;
|
||||
gint month;
|
||||
@@ -710,7 +711,11 @@ parse_tlts_query_reply (const gchar *response,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
mm_warn ("Unknown *TLTS response: %s", response);
|
||||
g_set_error (error,
|
||||
MM_CORE_ERROR,
|
||||
MM_CORE_ERROR_FAILED,
|
||||
"Unknown *TLTS response: %s",
|
||||
response);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -722,7 +727,6 @@ mm_iface_icera_modem_time_load_network_timezone_finish (MMIfaceModemTime *self,
|
||||
const gchar *response;
|
||||
MMNetworkTimezone *tz;
|
||||
|
||||
|
||||
response = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, NULL);
|
||||
if (!response) {
|
||||
/* We'll assume we can retry a bit later */
|
||||
@@ -733,7 +737,7 @@ mm_iface_icera_modem_time_load_network_timezone_finish (MMIfaceModemTime *self,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return (parse_tlts_query_reply (response, NULL, &tz) ? tz : NULL);
|
||||
return (parse_tlts_query_reply (response, NULL, &tz, error) ? tz : NULL);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -29,18 +29,21 @@
|
||||
#include "mm-iface-icera.h"
|
||||
#include "mm-iface-modem.h"
|
||||
#include "mm-iface-modem-3gpp.h"
|
||||
#include "mm-iface-modem-time.h"
|
||||
#include "mm-modem-helpers.h"
|
||||
#include "mm-log.h"
|
||||
|
||||
static void iface_icera_init (MMIfaceIcera *iface);
|
||||
static void iface_modem_init (MMIfaceModem *iface);
|
||||
static void iface_modem_3gpp_init (MMIfaceModem3gpp *iface);
|
||||
static void iface_modem_time_init (MMIfaceModemTime *iface);
|
||||
|
||||
static MMIfaceModem3gpp *iface_modem_3gpp_parent;
|
||||
|
||||
G_DEFINE_TYPE_EXTENDED (MMBroadbandModemSamsung, mm_broadband_modem_samsung, MM_TYPE_BROADBAND_MODEM, 0,
|
||||
G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM, iface_modem_init)
|
||||
G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM_3GPP, iface_modem_3gpp_init)
|
||||
G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM_TIME, iface_modem_time_init)
|
||||
G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_ICERA, iface_icera_init));
|
||||
|
||||
/*****************************************************************************/
|
||||
@@ -725,6 +728,14 @@ iface_modem_init (MMIfaceModem *iface)
|
||||
iface->create_bearer_finish = mm_iface_icera_modem_create_bearer_finish;
|
||||
}
|
||||
|
||||
static void
|
||||
iface_modem_time_init (MMIfaceModemTime *iface)
|
||||
{
|
||||
/* Use default Icera implementation */
|
||||
iface->load_network_timezone = mm_iface_icera_modem_time_load_network_timezone;
|
||||
iface->load_network_timezone_finish = mm_iface_icera_modem_time_load_network_timezone_finish;
|
||||
}
|
||||
|
||||
static void
|
||||
iface_icera_init (MMIfaceIcera *iface)
|
||||
{
|
||||
|
Reference in New Issue
Block a user