FreeCalypso > hg > tcs211-l1-reconst
comparison g23m/condat/ms/src/mfw/mfw_ss.c @ 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: MMI-Framework (8417) $Workfile:: mfw_ss.c $| | |
4 | $Author:: Vo $Revision:: 1 $| | |
5 | CREATED: 25.1.99 $Modtime:: 24.03.00 9:48 $| | |
6 | STATE : code | | |
7 +--------------------------------------------------------------------+ | |
8 | |
9 MODULE : MFW_SS | |
10 | |
11 PURPOSE : This modul contains the functions for supplementary management. | |
12 | |
13 | |
14 $History:: mfw_ss.c $ | |
15 | |
16 Dec 16, 2005 REF: OMAPS00053316 x0018858 | |
17 Description: E-Sample 2.58 compiler code crashes when accessing the Voicemail service in the Messages | |
18 Solution: Added a NULL Check for the USSD pointer that is being received. | |
19 | |
20 Jul 05, 2005 REF: CRR 22565 a0876501 | |
21 Description: IMEI display on handset through atd*#06# was swapped. | |
22 Solution: Byte swapping corrected for IMEI decoding. | |
23 | |
24 Mar 30, 2005 REF: CRR 29986 xpradipg | |
25 Description: Optimisation 1: Removal of unused variables and dynamically | |
26 allocate/ deallocate mbndata | |
27 Solution: unused variables are removed | |
28 | |
29 Apr 06 2005 REF: CRR 29989 xpradipg | |
30 Description: Optimisation 3: replace the static global data with dynamic | |
31 allocation / deallocation | |
32 Solution: The static global variables are dynamically allocated and | |
33 deallocated | |
34 | |
35 Aug 16, 2004 REF: CRR 24323 Deepa M.D | |
36 Bug:Clenup of sprintf used for tracing | |
37 Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX | |
38 | |
39 Jul 15, 2004 REF: CRR 13873 xkundadu | |
40 Description: Make an incoming call, the end user pressing 0+send will | |
41 pick up the call. Instead, 0+send should reject the incoming | |
42 call. | |
43 Solution: Added the handling of 0/1/2 SEND for a waiting call. | |
44 Modified the ss_decode() function in the | |
45 mfw_ss.c file to search the sequential table in the case of | |
46 waiting call also. Made changes in mfw_cm.c file also | |
47 * | |
48 * ***************** Version 24 ***************** | |
49 * User: Vo Date: 24.03.00 Time: 10:18 | |
50 * Updated in $/GSM/Condat/MS/SRC/MFW | |
51 * Bug fix: result of IMEI | |
52 * New: notice PIN type of SS string for PIN change/PIN unblock | |
53 * | |
54 * ***************** Version 23 ***************** | |
55 * User: Vo Date: 10.01.00 Time: 16:09 | |
56 * Updated in $/GSM/Condat/MS/SRC/MFW | |
57 * new function ss_exit() | |
58 * | |
59 * ***************** Version 22 ***************** | |
60 * User: Vo Date: 10.01.00 Time: 13:32 | |
61 * Updated in $/GSM/Condat/MS/SRC/MFW | |
62 * | |
63 * ***************** Version 21 ***************** | |
64 * User: Ak Date: 10.01.00 Time: 13:14 | |
65 * Updated in $/GSM/Condat/MS/SRC/MFW | |
66 * | |
67 * ***************** Version 20 ***************** | |
68 * User: Ak Date: 21.10.99 Time: 11:56 | |
69 * Updated in $/GSM/Condat/MS/SRC/MFW | |
70 * Why: Improvement | |
71 * What: Passing of network basic service codes instead of GSM 2.30 | |
72 * codes for SS control string results and invocations | |
73 * | |
74 * ***************** Version 19 ***************** | |
75 * User: Ak Date: 29.09.99 Time: 8:37 | |
76 * Updated in $/GSM/DEV/MS/SRC/MFW | |
77 * Why: bug fix | |
78 * What: strcpy do not check a NULL pointer argument, corrected | |
79 * | |
80 * ***************** Version 18 ***************** | |
81 * User: Ak Date: 28.09.99 Time: 14:16 | |
82 * Updated in $/GSM/DEV/MS/SRC/MFW | |
83 * Why: bug fix | |
84 * What: strcpy do not check a NULL pointer argument, corrected | |
85 * | |
86 * ***************** Version 17 ***************** | |
87 * User: Es Date: 16.09.99 Time: 17:25 | |
88 * Updated in $/GSM/DEV/MS/SRC/MFW | |
89 * include SENSEI patch 13/09/99 | |
90 * two minor fixes | |
91 * | |
92 * ***************** Version 16 ***************** | |
93 * User: Vo Date: 12.09.99 Time: 14:16 | |
94 * Updated in $/GSM/DEV/MS/SRC/MFW | |
95 * New: USSD handle | |
96 * | |
97 * ***************** Version 15 ***************** | |
98 * User: Vo Date: 30.08.99 Time: 12:08 | |
99 * Updated in $/GSM/DEV/MS/SRC/MFW | |
100 * SS string for PIN unblock | |
101 * | |
102 * ***************** Version 14 ***************** | |
103 * User: Vo Date: 9.08.99 Time: 16:53 | |
104 * Updated in $/GSM/DEV/MS/SRC/MFW | |
105 * SS result from network | |
106 * present IMEI | |
107 * different handling of network password and PIN1/PIN2 password | |
108 * | |
109 * ***************** Version 13 ***************** | |
110 * User: Vo Date: 21.07.99 Time: 14:44 | |
111 * Updated in $/GSM/DEV/MS/SRC/MFW | |
112 * | |
113 * ***************** Version 12 ***************** | |
114 * User: Vo Date: 16.07.99 Time: 10:39 | |
115 * Updated in $/GSM/DEV/MS/SRC/MFW | |
116 * | |
117 * ***************** Version 11 ***************** | |
118 * User: Vo Date: 9.07.99 Time: 14:56 | |
119 * Updated in $/GSM/DEV/MS/SRC/MFW | |
120 * | |
121 * ***************** Version 1 ***************** | |
122 * User: Vo Date: 10.02.99 Time: 12:41 | |
123 * Created in $/GSM/DEV/MS/SRC/MFW | |
124 | |
125 */ | |
126 #define ENTITY_MFW | |
127 | |
128 #include <string.h> | |
129 #include <stdio.h> | |
130 #include <stdlib.h> | |
131 | |
132 #if defined (NEW_FRAME) | |
133 | |
134 #include "typedefs.h" | |
135 #include "vsi.h" | |
136 #include "custom.h" | |
137 #include "gsm.h" | |
138 | |
139 #else | |
140 | |
141 #include "STDDEFS.H" | |
142 #include "custom.h" | |
143 #include "gsm.h" | |
144 #include "vsi.h" | |
145 | |
146 #endif | |
147 | |
148 #include "message.h" | |
149 #include "prim.h" | |
150 #include "aci_cmh.h" | |
151 | |
152 #include "cus_aci.h" | |
153 #include "ksd.h" | |
154 #include "prim.h" | |
155 #ifndef PCM_2_FFS | |
156 #include "pcm.h" | |
157 #else | |
158 #include "prim.h" | |
159 #include "Gsm.h" | |
160 #endif | |
161 | |
162 | |
163 #include "psa.h" | |
164 #include "psa_sim.h" | |
165 | |
166 #include "mfw_mfw.h" | |
167 #include "mfw_nm.h" | |
168 #include "mfw_sim.h" | |
169 #include "mfw_sima.h" | |
170 #include "mfw_nmi.h" | |
171 #include "mfw_simi.h" | |
172 #include "mfw_nma.h" | |
173 #include "mfw_phb.h" | |
174 #include "mfw_cm.h" | |
175 #include "mfw_cmi.h" | |
176 #include "mfw_ss.h" | |
177 #include "mfw_ssi.h" | |
178 #include "mfw_win.h" | |
179 #include "mfw_phbi.h" | |
180 | |
181 #include <string.h> | |
182 | |
183 | |
184 /*************** Variables ******************************************/ | |
185 // Mar 30, 2005 REF: CRR 29986 xpradipg | |
186 // remove unused variables | |
187 #ifndef FF_MMI_OPTIM | |
188 static T_MFW_SS_SUPORT ss_suport; | |
189 #endif | |
190 // Apr 06 2005 REF: CRR 29989 xpradipg | |
191 // This scope of the variable lies within a function hence it is made as local | |
192 #ifndef FF_MMI_OPTIM | |
193 static T_MFW_SS_NOTIFY notify; | |
194 #endif | |
195 | |
196 // Apr 06 2005 REF: CRR 29989 xpradipg | |
197 // The below static globals are dynamically allocated in rAT_PercentKSIR where | |
198 // the data is populated for the supplementary services response and | |
199 // deallocated once the ss_signal function is executed where in the contents | |
200 // are copied onto another variable | |
201 #ifdef FF_MMI_OPTIM | |
202 T_MFW_SS_CF_CNF *cf_cnf = NULL; | |
203 T_MFW_SS_CB_CNF *cb_cnf = NULL; | |
204 T_MFW_SS_CLI_CNF *cli_cnf = NULL; | |
205 T_MFW_SS_CW_CNF *cw_cnf = NULL; | |
206 T_MFW_SS_PW_CNF *pw_cnf = NULL; | |
207 T_MFW_IMEI *imei_info = NULL; | |
208 #else | |
209 static T_MFW_SS_CF_CNF cf_cnf; | |
210 static T_MFW_SS_CB_CNF cb_cnf; | |
211 static T_MFW_SS_CLI_CNF cli_cnf; | |
212 static T_MFW_SS_CW_CNF cw_cnf; | |
213 static T_MFW_SS_PW_CNF pw_cnf; | |
214 static T_MFW_SS_RES ss_res; | |
215 static T_MFW_IMEI imei_info; | |
216 #endif | |
217 static T_MFW_SS_USSD ussd_info; | |
218 // Mar 30, 2005 REF: CRR 29986 xpradipg | |
219 // remove unused variables | |
220 #ifndef FF_MMI_OPTIM | |
221 static U8 clip_status; | |
222 static U8 colp_status; | |
223 static U8 clir_status; | |
224 static U8 clir_prefix; | |
225 static U8 colr_status; | |
226 #endif | |
227 static U8 clck_flag; | |
228 static U8 pwd_flag; /* 1 for change PIN */ | |
229 | |
230 | |
231 | |
232 #define CF_LST_SIZE (sizeof(T_MFW_FEATURE) *MFW_MAX_FEAT_NR) | |
233 #define CB_LST_SIZE (sizeof(T_MFW_TELECOM) *MFW_MAX_TELE_NR) | |
234 #define CW_LST_SIZE (sizeof(T_MFW_SRV_GROUP)*MFW_MAX_SRV_NR) | |
235 | |
236 #define MAX_LST_BUF (MAXIMUM(MAXIMUM(CF_LST_SIZE,\ | |
237 CB_LST_SIZE),\ | |
238 CW_LST_SIZE)) | |
239 | |
240 #define LANG_RESET "*#0" /*mc, SPR 1111 beginning of language reset pseudo-SS string*/ | |
241 #define TTY_NEXTCALL_ON "*55#" /* SPR#1352 - SH - Pseudo-SS string to switch on TTY on next call */ | |
242 #define TTY_NEXTCALL_OFF "#55#" /* SPR#1352 - SH - Pseudo-SS string to switch off TTY on next call */ | |
243 | |
244 static ULONG ssLstBuf[MAX_LST_BUF/sizeof(ULONG)]; | |
245 EXTERN MfwHdr * current_mfw_elem; | |
246 | |
247 // July 09, 2005 REF : MMI-22565 - a0876501 | |
248 extern UBYTE cmhSS_getCdFromImei (T_ACI_IMEI* imei); | |
249 | |
250 | |
251 /* | |
252 +--------------------------------------------------------------------+ | |
253 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
254 | STATE : code ROUTINE: ss_mfw_init | | |
255 +--------------------------------------------------------------------+ | |
256 | |
257 | |
258 PURPOSE : | |
259 | |
260 */ | |
261 | |
262 void ss_mfw_init(void) | |
263 { | |
264 // Mar 30, 2005 REF: CRR 29986 xpradipg | |
265 // remove reundant code since the values assigned here are never referenced | |
266 | |
267 #ifndef PCM_2_FFS | |
268 | |
269 #ifndef FF_MMI_OPTIM | |
270 EF_MSCAP mscap; | |
271 EF_MSSUP mssup; | |
272 EF_MSSET msset; | |
273 UBYTE version; | |
274 | |
275 /* Read the Mobile Capabilities from EEPROM */ | |
276 | |
277 if (pcm_ReadFile((UBYTE *)EF_MSCAP_ID, | |
278 SIZE_EF_MSCAP, | |
279 (UBYTE *)&mscap, | |
280 &version) EQ PCM_OK) | |
281 { | |
282 ss_suport.speech = (UBYTE)FldGet(mscap.chnMode,spchSupV1); | |
283 ss_suport.data = (UBYTE)FldGet(mscap.datCap1,datSup); | |
284 ss_suport.asyn = (UBYTE)FldGet(mscap.datCap1,AsySup); | |
285 ss_suport.syn = (UBYTE)FldGet(mscap.datCap1,NTSynSup); | |
286 } | |
287 | |
288 if (pcm_ReadFile((UBYTE *)EF_MSSUP_ID, | |
289 SIZE_EF_MSSUP, | |
290 (UBYTE *)&mssup, | |
291 &version) EQ PCM_OK) | |
292 { | |
293 ss_suport.aoc = (UBYTE)FldGet(mssup.feat1,AoC); | |
294 ss_suport.dtmf = (UBYTE)FldGet(mssup.feat1,DTMF); | |
295 ss_suport.cf = (UBYTE)FldGet(mssup.feat1,CF); | |
296 ss_suport.cb = (UBYTE)FldGet(mssup.feat1,CB); | |
297 ss_suport.ussd = (UBYTE)FldGet(mssup.feat1,USSD); | |
298 ss_suport.etc = (UBYTE)FldGet(mssup.feat1,ETC); | |
299 } | |
300 | |
301 if (pcm_ReadFile((UBYTE *)EF_MSSET_ID, | |
302 SIZE_EF_MSSET, | |
303 (UBYTE *)&msset, | |
304 &version) EQ PCM_OK) | |
305 { | |
306 ss_suport.clire = (UBYTE)FldGet(msset.misc,clir); | |
307 ss_suport.clipr = (UBYTE)FldGet(msset.misc,clip); | |
308 } | |
309 #endif | |
310 #endif | |
311 pwd_flag = 0; | |
312 } | |
313 | |
314 /* | |
315 +--------------------------------------------------------------------+ | |
316 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
317 | STATE : code ROUTINE: ss_exit | | |
318 +--------------------------------------------------------------------+ | |
319 | |
320 | |
321 PURPOSE : | |
322 | |
323 */ | |
324 | |
325 void ss_exit(void) | |
326 { | |
327 TRACE_FUNCTION("ss_exit()"); | |
328 } | |
329 | |
330 /* | |
331 +--------------------------------------------------------------------+ | |
332 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
333 | STATE : code ROUTINE: ss_create | | |
334 +--------------------------------------------------------------------+ | |
335 | |
336 | |
337 PURPOSE : create event for supplementary management | |
338 | |
339 */ | |
340 | |
341 T_MFW_HND ss_create(T_MFW_HND hWin, T_MFW_EVENT event, T_MFW_CB cbfunc) | |
342 { | |
343 T_MFW_HDR *hdr; | |
344 T_MFW_SS *ss_para; | |
345 MfwHdr * insert_status =0; | |
346 | |
347 TRACE_FUNCTION("ss_create()"); | |
348 | |
349 hdr = (T_MFW_HDR *) mfwAlloc(sizeof (T_MFW_HDR)); | |
350 ss_para = (T_MFW_SS *) mfwAlloc(sizeof (T_MFW_SS)); | |
351 | |
352 if (!hdr OR !ss_para) | |
353 { | |
354 TRACE_ERROR("ERROR: ss_create() Mem Alloc Failed."); | |
355 | |
356 if(hdr) | |
357 mfwFree((U8*)hdr,sizeof(MfwHdr)); | |
358 | |
359 if(ss_para) | |
360 mfwFree((U8*)ss_para,sizeof(T_MFW_SS)); | |
361 | |
362 return FALSE; | |
363 } | |
364 | |
365 /* | |
366 * initialisation of the handler | |
367 */ | |
368 ss_para->emask = event; | |
369 ss_para->handler = cbfunc; | |
370 | |
371 hdr->data = ss_para; /* store parameter in node */ | |
372 hdr->type = MFW_TYP_SS; /* store type of event handler */ | |
373 | |
374 /* | |
375 * installation of the handler | |
376 */ | |
377 insert_status = mfwInsert((T_MFW_HDR *)hWin, hdr); | |
378 | |
379 if(!insert_status) | |
380 { | |
381 TRACE_ERROR("ERROR: ss_create() Failed to Install Handler. "); | |
382 mfwFree((U8*)hdr,sizeof(MfwHdr)); | |
383 mfwFree((U8*)ss_para,sizeof(T_MFW_SS)); | |
384 return 0; | |
385 } | |
386 return insert_status; | |
387 } | |
388 | |
389 | |
390 /* | |
391 +--------------------------------------------------------------------+ | |
392 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
393 | STATE : code ROUTINE: ss_delete | | |
394 +--------------------------------------------------------------------+ | |
395 | |
396 | |
397 PURPOSE : delete a event for supplementary management | |
398 | |
399 */ | |
400 | |
401 T_MFW_RES ss_delete(T_MFW_HND h) | |
402 { | |
403 TRACE_FUNCTION("ss_delete()"); | |
404 | |
405 if (!h OR !((T_MFW_HDR *)h)->data) | |
406 return MFW_RES_ILL_HND; | |
407 | |
408 if (!mfwRemove((T_MFW_HDR *)h)) | |
409 return MFW_RES_ILL_HND; | |
410 | |
411 mfwFree((U8 *)(((T_MFW_HDR *) h)->data),sizeof(T_MFW_SS)); | |
412 mfwFree((U8 *)h,sizeof(T_MFW_HDR)); | |
413 | |
414 return MFW_RES_OK; | |
415 } | |
416 | |
417 | |
418 /* | |
419 +--------------------------------------------------------------------+ | |
420 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
421 | STATE : code ROUTINE: ss_sign_exec | | |
422 +--------------------------------------------------------------------+ | |
423 | |
424 | |
425 PURPOSE : Send a signal if SS management handler. | |
426 | |
427 */ | |
428 | |
429 BOOL ss_sign_exec (T_MFW_HDR * cur_elem, T_MFW_EVENT event, T_MFW_SS_PARA * para) | |
430 { | |
431 TRACE_FUNCTION ("ss_sign_exec()"); | |
432 | |
433 while (cur_elem) | |
434 { | |
435 /* | |
436 * event handler is available | |
437 */ | |
438 if (cur_elem->type EQ MFW_TYP_SS) | |
439 { | |
440 T_MFW_SS * ss_data; | |
441 /* | |
442 * handler is SS management handler | |
443 */ | |
444 ss_data = (T_MFW_SS *)cur_elem->data; | |
445 if (ss_data->emask & event) | |
446 { | |
447 /* | |
448 * event is expected by the call back function | |
449 */ | |
450 ss_data->event = event; | |
451 switch (event) | |
452 { | |
453 case E_SS_NOTIFY: | |
454 memcpy (&ss_data->para.notify, para, sizeof (T_MFW_SS_NOTIFY)); | |
455 break; | |
456 | |
457 case E_SS_CF_CNF: | |
458 case E_SS_CF_ICN_UPD: | |
459 memcpy (&ss_data->para.cf_cnf, para, sizeof (T_MFW_SS_CF_CNF)); | |
460 break; | |
461 | |
462 case E_SS_CB_CNF: | |
463 memcpy (&ss_data->para.cb_cnf, para, sizeof (T_MFW_SS_CB_CNF)); | |
464 break; | |
465 | |
466 case E_SS_CW_CNF: | |
467 memcpy (&ss_data->para.cw_cnf, para, sizeof (T_MFW_SS_CW_CNF)); | |
468 break; | |
469 | |
470 case E_SS_CLI_CNF: | |
471 memcpy (&ss_data->para.cli_cnf, para, sizeof (T_MFW_SS_CLI_CNF)); | |
472 break; | |
473 | |
474 case E_SS_RES: | |
475 memcpy (&ss_data->para.ss_res, para, sizeof (T_MFW_SS_RES)); | |
476 break; | |
477 | |
478 case E_SS_GET_PW: | |
479 memcpy (&ss_data->para.pw_cnf, para, sizeof (T_MFW_SS_PW_CNF)); | |
480 break; | |
481 | |
482 case E_SS_IMEI: | |
483 memcpy (&ss_data->para.imei_info, para, sizeof (T_MFW_IMEI)); | |
484 break; | |
485 | |
486 case E_SS_USSD_REQ: | |
487 memcpy (&ss_data->para.ussd_info, para, sizeof (T_MFW_SS_USSD)); | |
488 break; | |
489 | |
490 case E_SS_USSD_CNF: | |
491 memcpy (&ss_data->para.ussd_info, para, sizeof (T_MFW_SS_USSD)); | |
492 break; | |
493 } | |
494 | |
495 /* | |
496 * if call back defined, call it | |
497 */ | |
498 if (ss_data->handler) | |
499 { | |
500 // PATCH LE 06.06.00 | |
501 // store current mfw elem | |
502 current_mfw_elem = cur_elem; | |
503 // END PATCH LE 06.06.00 | |
504 | |
505 if ((*(ss_data->handler)) (ss_data->event, (void *)&ss_data->para)) | |
506 return TRUE; | |
507 } | |
508 } | |
509 } | |
510 cur_elem = cur_elem->next; | |
511 } | |
512 return FALSE; | |
513 } | |
514 | |
515 /* | |
516 +--------------------------------------------------------------------+ | |
517 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
518 | STATE : code ROUTINE: ss_signal | | |
519 +--------------------------------------------------------------------+ | |
520 | |
521 PURPOSE : send a event signal. | |
522 | |
523 */ | |
524 | |
525 void ss_signal(T_MFW_EVENT event, void * para) | |
526 { | |
527 UBYTE temp; | |
528 TRACE_FUNCTION ("ss_signal()"); | |
529 | |
530 temp = dspl_Enable(0); | |
531 if (mfwSignallingMethod EQ 0) | |
532 { | |
533 /* | |
534 * focus is on a window | |
535 */ | |
536 if (mfwFocus) | |
537 /* | |
538 * send event to sim management | |
539 * handler if available | |
540 */ | |
541 if (ss_sign_exec (mfwFocus, event, para)) | |
542 { | |
543 dspl_Enable(temp); | |
544 return; | |
545 } | |
546 | |
547 /* | |
548 * acutal focussed window is not available | |
549 * or has no network management registration | |
550 * handler, then search all nodes from the root. | |
551 */ | |
552 if (mfwRoot) | |
553 ss_sign_exec (mfwRoot, event, para); | |
554 } | |
555 else | |
556 { | |
557 MfwHdr * h = 0; | |
558 | |
559 /* | |
560 * Focus set, then start here | |
561 */ | |
562 if (mfwFocus) | |
563 h = mfwFocus; | |
564 /* | |
565 * Focus not set, then start root | |
566 */ | |
567 if (!h) | |
568 h = mfwRoot; | |
569 | |
570 /* | |
571 * No elements available, return | |
572 */ | |
573 | |
574 while (h) | |
575 | |
576 | |
577 { | |
578 /* | |
579 * Signal consumed, then return | |
580 */ | |
581 if (ss_sign_exec (h, event, para)) | |
582 { | |
583 dspl_Enable(temp); | |
584 return; | |
585 } | |
586 | |
587 /* | |
588 * All windows tried inclusive root | |
589 */ | |
590 if (h == mfwRoot) | |
591 { | |
592 dspl_Enable(temp); | |
593 return; | |
594 } | |
595 /* | |
596 * get parent window | |
597 */ | |
598 h = mfwParent(mfwParent(h)); | |
599 if(h) | |
600 h = ((MfwWin * )(h->data))->elems; | |
601 } | |
602 ss_sign_exec (mfwRoot, event, para); | |
603 } | |
604 dspl_Enable(temp); | |
605 } | |
606 | |
607 | |
608 | |
609 /* | |
610 +--------------------------------------------------------------------+ | |
611 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
612 | STATE : code ROUTINE: ss_check_ss_string | | |
613 +--------------------------------------------------------------------+ | |
614 | |
615 | |
616 PURPOSE : Check SS string | |
617 | |
618 */ | |
619 | |
620 T_MFW_SS_RETURN ss_check_ss_string(UBYTE *string) | |
621 { | |
622 T_MFW_SS_RETURN ss_group; | |
623 T_KSD_SEQGRP grp; | |
624 CHAR *rest; | |
625 T_KSD_SEQPARAM para; | |
626 SHORT id; | |
627 int string_length; | |
628 UBYTE call_active=FALSE; | |
629 | |
630 TRACE_FUNCTION("ss_check_ss_string"); | |
631 | |
632 #define MFW_MAX_DIAL_SHORT_STRING_LEN 2 | |
633 | |
634 /* check the type of destination address */ | |
635 if ((cm_search_callId(CAL_STAT_Held, &id) == CM_OK) | |
636 OR (cm_search_callId(CAL_STAT_Active, &id) == CM_OK)) | |
637 { | |
638 call_active = TRUE; | |
639 ksd_decode((CHAR *)string, TRUE, &grp, &rest, ¶); | |
640 } | |
641 else | |
642 ksd_decode((CHAR *)string, FALSE, &grp, &rest, ¶); | |
643 | |
644 /* check short string */ | |
645 | |
646 string_length = strlen((char*)string); | |
647 | |
648 TRACE_EVENT_P2("ksd_decode(""%s"") returns -> %d",(char*)string,grp); | |
649 | |
650 | |
651 switch (grp) | |
652 { | |
653 case (SEQGRP_DIAL): /*JVJ CQ 6242 */ | |
654 if (string_length<=MFW_MAX_DIAL_SHORT_STRING_LEN) | |
655 { | |
656 /* If the call is active, the short string will be USSD in all the cases not described in ETSI 2.30*/ | |
657 if (call_active) | |
658 grp = SEQGRP_USSD; | |
659 /* If the call is not active, the short strings 1x will be DIAL, the rest USSD*/ | |
660 else if ((string_length EQ 1)||(*(string) NEQ '1')) | |
661 grp = SEQGRP_USSD; | |
662 } | |
663 break; | |
664 case (SEQGRP_SUP_CLIR): /* JGG/JVJ - CQ 6537 */ | |
665 case (SEQGRP_INV_CLIR): | |
666 if (strlen(rest)!=0) | |
667 { | |
668 T_MFW_SS_RETURN rest_ss_group; | |
669 | |
670 /*check to make sure that the number is a real dial string */ | |
671 rest_ss_group = ss_check_ss_string((UBYTE*)rest); | |
672 if (rest_ss_group EQ MFW_SS_DIAL) /*If rest is a dial string, then the whole string is dial */ | |
673 ss_group = MFW_SS_DIAL; | |
674 else | |
675 ss_group = MFW_SS_UNKNOWN; | |
676 | |
677 TRACE_EVENT_P2("ss_check_ss_string(""%s"") returns -> %d",(char*)string,ss_group); | |
678 return ss_group; | |
679 } | |
680 break; | |
681 default: | |
682 break; | |
683 } | |
684 | |
685 ss_group = ss_check_group(grp, para); | |
686 | |
687 TRACE_EVENT_P2("ss_check_ss_string(""%s"") returns -> %d",(char*)string,ss_group); | |
688 | |
689 return ss_group; | |
690 } | |
691 | |
692 | |
693 /* | |
694 +--------------------------------------------------------------------+ | |
695 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
696 | STATE : code ROUTINE: ss_decode | | |
697 +--------------------------------------------------------------------+ | |
698 | |
699 | |
700 PURPOSE : Decode SS string | |
701 | |
702 */ | |
703 | |
704 T_MFW_SS_RETURN ss_decode(UBYTE *string, CHAR **rt, T_KSD_SEQPARAM *p) | |
705 { | |
706 T_KSD_SEQGRP grp; | |
707 CHAR *rest; | |
708 T_KSD_SEQPARAM para; | |
709 SHORT id; | |
710 BOOL bRetVal; | |
711 | |
712 TRACE_FUNCTION("ss_decode()"); | |
713 | |
714 // Added the checking of wait call to solve the bug MMI-SPR 13873. | |
715 // If the call is a waiting also pass TRUE as the second parameter to the | |
716 // function ksd_decode() to decode the entered number. In ksd_decode only if | |
717 // the second parameter is TRUE the sequential table is searched to find out | |
718 // the group where the user entered string belongs to. | |
719 if ((cm_search_callId(CAL_STAT_Held, &id) == CM_OK) | |
720 OR (cm_search_callId(CAL_STAT_Active, &id) == CM_OK) | |
721 OR (cm_search_callId(CAL_STAT_Wait, &id) == CM_OK)) | |
722 { | |
723 bRetVal = ksd_decode((CHAR *)string, TRUE, &grp, &rest, ¶); | |
724 if (!bRetVal) | |
725 *rest = 0; | |
726 } | |
727 else | |
728 { | |
729 bRetVal = ksd_decode((CHAR *)string, FALSE, &grp, &rest, ¶); | |
730 if (!bRetVal) | |
731 *rest = 0; | |
732 } | |
733 | |
734 if (!bRetVal) | |
735 return MFW_SS_FAIL; | |
736 | |
737 *rt = rest; | |
738 | |
739 if (grp == SEQGRP_UNKNOWN) | |
740 return MFW_SS_UNKNOWN; | |
741 | |
742 memcpy(p, ¶, sizeof(T_KSD_SEQPARAM)); | |
743 return(ss_check_group(grp, para)); | |
744 } | |
745 | |
746 | |
747 | |
748 /* | |
749 +--------------------------------------------------------------------+ | |
750 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
751 | STATE : code ROUTINE: ss_check_group | | |
752 +--------------------------------------------------------------------+ | |
753 | |
754 | |
755 PURPOSE : returns the group of SS string | |
756 | |
757 */ | |
758 | |
759 T_MFW_SS_RETURN ss_check_group(T_KSD_SEQGRP grp, T_KSD_SEQPARAM para) | |
760 { | |
761 TRACE_EVENT_P1("ss_check_group: grp=%d", grp); | |
762 | |
763 switch (grp) | |
764 { | |
765 case SEQGRP_DIAL: | |
766 /*SPR#1352 - SH - Check for TTY On Next Call psuedo-ss strings*/ | |
767 if (!strncmp((char*)para.ussd.ussd, TTY_NEXTCALL_ON, strlen(TTY_NEXTCALL_ON))) | |
768 return MFW_SS_TTY_NEXTCALL_ON; | |
769 if (!strncmp((char*)para.ussd.ussd, TTY_NEXTCALL_OFF, strlen(TTY_NEXTCALL_OFF))) | |
770 return MFW_SS_TTY_NEXTCALL_OFF; | |
771 /*SH end*/ | |
772 return MFW_SS_DIAL; | |
773 | |
774 case SEQGRP_DIAL_IDX: | |
775 return MFW_SS_DIAL_IDX; | |
776 | |
777 case SEQGRP_DTMF: | |
778 return MFW_SS_DTMF; | |
779 | |
780 case SEQGRP_USSD: | |
781 /*MC, SPR 1111 check for LANGUAGE reset code*/ | |
782 | |
783 if (!strncmp((char*)para.ussd.ussd, LANG_RESET, strlen(LANG_RESET)) && para.ussd.ussd[6]=='#') | |
784 return MFW_SS_LANG_RESET; | |
785 /*MC end*/ | |
786 return MFW_SS_USSD; | |
787 | |
788 case SEQGRP_ACT_SIM_LOCK: /* lock SIM card */ | |
789 case SEQGRP_DEACT_SIM_LOCK: /* unlock SIM card */ | |
790 case SEQGRP_INTRGT_SIM_LOCK: | |
791 return MFW_SS_SIM_LOCK; | |
792 | |
793 case SEQGRP_CHANGE_REGISTER: | |
794 case SEQGRP_SET_REGISTER: | |
795 case SEQGRP_START_REGISTER: | |
796 return MFW_SS_REG_PW; | |
797 | |
798 case SEQGRP_CF: | |
799 return MFW_SS_CF; | |
800 | |
801 case SEQGRP_CB: /* barring services */ | |
802 return MFW_SS_CB; | |
803 | |
804 case SEQGRP_SUP_CLIR: | |
805 case SEQGRP_INV_CLIR: | |
806 return MFW_SS_CLIR; | |
807 | |
808 case SEQGRP_SUP_CLIP: | |
809 case SEQGRP_INV_CLIP: | |
810 return MFW_SS_CLIP; | |
811 | |
812 case SEQGRP_SUP_COLR: | |
813 case SEQGRP_INV_COLR: | |
814 return MFW_SS_COLR; | |
815 | |
816 case SEQGRP_SUP_COLP: | |
817 case SEQGRP_INV_COLP: | |
818 return MFW_SS_COLP; | |
819 | |
820 case SEQGRP_CL: | |
821 switch (para.cl.ssCd) | |
822 { | |
823 case KSD_SS_CLIP: | |
824 return MFW_SS_CLIP; | |
825 case KSD_SS_CLIR: | |
826 return MFW_SS_CLIR; | |
827 case KSD_SS_COLP: | |
828 return MFW_SS_COLP; | |
829 case KSD_SS_COLR: | |
830 return MFW_SS_COLR; | |
831 } | |
832 return MFW_SS_UNKNOWN; | |
833 | |
834 case SEQGRP_PWD: | |
835 switch(para.pwd.ssCd) | |
836 { | |
837 /* case KSD_SS_CCBS: CCBS has nothing to do with PWD! */ | |
838 case KSD_SS_ALL_CBSS: | |
839 case KSD_SS_BOC: | |
840 case KSD_SS_BAOC: | |
841 case KSD_SS_BOIC: | |
842 case KSD_SS_BOICXH: | |
843 case KSD_SS_BIC: | |
844 case KSD_SS_BAIC: | |
845 case KSD_SS_BICRM: | |
846 | |
847 /*NM 190602*/ | |
848 case KSD_SS_ALL_SERV: | |
849 | |
850 return MFW_SS_REG_PW; | |
851 | |
852 case KSD_SS_PIN1: | |
853 case KSD_SS_PIN2: | |
854 return MFW_SS_SIM_REG_PW; | |
855 } | |
856 return MFW_SS_UNKNOWN; | |
857 | |
858 case SEQGRP_UBLK: | |
859 return MFW_SS_SIM_UNBLCK_PIN; | |
860 | |
861 case SEQGRP_CW: | |
862 return MFW_SS_WAIT; | |
863 | |
864 case SEQGRP_CCBS: | |
865 return MFW_SS_CCBS; | |
866 | |
867 case SEQGRP_PRSNT_IMEI: | |
868 return MFW_SS_MMI; | |
869 | |
870 case SEQGRP_CHLD: | |
871 /*MC 11.04.02 */ | |
872 if (para.chld.mode == CHLD_MOD_Ect) | |
873 return MFW_SS_ECT; | |
874 else if (para.chld.mode == CHLD_MOD_Ccbs) | |
875 return MFW_SS_CCBS; | |
876 else | |
877 /*MC*/ | |
878 return MFW_SS_HOLD; | |
879 | |
880 case SEQGRP_UNKNOWN: | |
881 return MFW_SS_UNKNOWN; | |
882 | |
883 default: | |
884 return MFW_SS_UNKNOWN; | |
885 } | |
886 } | |
887 | |
888 /* | |
889 +-------------------------------------------------------------------+ | |
890 | PROJECT : MMI-Framework (8417) MODULE : MFW_SS | | |
891 | STATE : code ROUTINE : ss_execute_transaction | | |
892 +-------------------------------------------------------------------+ | |
893 | |
894 PURPOSE : Start a SS transaction | |
895 | |
896 */ | |
897 | |
898 T_MFW_SS_RETURN ss_execute_transaction(UBYTE *ss_string, | |
899 UBYTE ussd_mand) | |
900 { | |
901 T_ACI_RETURN res; | |
902 | |
903 TRACE_FUNCTION("ss_execute_transaction()"); | |
904 | |
905 res = sAT_Dn(CMD_SRC_LCL, (CHAR *)ss_string, -1, -1, -1); | |
906 if( (res != AT_EXCT) AND (res != AT_CMPL)) | |
907 { | |
908 TRACE_EVENT("sAT_D error"); | |
909 return MFW_SS_FAIL; | |
910 } | |
911 | |
912 return ss_check_ss_string(ss_string); | |
913 } | |
914 | |
915 | |
916 /* | |
917 +--------------------------------------------------------------------+ | |
918 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
919 | STATE : code ROUTINE: ss_cvtCssuCodes | | |
920 +--------------------------------------------------------------------+ | |
921 | |
922 | |
923 PURPOSE : This function is used to convert the CSSU mode | |
924 used by ACI to the CSSU mode used by MFW. | |
925 | |
926 */ | |
927 | |
928 T_MFW_SS_NOTIFY_CODES ss_cvtCssuCodes(T_ACI_CSSU_CODE code) | |
929 { | |
930 switch (code) | |
931 { | |
932 case CSSU_CODE_ForwardedCall: return MFW_SS_MT_FORWARDED; | |
933 case CSSU_CODE_CUGCall: return MFW_SS_MT_CUG_CALL; | |
934 case CSSU_CODE_Multiparty: return MFW_SS_NOTIFY_MULTIPARTY; | |
935 case CSSU_CODE_HeldCallRel: return MFW_SS_NOTIFY_holdRELEASED; | |
936 case CSSU_CODE_FwrdCheckSS: return MFW_SS_NOTIFY_checkSS; | |
937 case CSSU_CODE_ECTAlert: return MFW_SS_NOTIFY_ectALERT; | |
938 case CSSU_CODE_ECTConnect: return MFW_SS_NOTIFY_ectCONNECT; | |
939 case CSSU_CODE_DeflectedCall: return MFW_SS_MT_DEFLECTED; | |
940 default: return MFW_SS_NOTIFY_UNKNOWN; | |
941 } | |
942 } | |
943 | |
944 | |
945 /* | |
946 +--------------------------------------------------------------------+ | |
947 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
948 | STATE : code ROUTINE: ss_cvtCssiCodes | | |
949 +--------------------------------------------------------------------+ | |
950 | |
951 | |
952 PURPOSE : This function is used to convert the CSSI mode | |
953 used by ACI to the CSSI mode used by MFW. | |
954 | |
955 */ | |
956 | |
957 T_MFW_SS_NOTIFY_CODES ss_cvtCssiCodes(T_ACI_CSSI_CODE code) | |
958 { | |
959 switch (code) | |
960 { | |
961 case CSSI_CODE_CFUActive: return MFW_SS_MO_unconFORWARD; | |
962 case CSSI_CODE_SomeCCFActive: return MFW_SS_MO_conFORWARD; | |
963 case CSSI_CODE_ForwardedCall: return MFW_SS_MO_FORWARDED; | |
964 case CSSI_CODE_CallWaiting: return MFW_SS_MO_WAITING; | |
965 case CSSI_CODE_CUGCall: return MFW_SS_MO_CUG_CALL; | |
966 case CSSI_CODE_OutCallsBarred: return MFW_SS_MO_moBARRED; | |
967 case CSSI_CODE_IncCallsBarred: return MFW_SS_MO_mtBARRED; | |
968 case CSSI_CODE_CLIRSupRej: return MFW_SS_MO_CLIR; | |
969 case CSSI_CODE_DeflectedCall: return MFW_SS_MO_DEFLECTED; | |
970 default: return MFW_SS_NOTIFY_UNKNOWN; | |
971 } | |
972 } | |
973 | |
974 | |
975 /* | |
976 +--------------------------------------------------------------------+ | |
977 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
978 | STATE : code ROUTINE: ss_notify | | |
979 +--------------------------------------------------------------------+ | |
980 | |
981 | |
982 PURPOSE : Change of SS status from the network. | |
983 | |
984 */ | |
985 | |
986 void ss_notify(T_MFW_SS_NOTIFY_CODES code, | |
987 SHORT index, | |
988 UBYTE *number, | |
989 UBYTE *subaddr) | |
990 { | |
991 // Apr 06 2005 REF: CRR 29989 xpradipg | |
992 // defined the variable locally since the scope lies within this function | |
993 #ifdef FF_MMI_OPTIM | |
994 T_MFW_SS_NOTIFY notify; | |
995 #endif | |
996 memset(¬ify, 0, sizeof(T_MFW_SS_NOTIFY)); | |
997 | |
998 notify.code = code; | |
999 | |
1000 if(number) | |
1001 strcpy((char *)notify.number, (char *)number); | |
1002 if (subaddr) | |
1003 strcpy((char *)notify.subaddr, (char *)subaddr); | |
1004 | |
1005 //PATCH TB 1309: Wrong codes tested | |
1006 if ((code == MFW_SS_MO_CUG_CALL) OR | |
1007 (code == MFW_SS_MT_CUG_CALL)) | |
1008 notify.index = (UBYTE)index; | |
1009 /* END PATCH TB */ | |
1010 | |
1011 { | |
1012 /***************************Go-lite Optimization changes Start***********************/ | |
1013 //Aug 16, 2004 REF: CRR 24323 Deepa M.D | |
1014 TRACE_EVENT_P1 ("SS notify code = %d", notify.code); | |
1015 /***************************Go-lite Optimization changes end***********************/ | |
1016 } | |
1017 | |
1018 ss_signal(E_SS_NOTIFY, ¬ify); | |
1019 } | |
1020 | |
1021 | |
1022 /* | |
1023 +--------------------------------------------------------------------+ | |
1024 | PROJECT: MMI-Framework (8417) MODULE : MFW_SS | | |
1025 | STATE : code ROUTINE : ss_cvtOCode | | |
1026 +--------------------------------------------------------------------+ | |
1027 | |
1028 | |
1029 PURPOSE : Convert operation codes | |
1030 | |
1031 */ | |
1032 | |
1033 T_MFW ss_cvtOCode(T_ACI_KSD_OP code) | |
1034 { | |
1035 switch (code) | |
1036 { | |
1037 case KSD_OP_IRGT: return SS_INTERROGATION; | |
1038 case KSD_OP_REG: return SS_REGISTRATION; | |
1039 case KSD_OP_ERS: return SS_ERASURE; | |
1040 case KSD_OP_ACT: return SS_ACTIVATION; | |
1041 case KSD_OP_DEACT: return SS_DEACTIVATION; | |
1042 default: return SS_CODES_UNKNOWN; | |
1043 } | |
1044 } | |
1045 | |
1046 | |
1047 /* | |
1048 +--------------------------------------------------------------------+ | |
1049 | PROJECT: MMI-Framework (8417) MODULE : MFW_SS | | |
1050 | STATE : code ROUTINE : ss_cvtSCodes | | |
1051 +--------------------------------------------------------------------+ | |
1052 | |
1053 | |
1054 PURPOSE : This function is used to convert the SS code | |
1055 used by ACI to the SS code used by MFW. | |
1056 | |
1057 */ | |
1058 | |
1059 T_MFW ss_cvtSCode(T_ACI_KSD_SS code) | |
1060 { | |
1061 switch (code) | |
1062 { | |
1063 case KSD_SS_CLIP: return SS_CLIP; | |
1064 case KSD_SS_CLIR: return SS_CLIR; | |
1065 case KSD_SS_COLP: return SS_COLP; | |
1066 case KSD_SS_COLR: return SS_COLR; | |
1067 case KSD_SS_CW: return SS_CW; | |
1068 case KSD_SS_BAIC: return SS_CB_BAIC; | |
1069 case KSD_SS_BAOC: return SS_CB_BAOC; | |
1070 case KSD_SS_ALL_CBSS: return SS_CB_ALL; | |
1071 case KSD_SS_BICRM: return SS_CB_BAICroam; | |
1072 case KSD_SS_BIC: return SS_CB_ALL_BAIC; | |
1073 case KSD_SS_BOICXH: return SS_CB_BAOICexH; | |
1074 case KSD_SS_BOIC: return SS_CB_BAOIC; | |
1075 case KSD_SS_BOC: return SS_CB_ALL_BAOC; | |
1076 case KSD_SS_CFB: return SS_CF_CFB; | |
1077 case KSD_SS_CFNRC: return SS_CF_CFNR; | |
1078 case KSD_SS_CFNRY: return SS_CF_CFNRy; | |
1079 case KSD_SS_CFU: return SS_CF_CFU; | |
1080 case KSD_SS_ALL_CFWSS: return SS_CF_ALL_COND; | |
1081 case KSD_SS_ALL_FWSS: return SS_CF_ALL; | |
1082 case KSD_SS_CCBS: return SS_CCBS; | |
1083 case KSD_SS_PIN1: return SS_PIN1; | |
1084 case KSD_SS_PIN2: return SS_PIN2; | |
1085 default: return SS_CODES_UNKNOWN; | |
1086 } | |
1087 } | |
1088 | |
1089 | |
1090 /* | |
1091 +--------------------------------------------------------------------+ | |
1092 | PROJECT: MMI-Framework (8417) MODULE : MFW_SS | | |
1093 | STATE : code ROUTINE : ss_cvtCLStatus | | |
1094 +--------------------------------------------------------------------+ | |
1095 | |
1096 | |
1097 PURPOSE : This function is used to convert the CL status | |
1098 used by ACI to the CL status used by MFW. | |
1099 | |
1100 */ | |
1101 | |
1102 T_MFW ss_cvtCLStatus(T_ACI_KSD_CLIR_OP stat) | |
1103 { | |
1104 switch (stat) | |
1105 { | |
1106 case KSD_CO_PERMANENT: return MFW_CL_PERM; | |
1107 case KSD_CO_TEMPORARY: return MFW_CL_TEMP_DEF_REST; | |
1108 case KSD_CO_ALLOWED: return MFW_CL_TEMP_DEF_ALLOWED; | |
1109 default: return MFW_CL_UNKNOWN; | |
1110 } | |
1111 } | |
1112 | |
1113 /* | |
1114 +--------------------------------------------------------------------+ | |
1115 | PROJECT: MMI-Framework (8417) MODULE : MFW_SS | | |
1116 | STATE : code ROUTINE : ss_cvtCLOvrd | | |
1117 +--------------------------------------------------------------------+ | |
1118 | |
1119 | |
1120 PURPOSE : This function is used to convert the override status of | |
1121 CLIR used by ACI to the override status of CLIR used by | |
1122 MFW. | |
1123 | |
1124 */ | |
1125 | |
1126 T_MFW ss_cvtCLOvrd(T_ACI_KSD_OVRD_CTG ovrd) | |
1127 { | |
1128 switch (ovrd) | |
1129 { | |
1130 case KSD_OVR_CAT_ENABLED: return MFW_OV_ENABLED; | |
1131 case KSD_OVR_CAT_DISABLED: return MFW_OV_DISABLED; | |
1132 default: return MFW_OV_UNKNOWN; | |
1133 } | |
1134 } | |
1135 | |
1136 /* | |
1137 +--------------------------------------------------------------------+ | |
1138 | PROJECT: MMI-Framework (8417) MODULE : MFW_SS | | |
1139 | STATE : code ROUTINE : ss_cvtErrCode | | |
1140 +--------------------------------------------------------------------+ | |
1141 | |
1142 | |
1143 PURPOSE : This function is used to convert the error code used | |
1144 by ACI to the error code used by MFW. | |
1145 | |
1146 */ | |
1147 | |
1148 T_MFW ss_cvtErrCode(T_ACI_KSD_ERR err) | |
1149 { | |
1150 switch (err) | |
1151 { | |
1152 case KSD_NO_ERROR: return MFW_SS_NO_ERROR; | |
1153 case KSD_ERR_UNKNOWN_SUBSCRIBER: return MFW_SS_ERR_UNKNOWN_SUBSCRIBER; | |
1154 case KSD_ERR_ILLEGAL_SUBSCRIBER: return MFW_SS_ERR_ILLEGAL_SUBSCRIBER; | |
1155 case KSD_ERR_BEARER_SVC_NOT_PROV: return MFW_SS_ERR_BEARER_SVC_NOT_PROV; | |
1156 case KSD_ERR_TELE_SVC_NOT_PROV: return MFW_SS_ERR_TELE_SVC_NOT_PROV; | |
1157 case KSD_ERR_ILLEGAL_EQUIPMENT: return MFW_SS_ERR_ILLEGAL_EQUIPMENT; | |
1158 case KSD_ERR_CALL_BARRED: return MFW_SS_ERR_CALL_BARRED; | |
1159 case KSD_ERR_ILLEGAL_SS_OPERATION: return MFW_SS_ERR_ILLEGAL_SS_OPERATION; | |
1160 case KSD_ERR_SS_ERR_STATUS: return MFW_SS_ERR_SS_ERR_STATUS; | |
1161 case KSD_ERR_SS_NOT_AVAIL: return MFW_SS_ERR_SS_NOT_AVAIL; | |
1162 case KSD_ERR_SS_SUBS_VIOLATION: return MFW_SS_ERR_SS_SUBS_VIOLATION; | |
1163 case KSD_ERR_SS_INCOMP: return MFW_SS_ERR_SS_INCOMP; | |
1164 case KSD_ERR_FAC_NOT_SUPPORTED: return MFW_SS_ERR_FAC_NOT_SUPPORTED; | |
1165 case KSD_ERR_ABSENT_SUBS: return MFW_SS_ERR_ABSENT_SUBS; | |
1166 case KSD_ERR_SYSTEM_FAIL: return MFW_SS_ERR_SYSTEM_FAIL; | |
1167 case KSD_ERR_DATA_MISSING: return MFW_SS_ERR_DATA_MISSING; | |
1168 case KSD_ERR_UNEXPECT_DATA: return MFW_SS_ERR_UNEXPECT_DATA; | |
1169 case KSD_ERR_PWD_REG_FAIL: return MFW_SS_ERR_PWD_REG_FAIL; | |
1170 case KSD_ERR_NEG_PWD_CHECK: return MFW_SS_ERR_NEG_PWD_CHECK; | |
1171 case KSD_ERR_NUM_PWD_VIOLATION: return MFW_SS_ERR_NUM_PWD_VIOLATION; | |
1172 case KSD_ERR_UNKNOWN_ALPHA: return MFW_SS_ERR_UNKNOWN_ALPHA; | |
1173 case KSD_ERR_USSD_BUSY: return MFW_SS_ERR_USSD_BUSY; | |
1174 case KSD_ERR_MAX_NUM_MPTY_EXCEED: return MFW_SS_ERR_MAX_NUM_MPTY_EXCEED; | |
1175 case KSD_ERR_RESOURCE_NOT_AVAIL: return MFW_SS_ERR_RESOURCE_NOT_AVAIL; | |
1176 case KSD_GEN_PROB_UNRECOG_CMP: return MFW_SS_GEN_PROB_UNRECOG_CMP; | |
1177 case KSD_GEN_PROB_MISTYPED_CMP: return MFW_SS_GEN_PROB_MISTYPED_CMP; | |
1178 case KSD_GEN_PROB_BAD_STRUCT_CMP: return MFW_SS_GEN_PROB_BAD_STRUCT_CMP; | |
1179 case KSD_INV_PROB_DUPL_INV_ID: return MFW_SS_INV_PROB_DUPL_INV_ID; | |
1180 case KSD_INV_PROB_UNRECOG_OP: return MFW_SS_INV_PROB_UNRECOG_OP; | |
1181 case KSD_INV_PROB_MISTYPED_PAR: return MFW_SS_INV_PROB_MISTYPED_PAR; | |
1182 case KSD_INV_PROB_RESOURCE_LIM: return MFW_SS_INV_PROB_RESOURCE_LIM; | |
1183 case KSD_INV_PROB_INIT_RELEASE: return MFW_SS_INV_PROB_INIT_RELEASE; | |
1184 case KSD_INV_PROB_UNRECOG_LNK_ID: return MFW_SS_INV_PROB_UNRECOG_LNK_ID; | |
1185 case KSD_INV_PROB_LNK_RES_UNEXP: return MFW_SS_INV_PROB_LNK_RES_UNEXP; | |
1186 case KSD_INV_PROB_UNEXP_LNK_OP: return MFW_SS_INV_PROB_UNEXP_LNK_OP; | |
1187 case KSD_RES_PROB_UNRECOG_INV_ID: return MFW_SS_RES_PROB_UNRECOG_INV_ID; | |
1188 case KSD_RES_PROB_RET_RES_UNEXP: return MFW_SS_RES_PROB_RET_RES_UNEXP; | |
1189 case KSD_RES_PROB_MISTYPED_PAR: return MFW_SS_RES_PROB_MISTYPED_PAR; | |
1190 case KSD_ERR_PROB_UNRECOG_INV_ID: return MFW_SS_ERR_PROB_UNRECOG_INV_ID; | |
1191 case KSD_ERR_PROB_RET_ERR_UNEXP: return MFW_SS_ERR_PROB_RET_ERR_UNEXP; | |
1192 case KSD_ERR_PROB_UNRECOG_ERR: return MFW_SS_ERR_PROB_UNRECOG_ERR; | |
1193 case KSD_ERR_PROB_UNEXP_ERR: return MFW_SS_ERR_PROB_UNEXP_ERR; | |
1194 case KSD_ERR_PROB_MISTYPED_PAR: return MFW_SS_ERR_PROB_MISTYPED_PAR; | |
1195 case KSD_ERR_FATAL_INV_RESULT: return MFW_SS_ERR_FATAL_INV_RESULT; | |
1196 case KSD_ERR_FATAL_CCD_DEC: return MFW_SS_ERR_FATAL_CCD_DEC; | |
1197 case KSD_ERR_FATAL_SS_ENT: return MFW_SS_ERR_FATAL_SS_ENT; | |
1198 default: return MFW_SS_ERR_UNKNOWN; | |
1199 } | |
1200 } | |
1201 | |
1202 | |
1203 /* | |
1204 +--------------------------------------------------------------------+ | |
1205 | PROJECT: MMI-Framework (8417) MODULE : MFW_SS | | |
1206 | STATE : code ROUTINE : ss_decode_imei | | |
1207 +--------------------------------------------------------------------+ | |
1208 | |
1209 | |
1210 PURPOSE : convert imei (packed bcd to ASCII) | |
1211 | |
1212 */ | |
1213 | |
1214 void ss_decode_imei(T_ACI_KSIR *ksStat) | |
1215 { | |
1216 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1217 #ifdef FF_MMI_OPTIM | |
1218 memset(imei_info, 0, sizeof(T_MFW_IMEI)); | |
1219 | |
1220 imei_info->imei_number[0] = ( ksStat->ir.rKSIMEI.tac1 & 0xF0 ) >> 4 | 0x30; | |
1221 imei_info->imei_number[1] = ( ksStat->ir.rKSIMEI.tac1 ) & 0x0F | 0x30; | |
1222 imei_info->imei_number[2] = ( ksStat->ir.rKSIMEI.tac2 & 0xF0 ) >> 4 | 0x30; | |
1223 imei_info->imei_number[3] = ( ksStat->ir.rKSIMEI.tac2 ) & 0x0F | 0x30; | |
1224 imei_info->imei_number[4] = ( ksStat->ir.rKSIMEI.tac3 & 0xF0 ) >> 4 | 0x30; | |
1225 imei_info->imei_number[5] = ( ksStat->ir.rKSIMEI.tac3 ) & 0x0F | 0x30; | |
1226 imei_info->imei_number[6] = ( ksStat->ir.rKSIMEI.fac & 0xF0 ) >> 4 | 0x30; | |
1227 imei_info->imei_number[7] = ( ksStat->ir.rKSIMEI.fac ) & 0x0F | 0x30; | |
1228 imei_info->imei_number[8] = ( ksStat->ir.rKSIMEI.snr1 & 0xF0 ) >> 4 | 0x30; | |
1229 imei_info->imei_number[9] = ( ksStat->ir.rKSIMEI.snr1 ) & 0x0F | 0x30; | |
1230 imei_info->imei_number[10] = ( ksStat->ir.rKSIMEI.snr2 & 0xF0 ) >> 4 | 0x30; | |
1231 imei_info->imei_number[11] = ( ksStat->ir.rKSIMEI.snr2 ) & 0x0F | 0x30; | |
1232 imei_info->imei_number[12] = ( ksStat->ir.rKSIMEI.snr3 & 0xF0 ) >> 4 | 0x30; | |
1233 imei_info->imei_number[13] = ( ksStat->ir.rKSIMEI.snr3 ) & 0x0F | 0x30; | |
1234 //a0876501 - Check byte comes before the Software version during display. | |
1235 imei_info->imei_number[14] = ( ksStat->ir.rKSIMEI.cd & 0x0F ) | 0x30; | |
1236 imei_info->imei_number[15] = ( ksStat->ir.rKSIMEI.svn & 0xF0 ) >> 4 | 0x30; | |
1237 imei_info->imei_number[16] = ( ksStat->ir.rKSIMEI.svn ) & 0x0F | 0x30; | |
1238 imei_info->imei_number[17] = '\0'; | |
1239 #else | |
1240 memset(&imei_info, 0, sizeof(imei_info)); | |
1241 // Jul 05 2005 REF: CRR 22565 a0876501 | |
1242 // Fixed the issue of byte swapping. | |
1243 | |
1244 imei_info.imei_number[0] = ( ksStat->ir.rKSIMEI.tac1 & 0xF0 ) >> 4 | 0x30; | |
1245 imei_info.imei_number[1] = ( ksStat->ir.rKSIMEI.tac1 ) & 0x0F | 0x30; | |
1246 imei_info.imei_number[2] = ( ksStat->ir.rKSIMEI.tac2 & 0xF0 ) >> 4 | 0x30; | |
1247 imei_info.imei_number[3] = ( ksStat->ir.rKSIMEI.tac2 ) & 0x0F | 0x30; | |
1248 imei_info.imei_number[4] = ( ksStat->ir.rKSIMEI.tac3 & 0xF0 ) >> 4 | 0x30; | |
1249 imei_info.imei_number[5] = ( ksStat->ir.rKSIMEI.tac3 ) & 0x0F | 0x30; | |
1250 imei_info.imei_number[6] = ( ksStat->ir.rKSIMEI.fac & 0xF0 ) >> 4 | 0x30; | |
1251 imei_info.imei_number[7] = ( ksStat->ir.rKSIMEI.fac ) & 0x0F | 0x30; | |
1252 imei_info.imei_number[8] = ( ksStat->ir.rKSIMEI.snr1 & 0xF0 ) >> 4 | 0x30; | |
1253 imei_info.imei_number[9] = ( ksStat->ir.rKSIMEI.snr1 ) & 0x0F | 0x30; | |
1254 imei_info.imei_number[10] = ( ksStat->ir.rKSIMEI.snr2 & 0xF0 ) >> 4 | 0x30; | |
1255 imei_info.imei_number[11] = ( ksStat->ir.rKSIMEI.snr2 ) & 0x0F | 0x30; | |
1256 imei_info.imei_number[12] = ( ksStat->ir.rKSIMEI.snr3 & 0xF0 ) >> 4 | 0x30; | |
1257 imei_info.imei_number[13] = ( ksStat->ir.rKSIMEI.snr3 ) & 0x0F | 0x30; | |
1258 //a0876501 - Check byte comes before the Software version during display. | |
1259 imei_info.imei_number[14] = ( ksStat->ir.rKSIMEI.cd & 0x0F ) | 0x30; | |
1260 imei_info.imei_number[15] = ( ksStat->ir.rKSIMEI.svn & 0xF0 ) >> 4 | 0x30; | |
1261 imei_info.imei_number[16] = ( ksStat->ir.rKSIMEI.svn ) & 0x0F | 0x30; | |
1262 imei_info.imei_number[17] = '\0'; | |
1263 | |
1264 TRACE_EVENT_P8("ss_decode_imei IMEI: TAC %1c%1c%1c%1c%1c%1c%1c%1c", | |
1265 imei_info.imei_number[0], imei_info.imei_number[1], imei_info.imei_number[2], imei_info.imei_number[3], | |
1266 imei_info.imei_number[4], imei_info.imei_number[5], imei_info.imei_number[6], imei_info.imei_number[7]); | |
1267 TRACE_EVENT_P6("ss_decode_imei IMEI: SNR %1c%1c%1c%1c%1c%1c", | |
1268 imei_info.imei_number[8], imei_info.imei_number[9], imei_info.imei_number[10], imei_info.imei_number[11], | |
1269 imei_info.imei_number[12], imei_info.imei_number[13]); | |
1270 TRACE_EVENT_P4("ss_decode_imei IMEI: SV CD %1c%1c%1c%1c", | |
1271 imei_info.imei_number[14], imei_info.imei_number[15], imei_info.imei_number[16],imei_info.imei_number[17]); | |
1272 | |
1273 #endif | |
1274 } | |
1275 | |
1276 /* | |
1277 +--------------------------------------------------------------------+ | |
1278 | PROJECT: MMI-Framework (8417) MODULE : MFW_SS | | |
1279 | STATE : code ROUTINE : getCdByteFromImei | | |
1280 +--------------------------------------------------------------------+ | |
1281 | |
1282 | |
1283 PURPOSE : Get CD byte from IMEI. | |
1284 // July 23, 2005 REF : MMI-22565 - a0876501 | |
1285 */ | |
1286 | |
1287 UBYTE getCdByteFromImei(UBYTE *imei) | |
1288 { | |
1289 T_ACI_IMEI aci_imei; | |
1290 | |
1291 // July 23, 2005 REF : MMI-22565 - a0876501 | |
1292 // For calculating the Cd byte, copy the buffer contents. | |
1293 aci_imei.tac1 = imei[0]; | |
1294 aci_imei.tac2 = imei[1]; | |
1295 aci_imei.tac3 = imei[2]; | |
1296 aci_imei.fac = imei[3]; | |
1297 aci_imei.snr1 = imei[4]; | |
1298 aci_imei.snr2 = imei[5]; | |
1299 aci_imei.snr3 = imei[6]; | |
1300 aci_imei.svn = imei[7]; | |
1301 #ifndef NEPTUNE_BOARD | |
1302 | |
1303 return(cmhSS_getCdFromImei(&aci_imei)); | |
1304 | |
1305 #endif | |
1306 | |
1307 } | |
1308 | |
1309 /* | |
1310 +--------------------------------------------------------------------+ | |
1311 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
1312 | STATE : code ROUTINE: rAT_PercentKSIR | | |
1313 +--------------------------------------------------------------------+ | |
1314 | |
1315 | |
1316 PURPOSE : Network response for key sequences | |
1317 | |
1318 */ | |
1319 | |
1320 void rAT_PercentKSIR ( T_ACI_KSIR *ksStat) | |
1321 { | |
1322 UBYTE idx; | |
1323 T_MFW_TELECOM *p_tele; | |
1324 T_MFW_FEATURE *p_feat; | |
1325 T_MFW_SRV_GROUP *p_srv; | |
1326 | |
1327 TRACE_FUNCTION("rAT_PercentKSIR()"); | |
1328 TRACE_EVENT_P1("ksStat->ksdCmd %d", ksStat->ksdCmd); | |
1329 | |
1330 switch (ksStat->ksdCmd) | |
1331 { | |
1332 case KSD_CMD_CB: | |
1333 TRACE_EVENT("KSD_CMD_CB"); | |
1334 TRACE_EVENT_P1("ksStat->ir.rKSCB.ssCd %d", ksStat->ir.rKSCB.ssCd); | |
1335 TRACE_EVENT_P1("ksStat->ir.rKSCB.opCd %d", ksStat->ir.rKSCB.opCd); | |
1336 TRACE_EVENT_P1("ksStat->ir.rKSCB.ssErr %d", ksStat->ir.rKSCB.ssErr); | |
1337 TRACE_EVENT_P1("ksStat->ir.rKSCB.c_cbInfoLst %d", ksStat->ir.rKSCB.c_cbInfoLst); | |
1338 if (ksStat->ir.rKSCB.c_cbInfoLst) | |
1339 { | |
1340 int i; | |
1341 for (i = 0; i < ksStat->ir.rKSCB.c_cbInfoLst; i++) | |
1342 { | |
1343 TRACE_EVENT_P2("ksStat->ir.rKSCB.cbInfoLst[%d].bsTp %d", i, ksStat->ir.rKSCB.cbInfoLst[i].bsTp); | |
1344 TRACE_EVENT_P2("ksStat->ir.rKSCB.cbInfoLst[%d].bsCd %d", i, ksStat->ir.rKSCB.cbInfoLst[i].bsCd); | |
1345 TRACE_EVENT_P2("ksStat->ir.rKSCB.cbInfoLst[%d].ssSt %d", i, ksStat->ir.rKSCB.cbInfoLst[i].ssSt); | |
1346 } | |
1347 } | |
1348 p_tele = (T_MFW_TELECOM *) ssLstBuf; | |
1349 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1350 #ifdef FF_MMI_OPTIM | |
1351 cb_cnf = (T_MFW_SS_CB_CNF*)mfwAlloc(sizeof(T_MFW_SS_CB_CNF)); | |
1352 if(NULL != cb_cnf) | |
1353 { | |
1354 TRACE_EVENT_P2("Mem Aloc for cb_cnf = %x Size = %d",cb_cnf,sizeof(T_MFW_SS_CB_CNF)); | |
1355 cb_cnf->ss_code = ss_cvtSCode(ksStat->ir.rKSCB.ssCd); | |
1356 cb_cnf->ss_category = ss_cvtOCode(ksStat->ir.rKSCB.opCd); | |
1357 cb_cnf->ss_error = ss_cvtErrCode(ksStat->ir.rKSCB.ssErr); | |
1358 cb_cnf->ss_telecom_list = p_tele; | |
1359 } | |
1360 else | |
1361 return; | |
1362 #else | |
1363 cb_cnf.ss_code = (T_MFW_SS_CODES) ss_cvtSCode((T_ACI_KSD_SS)ksStat->ir.rKSCB.ssCd); | |
1364 cb_cnf.ss_category = (T_MFW_SS_CATEGORY)ss_cvtOCode((T_ACI_KSD_OP)ksStat->ir.rKSCB.opCd); | |
1365 cb_cnf.ss_error = (T_MFW_SS_ERROR)ss_cvtErrCode((T_ACI_KSD_ERR)ksStat->ir.rKSCB.ssErr); | |
1366 cb_cnf.ss_telecom_list = p_tele; | |
1367 #endif | |
1368 | |
1369 for( idx = 0; | |
1370 idx < ksStat->ir.rKSCB.c_cbInfoLst AND | |
1371 idx < MFW_MAX_TELE_NR; | |
1372 idx++, p_tele++ ) | |
1373 { | |
1374 p_tele->ss_telecom_type = ksStat->ir.rKSCB. | |
1375 cbInfoLst[idx].bsTp; | |
1376 p_tele->ss_telecom_service = ksStat->ir.rKSCB. | |
1377 cbInfoLst[idx].bsCd; | |
1378 p_tele->ss_status = ksStat->ir.rKSCB. | |
1379 cbInfoLst[idx].ssSt; | |
1380 } | |
1381 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1382 #ifdef FF_MMI_OPTIM | |
1383 if(NULL != cb_cnf) | |
1384 cb_cnf->ss_telecom_count = idx; | |
1385 #else | |
1386 cb_cnf.ss_telecom_count = idx; | |
1387 #endif | |
1388 break; | |
1389 | |
1390 case KSD_CMD_CF: | |
1391 TRACE_EVENT("KSD_CMD_CF"); | |
1392 TRACE_EVENT_P1("ksStat->ir.rKSCF.ssCd %d", ksStat->ir.rKSCF.ssCd); | |
1393 TRACE_EVENT_P1("ksStat->ir.rKSCF.opCd %d", ksStat->ir.rKSCF.opCd); | |
1394 TRACE_EVENT_P1("ksStat->ir.rKSCF.ssErr %d", ksStat->ir.rKSCF.ssErr); | |
1395 TRACE_EVENT_P1("ksStat->ir.rKSCF.c_cfFeatLst %d", ksStat->ir.rKSCF.c_cfFeatLst); | |
1396 if (ksStat->ir.rKSCF.c_cfFeatLst) | |
1397 { | |
1398 int i; | |
1399 for (i = 0; i < ksStat->ir.rKSCF.c_cfFeatLst; i++) | |
1400 { | |
1401 TRACE_EVENT_P2("ksStat->ir.rKSCF.cfFeatLst[%d].bsTp %d", i, ksStat->ir.rKSCF.cfFeatLst[i].bsTp); | |
1402 TRACE_EVENT_P2("ksStat->ir.rKSCF.cfFeatLst[%d].bsCd %d", i, ksStat->ir.rKSCF.cfFeatLst[i].bsCd); | |
1403 TRACE_EVENT_P2("ksStat->ir.rKSCF.cfFeatLst[%d].ssSt %d", i, ksStat->ir.rKSCF.cfFeatLst[i].ssSt); | |
1404 TRACE_EVENT_P2("ksStat->ir.rKSCF.cfFeatLst[%d].num %s", i, ksStat->ir.rKSCF.cfFeatLst[i].num); | |
1405 TRACE_EVENT_P2("ksStat->ir.rKSCF.cfFeatLst[%d].ton 0x%02X", i, ksStat->ir.rKSCF.cfFeatLst[i].ton); | |
1406 TRACE_EVENT_P2("ksStat->ir.rKSCF.cfFeatLst[%d].npi 0x%02X", i, ksStat->ir.rKSCF.cfFeatLst[i].npi); | |
1407 TRACE_EVENT_P2("ksStat->ir.rKSCF.cfFeatLst[%d].sub %s", i, ksStat->ir.rKSCF.cfFeatLst[i].sub); | |
1408 TRACE_EVENT_P2("ksStat->ir.rKSCF.cfFeatLst[%d].tos 0x%02X", i, ksStat->ir.rKSCF.cfFeatLst[i].tos); | |
1409 TRACE_EVENT_P2("ksStat->ir.rKSCF.cfFeatLst[%d].oe 0x%02X", i, ksStat->ir.rKSCF.cfFeatLst[i].oe); | |
1410 TRACE_EVENT_P2("ksStat->ir.rKSCF.cfFeatLst[%d].time 0x%02X", i, ksStat->ir.rKSCF.cfFeatLst[i].time); | |
1411 } | |
1412 } | |
1413 p_feat = (T_MFW_FEATURE *) ssLstBuf; | |
1414 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1415 #ifdef FF_MMI_OPTIM | |
1416 cf_cnf = (T_MFW_SS_CF_CNF*)mfwAlloc(sizeof(T_MFW_SS_CF_CNF)); | |
1417 if(NULL != cf_cnf) | |
1418 { | |
1419 TRACE_EVENT_P2("Mem Loc = %x, allocates size = %d",cf_cnf,sizeof(T_MFW_SS_CF_CNF)); | |
1420 cf_cnf->ss_code = (T_MFW_SS_CODES)ss_cvtSCode((T_ACI_KSD_SS)ksStat->ir.rKSCF.ssCd); | |
1421 cf_cnf->ss_category = (T_MFW_SS_CATEGORY)ss_cvtOCode((T_ACI_KSD_OP)ksStat->ir.rKSCF.opCd); | |
1422 cf_cnf->ss_error = (T_MFW_SS_ERROR)ss_cvtErrCode((T_ACI_KSD_ERR)ksStat->ir.rKSCF.ssErr); | |
1423 cf_cnf->ss_feature_list = p_feat; | |
1424 } | |
1425 #else | |
1426 cf_cnf.ss_code = (T_MFW_SS_CODES)ss_cvtSCode((T_ACI_KSD_SS)ksStat->ir.rKSCF.ssCd); | |
1427 cf_cnf.ss_category = (T_MFW_SS_CATEGORY)ss_cvtOCode((T_ACI_KSD_OP)ksStat->ir.rKSCF.opCd); | |
1428 cf_cnf.ss_error = (T_MFW_SS_ERROR)ss_cvtErrCode((T_ACI_KSD_ERR)ksStat->ir.rKSCF.ssErr); | |
1429 | |
1430 cf_cnf.ss_feature_list = p_feat; | |
1431 #endif | |
1432 for( idx = 0; | |
1433 idx < ksStat->ir.rKSCF.c_cfFeatLst AND | |
1434 idx < MFW_MAX_FEAT_NR; | |
1435 idx++, p_feat++ ) | |
1436 { | |
1437 p_feat->ss_telecom_type = ksStat->ir.rKSCF. | |
1438 cfFeatLst[idx].bsTp; | |
1439 p_feat->ss_telecom_service = ksStat->ir.rKSCF. | |
1440 cfFeatLst[idx].bsCd; | |
1441 p_feat->ss_status = ksStat->ir.rKSCF.cfFeatLst[idx].ssSt; | |
1442 p_feat->ss_numbering_type = phb_cvtTon(ksStat->ir.rKSCF. | |
1443 cfFeatLst[idx].ton); | |
1444 p_feat->ss_numbering_plan = (UBYTE)phb_cvtNpi(ksStat->ir.rKSCF. | |
1445 cfFeatLst[idx].npi); | |
1446 strncpy((char *)p_feat->ss_forwarded_to_number, | |
1447 (char *)ksStat->ir.rKSCF.cfFeatLst[idx].num, | |
1448 MFW_SS_NUM_LEN); | |
1449 strncpy((char *)p_feat->ss_forwarded_to_subaddress, | |
1450 (char *)ksStat->ir.rKSCF.cfFeatLst[idx].sub, | |
1451 MFW_SS_SUBADR_LEN); | |
1452 p_feat->ss_no_reply_condition_time = ksStat->ir.rKSCF. | |
1453 cfFeatLst[idx].time; | |
1454 } | |
1455 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1456 #ifdef FF_MMI_OPTIM | |
1457 if(NULL != cf_cnf) | |
1458 cf_cnf->ss_feature_count = idx; | |
1459 #else | |
1460 cf_cnf.ss_feature_count = idx; | |
1461 #endif | |
1462 TRACE_EVENT("rat_percentksir->KSD_CMD_CF"); | |
1463 if (ksStat->srcId != CMD_SRC_LCL) | |
1464 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1465 #ifdef FF_MMI_OPTIM | |
1466 { | |
1467 | |
1468 ss_signal(E_SS_CF_ICN_UPD,cf_cnf); | |
1469 } | |
1470 #else | |
1471 ss_signal(E_SS_CF_ICN_UPD, &cf_cnf); | |
1472 #endif | |
1473 | |
1474 break; | |
1475 | |
1476 case KSD_CMD_CL: | |
1477 TRACE_EVENT("KSD_CMD_CL"); | |
1478 TRACE_EVENT_P1("ksStat->ir.rKSCL.ssCd %d", ksStat->ir.rKSCL.ssCd); | |
1479 TRACE_EVENT_P1("ksStat->ir.rKSCL.opCd %d", ksStat->ir.rKSCL.opCd); | |
1480 TRACE_EVENT_P1("ksStat->ir.rKSCL.ssErr %d", ksStat->ir.rKSCL.ssErr); | |
1481 TRACE_EVENT_P1("ksStat->ir.rKSCL.ssSt %d", ksStat->ir.rKSCL.ssSt); | |
1482 TRACE_EVENT_P1("ksStat->ir.rKSCL.mode %d", ksStat->ir.rKSCL.mode); | |
1483 TRACE_EVENT_P1("ksStat->ir.rKSCL.clirOpt %d", ksStat->ir.rKSCL.clirOpt); | |
1484 TRACE_EVENT_P1("ksStat->ir.rKSCL.ovrdCtg %d", ksStat->ir.rKSCL.ovrdCtg); | |
1485 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1486 #ifdef FF_MMI_OPTIM | |
1487 cli_cnf = (T_MFW_SS_CLI_CNF*)mfwAlloc(sizeof(T_MFW_SS_CLI_CNF)); | |
1488 if(NULL != cli_cnf) | |
1489 { | |
1490 cli_cnf->ss_code = ss_cvtSCode(ksStat->ir.rKSCL.ssCd); | |
1491 cli_cnf->ss_category = ss_cvtOCode(ksStat->ir.rKSCL.opCd); | |
1492 cli_cnf->ss_error = ss_cvtErrCode(ksStat->ir.rKSCL.ssErr); | |
1493 cli_cnf->ss_status = ksStat->ir.rKSCL.ssSt; | |
1494 cli_cnf->ss_clir_option = ss_cvtCLStatus(ksStat->ir.rKSCL.clirOpt); | |
1495 cli_cnf->ss_ovrd_ctgry = ss_cvtCLOvrd(ksStat->ir.rKSCL.ovrdCtg); | |
1496 } | |
1497 #else | |
1498 cli_cnf.ss_code = (T_MFW_SS_CODES)ss_cvtSCode((T_ACI_KSD_SS)ksStat->ir.rKSCL.ssCd); | |
1499 cli_cnf.ss_category = (T_MFW_SS_CATEGORY)ss_cvtOCode((T_ACI_KSD_OP)ksStat->ir.rKSCL.opCd); | |
1500 cli_cnf.ss_error = (T_MFW_SS_ERROR)ss_cvtErrCode((T_ACI_KSD_ERR)ksStat->ir.rKSCL.ssErr); | |
1501 | |
1502 cli_cnf.ss_status = ksStat->ir.rKSCL.ssSt; | |
1503 cli_cnf.ss_clir_option = (T_MFW_SS_ERROR)ss_cvtCLStatus((T_ACI_KSD_CLIR_OP)ksStat->ir.rKSCL.clirOpt); | |
1504 cli_cnf.ss_ovrd_ctgry = (T_MFW_OV_CTGRY)ss_cvtCLOvrd((T_ACI_KSD_OVRD_CTG)ksStat->ir.rKSCL.ovrdCtg); | |
1505 #endif | |
1506 break; | |
1507 | |
1508 case KSD_CMD_CW: | |
1509 TRACE_EVENT("KSD_CMD_CW"); | |
1510 TRACE_EVENT_P1("ksStat->ir.rKSCW.ssCd %d", ksStat->ir.rKSCW.ssCd); | |
1511 TRACE_EVENT_P1("ksStat->ir.rKSCW.opCd %d", ksStat->ir.rKSCW.opCd); | |
1512 TRACE_EVENT_P1("ksStat->ir.rKSCW.ssErr %d", ksStat->ir.rKSCW.ssErr); | |
1513 TRACE_EVENT_P1("ksStat->ir.rKSCW.ssSt %d", ksStat->ir.rKSCW.ssSt); | |
1514 TRACE_EVENT_P1("ksStat->ir.rKSCW.c_cwBSGLst %d", ksStat->ir.rKSCW.c_cwBSGLst); | |
1515 if (ksStat->ir.rKSCW.c_cwBSGLst) | |
1516 { | |
1517 int i; | |
1518 for (i = 0; i < ksStat->ir.rKSCW.c_cwBSGLst; i++) | |
1519 { | |
1520 TRACE_EVENT_P2("ksStat->ir.rKSCW.cwBSGLst[%d].bsTp %d", i, ksStat->ir.rKSCW.cwBSGLst[i].bsTp); | |
1521 TRACE_EVENT_P2("ksStat->ir.rKSCW.cwBSGLst[%d].bsCd %d", i, ksStat->ir.rKSCW.cwBSGLst[i].bsCd); | |
1522 } | |
1523 } | |
1524 p_srv = (T_MFW_SRV_GROUP *) ssLstBuf; | |
1525 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1526 #ifdef FF_MMI_OPTIM | |
1527 cw_cnf = (T_MFW_SS_CW_CNF*)mfwAlloc(sizeof(T_MFW_SS_CW_CNF)); | |
1528 if(cw_cnf != NULL) | |
1529 { | |
1530 cw_cnf->ss_code = ss_cvtSCode(ksStat->ir.rKSCW.ssCd); | |
1531 cw_cnf->ss_category = ss_cvtOCode(ksStat->ir.rKSCW.opCd); | |
1532 cw_cnf->ss_error = ss_cvtErrCode(ksStat->ir.rKSCW.ssErr); | |
1533 cw_cnf->ss_status = ksStat->ir.rKSCW.ssSt; | |
1534 cw_cnf->ss_service_list = p_srv; | |
1535 } | |
1536 | |
1537 #else | |
1538 cw_cnf.ss_code = (T_MFW_SS_CODES)ss_cvtSCode((T_ACI_KSD_SS)ksStat->ir.rKSCW.ssCd); | |
1539 cw_cnf.ss_category = (T_MFW_SS_CATEGORY)ss_cvtOCode((T_ACI_KSD_OP)ksStat->ir.rKSCW.opCd); | |
1540 cw_cnf.ss_error = (T_MFW_SS_ERROR)ss_cvtErrCode((T_ACI_KSD_ERR)ksStat->ir.rKSCW.ssErr); | |
1541 cw_cnf.ss_status = ksStat->ir.rKSCW.ssSt; | |
1542 | |
1543 cw_cnf.ss_service_list = p_srv; | |
1544 #endif | |
1545 for( idx = 0; | |
1546 idx < ksStat->ir.rKSCW.c_cwBSGLst AND | |
1547 idx < MFW_MAX_SRV_NR; | |
1548 idx++, p_srv++ ) | |
1549 { | |
1550 p_srv->ss_telecom_type = ksStat->ir.rKSCW. | |
1551 cwBSGLst[idx].bsTp; | |
1552 p_srv->ss_telecom_service = ksStat->ir.rKSCW. | |
1553 cwBSGLst[idx].bsCd; | |
1554 } | |
1555 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1556 #ifdef FF_MMI_OPTIM | |
1557 if(NULL != cw_cnf) | |
1558 cw_cnf->ss_service_count = idx; | |
1559 #else | |
1560 cw_cnf.ss_service_count = idx; | |
1561 #endif | |
1562 break; | |
1563 | |
1564 case KSD_CMD_PWD: | |
1565 TRACE_EVENT("KSD_CMD_PWD"); | |
1566 TRACE_EVENT_P1("ksStat->ir.rKSPW.ssCd %d", ksStat->ir.rKSPW.ssCd); | |
1567 TRACE_EVENT_P1("ksStat->ir.rKSPW.opCd %d", ksStat->ir.rKSPW.opCd); | |
1568 TRACE_EVENT_P1("ksStat->ir.rKSPW.ssErr %d", ksStat->ir.rKSPW.ssErr); | |
1569 TRACE_EVENT_P1("ksStat->ir.rKSPW.newPwd %s", ksStat->ir.rKSPW.newPwd); | |
1570 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1571 #ifdef FF_MMI_OPTIM | |
1572 pw_cnf = (T_MFW_SS_PW_CNF*)mfwAlloc(sizeof(T_MFW_SS_PW_CNF)); | |
1573 if( NULL != pw_cnf) | |
1574 { | |
1575 pw_cnf->ss_code = ss_cvtSCode(ksStat->ir.rKSPW.ssCd); | |
1576 pw_cnf->ss_category = ss_cvtOCode(ksStat->ir.rKSPW.opCd); | |
1577 pw_cnf->ss_error = ss_cvtErrCode(ksStat->ir.rKSPW.ssErr); | |
1578 | |
1579 strncpy( (char *)pw_cnf->ss_new_pwd, (char *)ksStat->ir.rKSPW.newPwd, | |
1580 MFW_SS_PWD_LEN); | |
1581 } | |
1582 #else | |
1583 pw_cnf.ss_code = (T_MFW_SS_CODES)ss_cvtSCode((T_ACI_KSD_SS)ksStat->ir.rKSPW.ssCd); | |
1584 pw_cnf.ss_category = (T_MFW_SS_CATEGORY)ss_cvtOCode((T_ACI_KSD_OP)ksStat->ir.rKSPW.opCd); | |
1585 pw_cnf.ss_error = (T_MFW_SS_ERROR)ss_cvtErrCode((T_ACI_KSD_ERR)ksStat->ir.rKSPW.ssErr); | |
1586 | |
1587 strncpy( (char *)pw_cnf.ss_new_pwd, (char *)ksStat->ir.rKSPW.newPwd, | |
1588 MFW_SS_PWD_LEN); | |
1589 #endif | |
1590 break; | |
1591 | |
1592 case KSD_CMD_IMEI: | |
1593 TRACE_EVENT("KSD_CMD_IMEI"); | |
1594 TRACE_EVENT_P1("ksStat->ir.rKSIMEI.tac1 %d", ksStat->ir.rKSIMEI.tac1); | |
1595 TRACE_EVENT_P1("ksStat->ir.rKSIMEI.tac2 %d", ksStat->ir.rKSIMEI.tac2); | |
1596 TRACE_EVENT_P1("ksStat->ir.rKSIMEI.tac3 %d", ksStat->ir.rKSIMEI.tac3); | |
1597 TRACE_EVENT_P1("ksStat->ir.rKSIMEI.fac %d", ksStat->ir.rKSIMEI.fac); | |
1598 TRACE_EVENT_P1("ksStat->ir.rKSIMEI.snr1 %d", ksStat->ir.rKSIMEI.snr1); | |
1599 TRACE_EVENT_P1("ksStat->ir.rKSIMEI.snr2 %d", ksStat->ir.rKSIMEI.snr2); | |
1600 TRACE_EVENT_P1("ksStat->ir.rKSIMEI.snr3 %d", ksStat->ir.rKSIMEI.snr3); | |
1601 TRACE_EVENT_P1("ksStat->ir.rKSIMEI.svn %d", ksStat->ir.rKSIMEI.svn); | |
1602 TRACE_EVENT_P1("ksStat->ir.rKSIMEI.cd %d", ksStat->ir.rKSIMEI.cd); | |
1603 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1604 #ifdef FF_MMI_OPTIM | |
1605 imei_info = (T_MFW_IMEI*)mfwAlloc(sizeof(T_MFW_IMEI)); | |
1606 if( NULL != imei_info) | |
1607 { | |
1608 #endif | |
1609 ss_decode_imei(ksStat); | |
1610 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1611 #ifdef FF_MMI_OPTIM | |
1612 imei_info->error = MFW_SS_NO_ERROR; | |
1613 ss_signal(E_SS_IMEI, imei_info); | |
1614 } | |
1615 #else | |
1616 imei_info.error = MFW_SS_NO_ERROR; | |
1617 ss_signal(E_SS_IMEI, &imei_info); | |
1618 #endif | |
1619 break; | |
1620 | |
1621 case KSD_CMD_USSD: | |
1622 TRACE_EVENT("KSD_CMD_USSD"); | |
1623 TRACE_EVENT_P1("ksStat->ir.rKSUS.ussd %s", ksStat->ir.rKSUS.ussd); | |
1624 TRACE_EVENT_P1("ksStat->ir.rKSUS.dcs 0x%02X", ksStat->ir.rKSUS.dcs); | |
1625 TRACE_EVENT_P1("ksStat->ir.rKSUS.mode %d", ksStat->ir.rKSUS.mode); | |
1626 TRACE_EVENT_P1("ksStat->ir.rKSUS.ssErr %d", ksStat->ir.rKSUS.ssErr); | |
1627 memset(&ussd_info, 0, sizeof(ussd_info)); | |
1628 ussd_info.len = strlen((char *)ksStat->ir.rKSUS.ussd); | |
1629 strcpy((char*)ussd_info.ussd, (char *)ksStat->ir.rKSUS.ussd); | |
1630 ussd_info.dcs = MFW_ASCII; | |
1631 ussd_info.error = ss_cvtErrCode((T_ACI_KSD_ERR)ksStat->ir.rKSUS.ssErr); | |
1632 break; | |
1633 | |
1634 default: | |
1635 TRACE_EVENT("default"); | |
1636 break; | |
1637 } | |
1638 } | |
1639 | |
1640 /* | |
1641 +--------------------------------------------------------------------+ | |
1642 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
1643 | STATE : code ROUTINE: ss_command_info | | |
1644 +--------------------------------------------------------------------+ | |
1645 | |
1646 | |
1647 PURPOSE : Notify for send a SS string from ACI | |
1648 | |
1649 */ | |
1650 | |
1651 void ss_command_info(T_ACI_CLOG* cmd) | |
1652 { | |
1653 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1654 // the variable is made local since the scope lies within this function | |
1655 #ifdef FF_MMI_OPTIM | |
1656 T_MFW_SS_RES ss_res; | |
1657 #endif | |
1658 TRACE_FUNCTION("ss_command_info()"); | |
1659 | |
1660 if (cmd->cmdPrm.sCFUN.srcId != CMD_SRC_LCL) | |
1661 return; | |
1662 | |
1663 switch (cmd->atCmd) | |
1664 { | |
1665 case KSD_CMD_CB: | |
1666 ss_res.type = ss_cvtSCode((T_ACI_KSD_SS)cmd->cmdPrm.sKSCB.ssCd); | |
1667 ss_res.category = ss_cvtOCode((T_ACI_KSD_OP)cmd->cmdPrm.sKSCB.opCd); | |
1668 if( cmd->cmdPrm.sKSCB.pwd ) | |
1669 strncpy(ss_res.ppn, (char *)cmd->cmdPrm.sKSCB.pwd, | |
1670 MAX_PWD_LEN); | |
1671 else | |
1672 ss_res.ppn[0] = 0; | |
1673 ss_res.pwd[0] = 0; | |
1674 ss_res.bs = cmd->cmdPrm.sKSCB.bsCd; | |
1675 ss_res.time = 0; | |
1676 ss_signal(E_SS_RES, &ss_res); | |
1677 break; | |
1678 | |
1679 case KSD_CMD_CF: | |
1680 ss_res.type = ss_cvtSCode((T_ACI_KSD_SS)cmd->cmdPrm.sKSCF.ssCd); | |
1681 ss_res.category = ss_cvtOCode((T_ACI_KSD_OP)cmd->cmdPrm.sKSCF.opCd); | |
1682 ss_res.ppn[0] = 0; | |
1683 ss_res.pwd[0] = 0; | |
1684 ss_res.bs = cmd->cmdPrm.sKSCF.bsCd; | |
1685 ss_res.time = cmd->cmdPrm.sKSCF.time; | |
1686 ss_signal(E_SS_RES, &ss_res); | |
1687 break; | |
1688 | |
1689 case KSD_CMD_CW: | |
1690 ss_res.type = SS_CW; | |
1691 ss_res.category = ss_cvtOCode((T_ACI_KSD_OP)cmd->cmdPrm.sKSCW.opCd); | |
1692 ss_res.ppn[0] = 0; | |
1693 ss_res.pwd[0] = 0; | |
1694 ss_res.bs = cmd->cmdPrm.sKSCW.bsCd; | |
1695 ss_res.time = 0; | |
1696 ss_signal(E_SS_RES, &ss_res); | |
1697 break; | |
1698 | |
1699 case KSD_CMD_PWD: | |
1700 switch(cmd->cmdPrm.sKSPW.ssCd) | |
1701 { | |
1702 case KSD_SS_CCBS: | |
1703 case KSD_SS_ALL_CBSS: | |
1704 case KSD_SS_BOC: | |
1705 case KSD_SS_BAOC: | |
1706 case KSD_SS_BOIC: | |
1707 case KSD_SS_BOICXH: | |
1708 case KSD_SS_BIC: | |
1709 case KSD_SS_BAIC: | |
1710 case KSD_SS_BICRM: | |
1711 | |
1712 | |
1713 /*NM 190602*/ | |
1714 case KSD_SS_ALL_SERV : | |
1715 | |
1716 | |
1717 ss_res.type = ss_cvtSCode((T_ACI_KSD_SS)cmd->cmdPrm.sKSPW.ssCd); | |
1718 ss_res.category = SS_REGISTRATION; | |
1719 if( cmd->cmdPrm.sKSPW.oldPwd ) | |
1720 strncpy(ss_res.ppn, (char *)cmd->cmdPrm.sKSPW.oldPwd, | |
1721 MAX_PWD_LEN); | |
1722 else | |
1723 ss_res.ppn[0] = 0; | |
1724 if( cmd->cmdPrm.sKSPW.newPwd ) | |
1725 strncpy(ss_res.pwd, (char *)cmd->cmdPrm.sKSPW.newPwd, | |
1726 MAX_PWD_LEN); | |
1727 else | |
1728 ss_res.pwd[0] = 0; | |
1729 ss_res.bs = 0; | |
1730 ss_res.time = 0; | |
1731 ss_signal(E_SS_RES, &ss_res); | |
1732 break; | |
1733 | |
1734 case KSD_SS_PIN1: | |
1735 pwd_flag = 1; | |
1736 sim_pin_ident(MFW_SIM_PIN1); | |
1737 break; | |
1738 case KSD_SS_PIN2: | |
1739 pwd_flag = 1; | |
1740 sim_pin_ident(MFW_SIM_PIN2); | |
1741 break; | |
1742 } | |
1743 break; | |
1744 | |
1745 case KSD_CMD_UBLK: | |
1746 switch(cmd->cmdPrm.sKSPW.ssCd) | |
1747 { | |
1748 case KSD_SS_PIN1: | |
1749 pwd_flag = 1; | |
1750 sim_pin_ident(MFW_SIM_PUK1); | |
1751 break; | |
1752 case KSD_SS_PIN2: | |
1753 pwd_flag = 1; | |
1754 sim_pin_ident(MFW_SIM_PUK2); | |
1755 break; | |
1756 } | |
1757 break; | |
1758 | |
1759 case KSD_CMD_CL: | |
1760 ss_res.type = ss_cvtSCode((T_ACI_KSD_SS)cmd->cmdPrm.sKSCL.ssCd); | |
1761 ss_res.category = ss_cvtOCode((T_ACI_KSD_OP)cmd->cmdPrm.sKSCL.opCd); | |
1762 ss_res.ppn[0] = 0; | |
1763 ss_res.pwd[0] = 0; | |
1764 ss_res.bs = 0; | |
1765 ss_res.time = 0; | |
1766 ss_signal(E_SS_RES, &ss_res); | |
1767 break; | |
1768 | |
1769 case KSD_CMD_USSD: | |
1770 memset(&ussd_info, 0, sizeof(ussd_info)); | |
1771 if( cmd->cmdPrm.sKSUS.ussd ) | |
1772 { | |
1773 ussd_info.len = strlen((char *)cmd->cmdPrm.sKSUS.ussd); | |
1774 strcpy((char*)ussd_info.ussd, (char *)cmd->cmdPrm.sKSUS.ussd); | |
1775 } | |
1776 else | |
1777 ussd_info.ussd[0] = 0; | |
1778 ussd_info.dcs = MFW_ASCII; | |
1779 //PATCH TB 1509 | |
1780 ss_res.type = SS_USSD; | |
1781 ss_res.category = SS_CTG_UNKNOWN; | |
1782 ss_res.ppn[0] = 0; | |
1783 ss_res.pwd[0] = 0; | |
1784 ss_res.bs = 0; | |
1785 ss_res.time = 0; | |
1786 ss_signal(E_SS_RES, &ss_res); | |
1787 //END PATCH TB | |
1788 break; | |
1789 | |
1790 case AT_CMD_CUSD: | |
1791 memset(&ussd_info, 0, sizeof(ussd_info)); | |
1792 ussd_info.len = cmd->cmdPrm.sCUSD.str->len; | |
1793 memcpy((char*)ussd_info.ussd, cmd->cmdPrm.sCUSD.str->data, cmd->cmdPrm.sCUSD.str->len); | |
1794 ussd_info.dcs = (T_MFW_DCS)cmd->cmdPrm.sCUSD.dcs; | |
1795 /* SPR#CQ3204 -JVJ - USSD call back sent to MMI */ | |
1796 ss_res.type = SS_USSD; | |
1797 ss_res.category = SS_CTG_UNKNOWN; | |
1798 ss_res.ppn[0] = 0; | |
1799 ss_res.pwd[0] = 0; | |
1800 ss_res.bs = 0; | |
1801 ss_res.time = 0; | |
1802 ss_signal(E_SS_RES, &ss_res); | |
1803 /* SPR#CQ3204 -JVJ */ | |
1804 break; | |
1805 default: | |
1806 break; | |
1807 } | |
1808 } | |
1809 | |
1810 /* | |
1811 +--------------------------------------------------------------------+ | |
1812 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
1813 | STATE : code ROUTINE: ss_ok_string | | |
1814 +--------------------------------------------------------------------+ | |
1815 | |
1816 | |
1817 PURPOSE : Send of SS string is successful. | |
1818 | |
1819 */ | |
1820 | |
1821 void ss_ok_string(T_ACI_AT_CMD cmdId) | |
1822 { | |
1823 TRACE_FUNCTION("ss_ok_string()"); | |
1824 | |
1825 switch (cmdId) | |
1826 { | |
1827 case KSD_CMD_CB: | |
1828 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1829 // free the allocated memory once the ss_signal() execution is done | |
1830 #ifdef FF_MMI_OPTIM | |
1831 TRACE_EVENT("KSD_CMD_CB"); | |
1832 if(cb_cnf) | |
1833 { | |
1834 ss_signal(E_SS_CB_CNF, cb_cnf); | |
1835 mfwFree((U8*)cb_cnf, sizeof(T_MFW_SS_CB_CNF)); | |
1836 } | |
1837 #else | |
1838 ss_signal(E_SS_CB_CNF, &cb_cnf); | |
1839 #endif | |
1840 break; | |
1841 case KSD_CMD_CF: | |
1842 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1843 #ifdef FF_MMI_OPTIM | |
1844 TRACE_EVENT("KSD_CMD_CF"); | |
1845 if(cf_cnf) | |
1846 { | |
1847 ss_signal(E_SS_CF_CNF, cf_cnf); | |
1848 mfwFree((U8*)cf_cnf, sizeof(T_MFW_SS_CF_CNF)); | |
1849 } | |
1850 #else | |
1851 ss_signal(E_SS_CF_CNF, &cf_cnf); | |
1852 #endif | |
1853 | |
1854 break; | |
1855 case KSD_CMD_CW: | |
1856 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1857 #ifdef FF_MMI_OPTIM | |
1858 TRACE_EVENT("KSD_CMD_CW"); | |
1859 if(cw_cnf) | |
1860 { | |
1861 ss_signal(E_SS_CW_CNF, cw_cnf); | |
1862 mfwFree((U8*)cw_cnf, sizeof(T_MFW_SS_CW_CNF)); | |
1863 } | |
1864 #else | |
1865 ss_signal(E_SS_CW_CNF, &cw_cnf); | |
1866 #endif | |
1867 break; | |
1868 case KSD_CMD_PWD: | |
1869 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1870 #ifdef FF_MMI_OPTIM | |
1871 TRACE_EVENT("KSD_CMD_PW"); | |
1872 if(pw_cnf) | |
1873 { | |
1874 if (!pwd_flag) | |
1875 ss_signal(E_SS_GET_PW, pw_cnf); | |
1876 mfwFree((U8*)pw_cnf,sizeof(T_MFW_SS_PW_CNF)); | |
1877 } | |
1878 #else | |
1879 if (!pwd_flag) | |
1880 ss_signal(E_SS_GET_PW, &pw_cnf); | |
1881 #endif | |
1882 | |
1883 if (pwd_flag == 1) | |
1884 { | |
1885 pwd_flag = 0; | |
1886 sim_ok_cpinc(); | |
1887 } | |
1888 break; | |
1889 case KSD_CMD_UBLK: | |
1890 sim_ss_unblock(SIM_UBLK_OK, CME_ERR_NotPresent); | |
1891 break; | |
1892 case KSD_CMD_CL: | |
1893 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1894 #ifdef FF_MMI_OPTIM | |
1895 TRACE_EVENT("KSD_CMD_CLI"); | |
1896 if(cli_cnf) | |
1897 { | |
1898 ss_signal(E_SS_CLI_CNF,(void*) cli_cnf); | |
1899 mfwFree((U8*)cli_cnf, sizeof(T_MFW_SS_CLI_CNF)); | |
1900 } | |
1901 #else | |
1902 ss_signal(E_SS_CLI_CNF,&cli_cnf); | |
1903 #endif | |
1904 break; | |
1905 case KSD_CMD_IMEI: | |
1906 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1907 #ifdef FF_MMI_OPTIM | |
1908 if( imei_info) | |
1909 { | |
1910 imei_info->error = MFW_SS_NO_ERROR; | |
1911 ss_signal(E_SS_IMEI, imei_info); | |
1912 mfwFree((U8*)imei_info,sizeof(T_MFW_IMEI)); | |
1913 } | |
1914 #else | |
1915 imei_info.error = MFW_SS_NO_ERROR; | |
1916 ss_signal(E_SS_IMEI, &imei_info); | |
1917 #endif | |
1918 break; | |
1919 default: | |
1920 break; | |
1921 } | |
1922 } | |
1923 | |
1924 | |
1925 /* | |
1926 +--------------------------------------------------------------------+ | |
1927 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
1928 | STATE : code ROUTINE: ss_error_string | | |
1929 +--------------------------------------------------------------------+ | |
1930 | |
1931 | |
1932 PURPOSE : Send of SS string is failed. | |
1933 | |
1934 */ | |
1935 | |
1936 void ss_error_string(T_ACI_AT_CMD cmdId, T_ACI_CME_ERR reason) | |
1937 { | |
1938 TRACE_FUNCTION("ss_error_string()"); | |
1939 | |
1940 switch (cmdId) | |
1941 { | |
1942 case KSD_CMD_CB: | |
1943 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1944 // deallocation occurs either in ok/ error since the response is always is | |
1945 // either one of them | |
1946 #ifdef FF_MMI_OPTIM | |
1947 TRACE_EVENT("KSD_CMD_CB"); | |
1948 if(cb_cnf) | |
1949 { | |
1950 ss_signal(E_SS_CB_CNF, cb_cnf); | |
1951 mfwFree((U8*)cb_cnf,sizeof(T_MFW_SS_CB_CNF)); | |
1952 } | |
1953 #else | |
1954 ss_signal(E_SS_CB_CNF, &cb_cnf); | |
1955 #endif | |
1956 break; | |
1957 case KSD_CMD_CF: | |
1958 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1959 #ifdef FF_MMI_OPTIM | |
1960 TRACE_EVENT("KSD_CMD_CF"); | |
1961 if(cf_cnf) | |
1962 { | |
1963 ss_signal(E_SS_CF_CNF, cf_cnf); | |
1964 mfwFree((U8*)cf_cnf,sizeof(T_MFW_SS_CF_CNF)); | |
1965 TRACE_FUNCTION("memory freed for cf_cnf"); | |
1966 } | |
1967 #else | |
1968 ss_signal(E_SS_CF_CNF, &cf_cnf); | |
1969 #endif | |
1970 break; | |
1971 case KSD_CMD_CW: | |
1972 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1973 #ifdef FF_MMI_OPTIM | |
1974 TRACE_EVENT("KSD_CMD_CW"); | |
1975 if(cw_cnf) | |
1976 { | |
1977 ss_signal(E_SS_CW_CNF, cw_cnf); | |
1978 mfwFree((U8*)E_SS_CW_CNF,sizeof(T_MFW_SS_CW_CNF)); | |
1979 } | |
1980 #else | |
1981 ss_signal(E_SS_CW_CNF, &cw_cnf); | |
1982 #endif | |
1983 break; | |
1984 case KSD_CMD_PWD: | |
1985 // Apr 06 2005 REF: CRR 29989 xpradipg | |
1986 #ifdef FF_MMI_OPTIM | |
1987 TRACE_EVENT("KSD_CMD_PW"); | |
1988 if(pw_cnf) | |
1989 { | |
1990 if (!pwd_flag) | |
1991 ss_signal(E_SS_GET_PW, pw_cnf); | |
1992 mfwFree((U8*)pw_cnf,sizeof(T_MFW_SS_PW_CNF)); | |
1993 } | |
1994 #else | |
1995 if (!pwd_flag) | |
1996 ss_signal(E_SS_GET_PW, &pw_cnf); | |
1997 #endif | |
1998 if (pwd_flag == 1) | |
1999 { | |
2000 pwd_flag = 0; | |
2001 sim_error_cpinc(); | |
2002 } | |
2003 break; | |
2004 case KSD_CMD_UBLK: | |
2005 sim_ss_unblock(SIM_UBLK_ERROR, reason); | |
2006 break; | |
2007 case KSD_CMD_CL: | |
2008 // Apr 06 2005 REF: CRR 29989 xpradipg | |
2009 #ifdef FF_MMI_OPTIM | |
2010 TRACE_EVENT("KSD_CMD_CLI"); | |
2011 if(cli_cnf) | |
2012 { | |
2013 ss_signal(E_SS_CLI_CNF, cli_cnf); | |
2014 mfwFree((U8*)cli_cnf,sizeof(T_MFW_SS_CLI_CNF)); | |
2015 } | |
2016 #else | |
2017 ss_signal(E_SS_CLI_CNF,&cli_cnf); | |
2018 #endif | |
2019 case KSD_CMD_IMEI: | |
2020 // Apr 06 2005 REF: CRR 29989 xpradipg | |
2021 #ifdef FF_MMI_OPTIM | |
2022 if( imei_info) | |
2023 { | |
2024 imei_info->error = MFW_SS_ERROR; | |
2025 ss_signal(E_SS_IMEI, imei_info); | |
2026 mfwFree((U8*)imei_info,sizeof(T_MFW_IMEI)); | |
2027 } | |
2028 #else | |
2029 imei_info.error = MFW_SS_ERROR; | |
2030 ss_signal(E_SS_IMEI, &imei_info); | |
2031 #endif | |
2032 break; | |
2033 default: | |
2034 break; | |
2035 } | |
2036 } | |
2037 | |
2038 | |
2039 /* | |
2040 +--------------------------------------------------------------------+ | |
2041 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
2042 | STATE : code ROUTINE: ss_set_clck | | |
2043 +--------------------------------------------------------------------+ | |
2044 | |
2045 | |
2046 PURPOSE : This function execute the facility lock command. | |
2047 | |
2048 */ | |
2049 | |
2050 T_MFW ss_set_clck(T_ACI_CLCK_FAC fac, | |
2051 T_ACI_CLCK_MOD mode, | |
2052 CHAR *passwd, | |
2053 T_ACI_CLASS class_type, | |
2054 UBYTE modul) | |
2055 { | |
2056 TRACE_EVENT("ss_set_clck()"); | |
2057 | |
2058 clck_flag = modul; | |
2059 | |
2060 if (sAT_PlusCLCK(CMD_SRC_LCL, fac,mode, passwd, class_type) != AT_EXCT) | |
2061 return MFW_SS_FAIL; | |
2062 return MFW_SS_OK; | |
2063 } | |
2064 | |
2065 | |
2066 /* | |
2067 +--------------------------------------------------------------------+ | |
2068 | PROJECT : MMI-Framework (8417) MODULE : MFW_SS | | |
2069 | STATE : code ROUTINE : ss_ok_clck | | |
2070 +--------------------------------------------------------------------+ | |
2071 | |
2072 PURPOSE : The executing of the facility lock command is successful. | |
2073 | |
2074 */ | |
2075 | |
2076 void ss_ok_clck() | |
2077 { | |
2078 TRACE_FUNCTION("ss_ok_clck()"); | |
2079 | |
2080 switch (clck_flag) | |
2081 { | |
2082 case MFW_PHB: | |
2083 phb_ok_clck(); | |
2084 break; | |
2085 case MFW_SIM_CPIND: | |
2086 sim_ok_cpind(); | |
2087 break; | |
2088 case MFW_SIM_CPINE: | |
2089 sim_ok_cpine(); | |
2090 break; | |
2091 } | |
2092 clck_flag = MFW_MODUL_UNKNOWN; | |
2093 } | |
2094 | |
2095 | |
2096 /* | |
2097 +--------------------------------------------------------------------+ | |
2098 | PROJECT : MMI-Framework (8417) MODULE : MFW_SS | | |
2099 | STATE : code ROUTINE : ss_error_clck | | |
2100 +--------------------------------------------------------------------+ | |
2101 | |
2102 PURPOSE : The executing of the facility lock command is failed. | |
2103 | |
2104 */ | |
2105 | |
2106 void ss_error_clck() | |
2107 { | |
2108 TRACE_FUNCTION("ss_error_clck()"); | |
2109 | |
2110 switch (clck_flag) | |
2111 { | |
2112 case MFW_PHB: | |
2113 phb_error_clck(); | |
2114 break; | |
2115 case MFW_SIM_CPIND: | |
2116 sim_error_cpind(); | |
2117 break; | |
2118 case MFW_SIM_CPINE: | |
2119 sim_error_cpine(); | |
2120 break; | |
2121 } | |
2122 clck_flag = MFW_MODUL_UNKNOWN; | |
2123 } | |
2124 | |
2125 | |
2126 /* | |
2127 +--------------------------------------------------------------------+ | |
2128 | PROJECT: MMI-Framework (8417) MODULE: MFW_DMY | | |
2129 | STATE : code ROUTINE: ss_send_ussd | | |
2130 +--------------------------------------------------------------------+ | |
2131 | |
2132 | |
2133 PURPOSE : Send USSD string. | |
2134 Note: ASCII is not allowed to use. | |
2135 | |
2136 */ | |
2137 | |
2138 T_MFW ss_send_ussd(T_MFW_SS_USSD *ussd_info) | |
2139 { | |
2140 T_ACI_USSD_DATA str; | |
2141 T_ACI_RETURN res; | |
2142 | |
2143 TRACE_FUNCTION("ss_send_ussd()"); | |
2144 | |
2145 if (!ussd_info->len OR !ussd_info->ussd) | |
2146 return MFW_SS_FAIL; | |
2147 | |
2148 if (ussd_info->dcs == MFW_ASCII) | |
2149 return MFW_SS_FAIL; | |
2150 | |
2151 if (ussd_info->len > MAX_USSD_LEN) | |
2152 { | |
2153 str.len = MAX_USSD_LEN; | |
2154 memcpy(str.data, ussd_info->ussd, MAX_USSD_LEN); | |
2155 } | |
2156 else | |
2157 { | |
2158 str.len = ussd_info->len; | |
2159 memcpy(str.data, ussd_info->ussd, ussd_info->len); | |
2160 } | |
2161 | |
2162 res = sAT_PlusCUSD(CMD_SRC_LCL, &str, (SHORT)ussd_info->dcs); | |
2163 if ((res != AT_EXCT) AND (res != AT_CMPL)) | |
2164 return MFW_SS_FAIL; | |
2165 | |
2166 return MFW_SS_OK; | |
2167 } | |
2168 | |
2169 | |
2170 /* | |
2171 +--------------------------------------------------------------------+ | |
2172 | PROJECT: MMI-Framework (8417) MODULE: MFW_DMY | | |
2173 | STATE : code ROUTINE: rAT_PlusCUSD | | |
2174 +--------------------------------------------------------------------+ | |
2175 | |
2176 | |
2177 PURPOSE : Notify or response for USSD from ACI | |
2178 | |
2179 */ | |
2180 | |
2181 void rAT_PlusCUSD(T_ACI_CUSD_MOD m, T_ACI_USSD_DATA *ussd, SHORT dcs) | |
2182 { | |
2183 TRACE_FUNCTION("rAT_PlusCUSD()"); | |
2184 //Dec 16, 2005 OMAPS00053316 x0018858 | |
2185 //Added the NullCheck to ensure that we dont access the elements when the pointer is NULL. | |
2186 //Begin OMAPS00053316 | |
2187 if(ussd != NULL) | |
2188 { | |
2189 ussd_info.len = ussd->len; | |
2190 memcpy(ussd_info.ussd, ussd->data, sizeof(ussd_info.ussd)); | |
2191 | |
2192 } | |
2193 else | |
2194 { | |
2195 ussd_info.len = 0; | |
2196 memset(ussd_info.ussd, 0x00, sizeof(ussd_info.ussd)); | |
2197 } | |
2198 //End OMAPS00053316 | |
2199 ussd_info.dcs = (T_MFW_DCS)dcs; | |
2200 ussd_info.error = MFW_SS_NO_ERROR; | |
2201 | |
2202 if (m == CUSD_MOD_YesActReq) | |
2203 ss_signal(E_SS_USSD_REQ, &ussd_info); | |
2204 if (m == CUSD_MOD_NoActReq) | |
2205 ss_signal(E_SS_USSD_CNF, &ussd_info); | |
2206 } | |
2207 | |
2208 | |
2209 /* | |
2210 +--------------------------------------------------------------------+ | |
2211 | PROJECT: MMI-Framework (8417) MODULE: MFW_DMY | | |
2212 | STATE : code ROUTINE: ss_ok_ussd | | |
2213 +--------------------------------------------------------------------+ | |
2214 | |
2215 | |
2216 PURPOSE : USSD process is successful. | |
2217 | |
2218 */ | |
2219 | |
2220 void ss_ok_ussd(T_ACI_AT_CMD cmdId) | |
2221 { | |
2222 TRACE_FUNCTION("ss_ok_ussd()"); | |
2223 | |
2224 if (cmdId == KSD_CMD_USSD) | |
2225 { | |
2226 ussd_info.error = MFW_SS_NO_ERROR; | |
2227 ss_signal(E_SS_USSD_CNF, &ussd_info); | |
2228 } | |
2229 } | |
2230 | |
2231 | |
2232 /* | |
2233 +--------------------------------------------------------------------+ | |
2234 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
2235 | STATE : code ROUTINE: ss_error_ussd | | |
2236 +--------------------------------------------------------------------+ | |
2237 | |
2238 | |
2239 PURPOSE : USSD process is failed. | |
2240 | |
2241 */ | |
2242 | |
2243 void ss_error_ussd(T_ACI_AT_CMD cmdId, T_ACI_CME_ERR reason) | |
2244 { | |
2245 TRACE_FUNCTION("ss_error_ussd()"); | |
2246 | |
2247 // ussd_info.error = ss_cvtErrCode(reason); | |
2248 ss_signal(E_SS_USSD_CNF, &ussd_info); | |
2249 } | |
2250 | |
2251 /* | |
2252 +---------------------------------------------------------------------+ | |
2253 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
2254 | STATE : code ROUTINE: ss_abort_transaction | | |
2255 +---------------------------------------------------------------------+ | |
2256 | |
2257 | |
2258 PURPOSE : Abort executing of SS transaction | |
2259 | |
2260 */ | |
2261 | |
2262 T_MFW ss_abort_transaction(void) | |
2263 { | |
2264 TRACE_FUNCTION("ss_abort_transaction()"); | |
2265 | |
2266 if (sAT_Abort(CMD_SRC_LCL, AT_CMD_CUSD) EQ AT_CMPL) | |
2267 return TRUE; | |
2268 else | |
2269 { | |
2270 if (sAT_Abort(CMD_SRC_LCL, AT_CMD_D) EQ AT_CMPL) | |
2271 return TRUE; | |
2272 } | |
2273 return FALSE; | |
2274 } | |
2275 | |
2276 | |
2277 /* | |
2278 +--------------------------------------------------------------------+ | |
2279 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
2280 | STATE : code ROUTINE: ss_set_cug | | |
2281 +--------------------------------------------------------------------+ | |
2282 | |
2283 | |
2284 PURPOSE : set parameter of close user group | |
2285 | |
2286 */ | |
2287 T_MFW_SS_RETURN ss_set_cug (T_MFW_SS_CUG_PARA *cug_param) | |
2288 { | |
2289 T_ACI_CCUG_MOD cug_mode = CCUG_MOD_NotPresent; | |
2290 T_ACI_CCUG_IDX cug_index = CCUG_IDX_NotPresent; | |
2291 T_ACI_CCUG_INFO cug_info = CCUG_INFO_NotPresent; | |
2292 | |
2293 TRACE_FUNCTION("ss_set_cug()"); | |
2294 | |
2295 /* check cug mode */ | |
2296 switch(cug_param->mode) | |
2297 { | |
2298 case MFW_SS_CUG_TMP_DISABLE: | |
2299 cug_mode = CCUG_MOD_DisableTmp; | |
2300 break; | |
2301 case MFW_SS_CUG_TMP_ENABLE: | |
2302 cug_mode = CCUG_MOD_EnableTmp; /* enable to control cug info */ | |
2303 break; | |
2304 default: /* ACI keep last valid value */ | |
2305 break; | |
2306 } | |
2307 /* check cug index */ | |
2308 switch(cug_param->index) | |
2309 { | |
2310 case MFW_SS_CUG_INDEX0: | |
2311 cug_index = CCUG_IDX_0; | |
2312 break; | |
2313 case MFW_SS_CUG_INDEX1: | |
2314 cug_index = CCUG_IDX_1; | |
2315 break; | |
2316 case MFW_SS_CUG_INDEX2: | |
2317 cug_index = CCUG_IDX_2; | |
2318 break; | |
2319 case MFW_SS_CUG_INDEX3: | |
2320 cug_index = CCUG_IDX_3; | |
2321 break; | |
2322 case MFW_SS_CUG_INDEX4: | |
2323 cug_index = CCUG_IDX_4; | |
2324 break; | |
2325 case MFW_SS_CUG_INDEX5: | |
2326 cug_index = CCUG_IDX_5; | |
2327 break; | |
2328 case MFW_SS_CUG_INDEX6: | |
2329 cug_index = CCUG_IDX_6; | |
2330 break; | |
2331 case MFW_SS_CUG_INDEX7: | |
2332 cug_index = CCUG_IDX_7; | |
2333 break; | |
2334 case MFW_SS_CUG_INDEX8: | |
2335 cug_index = CCUG_IDX_8; | |
2336 break; | |
2337 case MFW_SS_CUG_INDEX9: | |
2338 cug_index = CCUG_IDX_9; | |
2339 break; | |
2340 case MFW_SS_CUG_NO_INDEX: | |
2341 cug_index = CCUG_IDX_No; /* preferred CUG taken from subscriber data */ | |
2342 break; | |
2343 default: /* ACI keep last valid value */ | |
2344 break; | |
2345 } | |
2346 | |
2347 /* check cug info */ | |
2348 switch(cug_param->info) | |
2349 { | |
2350 case MFW_SS_CUG_SUPP_OA: | |
2351 cug_info = CCUG_INFO_SuppOa; /* suppress outgoing access */ | |
2352 break; | |
2353 case MFW_SS_CUG_SUPP_PREF: | |
2354 cug_info = CCUG_INFO_SuppPrefCug; /* suppress preferential closed user group */ | |
2355 break; | |
2356 case MFW_SS_CUG_SUPP_BOTH: | |
2357 cug_info = CCUG_INFO_SuppBoth; /* suppress outgoing access and preferential cug */ | |
2358 break; | |
2359 case MFW_SS_CUG_INFO_NO: /* no cug info */ | |
2360 cug_info = CCUG_INFO_No; | |
2361 break; | |
2362 default: /* ACI keep last valid value */ | |
2363 break; | |
2364 } | |
2365 if(sAT_PlusCCUG(CMD_SRC_LCL,cug_mode,cug_index,cug_info) EQ AT_CMPL) /* set in ACI cug parameters */ | |
2366 return MFW_SS_OK; | |
2367 else | |
2368 return MFW_SS_FAIL; | |
2369 } | |
2370 | |
2371 /* | |
2372 +--------------------------------------------------------------------+ | |
2373 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
2374 | STATE : code ROUTINE: ss_get_cug | | |
2375 +--------------------------------------------------------------------+ | |
2376 | |
2377 | |
2378 PURPOSE : get parameter of close user group | |
2379 | |
2380 */ | |
2381 | |
2382 T_MFW_SS_RETURN ss_get_cug(T_MFW_SS_CUG_PARA *cug_param) | |
2383 { | |
2384 T_ACI_CCUG_MOD cug_mode; | |
2385 T_ACI_CCUG_IDX cug_index; | |
2386 T_ACI_CCUG_INFO cug_info; | |
2387 | |
2388 cug_param->mode = MFW_SS_CUG_MODE_Not_Present; | |
2389 cug_param->index = MFW_SS_CUG_INDEX_Not_Present; | |
2390 cug_param->info = MFW_SS_CUG_INFO_Not_Present; | |
2391 | |
2392 TRACE_FUNCTION("ss_get_cug()"); | |
2393 | |
2394 if(qAT_PlusCCUG(CMD_SRC_LCL,&cug_mode,&cug_index,&cug_info) NEQ AT_CMPL) /* get cug parameters of ACI */ | |
2395 return MFW_SS_FAIL; | |
2396 else | |
2397 { | |
2398 cug_param->mode = (T_MFW_SS_CUG_MODE)cug_mode; | |
2399 cug_param->index = (T_MFW_SS_CUG_INDEX)cug_index; | |
2400 cug_param->info = (T_MFW_SS_CUG_INFO)cug_info; | |
2401 return MFW_SS_OK; | |
2402 } | |
2403 } | |
2404 //PATCH TB 1309 | |
2405 /* | |
2406 +--------------------------------------------------------------------+ | |
2407 | PROJECT: MMI-Framework (8417) MODULE: MFW_SS | | |
2408 | STATE : code ROUTINE: ss_command_abort | | |
2409 +--------------------------------------------------------------------+ | |
2410 | |
2411 | |
2412 PURPOSE : | |
2413 | |
2414 */ | |
2415 T_MFW ss_command_abort(void) | |
2416 { | |
2417 TRACE_FUNCTION ("ss_command_abort()"); | |
2418 | |
2419 // Abort SS transaction. | |
2420 // Any SS AT_CMD will clear all SS (any) transaction(s) | |
2421 if (sAT_Abort(CMD_SRC_LCL, AT_CMD_CUSD) == AT_CMPL) | |
2422 return TRUE; | |
2423 else | |
2424 return FALSE; | |
2425 } | |
2426 //END PATCH TB | |
2427 //CQ-16432 start | |
2428 void ss_sat_passwdReqd(T_ACI_AT_CMD cmdId, T_ACI_CME_ERR err) | |
2429 { | |
2430 TRACE_FUNCTION("ss_sat_passwdReqd"); | |
2431 ss_signal(E_SS_SAT_CPWD,&cmdId); | |
2432 return; | |
2433 } | |
2434 //CQ-16432 end |