iface-modem-3gpp: setup unsolicited registration messages handling during enable

This commit is contained in:
Aleksander Morgado
2012-03-15 14:14:29 +01:00
parent 2f5e8c46a3
commit 68044fb01e
2 changed files with 22 additions and 0 deletions
+14
View File
@@ -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) {
+8
View File
@@ -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,