diff options
-rw-r--r-- | src/mm-iface-modem-3gpp.c | 28 | ||||
-rw-r--r-- | src/mm-iface-modem-3gpp.h | 20 |
2 files changed, 48 insertions, 0 deletions
diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c index b63b51ae..053c480b 100644 --- a/src/mm-iface-modem-3gpp.c +++ b/src/mm-iface-modem-3gpp.c @@ -97,7 +97,9 @@ typedef enum { ENABLING_STEP_FIRST, ENABLING_STEP_SETUP_UNSOLICITED_REGISTRATION, ENABLING_STEP_SETUP_CS_REGISTRATION, + ENABLING_STEP_RUN_CS_REGISTRATION_CHECK, ENABLING_STEP_SETUP_PS_REGISTRATION, + ENABLING_STEP_RUN_PS_REGISTRATION_CHECK, ENABLING_STEP_LAST } EnablingStep; @@ -173,7 +175,9 @@ mm_iface_modem_3gpp_enable_finish (MMIfaceModem3gpp *self, } VOID_REPLY_READY_FN (setup_cs_registration) +VOID_REPLY_READY_FN (run_cs_registration_check) VOID_REPLY_READY_FN (setup_ps_registration) +VOID_REPLY_READY_FN (run_ps_registration_check) VOID_REPLY_READY_FN (setup_unsolicited_registration) static void @@ -208,6 +212,18 @@ interface_enabling_step (EnablingContext *ctx) /* Fall down to next step */ ctx->step++; + case ENABLING_STEP_RUN_CS_REGISTRATION_CHECK: + if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->run_cs_registration_check && + MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->run_cs_registration_check_finish) { + MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->run_cs_registration_check ( + ctx->self, + (GAsyncReadyCallback)run_cs_registration_check_ready, + ctx); + return; + } + /* Fall down to next step */ + ctx->step++; + case ENABLING_STEP_SETUP_PS_REGISTRATION: if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->setup_ps_registration && MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->setup_ps_registration_finish) { @@ -220,6 +236,18 @@ interface_enabling_step (EnablingContext *ctx) /* Fall down to next step */ ctx->step++; + case ENABLING_STEP_RUN_PS_REGISTRATION_CHECK: + if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->run_ps_registration_check && + MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->run_ps_registration_check_finish) { + MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->run_ps_registration_check ( + ctx->self, + (GAsyncReadyCallback)run_ps_registration_check_ready, + ctx); + return; + } + /* Fall down to next step */ + ctx->step++; + case ENABLING_STEP_LAST: /* We are done without errors! */ g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); diff --git a/src/mm-iface-modem-3gpp.h b/src/mm-iface-modem-3gpp.h index f9a2b084..8962d0d7 100644 --- a/src/mm-iface-modem-3gpp.h +++ b/src/mm-iface-modem-3gpp.h @@ -65,6 +65,26 @@ struct _MMIfaceModem3gpp { gboolean (*setup_ps_registration_finish) (MMIfaceModem3gpp *self, GAsyncResult *res, GError **error); + + /* Run CS registration state check. + * Note that no registration state is returned, implementations should call + * mm_iface_modem_3gpp_update_registration_state(). */ + void (* run_cs_registration_check) (MMIfaceModem3gpp *self, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*run_cs_registration_check_finish) (MMIfaceModem3gpp *self, + GAsyncResult *res, + GError **error); + + /* Run PS registration state check. + * Note that no registration state is returned, implementations should call + * mm_iface_modem_3gpp_update_registration_state(). */ + void (* run_ps_registration_check) (MMIfaceModem3gpp *self, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*run_ps_registration_check_finish) (MMIfaceModem3gpp *self, + GAsyncResult *res, + GError **error); }; GType mm_iface_modem_3gpp_get_type (void); |