base-sim: allow explicit wait for SIM readiness during initialization

Before attempting to load any SIM property value, allow checking
whether the SIM is ready for operation or not.

This action is implicitly done by the "unlock required check" step
that is triggered before initializing the primary SIM card, but it
would not be done when initializing other available SIM cards.
This commit is contained in:
Aleksander Morgado
2020-08-28 14:59:06 +00:00
parent 18084f8939
commit b2979c63eb
2 changed files with 38 additions and 0 deletions
+8
View File
@@ -52,6 +52,14 @@ struct _MMBaseSim {
struct _MMBaseSimClass {
MmGdbusSimSkeletonClass parent;
/* Wait SIM ready (async) */
void (* wait_sim_ready) (MMBaseSim *self,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (* wait_sim_ready_finish) (MMBaseSim *self,
GAsyncResult *res,
GError **error);
/* Load SIM identifier (async) */
void (* load_sim_identifier) (MMBaseSim *self,
GAsyncReadyCallback callback,