diff options
author | Yang Gu <yang.gu@intel.com> | 2010-08-31 17:58:00 +0800 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-08-31 13:07:54 -0500 |
commit | d43b2c0a61c1dc7af60196f03579feaba0fcb534 (patch) | |
tree | 65e67db7b5381de09f94224bb7f8c935a1972672 /src/simutil.c | |
parent | 8821d5fbac5e0f9a60b2f8b4ef32673d0084c854 (diff) | |
download | ofono-d43b2c0a61c1dc7af60196f03579feaba0fcb534.tar.bz2 |
sim: Read EFsst
Diffstat (limited to 'src/simutil.c')
-rw-r--r-- | src/simutil.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/simutil.c b/src/simutil.c index ac054ae3..4af68109 100644 --- a/src/simutil.c +++ b/src/simutil.c @@ -1434,3 +1434,21 @@ gboolean sim_est_is_active(unsigned char *efest, unsigned char len, return (efest[index / 8] >> (index % 8)) & 1; } + +gboolean sim_sst_is_available(unsigned char *efsst, unsigned char len, + enum sim_sst_service index) +{ + if (index >= len * 4u) + return FALSE; + + return (efsst[index / 4] >> ((index % 4) * 2)) & 1; +} + +gboolean sim_sst_is_active(unsigned char *efsst, unsigned char len, + enum sim_sst_service index) +{ + if (index >= len * 4u) + return FALSE; + + return (efsst[index / 4] >> (((index % 4) * 2) + 1)) & 1; +} |