summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sim.c36
-rw-r--r--src/simutil.c36
-rw-r--r--src/simutil.h3
3 files changed, 36 insertions, 39 deletions
diff --git a/src/sim.c b/src/sim.c
index 2ff2550b..0afa269a 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -112,6 +112,42 @@ struct service_number {
struct ofono_phone_number ph;
};
+static const char *const passwd_name[] = {
+ [OFONO_PASSWD_NONE] = "none",
+ [OFONO_PASSWD_SIM_PIN] = "pin",
+ [OFONO_PASSWD_SIM_PUK] = "puk",
+ [OFONO_PASSWD_PHSIM_PIN] = "phone",
+ [OFONO_PASSWD_PHFSIM_PIN] = "firstphone",
+ [OFONO_PASSWD_PHFSIM_PUK] = "firstphonepuk",
+ [OFONO_PASSWD_SIM_PIN2] = "pin2",
+ [OFONO_PASSWD_SIM_PUK2] = "puk2",
+ [OFONO_PASSWD_PHNET_PIN] = "network",
+ [OFONO_PASSWD_PHNET_PUK] = "networkpuk",
+ [OFONO_PASSWD_PHNETSUB_PIN] = "netsub",
+ [OFONO_PASSWD_PHNETSUB_PUK] = "netsubpuk",
+ [OFONO_PASSWD_PHSP_PIN] = "service",
+ [OFONO_PASSWD_PHSP_PUK] = "servicepuk",
+ [OFONO_PASSWD_PHCORP_PIN] = "corp",
+ [OFONO_PASSWD_PHCORP_PUK] = "corppuk",
+};
+
+static const char *sim_passwd_name(enum ofono_passwd_type type)
+{
+ return passwd_name[type];
+}
+
+static enum ofono_passwd_type sim_string_to_passwd(const char *name)
+{
+ int len = sizeof(passwd_name) / sizeof(*passwd_name);
+ int i;
+
+ for (i = 0; i < len; i++)
+ if (!strcmp(passwd_name[i], name))
+ return i;
+
+ return OFONO_PASSWD_NONE;
+}
+
static char **get_own_numbers(GSList *own_numbers)
{
int nelem = 0;
diff --git a/src/simutil.c b/src/simutil.c
index e1b0f2aa..b80e014d 100644
--- a/src/simutil.c
+++ b/src/simutil.c
@@ -488,39 +488,3 @@ void sim_adn_build(unsigned char *data, int length,
/* Ext1 unused */
*data++ = 0xff;
}
-
-static const char *const passwd_name[] = {
- [OFONO_PASSWD_NONE] = "none",
- [OFONO_PASSWD_SIM_PIN] = "pin",
- [OFONO_PASSWD_SIM_PUK] = "puk",
- [OFONO_PASSWD_PHSIM_PIN] = "phone",
- [OFONO_PASSWD_PHFSIM_PIN] = "firstphone",
- [OFONO_PASSWD_PHFSIM_PUK] = "firstphonepuk",
- [OFONO_PASSWD_SIM_PIN2] = "pin2",
- [OFONO_PASSWD_SIM_PUK2] = "puk2",
- [OFONO_PASSWD_PHNET_PIN] = "network",
- [OFONO_PASSWD_PHNET_PUK] = "networkpuk",
- [OFONO_PASSWD_PHNETSUB_PIN] = "netsub",
- [OFONO_PASSWD_PHNETSUB_PUK] = "netsubpuk",
- [OFONO_PASSWD_PHSP_PIN] = "service",
- [OFONO_PASSWD_PHSP_PUK] = "servicepuk",
- [OFONO_PASSWD_PHCORP_PIN] = "corp",
- [OFONO_PASSWD_PHCORP_PUK] = "corppuk",
-};
-
-const char *sim_passwd_name(enum ofono_passwd_type type)
-{
- return passwd_name[type];
-}
-
-enum ofono_passwd_type sim_string_to_passwd(const char *name)
-{
- int len = sizeof(passwd_name) / sizeof(*passwd_name);
- int i;
-
- for (i = 0; i < len; i++)
- if (!strcmp(passwd_name[i], name))
- return i;
-
- return OFONO_PASSWD_NONE;
-}
diff --git a/src/simutil.h b/src/simutil.h
index df84416f..2cd3b738 100644
--- a/src/simutil.h
+++ b/src/simutil.h
@@ -93,6 +93,3 @@ gboolean sim_adn_parse(const unsigned char *data, int length,
void sim_adn_build(unsigned char *data, int length,
const struct ofono_phone_number *ph,
const char *identifier);
-
-const char *sim_passwd_name(enum ofono_passwd_type type);
-enum ofono_passwd_type sim_string_to_passwd(const char *name);