diff options
author | Andrzej Zaborowski <andrew.zaborowski@intel.com> | 2010-04-09 08:48:50 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-04-15 16:49:40 -0500 |
commit | ddfe8acf11f351a5887ced8fedf736ee4b108c51 (patch) | |
tree | 77277e91bfbfe21b3c2d91a2e34d3e352edaa027 /plugins/mbm.c | |
parent | 22cbe981468a1eeb5ea5f07e07c31b11da2507e0 (diff) | |
download | ofono-ddfe8acf11f351a5887ced8fedf736ee4b108c51.tar.bz2 |
Drivers can notify core of SIM insertion / removal
Add ofono_sim_inserted_notify function to notify the core of SIM
insertion / removal.
Make every plugin generate a sim inserted event on start. For devices
with removable card, the event should be emitted after the
plugin detects such event. For devices that need to wait for SIM card
initialization, they can emit this event later.
Diffstat (limited to 'plugins/mbm.c')
-rw-r--r-- | plugins/mbm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/mbm.c b/plugins/mbm.c index 439d3b9e..79d180be 100644 --- a/plugins/mbm.c +++ b/plugins/mbm.c @@ -285,12 +285,16 @@ static int mbm_disable(struct ofono_modem *modem) static void mbm_pre_sim(struct ofono_modem *modem) { struct mbm_data *data = ofono_modem_get_data(modem); + struct ofono_sim *sim; DBG("%p", modem); ofono_devinfo_create(modem, 0, "atmodem", data->modem_port); - ofono_sim_create(modem, 0, "atmodem", data->modem_port); + sim = ofono_sim_create(modem, 0, "atmodem", data->modem_port); ofono_voicecall_create(modem, 0, "atmodem", data->modem_port); + + if (sim) + ofono_sim_inserted_notify(sim, TRUE); } static void mbm_post_sim(struct ofono_modem *modem) |