summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorerin_yueh <erin_yueh@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-12-12 12:48:10 +0000
committererin_yueh <erin_yueh@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-12-12 12:48:10 +0000
commit30c802206150291d388c14d9588faf32804d4b18 (patch)
treef8b707fb50991afd2d49ba849f04a1cbafd47c81 /include
parent3a4c4251d068f481ddef3c355d8e0936c5b3440b (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 'include')
-rw-r--r--include/gsmd/event.h19
-rw-r--r--include/gsmd/usock.h2
-rw-r--r--include/libgsmd/misc.h3
-rw-r--r--include/libgsmd/pin.h3
4 files changed, 23 insertions, 4 deletions
diff --git a/include/gsmd/event.h b/include/gsmd/event.h
index 38cefae..d10c26e 100644
--- a/include/gsmd/event.h
+++ b/include/gsmd/event.h
@@ -43,6 +43,25 @@ enum gsmd_pin_type { /* waiting for ... */
__NUM_GSMD_PIN
};
+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",
+};
+
enum gsmd_call_type {
GSMD_CALL_NONE = 0,
GSMD_CALL_UNSPEC = 1,
diff --git a/include/gsmd/usock.h b/include/gsmd/usock.h
index 5116da9..5e07ced 100644
--- a/include/gsmd/usock.h
+++ b/include/gsmd/usock.h
@@ -89,13 +89,13 @@ enum gsmd_msg_phone_type {
enum gsmd_msg_pin_type {
GSMD_PIN_INPUT = 1,
+ GSMD_PIN_GET_STATUS = 2,
};
enum gsmd_msg_phone {
GSMD_PHONE_POWERUP = 1,
GSMD_PHONE_POWERDOWN = 2,
GSMD_PHONE_GET_IMSI = 3,
- GSMD_PIN_GET_STATUS = 4,
};
enum gsmd_msg_modem {
diff --git a/include/libgsmd/misc.h b/include/libgsmd/misc.h
index 8111360..554d958 100644
--- a/include/libgsmd/misc.h
+++ b/include/libgsmd/misc.h
@@ -79,6 +79,5 @@ extern int lgsm_get_subscriber_num(struct lgsm_handle *lh);
/* Retrieve IMSI information */
extern int lgsm_get_imsi(struct lgsm_handle *lh);
-/* Get PIN status information */
-extern int lgsm_pin_status(struct lgsm_handle *lh);
+
#endif
diff --git a/include/libgsmd/pin.h b/include/libgsmd/pin.h
index d125e40..8b02226 100644
--- a/include/libgsmd/pin.h
+++ b/include/libgsmd/pin.h
@@ -5,5 +5,6 @@ extern const char *lgsm_pin_name(enum gsmd_pin_type ptype);
extern int lgsm_pin(struct lgsm_handle *lh, unsigned int type,
const char *pin, const char *newpin);
-
+/* Get PIN status information */
+extern int lgsm_pin_status(struct lgsm_handle *lh);
#endif
personal git repositories of Harald Welte. Your mileage may vary