From 78bf08e957078b14e2b165e40d02db98abc86e05 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Thu, 5 Jul 2012 21:26:53 +0200 Subject: Removed deprecated util files Signed-off-by: Paul Kocialkowski --- Android.mk | 1 - include/Makefile.am | 1 - include/radio.h | 1 - include/util.h | 29 ---------------- samsung-ipc/Makefile.am | 1 - samsung-ipc/util.c | 90 ------------------------------------------------- 6 files changed, 123 deletions(-) delete mode 100644 include/util.h delete mode 100644 samsung-ipc/util.c diff --git a/Android.mk b/Android.mk index 4e84dbc..ceecbe3 100644 --- a/Android.mk +++ b/Android.mk @@ -49,7 +49,6 @@ samsung-ipc_files := \ samsung-ipc/ipc.c \ samsung-ipc/ipc_util.c \ samsung-ipc/ipc_devices.c \ - samsung-ipc/util.c \ samsung-ipc/rfs.c \ samsung-ipc/gen.c \ samsung-ipc/gprs.c \ diff --git a/include/Makefile.am b/include/Makefile.am index f92b588..3f177d3 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -13,7 +13,6 @@ samsung_ipcinclude_HEADERS = \ ss.h \ pwr.h \ types.h \ - util.h \ gprs.h \ snd.h \ rfs.h \ diff --git a/include/radio.h b/include/radio.h index 30572ff..d606a3e 100644 --- a/include/radio.h +++ b/include/radio.h @@ -24,7 +24,6 @@ #include #include "types.h" -#include "util.h" #define IPC_CLIENT_TYPE_FMT 0 #define IPC_CLIENT_TYPE_RFS 1 diff --git a/include/util.h b/include/util.h deleted file mode 100644 index d007ad1..0000000 --- a/include/util.h +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This file is part of libsamsung-ipc. - * - * Copyright (C) 2010-2011 Joerie de Gram - * - * libsamsung-ipc is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libsamsung-ipc is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsamsung-ipc. If not, see . - * - */ - -#ifndef _UTIL_H_ -#define _UTIL_H_ - -const char *plmn_lookup(const char *plmn); -char *plmn_string(const char *plmn); - -#endif - -// vim:ts=4:sw=4:expandtab diff --git a/samsung-ipc/Makefile.am b/samsung-ipc/Makefile.am index b9e9b09..bf3cecb 100644 --- a/samsung-ipc/Makefile.am +++ b/samsung-ipc/Makefile.am @@ -19,7 +19,6 @@ libsamsung_ipc_la_SOURCES = \ ipc.c \ ipc_util.c \ ipc_devices.c \ - util.c \ rfs.c \ misc.c \ sec.c \ diff --git a/samsung-ipc/util.c b/samsung-ipc/util.c deleted file mode 100644 index 14aab5d..0000000 --- a/samsung-ipc/util.c +++ /dev/null @@ -1,90 +0,0 @@ -/** - * This file is part of libsamsung-ipc. - * - * Copyright (C) 2010-2011 Joerie de Gram - * - * libsamsung-ipc is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libsamsung-ipc is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsamsung-ipc. If not, see . - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -const char *plmn_lookup(const char *plmn) -{ - unsigned int mcc, mnc; - sscanf(plmn, "%3u%2u", &mcc, &mnc); - - switch(mcc) { - case 204: - switch(mnc) { - case 1: return "VastMobiel"; - case 2: return "Tele2"; - case 4: return "Vodafone"; - case 8: case 10: return "KPN"; - case 12: return "Telfort"; - case 16: case 20: return "T-Mobile"; - } - break; - case 208: - switch(mnc) { - case 0: return "Orange"; - case 1: return "Orange"; - case 2: return "Orange"; - case 5: case 6: case 7: return "Globalstar Europe"; - case 9: return "SFR"; - case 10: return "SFR"; - case 11: return "SFR"; - case 13: return "SFR"; - case 14: return "Free Mobile"; - case 15: return "Free Mobile"; - case 20: return "Bouygues"; - case 21: return "Bouygues"; - case 22: return "Transatel Mobile"; - case 23: return "Virgin Mobile"; - case 25: return "Lycamobile"; - case 26: return "NRJ Mobile"; - case 27: return "Afone Mobile"; - case 88: return "Bouygues"; - case 90: return "Association Images & Réseaux"; - } - break; - } - - return NULL; -} - -char *plmn_string(const char *plmn) -{ - int length = (plmn[5] == '#') ? 6 : 7; - - char *plmn_str = (char*)malloc(length); - - memcpy(plmn_str, plmn, length); - plmn_str[length-1] = '\0'; - - return plmn_str; -} - -// vim:ts=4:sw=4:expandtab -- cgit v1.1