http://marcin-wiacek.fkn.pl/english/zips/mygnokii.tar.gz
[gnokii.git] / common / gsm-networks.c
index 2ef285f..b36bcf5 100644 (file)
@@ -1,29 +1,20 @@
 /*
 
-  $Id$
-
   G N O K I I
 
   A Linux/Unix toolset and driver for Nokia mobile phones.
 
-  Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janík ml.
-
   Released under the terms of the GNU GPL, see file COPYING for more details.
        
   This file implements GSM networks searching.
 
-  $Log$
-  Revision 1.1.1.1  2001/11/25 21:59:00  short
-  :pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Sun Nov 25 22:56 CET 2001
-
-  Revision 1.14  2001/06/28 00:28:45  pkot
-  Small docs updates (Pawel Kot)
-
-
 */
 
 #include <string.h>
+
+#include "gsm-common.h"
 #include "gsm-networks.h"
+#include "gsm-coding.h"
 
 GSM_Country GSM_Countries[] =
 {
@@ -277,19 +268,50 @@ GSM_Network GSM_Networks[] =
   { "340 01", "AMERIS" },
   { "400 01", "AZERCELL GSM" },
   { "400 02", "Bakcell GSM 2000" },
-  { "404 07", "TATA Cellular" },
-  { "404 10", "AirTel" },
-  { "404 11", "Essar Cellphone" },
-  { "404 12", "Escotel" },
-  { "404 14", "Modicom" },
-  { "404 15", "Essar Cellphone" },
-  { "404 20", "Max Touch" },
-  { "404 21", "BPL - Mobile" },
-  { "404 27", "BPL USWEST Cellular" },
-  { "404 30", "Command" },
-  { "404 40", "SkyCell" },
-  { "404 41", "RPG Cellular" },
-  { "404 42", "AIRCEL" },
+
+  { "404 01", "AIRCELL"},\r
+  { "404 02", "Evergrowth"},\r
+  { "404 03", "Bharthi Telenet"},\r
+  { "404 05", "Fascel"},\r
+  { "404 07", "Tata Cell"},\r //TATA Cellular
+  { "404 08", "Koshika"},
+  { "404 09", "Reliance"},\r
+  { "404 10", "AIRTEL"},\r //AirTel
+  { "404 11", "Essar"},\r //Essar Cellphone
+  { "404 12", "Escotel"},\r
+  { "404 14", "Spice"},\r //Modicom
+  { "404 15", "AIRCELL"},\r //Essar Cellphone
+  { "404 18", "Reliance"},\r
+  { "404 19", "Escotel"},\r
+  { "404 20", "Orange"},\r //Max Touch
+  { "404 21", "BPL Mobile"},\r //BPL - Mobile
+  { "404 22", "Birla AT&T"},\r
+  { "404 24", "Birla AT&T"},\r
+  { "404 26", "Koshika"},\r
+  { "404 27", "BPL Mobile"},\r //BPL USWEST Cellular
+  { "404 30", "Usha"},\r //Command
+  { "404 31", "AIRCELL"},\r //?
+  { "404 31", "Command"},\r //?
+  { "404 32", "Koshika"},\r
+  { "404 34", "Koshika"},\r
+  { "404 36", "Reliance"},\r
+  { "404 40", "SkyCell"},\r
+  { "404 41", "RPG"}, //RPG Cellular
+  { "404 42", "AIRCELL"},\r //AIRCEL
+  { "404 43", "BPL Mobile"},\r
+  { "404 44", "Spice"},\r
+  { "404 45", "AIRTEL-blr"},\r
+  { "404 46", "BPL Moibile"},\r
+  { "404 49", "AIRTEL"},
+  { "404 50", "Reliance"},\r
+  { "404 52", "Reliance"},
+  { "404 56", "Escotel"},
+  { "404 60", "AIRCELL"},\r
+  { "404 67", "Reliance"},
+  { "404 70", "Hexacom"},\r
+  { "404 78", "RPG"},\r
+  { "404 85", "Reliance"},\r
+\r
   { "410 01", "Mobilink" },
   { "413 02", "DIALOG GSM" },
   { "415 01", "CELLIS" },
@@ -443,3 +465,18 @@ char *GSM_GetCountryCode(char *CountryName)
 
   return GSM_Countries[index].Code;
 }
+
+void EncodeNetworkCode(unsigned char* buffer, unsigned char* output)
+{
+    EncodeBCD (buffer, output, 6, false);
+    buffer[1]=buffer[1] | 0xf0;
+}
+
+void DecodeNetworkCode(unsigned char* buffer, unsigned char* output)
+{
+    DecodeBCD (output, buffer, 3);
+    output[6]=output[5];
+    output[5]=output[4];
+    output[4]=output[3];
+    output[3]=' ';
+}