FreeCalypso > hg > leo2moko-debug
comparison g23m/condat/ms/src/aci/aci_cmd.h @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : GSM-F&D (8411) | |
4 | Modul : ACI | |
5 +----------------------------------------------------------------------------- | |
6 | Copyright 2002 Texas Instruments Berlin, AG | |
7 | All rights reserved. | |
8 | | |
9 | This file is confidential and a trade secret of Texas | |
10 | Instruments Berlin, AG | |
11 | The receipt of or possession of this file does not convey | |
12 | any rights to reproduce or disclose its contents or to | |
13 | manufacture, use, or sell anything it may describe, in | |
14 | whole, or in part, without the specific written consent of | |
15 | Texas Instruments Berlin, AG. | |
16 +----------------------------------------------------------------------------- | |
17 | Purpose : Definitions for the AT Command Interpreter | |
18 +----------------------------------------------------------------------------- | |
19 */ | |
20 | |
21 #ifndef ACI_CMD_H | |
22 #define ACI_CMD_H | |
23 | |
24 #ifdef FF_ATI | |
25 #include "ati_cmd.h" | |
26 #endif /* FF_ATI */ | |
27 | |
28 #define KEY 15 /* Length of "+CBLA: " for instance */ | |
29 #define LONG_LTH 10 /* Max length of a number of type long in a string */ | |
30 #define SHORT_LTH 5 | |
31 #define BYTE_LTH 3 | |
32 #define HEX_LTH 8 | |
33 | |
34 typedef struct | |
35 { | |
36 char *name; | |
37 T_ACI_SMS_STOR stor; | |
38 } SMS_Memory; | |
39 | |
40 typedef struct | |
41 { | |
42 char *name; | |
43 T_ACI_DBG_INFO stor; | |
44 } DBG_Memory; | |
45 | |
46 #if (defined (ACI_CMD_C)) || (defined (CMH_SIMF_C) && !defined (FF_ATI)) | |
47 GLOBAL const T_ACI_LAN_SUP lngs [] = | |
48 { | |
49 {"au", CLAN_LNG_AUT}, | |
50 {"en", CLAN_LNG_ENG}, | |
51 {"fr", CLAN_LNG_FRE}, | |
52 {"de", CLAN_LNG_GER}, | |
53 {"da", CLAN_LNG_DUT}, | |
54 {"it", CLAN_LNG_ITA}, | |
55 {"es", CLAN_LNG_SPA}, | |
56 {"sv", CLAN_LNG_SWE}, | |
57 {"pt", CLAN_LNG_POR}, | |
58 {"fi", CLAN_LNG_FIN}, | |
59 {"no", CLAN_LNG_NOR}, | |
60 {"el", CLAN_LNG_GRE}, | |
61 {"tr", CLAN_LNG_TUR}, | |
62 {"hu", CLAN_LNG_HUN}, | |
63 {"sl", CLAN_LNG_SLO}, | |
64 {"pl", CLAN_LNG_POL}, | |
65 {"ru", CLAN_LNG_RUS}, | |
66 {"in", CLAN_LNG_IND}, | |
67 {"cs", CLAN_LNG_CZE}, | |
68 {"zh", CLAN_LNG_CHI}, | |
69 {"ca", CLAN_LNG_CAN}, | |
70 {"mn", CLAN_LNG_MAN}, | |
71 {"tw", CLAN_LNG_TAI}, | |
72 {"ar", CLAN_LNG_ARA}, | |
73 {0,0} | |
74 }; | |
75 #else | |
76 EXTERN const T_ACI_LAN_SUP lngs []; | |
77 #endif | |
78 | |
79 | |
80 | |
81 /*--- +CMEE -------------------------------------------------------*/ | |
82 | |
83 typedef enum | |
84 { | |
85 CMEE_MOD_NotPresent = -1, | |
86 CMEE_MOD_Disable, | |
87 CMEE_MOD_Numeric, | |
88 CMEE_MOD_Verbose | |
89 } | |
90 T_ACI_CMEE_MOD; | |
91 | |
92 /*----------- +CSCS -----------------------------------------------*/ | |
93 | |
94 typedef enum | |
95 { | |
96 CSCS_CHSET_NotPresent = -1, | |
97 CSCS_CHSET_Ira = 0, | |
98 CSCS_CHSET_Pcdn = 1, | |
99 CSCS_CHSET_8859_1 = 2, | |
100 CSCS_CHSET_Pccp_437 = 3, | |
101 CSCS_CHSET_Gsm = 4, | |
102 CSCS_CHSET_Hex = 5, | |
103 CSCS_CHSET_Ucs2 = 6, | |
104 CSCS_CHSET_Tables = 5 | |
105 } | |
106 T_ACI_CSCS_CHSET; | |
107 | |
108 /*----------- alphabets -------------------------------------------*/ | |
109 | |
110 typedef enum /* see DCS in Rec. GSM 03.38 */ | |
111 { | |
112 CSCS_ALPHA_7_Bit = 0, | |
113 CSCS_ALPHA_8_Bit = 1, | |
114 CSCS_ALPHA_16_Bit = 2, | |
115 CSCS_ALPHA_Reserved = 3 | |
116 } | |
117 T_ACI_CSCS_ALPHA; | |
118 | |
119 typedef enum | |
120 { | |
121 CSCS_DIR_GsmToIra = 0, | |
122 CSCS_DIR_IraToGsm = 1 | |
123 } | |
124 T_ACI_CSCS_DIR; | |
125 | |
126 typedef enum | |
127 { | |
128 GSM_ALPHA_Def, | |
129 GSM_ALPHA_Int | |
130 } | |
131 T_ACI_GSM_ALPHA; | |
132 | |
133 /*----------- +CNMI -----------------------------------------------*/ | |
134 | |
135 typedef enum | |
136 { | |
137 CNMI_MOD_NotPresent = -1, | |
138 CNMI_MOD_Buffer, | |
139 CNMI_MOD_DiscardOrForward, | |
140 CNMI_MOD_BufferAndFlush | |
141 } | |
142 T_ACI_CNMI_MOD; | |
143 | |
144 typedef enum | |
145 { | |
146 CNMI_BFR_NotPresent = -1, | |
147 CNMI_BFR_Flush, | |
148 CNMI_BFR_Clear | |
149 } | |
150 T_ACI_CNMI_BFR; | |
151 | |
152 /*----------- other -----------------------------------------------*/ | |
153 | |
154 typedef enum | |
155 { | |
156 atOk = 0, | |
157 atConnect, | |
158 atRing, | |
159 atNoCarrier, | |
160 atError, | |
161 atNoDialtone, | |
162 atBusy, | |
163 atNoAnswer, | |
164 atConnect1 | |
165 } AtErrCode; | |
166 | |
167 typedef enum | |
168 { | |
169 copsUnknown = 0, | |
170 copsAvail = 1, | |
171 copsCurrent = 2, | |
172 copsForbidden = 3 | |
173 } CopsState; | |
174 | |
175 typedef enum | |
176 { | |
177 ppSimVerify = 1 | |
178 } PinPending; | |
179 | |
180 typedef struct | |
181 { | |
182 struct | |
183 { | |
184 UBYTE atV; | |
185 UBYTE atL; | |
186 UBYTE atM; | |
187 }s1415; | |
188 struct /* presentation flags */ | |
189 { | |
190 UBYTE COLP_stat; | |
191 UBYTE CCWA_stat; | |
192 UBYTE CCBS_stat; | |
193 }flags; | |
194 UBYTE S[10+1]; /* Caution: for S[0..n] we need S[n+1] to be declared here!!! */ | |
195 | |
196 /* the following registers above 10 are not index based and only defined if needed */ | |
197 UBYTE S30; | |
198 #ifdef GPRS | |
199 UBYTE S99; /* Rings until Automatic Context Rejection */ | |
200 #endif /* GPRS */ | |
201 | |
202 UBYTE CNMI_mode; | |
203 UBYTE CNMI_bfr; | |
204 struct /* ringing parameters */ | |
205 { | |
206 UBYTE srcID_S0; | |
207 #ifdef GPRS | |
208 UBYTE srcID_CGAUTO; | |
209 #endif | |
210 UBYTE rngCnt; | |
211 UBYTE isRng; | |
212 T_ACI_CRING_MOD mode; | |
213 T_ACI_CRING_TYP type1; | |
214 T_ACI_CRING_TYP type2; | |
215 } rngPrms; | |
216 struct /* CLIP parameters */ | |
217 { | |
218 T_ACI_CLIP_STAT stat; | |
219 CHAR number[MAXIMUM(MAX_CC_CALLING_NUMBER, MAX_CC_REDIR_NUMBER)+1]; | |
220 T_ACI_TOA type; | |
221 U8 validity; | |
222 CHAR subaddr[SUB_LENGTH+1]; | |
223 T_ACI_TOS satype; | |
224 #ifdef NO_ASCIIZ | |
225 T_ACI_PB_TEXT alpha; | |
226 #else | |
227 CHAR alpha[MAX_PHB_NUM_LEN+1]; | |
228 #endif | |
229 }clipPrms; | |
230 } AciCmdVars; | |
231 | |
232 | |
233 /* sub structure concerning AT+CREG command in ATI */ | |
234 typedef enum | |
235 { | |
236 CREG_MOD_NotPresent = -1, | |
237 CREG_MOD_OFF = 0, /* disable network registration unsolicited result code */ | |
238 CREG_MOD_ON = 1, /* enable network registration unsolicited result code */ | |
239 CREG_MOD_LOC_INF_ON = 2, /* enable network registration and location information unsolicited result code */ | |
240 CREG_MOD_LOC_INF_ON_CTXACT = 3 /* enable network registration and location information unsolicited result code | |
241 and information about activated/deactivated PDP context(s) */ | |
242 } | |
243 T_ATI_CREG_MOD /* for +CREG / +CGREG / %CGREG */; | |
244 | |
245 typedef struct | |
246 { | |
247 T_ATI_CREG_MOD pres_mode; | |
248 USHORT last_presented_lac; | |
249 USHORT last_presented_cid; | |
250 } T_ATI_REG_MOD_LAC_CID; | |
251 | |
252 typedef struct | |
253 { | |
254 T_ATI_REG_MOD_LAC_CID mod_lac_cid; | |
255 T_ACI_CREG_STAT last_presented_state; | |
256 } T_ATI_CREG; | |
257 | |
258 #define LOC_INFO_STRLTH (15) | |
259 /* ACI-SPR-17218: enable the indication of GPRS info */ | |
260 #define GPRS_INFO_STRLTH (5) | |
261 | |
262 typedef enum | |
263 { | |
264 CMD_NotPresent = -1, | |
265 CREG_CMD, | |
266 PercentCREG_CMD | |
267 #ifdef GPRS | |
268 , | |
269 PlusCGREG_CMD, | |
270 PercentCGREG_CMD | |
271 #endif /* GPRS */ | |
272 } T_ACI_CREG_CMD; | |
273 | |
274 typedef enum | |
275 { | |
276 CNAP_DISABLED = 0, | |
277 CNAP_ENABLED = 1 | |
278 } T_ATI_CNAP_MODE; | |
279 | |
280 typedef struct | |
281 { | |
282 UBYTE atE; | |
283 UBYTE atQ; | |
284 UBYTE atX; | |
285 | |
286 UBYTE CR_stat; | |
287 UBYTE CRC_stat; | |
288 UBYTE CLIP_stat; | |
289 UBYTE CDIP_stat; | |
290 | |
291 UBYTE DR_stat; | |
292 UBYTE ILRR_stat; | |
293 UBYTE CSDH_stat; | |
294 UBYTE CSSI_stat; | |
295 BYTE CSSU_stat; | |
296 UBYTE CUSD_stat; | |
297 UBYTE CPI_stat; | |
298 UBYTE CCWE_stat; | |
299 UBYTE CAOC_stat; | |
300 UBYTE CMEE_stat; | |
301 UBYTE CTTY_stat; | |
302 UBYTE CSTAT_stat; | |
303 UBYTE SIMIND_stat; | |
304 T_ACI_CSCS_CHSET cscsChset; | |
305 #ifdef GPRS | |
306 UBYTE Percent_CGEREP_stat; | |
307 UBYTE CGEREP_mode; | |
308 UBYTE CGEREP_bfr; | |
309 #endif | |
310 | |
311 T_ACI_CCWV_CHRG CCWV_charging; | |
312 | |
313 T_ATI_CREG creg; | |
314 T_ATI_CREG percent_creg; | |
315 T_ATI_CNAP_MODE cnap_mode; | |
316 UBYTE CPRI_stat; /* Holds the status of %CPRI */ | |
317 } | |
318 T_ATI_USER_OUTPUT_CFG; | |
319 | |
320 /* ACI-SPR-17218: Extended by gprs_ind paramter */ | |
321 EXTERN void r_plus_percent_CREG ( UBYTE srcId, | |
322 int status, | |
323 USHORT lac, | |
324 USHORT cid, | |
325 T_ACI_CREG_CMD cmd, | |
326 T_ACI_P_CREG_GPRS_IND gprs_ind, | |
327 BOOL bActiveContext ); | |
328 | |
329 #define CPIN_MAX_LTH (12) | |
330 /* all following lengths definitions include the null termination */ | |
331 #define MAX_PWD_LENGTH (32) /* max length for passwords */ | |
332 #define MAX_PPU_LENGTH (20) /* max length for ppu */ | |
333 #define MAX_CM_LENGTH (7) /* max length for call meter values */ | |
334 | |
335 /* To allow for: 'yyyy/MM/dd,hh:mm:ss+zz' or 'yyyy/MM/dd,hh:mm:ss-zz' date time format */ | |
336 /* To allow for: 'yy/MM/dd,hh:mm:ss+zz' or ' yy/MM/dd,hh:mm:ss-zz' date time format */ | |
337 #define DATE_TIME_LENGTH (22) | |
338 #ifdef FF_ATI | |
339 EXTERN UBYTE aci_init (T_ATI_SRC_TYPE src_type); | |
340 #endif /* FF_ATI */ | |
341 | |
342 EXTERN void aci_finit (UBYTE src_id); | |
343 | |
344 EXTERN void ati_cmd_init(); | |
345 EXTERN void ati_creg_init( BYTE srcId, T_ACI_CREG_CMD cmd ); | |
346 | |
347 BOOL aciCmdInit (AciCmdVars *v); | |
348 | |
349 #ifdef FF_ATI | |
350 int cmdCommand (T_ATI_SRC_PARAMS *src_params); | |
351 #endif /* FF_ATI */ | |
352 | |
353 EXTERN void utl_chsetToGsm ( UBYTE* in, | |
354 USHORT inLen, | |
355 UBYTE* out, | |
356 USHORT* outLen, | |
357 T_ACI_GSM_ALPHA gsm ); | |
358 EXTERN void utl_chsetToSim ( UBYTE* in, | |
359 USHORT inLen, | |
360 UBYTE* out, | |
361 USHORT* outLen, | |
362 T_ACI_GSM_ALPHA gsm ); | |
363 EXTERN void utl_ucs2ToSim ( UBYTE* in, | |
364 USHORT inLen, | |
365 UBYTE* out, | |
366 USHORT* outLen, | |
367 T_ACI_GSM_ALPHA gsm, | |
368 T_ACI_CSCS_ALPHA alphabet ); | |
369 EXTERN void utl_ConvUcs2ToGSM ( UBYTE* in, | |
370 USHORT inLen, | |
371 UBYTE* out, | |
372 USHORT* outLen, | |
373 T_ACI_GSM_ALPHA gsm, | |
374 T_ACI_CSCS_ALPHA alphabet ); | |
375 EXTERN void utl_Ucs2InFormat1 ( UBYTE* in, | |
376 USHORT inLen, | |
377 UBYTE* out, | |
378 USHORT* outLen ); | |
379 EXTERN void utl_Ucs2InFormat2 ( UBYTE* in, | |
380 USHORT inLen, | |
381 UBYTE* out, | |
382 USHORT* outLen ); | |
383 EXTERN void utl_hexFromUCS2 ( UBYTE *in, | |
384 UBYTE *out, | |
385 USHORT maxOutlen, | |
386 USHORT *outlen ); | |
387 EXTERN USHORT utl_chsetFromGsm ( UBYTE* in, | |
388 USHORT inLen, | |
389 UBYTE* out, | |
390 USHORT maxOutLen, | |
391 USHORT* outLen, | |
392 T_ACI_GSM_ALPHA gsm ); | |
393 | |
394 EXTERN USHORT utl_givenChsetFromGsm( | |
395 UBYTE* in, | |
396 USHORT inLen, | |
397 UBYTE* out, | |
398 USHORT maxOutLen, | |
399 USHORT* outLen, | |
400 T_ACI_GSM_ALPHA gsm, | |
401 T_ACI_CSCS_CHSET c); | |
402 | |
403 EXTERN void utl_chsetFromSim ( UBYTE* in, | |
404 USHORT inLen, | |
405 UBYTE* out, | |
406 USHORT maxOutLen, | |
407 USHORT* outLen, | |
408 T_ACI_GSM_ALPHA gsm ); | |
409 EXTERN void utl_hexToGsm ( UBYTE* in, | |
410 USHORT inLen, | |
411 UBYTE* out, | |
412 USHORT* outLen, | |
413 T_ACI_GSM_ALPHA gsm, | |
414 T_ACI_CSCS_ALPHA alphabet ); | |
415 EXTERN void utl_ucs2ToGsm ( UBYTE* in, | |
416 USHORT inLen, | |
417 UBYTE* out, | |
418 USHORT* outLen, | |
419 T_ACI_GSM_ALPHA gsm, | |
420 T_ACI_CSCS_ALPHA alphabet ); | |
421 EXTERN USHORT utl_hexFromGsm ( UBYTE* in, | |
422 USHORT inLen, | |
423 UBYTE* out, | |
424 USHORT maxOutLen, | |
425 USHORT* outLen, | |
426 T_ACI_GSM_ALPHA gsm, | |
427 T_ACI_CSCS_ALPHA alphabet ); | |
428 EXTERN BOOL utl_cvtGsmIra ( UBYTE* in, | |
429 USHORT inLen, | |
430 UBYTE* out, | |
431 USHORT outLen, | |
432 T_ACI_CSCS_DIR dir ); | |
433 EXTERN USHORT sprints ( CHAR* buf, | |
434 CHAR* arg, | |
435 USHORT len ); | |
436 EXTERN USHORT sprintq ( CHAR* buf, | |
437 CHAR* arg, | |
438 USHORT len ); | |
439 EXTERN void utl_smDtaFromTe ( UBYTE* in, | |
440 USHORT inLen, | |
441 UBYTE* out, | |
442 USHORT* outLen, | |
443 UBYTE fo, | |
444 UBYTE dcs ); | |
445 EXTERN void utl_smDtaToTe ( UBYTE* in, | |
446 USHORT inLen, | |
447 UBYTE* out, | |
448 USHORT maxOutLen, | |
449 USHORT* outLen, | |
450 UBYTE fo, | |
451 UBYTE dcs ); | |
452 EXTERN void utl_cbmDtaToTe ( UBYTE* in, | |
453 USHORT inLen, | |
454 UBYTE* out, | |
455 USHORT maxOutLen, | |
456 USHORT* outLen, | |
457 UBYTE fo, | |
458 UBYTE dcs ); | |
459 EXTERN void utl_ussdDtaFromTe ( UBYTE* in, | |
460 USHORT inLen, | |
461 UBYTE* out, | |
462 USHORT* outLen, | |
463 UBYTE dcs ); | |
464 EXTERN USHORT utl_ussdDtaToTe ( UBYTE* in, | |
465 USHORT inLen, | |
466 UBYTE* out, | |
467 USHORT maxOutLen, | |
468 USHORT* outLen, | |
469 UBYTE dcs ); | |
470 EXTERN void utl_binToHex ( UBYTE* in, | |
471 SHORT inLen, | |
472 CHAR* out ); | |
473 EXTERN USHORT utl_HexStrToBin (UBYTE* in, | |
474 USHORT inLen, | |
475 UBYTE* out, | |
476 USHORT outLen); | |
477 EXTERN void RetrieveLeftCmd ( void ); | |
478 | |
479 EXTERN void trace_cmd_line ( char *prefix, | |
480 char *output, | |
481 UBYTE srcId, | |
482 USHORT output_len ); | |
483 | |
484 #ifdef FF_ATI | |
485 EXTERN void trace_cmd_state ( UBYTE srcId, | |
486 T_ATI_CMD_STATE old_state, | |
487 T_ATI_CMD_STATE new_state); | |
488 #endif /* FF_ATI */ | |
489 | |
490 EXTERN int utl_create_pco (UBYTE* buffer, | |
491 USHORT* length, | |
492 ULONG content, | |
493 UBYTE config_prot, | |
494 USHORT auth_prot, | |
495 UBYTE* user_name, | |
496 UBYTE* password, | |
497 ULONG dns1, | |
498 ULONG dns2); | |
499 EXTERN int utl_analyze_pco (UBYTE* buffer, | |
500 USHORT length, | |
501 ULONG* dns1, | |
502 ULONG* dns2, | |
503 ULONG* gateway); | |
504 GLOBAL int utl_strcasecmp (const char *s1, | |
505 const char *s2); | |
506 | |
507 #if defined (FF_ATI) || defined (FF_BAT) | |
508 #define CONVERT_STRING TRUE | |
509 GLOBAL void rci_display_USSD (UBYTE srcId, | |
510 T_ACI_CUSD_MOD mode, | |
511 UBYTE *ussd_str, | |
512 UBYTE ussd_len, | |
513 BOOL cvtStr, | |
514 SHORT dcs ); | |
515 | |
516 GLOBAL void utl_cb_percentKSIR (U8 srcId, T_ACI_KSIR *ksStat); | |
517 #endif /* defined (FF_ATI) || defined (FF_BAT) */ | |
518 | |
519 /* | |
520 *------------------------------------------------------------------- | |
521 * The following types, definitions and variables are needed for | |
522 * storing of new message indications while the serial interface is | |
523 * reserved for data transmission. | |
524 *------------------------------------------------------------------- | |
525 * START | |
526 *------------------------------------------------------------------- | |
527 */ | |
528 #define NONE_CALL 0 | |
529 #define SAT_CALL 1 | |
530 #define QAT_CALL 2 | |
531 #define TAT_CALL 3 | |
532 | |
533 #define CNMI_NONE 0 | |
534 #define CNMI_CMT 1 | |
535 #define CNMI_CMTI 2 | |
536 #define CNMI_CBM 3 | |
537 #define CNMI_CDS 4 | |
538 | |
539 #define CNMI_BUF_SIZE 4 | |
540 #define CIEV_BUF_SIZE 2 | |
541 | |
542 #define T_CMT T_MNSMS_MESSAGE_IND | |
543 typedef struct /* new message indication AT+CMTI: */ | |
544 { | |
545 T_ACI_SMS_STOR mem; | |
546 UBYTE index; | |
547 } | |
548 T_CMTI; | |
549 #define T_CBM T_MMI_CBCH_IND | |
550 #define T_CDS T_MNSMS_STATUS_IND | |
551 | |
552 typedef union /* used for the different messages indications */ | |
553 { | |
554 T_CMT cmt; | |
555 T_CMTI cmti; | |
556 T_CBM cbm; | |
557 T_CDS cds; | |
558 } | |
559 T_CNMI_IND; | |
560 | |
561 /* Removed source ID from this structure to make | |
562 the bufferinf source independent */ /* Issue 25033 */ | |
563 typedef struct | |
564 { | |
565 UBYTE type; | |
566 T_CNMI_IND indct; | |
567 } | |
568 T_CNMI_BUFFER_ELEMENT; | |
569 | |
570 typedef struct | |
571 { | |
572 UBYTE next; | |
573 T_CNMI_BUFFER_ELEMENT sCnmiElement[CNMI_BUF_SIZE]; | |
574 } | |
575 T_CNMI_BUFFER; | |
576 | |
577 typedef struct | |
578 { | |
579 char* name; | |
580 T_ACI_SMS_STAT stat; | |
581 } SMS_Stat; | |
582 | |
583 #ifdef ACI_CMD_C | |
584 GLOBAL const SMS_Stat sms_stat [] = | |
585 { | |
586 {"REC UNREAD", SMS_STAT_RecUnread }, | |
587 {"REC READ", SMS_STAT_RecRead }, | |
588 {"STO UNSENT", SMS_STAT_StoUnsent }, | |
589 {"STO SENT", SMS_STAT_StoSent }, | |
590 {"ALL", SMS_STAT_All }, | |
591 {NULL, SMS_STAT_NotPresent} | |
592 }; | |
593 #else | |
594 EXTERN const SMS_Stat sms_stat []; | |
595 #endif | |
596 | |
597 #ifdef DTI | |
598 EXTERN void cmd_addCnmiNtry ( UBYTE type, T_CNMI_IND* newInd ); | |
599 #endif | |
600 EXTERN void aci_encodeVpenh ( CHAR* vpenh_str, T_ACI_VP_ENH* vpenh ); | |
601 EXTERN void rCI_IoMode ( void ); | |
602 | |
603 #ifdef FF_ATI | |
604 EXTERN UBYTE cpmsCallType; | |
605 #endif /* FF_ATI */ | |
606 EXTERN BOOL cnmiFlushInProgress; | |
607 | |
608 EXTERN T_ACI_SMS_STAT cmglStat; | |
609 | |
610 typedef struct | |
611 { | |
612 UBYTE uiLastIndex; | |
613 T_ACI_CIND_SIGNAL_TYPE asBufferValues[CIEV_BUF_SIZE]; | |
614 } T_CIEV_SIGNAL_BUFFER; | |
615 | |
616 typedef struct | |
617 { | |
618 UBYTE uiLastIndex; | |
619 T_ACI_CIND_SMSFULL_TYPE asBufferValues[CIEV_BUF_SIZE]; | |
620 } T_CIEV_SMSFULL_BUFFER; | |
621 | |
622 typedef struct | |
623 { | |
624 char* name; | |
625 T_ACI_SMS_READ rdmode; | |
626 } SMS_RdMode; | |
627 | |
628 #ifdef ACI_CMD_C | |
629 GLOBAL const SMS_RdMode sms_rdmode [] = | |
630 { | |
631 {"READ NORMAL", SMS_READ_Normal }, | |
632 {"READ PREVIEW", SMS_READ_Preview }, | |
633 {"STATUS CHANGE", SMS_READ_StatusChange }, | |
634 {NULL, SMS_READ_NotPresent} | |
635 }; | |
636 #else | |
637 EXTERN const SMS_RdMode sms_rdmode []; | |
638 #endif | |
639 | |
640 /* | |
641 *------------------------------------------------------------------- | |
642 * END | |
643 *------------------------------------------------------------------- | |
644 */ | |
645 EXTERN void aci_sendPString (UBYTE srcId, CHAR* buffer); | |
646 EXTERN void cmd_flushCnmiBuf(void); | |
647 EXTERN void cmd_flushCnmiBufOneByOne(void); | |
648 EXTERN UINT16 cmd_getNumberOfCnmiEntrys(void); | |
649 EXTERN T_CNMI_BUFFER_ELEMENT* cmd_getFirstCnmiMessage(void); | |
650 EXTERN T_CNMI_BUFFER_ELEMENT* cmd_getCnmiMessage(UINT16 uiIndex); | |
651 EXTERN BOOL cmd_clearCnmiMessage(UINT16 uiIndex); | |
652 EXTERN BOOL cmd_clearFirstCnmiMessage(void); | |
653 EXTERN BOOL cmd_clearFirstMsgWithSrcIdInCnmiBuf(T_ACI_CMD_SRC srcId); | |
654 EXTERN void cmd_flushCievBuf(UBYTE srcId); | |
655 EXTERN void cmd_clearCievBuf(UBYTE srcId); | |
656 EXTERN BOOL cmd_storeNextCnmiBufMsgToSim(); | |
657 EXTERN void cmd_clearCnmiBuf (void); | |
658 EXTERN UBYTE aci_timeout (USHORT handle); | |
659 EXTERN void aciRingTimeout (void); | |
660 EXTERN void aciCnmaTimeout (void); | |
661 EXTERN void cmd_handleCnmaTimeout (void); | |
662 EXTERN void ci_remTrailCom (CHAR* outLine, USHORT len); | |
663 EXTERN UBYTE toa_merge (T_ACI_TOA type); | |
664 EXTERN T_ACI_TOA toa_demerge (SHORT type); | |
665 EXTERN SHORT tos_merge (T_ACI_TOS type); | |
666 EXTERN T_ACI_TOS tos_demerge (SHORT type); | |
667 EXTERN CHAR * sms_status (T_ACI_SMS_STAT stat); | |
668 EXTERN void cmd_PlusCOPN_CB ( UBYTE src_id ); | |
669 EXTERN BOOL cmd_readCOPNBlock ( SHORT startIdx, UBYTE src_id); | |
670 | |
671 | |
672 #define SMS_TEXT_MODE_NONE 0 | |
673 #define SMS_TEXT_MODE_CMGS 1 | |
674 #define SMS_TEXT_MODE_CMGW 2 | |
675 #define SMS_TEXT_MODE_CMGC 3 | |
676 #define SMS_PDU_MODE_CMGS 4 | |
677 #define SMS_PDU_MODE_CMGC 5 | |
678 #define SMS_PDU_MODE_CMGW 6 | |
679 #define SMS_PDU_MODE_CNMA 7 | |
680 #define SMS_TEXT_MODE_READ 8 | |
681 | |
682 #ifdef ACI_CMD_C | |
683 GLOBAL AciCmdVars at; | |
684 /* next variable is aimed at containing the user defined configuration | |
685 for the output format through AT interpreter | |
686 (it will eventually replace "GLOBAL AciCmdVars at;")*/ | |
687 #ifdef FF_ATI | |
688 GLOBAL T_ATI_USER_OUTPUT_CFG ati_user_output_cfg[CMD_SRC_MAX]; | |
689 #endif | |
690 | |
691 GLOBAL UBYTE SMS_TEXT_MODE; /* +CMGS sets 1 - +CMGW sets 2 in PDU mode 4,5 or 6*/ | |
692 | |
693 GLOBAL T_ACI_SMS_READ smsReadMode = SMS_READ_Normal; | |
694 #ifdef WIN32 | |
695 GLOBAL T_ACI_CPOL_MOD cpolMode = CPOL_MOD_NotPresent; | |
696 GLOBAL SHORT cpolIdx2 = ACI_NumParmNotPresent; | |
697 #endif /* WIN32 */ | |
698 | |
699 #else /* ACI_CMD_C */ | |
700 EXTERN AciCmdVars at; | |
701 /* next variable is aimed at containing the user defined configuration | |
702 for the output format through AT interpreter | |
703 (it will eventually replace "GLOBAL AciCmdVars at;")*/ | |
704 | |
705 #ifdef FF_ATI | |
706 EXTERN T_ATI_USER_OUTPUT_CFG ati_user_output_cfg[CMD_SRC_MAX]; | |
707 #endif /* FF_ATI */ | |
708 | |
709 EXTERN UBYTE SMS_TEXT_MODE; | |
710 | |
711 | |
712 EXTERN T_ACI_SMS_READ smsReadMode; | |
713 #ifdef WIN32 | |
714 EXTERN T_ACI_CPOL_MOD cpolMode; | |
715 EXTERN SHORT cpolIdx2; | |
716 #endif /* WIN32 */ | |
717 #endif /* ACI_CMD_C */ | |
718 | |
719 #endif | |
720 | |
721 |