summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-10-06 19:43:06 (UTC)
committer zautrix <zautrix>2004-10-06 19:43:06 (UTC)
commited4675de07d947f55d2672c721599e3a0af1e24b (patch) (unidiff)
treef143fd171dab8a8d05bf08ffd7efb84cffe3cb97
parentbe3a5ea82c9a160eeeaad187a357c9a085fdb20a (diff)
downloadkdepimpi-ed4675de07d947f55d2672c721599e3a0af1e24b.zip
kdepimpi-ed4675de07d947f55d2672c721599e3a0af1e24b.tar.gz
kdepimpi-ed4675de07d947f55d2672c721599e3a0af1e24b.tar.bz2
bugfixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--gammu/emb/common/gsmstate.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gammu/emb/common/gsmstate.h b/gammu/emb/common/gsmstate.h
index f15a6a7..2b4806c 100644
--- a/gammu/emb/common/gsmstate.h
+++ b/gammu/emb/common/gsmstate.h
@@ -1,1579 +1,1579 @@
1/* (c) 2002-2004 by Marcin Wiacek & Michal Cihar */ 1/* (c) 2002-2004 by Marcin Wiacek & Michal Cihar */
2 2
3#ifndef __gsm_state_h 3#ifndef __gsm_state_h
4#define __gsm_state_h 4#define __gsm_state_h
5 5
6#include <time.h> 6#include <time.h>
7 7
8#include "config.h" 8#include "config.h"
9#include "misc/cfg.h" 9#include "misc/cfg.h"
10 10
11 typedef struct _GSM_StateMachine GSM_StateMachine; 11 typedef struct _GSM_StateMachine GSM_StateMachine;
12 typedef struct _GSM_User GSM_User; 12 typedef struct _GSM_User GSM_User;
13 typedef struct _OnePhoneModel OnePhoneModel; 13 typedef struct _OnePhoneModel OnePhoneModel;
14 typedef struct _GSM_Reply_FunctionGSM_Reply_Function; 14 typedef struct _GSM_Reply_FunctionGSM_Reply_Function;
15 15
16#ifdef GSM_ENABLE_NOKIA3320 16#ifdef GSM_ENABLE_NOKIA3320
17# include "phone/nokia/dct4/n3320.h" 17# include "phone/nokia/dct4/n3320.h"
18#endif 18#endif
19#ifdef GSM_ENABLE_NOKIA3650 19#ifdef GSM_ENABLE_NOKIA3650
20# include "phone/nokia/dct4/n3650.h" 20# include "phone/nokia/dct4/n3650.h"
21#endif 21#endif
22#ifdef GSM_ENABLE_NOKIA650 22#ifdef GSM_ENABLE_NOKIA650
23# include "phone/nokia/dct3/n0650.h" 23# include "phone/nokia/dct3/n0650.h"
24#endif 24#endif
25#ifdef GSM_ENABLE_NOKIA6110 25#ifdef GSM_ENABLE_NOKIA6110
26# include "phone/nokia/dct3/n6110.h" 26# include "phone/nokia/dct3/n6110.h"
27#endif 27#endif
28#ifdef GSM_ENABLE_NOKIA6510 28#ifdef GSM_ENABLE_NOKIA6510
29# include "phone/nokia/dct4/n6510.h" 29# include "phone/nokia/dct4/n6510.h"
30#endif 30#endif
31#ifdef GSM_ENABLE_NOKIA7110 31#ifdef GSM_ENABLE_NOKIA7110
32# include "phone/nokia/dct3/n7110.h" 32# include "phone/nokia/dct3/n7110.h"
33#endif 33#endif
34#ifdef GSM_ENABLE_NOKIA9210 34#ifdef GSM_ENABLE_NOKIA9210
35# include "phone/nokia/dct3/n9210.h" 35# include "phone/nokia/dct3/n9210.h"
36#endif 36#endif
37#ifdef GSM_ENABLE_ATGEN 37#ifdef GSM_ENABLE_ATGEN
38# include "phone/at/atgen.h" 38# include "phone/at/atgen.h"
39#endif 39#endif
40#ifdef GSM_ENABLE_ALCATEL 40#ifdef GSM_ENABLE_ALCATEL
41# include "phone/alcatel/alcatel.h" 41# include "phone/alcatel/alcatel.h"
42#endif 42#endif
43#ifdef GSM_ENABLE_OBEXGEN 43#ifdef GSM_ENABLE_OBEXGEN
44# include "phone/obex/obexgen.h" 44# include "phone/obex/obexgen.h"
45#endif 45#endif
46#ifdef GSM_ENABLE_MROUTERGEN 46#ifdef GSM_ENABLE_MROUTERGEN
47# include "phone/symbian/mroutgen.h" 47# include "phone/symbian/mroutgen.h"
48#endif 48#endif
49 49
50#ifndef GSM_USED_MBUS2 50#ifndef GSM_USED_MBUS2
51# undef GSM_ENABLE_MBUS2 51# undef GSM_ENABLE_MBUS2
52#endif 52#endif
53#ifndef GSM_USED_FBUS2 53#ifndef GSM_USED_FBUS2
54# undef GSM_ENABLE_FBUS2 54# undef GSM_ENABLE_FBUS2
55#endif 55#endif
56#ifndef GSM_USED_FBUS2DLR3 56#ifndef GSM_USED_FBUS2DLR3
57# undef GSM_ENABLE_FBUS2DLR3 57# undef GSM_ENABLE_FBUS2DLR3
58#endif 58#endif
59#ifndef GSM_USED_FBUS2DKU5 59#ifndef GSM_USED_FBUS2DKU5
60# undef GSM_ENABLE_FBUS2DKU5 60# undef GSM_ENABLE_FBUS2DKU5
61#endif 61#endif
62#ifndef GSM_USED_FBUS2PL2303 62#ifndef GSM_USED_FBUS2PL2303
63# undef GSM_ENABLE_FBUS2PL2303 63# undef GSM_ENABLE_FBUS2PL2303
64#endif 64#endif
65#ifndef GSM_USED_FBUS2BLUE 65#ifndef GSM_USED_FBUS2BLUE
66# undef GSM_ENABLE_FBUS2BLUE 66# undef GSM_ENABLE_FBUS2BLUE
67#endif 67#endif
68#ifndef GSM_USED_FBUS2IRDA 68#ifndef GSM_USED_FBUS2IRDA
69# undef GSM_ENABLE_FBUS2IRDA 69# undef GSM_ENABLE_FBUS2IRDA
70#endif 70#endif
71#ifndef GSM_USED_PHONETBLUE 71#ifndef GSM_USED_PHONETBLUE
72# undef GSM_ENABLE_PHONETBLUE 72# undef GSM_ENABLE_PHONETBLUE
73#endif 73#endif
74#ifndef GSM_USED_AT 74#ifndef GSM_USED_AT
75# undef GSM_ENABLE_AT 75# undef GSM_ENABLE_AT
76#endif 76#endif
77#ifndef GSM_USED_IRDAOBEX 77#ifndef GSM_USED_IRDAOBEX
78# undef GSM_ENABLE_IRDAOBEX 78# undef GSM_ENABLE_IRDAOBEX
79#endif 79#endif
80#ifndef GSM_USED_BLUEOBEX 80#ifndef GSM_USED_BLUEOBEX
81# undef GSM_ENABLE_BLUEOBEX 81# undef GSM_ENABLE_BLUEOBEX
82#endif 82#endif
83#ifndef GSM_USED_ALCABUS 83#ifndef GSM_USED_ALCABUS
84# undef GSM_ENABLE_ALCABUS 84# undef GSM_ENABLE_ALCABUS
85#endif 85#endif
86#ifndef GSM_USED_IRDAPHONET 86#ifndef GSM_USED_IRDAPHONET
87# undef GSM_ENABLE_IRDAPHONET 87# undef GSM_ENABLE_IRDAPHONET
88#endif 88#endif
89#ifndef GSM_USED_BLUEFBUS2 89#ifndef GSM_USED_BLUEFBUS2
90# undef GSM_ENABLE_BLUEFBUS2 90# undef GSM_ENABLE_BLUEFBUS2
91#endif 91#endif
92#ifndef GSM_USED_BLUEPHONET 92#ifndef GSM_USED_BLUEPHONET
93# undef GSM_ENABLE_BLUEPHONET 93# undef GSM_ENABLE_BLUEPHONET
94#endif 94#endif
95#ifndef GSM_USED_BLUEAT 95#ifndef GSM_USED_BLUEAT
96# undef GSM_ENABLE_BLUEAT 96# undef GSM_ENABLE_BLUEAT
97#endif 97#endif
98#ifndef GSM_USED_IRDAAT 98#ifndef GSM_USED_IRDAAT
99# undef GSM_ENABLE_IRDAAT 99# undef GSM_ENABLE_IRDAAT
100#endif 100#endif
101#ifndef GSM_USED_MROUTERBLUE 101#ifndef GSM_USED_MROUTERBLUE
102# undef GSM_ENABLE_MROUTERBLUE 102# undef GSM_ENABLE_MROUTERBLUE
103#endif 103#endif
104 104
105#if defined(GSM_ENABLE_NOKIA3320) || defined(GSM_ENABLE_NOKIA650) || defined(GSM_ENABLE_NOKIA6110) || defined(GSM_ENABLE_NOKIA7110) || defined(GSM_ENABLE_NOKIA9210) 105#if defined(GSM_ENABLE_NOKIA3320) || defined(GSM_ENABLE_NOKIA650) || defined(GSM_ENABLE_NOKIA6110) || defined(GSM_ENABLE_NOKIA7110) || defined(GSM_ENABLE_NOKIA9210)
106# define GSM_ENABLE_NOKIA_DCT3 106# define GSM_ENABLE_NOKIA_DCT3
107#endif 107#endif
108#if defined(GSM_ENABLE_NOKIA3650) || defined(GSM_ENABLE_NOKIA6510) 108#if defined(GSM_ENABLE_NOKIA3650) || defined(GSM_ENABLE_NOKIA6510)
109# define GSM_ENABLE_NOKIA_DCT4 109# define GSM_ENABLE_NOKIA_DCT4
110#endif 110#endif
111 111
112#include "protocol/protocol.h" 112#include "protocol/protocol.h"
113#if defined(GSM_ENABLE_FBUS2) || defined(GSM_ENABLE_FBUS2IRDA) || defined(GSM_ENABLE_FBUS2DLR3) || defined(GSM_ENABLE_FBUS2BLUE) || defined(GSM_ENABLE_BLUEFBUS2) || defined(GSM_ENABLE_FBUS2DKU5) || defined(GSM_ENABLE_FBUS2PL2303) 113#if defined(GSM_ENABLE_FBUS2) || defined(GSM_ENABLE_FBUS2IRDA) || defined(GSM_ENABLE_FBUS2DLR3) || defined(GSM_ENABLE_FBUS2BLUE) || defined(GSM_ENABLE_BLUEFBUS2) || defined(GSM_ENABLE_FBUS2DKU5) || defined(GSM_ENABLE_FBUS2PL2303)
114# include "protocol/nokia/fbus2.h" 114# include "protocol/nokia/fbus2.h"
115#endif 115#endif
116#ifdef GSM_ENABLE_MBUS2 116#ifdef GSM_ENABLE_MBUS2
117# include "protocol/nokia/mbus2.h" 117# include "protocol/nokia/mbus2.h"
118#endif 118#endif
119#if defined(GSM_ENABLE_PHONETBLUE) || defined(GSM_ENABLE_IRDAPHONET) || defined(GSM_ENABLE_BLUEPHONET) 119#if defined(GSM_ENABLE_PHONETBLUE) || defined(GSM_ENABLE_IRDAPHONET) || defined(GSM_ENABLE_BLUEPHONET)
120# include "protocol/nokia/phonet.h" 120# include "protocol/nokia/phonet.h"
121#endif 121#endif
122#if defined(GSM_ENABLE_AT) || defined(GSM_ENABLE_BLUEAT) || defined(GSM_ENABLE_IRDAAT) 122#if defined(GSM_ENABLE_AT) || defined(GSM_ENABLE_BLUEAT) || defined(GSM_ENABLE_IRDAAT)
123# include "protocol/at/at.h" 123# include "protocol/at/at.h"
124#endif 124#endif
125#ifdef GSM_ENABLE_ALCABUS 125#ifdef GSM_ENABLE_ALCABUS
126# include "protocol/alcatel/alcabus.h" 126# include "protocol/alcatel/alcabus.h"
127#endif 127#endif
128#if defined(GSM_ENABLE_IRDAOBEX) || defined(GSM_ENABLE_BLUEOBEX) 128#if defined(GSM_ENABLE_IRDAOBEX) || defined(GSM_ENABLE_BLUEOBEX)
129# include "protocol/obex/obex.h" 129# include "protocol/obex/obex.h"
130#endif 130#endif
131#if defined(GSM_ENABLE_MROUTERBLUE) 131#if defined(GSM_ENABLE_MROUTERBLUE)
132# include "protocol/symbian/mrouter.h" 132# include "protocol/symbian/mrouter.h"
133#endif 133#endif
134 134
135#define GSM_ENABLE_SERIALDEVICE 135#define GSM_ENABLE_SERIALDEVICE
136#ifndef GSM_USED_SERIALDEVICE 136#ifndef GSM_USED_SERIALDEVICE
137# undef GSM_ENABLE_SERIALDEVICE 137# undef GSM_ENABLE_SERIALDEVICE
138#endif 138#endif
139#define GSM_ENABLE_IRDADEVICE 139#define GSM_ENABLE_IRDADEVICE
140#ifndef GSM_USED_IRDADEVICE 140#ifndef GSM_USED_IRDADEVICE
141# undef GSM_ENABLE_IRDADEVICE 141# undef GSM_ENABLE_IRDADEVICE
142#endif 142#endif
143#define GSM_ENABLE_BLUETOOTHDEVICE 143#define GSM_ENABLE_BLUETOOTHDEVICE
144#ifndef GSM_USED_BLUETOOTHDEVICE 144#ifndef GSM_USED_BLUETOOTHDEVICE
145# undef GSM_ENABLE_BLUETOOTHDEVICE 145# undef GSM_ENABLE_BLUETOOTHDEVICE
146#endif 146#endif
147 147
148#ifdef DJGPP 148#ifdef DJGPP
149# undef GSM_ENABLE_IRDADEVICE 149# undef GSM_ENABLE_IRDADEVICE
150# undef GSM_ENABLE_IRDAPHONET 150# undef GSM_ENABLE_IRDAPHONET
151# undef GSM_ENABLE_IRDAOBEX 151# undef GSM_ENABLE_IRDAOBEX
152# undef GSM_ENABLE_IRDAAT 152# undef GSM_ENABLE_IRDAAT
153# undef GSM_ENABLE_FBUS2IRDA 153# undef GSM_ENABLE_FBUS2IRDA
154 154
155# undef GSM_ENABLE_BLUETOOTHDEVICE 155# undef GSM_ENABLE_BLUETOOTHDEVICE
156# undef GSM_ENABLE_BLUEPHONET 156# undef GSM_ENABLE_BLUEPHONET
157# undef GSM_ENABLE_BLUEOBEX 157# undef GSM_ENABLE_BLUEOBEX
158# undef GSM_ENABLE_BLUEAT 158# undef GSM_ENABLE_BLUEAT
159# undef GSM_ENABLE_BLUEFBUS2 159# undef GSM_ENABLE_BLUEFBUS2
160# undef GSM_ENABLE_PHONETBLUE 160# undef GSM_ENABLE_PHONETBLUE
161# undef GSM_ENABLE_FBUS2BLUE 161# undef GSM_ENABLE_FBUS2BLUE
162# undef GSM_ENABLE_MROUTERBLUE 162# undef GSM_ENABLE_MROUTERBLUE
163#endif 163#endif
164
164#ifndef WIN32 165#ifndef WIN32
165# ifdef ENABLE_LGPL 166# ifdef ENABLE_LGPL
166# undef GSM_ENABLE_IRDADEVICE 167# undef GSM_ENABLE_IRDADEVICE
167# undef GSM_ENABLE_IRDAPHONET 168# undef GSM_ENABLE_IRDAPHONET
168# undef GSM_ENABLE_IRDAOBEX 169# undef GSM_ENABLE_IRDAOBEX
169# undef GSM_ENABLE_IRDAAT 170# undef GSM_ENABLE_IRDAAT
170# undef GSM_ENABLE_FBUS2IRDA 171# undef GSM_ENABLE_FBUS2IRDA
171 172
172# undef GSM_ENABLE_BLUETOOTHDEVICE 173# undef GSM_ENABLE_BLUETOOTHDEVICE
173# undef GSM_ENABLE_BLUEPHONET 174# undef GSM_ENABLE_BLUEPHONET
174# undef GSM_ENABLE_BLUEOBEX 175# undef GSM_ENABLE_BLUEOBEX
175# undef GSM_ENABLE_BLUEAT 176# undef GSM_ENABLE_BLUEAT
176# undef GSM_ENABLE_BLUEFBUS2 177# undef GSM_ENABLE_BLUEFBUS2
177# undef GSM_ENABLE_PHONETBLUE 178# undef GSM_ENABLE_PHONETBLUE
178# undef GSM_ENABLE_FBUS2BLUE 179# undef GSM_ENABLE_FBUS2BLUE
179# undef GSM_ENABLE_MROUTERBLUE 180# undef GSM_ENABLE_MROUTERBLUE
180# endif 181# endif
181#endif 182#endif
182 183
183#ifdef GSM_ENABLE_SERIALDEVICE 184#ifdef GSM_ENABLE_SERIALDEVICE
184# include "device/serial/ser_w32.h" 185# include "device/serial/ser_w32.h"
185# include "device/serial/ser_unx.h" 186# include "device/serial/ser_unx.h"
186# include "device/serial/ser_djg.h" 187# include "device/serial/ser_djg.h"
187#endif 188#endif
188#ifdef GSM_ENABLE_IRDADEVICE 189#ifdef GSM_ENABLE_IRDADEVICE
189# include "device/irda/irda.h" 190# include "device/irda/irda.h"
190#endif 191#endif
191#ifdef GSM_ENABLE_BLUETOOTHDEVICE 192#ifdef GSM_ENABLE_BLUETOOTHDEVICE
192# include "device/bluetoth/bluetoth.h" 193# include "device/bluetoth/bluetoth.h"
193#endif 194#endif
194 195
195#include "service/gsmpbk.h" 196#include "service/gsmpbk.h"
196#include "service/gsmnet.h" 197#include "service/gsmnet.h"
197#include "service/gsmring.h" 198#include "service/gsmring.h"
198#include "service/gsmcal.h" 199#include "service/gsmcal.h"
199#include "service/gsmdata.h" 200#include "service/gsmdata.h"
200#include "service/gsmlogo.h" 201#include "service/gsmlogo.h"
201#include "service/gsmmisc.h" 202#include "service/gsmmisc.h"
202#include "service/gsmprof.h" 203#include "service/gsmprof.h"
203#include "service/gsmcall.h" 204#include "service/gsmcall.h"
204#include "service/sms/gsmsms.h" 205#include "service/sms/gsmsms.h"
205#include "service/sms/gsmems.h" 206#include "service/sms/gsmems.h"
206#include "service/sms/gsmmulti.h" 207#include "service/sms/gsmmulti.h"
207#include "service/backup/gsmback.h" 208#include "service/backup/gsmback.h"
208 209
209 210
210/* ------------------------- Device layer ---------------------------------- */ 211/* ------------------------- Device layer ---------------------------------- */
211 212
212/** 213/**
213 * Device functions, each device has to provide these. 214 * Device functions, each device has to provide these.
214 */ 215 */
215typedef struct { 216typedef struct {
216 /** 217 /**
217 * Opens device. 218 * Opens device.
218 */ 219 */
219 GSM_Error (*OpenDevice) (GSM_StateMachine *s); 220 GSM_Error (*OpenDevice) (GSM_StateMachine *s);
220 /** 221 /**
221 * Closes device. 222 * Closes device.
222 */ 223 */
223 GSM_Error (*CloseDevice) (GSM_StateMachine *s); 224 GSM_Error (*CloseDevice) (GSM_StateMachine *s);
224 /** 225 /**
225 * Sets parity for device. 226 * Sets parity for device.
226 */ 227 */
227 GSM_Error (*DeviceSetParity) (GSM_StateMachine *s, bool parity); 228 GSM_Error (*DeviceSetParity) (GSM_StateMachine *s, bool parity);
228 /** 229 /**
229 * Sets dtr (data to read) and rts (ready to send) flags. 230 * Sets dtr (data to read) and rts (ready to send) flags.
230 */ 231 */
231 GSM_Error (*DeviceSetDtrRts) (GSM_StateMachine *s, bool dtr, bool rts); 232 GSM_Error (*DeviceSetDtrRts) (GSM_StateMachine *s, bool dtr, bool rts);
232 /** 233 /**
233 * Sets device speed. 234 * Sets device speed.
234 */ 235 */
235 GSM_Error (*DeviceSetSpeed) (GSM_StateMachine *s, int speed); 236 GSM_Error (*DeviceSetSpeed) (GSM_StateMachine *s, int speed);
236 /** 237 /**
237 * Attempts to read nbytes from device. 238 * Attempts to read nbytes from device.
238 */ 239 */
239 int (*ReadDevice) (GSM_StateMachine *s, void *buf, size_t nbytes); 240 int (*ReadDevice) (GSM_StateMachine *s, void *buf, size_t nbytes);
240 /** 241 /**
241 * Attempts to read nbytes from device. 242 * Attempts to read nbytes from device.
242 */ 243 */
243 int (*WriteDevice) (GSM_StateMachine *s, void *buf, size_t nbytes); 244 int (*WriteDevice) (GSM_StateMachine *s, void *buf, size_t nbytes);
244} GSM_Device_Functions; 245} GSM_Device_Functions;
245 246
246#ifdef GSM_ENABLE_SERIALDEVICE 247#ifdef GSM_ENABLE_SERIALDEVICE
247 extern GSM_Device_Functions SerialDevice; 248 extern GSM_Device_Functions SerialDevice;
248#endif 249#endif
249#ifdef GSM_ENABLE_IRDADEVICE 250#ifdef GSM_ENABLE_IRDADEVICE
250 extern GSM_Device_Functions IrdaDevice; 251 extern GSM_Device_Functions IrdaDevice;
251#endif 252#endif
252#ifdef GSM_ENABLE_BLUETOOTHDEVICE 253#ifdef GSM_ENABLE_BLUETOOTHDEVICE
253 extern GSM_Device_Functions BlueToothDevice; 254 extern GSM_Device_Functions BlueToothDevice;
254#endif 255#endif
255 256
256/** 257/**
257 * Structure containing device specific data and pointer to device functions - 258 * Structure containing device specific data and pointer to device functions -
258 * @ref GSM_Device_Functions. The data are in a union, so you can use only 259 * @ref GSM_Device_Functions. The data are in a union, so you can use only
259 * one device at one time. 260 * one device at one time.
260 */ 261 */
261typedef struct { 262typedef struct {
262 union { 263 union {
263 char fake; 264 char fake;
264#ifdef GSM_ENABLE_SERIALDEVICE 265#ifdef GSM_ENABLE_SERIALDEVICE
265 GSM_Device_SerialData Serial; 266 GSM_Device_SerialData Serial;
266#endif 267#endif
267#ifdef GSM_ENABLE_IRDADEVICE 268#ifdef GSM_ENABLE_IRDADEVICE
268 GSM_Device_IrdaData Irda; 269 GSM_Device_IrdaData Irda;
269#endif 270#endif
270#ifdef GSM_ENABLE_BLUETOOTHDEVICE 271#ifdef GSM_ENABLE_BLUETOOTHDEVICE
271 GSM_Device_BlueToothDataBlueTooth; 272 GSM_Device_BlueToothDataBlueTooth;
272#endif 273#endif
273 } Data; 274 } Data;
274 GSM_Device_Functions *Functions; 275 GSM_Device_Functions *Functions;
275} GSM_Device; 276} GSM_Device;
276 277
277/* ---------------------- Protocol layer ----------------------------------- */ 278/* ---------------------- Protocol layer ----------------------------------- */
278 279
279/** 280/**
280 * Protocol functions, each protocol has to implement these. 281 * Protocol functions, each protocol has to implement these.
281 */ 282 */
282typedef struct { 283typedef struct {
283 /** 284 /**
284 * Writes message to device. 285 * Writes message to device.
285 */ 286 */
286 GSM_Error (*WriteMessage) (GSM_StateMachine *s, unsigned char *buffer, 287 GSM_Error (*WriteMessage) (GSM_StateMachine *s, unsigned char *buffer,
287 int length, unsigned char type); 288 int length, unsigned char type);
288 /** 289 /**
289 * This one is called when character is received from device. 290 * This one is called when character is received from device.
290 */ 291 */
291 GSM_Error (*StateMachine) (GSM_StateMachine *s, unsigned char rx_char); 292 GSM_Error (*StateMachine) (GSM_StateMachine *s, unsigned char rx_char);
292 /** 293 /**
293 * Protocol initialisation. 294 * Protocol initialisation.
294 */ 295 */
295 GSM_Error (*Initialise) (GSM_StateMachine *s); 296 GSM_Error (*Initialise) (GSM_StateMachine *s);
296 /** 297 /**
297 * Protocol termination. 298 * Protocol termination.
298 */ 299 */
299 GSM_Error (*Terminate) (GSM_StateMachine *s); 300 GSM_Error (*Terminate) (GSM_StateMachine *s);
300} GSM_Protocol_Functions; 301} GSM_Protocol_Functions;
301 302
302#ifdef GSM_ENABLE_MBUS2 303#ifdef GSM_ENABLE_MBUS2
303 extern GSM_Protocol_Functions MBUS2Protocol; 304 extern GSM_Protocol_Functions MBUS2Protocol;
304#endif 305#endif
305#if defined(GSM_ENABLE_FBUS2) || defined(GSM_ENABLE_FBUS2IRDA) || defined(GSM_ENABLE_FBUS2DLR3) || defined(GSM_ENABLE_FBUS2DKU5) || defined(GSM_ENABLE_FBUS2BLUE) || defined(GSM_ENABLE_BLUEFBUS2) || defined(GSM_ENABLE_FBUS2PL2303) 306#if defined(GSM_ENABLE_FBUS2) || defined(GSM_ENABLE_FBUS2IRDA) || defined(GSM_ENABLE_FBUS2DLR3) || defined(GSM_ENABLE_FBUS2DKU5) || defined(GSM_ENABLE_FBUS2BLUE) || defined(GSM_ENABLE_BLUEFBUS2) || defined(GSM_ENABLE_FBUS2PL2303)
306 extern GSM_Protocol_Functions FBUS2Protocol; 307 extern GSM_Protocol_Functions FBUS2Protocol;
307#endif 308#endif
308#if defined(GSM_ENABLE_PHONETBLUE) || defined(GSM_ENABLE_IRDAPHONET) || defined(GSM_ENABLE_BLUEPHONET) 309#if defined(GSM_ENABLE_PHONETBLUE) || defined(GSM_ENABLE_IRDAPHONET) || defined(GSM_ENABLE_BLUEPHONET)
309 extern GSM_Protocol_Functions PHONETProtocol; 310 extern GSM_Protocol_Functions PHONETProtocol;
310#endif 311#endif
311#if defined(GSM_ENABLE_AT) || defined(GSM_ENABLE_BLUEAT) || defined(GSM_ENABLE_IRDAAT) 312#if defined(GSM_ENABLE_AT) || defined(GSM_ENABLE_BLUEAT) || defined(GSM_ENABLE_IRDAAT)
312 extern GSM_Protocol_Functions ATProtocol; 313 extern GSM_Protocol_Functions ATProtocol;
313#endif 314#endif
314#ifdef GSM_ENABLE_ALCABUS 315#ifdef GSM_ENABLE_ALCABUS
315 extern GSM_Protocol_Functions ALCABUSProtocol; 316 extern GSM_Protocol_Functions ALCABUSProtocol;
316#endif 317#endif
317#if defined(GSM_ENABLE_IRDAOBEX) || defined(GSM_ENABLE_BLUEOBEX) 318#if defined(GSM_ENABLE_IRDAOBEX) || defined(GSM_ENABLE_BLUEOBEX)
318 extern GSM_Protocol_Functions OBEXProtocol; 319 extern GSM_Protocol_Functions OBEXProtocol;
319#endif 320#endif
320#if defined(GSM_ENABLE_MROUTERBLUE) 321#if defined(GSM_ENABLE_MROUTERBLUE)
321 extern GSM_Protocol_Functions MROUTERProtocol; 322 extern GSM_Protocol_Functions MROUTERProtocol;
322#endif 323#endif
323 324
324/** 325/**
325 * Structure containing protocol specific data and pointer to protocol 326 * Structure containing protocol specific data and pointer to protocol
326 * functions - @ref GSM_Protocol_Functions. The data are in a structure, so 327 * functions - @ref GSM_Protocol_Functions. The data are in a structure, so
327 * you may use more protocols at once and switch between them. 328 * you may use more protocols at once and switch between them.
328 */ 329 */
329typedef struct { 330typedef struct {
330 struct { 331 struct {
331 char fake; 332 char fake;
332#ifdef GSM_ENABLE_MBUS2 333#ifdef GSM_ENABLE_MBUS2
333 GSM_Protocol_MBUS2Data MBUS2; 334 GSM_Protocol_MBUS2Data MBUS2;
334#endif 335#endif
335#if defined(GSM_ENABLE_FBUS2) || defined(GSM_ENABLE_FBUS2IRDA) || defined(GSM_ENABLE_FBUS2DLR3) || defined(GSM_ENABLE_FBUS2DKU5) || defined(GSM_ENABLE_FBUS2PL2303) || defined(GSM_ENABLE_FBUS2BLUE) || defined(GSM_ENABLE_BLUEFBUS2) 336#if defined(GSM_ENABLE_FBUS2) || defined(GSM_ENABLE_FBUS2IRDA) || defined(GSM_ENABLE_FBUS2DLR3) || defined(GSM_ENABLE_FBUS2DKU5) || defined(GSM_ENABLE_FBUS2PL2303) || defined(GSM_ENABLE_FBUS2BLUE) || defined(GSM_ENABLE_BLUEFBUS2)
336 GSM_Protocol_FBUS2Data FBUS2; 337 GSM_Protocol_FBUS2Data FBUS2;
337#endif 338#endif
338#if defined(GSM_ENABLE_PHONETBLUE) || defined(GSM_ENABLE_IRDAPHONET) || defined(GSM_ENABLE_BLUEPHONET) 339#if defined(GSM_ENABLE_PHONETBLUE) || defined(GSM_ENABLE_IRDAPHONET) || defined(GSM_ENABLE_BLUEPHONET)
339 GSM_Protocol_PHONETData PHONET; 340 GSM_Protocol_PHONETData PHONET;
340#endif 341#endif
341#if defined(GSM_ENABLE_AT) || defined(GSM_ENABLE_BLUEAT) || defined(GSM_ENABLE_IRDAAT) 342#if defined(GSM_ENABLE_AT) || defined(GSM_ENABLE_BLUEAT) || defined(GSM_ENABLE_IRDAAT)
342 GSM_Protocol_ATData AT; 343 GSM_Protocol_ATData AT;
343#endif 344#endif
344#ifdef GSM_ENABLE_ALCABUS 345#ifdef GSM_ENABLE_ALCABUS
345 GSM_Protocol_ALCABUSDataALCABUS; 346 GSM_Protocol_ALCABUSDataALCABUS;
346#endif 347#endif
347#if defined(GSM_ENABLE_IRDAOBEX) || defined(GSM_ENABLE_BLUEOBEX) 348#if defined(GSM_ENABLE_IRDAOBEX) || defined(GSM_ENABLE_BLUEOBEX)
348 GSM_Protocol_OBEXData OBEX; 349 GSM_Protocol_OBEXData OBEX;
349#endif 350#endif
350#if defined(GSM_ENABLE_MROUTERBLUE) 351#if defined(GSM_ENABLE_MROUTERBLUE)
351 GSM_Protocol_MROUTERDataMROUTER; 352 GSM_Protocol_MROUTERDataMROUTER;
352#endif 353#endif
353 } Data; 354 } Data;
354 GSM_Protocol_Functions *Functions; 355 GSM_Protocol_Functions *Functions;
355} GSM_Protocol; 356} GSM_Protocol;
356 357
357/* -------------------------- Phone layer ---------------------------------- */ 358/* -------------------------- Phone layer ---------------------------------- */
358 359
359/** 360/**
360 * Phone requests identificators, these are used for internally identifying 361 * Phone requests identificators, these are used for internally identifying
361 * which operation is being performed. 362 * which operation is being performed.
362 */ 363 */
363typedef enum { 364typedef enum {
364 ID_None=1, 365 ID_None=1,
365 ID_GetModel, 366 ID_GetModel,
366 ID_GetFirmware, 367 ID_GetFirmware,
367 ID_EnableSecurity, 368 ID_EnableSecurity,
368 ID_GetIMEI, 369 ID_GetIMEI,
369 ID_GetDateTime, 370 ID_GetDateTime,
370 ID_GetAlarm, 371 ID_GetAlarm,
371 ID_GetMemory, 372 ID_GetMemory,
372 ID_GetMemoryStatus, 373 ID_GetMemoryStatus,
373 ID_GetSMSC, 374 ID_GetSMSC,
374 ID_GetSMSMessage, 375 ID_GetSMSMessage,
375 ID_EnableEcho, 376 ID_EnableEcho,
376 ID_EnableErrorInfo, 377 ID_EnableErrorInfo,
377 ID_SetOBEX, 378 ID_SetOBEX,
378 ID_SetUSSD, 379 ID_SetUSSD,
379 ID_GetNote, 380 ID_GetNote,
380 ID_GetSignalQuality, 381 ID_GetSignalQuality,
381 ID_GetBatteryCharge, 382 ID_GetBatteryCharge,
382 ID_GetSMSFolders, 383 ID_GetSMSFolders,
383 ID_GetSMSFolderStatus, 384 ID_GetSMSFolderStatus,
384 ID_GetSMSStatus, 385 ID_GetSMSStatus,
385 ID_AddSMSFolder, 386 ID_AddSMSFolder,
386 ID_GetNetworkInfo, 387 ID_GetNetworkInfo,
387 ID_GetRingtone, 388 ID_GetRingtone,
388 ID_DialVoice, 389 ID_DialVoice,
389 ID_GetCalendarNotesInfo, 390 ID_GetCalendarNotesInfo,
390 ID_GetCalendarNote, 391 ID_GetCalendarNote,
391 ID_GetSecurityCode, 392 ID_GetSecurityCode,
392 ID_GetWAPBookmark, 393 ID_GetWAPBookmark,
393 ID_GetBitmap, 394 ID_GetBitmap,
394 ID_SaveSMSMessage, 395 ID_SaveSMSMessage,
395 ID_CancelCall, 396 ID_CancelCall,
396 ID_SetDateTime, 397 ID_SetDateTime,
397 ID_SetAlarm, 398 ID_SetAlarm,
398 ID_DisableConnectFunc, 399 ID_DisableConnectFunc,
399 ID_EnableConnectFunc, 400 ID_EnableConnectFunc,
400 ID_AnswerCall, 401 ID_AnswerCall,
401 ID_SetBitmap, 402 ID_SetBitmap,
402 ID_SetRingtone, 403 ID_SetRingtone,
403 ID_DeleteSMSMessage, 404 ID_DeleteSMSMessage,
404 ID_DeleteCalendarNote, 405 ID_DeleteCalendarNote,
405 ID_SetPath, 406 ID_SetPath,
406 ID_SetSMSC, 407 ID_SetSMSC,
407 ID_SetProfile, 408 ID_SetProfile,
408 ID_SetMemory, 409 ID_SetMemory,
409 ID_DeleteMemory, 410 ID_DeleteMemory,
410 ID_SetCalendarNote, 411 ID_SetCalendarNote,
411 ID_SetIncomingSMS, 412 ID_SetIncomingSMS,
412 ID_SetIncomingCB, 413 ID_SetIncomingCB,
413 ID_GetCalendarNotePos, 414 ID_GetCalendarNotePos,
414 ID_Initialise, 415 ID_Initialise,
415 ID_GetConnectSet, 416 ID_GetConnectSet,
416 ID_SetWAPBookmark, 417 ID_SetWAPBookmark,
417 ID_GetLocale, 418 ID_GetLocale,
418 ID_SetLocale, 419 ID_SetLocale,
419 ID_GetCalendarSettings, 420 ID_GetCalendarSettings,
420 ID_SetCalendarSettings, 421 ID_SetCalendarSettings,
421 ID_GetGPRSPoint, 422 ID_GetGPRSPoint,
422 ID_SetGPRSPoint, 423 ID_SetGPRSPoint,
423 ID_EnableGPRSPoint, 424 ID_EnableGPRSPoint,
424 ID_DeleteWAPBookmark, 425 ID_DeleteWAPBookmark,
425 ID_Netmonitor, 426 ID_Netmonitor,
426 ID_HoldCall, 427 ID_HoldCall,
427 ID_UnholdCall, 428 ID_UnholdCall,
428 ID_ConferenceCall, 429 ID_ConferenceCall,
429 ID_SplitCall, 430 ID_SplitCall,
430 ID_TransferCall, 431 ID_TransferCall,
431 ID_SwitchCall, 432 ID_SwitchCall,
432 ID_GetManufactureMonth, 433 ID_GetManufactureMonth,
433 ID_GetProductCode, 434 ID_GetProductCode,
434 ID_GetOriginalIMEI, 435 ID_GetOriginalIMEI,
435 ID_GetHardware, 436 ID_GetHardware,
436 ID_GetPPM, 437 ID_GetPPM,
437 ID_GetSMSMode, 438 ID_GetSMSMode,
438 ID_GetSMSMemories, 439 ID_GetSMSMemories,
439 ID_GetManufacturer, 440 ID_GetManufacturer,
440 ID_SetMemoryType, 441 ID_SetMemoryType,
441 ID_SetMemoryCharset, 442 ID_SetMemoryCharset,
442 ID_GetMMSSettings, 443 ID_GetMMSSettings,
443 ID_SetSMSParameters, 444 ID_SetSMSParameters,
444 ID_GetFMStation, 445 ID_GetFMStation,
445 ID_SetFMStation, 446 ID_SetFMStation,
446 ID_GetLanguage, 447 ID_GetLanguage,
447 ID_SetFastSMSSending, 448 ID_SetFastSMSSending,
448 ID_Reset, 449 ID_Reset,
449 ID_GetToDo, 450 ID_GetToDo,
450 ID_PressKey, 451 ID_PressKey,
451 ID_DeleteAllToDo, 452 ID_DeleteAllToDo,
452 ID_SetLight, 453 ID_SetLight,
453 ID_Divert, 454 ID_Divert,
454 ID_SetToDo, 455 ID_SetToDo,
455 ID_PlayTone, 456 ID_PlayTone,
456 ID_GetChatSettings, 457 ID_GetChatSettings,
457 ID_GetSyncMLSettings, 458 ID_GetSyncMLSettings,
458 ID_GetSyncMLName, 459 ID_GetSyncMLName,
459 ID_GetSecurityStatus, 460 ID_GetSecurityStatus,
460 ID_EnterSecurityCode, 461 ID_EnterSecurityCode,
461 ID_GetProfile, 462 ID_GetProfile,
462 ID_GetRingtonesInfo, 463 ID_GetRingtonesInfo,
463 ID_MakeAuthentication, 464 ID_MakeAuthentication,
464 ID_GetSpeedDial, 465 ID_GetSpeedDial,
465 ID_ResetPhoneSettings, 466 ID_ResetPhoneSettings,
466 ID_SendDTMF, 467 ID_SendDTMF,
467 ID_GetDisplayStatus, 468 ID_GetDisplayStatus,
468 ID_SetAutoNetworkLogin, 469 ID_SetAutoNetworkLogin,
469 ID_SetConnectSet, 470 ID_SetConnectSet,
470 ID_SetMMSSettings, 471 ID_SetMMSSettings,
471 ID_GetSIMIMSI, 472 ID_GetSIMIMSI,
472 ID_GetFileInfo, 473 ID_GetFileInfo,
473 ID_FileSystemStatus, 474 ID_FileSystemStatus,
474 ID_GetFile, 475 ID_GetFile,
475 ID_AddFile, 476 ID_AddFile,
476 ID_AddFolder, 477 ID_AddFolder,
477 ID_DeleteFile, 478 ID_DeleteFile,
478#ifdef GSM_ENABLE_ALCATEL 479#ifdef GSM_ENABLE_ALCATEL
479 /* AT mode */ 480 /* AT mode */
480 ID_SetFlowControl, 481 ID_SetFlowControl,
481 ID_AlcatelConnect, 482 ID_AlcatelConnect,
482 ID_AlcatelProtocol, 483 ID_AlcatelProtocol,
483 484
484 /* Binary mode */ 485 /* Binary mode */
485 ID_AlcatelAttach, 486 ID_AlcatelAttach,
486 ID_AlcatelDetach, 487 ID_AlcatelDetach,
487 ID_AlcatelCommit, 488 ID_AlcatelCommit,
488 ID_AlcatelCommit2, 489 ID_AlcatelCommit2,
489 ID_AlcatelEnd, 490 ID_AlcatelEnd,
490 ID_AlcatelClose, 491 ID_AlcatelClose,
491 ID_AlcatelStart, 492 ID_AlcatelStart,
492 ID_AlcatelSelect1, 493 ID_AlcatelSelect1,
493 ID_AlcatelSelect2, 494 ID_AlcatelSelect2,
494 ID_AlcatelSelect3, 495 ID_AlcatelSelect3,
495 ID_AlcatelBegin1, 496 ID_AlcatelBegin1,
496 ID_AlcatelBegin2, 497 ID_AlcatelBegin2,
497 ID_AlcatelGetIds1, 498 ID_AlcatelGetIds1,
498 ID_AlcatelGetIds2, 499 ID_AlcatelGetIds2,
499 ID_AlcatelGetCategories1, 500 ID_AlcatelGetCategories1,
500 ID_AlcatelGetCategories2, 501 ID_AlcatelGetCategories2,
501 ID_AlcatelGetCategoryText1, 502 ID_AlcatelGetCategoryText1,
502 ID_AlcatelGetCategoryText2, 503 ID_AlcatelGetCategoryText2,
503 ID_AlcatelAddCategoryText1, 504 ID_AlcatelAddCategoryText1,
504 ID_AlcatelAddCategoryText2, 505 ID_AlcatelAddCategoryText2,
505 ID_AlcatelGetFields1, 506 ID_AlcatelGetFields1,
506 ID_AlcatelGetFields2, 507 ID_AlcatelGetFields2,
507 ID_AlcatelGetFieldValue1, 508 ID_AlcatelGetFieldValue1,
508 ID_AlcatelGetFieldValue2, 509 ID_AlcatelGetFieldValue2,
509 ID_AlcatelDeleteItem1, 510 ID_AlcatelDeleteItem1,
510 ID_AlcatelDeleteItem2, 511 ID_AlcatelDeleteItem2,
511 ID_AlcatelDeleteField, 512 ID_AlcatelDeleteField,
512 ID_AlcatelCreateField, 513 ID_AlcatelCreateField,
513 ID_AlcatelUpdateField, 514 ID_AlcatelUpdateField,
514#endif 515#endif
515 ID_IncomingFrame, 516 ID_IncomingFrame,
516 517
517 ID_User1, 518 ID_User1,
518 ID_User2, 519 ID_User2,
519 ID_User3, 520 ID_User3,
520 ID_User4, 521 ID_User4,
521 ID_User5, 522 ID_User5,
522 ID_User6, 523 ID_User6,
523 ID_User7, 524 ID_User7,
524 ID_User8, 525 ID_User8,
525 ID_User9, 526 ID_User9,
526 ID_User10, 527 ID_User10,
527 528
528 ID_EachFrame 529 ID_EachFrame
529} GSM_Phone_RequestID; 530} GSM_Phone_RequestID;
530 531
531/** 532/**
532 * Phone related data are stored here. 533 * Phone related data are stored here.
533 */ 534 */
534typedef struct { 535typedef struct {
535 /** 536 /**
536 * Phone IMEI (or serial number). 537 * Phone IMEI (or serial number).
537 */ 538 */
538 char IMEI[MAX_IMEI_LENGTH]; 539 char IMEI[MAX_IMEI_LENGTH];
539 /** 540 /**
540 * Phone manufacturer as reported by phone. 541 * Phone manufacturer as reported by phone.
541 */ 542 */
542 char Manufacturer[MAX_MANUFACTURER_LENGTH]; 543 char Manufacturer[MAX_MANUFACTURER_LENGTH];
543 /** 544 /**
544 * Phone model as reported by phone. 545 * Phone model as reported by phone.
545 */ 546 */
546 char Model[MAX_MODEL_LENGTH]; 547 char Model[MAX_MODEL_LENGTH];
547 /** 548 /**
548 * Model information, pointer to static @ref allmodels array. 549 * Model information, pointer to static @ref allmodels array.
549 */ 550 */
550 OnePhoneModel *ModelInfo; 551 OnePhoneModel *ModelInfo;
551 /** 552 /**
552 * Phone version as reported by phone. It doesn't have to be numerical 553 * Phone version as reported by phone. It doesn't have to be numerical
553 * at all. 554 * at all.
554 */ 555 */
555 char Version[MAX_VERSION_LENGTH]; 556 char Version[MAX_VERSION_LENGTH];
556 /** 557 /**
557 * Phone version date, might be empty for some models. 558 * Phone version date, might be empty for some models.
558 */ 559 */
559 char VerDate[MAX_VERSION_DATE_LENGTH]; 560 char VerDate[MAX_VERSION_DATE_LENGTH];
560 /** 561 /**
561 * Phone version as number, if applicable. 562 * Phone version as number, if applicable.
562 */ 563 */
563 double VerNum; 564 double VerNum;
564 /** 565 /**
565 * Cache for hardware version used by some modules. 566 * Cache for hardware version used by some modules.
566 */ 567 */
567 char HardwareCache[50]; 568 char HardwareCache[50];
568 /** 569 /**
569 * Cache for product code version used by some modules. 570 * Cache for product code version used by some modules.
570 */ 571 */
571 char ProductCodeCache[50]; 572 char ProductCodeCache[50];
572 573
573 /** 574 /**
574 * Counter used for disabling startup info on phone, see 575 * Counter used for disabling startup info on phone, see
575 * @ref GSM_Phone_Functions::ShowStartInfo . After this is 0, the startup info is hidden. 576 * @ref GSM_Phone_Functions::ShowStartInfo . After this is 0, the startup info is hidden.
576 */ 577 */
577 int StartInfoCounter; 578 int StartInfoCounter;
578 579
579 /** 580 /**
580 * Pointer to structure used internally by phone drivers. 581 * Pointer to structure used internally by phone drivers.
581 */ 582 */
582 GSM_GPRSAccessPoint*GPRSPoint; 583 GSM_GPRSAccessPoint*GPRSPoint;
583 /** 584 /**
584 * Pointer to structure used internally by phone drivers. 585 * Pointer to structure used internally by phone drivers.
585 */ 586 */
586 GSM_SpeedDial *SpeedDial; 587 GSM_SpeedDial *SpeedDial;
587 /** 588 /**
588 * Pointer to structure used internally by phone drivers. 589 * Pointer to structure used internally by phone drivers.
589 */ 590 */
590 GSM_DateTime *DateTime; 591 GSM_DateTime *DateTime;
591 /** 592 /**
592 * Pointer to structure used internally by phone drivers. 593 * Pointer to structure used internally by phone drivers.
593 */ 594 */
594 GSM_Alarm *Alarm; 595 GSM_Alarm *Alarm;
595 /** 596 /**
596 * Pointer to structure used internally by phone drivers. 597 * Pointer to structure used internally by phone drivers.
597 */ 598 */
598 GSM_MemoryEntry *Memory; 599 GSM_MemoryEntry *Memory;
599 /** 600 /**
600 * Pointer to structure used internally by phone drivers. 601 * Pointer to structure used internally by phone drivers.
601 */ 602 */
602 GSM_MemoryStatus*MemoryStatus; 603 GSM_MemoryStatus*MemoryStatus;
603 /** 604 /**
604 * Pointer to structure used internally by phone drivers. 605 * Pointer to structure used internally by phone drivers.
605 */ 606 */
606 GSM_SMSC *SMSC; 607 GSM_SMSC *SMSC;
607 /** 608 /**
608 * Pointer to structure used internally by phone drivers. 609 * Pointer to structure used internally by phone drivers.
609 */ 610 */
610 GSM_MultiSMSMessage*GetSMSMessage; 611 GSM_MultiSMSMessage*GetSMSMessage;
611 /** 612 /**
612 * Pointer to structure used internally by phone drivers. 613 * Pointer to structure used internally by phone drivers.
613 */ 614 */
614 GSM_SMSMessage *SaveSMSMessage; 615 GSM_SMSMessage *SaveSMSMessage;
615 /** 616 /**
616 * Pointer to structure used internally by phone drivers. 617 * Pointer to structure used internally by phone drivers.
617 */ 618 */
618 GSM_SMSMemoryStatus*SMSStatus; 619 GSM_SMSMemoryStatus*SMSStatus;
619 /** 620 /**
620 * Pointer to structure used internally by phone drivers. 621 * Pointer to structure used internally by phone drivers.
621 */ 622 */
622 GSM_SMSFolders *SMSFolders; 623 GSM_SMSFolders *SMSFolders;
623 /** 624 /**
624 * Used internally by phone drivers. 625 * Used internally by phone drivers.
625 */ 626 */
626 int *VoiceRecord; 627 int *VoiceRecord;
627 /** 628 /**
628 * Used internally by phone drivers. 629 * Used internally by phone drivers.
629 */ 630 */
630 int CallID; 631 int CallID;
631 /** 632 /**
632 * Pointer to structure used internally by phone drivers. 633 * Pointer to structure used internally by phone drivers.
633 */ 634 */
634 GSM_SignalQuality*SignalQuality; 635 GSM_SignalQuality*SignalQuality;
635 /** 636 /**
636 * Pointer to structure used internally by phone drivers. 637 * Pointer to structure used internally by phone drivers.
637 */ 638 */
638 GSM_BatteryCharge*BatteryCharge; 639 GSM_BatteryCharge*BatteryCharge;
639 /** 640 /**
640 * Pointer to structure used internally by phone drivers. 641 * Pointer to structure used internally by phone drivers.
641 */ 642 */
642 GSM_NetworkInfo *NetworkInfo; 643 GSM_NetworkInfo *NetworkInfo;
643 /** 644 /**
644 * Pointer to structure used internally by phone drivers. 645 * Pointer to structure used internally by phone drivers.
645 */ 646 */
646 GSM_Ringtone *Ringtone; 647 GSM_Ringtone *Ringtone;
647 /** 648 /**
648 * Pointer to structure used internally by phone drivers. 649 * Pointer to structure used internally by phone drivers.
649 */ 650 */
650 GSM_CalendarEntry*Cal; 651 GSM_CalendarEntry*Cal;
651 /** 652 /**
652 * Used internally by phone drivers. 653 * Used internally by phone drivers.
653 */ 654 */
654 unsigned char *SecurityCode; 655 unsigned char *SecurityCode;
655 /** 656 /**
656 * Pointer to structure used internally by phone drivers. 657 * Pointer to structure used internally by phone drivers.
657 */ 658 */
658 GSM_WAPBookmark *WAPBookmark; 659 GSM_WAPBookmark *WAPBookmark;
659 /** 660 /**
660 * Pointer to structure used internally by phone drivers. 661 * Pointer to structure used internally by phone drivers.
661 */ 662 */
662 GSM_MultiWAPSettings*WAPSettings; 663 GSM_MultiWAPSettings*WAPSettings;
663 /** 664 /**
664 * Pointer to structure used internally by phone drivers. 665 * Pointer to structure used internally by phone drivers.
665 */ 666 */
666 GSM_Bitmap *Bitmap; 667 GSM_Bitmap *Bitmap;
667 /** 668 /**
668 * Used internally by phone drivers. 669 * Used internally by phone drivers.
669 */ 670 */
670 unsigned char *Netmonitor; 671 unsigned char *Netmonitor;
671 /** 672 /**
672 * Pointer to structure used internally by phone drivers. 673 * Pointer to structure used internally by phone drivers.
673 */ 674 */
674 GSM_MultiCallDivert*Divert; 675 GSM_MultiCallDivert*Divert;
675 /** 676 /**
676 * Pointer to structure used internally by phone drivers. 677 * Pointer to structure used internally by phone drivers.
677 */ 678 */
678 GSM_ToDoEntry *ToDo; 679 GSM_ToDoEntry *ToDo;
679 GSM_NoteEntry *Note; 680 GSM_NoteEntry *Note;
680 /** 681 /**
681 * Used internally by phone drivers. 682 * Used internally by phone drivers.
682 */ 683 */
683 bool PressKey; 684 bool PressKey;
684 /** 685 /**
685 * Pointer to structure used internally by phone drivers. 686 * Pointer to structure used internally by phone drivers.
686 */ 687 */
687 GSM_SecurityCodeType*SecurityStatus; 688 GSM_SecurityCodeType*SecurityStatus;
688 /** 689 /**
689 * Pointer to structure used internally by phone drivers. 690 * Pointer to structure used internally by phone drivers.
690 */ 691 */
691 GSM_Profile *Profile; 692 GSM_Profile *Profile;
692 /** 693 /**
693 * Pointer to structure used internally by phone drivers. 694 * Pointer to structure used internally by phone drivers.
694 */ 695 */
695 GSM_AllRingtonesInfo*RingtonesInfo; 696 GSM_AllRingtonesInfo*RingtonesInfo;
696 /** 697 /**
697 * Pointer to structure used internally by phone drivers. 698 * Pointer to structure used internally by phone drivers.
698 */ 699 */
699 GSM_DisplayFeatures*DisplayFeatures; 700 GSM_DisplayFeatures*DisplayFeatures;
700 /** 701 /**
701 * Pointer to structure used internally by phone drivers. 702 * Pointer to structure used internally by phone drivers.
702 */ 703 */
703 GSM_FMStation *FMStation; 704 GSM_FMStation *FMStation;
704 /** 705 /**
705 * Pointer to structure used internally by phone drivers. 706 * Pointer to structure used internally by phone drivers.
706 */ 707 */
707 GSM_Locale *Locale; 708 GSM_Locale *Locale;
708 /** 709 /**
709 * Pointer to structure used internally by phone drivers. 710 * Pointer to structure used internally by phone drivers.
710 */ 711 */
711 GSM_CalendarSettings*CalendarSettings; 712 GSM_CalendarSettings*CalendarSettings;
712 /** 713 /**
713 * Used internally by phone drivers. 714 * Used internally by phone drivers.
714 */ 715 */
715 unsigned char *PhoneString; 716 unsigned char *PhoneString;
716 /** 717 /**
717 * Used internally by phone drivers. 718 * Used internally by phone drivers.
718 */ 719 */
719 int StartPhoneString; 720 int StartPhoneString;
720 /** 721 /**
721 * Pointer to structure used internally by phone drivers. 722 * Pointer to structure used internally by phone drivers.
722 */ 723 */
723 GSM_File *FileInfo; 724 GSM_File *FileInfo;
724 /** 725 /**
725 * Pointer to structure used internally by phone drivers. 726 * Pointer to structure used internally by phone drivers.
726 */ 727 */
727 GSM_File *File; 728 GSM_File *File;
728 /** 729 /**
729 * Pointer to structure used internally by phone drivers. 730 * Pointer to structure used internally by phone drivers.
730 */ 731 */
731 GSM_FileSystemStatus*FileSystemStatus; 732 GSM_FileSystemStatus*FileSystemStatus;
732 GSM_ChatSettings*ChatSettings; 733 GSM_ChatSettings*ChatSettings;
733 GSM_SyncMLSettings*SyncMLSettings; 734 GSM_SyncMLSettings*SyncMLSettings;
734 735
735 /** 736 /**
736 * Should phone notify about incoming calls? 737 * Should phone notify about incoming calls?
737 */ 738 */
738 bool EnableIncomingCall; 739 bool EnableIncomingCall;
739 /** 740 /**
740 * Should phone notify about incoming SMSes? 741 * Should phone notify about incoming SMSes?
741 */ 742 */
742 bool EnableIncomingSMS; 743 bool EnableIncomingSMS;
743 /** 744 /**
744 * Should phone notify about incoming CBs? 745 * Should phone notify about incoming CBs?
745 */ 746 */
746 bool EnableIncomingCB; 747 bool EnableIncomingCB;
747 /** 748 /**
748 * Should phone notify about incoming USSDs? 749 * Should phone notify about incoming USSDs?
749 */ 750 */
750 bool EnableIncomingUSSD; 751 bool EnableIncomingUSSD;
751 752
752 /** 753 /**
753 * Last message received from phone. 754 * Last message received from phone.
754 */ 755 */
755 GSM_Protocol_Message*RequestMsg; 756 GSM_Protocol_Message*RequestMsg;
756 /** 757 /**
757 * Last message sent by Gammu. 758 * Last message sent by Gammu.
758 */ 759 */
759 GSM_Protocol_Message*SentMsg; 760 GSM_Protocol_Message*SentMsg;
760 /** 761 /**
761 * What operation is being performed now, see @ref GSM_Phone_RequestID 762 * What operation is being performed now, see @ref GSM_Phone_RequestID
762 * for possible values. 763 * for possible values.
763 */ 764 */
764 GSM_Phone_RequestIDRequestID; 765 GSM_Phone_RequestIDRequestID;
765 /** 766 /**
766 * Error returned by function in phone module. 767 * Error returned by function in phone module.
767 */ 768 */
768 GSM_Error DispatchError; 769 GSM_Error DispatchError;
769 770
770 /** 771 /**
771 * Structure with private phone modules data. 772 * Structure with private phone modules data.
772 */ 773 */
773 struct { 774 struct {
774 int fake; 775 int fake;
775#ifdef GSM_ENABLE_NOKIA3320 776#ifdef GSM_ENABLE_NOKIA3320
776 GSM_Phone_N3320Data N3320; 777 GSM_Phone_N3320Data N3320;
777#endif 778#endif
778#ifdef GSM_ENABLE_NOKIA3650 779#ifdef GSM_ENABLE_NOKIA3650
779 GSM_Phone_N3650Data N3650; 780 GSM_Phone_N3650Data N3650;
780#endif 781#endif
781#ifdef GSM_ENABLE_NOKIA650 782#ifdef GSM_ENABLE_NOKIA650
782 GSM_Phone_N650Data N650; 783 GSM_Phone_N650Data N650;
783#endif 784#endif
784#ifdef GSM_ENABLE_NOKIA6110 785#ifdef GSM_ENABLE_NOKIA6110
785 GSM_Phone_N6110Data N6110; 786 GSM_Phone_N6110Data N6110;
786#endif 787#endif
787#ifdef GSM_ENABLE_NOKIA6510 788#ifdef GSM_ENABLE_NOKIA6510
788 GSM_Phone_N6510Data N6510; 789 GSM_Phone_N6510Data N6510;
789#endif 790#endif
790#ifdef GSM_ENABLE_NOKIA7110 791#ifdef GSM_ENABLE_NOKIA7110
791 GSM_Phone_N7110Data N7110; 792 GSM_Phone_N7110Data N7110;
792#endif 793#endif
793#ifdef GSM_ENABLE_ATGEN 794#ifdef GSM_ENABLE_ATGEN
794 GSM_Phone_ATGENData ATGEN; 795 GSM_Phone_ATGENData ATGEN;
795#endif 796#endif
796#ifdef GSM_ENABLE_ALCATEL 797#ifdef GSM_ENABLE_ALCATEL
797 GSM_Phone_ALCATELData ALCATEL; 798 GSM_Phone_ALCATELData ALCATEL;
798#endif 799#endif
799#ifdef GSM_ENABLE_OBEXGEN 800#ifdef GSM_ENABLE_OBEXGEN
800 GSM_Phone_OBEXGENData OBEXGEN; 801 GSM_Phone_OBEXGENData OBEXGEN;
801#endif 802#endif
802#ifdef GSM_ENABLE_MROUTERGEN 803#ifdef GSM_ENABLE_MROUTERGEN
803 GSM_Phone_MROUTERGENData MROUTERGEN; 804 GSM_Phone_MROUTERGENData MROUTERGEN;
804#endif 805#endif
805 } Priv; 806 } Priv;
806} GSM_Phone_Data; 807} GSM_Phone_Data;
807 808
808/** 809/**
809 * Structure for defining reply functions. 810 * Structure for defining reply functions.
810 * 811 *
811 * Function is called when requestID matches current operation or is 812 * Function is called when requestID matches current operation or is
812 * ID_IncomingFrame and msgtype matches start message and (if msgtype is just 813 * ID_IncomingFrame and msgtype matches start message and (if msgtype is just
813 * one character) subtypechar is zero or subtypechar-th character of message 814 * one character) subtypechar is zero or subtypechar-th character of message
814 * matches subtype. 815 * matches subtype.
815 * 816 *
816 * Should be used in array with last element containing ID_None as requestID. 817 * Should be used in array with last element containing ID_None as requestID.
817 */ 818 */
818struct _GSM_Reply_Function { 819struct _GSM_Reply_Function {
819 /** 820 /**
820 * Pointer to function that should be executed. 821 * Pointer to function that should be executed.
821 */ 822 */
822 GSM_Error (*Function)(GSM_Protocol_Message msg, GSM_StateMachine *s); 823 GSM_Error (*Function)(GSM_Protocol_Message msg, GSM_StateMachine *s);
823 /** 824 /**
824 * Message type, if it is longer than 1 character, it disables subtype 825 * Message type, if it is longer than 1 character, it disables subtype
825 * checking. 826 * checking.
826 */ 827 */
827 unsigned char *msgtype; 828 unsigned char *msgtype;
828 /** 829 /**
829 * Which character of message should be checked as subtype. Zero to 830 * Which character of message should be checked as subtype. Zero to
830 * disable subtype checking. 831 * disable subtype checking.
831 */ 832 */
832 int subtypechar; 833 int subtypechar;
833 /** 834 /**
834 * Subtype to be checked. 835 * Subtype to be checked.
835 */ 836 */
836 unsigned char subtype; 837 unsigned char subtype;
837 /** 838 /**
838 * Phone request when this can be called, use ID_IncomingFrame when 839 * Phone request when this can be called, use ID_IncomingFrame when
839 * you want to use this in any state. 840 * you want to use this in any state.
840 */ 841 */
841 GSM_Phone_RequestIDrequestID; 842 GSM_Phone_RequestIDrequestID;
842}; 843};
843 844
844/** 845/**
845 * Structure defining phone functions. 846 * Structure defining phone functions.
846 */ 847 */
847typedef struct { 848typedef struct {
848 /** 849 /**
849 * Names of supported models separated by |. Must contain at least one 850 * Names of supported models separated by |. Must contain at least one
850 * name. 851 * name.
851 */ 852 */
852 char *models; 853 char *models;
853 /** 854 /**
854 * Array of reply functions for the phone, see 855 * Array of reply functions for the phone, see
855 * @ref GSM_Reply_Function for details about it. 856 * @ref GSM_Reply_Function for details about it.
856 */ 857 */
857 GSM_Reply_Function *ReplyFunctions; 858 GSM_Reply_Function *ReplyFunctions;
858 /** 859 /**
859 * Initializes phone. 860 * Initializes phone.
860 */ 861 */
861 GSM_Error (*Initialise) (GSM_StateMachine *s); 862 GSM_Error (*Initialise) (GSM_StateMachine *s);
862 /** 863 /**
863 * Terminates phone communication. 864 * Terminates phone communication.
864 */ 865 */
865 GSM_Error (*Terminate) (GSM_StateMachine *s); 866 GSM_Error (*Terminate) (GSM_StateMachine *s);
866 /** 867 /**
867 * Dispatches messages from phone, at the end it should call 868 * Dispatches messages from phone, at the end it should call
868 * @ref GSM_DispatchMessage. 869 * @ref GSM_DispatchMessage.
869 */ 870 */
870 GSM_Error (*DispatchMessage) (GSM_StateMachine *s); 871 GSM_Error (*DispatchMessage) (GSM_StateMachine *s);
871 /** 872 /**
872 * Enables showing information on phone display. 873 * Enables showing information on phone display.
873 */ 874 */
874 GSM_Error (*ShowStartInfo) (GSM_StateMachine *s, bool enable); 875 GSM_Error (*ShowStartInfo) (GSM_StateMachine *s, bool enable);
875 /** 876 /**
876 * Reads manufacturer from phone. 877 * Reads manufacturer from phone.
877 */ 878 */
878 GSM_Error (*GetManufacturer) (GSM_StateMachine *s); 879 GSM_Error (*GetManufacturer) (GSM_StateMachine *s);
879 /** 880 /**
880 * Reads model from phone. 881 * Reads model from phone.
881 */ 882 */
882 GSM_Error (*GetModel) (GSM_StateMachine *s); 883 GSM_Error (*GetModel) (GSM_StateMachine *s);
883 /** 884 /**
884 * Reads firmware information from phone. 885 * Reads firmware information from phone.
885 */ 886 */
886 GSM_Error (*GetFirmware)(GSM_StateMachine *s); 887 GSM_Error (*GetFirmware)(GSM_StateMachine *s);
887 /** 888 /**
888 * Reads IMEI/serial number from phone. 889 * Reads IMEI/serial number from phone.
889 */ 890 */
890 GSM_Error (*GetIMEI) (GSM_StateMachine *s); 891 GSM_Error (*GetIMEI) (GSM_StateMachine *s);
891 /** 892 /**
892 * Gets date and time from phone. 893 * Gets date and time from phone.
893 */ 894 */
894 GSM_Error (*GetOriginalIMEI) (GSM_StateMachine *s, char *value); 895 GSM_Error (*GetOriginalIMEI) (GSM_StateMachine *s, char *value);
895 /** 896 /**
896 * Gets month when device was manufactured. 897 * Gets month when device was manufactured.
897 */ 898 */
898 GSM_Error (*GetManufactureMonth)(GSM_StateMachine *s, char *value); 899 GSM_Error (*GetManufactureMonth)(GSM_StateMachine *s, char *value);
899 /** 900 /**
900 * Gets product code of device. 901 * Gets product code of device.
901 */ 902 */
902 GSM_Error (*GetProductCode) (GSM_StateMachine *s, char *value); 903 GSM_Error (*GetProductCode) (GSM_StateMachine *s, char *value);
903 /** 904 /**
904 * Gets hardware information about device. 905 * Gets hardware information about device.
905 */ 906 */
906 GSM_Error (*GetHardware)(GSM_StateMachine *s, char *value); 907 GSM_Error (*GetHardware)(GSM_StateMachine *s, char *value);
907 /** 908 /**
908 * Gets PPM (Post Programmable Memory) info from phone 909 * Gets PPM (Post Programmable Memory) info from phone
909 * (in other words for Nokia get, which language pack is in phone) 910 * (in other words for Nokia get, which language pack is in phone)
910 */ 911 */
911 GSM_Error (*GetPPM) (GSM_StateMachine *s, char *value); 912 GSM_Error (*GetPPM) (GSM_StateMachine *s, char *value);
912 /** 913 /**
913 * Gets SIM IMSI from phone. 914 * Gets SIM IMSI from phone.
914 */ 915 */
915 GSM_Error (*GetSIMIMSI) (GSM_StateMachine *s, char *IMSI); 916 GSM_Error (*GetSIMIMSI) (GSM_StateMachine *s, char *IMSI);
916 /** 917 /**
917 * Reads date and time from phone. 918 * Reads date and time from phone.
918 */ 919 */
919 GSM_Error (*GetDateTime)(GSM_StateMachine *s, GSM_DateTime *date_time); 920 GSM_Error (*GetDateTime)(GSM_StateMachine *s, GSM_DateTime *date_time);
920 /** 921 /**
921 * Sets date and time in phone. 922 * Sets date and time in phone.
922 */ 923 */
923 GSM_Error (*SetDateTime)(GSM_StateMachine *s, GSM_DateTime *date_time); 924 GSM_Error (*SetDateTime)(GSM_StateMachine *s, GSM_DateTime *date_time);
924 /** 925 /**
925 * Reads alarm set in phone. 926 * Reads alarm set in phone.
926 */ 927 */
927 GSM_Error (*GetAlarm) (GSM_StateMachine *s, GSM_Alarm*alarm); 928 GSM_Error (*GetAlarm) (GSM_StateMachine *s, GSM_Alarm*alarm);
928 /** 929 /**
929 * Sets alarm in phone. 930 * Sets alarm in phone.
930 */ 931 */
931 GSM_Error (*SetAlarm) (GSM_StateMachine *s, GSM_Alarm *alarm); 932 GSM_Error (*SetAlarm) (GSM_StateMachine *s, GSM_Alarm *alarm);
932 /** 933 /**
933 * Gets locale from phone. 934 * Gets locale from phone.
934 */ 935 */
935 GSM_Error (*GetLocale) (GSM_StateMachine *s, GSM_Locale *locale); 936 GSM_Error (*GetLocale) (GSM_StateMachine *s, GSM_Locale *locale);
936 /** 937 /**
937 * Sets locale of phone. 938 * Sets locale of phone.
938 */ 939 */
939 GSM_Error (*SetLocale) (GSM_StateMachine *s, GSM_Locale *locale); 940 GSM_Error (*SetLocale) (GSM_StateMachine *s, GSM_Locale *locale);
940 /** 941 /**
941 * Emulates key press or key release. 942 * Emulates key press or key release.
942 */ 943 */
943 GSM_Error (*PressKey) (GSM_StateMachine *s, GSM_KeyCode Key, bool Press); 944 GSM_Error (*PressKey) (GSM_StateMachine *s, GSM_KeyCode Key, bool Press);
944 /** 945 /**
945 * Performs phone reset. 946 * Performs phone reset.
946 */ 947 */
947 GSM_Error (*Reset) (GSM_StateMachine *s, bool hard); 948 GSM_Error (*Reset) (GSM_StateMachine *s, bool hard);
948 /** 949 /**
949 * Resets phone settings. 950 * Resets phone settings.
950 */ 951 */
951 GSM_Error (*ResetPhoneSettings) (GSM_StateMachine *s, GSM_ResetSettingsType Type); 952 GSM_Error (*ResetPhoneSettings) (GSM_StateMachine *s, GSM_ResetSettingsType Type);
952 /** 953 /**
953 * Enters security code (PIN, PUK,...) . 954 * Enters security code (PIN, PUK,...) .
954 */ 955 */
955 GSM_Error (*EnterSecurityCode) (GSM_StateMachine *s, GSM_SecurityCode Code); 956 GSM_Error (*EnterSecurityCode) (GSM_StateMachine *s, GSM_SecurityCode Code);
956 /** 957 /**
957 * Queries whether some security code needs to be entered./ 958 * Queries whether some security code needs to be entered./
958 */ 959 */
959 GSM_Error (*GetSecurityStatus) (GSM_StateMachine *s, GSM_SecurityCodeType *Status); 960 GSM_Error (*GetSecurityStatus) (GSM_StateMachine *s, GSM_SecurityCodeType *Status);
960 /** 961 /**
961 * Acquired display status. 962 * Acquired display status.
962 */ 963 */
963 GSM_Error (*GetDisplayStatus) (GSM_StateMachine *s, GSM_DisplayFeatures *features); 964 GSM_Error (*GetDisplayStatus) (GSM_StateMachine *s, GSM_DisplayFeatures *features);
964 /** 965 /**
965 * Enables network auto login. 966 * Enables network auto login.
966 */ 967 */
967 GSM_Error (*SetAutoNetworkLogin)(GSM_StateMachine *s); 968 GSM_Error (*SetAutoNetworkLogin)(GSM_StateMachine *s);
968 /** 969 /**
969 * Gets information about batery charge and phone charging state. 970 * Gets information about batery charge and phone charging state.
970 */ 971 */
971 GSM_Error (*GetBatteryCharge) (GSM_StateMachine *s, GSM_BatteryCharge *bat); 972 GSM_Error (*GetBatteryCharge) (GSM_StateMachine *s, GSM_BatteryCharge *bat);
972 /** 973 /**
973 * Reads signal quality (strength and error rate). 974 * Reads signal quality (strength and error rate).
974 */ 975 */
975 GSM_Error (*GetSignalQuality) (GSM_StateMachine *s, GSM_SignalQuality *sig); 976 GSM_Error (*GetSignalQuality) (GSM_StateMachine *s, GSM_SignalQuality *sig);
976 /** 977 /**
977 * Gets network information. 978 * Gets network information.
978 */ 979 */
979 GSM_Error (*GetNetworkInfo) (GSM_StateMachine *s, GSM_NetworkInfo *netinfo); 980 GSM_Error (*GetNetworkInfo) (GSM_StateMachine *s, GSM_NetworkInfo *netinfo);
980 /** 981 /**
981 * Reads category from phone. 982 * Reads category from phone.
982 */ 983 */
983 GSM_Error (*GetCategory)(GSM_StateMachine *s, GSM_Category *Category); 984 GSM_Error (*GetCategory)(GSM_StateMachine *s, GSM_Category *Category);
984 /** 985 /**
985 * Adds category to phone. 986 * Adds category to phone.
986 */ 987 */
987 GSM_Error (*AddCategory)(GSM_StateMachine *s, GSM_Category *Category); 988 GSM_Error (*AddCategory)(GSM_StateMachine *s, GSM_Category *Category);
988 /** 989 /**
989 * Reads category status (number of used entries) from phone. 990 * Reads category status (number of used entries) from phone.
990 */ 991 */
991 GSM_Error (*GetCategoryStatus) (GSM_StateMachine *s, GSM_CategoryStatus *Status); 992 GSM_Error (*GetCategoryStatus) (GSM_StateMachine *s, GSM_CategoryStatus *Status);
992 /** 993 /**
993 * Gets memory (phonebooks or calls) status (eg. number of used and 994 * Gets memory (phonebooks or calls) status (eg. number of used and
994 * free entries). 995 * free entries).
995 */ 996 */
996 GSM_Error (*GetMemoryStatus) (GSM_StateMachine *s, GSM_MemoryStatus *status); 997 GSM_Error (*GetMemoryStatus) (GSM_StateMachine *s, GSM_MemoryStatus *status);
997 /** 998 /**
998 * Reads entry from memory (phonebooks or calls). Which entry should 999 * Reads entry from memory (phonebooks or calls). Which entry should
999 * be read is defined in entry. 1000 * be read is defined in entry.
1000 */ 1001 */
1001 GSM_Error (*GetMemory) (GSM_StateMachine *s, GSM_MemoryEntry *entry); 1002 GSM_Error (*GetMemory) (GSM_StateMachine *s, GSM_MemoryEntry *entry);
1002 /** 1003 /**
1003 * Reads entry from memory (phonebooks or calls). Which entry should 1004 * Reads entry from memory (phonebooks or calls). Which entry should
1004 * be read is defined in entry. This can be easily used for reading all entries. 1005 * be read is defined in entry. This can be easily used for reading all entries.
1005 */ 1006 */
1006 GSM_Error (*GetNextMemory) (GSM_StateMachine *s, GSM_MemoryEntry *entry, bool start); 1007 GSM_Error (*GetNextMemory) (GSM_StateMachine *s, GSM_MemoryEntry *entry, bool start);
1007 /** 1008 /**
1008 * Sets memory (phonebooks or calls) entry. 1009 * Sets memory (phonebooks or calls) entry.
1009 */ 1010 */
1010 GSM_Error (*SetMemory) (GSM_StateMachine *s, GSM_MemoryEntry *entry); 1011 GSM_Error (*SetMemory) (GSM_StateMachine *s, GSM_MemoryEntry *entry);
1011 /** 1012 /**
1012 * Deletes memory (phonebooks or calls) entry. 1013 * Deletes memory (phonebooks or calls) entry.
1013 */ 1014 */
1014 GSM_Error (*AddMemory) (GSM_StateMachine *s, GSM_MemoryEntry *entry); 1015 GSM_Error (*AddMemory) (GSM_StateMachine *s, GSM_MemoryEntry *entry);
1015 /** 1016 /**
1016 * Deletes memory (phonebooks or calls) entry. 1017 * Deletes memory (phonebooks or calls) entry.
1017 */ 1018 */
1018 GSM_Error (*DeleteMemory) (GSM_StateMachine *s, GSM_MemoryEntry *entry); 1019 GSM_Error (*DeleteMemory) (GSM_StateMachine *s, GSM_MemoryEntry *entry);
1019 /** 1020 /**
1020 * Deletes all memory (phonebooks or calls) entries of specified type. 1021 * Deletes all memory (phonebooks or calls) entries of specified type.
1021 */ 1022 */
1022 GSM_Error (*DeleteAllMemory) (GSM_StateMachine *s, GSM_MemoryType MemoryType); 1023 GSM_Error (*DeleteAllMemory) (GSM_StateMachine *s, GSM_MemoryType MemoryType);
1023 /** 1024 /**
1024 * Gets speed dial. 1025 * Gets speed dial.
1025 */ 1026 */
1026 GSM_Error (*GetSpeedDial) (GSM_StateMachine *s, GSM_SpeedDial *Speed); 1027 GSM_Error (*GetSpeedDial) (GSM_StateMachine *s, GSM_SpeedDial *Speed);
1027 /** 1028 /**
1028 * Sets speed dial. 1029 * Sets speed dial.
1029 */ 1030 */
1030 GSM_Error (*SetSpeedDial) (GSM_StateMachine *s, GSM_SpeedDial *Speed); 1031 GSM_Error (*SetSpeedDial) (GSM_StateMachine *s, GSM_SpeedDial *Speed);
1031 /** 1032 /**
1032 * Gets SMS Service Center number and SMS settings. 1033 * Gets SMS Service Center number and SMS settings.
1033 */ 1034 */
1034 GSM_Error (*GetSMSC) (GSM_StateMachine *s, GSM_SMSC *smsc); 1035 GSM_Error (*GetSMSC) (GSM_StateMachine *s, GSM_SMSC *smsc);
1035 /** 1036 /**
1036 * Sets SMS Service Center number and SMS settings. 1037 * Sets SMS Service Center number and SMS settings.
1037 */ 1038 */
1038 GSM_Error (*SetSMSC) (GSM_StateMachine *s, GSM_SMSC *smsc); 1039 GSM_Error (*SetSMSC) (GSM_StateMachine *s, GSM_SMSC *smsc);
1039 /** 1040 /**
1040 * Gets information about SMS memory (read/unread/size of memory for 1041 * Gets information about SMS memory (read/unread/size of memory for
1041 * both SIM and phone). 1042 * both SIM and phone).
1042 */ 1043 */
1043 GSM_Error (*GetSMSStatus) (GSM_StateMachine *s, GSM_SMSMemoryStatus *status); 1044 GSM_Error (*GetSMSStatus) (GSM_StateMachine *s, GSM_SMSMemoryStatus *status);
1044 /** 1045 /**
1045 * Reads SMS message. 1046 * Reads SMS message.
1046 */ 1047 */
1047 GSM_Error (*GetSMS) (GSM_StateMachine *s, GSM_MultiSMSMessage *sms); 1048 GSM_Error (*GetSMS) (GSM_StateMachine *s, GSM_MultiSMSMessage *sms);
1048 /** 1049 /**
1049 * Reads next (or first if start set) SMS message. This might be 1050 * Reads next (or first if start set) SMS message. This might be
1050 * faster for some phones than using @ref GetSMS for each message. 1051 * faster for some phones than using @ref GetSMS for each message.
1051 */ 1052 */
1052 GSM_Error (*GetNextSMS) (GSM_StateMachine *s, GSM_MultiSMSMessage *sms, bool start); 1053 GSM_Error (*GetNextSMS) (GSM_StateMachine *s, GSM_MultiSMSMessage *sms, bool start);
1053 /** 1054 /**
1054 * Sets SMS. 1055 * Sets SMS.
1055 */ 1056 */
1056 GSM_Error (*SetSMS) (GSM_StateMachine *s, GSM_SMSMessage *sms); 1057 GSM_Error (*SetSMS) (GSM_StateMachine *s, GSM_SMSMessage *sms);
1057 /** 1058 /**
1058 * Adds SMS to specified folder. 1059 * Adds SMS to specified folder.
1059 */ 1060 */
1060 GSM_Error (*AddSMS) (GSM_StateMachine *s, GSM_SMSMessage *sms); 1061 GSM_Error (*AddSMS) (GSM_StateMachine *s, GSM_SMSMessage *sms);
1061 /** 1062 /**
1062 * Deletes SMS. 1063 * Deletes SMS.
1063 */ 1064 */
1064 GSM_Error (*DeleteSMS) (GSM_StateMachine *s, GSM_SMSMessage *sms); 1065 GSM_Error (*DeleteSMS) (GSM_StateMachine *s, GSM_SMSMessage *sms);
1065 /** 1066 /**
1066 * Sends SMS. 1067 * Sends SMS.
1067 */ 1068 */
1068 GSM_Error (*SendSMS) (GSM_StateMachine *s, GSM_SMSMessage *sms); 1069 GSM_Error (*SendSMS) (GSM_StateMachine *s, GSM_SMSMessage *sms);
1069 /** 1070 /**
1070 * Sends SMS already saved in phone. 1071 * Sends SMS already saved in phone.
1071 */ 1072 */
1072 GSM_Error (*SendSavedSMS)(GSM_StateMachine *s, int Folder, int Location); 1073 GSM_Error (*SendSavedSMS)(GSM_StateMachine *s, int Folder, int Location);
1073 GSM_Error (*SetFastSMSSending) (GSM_StateMachine *s, bool enable); 1074 GSM_Error (*SetFastSMSSending) (GSM_StateMachine *s, bool enable);
1074 /** 1075 /**
1075 * Enable/disable notification on incoming SMS. 1076 * Enable/disable notification on incoming SMS.
1076 */ 1077 */
1077 GSM_Error (*SetIncomingSMS) (GSM_StateMachine *s, bool enable); 1078 GSM_Error (*SetIncomingSMS) (GSM_StateMachine *s, bool enable);
1078 /** 1079 /**
1079 * Gets network information from phone. 1080 * Gets network information from phone.
1080 */ 1081 */
1081 GSM_Error (*SetIncomingCB) (GSM_StateMachine *s, bool enable); 1082 GSM_Error (*SetIncomingCB) (GSM_StateMachine *s, bool enable);
1082 /** 1083 /**
1083 * Returns SMS folders information. 1084 * Returns SMS folders information.
1084 */ 1085 */
1085 GSM_Error (*GetSMSFolders) (GSM_StateMachine *s, GSM_SMSFolders *folders); 1086 GSM_Error (*GetSMSFolders) (GSM_StateMachine *s, GSM_SMSFolders *folders);
1086 /** 1087 /**
1087 * Creates SMS folder. 1088 * Creates SMS folder.
1088 */ 1089 */
1089 GSM_Error (*AddSMSFolder) (GSM_StateMachine *s, unsigned char *name); 1090 GSM_Error (*AddSMSFolder) (GSM_StateMachine *s, unsigned char *name);
1090 /** 1091 /**
1091 * Deletes SMS folder. 1092 * Deletes SMS folder.
1092 */ 1093 */
1093 GSM_Error (*DeleteSMSFolder) (GSM_StateMachine *s, int ID); 1094 GSM_Error (*DeleteSMSFolder) (GSM_StateMachine *s, int ID);
1094 /** 1095 /**
1095 * Dials number and starts voice call. 1096 * Dials number and starts voice call.
1096 */ 1097 */
1097 GSM_Error (*DialVoice) (GSM_StateMachine *s, char *Number, GSM_CallShowNumber ShowNumber); 1098 GSM_Error (*DialVoice) (GSM_StateMachine *s, char *Number, GSM_CallShowNumber ShowNumber);
1098 /** 1099 /**
1099 * Accept current incoming call. 1100 * Accept current incoming call.
1100 */ 1101 */
1101 GSM_Error (*AnswerCall) (GSM_StateMachine *s, int ID, bool all); 1102 GSM_Error (*AnswerCall) (GSM_StateMachine *s, int ID, bool all);
1102 /** 1103 /**
1103 * Deny current incoming call. 1104 * Deny current incoming call.
1104 */ 1105 */
1105 GSM_Error (*CancelCall) (GSM_StateMachine *s, int ID, bool all); 1106 GSM_Error (*CancelCall) (GSM_StateMachine *s, int ID, bool all);
1106 /** 1107 /**
1107 * Holds call. 1108 * Holds call.
1108 */ 1109 */
1109 GSM_Error (*HoldCall) (GSM_StateMachine *s, int ID); 1110 GSM_Error (*HoldCall) (GSM_StateMachine *s, int ID);
1110 /** 1111 /**
1111 * Unholds call. 1112 * Unholds call.
1112 */ 1113 */
1113 GSM_Error (*UnholdCall) (GSM_StateMachine *s, int ID); 1114 GSM_Error (*UnholdCall) (GSM_StateMachine *s, int ID);
1114 /** 1115 /**
1115 * Initiates conference call. 1116 * Initiates conference call.
1116 */ 1117 */
1117 GSM_Error (*ConferenceCall) (GSM_StateMachine *s, int ID); 1118 GSM_Error (*ConferenceCall) (GSM_StateMachine *s, int ID);
1118 /** 1119 /**
1119 * Splits call. 1120 * Splits call.
1120 */ 1121 */
1121 GSM_Error (*SplitCall) (GSM_StateMachine *s, int ID); 1122 GSM_Error (*SplitCall) (GSM_StateMachine *s, int ID);
1122 /** 1123 /**
1123 * Transfers call. 1124 * Transfers call.
1124 */ 1125 */
1125 GSM_Error (*TransferCall) (GSM_StateMachine *s, int ID, bool next); 1126 GSM_Error (*TransferCall) (GSM_StateMachine *s, int ID, bool next);
1126 /** 1127 /**
1127 * Switches call. 1128 * Switches call.
1128 */ 1129 */
1129 GSM_Error (*SwitchCall) (GSM_StateMachine *s, int ID, bool next); 1130 GSM_Error (*SwitchCall) (GSM_StateMachine *s, int ID, bool next);
1130 /** 1131 /**
1131 * Gets call diverts. 1132 * Gets call diverts.
1132 */ 1133 */
1133 GSM_Error (*GetCallDivert) (GSM_StateMachine *s, GSM_MultiCallDivert *divert); 1134 GSM_Error (*GetCallDivert) (GSM_StateMachine *s, GSM_MultiCallDivert *divert);
1134 /** 1135 /**
1135 * Sets call diverts. 1136 * Sets call diverts.
1136 */ 1137 */
1137 GSM_Error (*SetCallDivert) (GSM_StateMachine *s, GSM_MultiCallDivert *divert); 1138 GSM_Error (*SetCallDivert) (GSM_StateMachine *s, GSM_MultiCallDivert *divert);
1138 /** 1139 /**
1139 * Cancels all diverts. 1140 * Cancels all diverts.
1140 */ 1141 */
1141 GSM_Error (*CancelAllDiverts) (GSM_StateMachine *s); 1142 GSM_Error (*CancelAllDiverts) (GSM_StateMachine *s);
1142 /** 1143 /**
1143 * Activates/deactivates noticing about incoming calls. 1144 * Activates/deactivates noticing about incoming calls.
1144 */ 1145 */
1145 GSM_Error (*SetIncomingCall) (GSM_StateMachine *s, bool enable); 1146 GSM_Error (*SetIncomingCall) (GSM_StateMachine *s, bool enable);
1146 /** 1147 /**
1147 * Activates/deactivates noticing about incoming USSDs (UnStructured Supplementary Services). 1148 * Activates/deactivates noticing about incoming USSDs (UnStructured Supplementary Services).
1148 */ 1149 */
1149 GSM_Error (*SetIncomingUSSD) (GSM_StateMachine *s, bool enable); 1150 GSM_Error (*SetIncomingUSSD) (GSM_StateMachine *s, bool enable);
1150 /** 1151 /**
1151 * Sends DTMF (Dual Tone Multi Frequency) tone. 1152 * Sends DTMF (Dual Tone Multi Frequency) tone.
1152 */ 1153 */
1153 GSM_Error (*SendDTMF) (GSM_StateMachine *s, char *sequence); 1154 GSM_Error (*SendDTMF) (GSM_StateMachine *s, char *sequence);
1154 /** 1155 /**
1155 * Gets ringtone from phone. 1156 * Gets ringtone from phone.
1156 */ 1157 */
1157 GSM_Error (*GetRingtone)(GSM_StateMachine *s, GSM_Ringtone *Ringtone, bool PhoneRingtone); 1158 GSM_Error (*GetRingtone)(GSM_StateMachine *s, GSM_Ringtone *Ringtone, bool PhoneRingtone);
1158 /** 1159 /**
1159 * Sets ringtone in phone. 1160 * Sets ringtone in phone.
1160 */ 1161 */
1161 GSM_Error (*SetRingtone)(GSM_StateMachine *s, GSM_Ringtone *Ringtone, int *maxlength); 1162 GSM_Error (*SetRingtone)(GSM_StateMachine *s, GSM_Ringtone *Ringtone, int *maxlength);
1162 /** 1163 /**
1163 * Acquires ringtone informaiton. 1164 * Acquires ringtone informaiton.
1164 */ 1165 */
1165 GSM_Error (*GetRingtonesInfo) (GSM_StateMachine *s, GSM_AllRingtonesInfo *Info); 1166 GSM_Error (*GetRingtonesInfo) (GSM_StateMachine *s, GSM_AllRingtonesInfo *Info);
1166 /** 1167 /**
1167 * Deletes user defined ringtones from phone. 1168 * Deletes user defined ringtones from phone.
1168 */ 1169 */
1169 GSM_Error (*DeleteUserRingtones)(GSM_StateMachine *s); 1170 GSM_Error (*DeleteUserRingtones)(GSM_StateMachine *s);
1170 /** 1171 /**
1171 * Plays tone. 1172 * Plays tone.
1172 */ 1173 */
1173 GSM_Error (*PlayTone) (GSM_StateMachine *s, int Herz, unsigned char Volume, bool start); 1174 GSM_Error (*PlayTone) (GSM_StateMachine *s, int Herz, unsigned char Volume, bool start);
1174 /** 1175 /**
1175 * Reads WAP bookmark. 1176 * Reads WAP bookmark.
1176 */ 1177 */
1177 GSM_Error (*GetWAPBookmark) (GSM_StateMachine *s, GSM_WAPBookmark *bookmark); 1178 GSM_Error (*GetWAPBookmark) (GSM_StateMachine *s, GSM_WAPBookmark *bookmark);
1178 /** 1179 /**
1179 * Sets WAP bookmark. 1180 * Sets WAP bookmark.
1180 */ 1181 */
1181 GSM_Error (*SetWAPBookmark) (GSM_StateMachine *s, GSM_WAPBookmark *bookmark); 1182 GSM_Error (*SetWAPBookmark) (GSM_StateMachine *s, GSM_WAPBookmark *bookmark);
1182 /** 1183 /**
1183 * Deletes WAP bookmark. 1184 * Deletes WAP bookmark.
1184 */ 1185 */
1185 GSM_Error (*DeleteWAPBookmark) (GSM_StateMachine *s, GSM_WAPBookmark *bookmark); 1186 GSM_Error (*DeleteWAPBookmark) (GSM_StateMachine *s, GSM_WAPBookmark *bookmark);
1186 /** 1187 /**
1187 * Acquires WAP settings. 1188 * Acquires WAP settings.
1188 */ 1189 */
1189 GSM_Error (*GetWAPSettings) (GSM_StateMachine *s, GSM_MultiWAPSettings *settings); 1190 GSM_Error (*GetWAPSettings) (GSM_StateMachine *s, GSM_MultiWAPSettings *settings);
1190 /** 1191 /**
1191 * Changes WAP settings. 1192 * Changes WAP settings.
1192 */ 1193 */
1193 GSM_Error (*SetWAPSettings) (GSM_StateMachine *s, GSM_MultiWAPSettings *settings); 1194 GSM_Error (*SetWAPSettings) (GSM_StateMachine *s, GSM_MultiWAPSettings *settings);
1194 /** 1195 /**
1195 * Acquires MMS settings. 1196 * Acquires MMS settings.
1196 */ 1197 */
1197 GSM_Error (*GetMMSSettings) (GSM_StateMachine *s, GSM_MultiWAPSettings *settings); 1198 GSM_Error (*GetMMSSettings) (GSM_StateMachine *s, GSM_MultiWAPSettings *settings);
1198 /** 1199 /**
1199 * Changes MMS settings. 1200 * Changes MMS settings.
1200 */ 1201 */
1201 GSM_Error (*SetMMSSettings) (GSM_StateMachine *s, GSM_MultiWAPSettings *settings); 1202 GSM_Error (*SetMMSSettings) (GSM_StateMachine *s, GSM_MultiWAPSettings *settings);
1202 /** 1203 /**
1203 * Acquires SyncML settings. 1204 * Acquires SyncML settings.
1204 */ 1205 */
1205 GSM_Error (*GetSyncMLSettings) (GSM_StateMachine *s, GSM_SyncMLSettings *settings); 1206 GSM_Error (*GetSyncMLSettings) (GSM_StateMachine *s, GSM_SyncMLSettings *settings);
1206 /** 1207 /**
1207 * Changes SyncML settings. 1208 * Changes SyncML settings.
1208 */ 1209 */
1209 GSM_Error (*SetSyncMLSettings) (GSM_StateMachine *s, GSM_SyncMLSettings *settings); 1210 GSM_Error (*SetSyncMLSettings) (GSM_StateMachine *s, GSM_SyncMLSettings *settings);
1210 /** 1211 /**
1211 * Acquires chat/presence settings. 1212 * Acquires chat/presence settings.
1212 */ 1213 */
1213 GSM_Error (*GetChatSettings) (GSM_StateMachine *s, GSM_ChatSettings *settings); 1214 GSM_Error (*GetChatSettings) (GSM_StateMachine *s, GSM_ChatSettings *settings);
1214 /** 1215 /**
1215 * Changes chat/presence settings. 1216 * Changes chat/presence settings.
1216 */ 1217 */
1217 GSM_Error (*SetChatSettings) (GSM_StateMachine *s, GSM_ChatSettings *settings); 1218 GSM_Error (*SetChatSettings) (GSM_StateMachine *s, GSM_ChatSettings *settings);
1218 /** 1219 /**
1219 * Gets bitmap. 1220 * Gets bitmap.
1220 */ 1221 */
1221 GSM_Error (*GetBitmap) (GSM_StateMachine *s, GSM_Bitmap *Bitmap); 1222 GSM_Error (*GetBitmap) (GSM_StateMachine *s, GSM_Bitmap *Bitmap);
1222 /** 1223 /**
1223 * Sets bitmap. 1224 * Sets bitmap.
1224 */ 1225 */
1225 GSM_Error (*SetBitmap) (GSM_StateMachine *s, GSM_Bitmap *Bitmap); 1226 GSM_Error (*SetBitmap) (GSM_StateMachine *s, GSM_Bitmap *Bitmap);
1226 /** 1227 /**
1227 * Gets status of ToDos (count of used entries). 1228 * Gets status of ToDos (count of used entries).
1228 */ 1229 */
1229 GSM_Error (*GetToDoStatus) (GSM_StateMachine *s, GSM_ToDoStatus *status); 1230 GSM_Error (*GetToDoStatus) (GSM_StateMachine *s, GSM_ToDoStatus *status);
1230 /** 1231 /**
1231 * Reads ToDo from phone. 1232 * Reads ToDo from phone.
1232 */ 1233 */
1233 GSM_Error (*GetToDo) (GSM_StateMachine *s, GSM_ToDoEntry *ToDo); 1234 GSM_Error (*GetToDo) (GSM_StateMachine *s, GSM_ToDoEntry *ToDo);
1234 /** 1235 /**
1235 * Reads ToDo from phone. 1236 * Reads ToDo from phone.
1236 */ 1237 */
1237 GSM_Error (*GetNextToDo)(GSM_StateMachine *s, GSM_ToDoEntry *ToDo, bool start); 1238 GSM_Error (*GetNextToDo)(GSM_StateMachine *s, GSM_ToDoEntry *ToDo, bool start);
1238 /** 1239 /**
1239 * Sets ToDo in phone. 1240 * Sets ToDo in phone.
1240 */ 1241 */
1241 GSM_Error (*SetToDo) (GSM_StateMachine *s, GSM_ToDoEntry *ToDo); 1242 GSM_Error (*SetToDo) (GSM_StateMachine *s, GSM_ToDoEntry *ToDo);
1242 /** 1243 /**
1243 * Adds ToDo in phone. 1244 * Adds ToDo in phone.
1244 */ 1245 */
1245 GSM_Error (*AddToDo) (GSM_StateMachine *s, GSM_ToDoEntry *ToDo); 1246 GSM_Error (*AddToDo) (GSM_StateMachine *s, GSM_ToDoEntry *ToDo);
1246 /** 1247 /**
1247 * Deletes ToDo entry in phone. 1248 * Deletes ToDo entry in phone.
1248 */ 1249 */
1249 GSM_Error (*DeleteToDo) (GSM_StateMachine *s, GSM_ToDoEntry *ToDo); 1250 GSM_Error (*DeleteToDo) (GSM_StateMachine *s, GSM_ToDoEntry *ToDo);
1250 /** 1251 /**
1251 * Deletes all todo entries in phone. 1252 * Deletes all todo entries in phone.
1252 */ 1253 */
1253 GSM_Error (*DeleteAllToDo) (GSM_StateMachine *s); 1254 GSM_Error (*DeleteAllToDo) (GSM_StateMachine *s);
1254 /** 1255 /**
1255 * Retrieves calendar status (number of used entries). 1256 * Retrieves calendar status (number of used entries).
1256 */ 1257 */
1257 GSM_Error (*GetCalendarStatus) (GSM_StateMachine *s, GSM_CalendarStatus *Status); 1258 GSM_Error (*GetCalendarStatus) (GSM_StateMachine *s, GSM_CalendarStatus *Status);
1258 /** 1259 /**
1259 * Retrieves calendar entry. 1260 * Retrieves calendar entry.
1260 */ 1261 */
1261 GSM_Error (*GetCalendar)(GSM_StateMachine *s, GSM_CalendarEntry *Note); 1262 GSM_Error (*GetCalendar)(GSM_StateMachine *s, GSM_CalendarEntry *Note);
1262 /** 1263 /**
1263 * Retrieves calendar entry. This is useful for continuous reading of all 1264 * Retrieves calendar entry. This is useful for continuous reading of all
1264 * calendar entries. 1265 * calendar entries.
1265 */ 1266 */
1266 GSM_Error (*GetNextCalendar) (GSM_StateMachine *s, GSM_CalendarEntry *Note, bool start); 1267 GSM_Error (*GetNextCalendar) (GSM_StateMachine *s, GSM_CalendarEntry *Note, bool start);
1267 /** 1268 /**
1268 * Sets calendar entry 1269 * Sets calendar entry
1269 */ 1270 */
1270 GSM_Error (*SetCalendar)(GSM_StateMachine *s, GSM_CalendarEntry *Note); 1271 GSM_Error (*SetCalendar)(GSM_StateMachine *s, GSM_CalendarEntry *Note);
1271 /** 1272 /**
1272 * Adds calendar entry. 1273 * Adds calendar entry.
1273 */ 1274 */
1274 GSM_Error (*AddCalendar)(GSM_StateMachine *s, GSM_CalendarEntry *Note); 1275 GSM_Error (*AddCalendar)(GSM_StateMachine *s, GSM_CalendarEntry *Note);
1275 /** 1276 /**
1276 * Deletes calendar entry. 1277 * Deletes calendar entry.
1277 */ 1278 */
1278 GSM_Error (*DeleteCalendar) (GSM_StateMachine *s, GSM_CalendarEntry *Note); 1279 GSM_Error (*DeleteCalendar) (GSM_StateMachine *s, GSM_CalendarEntry *Note);
1279 /** 1280 /**
1280 * Deletes all calendar entries. 1281 * Deletes all calendar entries.
1281 */ 1282 */
1282 GSM_Error (*DeleteAllCalendar) (GSM_StateMachine *s); 1283 GSM_Error (*DeleteAllCalendar) (GSM_StateMachine *s);
1283 /** 1284 /**
1284 * Reads calendar settings. 1285 * Reads calendar settings.
1285 */ 1286 */
1286 GSM_Error (*GetCalendarSettings)(GSM_StateMachine *s, GSM_CalendarSettings *settings); 1287 GSM_Error (*GetCalendarSettings)(GSM_StateMachine *s, GSM_CalendarSettings *settings);
1287 /** 1288 /**
1288 * Sets calendar settings. 1289 * Sets calendar settings.
1289 */ 1290 */
1290 GSM_Error (*SetCalendarSettings)(GSM_StateMachine *s, GSM_CalendarSettings *settings); 1291 GSM_Error (*SetCalendarSettings)(GSM_StateMachine *s, GSM_CalendarSettings *settings);
1291 /** 1292 /**
1292 * Gets note. 1293 * Gets note.
1293 */ 1294 */
1294 GSM_Error (*GetNextNote)(GSM_StateMachine *s, GSM_NoteEntry *Note, bool refresh); 1295 GSM_Error (*GetNextNote)(GSM_StateMachine *s, GSM_NoteEntry *Note, bool refresh);
1295 /** 1296 /**
1296 * Reads profile. 1297 * Reads profile.
1297 */ 1298 */
1298 GSM_Error (*GetProfile) (GSM_StateMachine *s, GSM_Profile *Profile); 1299 GSM_Error (*GetProfile) (GSM_StateMachine *s, GSM_Profile *Profile);
1299 /** 1300 /**
1300 * Updates profile. 1301 * Updates profile.
1301 */ 1302 */
1302 GSM_Error (*SetProfile) (GSM_StateMachine *s, GSM_Profile *Profile); 1303 GSM_Error (*SetProfile) (GSM_StateMachine *s, GSM_Profile *Profile);
1303 /** 1304 /**
1304 * Reads FM station. 1305 * Reads FM station.
1305 */ 1306 */
1306 GSM_Error (*GetFMStation) (GSM_StateMachine *s, GSM_FMStation *FMStation); 1307 GSM_Error (*GetFMStation) (GSM_StateMachine *s, GSM_FMStation *FMStation);
1307 /** 1308 /**
1308 * Sets FM station. 1309 * Sets FM station.
1309 */ 1310 */
1310 GSM_Error (*SetFMStation) (GSM_StateMachine *s, GSM_FMStation *FMStation); 1311 GSM_Error (*SetFMStation) (GSM_StateMachine *s, GSM_FMStation *FMStation);
1311 /** 1312 /**
1312 * Clears defined FM stations. 1313 * Clears defined FM stations.
1313 */ 1314 */
1314 GSM_Error (*ClearFMStations) (GSM_StateMachine *s); 1315 GSM_Error (*ClearFMStations) (GSM_StateMachine *s);
1315 /** 1316 /**
1316 * Gets next filename from filesystem. 1317 * Gets next filename from filesystem.
1317 */ 1318 */
1318 GSM_Error (*GetNextFileFolder) (GSM_StateMachine *s, GSM_File *File, bool start); 1319 GSM_Error (*GetNextFileFolder) (GSM_StateMachine *s, GSM_File *File, bool start);
1319 /** 1320 /**
1320 * Gets file part from filesystem. 1321 * Gets file part from filesystem.
1321 */ 1322 */
1322 GSM_Error (*GetFilePart)(GSM_StateMachine *s, GSM_File *File); 1323 GSM_Error (*GetFilePart)(GSM_StateMachine *s, GSM_File *File);
1323 /** 1324 /**
1324 * Adds file part to filesystem. 1325 * Adds file part to filesystem.
1325 */ 1326 */
1326 GSM_Error (*AddFilePart)(GSM_StateMachine *s, GSM_File *File, int *Pos); 1327 GSM_Error (*AddFilePart)(GSM_StateMachine *s, GSM_File *File, int *Pos);
1327 /** 1328 /**
1328 * Acquires filesystem status. 1329 * Acquires filesystem status.
1329 */ 1330 */
1330 GSM_Error (*GetFileSystemStatus)(GSM_StateMachine *s, GSM_FileSystemStatus *Status); 1331 GSM_Error (*GetFileSystemStatus)(GSM_StateMachine *s, GSM_FileSystemStatus *Status);
1331 /** 1332 /**
1332 * Deletes file from filessytem. 1333 * Deletes file from filessytem.
1333 */ 1334 */
1334 GSM_Error (*DeleteFile) (GSM_StateMachine *s, unsigned char *ID); 1335 GSM_Error (*DeleteFile) (GSM_StateMachine *s, unsigned char *ID);
1335 /** 1336 /**
1336 * Adds folder to filesystem. 1337 * Adds folder to filesystem.
1337 */ 1338 */
1338 GSM_Error (*AddFolder) (GSM_StateMachine *s, GSM_File *File); 1339 GSM_Error (*AddFolder) (GSM_StateMachine *s, GSM_File *File);
1339 /** 1340 /**
1340 * Gets GPRS access point. 1341 * Gets GPRS access point.
1341 */ 1342 */
1342 GSM_Error (*GetGPRSAccessPoint) (GSM_StateMachine *s, GSM_GPRSAccessPoint *point); 1343 GSM_Error (*GetGPRSAccessPoint) (GSM_StateMachine *s, GSM_GPRSAccessPoint *point);
1343 /** 1344 /**
1344 * Sets GPRS access point. 1345 * Sets GPRS access point.
1345 */ 1346 */
1346 GSM_Error (*SetGPRSAccessPoint) (GSM_StateMachine *s, GSM_GPRSAccessPoint *point); 1347 GSM_Error (*SetGPRSAccessPoint) (GSM_StateMachine *s, GSM_GPRSAccessPoint *point);
1347} GSM_Phone_Functions; 1348} GSM_Phone_Functions;
1348 1349
1349 extern GSM_Phone_Functions NAUTOPhone; 1350 extern GSM_Phone_Functions NAUTOPhone;
1350#ifdef GSM_ENABLE_NOKIA3320 1351#ifdef GSM_ENABLE_NOKIA3320
1351 extern GSM_Phone_Functions N3320Phone; 1352 extern GSM_Phone_Functions N3320Phone;
1352#endif 1353#endif
1353#ifdef GSM_ENABLE_NOKIA3650 1354#ifdef GSM_ENABLE_NOKIA3650
1354 extern GSM_Phone_Functions N3650Phone; 1355 extern GSM_Phone_Functions N3650Phone;
1355#endif 1356#endif
1356#ifdef GSM_ENABLE_NOKIA6110 1357#ifdef GSM_ENABLE_NOKIA6110
1357 extern GSM_Phone_Functions N6110Phone; 1358 extern GSM_Phone_Functions N6110Phone;
1358#endif 1359#endif
1359#ifdef GSM_ENABLE_NOKIA650 1360#ifdef GSM_ENABLE_NOKIA650
1360 extern GSM_Phone_Functions N650Phone; 1361 extern GSM_Phone_Functions N650Phone;
1361#endif 1362#endif
1362#ifdef GSM_ENABLE_NOKIA6510 1363#ifdef GSM_ENABLE_NOKIA6510
1363 extern GSM_Phone_Functions N6510Phone; 1364 extern GSM_Phone_Functions N6510Phone;
1364#endif 1365#endif
1365#ifdef GSM_ENABLE_NOKIA7110 1366#ifdef GSM_ENABLE_NOKIA7110
1366 extern GSM_Phone_Functions N7110Phone; 1367 extern GSM_Phone_Functions N7110Phone;
1367#endif 1368#endif
1368#ifdef GSM_ENABLE_NOKIA9210 1369#ifdef GSM_ENABLE_NOKIA9210
1369 extern GSM_Phone_Functions N9210Phone; 1370 extern GSM_Phone_Functions N9210Phone;
1370#endif 1371#endif
1371#ifdef GSM_ENABLE_ATGEN 1372#ifdef GSM_ENABLE_ATGEN
1372 extern GSM_Phone_Functions ATGENPhone; 1373 extern GSM_Phone_Functions ATGENPhone;
1373#endif 1374#endif
1374#ifdef GSM_ENABLE_ALCATEL 1375#ifdef GSM_ENABLE_ALCATEL
1375 extern GSM_Phone_Functions ALCATELPhone; 1376 extern GSM_Phone_Functions ALCATELPhone;
1376#endif 1377#endif
1377#ifdef GSM_ENABLE_OBEXGEN 1378#ifdef GSM_ENABLE_OBEXGEN
1378 extern GSM_Phone_Functions OBEXGENPhone; 1379 extern GSM_Phone_Functions OBEXGENPhone;
1379#endif 1380#endif
1380#ifdef GSM_ENABLE_MROUTERGEN 1381#ifdef GSM_ENABLE_MROUTERGEN
1381 extern GSM_Phone_Functions MROUTERGENPhone; 1382 extern GSM_Phone_Functions MROUTERGENPhone;
1382#endif 1383#endif
1383 1384
1384typedef struct { 1385typedef struct {
1385 GSM_Phone_Data Data; 1386 GSM_Phone_Data Data;
1386 GSM_Phone_Functions*Functions; 1387 GSM_Phone_Functions*Functions;
1387} GSM_Phone; 1388} GSM_Phone;
1388 1389
1389/* --------------------------- User layer ---------------------------------- */ 1390/* --------------------------- User layer ---------------------------------- */
1390 1391
1391struct _GSM_User { 1392struct _GSM_User {
1392 GSM_Reply_Function *UserReplyFunctions; 1393 GSM_Reply_Function *UserReplyFunctions;
1393 1394
1394 void (*IncomingCall) (char *Device, GSM_Call call); 1395 void (*IncomingCall) (char *Device, GSM_Call call);
1395 void (*IncomingSMS)(char *Device, GSM_SMSMessage sms); 1396 void (*IncomingSMS)(char *Device, GSM_SMSMessage sms);
1396 void (*IncomingCB) (char *Device, GSM_CBMessage cb); 1397 void (*IncomingCB) (char *Device, GSM_CBMessage cb);
1397 void (*IncomingUSSD) (char *Device, char *Text); 1398 void (*IncomingUSSD) (char *Device, char *Text);
1398 void (*SendSMSStatus) (char *Device, int status, int MessageReference); 1399 void (*SendSMSStatus) (char *Device, int status, int MessageReference);
1399}; 1400};
1400 1401
1401/* --------------------------- Statemachine layer -------------------------- */ 1402/* --------------------------- Statemachine layer -------------------------- */
1402 1403
1403typedef enum { 1404typedef enum {
1404 GCT_MBUS2=1, 1405 GCT_MBUS2=1,
1405 GCT_FBUS2, 1406 GCT_FBUS2,
1406 GCT_FBUS2DLR3, 1407 GCT_FBUS2DLR3,
1407 GCT_FBUS2DKU5, 1408 GCT_FBUS2DKU5,
1408 GCT_FBUS2PL2303, 1409 GCT_FBUS2PL2303,
1409 GCT_FBUS2BLUE, 1410 GCT_FBUS2BLUE,
1410 GCT_FBUS2IRDA, 1411 GCT_FBUS2IRDA,
1411 GCT_PHONETBLUE, 1412 GCT_PHONETBLUE,
1412 GCT_AT, 1413 GCT_AT,
1413 GCT_MROUTERBLUE, 1414 GCT_MROUTERBLUE,
1414 1415
1415 GCT_IRDAOBEX, 1416 GCT_IRDAOBEX,
1416 GCT_IRDAAT, 1417 GCT_IRDAAT,
1417 GCT_IRDAPHONET, 1418 GCT_IRDAPHONET,
1418 GCT_BLUEFBUS2, 1419 GCT_BLUEFBUS2,
1419 GCT_BLUEAT, 1420 GCT_BLUEAT,
1420 GCT_BLUEPHONET, 1421 GCT_BLUEPHONET,
1421 GCT_BLUEOBEX 1422 GCT_BLUEOBEX
1422} GSM_ConnectionType; 1423} GSM_ConnectionType;
1423 1424
1424typedef struct { 1425typedef struct {
1425 /* Config file (or Registry or...) variables */ 1426 /* Config file (or Registry or...) variables */
1426 char Model[50]; /* Model from config file */ 1427 char Model[50]; /* Model from config file */
1427 char DebugLevel[50]; /* Debug level */ 1428 char DebugLevel[50]; /* Debug level */
1428 char *Device; /* Device name from config file */ 1429 char *Device; /* Device name from config file */
1429 char *Connection; /* Connection type as string */ 1430 char *Connection; /* Connection type as string */
1430 char *SyncTime; /* Synchronize time on startup? */ 1431 char *SyncTime; /* Synchronize time on startup? */
1431 char *LockDevice; /* Lock device ? (Unix) */ 1432 char *LockDevice; /* Lock device ? (Unix) */
1432 char *DebugFile; /* Name of debug file */ 1433 char *DebugFile; /* Name of debug file */
1433 char *Localize; /* Name of localisation file */ 1434 char *Localize; /* Name of localisation file */
1434 char *StartInfo; /* Display something during start ? */ 1435 char *StartInfo; /* Display something during start ? */
1435 bool UseGlobalDebugFile;/* Should we use global debug file?*/ 1436 bool UseGlobalDebugFile;/* Should we use global debug file?*/
1436 bool DefaultModel; 1437 bool DefaultModel;
1437 bool DefaultDebugLevel; 1438 bool DefaultDebugLevel;
1438 bool DefaultDevice; 1439 bool DefaultDevice;
1439 bool DefaultConnection; 1440 bool DefaultConnection;
1440 bool DefaultSyncTime; 1441 bool DefaultSyncTime;
1441 bool DefaultLockDevice; 1442 bool DefaultLockDevice;
1442 bool DefaultDebugFile; 1443 bool DefaultDebugFile;
1443 bool DefaultLocalize; 1444 bool DefaultLocalize;
1444 bool DefaultStartInfo; 1445 bool DefaultStartInfo;
1445} GSM_Config; 1446} GSM_Config;
1446 1447
1447 #define MAX_CONFIG_NUM 5 1448 #define MAX_CONFIG_NUM 5
1448 1449
1449struct _GSM_StateMachine { 1450struct _GSM_StateMachine {
1450 GSM_ConnectionType ConnectionType; /* Type of connection as int */ 1451 GSM_ConnectionType ConnectionType; /* Type of connection as int */
1451 char *LockFile; /* Lock file name for Unix */ 1452 char *LockFile; /* Lock file name for Unix */
1452 Debug_Info di; /* Debug information */ 1453 Debug_Info di; /* Debug information */
1453 bool opened; /* Is connection opened ? */ 1454 bool opened; /* Is connection opened ? */
1454 GSM_Config Config[MAX_CONFIG_NUM + 1]; 1455 GSM_Config Config[MAX_CONFIG_NUM + 1];
1455 GSM_Config *CurrentConfig; /* Config file (or Registry or...) variables */ 1456 GSM_Config *CurrentConfig; /* Config file (or Registry or...) variables */
1456 int ConfigNum; 1457 int ConfigNum;
1457 INI_Section *msg; /* Localisation strings structure */ 1458 INI_Section *msg; /* Localisation strings structure */
1458 int ReplyNum; /* How many times make sth. */ 1459 int ReplyNum; /* How many times make sth. */
1459 int Speed; /* For some protocols used speed */ 1460 int Speed; /* For some protocols used speed */
1460 1461
1461 GSM_Device Device; 1462 GSM_Device Device;
1462 GSM_Protocol Protocol; 1463 GSM_Protocol Protocol;
1463 GSM_Phone Phone; 1464 GSM_Phone Phone;
1464 GSM_User User; 1465 GSM_User User;
1465}; 1466};
1466 1467
1467/* ------------------------ Other general definitions ---------------------- */ 1468/* ------------------------ Other general definitions ---------------------- */
1468 1469
1469 GSM_Error GSM_RegisterAllPhoneModules(GSM_StateMachine *s); 1470 GSM_Error GSM_RegisterAllPhoneModules(GSM_StateMachine *s);
1470 1471
1471 GSM_Error GSM_InitConnection (GSM_StateMachine *s, int ReplyNum); 1472 GSM_Error GSM_InitConnection (GSM_StateMachine *s, int ReplyNum);
1472 GSM_Error GSM_TerminateConnection(GSM_StateMachine *s); 1473 GSM_Error GSM_TerminateConnection(GSM_StateMachine *s);
1473 1474
1474 int GSM_ReadDevice (GSM_StateMachine *s, bool wait); 1475 int GSM_ReadDevice (GSM_StateMachine *s, bool wait);
1475 1476
1476 GSM_Error GSM_WaitForOnce (GSM_StateMachine *s, unsigned char *buffer, 1477 GSM_Error GSM_WaitForOnce (GSM_StateMachine *s, unsigned char *buffer,
1477 int length, unsigned char type, int time); 1478 int length, unsigned char type, int time);
1478 1479
1479 GSM_Error GSM_WaitFor (GSM_StateMachine *s, unsigned char *buffer, 1480 GSM_Error GSM_WaitFor (GSM_StateMachine *s, unsigned char *buffer,
1480 int length, unsigned char type, int time, 1481 int length, unsigned char type, int time,
1481 GSM_Phone_RequestID request); 1482 GSM_Phone_RequestID request);
1482 1483
1483 GSM_Error GSM_DispatchMessage (GSM_StateMachine *s); 1484 GSM_Error GSM_DispatchMessage (GSM_StateMachine *s);
1484 1485
1485 INI_Section *GSM_FindGammuRC(void); 1486 INI_Section *GSM_FindGammuRC(void);
1486 1487
1487 bool GSM_ReadConfig (INI_Section *cfg_info, GSM_Config *cfg, int num); 1488 bool GSM_ReadConfig (INI_Section *cfg_info, GSM_Config *cfg, int num);
1488 1489
1489 void GSM_DumpMessageLevel2 (GSM_StateMachine *s, unsigned char *message, int messagesize, int type); 1490 void GSM_DumpMessageLevel2 (GSM_StateMachine *s, unsigned char *message, int messagesize, int type);
1490 void GSM_DumpMessageLevel3 (GSM_StateMachine *s, unsigned char *message, int messagesize, int type); 1491 void GSM_DumpMessageLevel3 (GSM_StateMachine *s, unsigned char *message, int messagesize, int type);
1491 1492
1492/* ---------------------- Phone features ----------------------------------- */ 1493/* ---------------------- Phone features ----------------------------------- */
1493 1494
1494typedef enum { 1495typedef enum {
1495 /* n6110.c */ 1496 /* n6110.c */
1496 F_CAL33 = 1, /* Calendar,3310 style - 10 reminders, Unicode, 3 coding types*/ 1497 F_CAL33 = 1, /* Calendar,3310 style - 10 reminders, Unicode, 3 coding types*/
1497 F_CAL52, /* Calendar,5210 style - full Unicode, etc. */ 1498 F_CAL52, /* Calendar,5210 style - full Unicode, etc. */
1498 F_CAL82, /* Calendar,8250 style - "normal", but with Unicode */ 1499 F_CAL82, /* Calendar,8250 style - "normal", but with Unicode */
1499 F_RING_SM, /* Ringtones returned in SM format - 33xx */ 1500 F_RING_SM, /* Ringtones returned in SM format - 33xx */
1500 F_NORING, /* No ringtones */ 1501 F_NORING, /* No ringtones */
1501 F_NOPBKUNICODE, /* No phonebook in Unicode */ 1502 F_NOPBKUNICODE, /* No phonebook in Unicode */
1502 F_NOWAP, /* No WAP */ 1503 F_NOWAP, /* No WAP */
1503 F_NOCALLER, /* No caller groups */ 1504 F_NOCALLER, /* No caller groups */
1504 F_NOPICTURE, /* No Picture Images */ 1505 F_NOPICTURE, /* No Picture Images */
1505 F_NOPICTUREUNI, /* No Picture Images text in Unicode */ 1506 F_NOPICTUREUNI, /* No Picture Images text in Unicode */
1506 F_NOSTARTUP, /* No startup logo */ 1507 F_NOSTARTUP, /* No startup logo */
1507 F_NOCALENDAR, /* No calendar */ 1508 F_NOCALENDAR, /* No calendar */
1508 F_NOSTARTANI, /* Startup logo is not animated */ 1509 F_NOSTARTANI, /* Startup logo is not animated */
1509 F_POWER_BATT, /* Network and battery level get from netmonitor */ 1510 F_POWER_BATT, /* Network and battery level get from netmonitor */
1510 F_PROFILES33, /* Phone profiles in 3310 style */ 1511 F_PROFILES33, /* Phone profiles in 3310 style */
1511 F_PROFILES51, /* Phone profiles in 5110 style */ 1512 F_PROFILES51, /* Phone profiles in 5110 style */
1512 F_MAGICBYTES, /* Phone can make authentication with magic bytes */ 1513 F_MAGICBYTES, /* Phone can make authentication with magic bytes */
1513 F_NODTMF, /* Phone can't send DTMF */ 1514 F_NODTMF, /* Phone can't send DTMF */
1514 F_DISPSTATUS, /* Phone return display status */ 1515 F_DISPSTATUS, /* Phone return display status */
1515 F_NOCALLINFO, 1516 F_NOCALLINFO,
1516 1517
1517 /* n3320.c */ 1518 /* n3320.c */
1518 F_DAYMONTH, /* Day and month reversed in pbk, when compare to GSM models*/ 1519 F_DAYMONTH, /* Day and month reversed in pbk, when compare to GSM models*/
1519 1520
1520 /* n6510.c */ 1521 /* n6510.c */
1521 F_PBK35, /* Phonebook in 3510 style with ringtones ID */ 1522 F_PBK35, /* Phonebook in 3510 style with ringtones ID */
1522 F_PBKIMG, /* Phonebook in 7250 style with picture ID */ 1523 F_PBKIMG, /* Phonebook in 7250 style with picture ID */
1523 F_PBKTONEGAL,/* Phonebook with selecting ringtones from gallery */ 1524 F_PBKTONEGAL,/* Phonebook with selecting ringtones from gallery */
1524 F_PBKSMSLIST, /* Phonebook with SMS list */ 1525 F_PBKSMSLIST, /* Phonebook with SMS list */
1525 F_PBKUSER, /* Phonebook with user ID */ 1526 F_PBKUSER, /* Phonebook with user ID */
1526 F_RADIO, /* Phone with FM radio */ 1527 F_RADIO, /* Phone with FM radio */
1527 F_TODO63, /* ToDo in 6310 style - 0x55 msg type */ 1528 F_TODO63, /* ToDo in 6310 style - 0x55 msg type */
1528 F_TODO66, /* ToDo in 6610 style - like calendar, with date and other*/ 1529 F_TODO66, /* ToDo in 6610 style - like calendar, with date and other*/
1529 F_NOMIDI, /* No ringtones in MIDI */ 1530 F_NOMIDI, /* No ringtones in MIDI */
1530 F_BLUETOOTH, /* Bluetooth support */ 1531 F_BLUETOOTH, /* Bluetooth support */
1531 F_NOFILESYSTEM, /* No images, ringtones, java saved in special filesystem*/ 1532 F_NOFILESYSTEM, /* No images, ringtones, java saved in special filesystem*/
1532 F_NOMMS, /* No MMS sets in phone */ 1533 F_NOMMS, /* No MMS sets in phone */
1533 F_NOGPRSPOINT, /* GPRS point are not useable */ 1534 F_NOGPRSPOINT, /* GPRS point are not useable */
1534 F_CAL35, /* Calendar,3510 style - Reminder,Call,Birthday */ 1535 F_CAL35, /* Calendar,3510 style - Reminder,Call,Birthday */
1535 F_CAL65, /* Calendar,6510 style - CBMM, method 3 */ 1536 F_CAL65, /* Calendar,6510 style - CBMM, method 3 */
1536 F_WAPMMSPROXY, /* WAP & MMS settings contains first & second proxy */ 1537 F_WAPMMSPROXY, /* WAP & MMS settings contains first & second proxy */
1537 1538
1538 /* n6510.c && n7110.c */ 1539 /* n6510.c && n7110.c */
1539 F_VOICETAGS, /* Voice tags available */ 1540 F_VOICETAGS, /* Voice tags available */
1540 F_CAL62, /* Calendar,6210 style - Call,Birthday,Memo,Meeting */ 1541 F_CAL62, /* Calendar,6210 style - Call,Birthday,Memo,Meeting */
1541 F_NOTES, 1542 F_NOTES,
1542 1543
1543 /* AT modules */ 1544 /* AT modules */
1544 F_SMSONLYSENT, /* Phone supports only sent/unsent messages */ 1545 F_SMSONLYSENT, /* Phone supports only sent/unsent messages */
1545 F_BROKENCPBS, /* CPBS on some memories can hang phone */ 1546 F_BROKENCPBS, /* CPBS on some memories can hang phone */
1546 F_M20SMS, /* Siemens M20 like SMS handling */ 1547 F_M20SMS, /* Siemens M20 like SMS handling */
1547 F_SLOWWRITE, /* Use slower writing which some phone need */ 1548 F_SLOWWRITE, /* Use slower writing which some phone need */
1548 F_SMSME900, /* SMS in ME start from location 900 - case of Sagem */ 1549 F_SMSME900, /* SMS in ME start from location 900 - case of Sagem */
1549 F_ALCATEL /* Phone supports Alcatel protocol */ 1550 F_ALCATEL /* Phone supports Alcatel protocol */
1550} Feature; 1551} Feature;
1551 1552
1552/* For models table */ 1553/* For models table */
1553struct _OnePhoneModel { 1554struct _OnePhoneModel {
1554 char *model; 1555 char *model;
1555 char *number; 1556 char *number;
1556 char *irdamodel; 1557 char *irdamodel;
1557 Feature features[12]; 1558 Feature features[12];
1558}; 1559};
1559 1560
1560 bool IsPhoneFeatureAvailable(OnePhoneModel *model, Feature feature); 1561 bool IsPhoneFeatureAvailable(OnePhoneModel *model, Feature feature);
1561 OnePhoneModel *GetModelData (char *model, char *number, char *irdamodel); 1562 OnePhoneModel *GetModelData (char *model, char *number, char *irdamodel);
1562 1563
1563#ifdef __GNUC__ 1564#ifdef __GNUC__
1564__attribute__((format(printf, 2, 3))) 1565__attribute__((format(printf, 2, 3)))
1565#endif 1566#endif
1566int smprintf(GSM_StateMachine *s, const char *format, ...); 1567int smprintf(GSM_StateMachine *s, const char *format, ...);
1567 1568
1568void GSM_OSErrorInfo(GSM_StateMachine *s, char *description); 1569void GSM_OSErrorInfo(GSM_StateMachine *s, char *description);
1569 1570
1570#ifdef GSM_ENABLE_BACKUP 1571#ifdef GSM_ENABLE_BACKUP
1571void GSM_GetPhoneFeaturesForBackup(GSM_StateMachine *s, GSM_Backup_Info *info); 1572void GSM_GetPhoneFeaturesForBackup(GSM_StateMachine *s, GSM_Backup_Info *info);
1572#endif 1573#endif
1573 1574
1574#endif 1575#endif
1575 1576
1576/* How should editor hadle tabs in this file? Add editor commands here. 1577/* How should editor hadle tabs in this file? Add editor commands here.
1577 * vim: noexpandtab sw=8 ts=8 sts=8: 1578 * vim: noexpandtab sw=8 ts=8 sts=8:
1578 */ 1579 */
1579