aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2011-11-29 10:04:07 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:14:29 +0100
commit68044fb01e6e7e84c4c3a53944e007167c89ab54 (patch)
treeb01553638c14d3c42cbee11b1aa53f7958aead16
parent2f5e8c46a34bd88eba47b0488dcc5d3d0fe242e4 (diff)
iface-modem-3gpp: setup unsolicited registration messages handling during enable
-rw-r--r--src/mm-iface-modem-3gpp.c14
-rw-r--r--src/mm-iface-modem-3gpp.h8
2 files changed, 22 insertions, 0 deletions
diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c
index 4b57f303..5557e912 100644
--- a/src/mm-iface-modem-3gpp.c
+++ b/src/mm-iface-modem-3gpp.c
@@ -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) {
diff --git a/src/mm-iface-modem-3gpp.h b/src/mm-iface-modem-3gpp.h
index 0f2ea43e..8617ad5e 100644
--- a/src/mm-iface-modem-3gpp.h
+++ b/src/mm-iface-modem-3gpp.h
@@ -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,