aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mm-base-sim.c19
-rw-r--r--src/mm-base-sim.h8
2 files changed, 27 insertions, 0 deletions
diff --git a/src/mm-base-sim.c b/src/mm-base-sim.c
index c9d24fbb..d692554d 100644
--- a/src/mm-base-sim.c
+++ b/src/mm-base-sim.c
@@ -1503,6 +1503,7 @@ typedef enum {
INITIALIZATION_STEP_WAIT_READY,
INITIALIZATION_STEP_SIM_IDENTIFIER,
INITIALIZATION_STEP_IMSI,
+ INITIALIZATION_STEP_EID,
INITIALIZATION_STEP_OPERATOR_ID,
INITIALIZATION_STEP_OPERATOR_NAME,
INITIALIZATION_STEP_EMERGENCY_NUMBERS,
@@ -1631,6 +1632,7 @@ init_load_emergency_numbers_ready (MMBaseSim *self,
}
STR_REPLY_READY_FN (imsi, "IMSI")
+STR_REPLY_READY_FN (eid, "EID")
STR_REPLY_READY_FN (operator_identifier, "operator identifier")
STR_REPLY_READY_FN (operator_name, "operator name")
@@ -1714,6 +1716,22 @@ interface_initialization_step (GTask *task)
ctx->step++;
/* Fall through */
+ case INITIALIZATION_STEP_EID:
+ /* EID is meant to be loaded only once during the whole
+ * lifetime of the modem. Therefore, if we already have them loaded,
+ * don't try to load them again. */
+ if (mm_gdbus_sim_get_eid (MM_GDBUS_SIM (self)) == NULL &&
+ MM_BASE_SIM_GET_CLASS (self)->load_eid &&
+ MM_BASE_SIM_GET_CLASS (self)->load_eid_finish) {
+ MM_BASE_SIM_GET_CLASS (self)->load_eid (
+ self,
+ (GAsyncReadyCallback)init_load_eid_ready,
+ task);
+ return;
+ }
+ ctx->step++;
+ /* Fall through */
+
case INITIALIZATION_STEP_OPERATOR_ID:
/* Operator ID is meant to be loaded only once during the whole
* lifetime of the modem. Therefore, if we already have them loaded,
@@ -1807,6 +1825,7 @@ initable_init_async (GAsyncInitable *initable,
{
mm_gdbus_sim_set_sim_identifier (MM_GDBUS_SIM (initable), NULL);
mm_gdbus_sim_set_imsi (MM_GDBUS_SIM (initable), NULL);
+ mm_gdbus_sim_set_eid (MM_GDBUS_SIM (initable), NULL);
mm_gdbus_sim_set_operator_identifier (MM_GDBUS_SIM (initable), NULL);
mm_gdbus_sim_set_operator_name (MM_GDBUS_SIM (initable), NULL);
diff --git a/src/mm-base-sim.h b/src/mm-base-sim.h
index 9a290e0b..7e860f56 100644
--- a/src/mm-base-sim.h
+++ b/src/mm-base-sim.h
@@ -76,6 +76,14 @@ struct _MMBaseSimClass {
GAsyncResult *res,
GError **error);
+ /* Load EID (async) */
+ void (* load_eid) (MMBaseSim *self,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ gchar * (* load_eid_finish) (MMBaseSim *self,
+ GAsyncResult *res,
+ GError **error);
+
/* Load operator identifier (async) */
void (* load_operator_identifier) (MMBaseSim *self,
GAsyncReadyCallback callback,