summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2012-12-05 19:53:44 (GMT)
committerDan Williams <dcbw@redhat.com>2012-12-05 20:38:50 (GMT)
commit4b23fd00a0dd1e4c5127124af01a60d48e7dcdb7 (patch)
treed377c9d5a36cd0e374171ce200002d790c77093b
parent8c1f80a9a44e686b8f12dcbafa0d3d9b6ad5b7f0 (diff)
icera: implement Time interface support check
-rw-r--r--plugins/icera/mm-broadband-modem-icera.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/plugins/icera/mm-broadband-modem-icera.c b/plugins/icera/mm-broadband-modem-icera.c
index 153356f..ca292fd 100644
--- a/plugins/icera/mm-broadband-modem-icera.c
+++ b/plugins/icera/mm-broadband-modem-icera.c
@@ -1535,6 +1535,37 @@ modem_time_load_network_time (MMIfaceModemTime *self,
}
/*****************************************************************************/
+/* Check support (Time interface) */
+
+static gboolean
+modem_time_check_support_finish (MMIfaceModemTime *self,
+ GAsyncResult *res,
+ GError **error)
+{
+ /* We assume Icera devices always support *TLTS, since they appear
+ * to return ERROR if the modem is not powered up, and thus we cannot
+ * check for *TLTS support during modem initialization.
+ */
+ return TRUE;
+}
+
+static void
+modem_time_check_support (MMIfaceModemTime *self,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ GSimpleAsyncResult *result;
+
+ result = g_simple_async_result_new (G_OBJECT (self),
+ callback,
+ user_data,
+ modem_time_check_support);
+
+ g_simple_async_result_complete_in_idle (result);
+ g_object_unref (result);
+}
+
+/*****************************************************************************/
/* Setup ports (Broadband modem class) */
static void
@@ -1677,7 +1708,8 @@ iface_modem_3gpp_init (MMIfaceModem3gpp *iface)
static void
iface_modem_time_init (MMIfaceModemTime *iface)
{
- /* Use default Icera implementation */
+ iface->check_support = modem_time_check_support;
+ iface->check_support_finish = modem_time_check_support_finish;
iface->load_network_time = modem_time_load_network_time;
iface->load_network_time_finish = modem_time_load_network_time_finish;
iface->load_network_timezone = modem_time_load_network_timezone;