summaryrefslogtreecommitdiffstats
path: root/src/simutil.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2011-12-16 09:44:32 -0600
committerDenis Kenzior <denkenz@gmail.com>2011-12-16 09:44:32 -0600
commitfe7d012c394912184c5fcc5f2414beafae57a51f (patch)
treeaa27ca472d1be93010ca141c5d10177fa40a0a19 /src/simutil.c
parent7f18695f46d0d5bdcf2f7fab689800b94d9aedff (diff)
downloadofono-fe7d012c394912184c5fcc5f2414beafae57a51f.tar.bz2
simutil: Add util to find CPHS service availability
Diffstat (limited to 'src/simutil.c')
-rw-r--r--src/simutil.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/simutil.c b/src/simutil.c
index 6686a256..1b6f3a82 100644
--- a/src/simutil.c
+++ b/src/simutil.c
@@ -1477,6 +1477,14 @@ gboolean sim_sst_is_active(unsigned char *efsst, unsigned char len,
return (efsst[index / 4] >> (((index % 4) * 2) + 1)) & 1;
}
+gboolean sim_cphs_is_active(unsigned char *cphs, enum sim_cphs_service index)
+{
+ if (index >= 2 * 4u)
+ return FALSE;
+
+ return ((cphs[index / 4] >> ((index % 4) * 2)) & 3) == 3;
+}
+
GSList *sim_parse_app_template_entries(const unsigned char *buffer, int len)
{
GSList *ret = NULL;