summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrzej Zaborowski <andrew.zaborowski@intel.com>2010-11-10 04:27:50 +0100
committerDenis Kenzior <denkenz@gmail.com>2010-11-10 09:09:05 -0600
commit3083841f72579501b9dff187cbc856e3c437de57 (patch)
tree2eeffed1c01b5b4bf8c2c38b76feef74985b6d31 /src
parent4783db9a9ca7d99be337814e40b5faba9798fbfe (diff)
downloadofono-3083841f72579501b9dff187cbc856e3c437de57.tar.bz2
sim: Add sim_service_available()
This is meant to query EFsst or EFust. The function is not public api because the service constants are in src/simutil.h.
Diffstat (limited to 'src')
-rw-r--r--src/ofono.h5
-rw-r--r--src/sim.c15
2 files changed, 20 insertions, 0 deletions
diff --git a/src/ofono.h b/src/ofono.h
index e5b4acbe..4d76d20a 100644
--- a/src/ofono.h
+++ b/src/ofono.h
@@ -281,6 +281,11 @@ gboolean __ofono_sms_datagram_watch_remove(struct ofono_sms *sms,
unsigned short __ofono_sms_get_next_ref(struct ofono_sms *sms);
#include <ofono/sim.h>
+
+ofono_bool_t __ofono_sim_service_available(struct ofono_sim *sim,
+ int ust_service,
+ int sst_service);
+
#include <ofono/stk.h>
typedef void (*__ofono_sms_sim_download_cb_t)(ofono_bool_t ok,
diff --git a/src/sim.c b/src/sim.c
index e5e304cf..f362565b 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -1928,6 +1928,21 @@ const unsigned char *ofono_sim_get_cphs_service_table(struct ofono_sim *sim)
return sim->cphs_service_table;
}
+ofono_bool_t __ofono_sim_service_available(struct ofono_sim *sim,
+ int ust_service,
+ int sst_service)
+{
+ if (sim->efust)
+ return sim_ust_is_available(sim->efust, sim->efust_length,
+ ust_service);
+
+ if (sim->efsst)
+ return sim_sst_is_active(sim->efsst, sim->efsst_length,
+ sst_service);
+
+ return FALSE;
+}
+
static void sim_inserted_update(struct ofono_sim *sim)
{
DBusConnection *conn = ofono_dbus_get_connection();