All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] sim: Add sim_service_available() for querying EFsst or EFust.
@ 2010-11-10  3:27 Andrzej Zaborowski
  2010-11-10  3:27 ` [PATCH 2/3] sms: SMS-PP download must be enabled in SIM service tables Andrzej Zaborowski
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andrzej Zaborowski @ 2010-11-10  3:27 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]

The function is not public api because the service constants are in
src/simutil.h.
---
 src/ofono.h |    5 +++++
 src/sim.c   |   15 +++++++++++++++
 2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/ofono.h b/src/ofono.h
index e5b4acb..4d76d20 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 e5e304c..f362565 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();
-- 
1.7.1.86.g0e460.dirty


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-11-10 15:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-10  3:27 [PATCH 1/3] sim: Add sim_service_available() for querying EFsst or EFust Andrzej Zaborowski
2010-11-10  3:27 ` [PATCH 2/3] sms: SMS-PP download must be enabled in SIM service tables Andrzej Zaborowski
2010-11-10 15:13   ` Denis Kenzior
2010-11-10  3:27 ` [PATCH 3/3] cbs: CB " Andrzej Zaborowski
2010-11-10 15:14   ` Denis Kenzior
2010-11-10 15:12 ` [PATCH 1/3] sim: Add sim_service_available() for querying EFsst or EFust Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.