#include "simutil.h"
#include "util.h"
-struct pnn_operator {
- char *longname;
- gboolean long_ci;
- char *shortname;
- gboolean short_ci;
- char *info;
-};
-
struct spdi_operator {
char mcc[OFONO_MAX_MCC_LENGTH + 1];
char mnc[OFONO_MAX_MNC_LENGTH + 1];
g_free(spdi);
}
-static void pnn_operator_free(struct pnn_operator *oper)
+static void pnn_operator_free(struct sim_eons_operator_info *oper)
{
g_free(oper->info);
g_free(oper->shortname);
{
struct sim_eons *eons = g_new0(struct sim_eons, 1);
- eons->pnn_list = g_new0(struct pnn_operator, pnn_records);
+ eons->pnn_list = g_new0(struct sim_eons_operator_info, pnn_records);
eons->pnn_max = pnn_records;
return eons;
const char *name;
int namelength;
gboolean add_ci;
- struct pnn_operator *oper = &eons->pnn_list[record-1];
+ struct sim_eons_operator_info *oper = &eons->pnn_list[record-1];
name = ber_tlv_find_by_tag(tlv, 0x43, length, &namelength);
{
}
-const char *sim_eons_lookup(struct sim_eons *eons,
- const char *mcc, const char *mnc, guint16 lac)
+struct sim_eons_operator_info *sim_eons_lookup(struct sim_eons *eons,
+ const char *mcc,
+ const char *mnc, guint16 lac)
{
GSList *l;
const struct opl_operator *opl;
if (opl->id == 0)
return NULL;
- return eons->pnn_list[opl->id - 1].longname;
+ return &eons->pnn_list[opl->id - 1];
}
GSList *operators;
};
+struct sim_eons_operator_info {
+ char *longname;
+ gboolean long_ci;
+ char *shortname;
+ gboolean short_ci;
+ char *info;
+};
+
struct sim_eons {
- struct pnn_operator *pnn_list;
+ struct sim_eons_operator_info *pnn_list;
GSList *opl_list;
gboolean pnn_valid;
int pnn_max;
void sim_eons_add_opl_record(struct sim_eons *eons,
const guint8 *tlv, int length);
void sim_eons_optimize(struct sim_eons *eons);
-const char *sim_eons_lookup(struct sim_eons *eons, const char *mcc,
- const char *mnc, guint16 lac);
+struct sim_eons_operator_info *sim_eons_lookup(struct sim_eons *eons,
+ const char *mcc,
+ const char *mnc, guint16 lac);
void sim_eons_free(struct sim_eons *eons);
struct sim_spdi *sim_spdi_new(const guint8 *tlv, int length);