diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-iface-modem-3gpp.c | 44 | ||||
-rw-r--r-- | src/mm-iface-modem-3gpp.h | 8 |
2 files changed, 52 insertions, 0 deletions
diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c index a90c7204..5966b4c1 100644 --- a/src/mm-iface-modem-3gpp.c +++ b/src/mm-iface-modem-3gpp.c @@ -2049,6 +2049,7 @@ typedef enum { INITIALIZATION_STEP_IMEI, INITIALIZATION_STEP_ENABLED_FACILITY_LOCKS, INITIALIZATION_STEP_EPS_UE_MODE_OPERATION, + INITIALIZATION_STEP_EPS_INITIAL_BEARER_SETTINGS, INITIALIZATION_STEP_LAST } InitializationStep; @@ -2081,6 +2082,36 @@ sim_pin_lock_enabled_cb (MMBaseSim *self, } static void +load_initial_eps_bearer_settings_ready (MMIfaceModem3gpp *self, + GAsyncResult *res, + GTask *task) +{ + InitializationContext *ctx; + MMBearerProperties *config; + GError *error = NULL; + + ctx = g_task_get_task_data (task); + + config = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings_finish (self, res, &error); + if (!config) { + mm_warn ("couldn't load initial EPS bearer settings: '%s'", error->message); + g_error_free (error); + } else { + GVariant *dictionary; + + dictionary = mm_bearer_properties_get_dictionary (config); + mm_gdbus_modem3gpp_set_initial_eps_bearer_settings (ctx->skeleton, dictionary); + g_object_unref (config); + if (dictionary) + g_variant_unref (dictionary); + } + + /* Go on to next step */ + ctx->step++; + interface_initialization_step (task); +} + +static void load_eps_ue_mode_operation_ready (MMIfaceModem3gpp *self, GAsyncResult *res, GTask *task) @@ -2228,6 +2259,19 @@ interface_initialization_step (GTask *task) /* Fall down to next step */ ctx->step++; + case INITIALIZATION_STEP_EPS_INITIAL_BEARER_SETTINGS: + if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings && + MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings_finish) { + MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings ( + self, + (GAsyncReadyCallback)load_initial_eps_bearer_settings_ready, + task); + 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 90b3eedd..66bf4cdd 100644 --- a/src/mm-iface-modem-3gpp.h +++ b/src/mm-iface-modem-3gpp.h @@ -155,6 +155,14 @@ struct _MMIfaceModem3gpp { GAsyncResult *res, GError **error); + /* Asynchronous initial default EPS bearer settings loading */ + void (*load_initial_eps_bearer_settings) (MMIfaceModem3gpp *self, + GAsyncReadyCallback callback, + gpointer user_data); + MMBearerProperties * (*load_initial_eps_bearer_settings_finish) (MMIfaceModem3gpp *self, + GAsyncResult *res, + GError **error); + /* Create initial default EPS bearer object */ MMBaseBearer * (*create_initial_eps_bearer) (MMIfaceModem3gpp *self, MMBearerProperties *properties); |