diff options
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; } + |