summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorerin_yueh <erin_yueh@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-12-13 02:55:54 +0000
committererin_yueh <erin_yueh@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-12-13 02:55:54 +0000
commite4fa3bc9cd52873af5cd1b3382b065778c7ebc3e (patch)
treeb59109f7d66e19e4b957633e1a5c380d669ce8d3 /src
parent30c802206150291d388c14d9588faf32804d4b18 (diff)
gsmd: move PIN name to both gsmd and libgsmd (Erin Yueh)
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3647 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'src')
-rw-r--r--src/gsmd/usock.c19
-rw-r--r--src/libgsmd/libgsmd_pin.c19
2 files changed, 38 insertions, 0 deletions
diff --git a/src/gsmd/usock.c b/src/gsmd/usock.c
index 5b9eb1c..0a4acd7 100644
--- a/src/gsmd/usock.c
+++ b/src/gsmd/usock.c
@@ -303,6 +303,25 @@ static int pin_cmd_cb(struct gsmd_atcmd *cmd, void *ctx, char *resp)
cmd->id, sizeof(ret), &ret);
}
+static const char *pin_type_names[__NUM_GSMD_PIN] = {
+ [GSMD_PIN_READY] = "READY",
+ [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",
+};
+
static int get_cpin_cb(struct gsmd_atcmd *cmd, void *ctx, char *resp)
{
enum gsmd_pin_type type;
diff --git a/src/libgsmd/libgsmd_pin.c b/src/libgsmd/libgsmd_pin.c
index 4918fec..8d50b67 100644
--- a/src/libgsmd/libgsmd_pin.c
+++ b/src/libgsmd/libgsmd_pin.c
@@ -28,6 +28,25 @@
#include <gsmd/event.h>
#include <libgsmd/libgsmd.h>
+static const char *pin_type_names[__NUM_GSMD_PIN] = {
+ [GSMD_PIN_READY] = "READY",
+ [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)
personal git repositories of Harald Welte. Your mileage may vary