aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mm-iface-modem-3gpp.c34
-rw-r--r--src/mm-iface-modem-3gpp.h8
2 files changed, 42 insertions, 0 deletions
diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c
index e65f3052..f2757a4c 100644
--- a/src/mm-iface-modem-3gpp.c
+++ b/src/mm-iface-modem-3gpp.c
@@ -1537,6 +1537,7 @@ static void interface_initialization_step (InitializationContext *ctx);
typedef enum {
INITIALIZATION_STEP_FIRST,
INITIALIZATION_STEP_IMEI,
+ INITIALIZATION_STEP_ENABLED_FACILITY_LOCKS,
INITIALIZATION_STEP_LAST
} InitializationStep;
@@ -1579,6 +1580,27 @@ initialization_context_complete_and_free (InitializationContext *ctx)
}
static void
+load_enabled_facility_locks_ready (MMIfaceModem3gpp *self,
+ GAsyncResult *res,
+ InitializationContext *ctx)
+{
+ GError *error = NULL;
+ MMModem3gppFacility facilities;
+
+ facilities = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_enabled_facility_locks_finish (self, res, &error);
+ mm_gdbus_modem3gpp_set_enabled_facility_locks (ctx->skeleton, facilities);
+
+ if (error) {
+ mm_warn ("couldn't load facility locks: '%s'", error->message);
+ g_error_free (error);
+ }
+
+ /* Go on to next step */
+ ctx->step++;
+ interface_initialization_step (ctx);
+}
+
+static void
load_imei_ready (MMIfaceModem3gpp *self,
GAsyncResult *res,
InitializationContext *ctx)
@@ -1624,6 +1646,18 @@ interface_initialization_step (InitializationContext *ctx)
/* Fall down to next step */
ctx->step++;
+ case INITIALIZATION_STEP_ENABLED_FACILITY_LOCKS:
+ if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->load_enabled_facility_locks &&
+ MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->load_enabled_facility_locks_finish) {
+ MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->load_enabled_facility_locks (
+ ctx->self,
+ (GAsyncReadyCallback)load_enabled_facility_locks_ready,
+ ctx);
+ return;
+ }
+ /* Fall down to next step */
+ ctx->step++;
+
case INITIALIZATION_STEP_LAST:
/* We are done without errors! */
diff --git a/src/mm-iface-modem-3gpp.h b/src/mm-iface-modem-3gpp.h
index a62aa850..8c88c05c 100644
--- a/src/mm-iface-modem-3gpp.h
+++ b/src/mm-iface-modem-3gpp.h
@@ -58,6 +58,14 @@ struct _MMIfaceModem3gpp {
GAsyncResult *res,
GError **error);
+ /* Loading of the facility locks property */
+ void (*load_enabled_facility_locks) (MMIfaceModem3gpp *self,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ MMModem3gppFacility (*load_enabled_facility_locks_finish) (MMIfaceModem3gpp *self,
+ GAsyncResult *res,
+ GError **error);
+
/* Asynchronous setup of indicators */
void (*setup_indicators) (MMIfaceModem3gpp *self,
GAsyncReadyCallback callback,