Fixed broken calling of stackcheck()
[gnokii.git] / include / gsm-networks.h
1 /*
2
3   G N O K I I
4
5   A Linux/Unix toolset and driver for Nokia mobile phones.
6
7   Released under the terms of the GNU GPL, see file COPYING for more details.
8         
9   Header file for GSM networks.
10
11 */
12
13 #ifndef __gsm_networks_h
14 #define __gsm_networks_h
15
16 /* Define enums for RF units.  GRF_CSQ asks for units in form used
17    in AT+CSQ command as defined by GSM 07.07 */
18 typedef enum {
19   GRF_Arbitrary,
20   GRF_dBm,
21   GRF_mV,
22   GRF_uV,
23   GRF_CSQ,
24   GRF_Percentage
25 } GSM_RFUnits;
26
27 /* This structure is used to get the current network status */
28
29 typedef struct {
30   char NetworkCode[10]; /* GSM network code */
31   char CellID[10];      /* CellID */
32   char LAC[10];         /* LAC */
33 } GSM_NetworkInfo;
34
35 /* This type is used to hold information about various GSM networks. */
36
37 typedef struct {
38   char Code[9+1]; /* GSM network code */
39   char Name[50]; /* GSM network name */
40 } GSM_Network;
41
42 /* This type is used to hold information about various GSM countries. */
43
44 typedef struct {
45   char *Code; /* GSM country code */
46   char *Name; /* GSM country name */
47 } GSM_Country;
48
49 /* These functions are used to search the structure defined above.*/
50 char *GSM_GetNetworkName(char *NetworkCode);
51 #ifndef UCLINUX
52 char *GSM_GetNetworkCode(char *NetworkName);
53
54 char *GSM_GetCountryName(char *CountryCode);
55 char *GSM_GetCountryCode(char *CountryName);
56 #endif /* UCLINUX */
57
58 void EncodeNetworkCode(unsigned char* buffer, unsigned char* output);
59 void DecodeNetworkCode(unsigned char* buffer, unsigned char* output);
60
61 #endif  /* __gsm_networks_h */