diff options
author | Andrzej Zaborowski <andrew.zaborowski@intel.com> | 2009-09-17 22:43:22 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-09-22 00:07:06 -0500 |
commit | ee02b14836d7e30b45ee6fd62da6a8135c94c9dd (patch) | |
tree | ebe561c1cb248e4a11643fdc09e61246520cda97 /include/sim.h | |
parent | b1c8b291f5c8d1802b889756c01cc2f7f5288641 (diff) | |
download | ofono-ee02b14836d7e30b45ee6fd62da6a8135c94c9dd.tar.bz2 |
Do PIN authentication
This adds checking whether PIN is required during SIM initialisation and
delaying the sim ready notifications until after correct PIN is given.
Diffstat (limited to 'include/sim.h')
-rw-r--r-- | include/sim.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/sim.h b/include/sim.h index 1da486c7..751ae101 100644 --- a/include/sim.h +++ b/include/sim.h @@ -64,6 +64,12 @@ typedef void (*ofono_sim_file_read_cb_t)(int ok, typedef void (*ofono_sim_file_write_cb_t)(int ok, void *userdata); +typedef void (*ofono_sim_passwd_cb_t)(const struct ofono_error *error, + int passwd_type, void *data); + +typedef void (*ofono_sim_lock_unlock_cb_t)(const struct ofono_error *error, + void *data); + struct ofono_sim_driver { const char *name; int (*probe)(struct ofono_sim *sim, unsigned int vendor, void *data); @@ -90,6 +96,19 @@ struct ofono_sim_driver { ofono_sim_write_cb_t cb, void *data); void (*read_imsi)(struct ofono_sim *sim, ofono_sim_imsi_cb_t cb, void *data); + void (*query_passwd_state)(struct ofono_sim *sim, + ofono_sim_passwd_cb_t cb, void *data); + void (*send_passwd)(struct ofono_sim *sim, const char *passwd, + ofono_sim_lock_unlock_cb_t cb, void *data); + void (*reset_passwd)(struct ofono_sim *sim, const char *puk, + const char *passwd, + ofono_sim_lock_unlock_cb_t cb, void *data); + void (*change_passwd)(struct ofono_sim *sim, int passwd_type, + const char *old, const char *new, + ofono_sim_lock_unlock_cb_t cb, void *data); + void (*lock)(struct ofono_sim *sim, int passwd_type, int enable, + const char *passwd, + ofono_sim_lock_unlock_cb_t cb, void *data); }; int ofono_sim_driver_register(const struct ofono_sim_driver *d); |