diff options
author | erin_yueh <erin_yueh@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2007-12-12 12:48:10 +0000 |
---|---|---|
committer | erin_yueh <erin_yueh@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2007-12-12 12:48:10 +0000 |
commit | 30c802206150291d388c14d9588faf32804d4b18 (patch) | |
tree | f8b707fb50991afd2d49ba849f04a1cbafd47c81 /src/libgsmd | |
parent | 3a4c4251d068f481ddef3c355d8e0936c5b3440b (diff) |
gsmd: 2nd try for retrieving PIN status (Erin Yueh)
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3636 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'src/libgsmd')
-rw-r--r-- | src/libgsmd/libgsmd_phone.c | 4 | ||||
-rw-r--r-- | src/libgsmd/libgsmd_pin.c | 25 |
2 files changed, 6 insertions, 23 deletions
diff --git a/src/libgsmd/libgsmd_phone.c b/src/libgsmd/libgsmd_phone.c index 44082be..83e31e8 100644 --- a/src/libgsmd/libgsmd_phone.c +++ b/src/libgsmd/libgsmd_phone.c @@ -50,7 +50,3 @@ int lgsm_get_imsi(struct lgsm_handle *lh) return lgsm_send_simple(lh, GSMD_MSG_PHONE, GSMD_PHONE_GET_IMSI); } -int lgsm_pin_status(struct lgsm_handle *lh) -{ - return lgsm_send_simple(lh, GSMD_MSG_PHONE, GSMD_PIN_GET_STATUS); -} diff --git a/src/libgsmd/libgsmd_pin.c b/src/libgsmd/libgsmd_pin.c index 204f655..4918fec 100644 --- a/src/libgsmd/libgsmd_pin.c +++ b/src/libgsmd/libgsmd_pin.c @@ -28,25 +28,6 @@ #include <gsmd/event.h> #include <libgsmd/libgsmd.h> -static const char *pin_type_names[__NUM_GSMD_PIN] = { - [GSMD_PIN_NONE] = "NONE", - [GSMD_PIN_SIM_PIN] = "SIM PIN", - [GSMD_PIN_SIM_PUK] = "SIM PUK", - [GSMD_PIN_PH_SIM_PIN] = "Phone-to-SIM PIN", - [GSMD_PIN_PH_FSIM_PIN] = "Phone-to-very-first SIM PIN", - [GSMD_PIN_PH_FSIM_PUK] = "Phone-to-very-first SIM PUK", - [GSMD_PIN_SIM_PIN2] = "SIM PIN2", - [GSMD_PIN_SIM_PUK2] = "SIM PUK2", - [GSMD_PIN_PH_NET_PIN] = "Network personalization PIN", - [GSMD_PIN_PH_NET_PUK] = "Network personalizaiton PUK", - [GSMD_PIN_PH_NETSUB_PIN]= "Network subset personalisation PIN", - [GSMD_PIN_PH_NETSUB_PUK]= "Network subset personalisation PUK", - [GSMD_PIN_PH_SP_PIN] = "Service provider personalisation PIN", - [GSMD_PIN_PH_SP_PUK] = "Service provider personalisation PUK", - [GSMD_PIN_PH_CORP_PIN] = "Corporate personalisation PIN", - [GSMD_PIN_PH_CORP_PUK] = "Corporate personalisation PUK", -}; - const char *lgsm_pin_name(enum gsmd_pin_type ptype) { if (ptype >= __NUM_GSMD_PIN) @@ -55,6 +36,11 @@ const char *lgsm_pin_name(enum gsmd_pin_type ptype) return pin_type_names[ptype]; } +int lgsm_pin_status(struct lgsm_handle *lh) +{ + return lgsm_send_simple(lh, GSMD_MSG_PIN, GSMD_PIN_GET_STATUS); +} + int lgsm_pin(struct lgsm_handle *lh, unsigned int type, const char *pin, const char *newpin) { @@ -98,3 +84,4 @@ int lgsm_pin(struct lgsm_handle *lh, unsigned int type, return rc; } + |