comparison src/ui/bmi/mmiCPHS.c @ 92:c0052fe355d3

src/ui/bmi/*.[ch]: rm trailing white space
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 08 Nov 2020 06:39:16 +0000
parents 67bfe9f274f6
children fbe284e160c1
comparison
equal deleted inserted replaced
91:c3d28a37caad 92:c0052fe355d3
1 /******************************************************************************* 1 /*******************************************************************************
2 2
3 CONDAT (UK) 3 CONDAT (UK)
4 4
5 ******************************************************************************** 5 ********************************************************************************
6 6
7 This software product is the property of Condat (UK) Ltd and may not be 7 This software product is the property of Condat (UK) Ltd and may not be
8 disclosed to any third party without the express permission of the owner. 8 disclosed to any third party without the express permission of the owner.
9 9
10 ******************************************************************************** 10 ********************************************************************************
11 11
12 $Project name: Basic MMI 12 $Project name: Basic MMI
13 $Project code: BMI (6349) 13 $Project code: BMI (6349)
14 $Module: CPHS 14 $Module: CPHS
15 $File: MmiCPHS.c 15 $File: MmiCPHS.c
16 $Revision: 1.0 16 $Revision: 1.0
17 17
18 $Author: Condat(UK) 18 $Author: Condat(UK)
19 $Date: 25/01/02 19 $Date: 25/01/02
20 20
21 ******************************************************************************** 21 ********************************************************************************
22 22
23 Description 23 Description
24 24
25 This module provides the CPHS functionality 25 This module provides the CPHS functionality
26 26
27 27
28 ******************************************************************************** 28 ********************************************************************************
29 $History: MmiCall.c 29 $History: MmiCall.c
30 Nov 27, 2006 OMAPS00098359 a0393213(R.Prabakar) 30 Nov 27, 2006 OMAPS00098359 a0393213(R.Prabakar)
31 Description: CPHS 4.2 : Call Divert doesn't work properly for Line 2 31 Description: CPHS 4.2 : Call Divert doesn't work properly for Line 2
32 32
33 Oct 11, 2006 REF:OMAPS00098287 x0039928 33 Oct 11, 2006 REF:OMAPS00098287 x0039928
34 Description : CPHS 4.2: MMI variable als_status is not updated proplery with the SIM contents. 34 Description : CPHS 4.2: MMI variable als_status is not updated proplery with the SIM contents.
35 Solution : als_status update is deffered until the idle screen is displayed. 35 Solution : als_status update is deffered until the idle screen is displayed.
36 36
37 May 30, 2006 REF:OMAPS00079650 a0393213 (R.Prabakar) 37 May 30, 2006 REF:OMAPS00079650 a0393213 (R.Prabakar)
38 Description : CPHS Call Forwarding feature implementation 38 Description : CPHS Call Forwarding feature implementation
39 Solution : As part of this implementation, E_CPHS_SET_DV_STAT and E_CPHS_GET_DV_STAT in cphs_mfw_cb() 39 Solution : As part of this implementation, E_CPHS_SET_DV_STAT and E_CPHS_GET_DV_STAT in cphs_mfw_cb()
40 are modified 40 are modified
41 41
42 May 26, 2006 ER: OMAPS00079607 x0012849 :Jagannatha M 42 May 26, 2006 ER: OMAPS00079607 x0012849 :Jagannatha M
43 Description: CPHS: Display 'charge/Timers' menu based on AOC ( Advice of charge ) and support info numbers. 43 Description: CPHS: Display 'charge/Timers' menu based on AOC ( Advice of charge ) and support info numbers.
44 Solution:Made the following changes 44 Solution:Made the following changes
45 1. Aoc_flag variable is defined and it will be set based on the CSP information. 45 1. Aoc_flag variable is defined and it will be set based on the CSP information.
46 2. New function info_num_msg_cb() added to support info numbers. 46 2. New function info_num_msg_cb() added to support info numbers.
47 47
48 May 30, 2006 DR: OMAPS00070657 x0pleela 48 May 30, 2006 DR: OMAPS00070657 x0pleela
49 Description: CPHS feature on Locosto-Lite 49 Description: CPHS feature on Locosto-Lite
50 Solution: For ALS feature, 50 Solution: For ALS feature,
51 a) Defined a new macro "MAX_LINE_NAME_LEN" 51 a) Defined a new macro "MAX_LINE_NAME_LEN"
52 b) Defined new structure "T_ALS_DATA" for editing Line 1 and 2 names 52 b) Defined new structure "T_ALS_DATA" for editing Line 1 and 2 names
53 c) Defined new flag "Als_flag" to store the staus of ALS bit from CSP data 53 c) Defined new flag "Als_flag" to store the staus of ALS bit from CSP data
54 d) Added new functions cphs_Line_Edit_cb(), cphs_edit_line_exec_cb(), 54 d) Added new functions cphs_Line_Edit_cb(), cphs_edit_line_exec_cb(),
55 cphs_edit_line_create(), cphs_edit_line1(), cphs_edit_line2(), 55 cphs_edit_line_create(), cphs_edit_line1(), cphs_edit_line2(),
56 mmi_cphs_get_als_info(), mmi_cphs_get_als_info(), mmi_cphs_set_als_value(), 56 mmi_cphs_get_als_info(), mmi_cphs_get_als_info(), mmi_cphs_set_als_value(),
57 mmi_cphs_get_als_value(), mmi_get_als_selectedLine() 57 mmi_cphs_get_als_value(), mmi_get_als_selectedLine()
58 58
59 Jun 14, 2005 REF: MMI-FIX-30439 x0018858 59 Jun 14, 2005 REF: MMI-FIX-30439 x0018858
60 Description: The homezone/cityzone tags were not being displayed properly. 60 Description: The homezone/cityzone tags were not being displayed properly.
61 Solution: Modified to save the tags properly in caches and also made the 61 Solution: Modified to save the tags properly in caches and also made the
62 appropriate modifications to update the same properly during mobility. 62 appropriate modifications to update the same properly during mobility.
63 63
64 Aug 16, 2004 REF: CRR 24323 Deepa M.D 64 Aug 16, 2004 REF: CRR 24323 Deepa M.D
65 Bug:Clenup of sprintf used for tracing 65 Bug:Clenup of sprintf used for tracing
66 Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX 66 Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX
67 67
68 Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) 68 Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken)
69 Solution: The CF state is maintained in flash. During bootup the CF icon in the idle screen 69 Solution: The CF state is maintained in flash. During bootup the CF icon in the idle screen
70 is displayed depending upon its state in the ffs 70 is displayed depending upon its state in the ffs
71 71
72 72
73 // May 31, 2004 REF: CRR 17291 xvilliva 73 // May 31, 2004 REF: CRR 17291 xvilliva
74 // Bug: After power cycle the setting of the used line which have been made 74 // Bug: After power cycle the setting of the used line which have been made
75 // from the BMI is lost. 75 // from the BMI is lost.
76 // Fix: 1.The global g_pin2 is defined here. 76 // Fix: 1.The global g_pin2 is defined here.
77 // 2. sAT_PlusCLCK() is called while locking and unlocking ALS. 77 // 2. sAT_PlusCLCK() is called while locking and unlocking ALS.
78 // 3. ALSPresent() is modified to call tAT_PercentALS() & qAT_PercentALS(). 78 // 3. ALSPresent() is modified to call tAT_PercentALS() & qAT_PercentALS().
79 // NOTE:- ALSPresent() was giving faulty status earlier. 79 // NOTE:- ALSPresent() was giving faulty status earlier.
80 80
81 81
82 25/01/02 Original Condat(UK) BMI version. (MC) 82 25/01/02 Original Condat(UK) BMI version. (MC)
83 83
84 $End 84 $End
85 85
86 *******************************************************************************/ 86 *******************************************************************************/
87 87
88 88
89 /****************************************************************************** 89 /******************************************************************************
90 90
91 Include Files 91 Include Files
92 92
93 *******************************************************************************/ 93 *******************************************************************************/
94 94
95 /* includes */ 95 /* includes */
96 #include <string.h> 96 #include <string.h>
97 #include <stdio.h> 97 #include <stdio.h>
160 #include "mmiSmsMenu.h" 160 #include "mmiSmsMenu.h"
161 #include "Mmiicons.h" 161 #include "Mmiicons.h"
162 #include "mmiColours.h" 162 #include "mmiColours.h"
163 163
164 #include "MmiCPHS.h" 164 #include "MmiCPHS.h"
165 // Jun 23 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) 165 // Jun 23 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken)
166 #include "mfw_ffs.h" 166 #include "mfw_ffs.h"
167 /* SPR759 - SH */ 167 /* SPR759 - SH */
168 #ifdef MMI_HOMEZONE_ENABLED 168 #ifdef MMI_HOMEZONE_ENABLED
169 #include "MmiHomezone.h" 169 #include "MmiHomezone.h"
170 #endif 170 #endif
171 171
172 /* 30th May,2006 OMAPS00079650 a0393213 (R.Prabakar) 172 /* 30th May,2006 OMAPS00079650 a0393213 (R.Prabakar)
173 Description : CPHS Call Forwarding feature implementation*/ 173 Description : CPHS Call Forwarding feature implementation*/
174 174
175 #include "MmiServices.h" 175 #include "MmiServices.h"
176 //x0pleela 08 June, 2006 DR:OMAPS00079607 176 //x0pleela 08 June, 2006 DR:OMAPS00079607
177 //Including this header file to get the definition of getRoamingStatus() 177 //Including this header file to get the definition of getRoamingStatus()
178 #ifdef FF_CPHS 178 #ifdef FF_CPHS
179 #include "MmiNetwork.h" 179 #include "MmiNetwork.h"
180 #endif 180 #endif
181 181
182 182
183 183
184 /****************************************************************************** 184 /******************************************************************************
185 185
186 Definitions 186 Definitions
187 187
188 *******************************************************************************/ 188 *******************************************************************************/
189 //#define CPHS_PROV_TEST /*Test to bypass the reading of the CPHS field from the SIM card*/ 189 //#define CPHS_PROV_TEST /*Test to bypass the reading of the CPHS field from the SIM card*/
190 char g_pin2[MAX_PIN+1];//xvilliva SPR17291 190 char g_pin2[MAX_PIN+1];//xvilliva SPR17291
191 191
192 typedef enum 192 typedef enum
193 193
194 194
195 { 195 {
196 INFO_NUM_LIST, 196 INFO_NUM_LIST,
197 MAILBOX_LIST, 197 MAILBOX_LIST,
198 MAILBOX_LIST_CALL 198 MAILBOX_LIST_CALL
199 } 199 }
200 T_MENU_TYPE; 200 T_MENU_TYPE;
201 201
202 202
203 static MfwMnuAttr InfoNum_menuAttrib = 203 static MfwMnuAttr InfoNum_menuAttrib =
204 { 204 {
205 &melody_menuArea, 205 &melody_menuArea,
206 MNU_LEFT | MNU_LIST | MNU_CUR_LINE, /* centered page menu */ 206 MNU_LEFT | MNU_LIST | MNU_CUR_LINE, /* centered page menu */
209 0, /* number of items */ 209 0, /* number of items */
210 COLOUR_LIST_XX, TxtNull, NULL, MNUATTRSPARE 210 COLOUR_LIST_XX, TxtNull, NULL, MNUATTRSPARE
211 211
212 }; 212 };
213 213
214 typedef struct 214 typedef struct
215 { 215 {
216 /* administrative data */ 216 /* administrative data */
217 217
218 T_MMI_CONTROL mmi_control; 218 T_MMI_CONTROL mmi_control;
219 T_MFW_HND win; 219 T_MFW_HND win;
249 T_MFW_HND melody_handler; /* MFW sms handler */ 249 T_MFW_HND melody_handler; /* MFW sms handler */
250 unsigned char local_status; 250 unsigned char local_status;
251 ListMenuData * menu_list_data; 251 ListMenuData * menu_list_data;
252 } T_INFO_NUM_INFO; 252 } T_INFO_NUM_INFO;
253 253
254 #ifdef FF_CPHS_REL4 254 #ifdef FF_CPHS_REL4
255 typedef struct 255 typedef struct
256 { 256 {
257 T_MMI_CONTROL mmi_control; 257 T_MMI_CONTROL mmi_control;
258 T_MFW_HND msp_win; /* MFW win handler */ 258 T_MFW_HND msp_win; /* MFW win handler */
259 T_MFW_HND parent; 259 T_MFW_HND parent;
272 272
273 //x0pleela 23 May, 2006 DR: OMAPS00070657 273 //x0pleela 23 May, 2006 DR: OMAPS00070657
274 #ifdef FF_CPHS 274 #ifdef FF_CPHS
275 #define MAX_LINE_NAME_LEN (20+1) 275 #define MAX_LINE_NAME_LEN (20+1)
276 276
277 typedef struct 277 typedef struct
278 { 278 {
279 /* administrative data */ 279 /* administrative data */
280 280
281 T_MMI_CONTROL mmi_control; 281 T_MMI_CONTROL mmi_control;
282 T_MFW_HND win; 282 T_MFW_HND win;
318 318
319 319
320 320
321 321
322 /****************************************************************************** 322 /******************************************************************************
323 323
324 Static Global variables 324 Static Global variables
325 325
326 *******************************************************************************/ 326 *******************************************************************************/
327 327
328 static T_MFW_HND cphs_wait_dialog_win = NULL; 328 static T_MFW_HND cphs_wait_dialog_win = NULL;
329 static T_DISPLAY_DATA mmi_cphs_wait_dialog_data = {0}; 329 static T_DISPLAY_DATA mmi_cphs_wait_dialog_data = {0};
330 static T_MFW_CPHS_ENTRY cphs_voicemail_num; 330 static T_MFW_CPHS_ENTRY cphs_voicemail_num;
351 static USHORT info_num_index; 351 static USHORT info_num_index;
352 352
353 static T_MENU_TYPE type_of_list = INFO_NUM_LIST; 353 static T_MENU_TYPE type_of_list = INFO_NUM_LIST;
354 354
355 /****************************************************************************** 355 /******************************************************************************
356 356
357 Function Prototypes 357 Function Prototypes
358 358
359 *******************************************************************************/ 359 *******************************************************************************/
360 int InfoNumbers2(void); // RAVI 360 int InfoNumbers2(void); // RAVI
361 361
362 int show_cphs_mb_number(T_MFW_CPHS_ENTRY* mb_number); 362 int show_cphs_mb_number(T_MFW_CPHS_ENTRY* mb_number);
363 static void mailbox_edit_cb( T_MFW_HND win, USHORT Identifier,UBYTE reason); 363 static void mailbox_edit_cb( T_MFW_HND win, USHORT Identifier,UBYTE reason);
388 388
389 389
390 390
391 391
392 /****************************************************************************** 392 /******************************************************************************
393 393
394 Public functions 394 Public functions
395 395
396 *******************************************************************************/ 396 *******************************************************************************/
397 /******************************************************************************* 397 /*******************************************************************************
398 398
399 $Function: mmi_cphs_init() 399 $Function: mmi_cphs_init()
400 400
401 $Description: initiatialise cphs module 401 $Description: initiatialise cphs module
402 402
403 $Returns: mfw handle 403 $Returns: mfw handle
404 404
405 $Arguments: none 405 $Arguments: none
406 406
407 *******************************************************************************/ 407 *******************************************************************************/
408 T_MFW_HND mmi_cphs_init() 408 T_MFW_HND mmi_cphs_init()
409 { 409 {
410 T_MFW_HND status; 410 T_MFW_HND status;
411 411
412 TRACE_FUNCTION("mmi_cphs_init()"); 412 TRACE_FUNCTION("mmi_cphs_init()");
413 cphs_init(); //initialise MFW CPHS module 413 cphs_init(); //initialise MFW CPHS module
414 414
415 status = cphs_create(NULL, 0xFFFFF, cphs_mfw_cb); //create handler for MFW CPHS EVENTS 415 status = cphs_create(NULL, 0xFFFFF, cphs_mfw_cb); //create handler for MFW CPHS EVENTS
416 416
417 info_num_level = 0; 417 info_num_level = 0;
418 info_num_index = 1; 418 info_num_index = 1;
419 419
420 420
421 #ifndef FF_CPHS_REL4 421 #ifndef FF_CPHS_REL4
431 431
432 return status; 432 return status;
433 } 433 }
434 434
435 void mmi_cphs_refresh() 435 void mmi_cphs_refresh()
436 { 436 {
437 //x0pleela 02 June, 2006 DR: OMAPS00079688 437 //x0pleela 02 June, 2006 DR: OMAPS00079688
438 //Initialising CPHS 438 //Initialising CPHS
439 #ifdef FF_CPHS 439 #ifdef FF_CPHS
440 if (sAT_PercentCPHS(CMD_SRC_LCL,1) /* 1 => ACI_CPHS_INIT */ 440 if (sAT_PercentCPHS(CMD_SRC_LCL,1) /* 1 => ACI_CPHS_INIT */
441 NEQ AT_EXCT) 441 NEQ AT_EXCT)
443 TRACE_ERROR("Abnormal error Not able to turn on CPHS in ACI"); 443 TRACE_ERROR("Abnormal error Not able to turn on CPHS in ACI");
444 } 444 }
445 #endif 445 #endif
446 cphs_support_check(); //check if cphs supported 446 cphs_support_check(); //check if cphs supported
447 /*retrieval of other values set off by callback function cphs_mfw_cb 447 /*retrieval of other values set off by callback function cphs_mfw_cb
448 so when the CPHS status is retrieved, the operator name is then requested and 448 so when the CPHS status is retrieved, the operator name is then requested and
449 when it has returned, then the CSP is requested etc etec */ 449 when it has returned, then the CSP is requested etc etec */
450 450
451 } 451 }
452 /******************************************************************************* 452 /*******************************************************************************
453 453
454 $Function: cphs_E_plus_ALS_supported 454 $Function: cphs_E_plus_ALS_supported
455 455
456 $Description: returns TRUE if SIM is from E-plus, FALSE otherwise 456 $Description: returns TRUE if SIM is from E-plus, FALSE otherwise
457 457
458 $Returns: status BOOL 458 $Returns: status BOOL
459 459
460 $Arguments: none 460 $Arguments: none
461 461
462 *******************************************************************************/ 462 *******************************************************************************/
463 BOOL cphs_E_plus_ALS_supported() 463 BOOL cphs_E_plus_ALS_supported()
464 { char IMSI[17]; 464 { char IMSI[17];
465 char MNC_MCC[6]; 465 char MNC_MCC[6];
466 char E_plus_MNC_MCC[] = "26203"; 466 char E_plus_MNC_MCC[] = "26203";
467 int i=0; 467 int i=0;
468 T_ACI_RETURN result; 468 T_ACI_RETURN result;
469 // char debug[40]; // RAVI 469 // char debug[40]; // RAVI
470 470
471 result = qAT_PlusCIMI(CMD_SRC_LCL, IMSI); 471 result = qAT_PlusCIMI(CMD_SRC_LCL, IMSI);
472 while (result != AT_CMPL && i < 5) 472 while (result != AT_CMPL && i < 5)
473 { 473 {
474 i++; 474 i++;
475 } 475 }
476 476
477 strncpy(MNC_MCC, IMSI, 5); 477 strncpy(MNC_MCC, IMSI, 5);
478 MNC_MCC[5] =0;//terminate string 478 MNC_MCC[5] =0;//terminate string
479 TRACE_EVENT("E-plus IMSI?"); 479 TRACE_EVENT("E-plus IMSI?");
480 TRACE_EVENT(MNC_MCC); 480 TRACE_EVENT(MNC_MCC);
481 if (!strncmp(E_plus_MNC_MCC, MNC_MCC, 5)) //if e-plus IMSI 481 if (!strncmp(E_plus_MNC_MCC, MNC_MCC, 5)) //if e-plus IMSI
482 { 482 {
483 return TRUE; 483 return TRUE;
484 484
485 } 485 }
486 else 486 else
487 { TRACE_EVENT("Not e-plus IMSI"); 487 { TRACE_EVENT("Not e-plus IMSI");
492 /******************************************************************************* 492 /*******************************************************************************
493 493
494 $Function: cphs_als_status 494 $Function: cphs_als_status
495 495
496 $Description: display which ALS line is enabled 496 $Description: display which ALS line is enabled
497 497
498 $Returns: status int 498 $Returns: status int
499 499
500 $Arguments: menu, tag (not used) 500 $Arguments: menu, tag (not used)
501 501
502 *******************************************************************************/ 502 *******************************************************************************/
503 int cphs_als_status(MfwMnu* m, MfwMnuItem* i) 503 int cphs_als_status(MfwMnu* m, MfwMnuItem* i)
504 { T_MFW_HND parent = mfwParent( mfw_header()); 504 { T_MFW_HND parent = mfwParent( mfw_header());
505 UBYTE line; 505 UBYTE line;
506 line = GetAlsLine(); 506 line = GetAlsLine();
530 530
531 /******************************************************************************* 531 /*******************************************************************************
532 532
533 $Function: cphs_lock_als 533 $Function: cphs_lock_als
534 534
535 $Description: Lock ALS Line Selection from menu 535 $Description: Lock ALS Line Selection from menu
536 536
537 $Returns: status int 537 $Returns: status int
538 538
539 $Arguments: menu, tag (not used) 539 $Arguments: menu, tag (not used)
540 540
541 *******************************************************************************/ 541 *******************************************************************************/
542 int cphs_lock_als(MfwMnu* m, MfwMnuItem* i) 542 int cphs_lock_als(MfwMnu* m, MfwMnuItem* i)
543 { 543 {
544 T_MFW_HND parent = mfwParent( mfw_header()); 544 T_MFW_HND parent = mfwParent( mfw_header());
545 T_MFW retVal; 545 T_MFW retVal;
548 548
549 #ifndef CPHS_PROV_TEST 549 #ifndef CPHS_PROV_TEST
550 if (!ALSPresent(NULL, NULL, NULL)) 550 if (!ALSPresent(NULL, NULL, NULL))
551 #endif 551 #endif
552 { 552 {
553 //xvilliva SPR17291 553 //xvilliva SPR17291
554 //We call sAT_PlusCLCK(), to update the value in FFS. This is the value used by 554 //We call sAT_PlusCLCK(), to update the value in FFS. This is the value used by
555 //ACI to estabilish a call on Line1 or Line2. 555 //ACI to estabilish a call on Line1 or Line2.
556 #ifndef FF_2TO1_PS 556 #ifndef FF_2TO1_PS
557 /*a0393213 warnings removal - CLCK_FAC_Al changed to FAC_Al as a result of ACI enum change*/ 557 /*a0393213 warnings removal - CLCK_FAC_Al changed to FAC_Al as a result of ACI enum change*/
558 sAT_PlusCLCK(CMD_SRC_LCL,FAC_Al,CLCK_MOD_Lock,g_pin2, 558 sAT_PlusCLCK(CMD_SRC_LCL,FAC_Al,CLCK_MOD_Lock,g_pin2,
559 ((als_status.selectedLine == MFW_SERV_LINE1) ? CLASS_Vce : CLASS_AuxVce));// 559 ((als_status.selectedLine == MFW_SERV_LINE1) ? CLASS_Vce : CLASS_AuxVce));//
560 #endif 560 #endif
561 retVal = cphs_set_als_status(MFW_LINE_LOCKED); 561 retVal = cphs_set_als_status(MFW_LINE_LOCKED);
577 577
578 /******************************************************************************* 578 /*******************************************************************************
579 579
580 $Function: cphs_unlock_als 580 $Function: cphs_unlock_als
581 581
582 $Description: Unlock ALS Line Selection from menu 582 $Description: Unlock ALS Line Selection from menu
583 583
584 $Returns: status int 584 $Returns: status int
585 585
586 $Arguments: menu, tag (not used) 586 $Arguments: menu, tag (not used)
587 587
588 *******************************************************************************/ 588 *******************************************************************************/
589 int cphs_unlock_als(MfwMnu* m, MfwMnuItem* i) 589 int cphs_unlock_als(MfwMnu* m, MfwMnuItem* i)
590 { 590 {
591 T_MFW_HND parent = mfwParent( mfw_header()); 591 T_MFW_HND parent = mfwParent( mfw_header());
592 T_MFW retVal; 592 T_MFW retVal;
597 if (!ALSPresent(NULL, NULL, NULL)) 597 if (!ALSPresent(NULL, NULL, NULL))
598 #endif 598 #endif
599 { 599 {
600 //xvilliva SPR17291 600 //xvilliva SPR17291
601 //We call sAT_PlusCLCK(), to update the value in FFS. This is the value used by 601 //We call sAT_PlusCLCK(), to update the value in FFS. This is the value used by
602 //ACI to estabilish a call on Line1 or Line2. 602 //ACI to estabilish a call on Line1 or Line2.
603 #ifndef FF_2TO1_PS 603 #ifndef FF_2TO1_PS
604 /*a0393213 warnings removal - CLCK_FAC_Al changed to FAC_Al as a result of ACI enum change*/ 604 /*a0393213 warnings removal - CLCK_FAC_Al changed to FAC_Al as a result of ACI enum change*/
605 sAT_PlusCLCK(CMD_SRC_LCL,FAC_Al,CLCK_MOD_Unlock,g_pin2,((als_status.selectedLine == MFW_SERV_LINE1) ? CLASS_Vce : CLASS_AuxVce));// 605 sAT_PlusCLCK(CMD_SRC_LCL,FAC_Al,CLCK_MOD_Unlock,g_pin2,((als_status.selectedLine == MFW_SERV_LINE1) ? CLASS_Vce : CLASS_AuxVce));//
606 #endif 606 #endif
607 retVal = cphs_set_als_status(MFW_LINE_UNLOCKED); 607 retVal = cphs_set_als_status(MFW_LINE_UNLOCKED);
626 /******************************************************************************* 626 /*******************************************************************************
627 627
628 $Function: item_flag_isMWISFilePresent 628 $Function: item_flag_isMWISFilePresent
629 629
630 $Description: return 0 if MWIS file is present else 1 630 $Description: return 0 if MWIS file is present else 1
631 631
632 *******************************************************************************/ 632 *******************************************************************************/
633 int item_flag_isMWISFilePresent(struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi) 633 int item_flag_isMWISFilePresent(struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi)
634 { 634 {
635 TRACE_FUNCTION("item_flag_isMBDNFilePresent"); 635 TRACE_FUNCTION("item_flag_isMBDNFilePresent");
636 if(isMWISFilePresent()) 636 if(isMWISFilePresent())
642 /******************************************************************************* 642 /*******************************************************************************
643 643
644 $Function: item_flag_isMBDNFileNotPresent 644 $Function: item_flag_isMBDNFileNotPresent
645 645
646 $Description: return 1 if MBDN file is present else 0 646 $Description: return 1 if MBDN file is present else 0
647 647
648 *******************************************************************************/ 648 *******************************************************************************/
649 int item_flag_isMBDNFileNotPresent(struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi) 649 int item_flag_isMBDNFileNotPresent(struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi)
650 { 650 {
651 TRACE_FUNCTION("item_flag_isMBDNFilePresent"); 651 TRACE_FUNCTION("item_flag_isMBDNFilePresent");
652 if(isMBDNFilePresent()) 652 if(isMBDNFilePresent())
657 /******************************************************************************* 657 /*******************************************************************************
658 658
659 $Function: item_flag_isMBDNFilePresent 659 $Function: item_flag_isMBDNFilePresent
660 660
661 $Description: return 0 if MBDN file is present else 1 661 $Description: return 0 if MBDN file is present else 1
662 662
663 *******************************************************************************/ 663 *******************************************************************************/
664 664
665 int item_flag_isMBDNFilePresent(struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi) 665 int item_flag_isMBDNFilePresent(struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi)
666 { 666 {
667 TRACE_FUNCTION("item_flag_isMBDNFileNotPresent"); 667 TRACE_FUNCTION("item_flag_isMBDNFileNotPresent");
674 674
675 /******************************************************************************* 675 /*******************************************************************************
676 676
677 $Function: mmi_msp_interrogate_done 677 $Function: mmi_msp_interrogate_done
678 678
679 $Description: Interrogation is finished. 679 $Description: Interrogation is finished.
680 680
681 $Returns: void 681 $Returns: void
682 682
683 $Arguments: void 683 $Arguments: void
684 684
685 *******************************************************************************/ 685 *******************************************************************************/
686 686
687 void mmi_msp_interrogate_done(void) 687 void mmi_msp_interrogate_done(void)
688 { 688 {
689 TRACE_FUNCTION("mmi_msp_interrogate_done()"); 689 TRACE_FUNCTION("mmi_msp_interrogate_done()");
690 690
691 /*a0393213 cphs rel4*/ 691 /*a0393213 cphs rel4*/
692 if(isCFISFilePresent()) 692 if(isCFISFilePresent())
693 cphs_get_divert_status(); 693 cphs_get_divert_status();
694 694
695 /*invalidate the local cache of mbi and mbdn*/ 695 /*invalidate the local cache of mbi and mbdn*/
700 /******************************************************************************* 700 /*******************************************************************************
701 701
702 $Function: mmi_msp_interrogate 702 $Function: mmi_msp_interrogate
703 703
704 $Description: Start MSP interrogation 704 $Description: Start MSP interrogation
705 705
706 $Returns: void 706 $Returns: void
707 707
708 $Arguments: void 708 $Arguments: void
709 709
710 *******************************************************************************/ 710 *******************************************************************************/
711 711
712 void mmi_msp_interrogate(void) 712 void mmi_msp_interrogate(void)
713 { 713 {
714 char actstr[8]; 714 char actstr[8];
715 TRACE_FUNCTION("mmi_msp_interrogate()"); 715 TRACE_FUNCTION("mmi_msp_interrogate()");
716 716
717 interrogate = 1; 717 interrogate = 1;
718 strcpy(actstr, "*#59#"); 718 strcpy(actstr, "*#59#");
719 ss_execute_transaction((UBYTE*)actstr, 0); 719 ss_execute_transaction((UBYTE*)actstr, 0);
720 } 720 }
721 721
722 /******************************************************************************* 722 /*******************************************************************************
723 723
724 $Function: msp_cb 724 $Function: msp_cb
725 725
726 $Description: Window event handler 726 $Description: Window event handler
727 727
728 $Returns: status int 728 $Returns: status int
729 729
730 $Arguments: event, window handler 730 $Arguments: event, window handler
731 731
732 *******************************************************************************/ 732 *******************************************************************************/
733 733
734 static int mwis_cb (MfwEvt e, MfwWin *w) /* yyy window event handler */ 734 static int mwis_cb (MfwEvt e, MfwWin *w) /* yyy window event handler */
735 { 735 {
736 TRACE_EVENT ("mwis_cb()"); 736 TRACE_EVENT ("mwis_cb()");
737 737
738 switch (e) 738 switch (e)
739 { 739 {
740 case MfwWinVisible: /* window is visible */ 740 case MfwWinVisible: /* window is visible */
741 break; 741 break;
742 case MfwWinFocussed: /* input focus / selected */ 742 case MfwWinFocussed: /* input focus / selected */
743 case MfwWinDelete: /* window will be deleted */ 743 case MfwWinDelete: /* window will be deleted */
744 744
745 default: 745 default:
746 return MFW_EVENT_REJECTED; 746 return MFW_EVENT_REJECTED;
747 } 747 }
748 return MFW_EVENT_CONSUMED; 748 return MFW_EVENT_CONSUMED;
749 } 749 }
750 750
751 /******************************************************************************* 751 /*******************************************************************************
752 752
753 $Function: msp_cb 753 $Function: msp_cb
754 754
755 $Description: Window event handler 755 $Description: Window event handler
756 756
757 $Returns: status int 757 $Returns: status int
758 758
759 $Arguments: event, window handler 759 $Arguments: event, window handler
760 760
761 *******************************************************************************/ 761 *******************************************************************************/
762 762
763 static int msp_cb (MfwEvt e, MfwWin *w) /* yyy window event handler */ 763 static int msp_cb (MfwEvt e, MfwWin *w) /* yyy window event handler */
764 { 764 {
765 TRACE_EVENT ("msp_cb()"); 765 TRACE_EVENT ("msp_cb()");
766 766
767 switch (e) 767 switch (e)
768 { 768 {
769 case MfwWinVisible: /* window is visible */ 769 case MfwWinVisible: /* window is visible */
770 break; 770 break;
771 case MfwWinFocussed: /* input focus / selected */ 771 case MfwWinFocussed: /* input focus / selected */
772 case MfwWinDelete: /* window will be deleted */ 772 case MfwWinDelete: /* window will be deleted */
773 773
774 default: 774 default:
775 return MFW_EVENT_REJECTED; 775 return MFW_EVENT_REJECTED;
776 } 776 }
777 return MFW_EVENT_CONSUMED; 777 return MFW_EVENT_CONSUMED;
778 } 778 }
779 779
780 /******************************************************************************* 780 /*******************************************************************************
781 781
782 $Function: MSPPresent 782 $Function: MSPPresent
783 783
784 $Description: MSP is provisioned. 784 $Description: MSP is provisioned.
785 785
786 $Returns: status USHORT 786 $Returns: status USHORT
787 787
788 $Arguments: menu tag, attribute, item tag 788 $Arguments: menu tag, attribute, item tag
789 789
790 *******************************************************************************/ 790 *******************************************************************************/
791 791
792 USHORT MSPPresent( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ) 792 USHORT MSPPresent( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi )
793 { 793 {
794 TRACE_EVENT_P1("MSPPresent - %d ", msp_info->count); 794 TRACE_EVENT_P1("MSPPresent - %d ", msp_info->count);
801 /******************************************************************************* 801 /*******************************************************************************
802 802
803 $Function: cphs_select_profile 803 $Function: cphs_select_profile
804 804
805 $Description: Select a profile for registration 805 $Description: Select a profile for registration
806 806
807 $Returns: void 807 $Returns: void
808 808
809 $Arguments: profile id 809 $Arguments: profile id
810 810
811 *******************************************************************************/ 811 *******************************************************************************/
812 812
813 void cphs_select_profile(int pf_id) 813 void cphs_select_profile(int pf_id)
814 { 814 {
815 char seq[6]; 815 char seq[6];
843 /******************************************************************************* 843 /*******************************************************************************
844 844
845 $Function: msp_menu_destroy 845 $Function: msp_menu_destroy
846 846
847 $Description: Destroy menu 847 $Description: Destroy menu
848 848
849 $Returns: void 849 $Returns: void
850 850
851 $Arguments: window handler 851 $Arguments: window handler
852 852
853 *******************************************************************************/ 853 *******************************************************************************/
854 854
855 static void msp_menu_destroy(MfwHnd window) 855 static void msp_menu_destroy(MfwHnd window)
856 { 856 {
857 T_MFW_WIN * win_data = ((T_MFW_HDR *)window)->data; 857 T_MFW_WIN * win_data = ((T_MFW_HDR *)window)->data;
865 } 865 }
866 866
867 if (data) 867 if (data)
868 { 868 {
869 win_delete(data->msp_win); 869 win_delete(data->msp_win);
870 870
871 /* 871 /*
872 ** Free Memory 872 ** Free Memory
873 */ 873 */
874 mfwFree((void *)data, sizeof (T_MSP_INFO)); 874 mfwFree((void *)data, sizeof (T_MSP_INFO));
875 } 875 }
878 /******************************************************************************* 878 /*******************************************************************************
879 879
880 $Function: mwis_menu_destroy 880 $Function: mwis_menu_destroy
881 881
882 $Description: Destroy menu 882 $Description: Destroy menu
883 883
884 $Returns: void 884 $Returns: void
885 885
886 $Arguments: window handler 886 $Arguments: window handler
887 887
888 *******************************************************************************/ 888 *******************************************************************************/
889 889
890 static void mwis_menu_destroy(MfwHnd window) 890 static void mwis_menu_destroy(MfwHnd window)
891 { 891 {
892 T_MFW_WIN * win_data = ((T_MFW_HDR *)window)->data; 892 T_MFW_WIN * win_data = ((T_MFW_HDR *)window)->data;
900 } 900 }
901 901
902 if (data) 902 if (data)
903 { 903 {
904 win_delete(data->mwis_win); 904 win_delete(data->mwis_win);
905 905
906 /* 906 /*
907 ** Free Memory 907 ** Free Memory
908 */ 908 */
909 mfwFree((void *)data, sizeof (T_MWIS_INFO)); 909 mfwFree((void *)data, sizeof (T_MWIS_INFO));
910 } 910 }
913 /******************************************************************************* 913 /*******************************************************************************
914 914
915 $Function: MwisList_cb 915 $Function: MwisList_cb
916 916
917 $Description: Callback for MWIS list 917 $Description: Callback for MWIS list
918 918
919 $Returns: void 919 $Returns: void
920 920
921 $Arguments: parent window, list data 921 $Arguments: parent window, list data
922 922
923 *******************************************************************************/ 923 *******************************************************************************/
924 924
925 void MwisList_cb(T_MFW_HND * Parent, ListMenuData * ListData) 925 void MwisList_cb(T_MFW_HND * Parent, ListMenuData * ListData)
926 { 926 {
927 T_MFW_WIN *win_data = ((T_MFW_HDR *)Parent)->data; 927 T_MFW_WIN *win_data = ((T_MFW_HDR *)Parent)->data;
945 FREE_MEMORY ((void *)data->menu_list_data->List, (U16)(4 * sizeof (T_MFW_MNU_ITEM))); 945 FREE_MEMORY ((void *)data->menu_list_data->List, (U16)(4 * sizeof (T_MFW_MNU_ITEM)));
946 FREE_MEMORY ((void *)data->menu_list_data, sizeof (ListMenuData)); 946 FREE_MEMORY ((void *)data->menu_list_data, sizeof (ListMenuData));
947 } 947 }
948 948
949 mwis_menu_destroy(data->mwis_win); 949 mwis_menu_destroy(data->mwis_win);
950 950
951 } 951 }
952 } 952 }
953 953
954 /******************************************************************************* 954 /*******************************************************************************
955 955
956 $Function: mwis_exec_cb 956 $Function: mwis_exec_cb
957 957
958 $Description: Dialog function to display the mwis list 958 $Description: Dialog function to display the mwis list
959 959
960 $Returns: void 960 $Returns: void
961 961
962 $Arguments: window handler, event, value and parameter 962 $Arguments: window handler, event, value and parameter
963 963
964 *******************************************************************************/ 964 *******************************************************************************/
965 965
966 void mwis_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter) 966 void mwis_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter)
967 { 967 {
968 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; 968 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data;
985 if(data->menu_list_data == 0) 985 if(data->menu_list_data == 0)
986 { 986 {
987 TRACE_EVENT("Failed memory alloc 1 "); 987 TRACE_EVENT("Failed memory alloc 1 ");
988 return; 988 return;
989 } 989 }
990 990
991 data->menu_list_data->List = (T_MFW_MNU_ITEM *)ALLOC_MEMORY( 4 * sizeof(T_MFW_MNU_ITEM) ); 991 data->menu_list_data->List = (T_MFW_MNU_ITEM *)ALLOC_MEMORY( 4 * sizeof(T_MFW_MNU_ITEM) );
992 992
993 if(data->menu_list_data->List == 0) 993 if(data->menu_list_data->List == 0)
994 { 994 {
995 TRACE_EVENT("Failed memory alloc 2"); 995 TRACE_EVENT("Failed memory alloc 2");
1028 data->menu_list_data->KeyEvents = KEY_RIGHT; 1028 data->menu_list_data->KeyEvents = KEY_RIGHT;
1029 data->menu_list_data->Reason = 0; 1029 data->menu_list_data->Reason = 0;
1030 data->menu_list_data->Strings = TRUE; 1030 data->menu_list_data->Strings = TRUE;
1031 data->menu_list_data->Attr = &InfoNum_menuAttrib; 1031 data->menu_list_data->Attr = &InfoNum_menuAttrib;
1032 data->menu_list_data->autoDestroy = FALSE; 1032 data->menu_list_data->autoDestroy = FALSE;
1033 1033
1034 /* Create the dynamic menu window */ 1034 /* Create the dynamic menu window */
1035 listDisplayListMenu(win, data->menu_list_data,(ListCbFunc)MwisList_cb,0); 1035 listDisplayListMenu(win, data->menu_list_data,(ListCbFunc)MwisList_cb,0);
1036 1036
1037 break; 1037 break;
1038 default: 1038 default:
1044 /******************************************************************************* 1044 /*******************************************************************************
1045 1045
1046 $Function: mmi_build_mwis_menu 1046 $Function: mmi_build_mwis_menu
1047 1047
1048 $Description: Create mwis menu 1048 $Description: Create mwis menu
1049 1049
1050 $Returns: window handler 1050 $Returns: window handler
1051 1051
1052 $Arguments: parent window handler 1052 $Arguments: parent window handler
1053 1053
1054 *******************************************************************************/ 1054 *******************************************************************************/
1055 1055
1056 static T_MFW_HND mmi_build_mwis_menu( MfwHnd parent_window) 1056 static T_MFW_HND mmi_build_mwis_menu( MfwHnd parent_window)
1057 { 1057 {
1058 T_MWIS_INFO * data = (T_MWIS_INFO *)ALLOC_MEMORY (sizeof (T_MWIS_INFO)); 1058 T_MWIS_INFO * data = (T_MWIS_INFO *)ALLOC_MEMORY (sizeof (T_MWIS_INFO));
1068 { 1068 {
1069 return NULL; 1069 return NULL;
1070 } 1070 }
1071 1071
1072 TRACE_EVENT(">>>> mwis menu window created: " ); 1072 TRACE_EVENT(">>>> mwis menu window created: " );
1073 /* 1073 /*
1074 * connect the dialog data to the MFW-window 1074 * connect the dialog data to the MFW-window
1075 */ 1075 */
1076 1076
1077 data->mmi_control.dialog = (T_DIALOG_FUNC)mwis_exec_cb; 1077 data->mmi_control.dialog = (T_DIALOG_FUNC)mwis_exec_cb;
1078 data->mmi_control.data = data; 1078 data->mmi_control.data = data;
1091 /******************************************************************************* 1091 /*******************************************************************************
1092 1092
1093 $Function: MspList_cb 1093 $Function: MspList_cb
1094 1094
1095 $Description: Callback for MSP list 1095 $Description: Callback for MSP list
1096 1096
1097 $Returns: void 1097 $Returns: void
1098 1098
1099 $Arguments: parent window, list data 1099 $Arguments: parent window, list data
1100 1100
1101 *******************************************************************************/ 1101 *******************************************************************************/
1102 1102
1103 void MspList_cb(T_MFW_HND * Parent, ListMenuData * ListData) 1103 void MspList_cb(T_MFW_HND * Parent, ListMenuData * ListData)
1104 { 1104 {
1105 T_MFW_WIN *win_data = ((T_MFW_HDR *)Parent)->data; 1105 T_MFW_WIN *win_data = ((T_MFW_HDR *)Parent)->data;
1154 /******************************************************************************* 1154 /*******************************************************************************
1155 1155
1156 $Function: msp_exec_cb 1156 $Function: msp_exec_cb
1157 1157
1158 $Description: Dialog function to display the msp list 1158 $Description: Dialog function to display the msp list
1159 1159
1160 $Returns: void 1160 $Returns: void
1161 1161
1162 $Arguments: window handler, event, value and parameter 1162 $Arguments: window handler, event, value and parameter
1163 1163
1164 *******************************************************************************/ 1164 *******************************************************************************/
1165 1165
1166 void msp_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter) 1166 void msp_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter)
1167 { 1167 {
1168 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; 1168 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data;
1183 if(data->menu_list_data == 0) 1183 if(data->menu_list_data == 0)
1184 { 1184 {
1185 TRACE_EVENT("Failed memory alloc 1 "); 1185 TRACE_EVENT("Failed memory alloc 1 ");
1186 return; 1186 return;
1187 } 1187 }
1188 1188
1189 data->menu_list_data->List = (T_MFW_MNU_ITEM *)ALLOC_MEMORY( msp_info->count * sizeof(T_MFW_MNU_ITEM) ); 1189 data->menu_list_data->List = (T_MFW_MNU_ITEM *)ALLOC_MEMORY( msp_info->count * sizeof(T_MFW_MNU_ITEM) );
1190 1190
1191 if(data->menu_list_data->List == 0) 1191 if(data->menu_list_data->List == 0)
1192 { 1192 {
1193 TRACE_EVENT("Failed memory alloc 2"); 1193 TRACE_EVENT("Failed memory alloc 2");
1211 data->menu_list_data->KeyEvents = KEY_ALL; 1211 data->menu_list_data->KeyEvents = KEY_ALL;
1212 data->menu_list_data->Reason = 0; 1212 data->menu_list_data->Reason = 0;
1213 data->menu_list_data->Strings = TRUE; 1213 data->menu_list_data->Strings = TRUE;
1214 data->menu_list_data->Attr = &InfoNum_menuAttrib; 1214 data->menu_list_data->Attr = &InfoNum_menuAttrib;
1215 data->menu_list_data->autoDestroy = FALSE; 1215 data->menu_list_data->autoDestroy = FALSE;
1216 1216
1217 /* Create the dynamic menu window */ 1217 /* Create the dynamic menu window */
1218 listDisplayListMenu(win, data->menu_list_data,(ListCbFunc)MspList_cb,0); 1218 listDisplayListMenu(win, data->menu_list_data,(ListCbFunc)MspList_cb,0);
1219 1219
1220 break; 1220 break;
1221 default: 1221 default:
1228 /******************************************************************************* 1228 /*******************************************************************************
1229 1229
1230 $Function: mmi_build_msp_menu 1230 $Function: mmi_build_msp_menu
1231 1231
1232 $Description: Create MSP menu 1232 $Description: Create MSP menu
1233 1233
1234 $Returns: window handler 1234 $Returns: window handler
1235 1235
1236 $Arguments: parent window handler 1236 $Arguments: parent window handler
1237 1237
1238 *******************************************************************************/ 1238 *******************************************************************************/
1239 1239
1240 static T_MFW_HND mmi_build_msp_menu( MfwHnd parent_window) 1240 static T_MFW_HND mmi_build_msp_menu( MfwHnd parent_window)
1241 { 1241 {
1242 T_MSP_INFO * data = (T_MSP_INFO *)ALLOC_MEMORY (sizeof (T_MSP_INFO)); 1242 T_MSP_INFO * data = (T_MSP_INFO *)ALLOC_MEMORY (sizeof (T_MSP_INFO));
1252 { 1252 {
1253 return NULL; 1253 return NULL;
1254 } 1254 }
1255 1255
1256 TRACE_EVENT(">>>> msp menu window created: " ); 1256 TRACE_EVENT(">>>> msp menu window created: " );
1257 /* 1257 /*
1258 * connect the dialog data to the MFW-window 1258 * connect the dialog data to the MFW-window
1259 */ 1259 */
1260 1260
1261 data->mmi_control.dialog = (T_DIALOG_FUNC)msp_exec_cb; 1261 data->mmi_control.dialog = (T_DIALOG_FUNC)msp_exec_cb;
1262 data->mmi_control.data = data; 1262 data->mmi_control.data = data;
1274 /******************************************************************************* 1274 /*******************************************************************************
1275 1275
1276 $Function: build_profile_list 1276 $Function: build_profile_list
1277 1277
1278 $Description: generate profile list 1278 $Description: generate profile list
1279 1279
1280 $Returns: status int 1280 $Returns: status int
1281 1281
1282 $Arguments: menu, menu item 1282 $Arguments: menu, menu item
1283 1283
1284 *******************************************************************************/ 1284 *******************************************************************************/
1285 1285
1286 int build_profile_list(MfwMnu* m, MfwMnuItem* i) 1286 int build_profile_list(MfwMnu* m, MfwMnuItem* i)
1287 { 1287 {
1288 T_MFW_HND win; 1288 T_MFW_HND win;
1289 T_MFW_HND parent_win = mfw_parent(mfw_header()); 1289 T_MFW_HND parent_win = mfw_parent(mfw_header());
1290 1290
1291 TRACE_FUNCTION("build_profile_list()"); 1291 TRACE_FUNCTION("build_profile_list()");
1292 1292
1293 win = mmi_build_msp_menu(parent_win); 1293 win = mmi_build_msp_menu(parent_win);
1294 if (win NEQ NULL) 1294 if (win NEQ NULL)
1295 { 1295 {
1296 SEND_EVENT (win, E_INIT, 0, 0); 1296 SEND_EVENT (win, E_INIT, 0, 0);
1297 } 1297 }
1304 T_MFW_HND parent_win = mfw_parent(mfw_header()); 1304 T_MFW_HND parent_win = mfw_parent(mfw_header());
1305 1305
1306 TRACE_FUNCTION("build_profile_list()"); 1306 TRACE_FUNCTION("build_profile_list()");
1307 1307
1308 mwis_flag = TRUE; 1308 mwis_flag = TRUE;
1309 1309
1310 win = mmi_build_msp_menu(parent_win); 1310 win = mmi_build_msp_menu(parent_win);
1311 if (win NEQ NULL) 1311 if (win NEQ NULL)
1312 { 1312 {
1313 SEND_EVENT (win, E_INIT, 0, 0); 1313 SEND_EVENT (win, E_INIT, 0, 0);
1314 } 1314 }
1318 #endif 1318 #endif
1319 /******************************************************************************* 1319 /*******************************************************************************
1320 1320
1321 $Function: cphs_line1_select 1321 $Function: cphs_line1_select
1322 1322
1323 $Description: Enable ALS Line1 from menu 1323 $Description: Enable ALS Line1 from menu
1324 1324
1325 $Returns: status int 1325 $Returns: status int
1326 1326
1327 $Arguments: menu, tag (not used) 1327 $Arguments: menu, tag (not used)
1328 1328
1329 *******************************************************************************/ 1329 *******************************************************************************/
1330 int cphs_line1_select(MfwMnu* m, MfwMnuItem* i) 1330 int cphs_line1_select(MfwMnu* m, MfwMnuItem* i)
1331 { 1331 {
1332 T_MFW_HND parent = mfwParent( mfw_header()); 1332 T_MFW_HND parent = mfwParent( mfw_header());
1333 TRACE_FUNCTION("cphs_line1_select"); 1333 TRACE_FUNCTION("cphs_line1_select");
1334 #ifndef CPHS_PROV_TEST 1334 #ifndef CPHS_PROV_TEST
1335 if (!ALSPresent(NULL, NULL, NULL)) 1335 if (!ALSPresent(NULL, NULL, NULL))
1336 #endif 1336 #endif
1345 } 1345 }
1346 /******************************************************************************* 1346 /*******************************************************************************
1347 1347
1348 $Function: cphs_line2_select 1348 $Function: cphs_line2_select
1349 1349
1350 $Description: Enable ALS Line2 from menu 1350 $Description: Enable ALS Line2 from menu
1351 1351
1352 $Returns: status int 1352 $Returns: status int
1353 1353
1354 $Arguments: menu, tag (not used) 1354 $Arguments: menu, tag (not used)
1355 1355
1356 *******************************************************************************/ 1356 *******************************************************************************/
1357 int cphs_line2_select(MfwMnu* m, MfwMnuItem* i) 1357 int cphs_line2_select(MfwMnu* m, MfwMnuItem* i)
1358 { 1358 {
1359 1359
1360 T_MFW_HND parent = mfwParent( mfw_header()); 1360 T_MFW_HND parent = mfwParent( mfw_header());
1361 TRACE_FUNCTION("cphs_line2_select"); 1361 TRACE_FUNCTION("cphs_line2_select");
1362 #ifndef CPHS_PROV_TEST 1362 #ifndef CPHS_PROV_TEST
1363 if (!ALSPresent(NULL, NULL, NULL)) 1363 if (!ALSPresent(NULL, NULL, NULL))
1364 #endif 1364 #endif
1365 { 1365 {
1366 cphs_select_line(MFW_SERV_LINE2); 1366 cphs_select_line(MFW_SERV_LINE2);
1367 /*cphs_get_divert_status();*//*a0393213 - the call forward icon is now shown taking both the lines into consideration*/ 1367 /*cphs_get_divert_status();*//*a0393213 - the call forward icon is now shown taking both the lines into consideration*/
1368 } 1368 }
1369 #ifndef CPHS_PROV_TEST 1369 #ifndef CPHS_PROV_TEST
1370 else 1370 else
1376 //x0pleela 23 May, 2006 DR: OMAPS00070657 1376 //x0pleela 23 May, 2006 DR: OMAPS00070657
1377 #ifdef FF_CPHS 1377 #ifdef FF_CPHS
1378 /******************************************************************************* 1378 /*******************************************************************************
1379 1379
1380 $Function: cphs_Line_Edit_cb 1380 $Function: cphs_Line_Edit_cb
1381 1381
1382 $Description: Callback function for Line rename editor 1382 $Description: Callback function for Line rename editor
1383 1383
1384 $Returns: none 1384 $Returns: none
1385 1385
1386 $Arguments: win - current window 1386 $Arguments: win - current window
1387 Identifier - unique id 1387 Identifier - unique id
1388 reason - event cause 1388 reason - event cause
1389 *******************************************************************************/ 1389 *******************************************************************************/
1390 1390
1391 static void cphs_Line_Edit_cb(T_MFW_HND win, USHORT Identifier, SHORT reason) 1391 static void cphs_Line_Edit_cb(T_MFW_HND win, USHORT Identifier, SHORT reason)
1392 { 1392 {
1393 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; 1393 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data;
1394 T_ALS_DATA* data = (T_ALS_DATA *)win_data->user; 1394 T_ALS_DATA* data = (T_ALS_DATA *)win_data->user;
1395 T_DISPLAY_DATA display_info; 1395 T_DISPLAY_DATA display_info;
1396 1396
1397 switch (reason) 1397 switch (reason)
1398 { 1398 {
1399 case INFO_KCD_ALTERNATELEFT: 1399 case INFO_KCD_ALTERNATELEFT:
1400 case INFO_KCD_LEFT: 1400 case INFO_KCD_LEFT:
1401 { 1401 {
1406 1406
1407 flash_write(); 1407 flash_write();
1408 1408
1409 1409
1410 dlg_initDisplayData_TextId(&display_info, TxtNull, TxtNull, TxtDone, TxtNull, COLOUR_STATUS_WELCOME); 1410 dlg_initDisplayData_TextId(&display_info, TxtNull, TxtNull, TxtDone, TxtNull, COLOUR_STATUS_WELCOME);
1411 1411
1412 dlg_initDisplayData_events( &display_info, NULL, TWO_SECS, KEY_ALL ); 1412 dlg_initDisplayData_events( &display_info, NULL, TWO_SECS, KEY_ALL );
1413 1413
1414 info_dialog(win,&display_info); 1414 info_dialog(win,&display_info);
1415 1415
1416 #ifdef NEW_EDITOR 1416 #ifdef NEW_EDITOR
1417 AUI_edit_Destroy(data->input_number_win); 1417 AUI_edit_Destroy(data->input_number_win);
1418 #else /* NEW_EDITOR */ 1418 #else /* NEW_EDITOR */
1419 editor_destroy(data->input_number_win); 1419 editor_destroy(data->input_number_win);
1420 #endif /* NEW_EDITOR */ 1420 #endif /* NEW_EDITOR */
1421 data->input_number_win = 0; 1421 data->input_number_win = 0;
1422 //dspl_ClearAll(); 1422 //dspl_ClearAll();
1423 1423
1424 1424
1425 winDelete(win); 1425 winDelete(win);
1426 } 1426 }
1427 break; 1427 break;
1428 case INFO_KCD_RIGHT: 1428 case INFO_KCD_RIGHT:
1429 case INFO_KCD_HUP: 1429 case INFO_KCD_HUP:
1435 editor_destroy(data->input_number_win); 1435 editor_destroy(data->input_number_win);
1436 #endif /* NEW_EDITOR */ 1436 #endif /* NEW_EDITOR */
1437 data->input_number_win = 0; 1437 data->input_number_win = 0;
1438 //dspl_ClearAll(); 1438 //dspl_ClearAll();
1439 winDelete(win); 1439 winDelete(win);
1440 1440
1441 } 1441 }
1442 break; 1442 break;
1443 1443
1444 default: 1444 default:
1445 TRACE_EVENT("Err: Default"); 1445 TRACE_EVENT("Err: Default");
1446 break; 1446 break;
1447 1447
1448 1448
1449 } 1449 }
1450 } 1450 }
1451 1451
1452 static void cphs_edit_line_exec_cb(T_MFW_HND win, USHORT event, SHORT identifier, void *parameter) 1452 static void cphs_edit_line_exec_cb(T_MFW_HND win, USHORT event, SHORT identifier, void *parameter)
1453 { 1453 {
1454 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; 1454 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data;
1455 T_ALS_DATA* data = (T_ALS_DATA *)win_data->user; 1455 T_ALS_DATA* data = (T_ALS_DATA *)win_data->user;
1456 #ifdef NEW_EDITOR 1456 #ifdef NEW_EDITOR
1457 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ 1457 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */
1458 #else 1458 #else
1460 #endif 1460 #endif
1461 if( identifier==LINE1 ) 1461 if( identifier==LINE1 )
1462 strcpy((char *) data->edt_buf_name,(char*)MmiRsrcGetText(TxtLine1)); 1462 strcpy((char *) data->edt_buf_name,(char*)MmiRsrcGetText(TxtLine1));
1463 else 1463 else
1464 strcpy((char *) data->edt_buf_name,(char*)MmiRsrcGetText(TxtLine2)); 1464 strcpy((char *) data->edt_buf_name,(char*)MmiRsrcGetText(TxtLine2));
1465 1465
1466 TRACE_FUNCTION ("cphs_edit_line_exec_cb()"); 1466 TRACE_FUNCTION ("cphs_edit_line_exec_cb()");
1467 1467
1468 switch (event) 1468 switch (event)
1469 { 1469 {
1470 case E_INIT: 1470 case E_INIT:
1471 1471
1472 #ifdef NEW_EDITOR 1472 #ifdef NEW_EDITOR
1473 AUI_edit_SetDefault(&editor_data); 1473 AUI_edit_SetDefault(&editor_data);
1474 AUI_edit_SetDisplay(&editor_data, PHNO_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); 1474 AUI_edit_SetDisplay(&editor_data, PHNO_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT);
1475 AUI_edit_SetEvents(&editor_data, identifier, FALSE, FOREVER, (T_AUI_EDIT_CB)cphs_Line_Edit_cb); 1475 AUI_edit_SetEvents(&editor_data, identifier, FALSE, FOREVER, (T_AUI_EDIT_CB)cphs_Line_Edit_cb);
1476 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtDelete, TxtNull, NULL); 1476 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtDelete, TxtNull, NULL);
1480 data->input_number_win=AUI_edit_Start(data->win, &editor_data); 1480 data->input_number_win=AUI_edit_Start(data->win, &editor_data);
1481 #else /* NEW_EDITOR */ 1481 #else /* NEW_EDITOR */
1482 1482
1483 SmsSend_loadEditDefault(&editor_data); 1483 SmsSend_loadEditDefault(&editor_data);
1484 1484
1485 bookSetEditAttributes( PHNO_EDITOR, COLOUR_EDITOR_XX, 0, edtCurBar1, 0, 1485 bookSetEditAttributes( PHNO_EDITOR, COLOUR_EDITOR_XX, 0, edtCurBar1, 0,
1486 (char *) data->edt_data.NumberBuffer, /*MAX_SEARCH_CHAR*/NUMBER_LENGTH, &editor_data.editor_attr); 1486 (char *) data->edt_data.NumberBuffer, /*MAX_SEARCH_CHAR*/NUMBER_LENGTH, &editor_data.editor_attr);
1487 editor_data.editor_attr.text = (char *)data->edt_buf_name; 1487 editor_data.editor_attr.text = (char *)data->edt_buf_name;
1488 1488
1489 editor_data.editor_attr.size = MAX_LINE_NAME_LEN; 1489 editor_data.editor_attr.size = MAX_LINE_NAME_LEN;
1490 1490
1491 editor_data.TextId = TxtNull; 1491 editor_data.TextId = TxtNull;
1492 editor_data.LeftSoftKey = TxtSoftOK; 1492 editor_data.LeftSoftKey = TxtSoftOK;
1493 editor_data.AlternateLeftSoftKey = TxtSoftOK; 1493 editor_data.AlternateLeftSoftKey = TxtSoftOK;
1494 editor_data.RightSoftKey = TxtDelete; 1494 editor_data.RightSoftKey = TxtDelete;
1495 editor_data.Identifier = identifier ; 1495 editor_data.Identifier = identifier ;
1496 editor_data.mode = E_EDIT_DIGITS_MODE; 1496 editor_data.mode = E_EDIT_DIGITS_MODE;
1497 editor_data.Callback = (T_EDIT_CB)cphs_Line_Edit_cb; 1497 editor_data.Callback = (T_EDIT_CB)cphs_Line_Edit_cb;
1498 editor_data.destroyEditor = FALSE; 1498 editor_data.destroyEditor = FALSE;
1499 data->input_number_win =editor_start(data->win, &editor_data); /* start the editor */ 1499 data->input_number_win =editor_start(data->win, &editor_data); /* start the editor */
1500 1500
1501 1501
1502 /* SPR#1428 - SH - New Editor changes */ 1502 /* SPR#1428 - SH - New Editor changes */
1503 1503
1504 #endif 1504 #endif
1505 1505
1506 break; 1506 break;
1507 default: 1507 default:
1508 TRACE_EVENT("Err: Default"); 1508 TRACE_EVENT("Err: Default");
1509 break; 1509 break;
1510 } 1510 }
1513 /******************************************************************************* 1513 /*******************************************************************************
1514 1514
1515 $Function: cphs_edit_line_create 1515 $Function: cphs_edit_line_create
1516 1516
1517 $Description: Create a window for entering the text 1517 $Description: Create a window for entering the text
1518 1518
1519 $Returns: window handle 1519 $Returns: window handle
1520 1520
1521 $Arguments: parent_window - parent window. 1521 $Arguments: parent_window - parent window.
1522 1522
1523 *******************************************************************************/ 1523 *******************************************************************************/
1524 1524
1525 1525
1526 static T_MFW_HND cphs_edit_line_create(MfwHnd parent_window) 1526 static T_MFW_HND cphs_edit_line_create(MfwHnd parent_window)
1527 { 1527 {
1550 1550
1551 /******************************************************************************* 1551 /*******************************************************************************
1552 1552
1553 $Function: cphs_edit_line1 1553 $Function: cphs_edit_line1
1554 1554
1555 $Description: edit line name from menu 1555 $Description: edit line name from menu
1556 1556
1557 $Returns: status int 1557 $Returns: status int
1558 1558
1559 $Arguments: menu, tag (not used) 1559 $Arguments: menu, tag (not used)
1560 1560
1561 *******************************************************************************/ 1561 *******************************************************************************/
1562 int cphs_edit_line1(MfwMnu* m, MfwMnuItem* i) 1562 int cphs_edit_line1(MfwMnu* m, MfwMnuItem* i)
1563 { 1563 {
1564 T_MFW_HND parent_win = mfw_parent(mfw_header()); 1564 T_MFW_HND parent_win = mfw_parent(mfw_header());
1565 T_MFW_HND win = cphs_edit_line_create(parent_win); 1565 T_MFW_HND win = cphs_edit_line_create(parent_win);
1571 1571
1572 /******************************************************************************* 1572 /*******************************************************************************
1573 1573
1574 $Function: cphs_edit_line2 1574 $Function: cphs_edit_line2
1575 1575
1576 $Description: edit line name from menu 1576 $Description: edit line name from menu
1577 1577
1578 $Returns: status int 1578 $Returns: status int
1579 1579
1580 $Arguments: menu, tag (not used) 1580 $Arguments: menu, tag (not used)
1581 1581
1582 *******************************************************************************/ 1582 *******************************************************************************/
1583 int cphs_edit_line2(MfwMnu* m, MfwMnuItem* i) 1583 int cphs_edit_line2(MfwMnu* m, MfwMnuItem* i)
1584 { 1584 {
1585 T_MFW_HND parent_win = mfw_parent(mfw_header()); 1585 T_MFW_HND parent_win = mfw_parent(mfw_header());
1586 T_MFW_HND win = cphs_edit_line_create(parent_win); 1586 T_MFW_HND win = cphs_edit_line_create(parent_win);
1592 1592
1593 /******************************************************************************* 1593 /*******************************************************************************
1594 1594
1595 $Function: menu_cphs_call_mailbox_number 1595 $Function: menu_cphs_call_mailbox_number
1596 1596
1597 $Description: edit mailbox numbers from menu 1597 $Description: edit mailbox numbers from menu
1598 1598
1599 $Returns: status int 1599 $Returns: status int
1600 1600
1601 $Arguments: menu, tag (not used) 1601 $Arguments: menu, tag (not used)
1602 1602
1603 *******************************************************************************/ 1603 *******************************************************************************/
1604 int menu_cphs_call_mailbox_number(MfwMnu* m, MfwMnuItem* i) 1604 int menu_cphs_call_mailbox_number(MfwMnu* m, MfwMnuItem* i)
1605 { T_MFW_HND parent = mfwParent( mfw_header()); 1605 { T_MFW_HND parent = mfwParent( mfw_header());
1606 T_MFW_CPHS_INFO configuration; 1606 T_MFW_CPHS_INFO configuration;
1607 1607
1608 TRACE_FUNCTION("menu_cphs_call_mailbox_number"); 1608 TRACE_FUNCTION("menu_cphs_call_mailbox_number");
1609 1609
1610 type_of_list = MAILBOX_LIST_CALL; 1610 type_of_list = MAILBOX_LIST_CALL;
1611 cphs_config(&configuration); 1611 cphs_config(&configuration);
1612 /***************************Go-lite Optimization changes Start***********************/ 1612 /***************************Go-lite Optimization changes Start***********************/
1613 //Aug 16, 2004 REF: CRR 24323 Deepa M.D 1613 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
1614 TRACE_EVENT_P2( "CPHS? %d Mailbox config info: %d", configuration.mbNum, CphsPresent()); 1614 TRACE_EVENT_P2( "CPHS? %d Mailbox config info: %d", configuration.mbNum, CphsPresent());
1615 /***************************Go-lite Optimization changes end***********************/ 1615 /***************************Go-lite Optimization changes end***********************/
1616 if (CphsMailboxPresent()==TRUE ) 1616 if (CphsMailboxPresent()==TRUE )
1617 cphs_get_mailbox(); 1617 cphs_get_mailbox();
1618 else 1618 else
1619 M_callVoice(m, i); 1619 M_callVoice(m, i);
1620 return MFW_EVENT_CONSUMED; 1620 return MFW_EVENT_CONSUMED;
1621 } 1621 }
1622 /******************************************************************************* 1622 /*******************************************************************************
1623 1623
1624 $Function: menu_cphs_edit_mailbox_number 1624 $Function: menu_cphs_edit_mailbox_number
1625 1625
1626 $Description: edit mailbox numbers from menu 1626 $Description: edit mailbox numbers from menu
1627 1627
1628 $Returns: status int 1628 $Returns: status int
1629 1629
1630 $Arguments: menu, tag (not used) 1630 $Arguments: menu, tag (not used)
1631 1631
1632 *******************************************************************************/ 1632 *******************************************************************************/
1633 int menu_cphs_edit_mailbox_number(MfwMnu* m, MfwMnuItem* i) 1633 int menu_cphs_edit_mailbox_number(MfwMnu* m, MfwMnuItem* i)
1634 { T_MFW_HND parent = mfwParent( mfw_header()); 1634 { T_MFW_HND parent = mfwParent( mfw_header());
1635 T_MFW_CPHS_INFO configuration; 1635 T_MFW_CPHS_INFO configuration;
1636 1636
1637 TRACE_FUNCTION("menu_cphs_edit_mailbox_number"); 1637 TRACE_FUNCTION("menu_cphs_edit_mailbox_number");
1638 type_of_list = MAILBOX_LIST; 1638 type_of_list = MAILBOX_LIST;
1639 1639
1640 cphs_config(&configuration); 1640 cphs_config(&configuration);
1641 /***************************Go-lite Optimization changes Start***********************/ 1641 /***************************Go-lite Optimization changes Start***********************/
1642 //Aug 16, 2004 REF: CRR 24323 Deepa M.D 1642 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
1643 TRACE_EVENT_P2( "CPHS? %d Mailbox config info: %d", configuration.mbNum, CphsPresent()); 1643 TRACE_EVENT_P2( "CPHS? %d Mailbox config info: %d", configuration.mbNum, CphsPresent());
1644 /***************************Go-lite Optimization changes end***********************/ 1644 /***************************Go-lite Optimization changes end***********************/
1645 if (CphsMailboxPresent()==TRUE ) 1645 if (CphsMailboxPresent()==TRUE )
1646 cphs_get_mailbox(); 1646 cphs_get_mailbox();
1647 else 1647 else
1648 M_exeVoice(m, i); 1648 M_exeVoice(m, i);
1649 return MFW_EVENT_CONSUMED; 1649 return MFW_EVENT_CONSUMED;
1650 } 1650 }
1651 1651
1652 1652
1653 #ifdef FF_CPHS_REL4 1653 #ifdef FF_CPHS_REL4
1654 /******************************************************************************* 1654 /*******************************************************************************
1655 1655
1656 $Function: menu_cphs_rel4_show_mailbox_number 1656 $Function: menu_cphs_rel4_show_mailbox_number
1657 1657
1658 $Description: menu handler function for any item in MailBox menu 1658 $Description: menu handler function for any item in MailBox menu
1659 1659
1660 *******************************************************************************/ 1660 *******************************************************************************/
1661 int menu_cphs_rel4_show_mailbox_number(MfwMnu* m, MfwMnuItem* i) 1661 int menu_cphs_rel4_show_mailbox_number(MfwMnu* m, MfwMnuItem* i)
1662 { 1662 {
1663 if(cphs_rel4_mbi.valid==1) 1663 if(cphs_rel4_mbi.valid==1)
1664 { 1664 {
1682 mailbox_type=T_MFW_CPHS_REL4_MAILBOX_FAX; 1682 mailbox_type=T_MFW_CPHS_REL4_MAILBOX_FAX;
1683 break; 1683 break;
1684 case 2: 1684 case 2:
1685 TRACE_EVENT("electronic selected"); 1685 TRACE_EVENT("electronic selected");
1686 mailbox_type=T_MFW_CPHS_REL4_MAILBOX_ELECTRONIC; 1686 mailbox_type=T_MFW_CPHS_REL4_MAILBOX_ELECTRONIC;
1687 break; 1687 break;
1688 case 3: 1688 case 3:
1689 TRACE_EVENT("other selected"); 1689 TRACE_EVENT("other selected");
1690 mailbox_type=T_MFW_CPHS_REL4_MAILBOX_OTHER; 1690 mailbox_type=T_MFW_CPHS_REL4_MAILBOX_OTHER;
1691 break; 1691 break;
1692 default: 1692 default:
1693 TRACE_ERROR("menu index out of range"); 1693 TRACE_ERROR("menu index out of range");
1694 break; 1694 break;
1695 } 1695 }
1696 qAT_PercentMBI(CMD_SRC_LCL,msp_id); 1696 qAT_PercentMBI(CMD_SRC_LCL,msp_id);
1697 1697
1698 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtPleaseWait, TxtNull, COLOUR_STATUS_WAIT); 1698 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtPleaseWait, TxtNull, COLOUR_STATUS_WAIT);
1699 dlg_initDisplayData_events( &display_info, NULL, FOREVER, 0 ); 1699 dlg_initDisplayData_events( &display_info, NULL, FOREVER, 0 );
1700 1700
1701 mailbox_waiting_dialog=info_dialog (mfw_parent(mfwFocus), &display_info); 1701 mailbox_waiting_dialog=info_dialog (mfw_parent(mfwFocus), &display_info);
1702 1702
1703 } 1703 }
1704 } 1704 }
1705 #endif 1705 #endif
1706 /******************************************************************************* 1706 /*******************************************************************************
1707 1707
1708 $Function: InfoNumbers 1708 $Function: InfoNumbers
1709 1709
1710 $Description: displays information number list from CPHS 1710 $Description: displays information number list from CPHS
1711 1711
1712 $Returns: MFW_EVENT_CONSUMED always 1712 $Returns: MFW_EVENT_CONSUMED always
1713 1713
1714 $Arguments: m, menu, i, item 1714 $Arguments: m, menu, i, item
1715 1715
1716 *******************************************************************************/ 1716 *******************************************************************************/
1717 1717
1718 int InfoNumbers( MfwMnu *m, MfwMnuItem *i ) 1718 int InfoNumbers( MfwMnu *m, MfwMnuItem *i )
1719 { 1719 {
1720 T_MFW_HND win; 1720 T_MFW_HND win;
1721 T_MFW_HND parent_win = mfw_parent(mfw_header()); 1721 T_MFW_HND parent_win = mfw_parent(mfw_header());
1722 T_MFW_CPHS_INFO config_info; 1722 T_MFW_CPHS_INFO config_info;
1723 1723
1724 cphs_config(&config_info); 1724 cphs_config(&config_info);
1725 /***************************Go-lite Optimization changes Start***********************/ 1725 /***************************Go-lite Optimization changes Start***********************/
1726 //Aug 16, 2004 REF: CRR 24323 Deepa M.D 1726 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
1727 TRACE_EVENT_P1("Info Num config info: %d", config_info.iNum); 1727 TRACE_EVENT_P1("Info Num config info: %d", config_info.iNum);
1728 /***************************Go-lite Optimization changes end***********************/ 1728 /***************************Go-lite Optimization changes end***********************/
1729 if (CphsPresent() && config_info.iNum&0x03) 1729 if (CphsPresent() && config_info.iNum&0x03)
1730 { if (info_numbers[0] != NULL&& info_numbers[0]->count != 0) 1730 { if (info_numbers[0] != NULL&& info_numbers[0]->count != 0)
1731 { type_of_list = INFO_NUM_LIST; 1731 { type_of_list = INFO_NUM_LIST;
1732 info_num_level = 1; 1732 info_num_level = 1;
1733 win = buildInfoNumberMenu(parent_win); 1733 win = buildInfoNumberMenu(parent_win);
1734 1734
1735 if (win NEQ NULL) 1735 if (win NEQ NULL)
1736 { 1736 {
1737 SEND_EVENT (win, E_INIT, 0, 0); 1737 SEND_EVENT (win, E_INIT, 0, 0);
1738 } 1738 }
1739 } 1739 }
1740 else 1740 else
1741 ShowMessage(parent_win, TxtEmptyList, TxtNull); 1741 ShowMessage(parent_win, TxtEmptyList, TxtNull);
1742 } 1742 }
1743 else 1743 else
1744 ShowMessage(parent_win, TxtNotSupported, TxtNull); 1744 ShowMessage(parent_win, TxtNotSupported, TxtNull);
1745 1745
1746 return MFW_EVENT_CONSUMED; 1746 return MFW_EVENT_CONSUMED;
1747 } 1747 }
1748 1748
1749 1749
1750 /******************************************************************************* 1750 /*******************************************************************************
1754 $Description: returns operator name data structure from CPHS SIM data 1754 $Description: returns operator name data structure from CPHS SIM data
1755 1755
1756 $Returns: see above 1756 $Returns: see above
1757 1757
1758 $Arguments: none 1758 $Arguments: none
1759 1759
1760 *******************************************************************************/ 1760 *******************************************************************************/
1761 T_MFW_CPHS_OP_NAME* CphsRequestOperatorName() 1761 T_MFW_CPHS_OP_NAME* CphsRequestOperatorName()
1762 { 1762 {
1763 return &operator_name; 1763 return &operator_name;
1764 } 1764 }
1765 1765
1766 /******************************************************************************* 1766 /*******************************************************************************
1767 1767
1769 1769
1770 $Description: indicates whether CPHS sim or not 1770 $Description: indicates whether CPHS sim or not
1771 1771
1772 $Returns: TRUE if it is, FALSe if it isn't 1772 $Returns: TRUE if it is, FALSe if it isn't
1773 $Arguments: none 1773 $Arguments: none
1774 1774
1775 *******************************************************************************/ 1775 *******************************************************************************/
1776 UBYTE CphsPresent() 1776 UBYTE CphsPresent()
1777 { 1777 {
1778 //x0pleela 11 June, 2006 DR:OMAPS00079692 1778 //x0pleela 11 June, 2006 DR:OMAPS00079692
1779 //changed from CPHS_OK to MFW_CPHS_OK 1779 //changed from CPHS_OK to MFW_CPHS_OK
1792 1792
1793 $Description: indicates whether a CPHS SIM which supports mailbox numbers 1793 $Description: indicates whether a CPHS SIM which supports mailbox numbers
1794 1794
1795 $Returns: TRUE if it is, FALSe if it isn't 1795 $Returns: TRUE if it is, FALSe if it isn't
1796 $Arguments: none 1796 $Arguments: none
1797 1797
1798 *******************************************************************************/ 1798 *******************************************************************************/
1799 USHORT CphsMailboxPresent( /*struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi*/ ) 1799 USHORT CphsMailboxPresent( /*struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi*/ )
1800 { T_MFW_CPHS_INFO config_info; 1800 { T_MFW_CPHS_INFO config_info;
1801 1801
1802 TRACE_FUNCTION("CphsMailboxPresent"); 1802 TRACE_FUNCTION("CphsMailboxPresent");
1813 $Function: ALSPresent 1813 $Function: ALSPresent
1814 1814
1815 $Description: indicates whether a CPHS SIM supports ALS by checking CSP 1815 $Description: indicates whether a CPHS SIM supports ALS by checking CSP
1816 1816
1817 $Returns: 0 if it does, 1 if it doesn't 1817 $Returns: 0 if it does, 1 if it doesn't
1818 $Arguments: menu tag, menu attribute tag, menu item tag (none of them used, 1818 $Arguments: menu tag, menu attribute tag, menu item tag (none of them used,
1819 this is merely the format for menu display/suppression functions) 1819 this is merely the format for menu display/suppression functions)
1820 1820
1821 *******************************************************************************/ 1821 *******************************************************************************/
1822 USHORT ALSPresent( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ) 1822 USHORT ALSPresent( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi )
1823 { 1823 {
1824 //xvilliva SPR17291 - The pre-existing code was returning ALS not supported 1824 //xvilliva SPR17291 - The pre-existing code was returning ALS not supported
1825 // even if it the SIM supported. Changed the code to call 1825 // even if it the SIM supported. Changed the code to call
1826 // tAT_PercentALS() and qAT_PercentALS(). 1826 // tAT_PercentALS() and qAT_PercentALS().
1827 1827
1828 #ifndef FF_CPHS 1828 #ifndef FF_CPHS
1829 T_ACI_ALS_MOD ALSmode = (T_ACI_ALS_MOD)0; // RAVI 1829 T_ACI_ALS_MOD ALSmode = (T_ACI_ALS_MOD)0; // RAVI
1830 #endif 1830 #endif
1831 1831
1852 $Function: CphsALSUnlocked 1852 $Function: CphsALSUnlocked
1853 1853
1854 $Description: Indicates whether a CPHS SIM's support of ALS has been locked by the User 1854 $Description: Indicates whether a CPHS SIM's support of ALS has been locked by the User
1855 1855
1856 $Returns: 0 if it hasn't, 1 if it has 1856 $Returns: 0 if it hasn't, 1 if it has
1857 $Arguments: menu tag, menu attribute tag, menu item tag (none of them used, 1857 $Arguments: menu tag, menu attribute tag, menu item tag (none of them used,
1858 this is merely the format for menu display/suppression functions) 1858 this is merely the format for menu display/suppression functions)
1859 1859
1860 *******************************************************************************/ 1860 *******************************************************************************/
1861 USHORT CphsALSUnlocked( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ) 1861 USHORT CphsALSUnlocked( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi )
1862 { 1862 {
1863 USHORT retVal = CphsALSLocked(m, ma, mi); 1863 USHORT retVal = CphsALSLocked(m, ma, mi);
1864 1864
1865 if (retVal == 0) 1865 if (retVal == 0)
1866 retVal = 1; 1866 retVal = 1;
1867 else 1867 else
1868 retVal = 0; 1868 retVal = 0;
1869 1869
1870 return (retVal); 1870 return (retVal);
1871 } 1871 }
1872 /******************************************************************************* 1872 /*******************************************************************************
1873 1873
1874 $Function: CphsALSUnlocked 1874 $Function: CphsALSUnlocked
1875 1875
1876 $Description: Indicates whether a CPHS SIM's support of ALS has been locked by the User 1876 $Description: Indicates whether a CPHS SIM's support of ALS has been locked by the User
1877 1877
1878 $Returns: 0 if it has, 1 if it hasn't 1878 $Returns: 0 if it has, 1 if it hasn't
1879 $Arguments: menu tag, menu attribute tag, menu item tag (none of them used, 1879 $Arguments: menu tag, menu attribute tag, menu item tag (none of them used,
1880 this is merely the format for menu display/suppression functions) 1880 this is merely the format for menu display/suppression functions)
1881 1881
1882 *******************************************************************************/ 1882 *******************************************************************************/
1883 USHORT CphsALSLocked( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ) 1883 USHORT CphsALSLocked( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi )
1884 { 1884 {
1885 USHORT retVal; 1885 USHORT retVal;
1886 1886
1887 if (als_status.status == MFW_LINE_LOCKED) 1887 if (als_status.status == MFW_LINE_LOCKED)
1888 retVal = 0; 1888 retVal = 0;
1889 else 1889 else
1890 retVal = 1; 1890 retVal = 1;
1891 1891
1892 return (retVal); 1892 return (retVal);
1893 } 1893 }
1894 /******************************************************************************* 1894 /*******************************************************************************
1895 1895
1896 $Function: InfoNumbersPresent 1896 $Function: InfoNumbersPresent
1897 1897
1898 $Description: indicates whether a CPHS SIM has Info Numbers by checking CSP 1898 $Description: indicates whether a CPHS SIM has Info Numbers by checking CSP
1899 1899
1900 $Returns: 0 if it does, 1 if it doesn't 1900 $Returns: 0 if it does, 1 if it doesn't
1901 $Arguments: none 1901 $Arguments: none
1902 1902
1903 *******************************************************************************/ 1903 *******************************************************************************/
1904 USHORT InfoNumbersPresent( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ) 1904 USHORT InfoNumbersPresent( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi )
1905 { T_MFW_CPHS_INFO config_info; 1905 { T_MFW_CPHS_INFO config_info;
1906 1906
1907 int i,len; 1907 int i,len;
1908 cphs_config(&config_info); 1908 cphs_config(&config_info);
1909 /***************************Go-lite Optimization changes Start***********************/ 1909 /***************************Go-lite Optimization changes Start***********************/
1910 //Aug 16, 2004 REF: CRR 24323 Deepa M.D 1910 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
1911 TRACE_EVENT_P1("InfoNum config: %d", config_info.iNum); 1911 TRACE_EVENT_P1("InfoNum config: %d", config_info.iNum);
1912 /***************************Go-lite Optimization changes end***********************/ 1912 /***************************Go-lite Optimization changes end***********************/
1913 len = strlen((char*)customer_service_profile.csp); /* x0039928 - Lint warning fix */ 1913 len = strlen((char*)customer_service_profile.csp); /* x0039928 - Lint warning fix */
1914 for(i=0; i<len; i+=2) 1914 for(i=0; i<len; i+=2)
1915 { 1915 {
1916 if (customer_service_profile.csp[i] ==CPHS_INFONUMS_BYTE_VALUE) 1916 if (customer_service_profile.csp[i] ==CPHS_INFONUMS_BYTE_VALUE)
1917 if (customer_service_profile.csp[(i+1)] & INFONUM_MASK) 1917 if (customer_service_profile.csp[(i+1)] & INFONUM_MASK)
1918 return 0; //ALS is supported 1918 return 0; //ALS is supported
1919 } 1919 }
1925 1925
1926 $Description: Asks MFW to check voicemail status on CPHS SIM 1926 $Description: Asks MFW to check voicemail status on CPHS SIM
1927 cphs_mfw_cb handles callback from this 1927 cphs_mfw_cb handles callback from this
1928 $Returns: status of line passed as parameter 1928 $Returns: status of line passed as parameter
1929 $Arguments: line 1929 $Arguments: line
1930 1930
1931 *******************************************************************************/ 1931 *******************************************************************************/
1932 T_MFW_CFLAG_STATUS GetCphsVoicemailStatus(UBYTE line) 1932 T_MFW_CFLAG_STATUS GetCphsVoicemailStatus(UBYTE line)
1933 { 1933 {
1934 cphs_get_mailbox_status (); 1934 cphs_get_mailbox_status ();
1935 TRACE_EVENT("Requesting voicemail status"); 1935 TRACE_EVENT("Requesting voicemail status");
1936 1936
1937 /*SPR 2653, removed unneccessary code*/ 1937 /*SPR 2653, removed unneccessary code*/
1938 /*requesting the mailbox status will trigger an event from the MFW if 1938 /*requesting the mailbox status will trigger an event from the MFW if
1939 CPHS is supported and that event will cause a voicemail indication window if a 1939 CPHS is supported and that event will cause a voicemail indication window if a
1940 voicemail flag has been set in the SIM*/ 1940 voicemail flag has been set in the SIM*/
1941 return MFW_CFLAG_NotPresent; 1941 return MFW_CFLAG_NotPresent;
1942 1942
1943 1943
1944 } 1944 }
1948 1948
1949 $Description: get call forwarding status of specified line 1949 $Description: get call forwarding status of specified line
1950 cphs_mfw_cb handles callback from this 1950 cphs_mfw_cb handles callback from this
1951 $Returns: status of line passed as parameter 1951 $Returns: status of line passed as parameter
1952 $Arguments: line 1952 $Arguments: line
1953 1953
1954 *******************************************************************************/ 1954 *******************************************************************************/
1955 1955
1956 T_MFW_CFLAG_STATUS GetCphsDivertStatus(UBYTE line) 1956 T_MFW_CFLAG_STATUS GetCphsDivertStatus(UBYTE line)
1957 { 1957 {
1958 switch (line) 1958 switch (line)
1959 { 1959 {
1960 case MFW_SERV_LINE1: return call_forwarding_status.line1; //break; // RAVI 1960 case MFW_SERV_LINE1: return call_forwarding_status.line1; //break; // RAVI
1961 case MFW_SERV_LINE2: return call_forwarding_status.line2; // break; // RAVI 1961 case MFW_SERV_LINE2: return call_forwarding_status.line2; // break; // RAVI
1962 case MFW_SERV_FAX: return call_forwarding_status.fax; // break; // RAVI 1962 case MFW_SERV_FAX: return call_forwarding_status.fax; // break; // RAVI
1967 1967
1968 /******************************************************************************* 1968 /*******************************************************************************
1969 1969
1970 $Function: GetCphsRel4DivertStatus 1970 $Function: GetCphsRel4DivertStatus
1971 1971
1972 $Description: get current call forwarding status 1972 $Description: get current call forwarding status
1973 $Arguments: none 1973 $Arguments: none
1974 1974
1975 *******************************************************************************/ 1975 *******************************************************************************/
1976 #ifdef FF_CPHS_REL4 1976 #ifdef FF_CPHS_REL4
1977 T_MFW_CPHS_REL4_DV_STAT GetCphsRel4DivertStatus() 1977 T_MFW_CPHS_REL4_DV_STAT GetCphsRel4DivertStatus()
1978 { 1978 {
1979 TRACE_FUNCTION("GetCphsRel4DivertStatus()"); 1979 TRACE_FUNCTION("GetCphsRel4DivertStatus()");
1980 return call_forwarding_status_rel4; 1980 return call_forwarding_status_rel4;
1981 } 1981 }
1982 1982
1983 1983
1987 1987
1988 $Description: says whether the file is allocated and activated or not 1988 $Description: says whether the file is allocated and activated or not
1989 $Arguments: none 1989 $Arguments: none
1990 $Returns : TRUE - if present 1990 $Returns : TRUE - if present
1991 FALSE - if absent 1991 FALSE - if absent
1992 1992
1993 *******************************************************************************/ 1993 *******************************************************************************/
1994 BOOL isCFISFilePresent() 1994 BOOL isCFISFilePresent()
1995 { 1995 {
1996 TRACE_FUNCTION("isCFISFilePresent()"); 1996 TRACE_FUNCTION("isCFISFilePresent()");
1997 if(sim_serv_table_check((UBYTE)SRV_No_55) == ALLOCATED_AND_ACTIVATED) 1997 if(sim_serv_table_check((UBYTE)SRV_No_55) == ALLOCATED_AND_ACTIVATED)
2012 2012
2013 $Description: says whether the file is allocated and activated or not 2013 $Description: says whether the file is allocated and activated or not
2014 $Arguments: none 2014 $Arguments: none
2015 $Returns : TRUE - if present 2015 $Returns : TRUE - if present
2016 FALSE - if absent 2016 FALSE - if absent
2017 2017
2018 *******************************************************************************/ 2018 *******************************************************************************/
2019 BOOL isMWISFilePresent(void) 2019 BOOL isMWISFilePresent(void)
2020 { 2020 {
2021 TRACE_FUNCTION("isMWISFilePresent()"); 2021 TRACE_FUNCTION("isMWISFilePresent()");
2022 if(sim_serv_table_check((UBYTE)SRV_No_54) == ALLOCATED_AND_ACTIVATED) 2022 if(sim_serv_table_check((UBYTE)SRV_No_54) == ALLOCATED_AND_ACTIVATED)
2027 else 2027 else
2028 { 2028 {
2029 TRACE_EVENT("MWIS NOT PRESENT"); 2029 TRACE_EVENT("MWIS NOT PRESENT");
2030 FALSE; 2030 FALSE;
2031 } 2031 }
2032 2032
2033 } 2033 }
2034 2034
2035 /******************************************************************************* 2035 /*******************************************************************************
2036 2036
2037 $Function: isMBDNFilePresent 2037 $Function: isMBDNFilePresent
2038 2038
2039 $Description: says whether the file is allocated and activated or not 2039 $Description: says whether the file is allocated and activated or not
2040 $Arguments: none 2040 $Arguments: none
2041 $Returns : TRUE - if present 2041 $Returns : TRUE - if present
2042 FALSE - if absent 2042 FALSE - if absent
2043 2043
2044 *******************************************************************************/ 2044 *******************************************************************************/
2045 BOOL isMBDNFilePresent(void) 2045 BOOL isMBDNFilePresent(void)
2046 { 2046 {
2047 TRACE_FUNCTION("isMWISFilePresent()"); 2047 TRACE_FUNCTION("isMWISFilePresent()");
2048 if(sim_serv_table_check((UBYTE)SRV_No_53) == ALLOCATED_AND_ACTIVATED) 2048 if(sim_serv_table_check((UBYTE)SRV_No_53) == ALLOCATED_AND_ACTIVATED)
2053 else 2053 else
2054 { 2054 {
2055 TRACE_EVENT("MBDN NOT PRESENT"); 2055 TRACE_EVENT("MBDN NOT PRESENT");
2056 FALSE; 2056 FALSE;
2057 } 2057 }
2058 2058
2059 } 2059 }
2060 #endif 2060 #endif
2061 2061
2062 /******************************************************************************* 2062 /*******************************************************************************
2063 2063
2064 $Function: GetAlsLine 2064 $Function: GetAlsLine
2065 $Description: gets current als line 2065 $Description: gets current als line
2066 $Returns: current als line 2066 $Returns: current als line
2067 $Arguments: line 2067 $Arguments: line
2068 2068
2069 *******************************************************************************/ 2069 *******************************************************************************/
2070 UBYTE GetAlsLine() 2070 UBYTE GetAlsLine()
2071 { 2071 {
2072 return als_status.selectedLine; 2072 return als_status.selectedLine;
2073 } 2073 }
2074 2074
2075 /******************************************************************************* 2075 /*******************************************************************************
2076 2076
2077 $Function: ShowMessage 2077 $Function: ShowMessage
2078 $Description: Displays screen with passed text ids 2078 $Description: Displays screen with passed text ids
2079 $Returns: nothing 2079 $Returns: nothing
2080 $Arguments: parent window, 2 text ids 2080 $Arguments: parent window, 2 text ids
2081 2081
2082 *******************************************************************************/ 2082 *******************************************************************************/
2083 void ShowMessage(T_MFW_HND win, USHORT TextId1, USHORT TextId2) 2083 void ShowMessage(T_MFW_HND win, USHORT TextId1, USHORT TextId2)
2084 { 2084 {
2085 2085
2086 T_DISPLAY_DATA Dialog; 2086 T_DISPLAY_DATA Dialog;
2100 2100
2101 $Function: mmi_cphs_wait_dialog 2101 $Function: mmi_cphs_wait_dialog
2102 $Description: Displays the "Pls. wait" Dialog 2102 $Description: Displays the "Pls. wait" Dialog
2103 $Returns: Nothing 2103 $Returns: Nothing
2104 $Arguments: parent window 2104 $Arguments: parent window
2105 2105
2106 *******************************************************************************/ 2106 *******************************************************************************/
2107 void mmi_cphs_wait_dialog(T_MFW_HND win) 2107 void mmi_cphs_wait_dialog(T_MFW_HND win)
2108 { 2108 {
2109 2109
2110 cphs_wait_dialog_win = NULL; 2110 cphs_wait_dialog_win = NULL;
2124 2124
2125 $Function: mmi_cphs_wait_dialog_destroy 2125 $Function: mmi_cphs_wait_dialog_destroy
2126 $Description: Deletes the "Pls. wait" Dialog 2126 $Description: Deletes the "Pls. wait" Dialog
2127 $Returns: Nothing 2127 $Returns: Nothing
2128 $Arguments: None 2128 $Arguments: None
2129 2129
2130 *******************************************************************************/ 2130 *******************************************************************************/
2131 void mmi_cphs_wait_dialog_destroy(void) 2131 void mmi_cphs_wait_dialog_destroy(void)
2132 { 2132 {
2133 if ( cphs_wait_dialog_win != NULL ) 2133 if ( cphs_wait_dialog_win != NULL )
2134 { 2134 {
2135 SEND_EVENT( cphs_wait_dialog_win, DIALOG_DESTROY, 0, &mmi_cphs_wait_dialog_data ); 2135 SEND_EVENT( cphs_wait_dialog_win, DIALOG_DESTROY, 0, &mmi_cphs_wait_dialog_data );
2136 } 2136 }
2137 2137
2138 cphs_wait_dialog_win = NULL; 2138 cphs_wait_dialog_win = NULL;
2139 memset( (void *)&mmi_cphs_wait_dialog_data, 0, sizeof(T_DISPLAY_DATA) ); 2139 memset( (void *)&mmi_cphs_wait_dialog_data, 0, sizeof(T_DISPLAY_DATA) );
2140 } 2140 }
2141 2141
2142 2142
2143 /****************************************************************************** 2143 /******************************************************************************
2144 2144
2145 Private functions 2145 Private functions
2146 2146
2147 *******************************************************************************/ 2147 *******************************************************************************/
2148 2148
2149 T_MFW_HND edit_mailbox_start(T_MFW_HND parent_window) 2149 T_MFW_HND edit_mailbox_start(T_MFW_HND parent_window)
2150 { 2150 {
2151 T_MFW_HND win = mmi_cphs_create(parent_window); 2151 T_MFW_HND win = mmi_cphs_create(parent_window);
2152 TRACE_FUNCTION("calc_start()"); 2152 TRACE_FUNCTION("calc_start()");
2153 if (win NEQ NULL) 2153 if (win NEQ NULL)
2154 { 2154 {
2155 SEND_EVENT(win, MAILBOX, NULL, NULL); 2155 SEND_EVENT(win, MAILBOX, NULL, NULL);
2156 2156
2157 } 2157 }
2158 2158
2159 return win; 2159 return win;
2160 } 2160 }
2161 2161
2162 2162
2163 2163
2164 2164
2165 2165
2174 2174
2175 // Create window handler 2175 // Create window handler
2176 data->mailbox_win = win_create (parent, 0, E_WIN_VISIBLE, (MfwCb)cphs_win_cb); 2176 data->mailbox_win = win_create (parent, 0, E_WIN_VISIBLE, (MfwCb)cphs_win_cb);
2177 if (data->mailbox_win EQ NULL) 2177 if (data->mailbox_win EQ NULL)
2178 { 2178 {
2179 2179
2180 return NULL; 2180 return NULL;
2181 } 2181 }
2182 // connect the dialog data to the MFW-window 2182 // connect the dialog data to the MFW-window
2183 data->mmi_control.dialog = (T_DIALOG_FUNC)cphs_dialog_cb; 2183 data->mmi_control.dialog = (T_DIALOG_FUNC)cphs_dialog_cb;
2184 data->mmi_control.data = data; 2184 data->mmi_control.data = data;
2191 } 2191 }
2192 2192
2193 void mailbox_destroy(MfwHnd own_window) 2193 void mailbox_destroy(MfwHnd own_window)
2194 { 2194 {
2195 T_MFW_WIN * win_data; 2195 T_MFW_WIN * win_data;
2196 T_MMI_CPHS_DATA * data = NULL; 2196 T_MMI_CPHS_DATA * data = NULL;
2197 2197
2198 if (own_window) 2198 if (own_window)
2199 { 2199 {
2200 2200
2201 win_data = ((T_MFW_HDR *)own_window)->data; 2201 win_data = ((T_MFW_HDR *)own_window)->data;
2202 if (win_data != NULL) //PATCH TB 2202 if (win_data != NULL) //PATCH TB
2203 data = (T_MMI_CPHS_DATA *)win_data->user; 2203 data = (T_MMI_CPHS_DATA *)win_data->user;
2204 2204
2205 if (data) 2205 if (data)
2206 { 2206 {
2207 TRACE_EVENT ("mailbox_destroy()"); 2207 TRACE_EVENT ("mailbox_destroy()");
2208 2208
2209 win_delete (data->win); 2209 win_delete (data->win);
2210 // Free Memory 2210 // Free Memory
2211 FREE_MEMORY ((void *)data, sizeof (T_MMI_CPHS_DATA)); 2211 FREE_MEMORY ((void *)data, sizeof (T_MMI_CPHS_DATA));
2212 2212
2213 } 2213 }
2214 else 2214 else
2215 { 2215 {
2216 TRACE_EVENT ("mailbox_destroy() called twice"); 2216 TRACE_EVENT ("mailbox_destroy() called twice");
2217 } 2217 }
2219 } 2219 }
2220 2220
2221 void cphs_dialog_cb(T_MFW_HND win, USHORT e, SHORT identifier, void *parameter) 2221 void cphs_dialog_cb(T_MFW_HND win, USHORT e, SHORT identifier, void *parameter)
2222 { TRACE_EVENT("cphs_dialog_cb()"); 2222 { TRACE_EVENT("cphs_dialog_cb()");
2223 switch(e) 2223 switch(e)
2224 { case (MAILBOX): 2224 { case (MAILBOX):
2225 cphs_get_mailbox();break; 2225 cphs_get_mailbox();break;
2226 default: break; 2226 default: break;
2227 } 2227 }
2228 } 2228 }
2229 2229
2230 static int cphs_win_cb (T_MFW_EVENT event, T_MFW_WIN * win) 2230 static int cphs_win_cb (T_MFW_EVENT event, T_MFW_WIN * win)
2231 { 2231 {
2232 T_MMI_CPHS_DATA * data = (T_MMI_CPHS_DATA *)win->user; 2232 T_MMI_CPHS_DATA * data = (T_MMI_CPHS_DATA *)win->user;
2233 2233
2234 TRACE_FUNCTION ("cphs_win_cb()"); 2234 TRACE_FUNCTION ("cphs_win_cb()");
2235 2235
2236 if(data EQ 0) 2236 if(data EQ 0)
2237 return 1; 2237 return 1;
2238 switch (event) 2238 switch (event)
2252 2252
2253 $Function: show_cphs_mb_numbers 2253 $Function: show_cphs_mb_numbers
2254 $Description: Show the list of mailbox numbers 2254 $Description: Show the list of mailbox numbers
2255 $Returns: nothing 2255 $Returns: nothing
2256 $Arguments: none 2256 $Arguments: none
2257 2257
2258 *******************************************************************************/ 2258 *******************************************************************************/
2259 void show_cphs_mb_numbers() 2259 void show_cphs_mb_numbers()
2260 { 2260 {
2261 T_MFW_HND win; 2261 T_MFW_HND win;
2262 T_MFW_HND parent_win= mfw_parent(mfw_header()); 2262 T_MFW_HND parent_win= mfw_parent(mfw_header());
2278 2278
2279 $Function: show_cphs_mb_number 2279 $Function: show_cphs_mb_number
2280 $Description: Show the passed mailbox number in editor 2280 $Description: Show the passed mailbox number in editor
2281 $Returns: status int 2281 $Returns: status int
2282 $Arguments: mailbox number entry 2282 $Arguments: mailbox number entry
2283 2283
2284 *******************************************************************************/ 2284 *******************************************************************************/
2285 2285
2286 int show_cphs_mb_number(T_MFW_CPHS_ENTRY* mb_number) 2286 int show_cphs_mb_number(T_MFW_CPHS_ENTRY* mb_number)
2287 { T_MFW_HND parent_win = mfw_parent(mfw_header()); 2287 { T_MFW_HND parent_win = mfw_parent(mfw_header());
2288 #ifdef NEW_EDITOR 2288 #ifdef NEW_EDITOR
2294 2294
2295 TRACE_FUNCTION("show_cphs_mb_number"); 2295 TRACE_FUNCTION("show_cphs_mb_number");
2296 2296
2297 memset( temp_number, 0, (MFW_CPHS_VM_NUMBER_MAXLEN - 10) ); 2297 memset( temp_number, 0, (MFW_CPHS_VM_NUMBER_MAXLEN - 10) );
2298 2298
2299 //if it's an international number without a '+' 2299 //if it's an international number without a '+'
2300 if (mb_number->ton == MFW_TON_INTERNATIONAL && mb_number->number[0] != '+') 2300 if (mb_number->ton == MFW_TON_INTERNATIONAL && mb_number->number[0] != '+')
2301 { strcat(temp_number, "+"); //put a + in front of number 2301 { strcat(temp_number, "+"); //put a + in front of number
2302 strncat(temp_number, (char*)mb_number->number, (PHB_MAX_LEN - 1) ); 2302 strncat(temp_number, (char*)mb_number->number, (PHB_MAX_LEN - 1) );
2303 strcpy((char*)mb_number->number, temp_number); 2303 strcpy((char*)mb_number->number, temp_number);
2304 } 2304 }
2316 2316
2317 AUI_edit_Start(parent_win, &editor_data); 2317 AUI_edit_Start(parent_win, &editor_data);
2318 #else /* NEW_EDITOR */ 2318 #else /* NEW_EDITOR */
2319 editor_attr_init(&editor_data.editor_attr, 0, edtCurBar1, NULL, (char*)mb_number->number, PHB_MAX_LEN-1, COLOUR_EDITOR); 2319 editor_attr_init(&editor_data.editor_attr, 0, edtCurBar1, NULL, (char*)mb_number->number, PHB_MAX_LEN-1, COLOUR_EDITOR);
2320 editor_data_init(&editor_data, (T_EDIT_CB)mailbox_edit_cb, TxtSoftOK, TxtDelete, NULL, 1, DIGITS_MODE, FOREVER); 2320 editor_data_init(&editor_data, (T_EDIT_CB)mailbox_edit_cb, TxtSoftOK, TxtDelete, NULL, 1, DIGITS_MODE, FOREVER);
2321 editor_data.Identifier = 0; 2321 editor_data.Identifier = 0;
2322 editor_data.hide = FALSE; 2322 editor_data.hide = FALSE;
2323 editor_data.destroyEditor = TRUE; 2323 editor_data.destroyEditor = TRUE;
2324 editor_data.TextString = NULL; /*MC SPR 1257, stops glitch in Chinese*/ 2324 editor_data.TextString = NULL; /*MC SPR 1257, stops glitch in Chinese*/
2325 2325
2326 2326
2327 editor_start(parent_win,&editor_data); /* start the editor */ 2327 editor_start(parent_win,&editor_data); /* start the editor */
2328 #endif /* NEW_EDITOR */ 2328 #endif /* NEW_EDITOR */
2329 return 1; 2329 return 1;
2330 } 2330 }
2331 2331
2332 #ifdef FF_CPHS_REL4 2332 #ifdef FF_CPHS_REL4
2333 /******************************************************************************* 2333 /*******************************************************************************
2334 2334
2335 $Function: show_cphs_rel4_mb_number 2335 $Function: show_cphs_rel4_mb_number
2336 $Description: Show the passed cphs rel4 mailbox number in editor 2336 $Description: Show the passed cphs rel4 mailbox number in editor
2337 $Returns: status int 2337 $Returns: status int
2338 $Arguments: mailbox number entry 2338 $Arguments: mailbox number entry
2339 2339
2340 *******************************************************************************/ 2340 *******************************************************************************/
2341 2341
2342 int show_cphs_rel4_mb_number(T_MFW_MBDN* mb_number) 2342 int show_cphs_rel4_mb_number(T_MFW_MBDN* mb_number)
2343 { T_MFW_HND parent_win = mfw_parent(mfw_header()); 2343 { T_MFW_HND parent_win = mfw_parent(mfw_header());
2344 #ifdef NEW_EDITOR 2344 #ifdef NEW_EDITOR
2350 2350
2351 TRACE_FUNCTION("show_cphs_mb_number"); 2351 TRACE_FUNCTION("show_cphs_mb_number");
2352 2352
2353 memset(temp_number, 0, MAX_MB_NUM_LEN); 2353 memset(temp_number, 0, MAX_MB_NUM_LEN);
2354 2354
2355 //if it's an international number without a '+' 2355 //if it's an international number without a '+'
2356 if (mb_number->type.ton == MFW_TON_INTERNATIONAL && mb_number->number[0] != '+') 2356 if (mb_number->type.ton == MFW_TON_INTERNATIONAL && mb_number->number[0] != '+')
2357 { strcat(temp_number, "+"); //put a + in front of number 2357 { strcat(temp_number, "+"); //put a + in front of number
2358 strcat(temp_number, (char*)mb_number->number); 2358 strcat(temp_number, (char*)mb_number->number);
2359 strcpy((char*)mb_number->number, temp_number); 2359 strcpy((char*)mb_number->number, temp_number);
2360 } 2360 }
2377 case T_MFW_CPHS_REL4_MAILBOX_ELECTRONIC: 2377 case T_MFW_CPHS_REL4_MAILBOX_ELECTRONIC:
2378 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, NULL, TxtElectronic, NULL); 2378 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, NULL, TxtElectronic, NULL);
2379 break; 2379 break;
2380 case T_MFW_CPHS_REL4_MAILBOX_OTHER: 2380 case T_MFW_CPHS_REL4_MAILBOX_OTHER:
2381 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, NULL, TxtOther, NULL); 2381 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, NULL, TxtOther, NULL);
2382 break; 2382 break;
2383 } 2383 }
2384 AUI_edit_Start(parent_win, &editor_data); 2384 AUI_edit_Start(parent_win, &editor_data);
2385 #else /* NEW_EDITOR */ 2385 #else /* NEW_EDITOR */
2386 editor_attr_init(&editor_data.editor_attr, 0, edtCurNone, NULL, (char*)mb_number->number, MAX_MB_NUM_LEN-1, COLOUR_EDITOR); 2386 editor_attr_init(&editor_data.editor_attr, 0, edtCurNone, NULL, (char*)mb_number->number, MAX_MB_NUM_LEN-1, COLOUR_EDITOR);
2387 editor_data_init(&editor_data, NULL, TxtSoftOK, NULL, NULL, 1, DIGITS_MODE, FOREVER); 2387 editor_data_init(&editor_data, NULL, TxtSoftOK, NULL, NULL, 1, DIGITS_MODE, FOREVER);
2388 editor_data.Identifier = 0; 2388 editor_data.Identifier = 0;
2389 editor_data.hide = FALSE; 2389 editor_data.hide = FALSE;
2390 editor_data.destroyEditor = TRUE; 2390 editor_data.destroyEditor = TRUE;
2391 editor_data.TextString = NULL; /*MC SPR 1257, stops glitch in Chinese*/ 2391 editor_data.TextString = NULL; /*MC SPR 1257, stops glitch in Chinese*/
2392 2392
2393 2393
2394 editor_start(parent_win,&editor_data); /* start the editor */ 2394 editor_start(parent_win,&editor_data); /* start the editor */
2395 #endif /* NEW_EDITOR */ 2395 #endif /* NEW_EDITOR */
2396 // ADDED BY RAVI - 29-11-2005 2396 // ADDED BY RAVI - 29-11-2005
2397 #if (BOARD == 61) 2397 #if (BOARD == 61)
2398 return 1; 2398 return 1;
2399 #endif 2399 #endif
2400 // END RAVI 2400 // END RAVI
2401 } 2401 }
2402 #endif 2402 #endif
2403 2403
2405 2405
2406 $Function: mailbox_edit_cb 2406 $Function: mailbox_edit_cb
2407 $Description: callback for mailbox editor screen 2407 $Description: callback for mailbox editor screen
2408 $Returns: nothing 2408 $Returns: nothing
2409 $Arguments: window, identifier, reason 2409 $Arguments: window, identifier, reason
2410 2410
2411 *******************************************************************************/ 2411 *******************************************************************************/
2412 static void mailbox_edit_cb( T_MFW_HND win, USHORT Identifier,UBYTE reason) 2412 static void mailbox_edit_cb( T_MFW_HND win, USHORT Identifier,UBYTE reason)
2413 { 2413 {
2414 T_MFW set_mailbox_errcode = MFW_CPHS_OK; 2414 T_MFW set_mailbox_errcode = MFW_CPHS_OK;
2415 UBYTE write_error_number[MFW_CPHS_VM_NUMBER_MAXLEN]; 2415 UBYTE write_error_number[MFW_CPHS_VM_NUMBER_MAXLEN];
2416 2416
2417 TRACE_FUNCTION("mailbox_edit_cb()"); 2417 TRACE_FUNCTION("mailbox_edit_cb()");
2418 switch (reason ) 2418 switch (reason )
2419 { 2419 {
2420 case INFO_KCD_LEFT: 2420 case INFO_KCD_LEFT:
2421 { 2421 {
2422 memcpy( (void *)&write_error_number[0], (void *)&cphs_voicemail_num.number[0], MFW_CPHS_VM_NUMBER_MAXLEN ); 2422 memcpy( (void *)&write_error_number[0], (void *)&cphs_voicemail_num.number[0], MFW_CPHS_VM_NUMBER_MAXLEN );
2423 memset ( (void *)&cphs_voicemail_num.number[0], 0, MFW_CPHS_VM_NUMBER_MAXLEN ); 2423 memset ( (void *)&cphs_voicemail_num.number[0], 0, MFW_CPHS_VM_NUMBER_MAXLEN );
2424 memcpy ( (void *)&cphs_voicemail_num.number[0], (void *)temp_ed, MFW_CPHS_VM_NUMBER_MAXLEN ); 2424 memcpy ( (void *)&cphs_voicemail_num.number[0], (void *)temp_ed, MFW_CPHS_VM_NUMBER_MAXLEN );
2425 2425
2426 set_mailbox_errcode = cphs_set_mailbox(&cphs_voicemail_num); 2426 set_mailbox_errcode = cphs_set_mailbox(&cphs_voicemail_num);
2427 2427
2428 if ( set_mailbox_errcode == MFW_CPHS_OK ) 2428 if ( set_mailbox_errcode == MFW_CPHS_OK )
2429 { 2429 {
2430 mmi_cphs_wait_dialog(win); /* Display the "Pls. wait" Dialog as SIM Write consumes quite some time */ 2430 mmi_cphs_wait_dialog(win); /* Display the "Pls. wait" Dialog as SIM Write consumes quite some time */
2431 } 2431 }
2432 else 2432 else
2433 { 2433 {
2434 memcpy( (void *)&cphs_voicemail_numbers.entries[cphs_voicemail_num.list_index].number[0], 2434 memcpy( (void *)&cphs_voicemail_numbers.entries[cphs_voicemail_num.list_index].number[0],
2435 (void *)&write_error_number[0], MFW_CPHS_VM_NUMBER_MAXLEN); 2435 (void *)&write_error_number[0], MFW_CPHS_VM_NUMBER_MAXLEN);
2436 } 2436 }
2437 2437
2438 break; 2438 break;
2439 } 2439 }
2440 2440
2441 2441
2442 default: 2442 default:
2443 { 2443 {
2444 /* otherwise no action to be performed */ 2444 /* otherwise no action to be performed */
2445 break; 2445 break;
2446 } 2446 }
2454 2454
2455 $Function: cphs_mfw_cb 2455 $Function: cphs_mfw_cb
2456 $Description: Callback handler for mfw_cphs events 2456 $Description: Callback handler for mfw_cphs events
2457 $Returns: status int 2457 $Returns: status int
2458 $Arguments: event, parameter pointer 2458 $Arguments: event, parameter pointer
2459 2459
2460 *******************************************************************************/ 2460 *******************************************************************************/
2461 int cphs_mfw_cb(T_MFW_EVENT event, void* para) 2461 int cphs_mfw_cb(T_MFW_EVENT event, void* para)
2462 { T_MFW_HND parent = mfwParent( mfw_header()); 2462 { T_MFW_HND parent = mfwParent( mfw_header());
2463 2463
2464 // T_MFW_CPHS_VC_NUM* number_list =(T_MFW_CPHS_VC_NUM* )para; // RAVI 2464 // T_MFW_CPHS_VC_NUM* number_list =(T_MFW_CPHS_VC_NUM* )para; // RAVI
2465 2465
2466 // T_MFW_CPHS_PARA* parameter = (T_MFW_CPHS_PARA*)para; // RAVI 2466 // T_MFW_CPHS_PARA* parameter = (T_MFW_CPHS_PARA*)para; // RAVI
2467 // T_MFW_CPHS_STATUS temp; // RAVI 2467 // T_MFW_CPHS_STATUS temp; // RAVI
2468 TRACE_FUNCTION("cphs_mfw_cb"); 2468 TRACE_FUNCTION("cphs_mfw_cb");
2469 switch(event) 2469 switch(event)
2470 { case E_CPHS_IND: 2470 { case E_CPHS_IND:
2471 TRACE_EVENT("Getting cphs status"); 2471 TRACE_EVENT("Getting cphs status");
2472 if(para != NULL) 2472 if(para != NULL)
2473 { cphs_status =(* (T_MFW_CPHS_STATUS*)para); 2473 { cphs_status =(* (T_MFW_CPHS_STATUS*)para);
2474 //x0pleela 11 June, 2006 DR:OMAPS00079692 2474 //x0pleela 11 June, 2006 DR:OMAPS00079692
2475 //changed from CPHS_OK to MFW_CPHS_OK 2475 //changed from CPHS_OK to MFW_CPHS_OK
2476 if (cphs_status != MFW_CPHS_OK) 2476 if (cphs_status != MFW_CPHS_OK)
2477 { 2477 {
2478 /***************************Go-lite Optimization changes Start***********************/ 2478 /***************************Go-lite Optimization changes Start***********************/
2479 //Aug 16, 2004 REF: CRR 24323 Deepa M.D 2479 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
2480 TRACE_EVENT_P1("cphs not supported, apparently%d", cphs_status); 2480 TRACE_EVENT_P1("cphs not supported, apparently%d", cphs_status);
2481 /***************************Go-lite Optimization changes end***********************/ 2481 /***************************Go-lite Optimization changes end***********************/
2482 } 2482 }
2483 cphs_operator_name(); 2483 cphs_operator_name();
2484 } 2484 }
2485 break; 2485 break;
2486 case E_CPHS_OP_NAME: 2486 case E_CPHS_OP_NAME:
2487 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS 2487 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS
2488 TRACE_EVENT("case: E_CPHS_OP_NAME"); 2488 TRACE_EVENT("case: E_CPHS_OP_NAME");
2489 if(para != NULL) 2489 if(para != NULL)
2490 { 2490 {
2491 int csp_status; //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 - No need to include this under FF_CPHS flag. 2491 int csp_status; //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 - No need to include this under FF_CPHS flag.
2492 memcpy(&operator_name, para, sizeof(T_MFW_CPHS_OP_NAME)); 2492 memcpy(&operator_name, para, sizeof(T_MFW_CPHS_OP_NAME));
2493 TRACE_EVENT("operator name callback"); 2493 TRACE_EVENT("operator name callback");
2494 2494
2495 if (operator_name.longName.data[0] == NULL) 2495 if (operator_name.longName.data[0] == NULL)
2496 TRACE_EVENT("Blank long name"); 2496 TRACE_EVENT("Blank long name");
2497 2497
2498 if (operator_name.shortName.data[0] == NULL) 2498 if (operator_name.shortName.data[0] == NULL)
2499 TRACE_EVENT("Blank short name"); 2499 TRACE_EVENT("Blank short name");
2505 //x0pleela 11 June, 2006 DR:OMAPS00079692 2505 //x0pleela 11 June, 2006 DR:OMAPS00079692
2506 //changed from CPHS_OK to MFW_CPHS_OK 2506 //changed from CPHS_OK to MFW_CPHS_OK
2507 if( csp_status < MFW_CPHS_OK) 2507 if( csp_status < MFW_CPHS_OK)
2508 { 2508 {
2509 TRACE_EVENT("E_CPHS_OP_NAME : AOC is set to TRUE"); 2509 TRACE_EVENT("E_CPHS_OP_NAME : AOC is set to TRUE");
2510 setAOCflag(TRUE); 2510 setAOCflag(TRUE);
2511 } 2511 }
2512 #endif 2512 #endif
2513 } 2513 }
2514 break; 2514 break;
2515 case E_CPHS_GET_VC_NUM: 2515 case E_CPHS_GET_VC_NUM:
2516 { 2516 {
2517 if (para!= NULL) 2517 if (para!= NULL)
2518 { 2518 {
2519 memcpy(&cphs_voicemail_numbers, para, sizeof(T_MFW_CPHS_VC_NUM)); 2519 memcpy(&cphs_voicemail_numbers, para, sizeof(T_MFW_CPHS_VC_NUM));
2520 /***************************Go-lite Optimization changes Start***********************/ 2520 /***************************Go-lite Optimization changes Start***********************/
2521 //Aug 16, 2004 REF: CRR 24323 Deepa M.D 2521 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
2522 TRACE_EVENT_P1("Voicemail No %s", cphs_voicemail_numbers.entries[0].number); 2522 TRACE_EVENT_P1("Voicemail No %s", cphs_voicemail_numbers.entries[0].number);
2523 /***************************Go-lite Optimization changes end***********************/ 2523 /***************************Go-lite Optimization changes end***********************/
2524 show_cphs_mb_numbers(); 2524 show_cphs_mb_numbers();
2525 } 2525 }
2526 2526
2527 } 2527 }
2528 break; 2528 break;
2529 #ifdef FF_CPHS_REL4 2529 #ifdef FF_CPHS_REL4
2530 case E_CPHS_REL4_GET_MBI: 2530 case E_CPHS_REL4_GET_MBI:
2531 if(para!=NULL) 2531 if(para!=NULL)
2534 memcpy(&cphs_rel4_mbi,para,sizeof(T_MFW_CPHS_REL4_MBI)); 2534 memcpy(&cphs_rel4_mbi,para,sizeof(T_MFW_CPHS_REL4_MBI));
2535 /*get mbdn*/ 2535 /*get mbdn*/
2536 switch(mailbox_type) 2536 switch(mailbox_type)
2537 { 2537 {
2538 case T_MFW_CPHS_REL4_MAILBOX_VOICE: 2538 case T_MFW_CPHS_REL4_MAILBOX_VOICE:
2539 if(cphs_rel4_mbdn.valid & 0x01) 2539 if(cphs_rel4_mbdn.valid & 0x01)
2540 cphs_mfw_cb(E_CPHS_REL4_GET_MBDN,&(cphs_rel4_mbdn.mailbox_numbers[0])); 2540 cphs_mfw_cb(E_CPHS_REL4_GET_MBDN,&(cphs_rel4_mbdn.mailbox_numbers[0]));
2541 else 2541 else
2542 cphs_rel4_get_mailbox_no( cphs_rel4_mbi.voice); 2542 cphs_rel4_get_mailbox_no( cphs_rel4_mbi.voice);
2543 break; 2543 break;
2544 case T_MFW_CPHS_REL4_MAILBOX_FAX: 2544 case T_MFW_CPHS_REL4_MAILBOX_FAX:
2557 if(cphs_rel4_mbdn.valid & 0x08) 2557 if(cphs_rel4_mbdn.valid & 0x08)
2558 cphs_mfw_cb(E_CPHS_REL4_GET_MBDN,&(cphs_rel4_mbdn.mailbox_numbers[3])); 2558 cphs_mfw_cb(E_CPHS_REL4_GET_MBDN,&(cphs_rel4_mbdn.mailbox_numbers[3]));
2559 else 2559 else
2560 cphs_rel4_get_mailbox_no( cphs_rel4_mbi.other); 2560 cphs_rel4_get_mailbox_no( cphs_rel4_mbi.other);
2561 break; 2561 break;
2562 } 2562 }
2563 } 2563 }
2564 break; 2564 break;
2565 case E_CPHS_REL4_GET_MBDN: 2565 case E_CPHS_REL4_GET_MBDN:
2566 /*destroy the dialog showing waiting*/ 2566 /*destroy the dialog showing waiting*/
2567 SEND_EVENT(mailbox_waiting_dialog, DIALOG_DESTROY, 0, 0); 2567 SEND_EVENT(mailbox_waiting_dialog, DIALOG_DESTROY, 0, 0);
2568 if(para!=NULL) 2568 if(para!=NULL)
2569 { 2569 {
2570 2570
2571 /*update local cache and show mailbox number*/ 2571 /*update local cache and show mailbox number*/
2572 switch(mailbox_type) 2572 switch(mailbox_type)
2590 memcpy(&cphs_rel4_mbdn.mailbox_numbers[3],para,sizeof(T_MFW_MBDN)); 2590 memcpy(&cphs_rel4_mbdn.mailbox_numbers[3],para,sizeof(T_MFW_MBDN));
2591 cphs_rel4_mbdn.valid|=0x08; 2591 cphs_rel4_mbdn.valid|=0x08;
2592 show_cphs_rel4_mb_number(&cphs_rel4_mbdn.mailbox_numbers[3]); 2592 show_cphs_rel4_mb_number(&cphs_rel4_mbdn.mailbox_numbers[3]);
2593 break; 2593 break;
2594 } 2594 }
2595 2595
2596 } 2596 }
2597 break; 2597 break;
2598 #endif 2598 #endif
2599 case E_CPHS_SET_VC_NUM: 2599 case E_CPHS_SET_VC_NUM:
2600 { //result of writing mailbox number 2600 { //result of writing mailbox number
2601 UBYTE write_result; 2601 UBYTE write_result;
2602 if(para != NULL) 2602 if(para != NULL)
2603 { write_result = *(UBYTE*)para; 2603 { write_result = *(UBYTE*)para;
2604 mmi_cphs_wait_dialog_destroy(); /* Delete the "Pls. wait" screen */ 2604 mmi_cphs_wait_dialog_destroy(); /* Delete the "Pls. wait" screen */
2605 if (write_result == MFW_SIMOP_WRITE_OK) 2605 if (write_result == MFW_SIMOP_WRITE_OK)
2606 ShowMessage(parent, TxtSaved, TxtNull); 2606 ShowMessage(parent, TxtSaved, TxtNull);
2607 else 2607 else
2608 ShowMessage(parent, TxtWriteError, TxtNull);//display "Write Error" 2608 ShowMessage(parent, TxtWriteError, TxtNull);//display "Write Error"
2609 } 2609 }
2610 } 2610 }
2611 break; 2611 break;
2612 case E_CPHS_GET_VC_STAT: 2612 case E_CPHS_GET_VC_STAT:
2613 { 2613 {
2614 MfwHnd idle_win =idle_get_window(); 2614 MfwHnd idle_win =idle_get_window();
2615 // UBYTE line; // RAVI 2615 // UBYTE line; // RAVI
2616 2616
2617 /*a0393213 cphs rel4 - the parameter sent are of different type for CPHS Rel4 and non-CPHS Rel4*/ 2617 /*a0393213 cphs rel4 - the parameter sent are of different type for CPHS Rel4 and non-CPHS Rel4*/
2618 #ifdef FF_CPHS_REL4 2618 #ifdef FF_CPHS_REL4
2619 if(!isMWISFilePresent() ) 2619 if(!isMWISFilePresent() )
2620 { 2620 {
2621 #endif 2621 #endif
2622 if(para != NULL) 2622 if(para != NULL)
2624 2624
2625 TRACE_EVENT("Getting voicemail status"); 2625 TRACE_EVENT("Getting voicemail status");
2626 if (cphs_voicemail_status->line1 == MFW_CFLAG_SET) 2626 if (cphs_voicemail_status->line1 == MFW_CFLAG_SET)
2627 { 2627 {
2628 //x0pleela 01 June, 2006 DR: OMAPS00079692 2628 //x0pleela 01 June, 2006 DR: OMAPS00079692
2629 //Commented below line to avoid displaying a popup msg showing the line # 2629 //Commented below line to avoid displaying a popup msg showing the line #
2630 //Idle screen will be updated with the voice mail icon 2630 //Idle screen will be updated with the voice mail icon
2631 //ShowMessage(idle_win, TxtVoicemail, TxtLine1); 2631 //ShowMessage(idle_win, TxtVoicemail, TxtLine1);
2632 2632
2633 /* SPR#1929 - DS - Set voicemail icon on idle screen. Port of 1960 */ 2633 /* SPR#1929 - DS - Set voicemail icon on idle screen. Port of 1960 */
2634 iconsSetState(iconIdVoice); 2634 iconsSetState(iconIdVoice);
2635 } 2635 }
2636 2636
2637 2637
2638 if (cphs_voicemail_status->line2 == MFW_CFLAG_SET) 2638 if (cphs_voicemail_status->line2 == MFW_CFLAG_SET)
2639 { 2639 {
2640 //x0pleela 01 June, 2006 DR: OMAPS00079692 2640 //x0pleela 01 June, 2006 DR: OMAPS00079692
2641 //Commented below line to avoid displaying a popup msg showing the line # 2641 //Commented below line to avoid displaying a popup msg showing the line #
2642 //Idle screen will be updated with the voice mail icon 2642 //Idle screen will be updated with the voice mail icon
2643 //ShowMessage(idle_win, TxtVoicemail, TxtLine2); 2643 //ShowMessage(idle_win, TxtVoicemail, TxtLine2);
2644 2644
2645 /* SPR#1929 - DS - Set voicemail icon on idle screen. Port of 1960 */ 2645 /* SPR#1929 - DS - Set voicemail icon on idle screen. Port of 1960 */
2646 iconsSetState(iconIdVoice); 2646 iconsSetState(iconIdVoice);
2647 } 2647 }
2648 2648
2649 /* SPR#1929 - DS - Remove voicemail icon from idle screen if 2649 /* SPR#1929 - DS - Remove voicemail icon from idle screen if
2650 * there is no voicemail waiting on either line1/line2. Port of 1960. 2650 * there is no voicemail waiting on either line1/line2. Port of 1960.
2651 */ 2651 */
2652 if ( (cphs_voicemail_status->line1 != MFW_CFLAG_SET) && 2652 if ( (cphs_voicemail_status->line1 != MFW_CFLAG_SET) &&
2653 (cphs_voicemail_status->line2 != MFW_CFLAG_SET) ) 2653 (cphs_voicemail_status->line2 != MFW_CFLAG_SET) )
2654 { 2654 {
2655 iconsDeleteState(iconIdVoice); 2655 iconsDeleteState(iconIdVoice);
2656 } 2656 }
2657 } 2657 }
2658 #ifdef FF_CPHS_REL4 2658 #ifdef FF_CPHS_REL4
2659 } 2659 }
2660 else 2660 else
2661 { 2661 {
2662 if(is_message_waiting()) 2662 if(is_message_waiting())
2663 { 2663 {
2664 iconsSetState(iconIdVoice); 2664 iconsSetState(iconIdVoice);
2665 } 2665 }
2666 else 2666 else
2667 { 2667 {
2668 iconsDeleteState(iconIdVoice); 2668 iconsDeleteState(iconIdVoice);
2669 } 2669 }
2671 } 2671 }
2672 #endif 2672 #endif
2673 2673
2674 } 2674 }
2675 break; 2675 break;
2676 case E_CPHS_SET_VC_STAT: 2676 case E_CPHS_SET_VC_STAT:
2677 2677
2678 { //result of resetting mailbox status 2678 { //result of resetting mailbox status
2679 // UBYTE write_result; // RAVI 2679 // UBYTE write_result; // RAVI
2680 2680
2681 TRACE_EVENT("Mailbox status set"); 2681 TRACE_EVENT("Mailbox status set");
2682 //Update our copy of the mailbox status 2682 //Update our copy of the mailbox status
2683 GetCphsVoicemailStatus(0); 2683 GetCphsVoicemailStatus(0);
2684 } 2684 }
2685 break; 2685 break;
2686 case E_CPHS_GET_DV_STAT: 2686 case E_CPHS_GET_DV_STAT:
2687 { 2687 {
2688 /*a0393213 cphs rel4 - the parameter sent are of different type for CPHS Rel4 and non-CPHS Rel4*/ 2688 /*a0393213 cphs rel4 - the parameter sent are of different type for CPHS Rel4 and non-CPHS Rel4*/
2689 #ifdef FF_CPHS_REL4 2689 #ifdef FF_CPHS_REL4
2690 if(!isCFISFilePresent() ) 2690 if(!isCFISFilePresent() )
2691 { 2691 {
2692 #endif 2692 #endif
2693 UBYTE line; 2693 UBYTE line;
2694 //check for divert on active line 2694 //check for divert on active line
2695 line = GetAlsLine(); 2695 line = GetAlsLine();
2696 2696
2697 TRACE_EVENT_P4("cphs_mfw_cb():E_CPHS_GET_DV_STAT %d %x %x %x", ((T_MFW_CPHS_DV_STAT*)para)->result, 2697 TRACE_EVENT_P4("cphs_mfw_cb():E_CPHS_GET_DV_STAT %d %x %x %x", ((T_MFW_CPHS_DV_STAT*)para)->result,
2698 ((T_MFW_CPHS_DV_STAT*)para)->line1,((T_MFW_CPHS_DV_STAT*)para)->line2,line); 2698 ((T_MFW_CPHS_DV_STAT*)para)->line1,((T_MFW_CPHS_DV_STAT*)para)->line2,line);
2699 2699
2700 /* 30th May,2006 OMAPS00079650 a0393213 (R.Prabakar) 2700 /* 30th May,2006 OMAPS00079650 a0393213 (R.Prabakar)
2701 Description : CPHS Call Forwarding feature implementation 2701 Description : CPHS Call Forwarding feature implementation
2702 Solution : call_forwarding_status is updated. The data is not written into flash as it would be done 2702 Solution : call_forwarding_status is updated. The data is not written into flash as it would be done
2703 in E_CPHS_SET_DV_STAT. However the present code is not disturbed*/ 2703 in E_CPHS_SET_DV_STAT. However the present code is not disturbed*/
2704 2704
2705 #ifdef FF_CPHS 2705 #ifdef FF_CPHS
2706 if(((T_MFW_CPHS_DV_STAT*)para)->result == MFW_SIMOP_READ_ERR) 2706 if(((T_MFW_CPHS_DV_STAT*)para)->result == MFW_SIMOP_READ_ERR)
2707 { 2707 {
2708 2708
2709 if(FFS_flashData.CFState==TRUE) 2709 if(FFS_flashData.CFState==TRUE)
2710 { 2710 {
2711 if (line == MFW_SERV_LINE2) 2711 if (line == MFW_SERV_LINE2)
2712 ((T_MFW_CPHS_DV_STAT*)para)->line2=MFW_CFLAG_SET; 2712 ((T_MFW_CPHS_DV_STAT*)para)->line2=MFW_CFLAG_SET;
2713 else 2713 else
2714 ((T_MFW_CPHS_DV_STAT*)para)->line1=MFW_CFLAG_SET; 2714 ((T_MFW_CPHS_DV_STAT*)para)->line1=MFW_CFLAG_SET;
2715 2715
2716 } 2716 }
2717 else 2717 else
2718 { 2718 {
2719 if (line == MFW_SERV_LINE2) 2719 if (line == MFW_SERV_LINE2)
2720 ((T_MFW_CPHS_DV_STAT*)para)->line2=MFW_CFLAG_NOTSet; 2720 ((T_MFW_CPHS_DV_STAT*)para)->line2=MFW_CFLAG_NOTSet;
2732 /*if (line == MFW_SERV_LINE2) 2732 /*if (line == MFW_SERV_LINE2)
2733 DivertStatus = GetCphsDivertStatus(MFW_SERV_LINE2); 2733 DivertStatus = GetCphsDivertStatus(MFW_SERV_LINE2);
2734 else//if (line == MFW_SERV_LINE1) 2734 else//if (line == MFW_SERV_LINE1)
2735 DivertStatus = GetCphsDivertStatus(MFW_SERV_LINE1);*/ 2735 DivertStatus = GetCphsDivertStatus(MFW_SERV_LINE1);*/
2736 2736
2737 //set the call forwarding icon 2737 //set the call forwarding icon
2738 if ((GetCphsDivertStatus(MFW_SERV_LINE1)==MFW_CFLAG_SET) || 2738 if ((GetCphsDivertStatus(MFW_SERV_LINE1)==MFW_CFLAG_SET) ||
2739 (GetCphsDivertStatus(MFW_SERV_LINE2)==MFW_CFLAG_SET)) 2739 (GetCphsDivertStatus(MFW_SERV_LINE2)==MFW_CFLAG_SET))
2740 { 2740 {
2741 iconsSetState(iconIdCallFor); 2741 iconsSetState(iconIdCallFor);
2742 #ifndef FF_CPHS 2742 #ifndef FF_CPHS
2743 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) 2743 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken)
2744 // Setting the Current state of CF in Flash 2744 // Setting the Current state of CF in Flash
2745 FFS_flashData.CFState=TRUE; 2745 FFS_flashData.CFState=TRUE;
2746 #endif 2746 #endif
2747 } 2747 }
2748 //gid rid of call forwarding icon 2748 //gid rid of call forwarding icon
2749 if ((GetCphsDivertStatus(MFW_SERV_LINE1)==MFW_CFLAG_NOTSet) && 2749 if ((GetCphsDivertStatus(MFW_SERV_LINE1)==MFW_CFLAG_NOTSet) &&
2750 (GetCphsDivertStatus(MFW_SERV_LINE2)==MFW_CFLAG_NOTSet)) 2750 (GetCphsDivertStatus(MFW_SERV_LINE2)==MFW_CFLAG_NOTSet))
2751 { 2751 {
2752 iconsDeleteState(iconIdCallFor); 2752 iconsDeleteState(iconIdCallFor);
2753 #ifndef FF_CPHS 2753 #ifndef FF_CPHS
2754 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) 2754 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken)
2755 // Setting the Current state of CF in Flash 2755 // Setting the Current state of CF in Flash
2756 FFS_flashData.CFState=FALSE; 2756 FFS_flashData.CFState=FALSE;
2757 #endif 2757 #endif
2758 } 2758 }
2759 2759
2760 #ifndef FF_CPHS 2760 #ifndef FF_CPHS
2761 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) 2761 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken)
2762 // Writng the Current state of CF into ffs 2762 // Writng the Current state of CF into ffs
2763 flash_write(); 2763 flash_write();
2764 #endif 2764 #endif
2765 } 2765 }
2766 #ifdef FF_CPHS_REL4 2766 #ifdef FF_CPHS_REL4
2767 } 2767 }
2776 } 2776 }
2777 if(isMWISFilePresent()) 2777 if(isMWISFilePresent())
2778 cphs_rel4_get_mailbox_status(); 2778 cphs_rel4_get_mailbox_status();
2779 #endif 2779 #endif
2780 } 2780 }
2781 break; 2781 break;
2782 case E_CPHS_SET_DV_STAT: 2782 case E_CPHS_SET_DV_STAT:
2783 { 2783 {
2784 //result of setting divert status 2784 //result of setting divert status
2785 // UBYTE write_result; // RAVI 2785 // UBYTE write_result; // RAVI
2786 /* 30th May,2006 OMAPS00079650 a0393213 (R.Prabakar) 2786 /* 30th May,2006 OMAPS00079650 a0393213 (R.Prabakar)
2787 Description : CPHS Call Forwarding feature implementation 2787 Description : CPHS Call Forwarding feature implementation
2788 Solution : CF status is written into flash if sim write had failed*/ 2788 Solution : CF status is written into flash if sim write had failed*/
2790 if(!isCFISFilePresent() ) 2790 if(!isCFISFilePresent() )
2791 { 2791 {
2792 #endif 2792 #endif
2793 #ifdef FF_CPHS 2793 #ifdef FF_CPHS
2794 if(para != NULL) 2794 if(para != NULL)
2795 { 2795 {
2796 UBYTE write_result; 2796 UBYTE write_result;
2797 write_result = *(UBYTE*)para; 2797 write_result = *(UBYTE*)para;
2798 if (write_result == MFW_SIMOP_WRITE_OK) 2798 if (write_result == MFW_SIMOP_WRITE_OK)
2799 TRACE_EVENT("cphs_mfw_cb:Call forward flag set in sim"); 2799 TRACE_EVENT("cphs_mfw_cb:Call forward flag set in sim");
2800 if (write_result == MFW_SIMOP_WRITE_ERR) 2800 if (write_result == MFW_SIMOP_WRITE_ERR)
2801 { 2801 {
2802 TRACE_EVENT("cphs_mfw_cb:Unable to set call forward flag in sim"); 2802 TRACE_EVENT("cphs_mfw_cb:Unable to set call forward flag in sim");
2803 2803
2804 if(ss_data.cfu_services&0x01) 2804 if(ss_data.cfu_services&0x01)
2805 { 2805 {
2806 FFS_flashData.CFState=TRUE; 2806 FFS_flashData.CFState=TRUE;
2807 } 2807 }
2808 else 2808 else
2811 } 2811 }
2812 flash_write(); 2812 flash_write();
2813 } 2813 }
2814 } 2814 }
2815 #endif 2815 #endif
2816 2816
2817 cphs_get_divert_status(); //refresh divert status 2817 cphs_get_divert_status(); //refresh divert status
2818 #ifdef FF_CPHS_REL4 2818 #ifdef FF_CPHS_REL4
2819 } 2819 }
2820 else/*a0393213 cphs rel4 supported*/ 2820 else/*a0393213 cphs rel4 supported*/
2821 { 2821 {
2822 if(call_forwarding_status_rel4.voice==MFW_CFLAG_SET) 2822 if(call_forwarding_status_rel4.voice==MFW_CFLAG_SET)
2823 iconsSetState(iconIdCallFor); 2823 iconsSetState(iconIdCallFor);
2824 else 2824 else
2825 iconsDeleteState(iconIdCallFor); 2825 iconsDeleteState(iconIdCallFor);
2826 } 2826 }
2827 #endif 2827 #endif
2828 2828
2829 } 2829 }
2830 break; 2830 break;
2831 case E_CPHS_GET_ALS_STATUS: 2831 case E_CPHS_GET_ALS_STATUS:
2832 { if(para != NULL) 2832 { if(para != NULL)
2833 memcpy(&als_status, para, sizeof(T_MFW_CPHS_ALS_STATUS)); 2833 memcpy(&als_status, para, sizeof(T_MFW_CPHS_ALS_STATUS));
2834 } 2834 }
2835 break; 2835 break;
2836 case E_CPHS_SET_LINE: 2836 case E_CPHS_SET_LINE:
2837 { //result of set ALS line 2837 { //result of set ALS line
2838 UBYTE write_result; 2838 UBYTE write_result;
2839 if(para != NULL) 2839 if(para != NULL)
2840 { write_result = *(UBYTE*)para; 2840 { write_result = *(UBYTE*)para;
2841 if (write_result == MFW_SIMOP_WRITE_OK) 2841 if (write_result == MFW_SIMOP_WRITE_OK)
2851 } 2851 }
2852 #ifdef FF_CPHS 2852 #ifdef FF_CPHS
2853 mmi_cphs_get_als_info(); 2853 mmi_cphs_get_als_info();
2854 #else 2854 #else
2855 cphs_get_als_info(&als_status);//refresh current line 2855 cphs_get_als_info(&als_status);//refresh current line
2856 #endif 2856 #endif
2857 /*cphs_get_divert_status(); //refresh divert status*//*a0393213 - the call forward icon is now shown taking both the lines into consideration*/ 2857 /*cphs_get_divert_status(); //refresh divert status*//*a0393213 - the call forward icon is now shown taking both the lines into consideration*/
2858 } 2858 }
2859 break; 2859 break;
2860 case E_CPHS_SET_ALS_STATUS: 2860 case E_CPHS_SET_ALS_STATUS:
2861 { //result of setting ALS status 2861 { //result of setting ALS status
2862 UBYTE write_result; 2862 UBYTE write_result;
2863 if(para != NULL) 2863 if(para != NULL)
2864 { write_result = *(UBYTE*)para; 2864 { write_result = *(UBYTE*)para;
2865 if (write_result == MFW_SIMOP_WRITE_OK) 2865 if (write_result == MFW_SIMOP_WRITE_OK)
2868 ShowMessage(parent, TxtWriteError, TxtNull);//display "Write Error" 2868 ShowMessage(parent, TxtWriteError, TxtNull);//display "Write Error"
2869 } 2869 }
2870 } 2870 }
2871 break; 2871 break;
2872 case E_CPHS_GET_CSP: 2872 case E_CPHS_GET_CSP:
2873 { 2873 {
2874 #ifdef FF_CPHS 2874 #ifdef FF_CPHS
2875 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS 2875 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS
2876 int i; 2876 int i;
2877 #endif 2877 #endif
2878 TRACE_EVENT("Reached E_CPHS_GET_CSP"); 2878 TRACE_EVENT("Reached E_CPHS_GET_CSP");
2879 if(para != NULL) 2879 if(para != NULL)
2880 { 2880 {
2881 memcpy(&customer_service_profile, para, sizeof(T_MFW_CPHS_CSP)); 2881 memcpy(&customer_service_profile, para, sizeof(T_MFW_CPHS_CSP));
2882 2882
2883 /***************************Go-lite Optimization changes Start***********************/ 2883 /***************************Go-lite Optimization changes Start***********************/
2884 //Aug 16, 2004 REF: CRR 24323 Deepa M.D 2884 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
2885 TRACE_EVENT_P7("CSP: %x,%x,%x,%x,%x,%x,%x", customer_service_profile.csp[0], customer_service_profile.csp[1], 2885 TRACE_EVENT_P7("CSP: %x,%x,%x,%x,%x,%x,%x", customer_service_profile.csp[0], customer_service_profile.csp[1],
2886 customer_service_profile.csp[2], customer_service_profile.csp[3], customer_service_profile.csp[4], customer_service_profile.csp[5], 2886 customer_service_profile.csp[2], customer_service_profile.csp[3], customer_service_profile.csp[4], customer_service_profile.csp[5],
2887 customer_service_profile.csp[6]); 2887 customer_service_profile.csp[6]);
2888 TRACE_EVENT_P3("%x,%x,%x", customer_service_profile.csp[7], customer_service_profile.csp[8], customer_service_profile.csp[9]); 2888 TRACE_EVENT_P3("%x,%x,%x", customer_service_profile.csp[7], customer_service_profile.csp[8], customer_service_profile.csp[9]);
2889 TRACE_EVENT_P7("CSP: %x,%x,%x,%x,%x,%x,%x", customer_service_profile.csp[10], customer_service_profile.csp[11], 2889 TRACE_EVENT_P7("CSP: %x,%x,%x,%x,%x,%x,%x", customer_service_profile.csp[10], customer_service_profile.csp[11],
2890 customer_service_profile.csp[12], customer_service_profile.csp[13], customer_service_profile.csp[14], customer_service_profile.csp[15], 2890 customer_service_profile.csp[12], customer_service_profile.csp[13], customer_service_profile.csp[14], customer_service_profile.csp[15],
2891 customer_service_profile.csp[16]); 2891 customer_service_profile.csp[16]);
2892 TRACE_EVENT_P3("%x,%x,%x", customer_service_profile.csp[17], customer_service_profile.csp[18], customer_service_profile.csp[19]); 2892 TRACE_EVENT_P3("%x,%x,%x", customer_service_profile.csp[17], customer_service_profile.csp[18], customer_service_profile.csp[19]);
2893 /***************************Go-lite Optimization changes end***********************/ 2893 /***************************Go-lite Optimization changes end***********************/
2894 2894
2895 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS 2895 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS
2896 #ifdef FF_CPHS 2896 #ifdef FF_CPHS
2897 TRACE_EVENT_P2("AOC : Service group code =%d value =%d", 2897 TRACE_EVENT_P2("AOC : Service group code =%d value =%d",
2898 customer_service_profile.csp[4], customer_service_profile.csp[5]); 2898 customer_service_profile.csp[4], customer_service_profile.csp[5]);
2899 // No need to check if Aoc_flag is already set to TRUE. 2899 // No need to check if Aoc_flag is already set to TRUE.
2900 2900
2901 /*check for Byte 1 service group code =03 and Byte2 bit 6 =1*/ 2901 /*check for Byte 1 service group code =03 and Byte2 bit 6 =1*/
2902 for (i=0;i<20; i++) 2902 for (i=0;i<20; i++)
2903 { 2903 {
2904 //check for AOC bit 2904 //check for AOC bit
2905 if( customer_service_profile.csp[i] EQ 0x03) 2905 if( customer_service_profile.csp[i] EQ 0x03)
2907 if(i == 19) break; /* x0039928 - Lint warning fix */ 2907 if(i == 19) break; /* x0039928 - Lint warning fix */
2908 i++; 2908 i++;
2909 if( customer_service_profile.csp[i] & 0x20) 2909 if( customer_service_profile.csp[i] & 0x20)
2910 { 2910 {
2911 TRACE_EVENT("E_CPHS_GET_CSP: AOC flag is SET in CPHS "); 2911 TRACE_EVENT("E_CPHS_GET_CSP: AOC flag is SET in CPHS ");
2912 setAOCflag(TRUE); 2912 setAOCflag(TRUE);
2913 break; 2913 break;
2914 } 2914 }
2915 else { 2915 else {
2916 TRACE_EVENT("E_CPHS_GET_CSP: AOC flag is NOT SET in CPHS "); 2916 TRACE_EVENT("E_CPHS_GET_CSP: AOC flag is NOT SET in CPHS ");
2917 setAOCflag(FALSE); 2917 setAOCflag(FALSE);
2918 } 2918 }
2919 } 2919 }
2920 //check for ALS bit 2920 //check for ALS bit
2921 else if( customer_service_profile.csp[i] == 0x06) 2921 else if( customer_service_profile.csp[i] == 0x06)
2922 { 2922 {
2929 } 2929 }
2930 else 2930 else
2931 mmi_cphs_set_als_value( FALSE); 2931 mmi_cphs_set_als_value( FALSE);
2932 } 2932 }
2933 else 2933 else
2934 i++; 2934 i++;
2935 } 2935 }
2936 2936
2937 #endif 2937 #endif
2938 cphs_get_info_num(1, info_num_index); 2938 cphs_get_info_num(1, info_num_index);
2939 } 2939 }
2940 2940
2941 }break; 2941 }break;
2942 case E_CPHS_GET_INFO_NUM: 2942 case E_CPHS_GET_INFO_NUM:
2943 { 2943 {
2944 if(para != NULL) 2944 if(para != NULL)
2945 { 2945 {
2946 memcpy(&current_info_num, para, sizeof( T_MFW_CPHS_INFONUM_ENTRY)); 2946 memcpy(&current_info_num, para, sizeof( T_MFW_CPHS_INFONUM_ENTRY));
2947 2947
2948 TRACE_EVENT("Getting info number"); 2948 TRACE_EVENT("Getting info number");
2949 if (current_info_num.result !=MFW_SIMOP_READ_ERR) 2949 if (current_info_num.result !=MFW_SIMOP_READ_ERR)
2950 { T_DISPLAY_DATA Dialog; 2950 { T_DISPLAY_DATA Dialog;
2958 */ 2958 */
2959 info_dialog( parent, &Dialog ); 2959 info_dialog( parent, &Dialog );
2960 } 2960 }
2961 } 2961 }
2962 } 2962 }
2963 2963
2964 break; 2964 break;
2965 case E_CPHS_GET_INFO_LIST: 2965 case E_CPHS_GET_INFO_LIST:
2966 { 2966 {
2967 if (para == NULL) 2967 if (para == NULL)
2968 { 2968 {
2969 TRACE_EVENT("Invalid info num list"); 2969 TRACE_EVENT("Invalid info num list");
2970 } 2970 }
2971 else 2971 else
2972 { //populate next pointer 2972 { //populate next pointer
2973 //RAVI - 29-11-2005 2973 //RAVI - 29-11-2005
2974 /* x0045876, 14-Aug-2006 (WR - assignment in condition)*/ 2974 /* x0045876, 14-Aug-2006 (WR - assignment in condition)*/
2975 info_numbers[info_num_level] = (T_MFW_CPHS_INFONUM_LIST*) ALLOC_MEMORY(sizeof(T_MFW_CPHS_INFONUM_LIST)); 2975 info_numbers[info_num_level] = (T_MFW_CPHS_INFONUM_LIST*) ALLOC_MEMORY(sizeof(T_MFW_CPHS_INFONUM_LIST));
2976 if (info_numbers[info_num_level]) 2976 if (info_numbers[info_num_level])
2977 memcpy(info_numbers[info_num_level], para, sizeof(T_MFW_CPHS_INFONUM_LIST)); 2977 memcpy(info_numbers[info_num_level], para, sizeof(T_MFW_CPHS_INFONUM_LIST));
2978 2978
2979 2979
2980 TRACE_EVENT("Getting info numbers!!"); 2980 TRACE_EVENT("Getting info numbers!!");
2981 if (info_numbers[info_num_level]->count != 0) 2981 if (info_numbers[info_num_level]->count != 0)
2982 { 2982 {
2983 /***************************Go-lite Optimization changes Start***********************/ 2983 /***************************Go-lite Optimization changes Start***********************/
2984 //Aug 16, 2004 REF: CRR 24323 Deepa M.D 2984 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
2985 TRACE_EVENT_P1("Valid info num list, count:%d",info_numbers[info_num_level]->count); 2985 TRACE_EVENT_P1("Valid info num list, count:%d",info_numbers[info_num_level]->count);
2986 /***************************Go-lite Optimization changes end***********************/ 2986 /***************************Go-lite Optimization changes end***********************/
2987 if (info_num_level) 2987 if (info_num_level)
2988 { info_num_level++; 2988 { info_num_level++;
2989 InfoNumbers2(); 2989 InfoNumbers2();
2990 2990
2991 } 2991 }
2992 } 2992 }
2993 else 2993 else
2994 info_numbers[info_num_level]=NULL; 2994 info_numbers[info_num_level]=NULL;
2995 } 2995 }
3007 /***************************Go-lite Optimization changes Start***********************/ 3007 /***************************Go-lite Optimization changes Start***********************/
3008 //Aug 16, 2004 REF: CRR 24323 Deepa M.D 3008 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
3009 TRACE_EVENT_P3("Sim Read, Field: %d (Record: %d) Errcode: %d",temp.requested_field, temp.record, temp.sim_result); 3009 TRACE_EVENT_P3("Sim Read, Field: %d (Record: %d) Errcode: %d",temp.requested_field, temp.record, temp.sim_result);
3010 /***************************Go-lite Optimization changes end***********************/ 3010 /***************************Go-lite Optimization changes end***********************/
3011 /* SPR759 - SH - Read Sim for homezone, calls appropriate functions */ 3011 /* SPR759 - SH - Read Sim for homezone, calls appropriate functions */
3012 #ifdef MMI_HOMEZONE_ENABLED 3012 #ifdef MMI_HOMEZONE_ENABLED
3013 if (temp.requested_field>=HZ_SIM_PARAMETERS 3013 if (temp.requested_field>=HZ_SIM_PARAMETERS
3014 && temp.requested_field < (HZ_SIM_CELL_CACHE+HZ_ZONES_MAX) ) 3014 && temp.requested_field < (HZ_SIM_CELL_CACHE+HZ_ZONES_MAX) )
3015 { 3015 {
3016 homezoneReadSimCb(temp.requested_field, temp.record, temp.sim_result); 3016 homezoneReadSimCb(temp.requested_field, temp.record, temp.sim_result);
3017 } 3017 }
3038 homezoneWriteSimCb(temp.requested_field, temp.record, temp.sim_result); 3038 homezoneWriteSimCb(temp.requested_field, temp.record, temp.sim_result);
3039 } 3039 }
3040 #endif 3040 #endif
3041 } 3041 }
3042 break; 3042 break;
3043 #ifdef FF_CPHS_REL4 3043 #ifdef FF_CPHS_REL4
3044 case E_CPHS_MSP_IND: 3044 case E_CPHS_MSP_IND:
3045 { 3045 {
3046 if(para != NULL) 3046 if(para != NULL)
3047 { 3047 {
3048 msp_info = mfw_cphs_get_msp(); 3048 msp_info = mfw_cphs_get_msp();
3065 mmi_msp_interrogate(); 3065 mmi_msp_interrogate();
3066 } 3066 }
3067 } 3067 }
3068 } 3068 }
3069 break; 3069 break;
3070 #endif 3070 #endif
3071 default: break; 3071 default: break;
3072 } 3072 }
3073 3073
3074 3074
3075 return TRUE; 3075 return TRUE;
3076 } 3076 }
3077 3077
3078 3078
3086 3086
3087 $Function: int InfoNumbers2( ) 3087 $Function: int InfoNumbers2( )
3088 $Description: Displays info number sub-menus 3088 $Description: Displays info number sub-menus
3089 $Returns: status int 3089 $Returns: status int
3090 $Arguments: nothing 3090 $Arguments: nothing
3091 3091
3092 *******************************************************************************/ 3092 *******************************************************************************/
3093 //for sub-menus 3093 //for sub-menus
3094 int InfoNumbers2( ) 3094 int InfoNumbers2( )
3095 { 3095 {
3096 T_MFW_HND win; 3096 T_MFW_HND win;
3097 T_MFW_HND parent_win = mfw_parent(mfw_header()); 3097 T_MFW_HND parent_win = mfw_parent(mfw_header());
3098 3098
3099 TRACE_FUNCTION("InfoNumbers2"); 3099 TRACE_FUNCTION("InfoNumbers2");
3100 3100
3101 if (info_numbers != NULL) 3101 if (info_numbers != NULL)
3102 { type_of_list = INFO_NUM_LIST; 3102 { type_of_list = INFO_NUM_LIST;
3103 win = buildInfoNumberMenu(parent_win); 3103 win = buildInfoNumberMenu(parent_win);
3104 3104
3105 if (win NEQ NULL) 3105 if (win NEQ NULL)
3106 { 3106 {
3107 SEND_EVENT (win, E_INIT, 0, 0); 3107 SEND_EVENT (win, E_INIT, 0, 0);
3108 } 3108 }
3109 } 3109 }
3110 3110
3111 return MFW_EVENT_CONSUMED; 3111 return MFW_EVENT_CONSUMED;
3112 } 3112 }
3113 /******************************************************************************* 3113 /*******************************************************************************
3114 3114
3115 $Function: buildInfoNumberMenu 3115 $Function: buildInfoNumberMenu
3116 $Description: Creates window for Information numbers 3116 $Description: Creates window for Information numbers
3117 $Returns: window created 3117 $Returns: window created
3118 $Arguments: parent window 3118 $Arguments: parent window
3119 3119
3120 *******************************************************************************/ 3120 *******************************************************************************/
3121 static T_MFW_HND buildInfoNumberMenu( MfwHnd parent_window) 3121 static T_MFW_HND buildInfoNumberMenu( MfwHnd parent_window)
3122 { 3122 {
3123 T_INFO_NUM_INFO * data = (T_INFO_NUM_INFO *)ALLOC_MEMORY (sizeof (T_INFO_NUM_INFO)); 3123 T_INFO_NUM_INFO * data = (T_INFO_NUM_INFO *)ALLOC_MEMORY (sizeof (T_INFO_NUM_INFO));
3124 T_MFW_WIN * win; 3124 T_MFW_WIN * win;
3133 { 3133 {
3134 return NULL; 3134 return NULL;
3135 } 3135 }
3136 3136
3137 TRACE_EVENT(">>>> Info num window created: " ); 3137 TRACE_EVENT(">>>> Info num window created: " );
3138 /* 3138 /*
3139 * connect the dialog data to the MFW-window 3139 * connect the dialog data to the MFW-window
3140 */ 3140 */
3141 3141
3142 data->mmi_control.dialog = (T_DIALOG_FUNC)info_num_exec_cb; 3142 data->mmi_control.dialog = (T_DIALOG_FUNC)info_num_exec_cb;
3143 data->mmi_control.data = data; 3143 data->mmi_control.data = data;
3154 3154
3155 3155
3156 //x0012849: Jagannatha 01 June, 2006 ER: OMAPS00079607 -To Support AcC and Info numbers 3156 //x0012849: Jagannatha 01 June, 2006 ER: OMAPS00079607 -To Support AcC and Info numbers
3157 /******************************************************************************* 3157 /*******************************************************************************
3158 $Function: info_num_msg_cb 3158 $Function: info_num_msg_cb
3159 $Description: Dialogue callback function of the information Numbers message window 3159 $Description: Dialogue callback function of the information Numbers message window
3160 $Returns: none 3160 $Returns: none
3161 $Arguments: win - window handler, dialogue id, key pressed 3161 $Arguments: win - window handler, dialogue id, key pressed
3162 3162
3163 *******************************************************************************/ 3163 *******************************************************************************/
3164 #ifdef FF_CPHS 3164 #ifdef FF_CPHS
3165 void info_num_msg_cb(T_MFW_HND win, USHORT identifier, UBYTE reason) 3165 void info_num_msg_cb(T_MFW_HND win, USHORT identifier, UBYTE reason)
3166 { 3166 {
3167 3167
3168 T_MFW_HND parent = mfwParent( mfw_header()); 3168 T_MFW_HND parent = mfwParent( mfw_header());
3169 TRACE_FUNCTION ("info_num_msg_cb"); 3169 TRACE_FUNCTION ("info_num_msg_cb");
3170 switch (reason) 3170 switch (reason)
3171 { 3171 {
3172 case INFO_KCD_LEFT: 3172 case INFO_KCD_LEFT:
3173 // This code is not executed for the case - If mobile is in roaming and service is Network specific. 3173 // This code is not executed for the case - If mobile is in roaming and service is Network specific.
3174 if (info_numbers[info_num_level-1]->entry[identifier].entryStat & 0x80) //if bit 8 set/*a0393213 warnings removal - Dialog.Identifier changed to identifier*/ 3174 if (info_numbers[info_num_level-1]->entry[identifier].entryStat & 0x80) //if bit 8 set/*a0393213 warnings removal - Dialog.Identifier changed to identifier*/
3175 { 3175 {
3176 TRACE_EVENT("CPHS INFO:Should be number entry"); 3176 TRACE_EVENT("CPHS INFO:Should be number entry");
3177 if (info_num_level < 4) 3177 if (info_num_level < 4)
3178 cphs_select_info_num(info_num_index); 3178 cphs_select_info_num(info_num_index);
3179 } 3179 }
3180 else 3180 else
3181 { 3181 {
3182 if (info_num_level < 4) 3182 if (info_num_level < 4)
3183 { 3183 {
3184 TRACE_EVENT("CPHS INFO:Should be dir entry"); 3184 TRACE_EVENT("CPHS INFO:Should be dir entry");
3185 cphs_get_info_num(info_num_level+1, info_num_index+1); 3185 cphs_get_info_num(info_num_level+1, info_num_index+1);
3186 } 3186 }
3187 } 3187 }
3188 break; 3188 break;
3189 3189
3190 default: 3190 default:
3191 break; 3191 break;
3192 } 3192 }
3193 } 3193 }
3194 #endif 3194 #endif
3195 /******************************************************************************* 3195 /*******************************************************************************
3196 $Function: info_num_display_cb 3196 $Function: info_num_display_cb
3197 3197
3198 $Description: Dialogue callback function of the information Numbers display window 3198 $Description: Dialogue callback function of the information Numbers display window
3199 3199
3200 $Returns: none 3200 $Returns: none
3201 3201
3202 $Arguments: win - window handler, dialogue id, key pressed 3202 $Arguments: win - window handler, dialogue id, key pressed
3203 3203
3204 3204
3205 *******************************************************************************/ 3205 *******************************************************************************/
3206 3206
3207 void info_num_display_cb(T_MFW_HND win, USHORT identifier, UBYTE reason) 3207 void info_num_display_cb(T_MFW_HND win, USHORT identifier, UBYTE reason)
3208 { 3208 {
3209 3209
3210 // char buf [40]; // RAVI 3210 // char buf [40]; // RAVI
3211 3211
3212 TRACE_FUNCTION ("info_num_display_cb"); 3212 TRACE_FUNCTION ("info_num_display_cb");
3213 3213
3214 switch (reason) 3214 switch (reason)
3215 { 3215 {
3216 case INFO_KCD_LEFT: callNumber((UBYTE*)current_info_num.number); 3216 case INFO_KCD_LEFT: callNumber((UBYTE*)current_info_num.number);
3217 default: break; // RAVI - Deafault corrected to default. 3217 default: break; // RAVI - Deafault corrected to default.
3218 3218
3219 } 3219 }
3220 } 3220 }
3221 /******************************************************************************* 3221 /*******************************************************************************
3222 3222
3223 $Function: info_num_exec_cb 3223 $Function: info_num_exec_cb
3224 3224
3225 $Description: Exec callback function of the information Numbers window 3225 $Description: Exec callback function of the information Numbers window
3226 3226
3227 $Returns: none 3227 $Returns: none
3228 3228
3229 $Arguments: win - window handler 3229 $Arguments: win - window handler
3230 event - mfw event 3230 event - mfw event
3231 parameter - optional data. 3231 parameter - optional data.
3232 3232
3233 *******************************************************************************/ 3233 *******************************************************************************/
3234 void info_num_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter) 3234 void info_num_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter)
3235 { 3235 {
3236 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; 3236 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data;
3237 T_INFO_NUM_INFO * data = (T_INFO_NUM_INFO *)win_data->user; 3237 T_INFO_NUM_INFO * data = (T_INFO_NUM_INFO *)win_data->user;
3243 MmiRsrcGetText(TxtLine1); 3243 MmiRsrcGetText(TxtLine1);
3244 MmiRsrcGetText(TxtLine2); 3244 MmiRsrcGetText(TxtLine2);
3245 MmiRsrcGetText(TxtFax); 3245 MmiRsrcGetText(TxtFax);
3246 MmiRsrcGetText(TxtData); 3246 MmiRsrcGetText(TxtData);
3247 TRACE_FUNCTION (">>>>> info_num_exec_cb()"); 3247 TRACE_FUNCTION (">>>>> info_num_exec_cb()");
3248 3248
3249 switch (event) 3249 switch (event)
3250 { 3250 {
3251 case E_INIT: 3251 case E_INIT:
3252 3252
3253 TRACE_EVENT(">>>> info_num_exec_cb() Event:E_INIT"); 3253 TRACE_EVENT(">>>> info_num_exec_cb() Event:E_INIT");
3267 if (numberOfEntries > 4) 3267 if (numberOfEntries > 4)
3268 numberOfEntries = 4; 3268 numberOfEntries = 4;
3269 } 3269 }
3270 else 3270 else
3271 numberOfEntries = info_numbers[info_num_level-1]->count; 3271 numberOfEntries = info_numbers[info_num_level-1]->count;
3272 3272
3273 data->menu_list_data->List = (T_MFW_MNU_ITEM *)ALLOC_MEMORY( 4 * sizeof(T_MFW_MNU_ITEM) ); 3273 data->menu_list_data->List = (T_MFW_MNU_ITEM *)ALLOC_MEMORY( 4 * sizeof(T_MFW_MNU_ITEM) );
3274 3274
3275 if(data->menu_list_data->List == 0) 3275 if(data->menu_list_data->List == 0)
3276 { 3276 {
3277 TRACE_EVENT("Failed memory alloc 2"); 3277 TRACE_EVENT("Failed memory alloc 2");
3278 return; 3278 return;
3279 } 3279 }
3280 3280
3281 for (i = 0; i < numberOfEntries ; i++) 3281 for (i = 0; i < numberOfEntries ; i++)
3282 { 3282 {
3283 mnuInitDataItem(&data->menu_list_data->List[i]); 3283 mnuInitDataItem(&data->menu_list_data->List[i]);
3284 if (type_of_list == MAILBOX_LIST || type_of_list == MAILBOX_LIST_CALL) 3284 if (type_of_list == MAILBOX_LIST || type_of_list == MAILBOX_LIST_CALL)
3285 data->menu_list_data->List[i].str = (char *)cphs_voicemail_numbers.entries[i].alpha.data; 3285 data->menu_list_data->List[i].str = (char *)cphs_voicemail_numbers.entries[i].alpha.data;
3286 else 3286 else
3287 data->menu_list_data->List[i].str = (char *)info_numbers[info_num_level-1]->entry[i].alpha.data; 3287 data->menu_list_data->List[i].str = (char *)info_numbers[info_num_level-1]->entry[i].alpha.data;
3288 data->menu_list_data->List[i].flagFunc = item_flag_none; 3288 data->menu_list_data->List[i].flagFunc = item_flag_none;
3289 } 3289 }
3290 3290
3291 data->menu_list_data->ListLength =numberOfEntries; 3291 data->menu_list_data->ListLength =numberOfEntries;
3292 data->menu_list_data->ListPosition = 1; 3292 data->menu_list_data->ListPosition = 1;
3293 data->menu_list_data->CursorPosition = 1; 3293 data->menu_list_data->CursorPosition = 1;
3301 data->menu_list_data->KeyEvents = KEY_ALL; 3301 data->menu_list_data->KeyEvents = KEY_ALL;
3302 data->menu_list_data->Reason = 0; 3302 data->menu_list_data->Reason = 0;
3303 data->menu_list_data->Strings = TRUE; 3303 data->menu_list_data->Strings = TRUE;
3304 data->menu_list_data->Attr = &InfoNum_menuAttrib; 3304 data->menu_list_data->Attr = &InfoNum_menuAttrib;
3305 data->menu_list_data->autoDestroy = FALSE; 3305 data->menu_list_data->autoDestroy = FALSE;
3306 3306
3307 3307
3308 /* Create the dynamic menu window */ 3308 /* Create the dynamic menu window */
3309 listDisplayListMenu(win, data->menu_list_data,(ListCbFunc)InfonumList_cb,0); 3309 listDisplayListMenu(win, data->menu_list_data,(ListCbFunc)InfonumList_cb,0);
3310 3310
3311 break; 3311 break;
3312 3312
3313 case LISTS_REASON_VISIBLE: 3313 case LISTS_REASON_VISIBLE:
3314 case LISTS_REASON_RESUME: 3314 case LISTS_REASON_RESUME:
3315 { 3315 {
3316 dspl_ClearAll(); // sbh - clear screen before update 3316 dspl_ClearAll(); // sbh - clear screen before update
3317 3317
3318 if (type_of_list == MAILBOX_LIST) 3318 if (type_of_list == MAILBOX_LIST)
3319 { 3319 {
3320 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, COLOUR_LIST_SUBMENU); 3320 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, COLOUR_LIST_SUBMENU);
3321 } 3321 }
3322 else if (type_of_list == MAILBOX_LIST_CALL) 3322 else if (type_of_list == MAILBOX_LIST_CALL)
3323 { 3323 {
3324 softKeys_displayId( TxtSoftCall, TxtSoftBack, 0, COLOUR_LIST_SUBMENU); 3324 softKeys_displayId( TxtSoftCall, TxtSoftBack, 0, COLOUR_LIST_SUBMENU);
3325 } 3325 }
3326 3326
3327 break; 3327 break;
3328 } 3328 }
3329 3329
3330 default: 3330 default:
3331 break; 3331 break;
3334 /******************************************************************************* 3334 /*******************************************************************************
3335 3335
3336 $Function: InfonumList_cb 3336 $Function: InfonumList_cb
3337 3337
3338 $Description: Callback function for the info num list. 3338 $Description: Callback function for the info num list.
3339 3339
3340 $Returns: none 3340 $Returns: none
3341 3341
3342 $Arguments: Parent - parent window. 3342 $Arguments: Parent - parent window.
3343 ListData - Menu item list 3343 ListData - Menu item list
3344 *******************************************************************************/ 3344 *******************************************************************************/
3345 3345
3346 void InfonumList_cb(T_MFW_HND * Parent, ListMenuData * ListData) 3346 void InfonumList_cb(T_MFW_HND * Parent, ListMenuData * ListData)
3347 { 3347 {
3348 T_MFW_WIN * win_data = ((T_MFW_HDR *)Parent)->data; 3348 T_MFW_WIN * win_data = ((T_MFW_HDR *)Parent)->data;
3349 T_INFO_NUM_INFO * data = (T_INFO_NUM_INFO *)win_data->user; 3349 T_INFO_NUM_INFO * data = (T_INFO_NUM_INFO *)win_data->user;
3350 3350
3351 // char debug[40]; // RAVI 3351 // char debug[40]; // RAVI
3352 3352
3353 TRACE_FUNCTION("InfonumList_cb"); 3353 TRACE_FUNCTION("InfonumList_cb");
3354 if ((ListData->Reason EQ LISTS_REASON_BACK) || (ListData->Reason EQ LISTS_REASON_CLEAR)) 3354 if ((ListData->Reason EQ LISTS_REASON_BACK) || (ListData->Reason EQ LISTS_REASON_CLEAR))
3355 { 3355 {
3358 info_num_level--; 3358 info_num_level--;
3359 } 3359 }
3360 else if(ListData->Reason EQ LISTS_REASON_SELECT) 3360 else if(ListData->Reason EQ LISTS_REASON_SELECT)
3361 { 3361 {
3362 if (type_of_list == MAILBOX_LIST || type_of_list == MAILBOX_LIST_CALL) //get the correct voicemail num 3362 if (type_of_list == MAILBOX_LIST || type_of_list == MAILBOX_LIST_CALL) //get the correct voicemail num
3363 { 3363 {
3364 cphs_voicemail_numbers.entries[ListData->ListPosition].list_index = ListData->ListPosition; 3364 cphs_voicemail_numbers.entries[ListData->ListPosition].list_index = ListData->ListPosition;
3365 3365
3366 if (type_of_list == MAILBOX_LIST) 3366 if (type_of_list == MAILBOX_LIST)
3367 { /*If we're editing*/ 3367 { /*If we're editing*/
3368 TRACE_FUNCTION_P2("List Posn2: %d, MBN: %s", ListData->ListPosition, cphs_voicemail_numbers.entries[ListData->ListPosition].number ); 3368 TRACE_FUNCTION_P2("List Posn2: %d, MBN: %s", ListData->ListPosition, cphs_voicemail_numbers.entries[ListData->ListPosition].number );
3369 show_cphs_mb_number(&cphs_voicemail_numbers.entries[ListData->ListPosition]); 3369 show_cphs_mb_number(&cphs_voicemail_numbers.entries[ListData->ListPosition]);
3370 memcpy(&cphs_voicemail_num, &cphs_voicemail_numbers.entries[ListData->ListPosition], sizeof(T_MFW_CPHS_ENTRY)); 3370 memcpy(&cphs_voicemail_num, &cphs_voicemail_numbers.entries[ListData->ListPosition], sizeof(T_MFW_CPHS_ENTRY));
3371 } 3371 }
3372 else 3372 else
3373 { 3373 {
3374 char temp_number[MFW_CPHS_VM_NUMBER_MAXLEN]; 3374 char temp_number[MFW_CPHS_VM_NUMBER_MAXLEN];
3375 3375
3376 memcpy(&cphs_voicemail_num, &cphs_voicemail_numbers.entries[ListData->ListPosition], sizeof(T_MFW_CPHS_ENTRY)); 3376 memcpy(&cphs_voicemail_num, &cphs_voicemail_numbers.entries[ListData->ListPosition], sizeof(T_MFW_CPHS_ENTRY));
3377 memset(temp_number, 0, MFW_CPHS_VM_NUMBER_MAXLEN); 3377 memset(temp_number, 0, MFW_CPHS_VM_NUMBER_MAXLEN);
3378 3378
3379 /*If we're calling the number*/ 3379 /*If we're calling the number*/
3380 //if it's an international number without a '+' 3380 //if it's an international number without a '+'
3381 if (cphs_voicemail_num.ton == MFW_TON_INTERNATIONAL && cphs_voicemail_num.number[0] != '+') 3381 if (cphs_voicemail_num.ton == MFW_TON_INTERNATIONAL && cphs_voicemail_num.number[0] != '+')
3382 { 3382 {
3383 strcat(temp_number, "+"); //put a + in front of number 3383 strcat(temp_number, "+"); //put a + in front of number
3384 strncat(temp_number, (char*)cphs_voicemail_num.number, strlen((char*)cphs_voicemail_num.number)); 3384 strncat(temp_number, (char*)cphs_voicemail_num.number, strlen((char*)cphs_voicemail_num.number));
3385 memset((void*)cphs_voicemail_num.number, 0, MFW_CPHS_VM_NUMBER_MAXLEN); 3385 memset((void*)cphs_voicemail_num.number, 0, MFW_CPHS_VM_NUMBER_MAXLEN);
3386 strncpy((char*)cphs_voicemail_num.number, temp_number, strlen((char *)temp_number)); 3386 strncpy((char*)cphs_voicemail_num.number, temp_number, strlen((char *)temp_number));
3387 } 3387 }
3388 3388
3389 callNumber(cphs_voicemail_num.number); 3389 callNumber(cphs_voicemail_num.number);
3390 3390
3391 } 3391 }
3392 3392
3393 3393
3394 } 3394 }
3395 else 3395 else
3396 { 3396 {
3397 #ifdef FF_CPHS 3397 #ifdef FF_CPHS
3398 T_DISPLAY_DATA Dialog; 3398 T_DISPLAY_DATA Dialog;
3399 //x0012849: Jagannatha 01 June, 2006 ER: OMAPS00079607 -To Support AcC and Info numbers 3399 //x0012849: Jagannatha 01 June, 2006 ER: OMAPS00079607 -To Support AcC and Info numbers
3400 UBYTE inRoaming; 3400 UBYTE inRoaming;
3401 inRoaming = getRoamingStatus(); 3401 inRoaming = getRoamingStatus();
3402 TRACE_EVENT_P1("Roaming status = %d", inRoaming); 3402 TRACE_EVENT_P1("Roaming status = %d", inRoaming);
3403 #endif 3403 #endif
3404 //get the number/directory 3404 //get the number/directory
3405 info_num_index = info_numbers[info_num_level-1]->entry[ListData->ListPosition].index; 3405 info_num_index = info_numbers[info_num_level-1]->entry[ListData->ListPosition].index;
3406 /***************************Go-lite Optimization changes Start***********************/ 3406 /***************************Go-lite Optimization changes Start***********************/
3407 //Aug 16, 2004 REF: CRR 24323 Deepa M.D 3407 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
3408 TRACE_EVENT_P3("Index selected: %d, Level, %d, entryStat:%d",info_num_index, info_num_level, 3408 TRACE_EVENT_P3("Index selected: %d, Level, %d, entryStat:%d",info_num_index, info_num_level,
3409 info_numbers[info_num_level-1]->entry[ListData->ListPosition].entryStat); 3409 info_numbers[info_num_level-1]->entry[ListData->ListPosition].entryStat);
3410 /***************************Go-lite Optimization changes end***********************/ 3410 /***************************Go-lite Optimization changes end***********************/
3411 //x0012849: Jagannatha 01 June, 2006 ER: OMAPS00079607 -To Support AcC and Info numbers 3411 //x0012849: Jagannatha 01 June, 2006 ER: OMAPS00079607 -To Support AcC and Info numbers
3412 //0x20 in Binary 0010 0000 - If bit 6 is set to 1 that indicates that service is specific to network. 3412 //0x20 in Binary 0010 0000 - If bit 6 is set to 1 that indicates that service is specific to network.
3413 #ifdef FF_CPHS 3413 #ifdef FF_CPHS
3414 if( (current_info_num.entryStat & 0x20) && inRoaming ) 3414 if( (current_info_num.entryStat & 0x20) && inRoaming )
3427 Dialog.Identifier = (USHORT)ListData->ListPosition; 3427 Dialog.Identifier = (USHORT)ListData->ListPosition;
3428 info_dialog( Parent, &Dialog ); 3428 info_dialog( Parent, &Dialog );
3429 } 3429 }
3430 else 3430 else
3431 { 3431 {
3432 #endif 3432 #endif
3433 if (info_numbers[info_num_level-1]->entry[ListData->ListPosition].entryStat & 0x80) //if bit 8 set 3433 if (info_numbers[info_num_level-1]->entry[ListData->ListPosition].entryStat & 0x80) //if bit 8 set
3434 { 3434 {
3435 TRACE_EVENT("CPHS INFO:Should be number entry"); 3435 TRACE_EVENT("CPHS INFO:Should be number entry");
3436 if (info_num_level < 4) 3436 if (info_num_level < 4)
3437 cphs_select_info_num(info_num_index); 3437 cphs_select_info_num(info_num_index);
3438 } 3438 }
3439 else 3439 else
3440 { 3440 {
3441 if (info_num_level < 4) 3441 if (info_num_level < 4)
3442 { 3442 {
3443 TRACE_EVENT("CPHS INFO:Should be dir entry"); 3443 TRACE_EVENT("CPHS INFO:Should be dir entry");
3444 cphs_get_info_num(info_num_level+1, info_num_index+1); 3444 cphs_get_info_num(info_num_level+1, info_num_index+1);
3445 } 3445 }
3446 } 3446 }
3447 #ifdef FF_CPHS 3447 #ifdef FF_CPHS
3448 } 3448 }
3449 #endif 3449 #endif
3450 3450
3451 } 3451 }
3452 3452
3453 } 3453 }
3454 3454
3455 3455
3456 } 3456 }
3457 3457
3458 /******************************************************************************* 3458 /*******************************************************************************
3459 3459
3460 $Function: InfoNum_destroy 3460 $Function: InfoNum_destroy
3461 3461
3462 $Description: Destroy the info num window. 3462 $Description: Destroy the info num window.
3463 3463
3464 $Returns: none 3464 $Returns: none
3465 3465
3466 $Arguments: own_window- current window 3466 $Arguments: own_window- current window
3467 *******************************************************************************/ 3467 *******************************************************************************/
3468 3468
3469 static void InfoNum_destroy(MfwHnd own_window) 3469 static void InfoNum_destroy(MfwHnd own_window)
3470 { 3470 {
3471 T_MFW_WIN * win_data; 3471 T_MFW_WIN * win_data;
3472 T_INFO_NUM_INFO * data; 3472 T_INFO_NUM_INFO * data;
3473 UBYTE numberOfEntries; 3473 UBYTE numberOfEntries;
3474 3474
3475 TRACE_FUNCTION ("InfoNum_destroy()"); 3475 TRACE_FUNCTION ("InfoNum_destroy()");
3476 3476
3477 if (own_window) 3477 if (own_window)
3478 { 3478 {
3479 win_data = ((T_MFW_HDR *)own_window)->data; 3479 win_data = ((T_MFW_HDR *)own_window)->data;
3480 data = (T_INFO_NUM_INFO *)win_data->user; 3480 data = (T_INFO_NUM_INFO *)win_data->user;
3481 3481
3482 if (data) 3482 if (data)
3483 { 3483 {
3484 /* 3484 /*
3485 * Delete WIN handler 3485 * Delete WIN handler
3486 */ 3486 */
3487 win_delete (data->numbers_win); 3487 win_delete (data->numbers_win);
3488 3488
3489 /* 3489 /*
3490 * Free Memory 3490 * Free Memory
3491 */ 3491 */
3492 if ( ( type_of_list == MAILBOX_LIST ) || ( type_of_list == MAILBOX_LIST_CALL ) ) 3492 if ( ( type_of_list == MAILBOX_LIST ) || ( type_of_list == MAILBOX_LIST_CALL ) )
3493 { numberOfEntries = cphs_voicemail_numbers.count; 3493 { numberOfEntries = cphs_voicemail_numbers.count;
3494 if (numberOfEntries > 4) 3494 if (numberOfEntries > 4)
3498 numberOfEntries =info_numbers[info_num_level-1]->count; 3498 numberOfEntries =info_numbers[info_num_level-1]->count;
3499 if (data->menu_list_data != NULL) 3499 if (data->menu_list_data != NULL)
3500 { //int i; // RAVI 3500 { //int i; // RAVI
3501 FREE_MEMORY ((void *)data->menu_list_data->List, numberOfEntries * sizeof (T_MFW_MNU_ITEM)); 3501 FREE_MEMORY ((void *)data->menu_list_data->List, numberOfEntries * sizeof (T_MFW_MNU_ITEM));
3502 FREE_MEMORY ((void *)data->menu_list_data, sizeof (ListMenuData)); 3502 FREE_MEMORY ((void *)data->menu_list_data, sizeof (ListMenuData));
3503 if (type_of_list == INFO_NUM_LIST && info_num_level > 1)//if info numbers, 3503 if (type_of_list == INFO_NUM_LIST && info_num_level > 1)//if info numbers,
3504 { FREE_MEMORY((void*)info_numbers[info_num_level-1], sizeof(T_MFW_CPHS_INFONUM_LIST)); 3504 { FREE_MEMORY((void*)info_numbers[info_num_level-1], sizeof(T_MFW_CPHS_INFONUM_LIST));
3505 info_numbers[info_num_level-1] = NULL; 3505 info_numbers[info_num_level-1] = NULL;
3506 } 3506 }
3507 } 3507 }
3508 FREE_MEMORY ((void *)data, sizeof (T_INFO_NUM_INFO)); 3508 FREE_MEMORY ((void *)data, sizeof (T_INFO_NUM_INFO));
3518 /******************************************************************************* 3518 /*******************************************************************************
3519 3519
3520 $Function: info_num_win_cb 3520 $Function: info_num_win_cb
3521 3521
3522 $Description: Window callback function for the info numbers window. 3522 $Description: Window callback function for the info numbers window.
3523 3523
3524 $Returns: none 3524 $Returns: none
3525 3525
3526 $Arguments: w - mfw window handler 3526 $Arguments: w - mfw window handler
3527 e - mfw event 3527 e - mfw event
3528 3528
3529 *******************************************************************************/ 3529 *******************************************************************************/
3530 3530
3531 static int info_num_win_cb (MfwEvt e, MfwWin *w) /* yyy window event handler */ 3531 static int info_num_win_cb (MfwEvt e, MfwWin *w) /* yyy window event handler */
3532 { 3532 {
3533 TRACE_EVENT ("info_num_win_cb()"); 3533 TRACE_EVENT ("info_num_win_cb()");
3534 3534
3535 switch (e) 3535 switch (e)
3536 { 3536 {
3537 case MfwWinVisible: /* window is visible */ 3537 case MfwWinVisible: /* window is visible */
3538 break; 3538 break;
3539 3539
3540 case MfwWinFocussed: /* input focus / selected */ 3540 case MfwWinFocussed: /* input focus / selected */
3541 case MfwWinDelete: /* window will be deleted */ 3541 case MfwWinDelete: /* window will be deleted */
3542 3542
3543 default: 3543 default:
3544 return MFW_EVENT_REJECTED; 3544 return MFW_EVENT_REJECTED;
3545 } 3545 }
3546 return MFW_EVENT_CONSUMED; 3546 return MFW_EVENT_CONSUMED;
3547 } 3547 }
3548 3548
3551 /******************************************************************************* 3551 /*******************************************************************************
3552 3552
3553 $Function: mmi_cphs_get_als_info 3553 $Function: mmi_cphs_get_als_info
3554 3554
3555 $Description: Returns the current Line enabled 3555 $Description: Returns the current Line enabled
3556 3556
3557 $Returns: none 3557 $Returns: none
3558 3558
3559 $Arguments: 3559 $Arguments:
3560 3560
3561 *******************************************************************************/ 3561 *******************************************************************************/
3562 //x0pleela 23 May, 2006 DR: OMAPS00070657 3562 //x0pleela 23 May, 2006 DR: OMAPS00070657
3563 #ifdef FF_CPHS 3563 #ifdef FF_CPHS
3564 void mmi_cphs_get_als_info() 3564 void mmi_cphs_get_als_info()
3565 { 3565 {
3570 switch (nALS_line_data) 3570 switch (nALS_line_data)
3571 { 3571 {
3572 case ALS_MOD_SPEECH: 3572 case ALS_MOD_SPEECH:
3573 als_status.selectedLine = MFW_SERV_LINE1; 3573 als_status.selectedLine = MFW_SERV_LINE1;
3574 break; 3574 break;
3575 3575
3576 case ALS_MOD_AUX_SPEECH: 3576 case ALS_MOD_AUX_SPEECH:
3577 als_status.selectedLine = MFW_SERV_LINE2; 3577 als_status.selectedLine = MFW_SERV_LINE2;
3578 break; 3578 break;
3579 default: 3579 default:
3580 als_status.selectedLine = MFW_SERV_NotPresent; 3580 als_status.selectedLine = MFW_SERV_NotPresent;
3586 /******************************************************************************* 3586 /*******************************************************************************
3587 3587
3588 $Function: mmi_cphs_set_als_value 3588 $Function: mmi_cphs_set_als_value
3589 3589
3590 $Description: Set the Als flag based on the CSP data read from CPHS enabled SIM 3590 $Description: Set the Als flag based on the CSP data read from CPHS enabled SIM
3591 3591
3592 $Returns: none 3592 $Returns: none
3593 3593
3594 $Arguments: 3594 $Arguments:
3595 3595
3596 *******************************************************************************/ 3596 *******************************************************************************/
3597 //x0pleela 29 May, 2006 DR: OMAPS00070657 3597 //x0pleela 29 May, 2006 DR: OMAPS00070657
3598 3598
3599 void mmi_cphs_set_als_value( UBYTE als_val) 3599 void mmi_cphs_set_als_value( UBYTE als_val)
3600 { 3600 {
3605 /******************************************************************************* 3605 /*******************************************************************************
3606 3606
3607 $Function: mmi_cphs_get_als_value 3607 $Function: mmi_cphs_get_als_value
3608 3608
3609 $Description: Returns the Als flag value 3609 $Description: Returns the Als flag value
3610 3610
3611 $Returns: none 3611 $Returns: none
3612 3612
3613 $Arguments: 3613 $Arguments:
3614 3614
3615 *******************************************************************************/ 3615 *******************************************************************************/
3616 //x0pleela 29 May, 2006 DR: OMAPS00070657 3616 //x0pleela 29 May, 2006 DR: OMAPS00070657
3617 3617
3618 UBYTE mmi_cphs_get_als_value( void ) 3618 UBYTE mmi_cphs_get_als_value( void )
3619 { 3619 {
3631 /******************************************************************************* 3631 /*******************************************************************************
3632 3632
3633 $Function: mmi_get_als_selectedLine 3633 $Function: mmi_get_als_selectedLine
3634 3634
3635 $Description: Returns the current Line enabled 3635 $Description: Returns the current Line enabled
3636 3636
3637 $Returns: none 3637 $Returns: none
3638 3638
3639 $Arguments: 3639 $Arguments:
3640 3640
3641 *******************************************************************************/ 3641 *******************************************************************************/
3642 //x0pleela 30 May, 2006 DR: OMAPS00070657 3642 //x0pleela 30 May, 2006 DR: OMAPS00070657
3643 T_MFW_LINE_INDEX mmi_get_als_selectedLine( void) 3643 T_MFW_LINE_INDEX mmi_get_als_selectedLine( void)
3644 { 3644 {
3645 return als_status.selectedLine; 3645 return als_status.selectedLine;