diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-07-13 12:43:13 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-08-29 17:26:41 +0200 |
commit | 086a25da98e0902cb466cbb02d115adeb7d30023 (patch) | |
tree | 8840ddaf6dde8e1c30123f73fcd0e6af0af38712 /src | |
parent | e64bb097312078d88e603b8a7656bc3fc1d7f49b (diff) |
broadband-modem-qmi: create a `MMSimQmi' by default
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-broadband-modem-qmi.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c index 3800686e..15d7454b 100644 --- a/src/mm-broadband-modem-qmi.c +++ b/src/mm-broadband-modem-qmi.c @@ -27,6 +27,7 @@ #include "mm-log.h" #include "mm-errors-types.h" #include "mm-iface-modem.h" +#include "mm-sim-qmi.h" static void iface_modem_init (MMIfaceModem *iface); @@ -839,6 +840,29 @@ modem_load_unlock_retries (MMIfaceModem *self, } /*****************************************************************************/ +/* Create SIM (Modem interface) */ + +static MMSim * +create_sim_finish (MMIfaceModem *self, + GAsyncResult *res, + GError **error) +{ + return mm_sim_qmi_new_finish (res, error); +} + +static void +create_sim (MMIfaceModem *self, + GAsyncReadyCallback callback, + gpointer user_data) +{ + /* New QMI SIM */ + mm_sim_qmi_new (MM_BASE_MODEM (self), + NULL, /* cancellable */ + callback, + user_data); +} + +/*****************************************************************************/ /* First initialization step */ typedef struct { @@ -1051,6 +1075,10 @@ iface_modem_init (MMIfaceModem *iface) iface->load_unlock_required_finish = modem_load_unlock_required_finish; iface->load_unlock_retries = modem_load_unlock_retries; iface->load_unlock_retries_finish = modem_load_unlock_retries_finish; + + /* Create QMI-specific SIM */ + iface->create_sim = create_sim; + iface->create_sim_finish = create_sim_finish; } static void |