aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-02-14 17:18:20 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:15:06 +0100
commitc89fd703bbff17fe9f703db444981f70c0b6aa4b (patch)
tree48f024ae338626bd86804abb6a76e2776087eacc
parent3c41ce5d8b238e6a3a2cf101885e3a2df8efae0e (diff)
sim: allow subclasses to specify they can't load property values
-rw-r--r--src/mm-sim.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/mm-sim.c b/src/mm-sim.c
index ee630c9e..360e25cf 100644
--- a/src/mm-sim.c
+++ b/src/mm-sim.c
@@ -1241,7 +1241,9 @@ interface_initialization_step (InitAsyncContext *ctx)
/* SIM ID 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_sim_identifier (MM_GDBUS_SIM (ctx->self)) == NULL) {
+ if (mm_gdbus_sim_get_sim_identifier (MM_GDBUS_SIM (ctx->self)) == NULL &&
+ MM_SIM_GET_CLASS (ctx->self)->load_sim_identifier &&
+ MM_SIM_GET_CLASS (ctx->self)->load_sim_identifier_finish) {
MM_SIM_GET_CLASS (ctx->self)->load_sim_identifier (
ctx->self,
(GAsyncReadyCallback)load_sim_identifier_ready,
@@ -1255,7 +1257,9 @@ interface_initialization_step (InitAsyncContext *ctx)
/* IMSI 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_imsi (MM_GDBUS_SIM (ctx->self)) == NULL) {
+ if (mm_gdbus_sim_get_imsi (MM_GDBUS_SIM (ctx->self)) == NULL &&
+ MM_SIM_GET_CLASS (ctx->self)->load_imsi &&
+ MM_SIM_GET_CLASS (ctx->self)->load_imsi_finish) {
MM_SIM_GET_CLASS (ctx->self)->load_imsi (
ctx->self,
(GAsyncReadyCallback)load_imsi_ready,
@@ -1269,7 +1273,9 @@ interface_initialization_step (InitAsyncContext *ctx)
/* Operator ID 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_operator_identifier (MM_GDBUS_SIM (ctx->self)) == NULL) {
+ if (mm_gdbus_sim_get_operator_identifier (MM_GDBUS_SIM (ctx->self)) == NULL &&
+ MM_SIM_GET_CLASS (ctx->self)->load_operator_identifier &&
+ MM_SIM_GET_CLASS (ctx->self)->load_operator_identifier_finish) {
MM_SIM_GET_CLASS (ctx->self)->load_operator_identifier (
ctx->self,
(GAsyncReadyCallback)load_operator_identifier_ready,
@@ -1283,7 +1289,9 @@ interface_initialization_step (InitAsyncContext *ctx)
/* Operator Name 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_operator_name (MM_GDBUS_SIM (ctx->self)) == NULL) {
+ if (mm_gdbus_sim_get_operator_name (MM_GDBUS_SIM (ctx->self)) == NULL &&
+ MM_SIM_GET_CLASS (ctx->self)->load_operator_name &&
+ MM_SIM_GET_CLASS (ctx->self)->load_operator_name_finish) {
MM_SIM_GET_CLASS (ctx->self)->load_operator_name (
ctx->self,
(GAsyncReadyCallback)load_operator_name_ready,