aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-04-07 19:39:08 +0200
committerAleksander Morgado <aleksander@lanedo.com>2013-04-17 15:19:38 +0200
commit00ec505e741eed62a04d2d810dcbb9c841a09445 (patch)
treedfcceaaf4a83616cccdec88ed6b89c24b245ac44
parent3b8c9a0e2dd6ad5087312f62539fdaa7e68f5d21 (diff)
broadband-modem-mbim: implement equipment id loading
-rw-r--r--src/mm-broadband-modem-mbim.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/mm-broadband-modem-mbim.c b/src/mm-broadband-modem-mbim.c
index 9ad26d3d..8c35104b 100644
--- a/src/mm-broadband-modem-mbim.c
+++ b/src/mm-broadband-modem-mbim.c
@@ -188,6 +188,40 @@ modem_load_revision (MMIfaceModem *self,
}
/*****************************************************************************/
+/* Equipment Identifier loading (Modem interface) */
+
+static gchar *
+modem_load_equipment_identifier_finish (MMIfaceModem *self,
+ GAsyncResult *res,
+ GError **error)
+{
+ if (MM_BROADBAND_MODEM_MBIM (self)->priv->caps_device_id)
+ return g_strdup (MM_BROADBAND_MODEM_MBIM (self)->priv->caps_device_id);
+
+ g_set_error (error,
+ MM_CORE_ERROR,
+ MM_CORE_ERROR_FAILED,
+ "Device ID not given in device capabilities");
+ return NULL;
+}
+
+static void
+modem_load_equipment_identifier (MMIfaceModem *self,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ GSimpleAsyncResult *result;
+
+ /* Just complete */
+ result = g_simple_async_result_new (G_OBJECT (self),
+ callback,
+ user_data,
+ modem_load_equipment_identifier);
+ g_simple_async_result_complete_in_idle (result);
+ g_object_unref (result);
+}
+
+/*****************************************************************************/
/* Create Bearer (Modem interface) */
static MMBearer *
@@ -480,6 +514,8 @@ iface_modem_init (MMIfaceModem *iface)
iface->load_model_finish = NULL;
iface->load_revision = modem_load_revision;
iface->load_revision_finish = modem_load_revision_finish;
+ iface->load_equipment_identifier = modem_load_equipment_identifier;
+ iface->load_equipment_identifier_finish = modem_load_equipment_identifier_finish;
/* Create MBIM-specific SIM */
iface->create_sim = create_sim;