diff options
author | Andrzej Zaborowski <andrew.zaborowski@intel.com> | 2010-04-09 08:49:01 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-04-15 16:49:40 -0500 |
commit | aad4d0de78d6928ae6fd4364262c3d0021959a9d (patch) | |
tree | 77bcebccef439059d8d851716a87f8dc509e027f /src/cbs.c | |
parent | 228e1e735ce98142a5e814beaf2c7823a0f419c6 (diff) | |
download | ofono-aad4d0de78d6928ae6fd4364262c3d0021959a9d.tar.bz2 |
Add Sim Toolkit atom
- Add ofono_stk atom in stk.c
- Move envelope command from sim driver to stk driver
Diffstat (limited to 'src/cbs.c')
-rw-r--r-- | src/cbs.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -57,6 +57,7 @@ struct ofono_cbs { GSList *topics; GSList *new_topics; struct ofono_sim *sim; + struct ofono_stk *stk; struct ofono_netreg *netreg; unsigned int netreg_watch; unsigned int location_watch; @@ -195,7 +196,7 @@ void ofono_cbs_notify(struct ofono_cbs *cbs, const unsigned char *pdu, } if (cbs_topic_in_range(c.message_identifier, cbs->efcbmid_contents)) { - __ofono_cbs_sim_download(cbs->sim, pdu, pdu_len); + __ofono_cbs_sim_download(cbs->stk, pdu, pdu_len); return; } @@ -590,6 +591,7 @@ static void cbs_unregister(struct ofono_atom *atom) } cbs->sim = NULL; + cbs->stk = NULL; if (cbs->reset_source) { g_source_remove(cbs->reset_source); @@ -1027,6 +1029,7 @@ void ofono_cbs_register(struct ofono_cbs *cbs) struct ofono_modem *modem = __ofono_atom_get_modem(cbs->atom); const char *path = __ofono_atom_get_path(cbs->atom); struct ofono_atom *sim_atom; + struct ofono_atom *stk_atom; struct ofono_atom *netreg_atom; if (!g_dbus_register_interface(conn, path, @@ -1050,6 +1053,11 @@ void ofono_cbs_register(struct ofono_cbs *cbs) cbs_got_imsi(cbs); } + stk_atom = __ofono_modem_find_atom(modem, OFONO_ATOM_TYPE_SIM); + + if (stk_atom) + cbs->stk = __ofono_atom_get_data(stk_atom); + cbs->netreg_watch = __ofono_modem_add_atom_watch(modem, OFONO_ATOM_TYPE_NETREG, netreg_watch, cbs, NULL); |