Imported gammu 0.90.7
[gammu.git] / common / service / gsmnet.h
blob8307ad3014c782a3a9b0365bf5e74ee5f73651d0
1 #ifndef __gsm_networks_h
2 #define __gsm_networks_h
4 /**
5 * Lookup GSM network by code.
6 */
7 char *GSM_GetNetworkName(char *NetworkCode);
9 /**
10 * Lookup GSM country by code.
12 char *GSM_GetCountryName(char *CountryCode);
14 /**
15 * State of network.
17 typedef enum {
18 /**
19 * Phone home network.
21 GSM_HomeNetwork = 1,
22 /**
23 * Using roaming.
25 GSM_RoamingNetwork,
26 /**
27 * Network explicitely requested by user.
29 GSM_RequestingNetwork,
30 /**
31 * No network available.
33 GSM_NoNetwork,
34 /**
35 * Network registration denied.
37 GSM_RegistrationDenied,
38 /**
39 * Uknown network status.
41 GSM_NetworkStatusUnknown
42 } GSM_NetworkInfo_State;
44 /**
45 * This structure is used to get the current network status.
47 typedef struct {
48 /**
49 * Name of current network.
51 unsigned char NetworkName[15*2];
52 /**
53 * State of current network.
55 GSM_NetworkInfo_State State;
56 /**
57 * GSM network code.
59 char NetworkCode[10];
60 /**
61 * Cell ID
63 unsigned char CellID[10];
64 /**
65 * LAC (Local Area Code).
67 unsigned char LAC[10];
68 } GSM_NetworkInfo;
70 void NOKIA_EncodeNetworkCode (unsigned char* buffer, unsigned char* output);
71 void NOKIA_DecodeNetworkCode (unsigned char* buffer, unsigned char* output);
73 /**
74 * Information about signal quality, all these should be -1 when unknown.
76 typedef struct {
78 * Signal strength in dBm
80 int SignalStrength;
81 /**
82 * Signal strength in percent.
84 int SignalPercent;
85 /**
86 * Bit error rate in percent.
88 int BitErrorRate;
89 } GSM_SignalQuality;
91 #endif
93 /* How should editor hadle tabs in this file? Add editor commands here.
94 * vim: noexpandtab sw=8 ts=8 sts=8: