From be55ba4ab3e706caa9cbc6c854e78d045c723f9a Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Fri, 2 Oct 2009 14:02:28 -0500 Subject: Refactor: Move elementary file type checking Every single EF read callback checks the file type reported out of the SIM is what it expects. Instead this should be done in one place and the errors reported accordingly --- include/sim.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/sim.h b/include/sim.h index fa5276b6..f76f9d12 100644 --- a/include/sim.h +++ b/include/sim.h @@ -76,9 +76,7 @@ typedef void (*ofono_sim_imsi_cb_t)(const struct ofono_error *error, typedef void (*ofono_sim_ready_notify_cb_t)(void *data); -typedef void (*ofono_sim_file_read_cb_t)(int ok, - enum ofono_sim_file_structure structure, - int total_length, int record, +typedef void (*ofono_sim_file_read_cb_t)(int ok, int total_length, int record, const unsigned char *data, int record_length, void *userdata); @@ -171,6 +169,7 @@ void ofono_sim_set_ready(struct ofono_sim *sim); * Returns 0 if the request could be queued, -1 otherwise. */ int ofono_sim_read(struct ofono_sim *sim, int id, + enum ofono_sim_file_structure expected, ofono_sim_file_read_cb_t cb, void *data); int ofono_sim_write(struct ofono_sim *sim, int id, -- cgit v1.2.3