iface-modem-3gpp: setup unsolicited registration messages handling during enable
This commit is contained in:
@@ -49,6 +49,7 @@ static void interface_enabling_step (EnablingContext *ctx);
|
||||
|
||||
typedef enum {
|
||||
ENABLING_STEP_FIRST,
|
||||
ENABLING_STEP_SETUP_UNSOLICITED_REGISTRATION,
|
||||
ENABLING_STEP_SETUP_CS_REGISTRATION,
|
||||
ENABLING_STEP_SETUP_PS_REGISTRATION,
|
||||
ENABLING_STEP_LAST
|
||||
@@ -127,6 +128,7 @@ mm_iface_modem_3gpp_enable_finish (MMIfaceModem3gpp *self,
|
||||
|
||||
VOID_REPLY_READY_FN (setup_cs_registration)
|
||||
VOID_REPLY_READY_FN (setup_ps_registration)
|
||||
VOID_REPLY_READY_FN (setup_unsolicited_registration)
|
||||
|
||||
static void
|
||||
interface_enabling_step (EnablingContext *ctx)
|
||||
@@ -136,6 +138,18 @@ interface_enabling_step (EnablingContext *ctx)
|
||||
/* Fall down to next step */
|
||||
ctx->step++;
|
||||
|
||||
case ENABLING_STEP_SETUP_UNSOLICITED_REGISTRATION:
|
||||
if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->setup_unsolicited_registration &&
|
||||
MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->setup_unsolicited_registration_finish) {
|
||||
MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->setup_unsolicited_registration (
|
||||
ctx->self,
|
||||
(GAsyncReadyCallback)setup_unsolicited_registration_ready,
|
||||
ctx);
|
||||
return;
|
||||
}
|
||||
/* Fall down to next step */
|
||||
ctx->step++;
|
||||
|
||||
case ENABLING_STEP_SETUP_CS_REGISTRATION:
|
||||
if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->setup_cs_registration &&
|
||||
MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->setup_cs_registration_finish) {
|
||||
|
||||
@@ -41,6 +41,14 @@ struct _MMIfaceModem3gpp {
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
/* Setup unsolicited registration messages */
|
||||
void (* setup_unsolicited_registration) (MMIfaceModem3gpp *self,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (*setup_unsolicited_registration_finish) (MMIfaceModem3gpp *self,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
/* Setup CS Registration */
|
||||
void (* setup_cs_registration) (MMIfaceModem3gpp *self,
|
||||
GAsyncReadyCallback callback,
|
||||
|
||||
Reference in New Issue
Block a user