comparison src/ui/bmi/mmiNetwork.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 5ff381b88fec
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: Network 14 $Module: Network
15 $File: MmiNetwork.c 15 $File: MmiNetwork.c
16 $Revision: 1.0 16 $Revision: 1.0
17 17
18 $Author: Condat(UK) 18 $Author: Condat(UK)
19 $Date: 22/02/01 19 $Date: 22/02/01
20 20
21 ******************************************************************************** 21 ********************************************************************************
22 22
23 Description: 23 Description:
24 24
25 25
26 26
27 ******************************************************************************** 27 ********************************************************************************
28 28
29 $Hist 29 $Hist
30 30
31 Oct 09, 2007 OMAPS00148258 x0056422 31 Oct 09, 2007 OMAPS00148258 x0056422
32 Description: Memory leak problem 32 Description: Memory leak problem
33 Solution: Modified the freed memory size to solve the memory leak problem 33 Solution: Modified the freed memory size to solve the memory leak problem
34 34
35 Aug 07, 2007 DR:OMAPS00137726 x0066814(Geetha) 35 Aug 07, 2007 DR:OMAPS00137726 x0066814(Geetha)
36 Description:HPLMN Manual Selection at power on -unable to perform manual selection at power ON 36 Description:HPLMN Manual Selection at power on -unable to perform manual selection at power ON
37 Solution: In network_nm_cb(), added a new case E_NM_PLMN_LIST_BOOTUP, to list the PLMNs during bootup. 37 Solution: In network_nm_cb(), added a new case E_NM_PLMN_LIST_BOOTUP, to list the PLMNs during bootup.
38 May 31, 2007 DR: OMAPS00133201 x0pleela 38 May 31, 2007 DR: OMAPS00133201 x0pleela
39 Description: MS keeps searching networks and doesn't list available PLMNs after performing 39 Description: MS keeps searching networks and doesn't list available PLMNs after performing
40 manual selection 40 manual selection
41 Solution : Added new function nm_abort_network() to destroy the dialog saying "Searching for 41 Solution : Added new function nm_abort_network() to destroy the dialog saying "Searching for
42 Networks" when CME_ERR_AbortedByNetwork error is recieved from ACI 42 Networks" when CME_ERR_AbortedByNetwork error is recieved from ACI
43 43
44 May 24, 2007 DR: OMAPS00132483 x0pleela 44 May 24, 2007 DR: OMAPS00132483 x0pleela
45 Description: MM: While playing an AAC, unplug USB freezes the audio 45 Description: MM: While playing an AAC, unplug USB freezes the audio
46 Solution: In network() function, setting or resetting the phonelock and auto phone lock status bits 46 Solution: In network() function, setting or resetting the phonelock and auto phone lock status bits
47 47
48 May 09, 2007 DR: OMAPS00129014 x0pleela 48 May 09, 2007 DR: OMAPS00129014 x0pleela
49 Description: COMBO: unable to send SMS during midi playing 49 Description: COMBO: unable to send SMS during midi playing
50 Solution: Added phone lock status code in network() function. 50 Solution: Added phone lock status code in network() function.
51 May 09, 2007 DR: OMAPS00129014 51 May 09, 2007 DR: OMAPS00129014
52 Description: COMBO: unable to send SMS during midi playing 52 Description: COMBO: unable to send SMS during midi playing
53 Solution: Added phone lock status code in network() function. 53 Solution: Added phone lock status code in network() function.
54 Apr 13, 2007 DRT:OMAPS00122739 x0066814(Geetha) 54 Apr 13, 2007 DRT:OMAPS00122739 x0066814(Geetha)
55 Description: With Orange SIM card, once attached (at+cgatt=1), "5201" is displayed instead of "Orange" 55 Description: With Orange SIM card, once attached (at+cgatt=1), "5201" is displayed instead of "Orange"
56 Solution : In network function, under the NETWORK_FULL_SERVICE, 56 Solution : In network function, under the NETWORK_FULL_SERVICE,
57 added a contion to check whether plmn_name is present. 57 added a contion to check whether plmn_name is present.
58 58
59 Mar 30,2007 DRT: OMAPS00120157 x00061088(Prachi) 59 Mar 30,2007 DRT: OMAPS00120157 x00061088(Prachi)
60 Description : MMI displays network forbidden 60 Description : MMI displays network forbidden
61 Solution: Added check for Manual selection when the user selects network 61 Solution: Added check for Manual selection when the user selects network
62 manually for network list .Now network() checking for for Manual selection 62 manually for network list .Now network() checking for for Manual selection
63 by checking data->network_list_status is NETWORK_LIST_DISPLAY_FIRST or not. 63 by checking data->network_list_status is NETWORK_LIST_DISPLAY_FIRST or not.
64 64
65 Feb 16, 2007 OMAPS00098351 x0066814(Geetha) 65 Feb 16, 2007 OMAPS00098351 x0066814(Geetha)
66 Description: NITZ support is not working 66 Description: NITZ support is not working
67 Solution: Added the FF_TIMEZONE flag.Time is calculated according to GMT, if the FF_TIMEZONE flag is enabled. 67 Solution: Added the FF_TIMEZONE flag.Time is calculated according to GMT, if the FF_TIMEZONE flag is enabled.
68 Added settingsNITZ function to write the menu option selected onto the Flash. 68 Added settingsNITZ function to write the menu option selected onto the Flash.
69 69
70 Feb 08,2007 DRT: OMAPS00115060 x00061088(Prachi) 70 Feb 08,2007 DRT: OMAPS00115060 x00061088(Prachi)
71 Description : To check for Forbidden network (for denied services),it takes long time. 71 Description : To check for Forbidden network (for denied services),it takes long time.
72 after including fix for issue OMAPS00110741. 72 after including fix for issue OMAPS00110741.
73 Solution: To solve this issue ,condition for forbidden network(i.e. network_data.forbidden == TRUE) 73 Solution: To solve this issue ,condition for forbidden network(i.e. network_data.forbidden == TRUE)
74 is moved out of condition if (parameter != Null). 74 is moved out of condition if (parameter != Null).
75 75
76 76
77 77
78 Jan 10, 2007 REF: OMAPS00110741 x0039928(sumanth) 78 Jan 10, 2007 REF: OMAPS00110741 x0039928(sumanth)
79 Description: Sample resets after network deregistration during Robustness Test 79 Description: Sample resets after network deregistration during Robustness Test
80 Solution: A condition is added to check if the parameter passed to the network() is NULL. 80 Solution: A condition is added to check if the parameter passed to the network() is NULL.
81 81
82 Jan 05, 2007 OMAPS00084665 x0039928(sumanth) 82 Jan 05, 2007 OMAPS00084665 x0039928(sumanth)
83 Description: Boot time exceed UCSD estimations 83 Description: Boot time exceed UCSD estimations
84 84
85 Dec 13, 2006 DRT: OMAPS00105640 x0039928(Sumanth) 85 Dec 13, 2006 DRT: OMAPS00105640 x0039928(Sumanth)
86 Description : SIMP: The board reboots when removing SIM card. 86 Description : SIMP: The board reboots when removing SIM card.
87 Solution : A condition is added in network() to check if SIM is active. 87 Solution : A condition is added in network() to check if SIM is active.
88 88
89 Oct 30,2006 ER:OMAPS00091029 x0039928(sumanth) 89 Oct 30,2006 ER:OMAPS00091029 x0039928(sumanth)
90 Bootup time measurement 90 Bootup time measurement
91 91
92 Oct 05, 2006 ER: OMAPS00094496 x0061088(Prachi) 92 Oct 05, 2006 ER: OMAPS00094496 x0061088(Prachi)
93 Description:Enhance RSSI to 3 parameters: Strength, quality, min-access-level 93 Description:Enhance RSSI to 3 parameters: Strength, quality, min-access-level
94 Solution: If there is NO NETWORK , Network() is calling globalSignalUpdate() 94 Solution: If there is NO NETWORK , Network() is calling globalSignalUpdate()
95 to show the Signal Strength. 95 to show the Signal Strength.
96 Sep 18,2006 DRT: OMAPS0090268 x00061088(Prachi) 96 Sep 18,2006 DRT: OMAPS0090268 x00061088(Prachi)
97 Description : To check for Forbidden network (for denied services),it takes long time. 97 Description : To check for Forbidden network (for denied services),it takes long time.
98 Solution : Function network_nm_cb() has now be implemented to handle E_NM_FORBIDDEN_NETWORK,which sends event 98 Solution : Function network_nm_cb() has now be implemented to handle E_NM_FORBIDDEN_NETWORK,which sends event
99 NETWORK_FORBIDDEN_NETWORK to network(),by setting flags network_data.aborted =False 99 NETWORK_FORBIDDEN_NETWORK to network(),by setting flags network_data.aborted =False
100 and network_data.forbidden = Ture. 100 and network_data.forbidden = Ture.
101 101
102 Jun 23, 2006 DR: OMAPS00082374 x0pleela 102 Jun 23, 2006 DR: OMAPS00082374 x0pleela
103 Description: EONS Failures - unexpected output from the MMI: 2 carriers; on the top always T-Mobile 103 Description: EONS Failures - unexpected output from the MMI: 2 carriers; on the top always T-Mobile
104 Solution: a) Removed the usage of global variable gEons_alloc_active 104 Solution: a) Removed the usage of global variable gEons_alloc_active
105 b) Added new check for CNIV request 105 b) Added new check for CNIV request
106 c) Memset the data->plmn_name and data->network_name 106 c) Memset the data->plmn_name and data->network_name
107 d) Added check to display short name if long name len is 0. or display numeric name if short name len is 0 107 d) Added check to display short name if long name len is 0. or display numeric name if short name len is 0
108 108
109 June 02, 2006 DR: OMAPS00078005 x0021334 109 June 02, 2006 DR: OMAPS00078005 x0021334
110 Descripton: Test for NITZ (Network Identity and Timezone) support - No New time was displayed 110 Descripton: Test for NITZ (Network Identity and Timezone) support - No New time was displayed
111 Solution: New Time/Date received from network is sent to MFW by lower layer by invoking 'rAT_PercentCTZV' 111 Solution: New Time/Date received from network is sent to MFW by lower layer by invoking 'rAT_PercentCTZV'
112 function. This function has now been implemented to pass on the received values to MMI 112 function. This function has now been implemented to pass on the received values to MMI
113 for user confirmation and RTC updation. 113 for user confirmation and RTC updation.
118 Added a function that returns the roaming status. 118 Added a function that returns the roaming status.
119 119
120 Feb 15, 2006 ER: OMAPS00065203 x0pleela 120 Feb 15, 2006 ER: OMAPS00065203 x0pleela
121 Description: Cingular Operator Name Prioritization implementation required 121 Description: Cingular Operator Name Prioritization implementation required
122 Solution: Incorporated review comments 122 Solution: Incorporated review comments
123 - Included flag NEPTUNE_BOARD to retain old code for operator get name and 123 - Included flag NEPTUNE_BOARD to retain old code for operator get name and
124 added new code for this ER also 124 added new code for this ER also
125 - Removed the global variable gOper_sel_done and have introduced 2 functions which will 125 - Removed the global variable gOper_sel_done and have introduced 2 functions which will
126 set and get the status of the operator selection 126 set and get the status of the operator selection
127 127
128 Feb 09, 2006 ER: OMAPS00065203 x0pleela 128 Feb 09, 2006 ER: OMAPS00065203 x0pleela
129 Description: Cingular Operator Name Prioritization implementation required 129 Description: Cingular Operator Name Prioritization implementation required
130 Solution: In function network(), check if EONS is allocated and activated. If not, get operator name from other sources 130 Solution: In function network(), check if EONS is allocated and activated. If not, get operator name from other sources
131 Removed CPHS check code as prioritized operator name is already updated to network_data 131 Removed CPHS check code as prioritized operator name is already updated to network_data
132 132
133 xrashmic 10 Nov, 2004 MMI-SPR-OMAPS00044200-OMAPS00044851 133 xrashmic 10 Nov, 2004 MMI-SPR-OMAPS00044200-OMAPS00044851
134 Added a please wait screen so that the sim is updated with the new code before 134 Added a please wait screen so that the sim is updated with the new code before
135 populating the list again when deleting or when entering a newtwork code 135 populating the list again when deleting or when entering a newtwork code
136 136
137 Nov 02, 2005 REF: omaps00044855 Sumanth Kumar.C 137 Nov 02, 2005 REF: omaps00044855 Sumanth Kumar.C
138 Description: Phone crashes on invoking Manual option in Network Selection Menu. 138 Description: Phone crashes on invoking Manual option in Network Selection Menu.
139 Solution: Memory free of network_data.pplmn is done when the editor exits instead of 139 Solution: Memory free of network_data.pplmn is done when the editor exits instead of
140 list exit by option selection so that the pplmn data is available when the list is invoked once again. 140 list exit by option selection so that the pplmn data is available when the list is invoked once again.
141 141
142 Jun 14, 2005 REF: MMI-FIX-30439 x0018858 142 Jun 14, 2005 REF: MMI-FIX-30439 x0018858
143 Description: The homezone/cityzone tags were not being displayed properly. 143 Description: The homezone/cityzone tags were not being displayed properly.
144 Solution: Modified to save the tags properly in caches and also made the 144 Solution: Modified to save the tags properly in caches and also made the
145 appropriate modifications to update the same properly during mobility. 145 appropriate modifications to update the same properly during mobility.
146 146
147 Sep 23, 2004 REF: CRR 24562 xvilliva 147 Sep 23, 2004 REF: CRR 24562 xvilliva
148 Bug: Enable/disable the manual network selection option depending 148 Bug: Enable/disable the manual network selection option depending
149 on ENS. 149 on ENS.
150 Fix: If the manual network selection is disabled we check if an 150 Fix: If the manual network selection is disabled we check if an
151 error is returned and flash an alert to the user. 151 error is returned and flash an alert to the user.
152 152
153 Sep 8, 2004 REF: CRR 16062 xvilliva 153 Sep 8, 2004 REF: CRR 16062 xvilliva
154 Bug: If a PLMN is selected (by using the middle key) from the PLMN list 154 Bug: If a PLMN is selected (by using the middle key) from the PLMN list
155 presented upon a manual search the D-Sample may freeze. 155 presented upon a manual search the D-Sample may freeze.
156 Fix: The "KEY_MNUSELECT" event is also monitered which was not 156 Fix: The "KEY_MNUSELECT" event is also monitered which was not
157 done earlier and was resulting in the PLMN list shown again. 157 done earlier and was resulting in the PLMN list shown again.
158 158
159 Jul 21, 2004 REF: CRR 13348 xvilliva 159 Jul 21, 2004 REF: CRR 13348 xvilliva
160 Bug: After selecting HPLMN manually, the idle screen is not shown. 160 Bug: After selecting HPLMN manually, the idle screen is not shown.
161 Fix: After the "Network Selected" alert is flashed, we destroy the 161 Fix: After the "Network Selected" alert is flashed, we destroy the
162 phonebook menu to return to the idle screen. 162 phonebook menu to return to the idle screen.
163 163
164 164
165 // Apr 14, 2004 REF: CRR 12641 xpradipg 165 // Apr 14, 2004 REF: CRR 12641 xpradipg
166 // The network when selected using "Automatic" is not showing an alert after selection. 166 // The network when selected using "Automatic" is not showing an alert after selection.
167 // A flag has been used to show the alert when ever network is selected using 167 // A flag has been used to show the alert when ever network is selected using
168 // "Automatic" method. As the flag is present it will not flash this alert when the 168 // "Automatic" method. As the flag is present it will not flash this alert when the
169 // device is restarted. 169 // device is restarted.
170 170
171 25/10/00 Original Condat(UK) BMI version. 171 25/10/00 Original Condat(UK) BMI version.
172 172
173 05/04/06 REF:OMAPS00061046 x0043641 173 05/04/06 REF:OMAPS00061046 x0043641
174 BUG:Possible to cancel the searching with right soft key although the option is not available. 174 BUG:Possible to cancel the searching with right soft key although the option is not available.
175 FIX: In the searching mode cancel option is provided. 175 FIX: In the searching mode cancel option is provided.
176 176
177 08-03-2006 REF: OMAPS00061049 x0020906 177 08-03-2006 REF: OMAPS00061049 x0020906
178 178
179 Bug: The sample crashed many times while trying to camp onto a FPLMN. PCO stucked when tracing this TC, 179 Bug: The sample crashed many times while trying to camp onto a FPLMN. PCO stucked when tracing this TC,
180 therefore no PCO traces available; only L1 traces (TestHarness). 180 therefore no PCO traces available; only L1 traces (TestHarness).
181 181
182 Fix: During manual selection from the indication will get the plmn list count and used the count for allocating 182 Fix: During manual selection from the indication will get the plmn list count and used the count for allocating
183 plmn_list pointer and then destorying the list and free the pointer allocation when particular network is selected 183 plmn_list pointer and then destorying the list and free the pointer allocation when particular network is selected
184 or when back softkey is pressed. 184 or when back softkey is pressed.
185 185
186 186
187 $End 187 $End
188 // Issue Number : SPR#12654 on 07/04/04 by Pradeep/Vadiraj 188 // Issue Number : SPR#12654 on 07/04/04 by Pradeep/Vadiraj
189 *******************************************************************************/ 189 *******************************************************************************/
190 190
191 191
192 /******************************************************************************* 192 /*******************************************************************************
193 193
194 Include Files 194 Include Files
195 195
196 *******************************************************************************/ 196 *******************************************************************************/
197 197
198 #define ENTITY_MFW 198 #define ENTITY_MFW
199 199
200 /* includes */ 200 /* includes */
297 #include "mmiColours.h" 297 #include "mmiColours.h"
298 298
299 /* BEGIN ADD: Neptune Alignment */ 299 /* BEGIN ADD: Neptune Alignment */
300 #ifdef NEPTUNE_BOARD 300 #ifdef NEPTUNE_BOARD
301 #include "bmi_integ_misc.h" 301 #include "bmi_integ_misc.h"
302 #endif 302 #endif
303 /* END ADD: Neptune Alignment */ 303 /* END ADD: Neptune Alignment */
304 #ifdef NEPTUNE_BOARD 304 #ifdef NEPTUNE_BOARD
305 /* PLMN list count obtained from indication, stored in the global static variable*/ 305 /* PLMN list count obtained from indication, stored in the global static variable*/
306 /*OMAPS00061049 - 08-03-2006 */ 306 /*OMAPS00061049 - 08-03-2006 */
307 static int Plmn_list_count = 0; 307 static int Plmn_list_count = 0;
308 #endif 308 #endif
309 309
310 310
311 /* Enum containing GMT */ 311 /* Enum containing GMT */
312 typedef enum { 312 typedef enum {
313 MMI_GMT_NT_1200 = -48, /* Read as GMT -12:00 hrs */ 313 MMI_GMT_NT_1200 = -48, /* Read as GMT -12:00 hrs */
314 MMI_GMT_NT_1145 = -47, /* Read as GMT -11:45 hrs */ 314 MMI_GMT_NT_1145 = -47, /* Read as GMT -11:45 hrs */
315 MMI_GMT_NT_1130 = -46, 315 MMI_GMT_NT_1130 = -46,
316 MMI_GMT_NT_1115 = -45, 316 MMI_GMT_NT_1115 = -45,
317 MMI_GMT_NT_1100 = -44, 317 MMI_GMT_NT_1100 = -44,
460 char** pplmn_longnames; 460 char** pplmn_longnames;
461 CHAR buffer[6]; 461 CHAR buffer[6];
462 #ifdef NEW_EDITOR 462 #ifdef NEW_EDITOR
463 T_AUI_EDITOR_DATA editor_info; /* SPR#1428 - SH - New Editor data */ 463 T_AUI_EDITOR_DATA editor_info; /* SPR#1428 - SH - New Editor data */
464 #else 464 #else
465 T_EDITOR_DATA editor_info; /* storage for editor attributes */ 465 T_EDITOR_DATA editor_info; /* storage for editor attributes */
466 #endif 466 #endif
467 } T_network_OPT; 467 } T_network_OPT;
468 468
469 469
470 typedef enum 470 typedef enum
558 //Dec 13,2006 DR:OMAPS00098351 x0066814 - Added the FF_TIMEZONE flag 558 //Dec 13,2006 DR:OMAPS00098351 x0066814 - Added the FF_TIMEZONE flag
559 #ifdef FF_TIMEZONE 559 #ifdef FF_TIMEZONE
560 #define NETWORK_TIME_UPDATE 445 560 #define NETWORK_TIME_UPDATE 445
561 #endif 561 #endif
562 //Sep 18 2006 DRT :OMAPS0009268 x0061088 562 //Sep 18 2006 DRT :OMAPS0009268 x0061088
563 #define NETWORK_FORBIDDEN_NETWORK 446 563 #define NETWORK_FORBIDDEN_NETWORK 446
564 564
565 #ifdef NEPTUNE_BOARD 565 #ifdef NEPTUNE_BOARD
566 /* List destory not done - added - OMAPS00061049 - 08-03-2006 */ 566 /* List destory not done - added - OMAPS00061049 - 08-03-2006 */
567 #define NETWORK_LIST_DESTORY 440 567 #define NETWORK_LIST_DESTORY 440
568 #endif 568 #endif
569 569
570 /* 570 /*
571 * Local Network List Status 571 * Local Network List Status
572 */ 572 */
623 #endif //F_PHONE_LOCK 623 #endif //F_PHONE_LOCK
624 /******************************************************************************* 624 /*******************************************************************************
625 625
626 $Function: networkInit 626 $Function: networkInit
627 627
628 $Description: 628 $Description:
629 629
630 $Returns: 630 $Returns:
631 631
632 $Arguments: 632 $Arguments:
633 633
634 *******************************************************************************/ 634 *******************************************************************************/
635 T_MFW_HND networkInit (T_MFW_HND parent_window) 635 T_MFW_HND networkInit (T_MFW_HND parent_window)
636 { 636 {
637 return (network_create (parent_window)); 637 return (network_create (parent_window));
638 } 638 }
642 642
643 $Function: networkExit 643 $Function: networkExit
644 644
645 $Description: exit network handling (Backward Compatibility interface) 645 $Description: exit network handling (Backward Compatibility interface)
646 646
647 $Returns: 647 $Returns:
648 648
649 $Arguments: 649 $Arguments:
650 *********************************************************************/ 650 *********************************************************************/
651 651
652 652
653 void networkExit (void) 653 void networkExit (void)
654 { 654 {
670 670
671 $Function: network_create 671 $Function: network_create
672 672
673 $Description: create network top window 673 $Description: create network top window
674 674
675 $Returns: 675 $Returns:
676 676
677 $Arguments: 677 $Arguments:
678 678
679 *******************************************************************************/ 679 *******************************************************************************/
680 T_MFW_HND network_create (T_MFW_HND parent_window) 680 T_MFW_HND network_create (T_MFW_HND parent_window)
681 { 681 {
682 T_network * data = &network_data; 682 T_network * data = &network_data;
683 T_MFW_WIN * win; 683 T_MFW_WIN * win;
732 732
733 $Function: network_destroy 733 $Function: network_destroy
734 734
735 $Description: destroy network top window 735 $Description: destroy network top window
736 736
737 $Returns: 737 $Returns:
738 738
739 $Arguments: 739 $Arguments:
740 740
741 *******************************************************************************/ 741 *******************************************************************************/
742 void network_destroy (T_MFW_HND own_window) 742 void network_destroy (T_MFW_HND own_window)
743 { 743 {
744 T_MFW_WIN * win; 744 T_MFW_WIN * win;
745 T_network * data; 745 T_network * data;
771 771
772 $Function: network 772 $Function: network
773 773
774 $Description: network top window dialog function 774 $Description: network top window dialog function
775 775
776 $Returns: 776 $Returns:
777 777
778 $Arguments: 778 $Arguments:
779 779
780 *******************************************************************************/ 780 *******************************************************************************/
781 void network (T_MFW_HND win, USHORT event, SHORT value, void * parameter) 781 void network (T_MFW_HND win, USHORT event, SHORT value, void * parameter)
782 { 782 {
783 783
784 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; 784 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data;
785 T_network * data = (T_network *)win_data->user; 785 T_network * data = (T_network *)win_data->user;
786 T_MFW_NETWORK_STRUCT * plmn_ident; 786 T_MFW_NETWORK_STRUCT * plmn_ident;
787 UBYTE signal_value; 787 UBYTE signal_value;
788 788
792 T_DISPLAY_DATA display_info ; // Structure for info_dialog 792 T_DISPLAY_DATA display_info ; // Structure for info_dialog
793 T_MFW_TIME_IND *network_time; // Time/date info from network 793 T_MFW_TIME_IND *network_time; // Time/date info from network
794 T_MFW_TIME *time_format; // To get the current time format set in MS 794 T_MFW_TIME *time_format; // To get the current time format set in MS
795 #endif 795 #endif
796 796
797 797
798 TRACE_FUNCTION(">>> network()"); 798 TRACE_FUNCTION(">>> network()");
799 799
800 //x0pleela 09 Mar, 2007 DR: OMAPS00129014 800 //x0pleela 09 Mar, 2007 DR: OMAPS00129014
801 #ifdef FF_PHONE_LOCK 801 #ifdef FF_PHONE_LOCK
802 if( mfw_phlock_get_lock_status(MFW_PH_LOCK) == MFW_PH_LOCK_ENABLE ) 802 if( mfw_phlock_get_lock_status(MFW_PH_LOCK) == MFW_PH_LOCK_ENABLE )
803 { 803 {
804 TRACE_EVENT("idle_draw: MFW_PH_LOCK_ENABLE"); 804 TRACE_EVENT("idle_draw: MFW_PH_LOCK_ENABLE");
805 805
806 //x0pleela 23 May, 2007 DR: OMAPS00132483 806 //x0pleela 23 May, 2007 DR: OMAPS00132483
807 //Set the phone lock status to TRUE 807 //Set the phone lock status to TRUE
808 mfw_set_Phlock_status(TRUE); 808 mfw_set_Phlock_status(TRUE);
809 809
810 if( !phlock_win_handle ) 810 if( !phlock_win_handle )
811 phLock_UnLock(); 811 phLock_UnLock();
812 } 812 }
813 else //for Automatic Phone lock check 813 else //for Automatic Phone lock check
814 { 814 {
815 //x0pleela 23 May, 2007 DR: OMAPS00132483 815 //x0pleela 23 May, 2007 DR: OMAPS00132483
816 //Set the phone lock status to FALSE 816 //Set the phone lock status to FALSE
817 mfw_set_Phlock_status(FALSE); 817 mfw_set_Phlock_status(FALSE);
818 818
819 if( mfw_phlock_get_autolock_status(MFW_AUTO_PH_LOCK) == MFW_PH_LOCK_ENABLE ) 819 if( mfw_phlock_get_autolock_status(MFW_AUTO_PH_LOCK) == MFW_PH_LOCK_ENABLE )
820 { 820 {
821 phlock_auto = TRUE; 821 phlock_auto = TRUE;
822 822
823 //x0pleela 23 May, 2007 DR: OMAPS00132483 823 //x0pleela 23 May, 2007 DR: OMAPS00132483
824 //Set the auto phone lock status to TRUE 824 //Set the auto phone lock status to TRUE
825 mfw_set_Auto_Phlock_status(TRUE); 825 mfw_set_Auto_Phlock_status(TRUE);
826 } 826 }
827 //x0pleela 23 May, 2007 DR: OMAPS00132483 827 //x0pleela 23 May, 2007 DR: OMAPS00132483
828 //Set the auto phone lock status to FALSE 828 //Set the auto phone lock status to FALSE
829 mfw_set_Auto_Phlock_status(FALSE); 829 mfw_set_Auto_Phlock_status(FALSE);
830 } 830 }
831 #endif /* FF_PHONE_LOCK */ 831 #endif /* FF_PHONE_LOCK */
842 842
843 // June 02, 2006 DR: OMAPS00078005 x0021334 843 // June 02, 2006 DR: OMAPS00078005 x0021334
844 // Set PCTZV mode on 844 // Set PCTZV mode on
845 //Dec 13,2006 DR:OMAPS00098351 x0066814-Added the FF_TIMEZONE flag 845 //Dec 13,2006 DR:OMAPS00098351 x0066814-Added the FF_TIMEZONE flag
846 #ifdef FF_TIMEZONE 846 #ifdef FF_TIMEZONE
847 nm_get_network_time(); 847 nm_get_network_time();
848 #endif 848 #endif
849 849
850 /* 850 /*
851 * Check if network log is enabled 851 * Check if network log is enabled
852 */ 852 */
868 * 868 *
869 * Start the available plmn search 869 * Start the available plmn search
870 */ 870 */
871 nm_avail_plmn_list(); 871 nm_avail_plmn_list();
872 //Sep 23, 2004 REF: CRR 24562 xvilliva 872 //Sep 23, 2004 REF: CRR 24562 xvilliva
873 //After retrieving the list we see if an error occured 873 //After retrieving the list we see if an error occured
874 //and flash an alert to the user accordingly. 874 //and flash an alert to the user accordingly.
875 if(g_ensErr == 1) 875 if(g_ensErr == 1)
876 { 876 {
877 g_ensErr = 0; 877 g_ensErr = 0;
878 info_screen(0, TxtNotAllowed, TxtNull, NULL); 878 info_screen(0, TxtNotAllowed, TxtNull, NULL);
897 } 897 }
898 } 898 }
899 } 899 }
900 //Oct 05, 2006 ER: OMAPS00094496 x0061088(Prachi) 900 //Oct 05, 2006 ER: OMAPS00094496 x0061088(Prachi)
901 signal_value = 0 ; 901 signal_value = 0 ;
902 globalSignalUpdate(signal_value); 902 globalSignalUpdate(signal_value);
903 #ifdef MMI_HOMEZONE_ENABLED 903 #ifdef MMI_HOMEZONE_ENABLED
904 /* sh - tell homezone there is no network */ 904 /* sh - tell homezone there is no network */
905 //Jun 14, 2005 REF: MMI-FIX-30439 x0018858 905 //Jun 14, 2005 REF: MMI-FIX-30439 x0018858
906 //Modified to incorporate the third argument. 906 //Modified to incorporate the third argument.
907 homezoneUpdate(0,0,0); 907 homezoneUpdate(0,0,0);
917 TRACE_EVENT("NETWORK_FULL_SERVICE"); 917 TRACE_EVENT("NETWORK_FULL_SERVICE");
918 /* 918 /*
919 * Set Status 919 * Set Status
920 */ 920 */
921 data->status = NETWORK_FULL_SERVICE; 921 data->status = NETWORK_FULL_SERVICE;
922 #ifdef FF_CPHS_REL4 922 #ifdef FF_CPHS_REL4
923 mfw_cphs_get_msp_info(); 923 mfw_cphs_get_msp_info();
924 #endif 924 #endif
925 925
926 // June 02, 2006 DR: OMAPS00078005 x0021334 926 // June 02, 2006 DR: OMAPS00078005 x0021334
927 // Set PCTZV mode on 927 // Set PCTZV mode on
928 //Dec 13,2006 DR:OMAPS00098351 x0066814 - Added the FF_TIMEZONE flag 928 //Dec 13,2006 DR:OMAPS00098351 x0066814 - Added the FF_TIMEZONE flag
929 #ifdef FF_TIMEZONE 929 #ifdef FF_TIMEZONE
930 nm_get_network_time(); 930 nm_get_network_time();
931 #endif 931 #endif
932 /* 932 /*
933 * Copy Network Name in textual and numerical format 933 * Copy Network Name in textual and numerical format
934 * 934 *
935 * NOTE: Service Provider Name is not used 935 * NOTE: Service Provider Name is not used
936 * Operator Name from SIM needs CPHS support by MFW 936 * Operator Name from SIM needs CPHS support by MFW
937 */ 937 */
938 plmn_ident = (T_MFW_NETWORK_STRUCT *)parameter; 938 plmn_ident = (T_MFW_NETWORK_STRUCT *)parameter;
939 939
940 //x0pleela 15 Feb, 2006 ER: OMAPs00065203 940 //x0pleela 15 Feb, 2006 ER: OMAPs00065203
941 //Removed the global variable gOper_sel_done and have introduced 2 functions which will 941 //Removed the global variable gOper_sel_done and have introduced 2 functions which will
942 //set and get the status of the operator selection 942 //set and get the status of the operator selection
943 943
944 //x0pleela 9 Feb, 2006 ER:OMAPS00065203 944 //x0pleela 9 Feb, 2006 ER:OMAPS00065203
945 //Check if EONS is allocated and activated. If not, and if operator name is not yet obtained from other sources 945 //Check if EONS is allocated and activated. If not, and if operator name is not yet obtained from other sources
946 //get operator name from other sources 946 //get operator name from other sources
947 if( ( ( plmn_ident->opn_read_from EQ NM_CPHS ) AND ( plmn_ident->roaming_indicator) ) 947 if( ( ( plmn_ident->opn_read_from EQ NM_CPHS ) AND ( plmn_ident->roaming_indicator) )
948 OR (plmn_ident->opn_read_from EQ NM_ROM) ) 948 OR (plmn_ident->opn_read_from EQ NM_ROM) )
949 { 949 {
950 //get operator name from other sources CPHS or NITZ or ROM 950 //get operator name from other sources CPHS or NITZ or ROM
951 nm_get_opername(plmn_ident); 951 nm_get_opername(plmn_ident);
952 } 952 }
953 memset(data->plmn_name, 0, SIZE_PLMN_NAME); 953 memset(data->plmn_name, 0, SIZE_PLMN_NAME);
954 memset(data->network_name, 0, SIZE_NETWORK_NAME); /* x0039928 - Lint warning removal */ 954 memset(data->network_name, 0, SIZE_NETWORK_NAME); /* x0039928 - Lint warning removal */
955 #ifdef NO_ASCIIZ 955 #ifdef NO_ASCIIZ
956 memcpy (data->plmn_name, &plmn_ident->network_long.data, SIZE_PLMN_NAME); 956 memcpy (data->plmn_name, &plmn_ident->network_long.data, SIZE_PLMN_NAME);
957 #else 957 #else
958 memcpy (data->plmn_name, plmn_ident->network_long, SIZE_PLMN_NAME); 958 memcpy (data->plmn_name, plmn_ident->network_long, SIZE_PLMN_NAME);
959 #endif 959 #endif
960 memcpy (data->network_name, plmn_ident->network_numeric, SIZE_NETWORK_NAME); 960 memcpy (data->network_name, plmn_ident->network_numeric, SIZE_NETWORK_NAME);
961 961
962 /* 962 /*
963 * If network name is not known use numeric representation as default. 963 * If network name is not known use numeric representation as default.
964 */ 964 */
965 965
966 #ifdef NO_ASCIIZ 966 #ifdef NO_ASCIIZ
967 //Apr 13, 2007 DRT:OMAPS00122739 x0066814(Geetha) 967 //Apr 13, 2007 DRT:OMAPS00122739 x0066814(Geetha)
968 if(!(strlen((char*)data->plmn_name))) 968 if(!(strlen((char*)data->plmn_name)))
969 { 969 {
970 970
971 if( plmn_ident->network_short.len EQ 0 ) 971 if( plmn_ident->network_short.len EQ 0 )
972 strcpy ((char *)data->plmn_name, (char *)data->network_name); 972 strcpy ((char *)data->plmn_name, (char *)data->network_name);
973 else 973 else
974 memcpy (data->plmn_name, &plmn_ident->network_short.data, SHORT_NAME); /* x0039928 -Lint warning removal */ 974 memcpy (data->plmn_name, &plmn_ident->network_short.data, SHORT_NAME); /* x0039928 -Lint warning removal */
975 975
976 } 976 }
977 #else 977 #else
978 //Apr 13, 2007 DRT:OMAPS00122739 x0066814(Geetha) 978 //Apr 13, 2007 DRT:OMAPS00122739 x0066814(Geetha)
979 if(!(strlen((char*)data->plmn_name))) 979 if(!(strlen((char*)data->plmn_name)))
980 { 980 {
981 981
982 if (strlen ((char *)(plmn_ident->network_short)) EQ 0) 982 if (strlen ((char *)(plmn_ident->network_short)) EQ 0)
983 strcpy ((char *)data->plmn_name, (char *)data->network_name); 983 strcpy ((char *)data->plmn_name, (char *)data->network_name);
984 else 984 else
985 memcpy (data->plmn_name, &plmn_ident->network_short, SIZE_PLMN_NAME); 985 memcpy (data->plmn_name, &plmn_ident->network_short, SIZE_PLMN_NAME);
986 986
987 } 987 }
988 #endif 988 #endif
989 /* 989 /*
990 * Store Roaming Indicator 990 * Store Roaming Indicator
991 */ 991 */
992 data->roaming_indicator = plmn_ident->roaming_indicator; 992 data->roaming_indicator = plmn_ident->roaming_indicator;
993 993
994 network_stop_animation (); 994 network_stop_animation ();
995 995
996 /* 996 /*
997 * Inform Idle screen 997 * Inform Idle screen
998 */ 998 */
999 SEND_EVENT (idle_get_window(), NETWORK_FULL_SERVICE, 0, 0); 999 SEND_EVENT (idle_get_window(), NETWORK_FULL_SERVICE, 0, 0);
1000 1000
1007 { 1007 {
1008 case NETWORK_LIST_REGISTRATION: 1008 case NETWORK_LIST_REGISTRATION:
1009 if(data->keep_plmn_list EQ FALSE) 1009 if(data->keep_plmn_list EQ FALSE)
1010 { 1010 {
1011 TRACE_EVENT("NETWORK_LIST_REGISTRATION No 1"); 1011 TRACE_EVENT("NETWORK_LIST_REGISTRATION No 1");
1012 1012
1013 #ifdef FF_2TO1_PS 1013 #ifdef FF_2TO1_PS
1014 #ifndef NEPTUNE_BOARD 1014 #ifndef NEPTUNE_BOARD
1015 FREE_MEMORY ((UBYTE *)data->network_list->List, 1015 FREE_MEMORY ((UBYTE *)data->network_list->List,
1016 MMREG_MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM)); 1016 MMREG_MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM));
1017 #else 1017 #else
1018 /* Free the allocated memory for PLMN list window - 1018 /* Free the allocated memory for PLMN list window -
1019 OMAPS00061049 - 08-03-2006 */ 1019 OMAPS00061049 - 08-03-2006 */
1020 FREE_MEMORY ((UBYTE *)data->network_list->List, 1020 FREE_MEMORY ((UBYTE *)data->network_list->List,
1021 Plmn_list_count * sizeof (T_MFW_MNU_ITEM)); 1021 Plmn_list_count * sizeof (T_MFW_MNU_ITEM));
1022 #endif 1022 #endif
1023 1023
1024 #else 1024 #else
1025 1025
1026 #ifndef NEPTUNE_BOARD 1026 #ifndef NEPTUNE_BOARD
1027 FREE_MEMORY ((UBYTE *)data->network_list->List, 1027 FREE_MEMORY ((UBYTE *)data->network_list->List,
1028 MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM)); 1028 MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM));
1029 #else 1029 #else
1030 /* Free the allocated memory for PLMN list window - 1030 /* Free the allocated memory for PLMN list window -
1031 OMAPS00061049 - 08-03-2006 */ 1031 OMAPS00061049 - 08-03-2006 */
1032 FREE_MEMORY ((UBYTE *)data->network_list->List, 1032 FREE_MEMORY ((UBYTE *)data->network_list->List,
1033 Plmn_list_count * sizeof (T_MFW_MNU_ITEM)); 1033 Plmn_list_count * sizeof (T_MFW_MNU_ITEM));
1034 #endif 1034 #endif
1035 1035
1036 #endif 1036 #endif
1037 FREE_MEMORY ((UBYTE *)data->network_list, sizeof (ListMenuData)); 1037 FREE_MEMORY ((UBYTE *)data->network_list, sizeof (ListMenuData));
1048 /* Commented out and moved 1048 /* Commented out and moved
1049 network_selected(); */ 1049 network_selected(); */
1050 break; 1050 break;
1051 } 1051 }
1052 // API - Moved from previous position 1052 // API - Moved from previous position
1053 network_selected(); 1053 network_selected();
1054 } 1054 }
1055 1055
1056 // Apr 14, 2004 REF: CRR 12641 xpradipg 1056 // Apr 14, 2004 REF: CRR 12641 xpradipg
1057 if(Auto_Network_Select==true) 1057 if(Auto_Network_Select==true)
1058 { 1058 {
1059 network_selected(); 1059 network_selected();
1060 Auto_Network_Select=false; 1060 Auto_Network_Select=false;
1061 } 1061 }
1062 1062
1063 break; 1063 break;
1064 1064
1065 case NETWORK_NO_NETWORK: 1065 case NETWORK_NO_NETWORK:
1066 TRACE_EVENT ("NETWORK NO NETWORK"); 1066 TRACE_EVENT ("NETWORK NO NETWORK");
1067 /* 1067 /*
1114 * If network list is available, destroy 1114 * If network list is available, destroy
1115 */ 1115 */
1116 if (data->network_list NEQ NULL) 1116 if (data->network_list NEQ NULL)
1117 { 1117 {
1118 1118
1119 #ifdef FF_2TO1_PS 1119 #ifdef FF_2TO1_PS
1120 #ifndef NEPTUNE_BOARD 1120 #ifndef NEPTUNE_BOARD
1121 FREE_MEMORY ((UBYTE *)data->network_list->List, 1121 FREE_MEMORY ((UBYTE *)data->network_list->List,
1122 MMREG_MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM)); 1122 MMREG_MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM));
1123 #else 1123 #else
1124 /* Free the allocated memory for PLMN list window - 1124 /* Free the allocated memory for PLMN list window -
1125 OMAPS00061049 - 08-03-2006 */ 1125 OMAPS00061049 - 08-03-2006 */
1126 FREE_MEMORY ((UBYTE *)data->network_list->List, 1126 FREE_MEMORY ((UBYTE *)data->network_list->List,
1127 Plmn_list_count * sizeof (T_MFW_MNU_ITEM)); 1127 Plmn_list_count * sizeof (T_MFW_MNU_ITEM));
1128 #endif 1128 #endif
1129 1129
1130 #else 1130 #else
1131 #ifndef NEPTUNE_BOARD 1131 #ifndef NEPTUNE_BOARD
1132 FREE_MEMORY ((UBYTE *)data->network_list->List, 1132 FREE_MEMORY ((UBYTE *)data->network_list->List,
1133 MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM)); 1133 MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM));
1134 #else 1134 #else
1135 /* Free the allocated memory for PLMN list window - 1135 /* Free the allocated memory for PLMN list window -
1136 OMAPS00061049 - 08-03-2006 */ 1136 OMAPS00061049 - 08-03-2006 */
1137 FREE_MEMORY ((UBYTE *)data->network_list->List, 1137 FREE_MEMORY ((UBYTE *)data->network_list->List,
1138 Plmn_list_count * sizeof (T_MFW_MNU_ITEM)); 1138 Plmn_list_count * sizeof (T_MFW_MNU_ITEM));
1139 #endif 1139 #endif
1140 1140
1141 #endif 1141 #endif
1142 1142
1143 FREE_MEMORY ((UBYTE *)data->network_list, sizeof (ListMenuData)); 1143 FREE_MEMORY ((UBYTE *)data->network_list, sizeof (ListMenuData));
1144 data->network_list = NULL; 1144 data->network_list = NULL;
1145 } 1145 }
1146 1146
1147 /* Jan 10, 2007 REF: OMAPS00110741 x0039928(sumanth) */ 1147 /* Jan 10, 2007 REF: OMAPS00110741 x0039928(sumanth) */
1158 Plmn_list_count = plmn_list->count; 1158 Plmn_list_count = plmn_list->count;
1159 #endif 1159 #endif
1160 /* Dec 13, 2006 DRT: OMAPS00105640 x0039928(Sumanth) 1160 /* Dec 13, 2006 DRT: OMAPS00105640 x0039928(Sumanth)
1161 Fix: Condition added to check if sim is active */ 1161 Fix: Condition added to check if sim is active */
1162 if(SIM_NOT_ACTIVE != sim_status_check()) 1162 if(SIM_NOT_ACTIVE != sim_status_check())
1163 { 1163 {
1164 if (plmn_list->count EQ 0) 1164 if (plmn_list->count EQ 0)
1165 { 1165 {
1166 network_stop_animation (); 1166 network_stop_animation ();
1167 network_no_plmns (); 1167 network_no_plmns ();
1168 } 1168 }
1172 * Create and present list of available PLMNs 1172 * Create and present list of available PLMNs
1173 * 1173 *
1174 */ 1174 */
1175 1175
1176 /* Pass the plmn_list which already hold the parameter data - OMAPS00061049 - 08-03-2006 */ 1176 /* Pass the plmn_list which already hold the parameter data - OMAPS00061049 - 08-03-2006 */
1177 #ifndef NEPTUNE_BOARD 1177 #ifndef NEPTUNE_BOARD
1178 data->network_list = network_create_list (data, parameter); 1178 data->network_list = network_create_list (data, parameter);
1179 #else 1179 #else
1180 data->network_list = network_create_list (data, plmn_list ); 1180 data->network_list = network_create_list (data, plmn_list );
1181 #endif 1181 #endif
1182 data->network_list_status = NETWORK_LIST_DISPLAY_FIRST; 1182 data->network_list_status = NETWORK_LIST_DISPLAY_FIRST;
1183 network_stop_animation (); 1183 network_stop_animation ();
1184 listDisplayListMenu (win, data->network_list, (ListCbFunc)network_list_cb,0); 1184 listDisplayListMenu (win, data->network_list, (ListCbFunc)network_list_cb,0);
1185 1185
1186 // change by Sasken ( Pradeep/Vadiraj) on Apr 07th 2004 1186 // change by Sasken ( Pradeep/Vadiraj) on Apr 07th 2004
1187 // Issue Number : SPR#12654 on 07/04/04 by Pradeep/Vadiraj 1187 // Issue Number : SPR#12654 on 07/04/04 by Pradeep/Vadiraj
1188 // Bug : Pressing "search" button does not trigger anything 1188 // Bug : Pressing "search" button does not trigger anything
1189 // Solution: When the ME is already camped on to a network the NoNetwork event is not sent. 1189 // Solution: When the ME is already camped on to a network the NoNetwork event is not sent.
1190 // Commented the following line 1190 // Commented the following line
1191 // SEND_EVENT (idle_get_window(), NETWORK_NO_SERVICE, 0, 0); 1191 // SEND_EVENT (idle_get_window(), NETWORK_NO_SERVICE, 0, 0);
1192 1192
1193 1193
1194 } 1194 }
1195 } 1195 }
1196 } 1196 }
1197 } 1197 }
1198 //Mar 30,2007 DRT: OMAPS00120157 x00061088(Prachi) 1198 //Mar 30,2007 DRT: OMAPS00120157 x00061088(Prachi)
1199 if(data->network_list_status == NETWORK_LIST_DISPLAY_FIRST) 1199 if(data->network_list_status == NETWORK_LIST_DISPLAY_FIRST)
1200 { 1200 {
1201 // Feb 08,2007 DRT: OMAPS00115060 x00061088(Prachi) 1201 // Feb 08,2007 DRT: OMAPS00115060 x00061088(Prachi)
1202 if (network_data.forbidden == TRUE) 1202 if (network_data.forbidden == TRUE)
1203 { 1203 {
1204 network_forbidden_plmn(); 1204 network_forbidden_plmn();
1205 network_data.forbidden = FALSE; 1205 network_data.forbidden = FALSE;
1206 } 1206 }
1207 } 1207 }
1208 1208
1209 } 1209 }
1210 else 1210 else
1211 { 1211 {
1212 network_data.aborted = FALSE; 1212 network_data.aborted = FALSE;
1213 } 1213 }
1229 */ 1229 */
1230 network_start_animation_plmn_selection (value); 1230 network_start_animation_plmn_selection (value);
1231 data->network_list_status = NETWORK_LIST_SELECTED; 1231 data->network_list_status = NETWORK_LIST_SELECTED;
1232 nm_select_plmn ((U8 *)network_data.network_search_name[value]); 1232 nm_select_plmn ((U8 *)network_data.network_search_name[value]);
1233 //Sep 23, 2004 REF: CRR 24562 xvilliva 1233 //Sep 23, 2004 REF: CRR 24562 xvilliva
1234 //After retrieving the list we see if an error occured 1234 //After retrieving the list we see if an error occured
1235 //and flash an alert to the user accordingly. 1235 //and flash an alert to the user accordingly.
1236 if(g_ensErr == 1) 1236 if(g_ensErr == 1)
1237 { 1237 {
1238 g_ensErr = 0; 1238 g_ensErr = 0;
1239 info_screen(0, TxtNotAllowed, TxtNull, NULL); 1239 info_screen(0, TxtNotAllowed, TxtNull, NULL);
1241 1241
1242 /* x0056422, OMAPS00148258 */ 1242 /* x0056422, OMAPS00148258 */
1243 1243
1244 if (data->network_list NEQ NULL) 1244 if (data->network_list NEQ NULL)
1245 { 1245 {
1246 #ifdef FF_2TO1_PS 1246 #ifdef FF_2TO1_PS
1247 #ifndef NEPTUNE_BOARD 1247 #ifndef NEPTUNE_BOARD
1248 FREE_MEMORY ((UBYTE *)data->network_list->List, 1248 FREE_MEMORY ((UBYTE *)data->network_list->List,
1249 MMREG_MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM)); 1249 MMREG_MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM));
1250 #else 1250 #else
1251 /* Free the allocated memory for PLMN list window - 1251 /* Free the allocated memory for PLMN list window -
1252 OMAPS00061049 - 08-03-2006 */ 1252 OMAPS00061049 - 08-03-2006 */
1253 FREE_MEMORY ((UBYTE *)data->network_list->List, 1253 FREE_MEMORY ((UBYTE *)data->network_list->List,
1254 Plmn_list_count * sizeof (T_MFW_MNU_ITEM)); 1254 Plmn_list_count * sizeof (T_MFW_MNU_ITEM));
1255 #endif /* NEPTUNE_BOARD */ 1255 #endif /* NEPTUNE_BOARD */
1256 1256
1257 #else 1257 #else
1258 #ifndef NEPTUNE_BOARD 1258 #ifndef NEPTUNE_BOARD
1259 FREE_MEMORY ((UBYTE *)data->network_list->List, 1259 FREE_MEMORY ((UBYTE *)data->network_list->List,
1260 MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM)); 1260 MAX_PLMN_ID * sizeof (T_MFW_MNU_ITEM));
1261 #else 1261 #else
1262 /* Free the allocated memory for PLMN list window - 1262 /* Free the allocated memory for PLMN list window -
1263 OMAPS00061049 - 08-03-2006 */ 1263 OMAPS00061049 - 08-03-2006 */
1264 FREE_MEMORY ((UBYTE *)data->network_list->List, 1264 FREE_MEMORY ((UBYTE *)data->network_list->List,
1265 Plmn_list_count * sizeof (T_MFW_MNU_ITEM)); 1265 Plmn_list_count * sizeof (T_MFW_MNU_ITEM));
1266 #endif /* NEPTUNE_BOARD */ 1266 #endif /* NEPTUNE_BOARD */
1267 1267
1268 #endif /* FF_2TO1_PS */ 1268 #endif /* FF_2TO1_PS */
1269 1269
1270 FREE_MEMORY ((UBYTE *)data->network_list, sizeof (ListMenuData)); 1270 FREE_MEMORY ((UBYTE *)data->network_list, sizeof (ListMenuData));
1271 data->network_list = NULL; 1271 data->network_list = NULL;
1272 } 1272 }
1273 //Modify by hou peng 2007/09/19 end 1273 //Modify by hou peng 2007/09/19 end
1274 1274
1275 /* x0056422 OMAPS00148258 */ 1275 /* x0056422 OMAPS00148258 */
1276 1276
1277 break; 1277 break;
1278 case NETWORK_PPLMN_MEM_LIST: 1278 case NETWORK_PPLMN_MEM_LIST:
1283 TRACE_EVENT (">> NETWORK PPLMN MEM LIST"); 1283 TRACE_EVENT (">> NETWORK PPLMN MEM LIST");
1284 /* Save the number of PLMN records: 1284 /* Save the number of PLMN records:
1285 * maxRcd = maximum preferred PLMN records on the SIM card 1285 * maxRcd = maximum preferred PLMN records on the SIM card
1286 * usedRcd = used preferred PLMN records on the SIM card 1286 * usedRcd = used preferred PLMN records on the SIM card
1287 */ 1287 */
1288 pplmn_mem = (T_MFW_PPLMN_MEM *)parameter; 1288 pplmn_mem = (T_MFW_PPLMN_MEM *)parameter;
1289 1289
1290 network_data.pplmn_mem.maxRcd = pplmn_mem->maxRcd; 1290 network_data.pplmn_mem.maxRcd = pplmn_mem->maxRcd;
1291 network_data.pplmn_mem.usedRcd = pplmn_mem->usedRcd; 1291 network_data.pplmn_mem.usedRcd = pplmn_mem->usedRcd;
1292 1292
1293 /* 1293 /*
1294 * Request preferred PLMN list from the SIM 1294 * Request preferred PLMN list from the SIM
1295 */ 1295 */
1296 1296
1297 1297
1298 network_data.pplmn = (T_MFW_NETWORK_STRUCT *)ALLOC_MEMORY ((pplmn_mem->maxRcd) * sizeof (T_MFW_NETWORK_STRUCT)); 1298 network_data.pplmn = (T_MFW_NETWORK_STRUCT *)ALLOC_MEMORY ((pplmn_mem->maxRcd) * sizeof (T_MFW_NETWORK_STRUCT));
1299 1299
1300 if (network_data.pplmn EQ 0) 1300 if (network_data.pplmn EQ 0)
1301 { 1301 {
1302 return; 1302 return;
1303 } 1303 }
1304 1304
1316 for (i=0; i < (network_data.pplmn_mem.maxRcd); i++) 1316 for (i=0; i < (network_data.pplmn_mem.maxRcd); i++)
1317 { 1317 {
1318 #ifdef NO_ASCIIZ 1318 #ifdef NO_ASCIIZ
1319 network_data.pplmn[i].network_long.len = 0; 1319 network_data.pplmn[i].network_long.len = 0;
1320 network_data.pplmn[i].network_short.len = 0; 1320 network_data.pplmn[i].network_short.len = 0;
1321 #else 1321 #else
1322 memset(network_data.pplmn[i].network_long, '\0', LONG_NAME); 1322 memset(network_data.pplmn[i].network_long, '\0', LONG_NAME);
1323 memset(network_data.pplmn[i].network_short, '\0', SHORT_NAME); 1323 memset(network_data.pplmn[i].network_short, '\0', SHORT_NAME);
1324 #endif 1324 #endif
1325 memset(network_data.pplmn[i].network_numeric, '\0', NUMERIC_LENGTH); 1325 memset(network_data.pplmn[i].network_numeric, '\0', NUMERIC_LENGTH);
1326 } 1326 }
1327 1327
1328 data->network_list = network_create_pref_list (data); 1328 data->network_list = network_create_pref_list (data);
1329 listDisplayListMenu (win, data->network_list,(ListCbFunc)network_pref_list_cb,0); 1329 listDisplayListMenu (win, data->network_list,(ListCbFunc)network_pref_list_cb,0);
1330 } 1330 }
1331 1331
1332 } 1332 }
1333 break; 1333 break;
1334 1334
1335 case NETWORK_PREFERRED_LIST: 1335 case NETWORK_PREFERRED_LIST:
1336 { 1336 {
1337 1337
1338 /* UBYTE i; */ /* Warning Correction */ 1338 /* UBYTE i; */ /* Warning Correction */
1339 1339
1340 1340
1341 TRACE_EVENT (">>NETWORK PREFERRED LIST"); 1341 TRACE_EVENT (">>NETWORK PREFERRED LIST");
1342 /* 1342 /*
1343 * Create and present the preferred list of PLMNs 1343 * Create and present the preferred list of PLMNs
1344 * 1344 *
1345 */ 1345 */
1346 1346
1347 //nm network_stop_animation (); 1347 //nm network_stop_animation ();
1348 1348
1349 1349
1350 data->network_list = network_create_pref_list (data); 1350 data->network_list = network_create_pref_list (data);
1351 1351
1352 /* cq12719 Check if prefered list info resource has been created.16-03-04 MZ */ 1352 /* cq12719 Check if prefered list info resource has been created.16-03-04 MZ */
1353 if(data->network_list != NULL) 1353 if(data->network_list != NULL)
1354 listDisplayListMenu (win, data->network_list,(ListCbFunc)network_pref_list_cb,0); 1354 listDisplayListMenu (win, data->network_list,(ListCbFunc)network_pref_list_cb,0);
1355 } 1355 }
1356 break; 1356 break;
1357 1357
1358 case NETWORK_CELL_SELECT: 1358 case NETWORK_CELL_SELECT:
1359 { 1359 {
1360 1360
1361 /* x0045876, 14-Aug-2006 (WR -"cell_data" was set but never used) */ 1361 /* x0045876, 14-Aug-2006 (WR -"cell_data" was set but never used) */
1362 #ifdef MMI_HOMEZONE_ENABLED 1362 #ifdef MMI_HOMEZONE_ENABLED
1363 /* If Homezone is active, inform it of the new cell data */ 1363 /* If Homezone is active, inform it of the new cell data */
1364 T_MFW_CELL_STRUCT *cell_data; 1364 T_MFW_CELL_STRUCT *cell_data;
1365 #endif 1365 #endif
1366 1366
1367 TRACE_EVENT(">>NETWORK CELL SELECT"); 1367 TRACE_EVENT(">>NETWORK CELL SELECT");
1368 1368
1369 1369
1370 /* x0045876, 14-Aug-2006 (WR -"cell_data" was set but never used) */ 1370 /* x0045876, 14-Aug-2006 (WR -"cell_data" was set but never used) */
1371 /* cell_data = (T_MFW_CELL_STRUCT *)parameter; */ 1371 /* cell_data = (T_MFW_CELL_STRUCT *)parameter; */
1372 1372
1373 #ifdef MMI_HOMEZONE_ENABLED 1373 #ifdef MMI_HOMEZONE_ENABLED
1374 1374
1375 /* x0045876, 14-Aug-2006 (WR -"cell_data" was set but never used) */ 1375 /* x0045876, 14-Aug-2006 (WR -"cell_data" was set but never used) */
1376 cell_data = (T_MFW_CELL_STRUCT *)parameter; 1376 cell_data = (T_MFW_CELL_STRUCT *)parameter;
1377 1377
1378 /* SPR759 - SH - send cell reselection info to homezone */ 1378 /* SPR759 - SH - send cell reselection info to homezone */
1379 1379
1380 //Jun 14, 2005 REF: MMI-FIX-30439 x0018858 1380 //Jun 14, 2005 REF: MMI-FIX-30439 x0018858
1381 //Modified to incorporate the third argument. 1381 //Modified to incorporate the third argument.
1382 homezoneUpdate(cell_data->lid, cell_data->ci, 0); 1382 homezoneUpdate(cell_data->lid, cell_data->ci, 0);
1383 #endif 1383 #endif
1384 break; 1384 break;
1385 #ifdef NEPTUNE_BOARD 1385 #ifdef NEPTUNE_BOARD
1386 /* Destory the list when select softkey is pressed / back softkey is pressed */ 1386 /* Destory the list when select softkey is pressed / back softkey is pressed */
1387 /* OMAPS00061049 - 08-03-2006 - BEGIN*/ 1387 /* OMAPS00061049 - 08-03-2006 - BEGIN*/
1388 case NETWORK_LIST_DESTORY: 1388 case NETWORK_LIST_DESTORY:
1389 TRACE_EVENT ("Inside NETWORK_LIST_DESTORY Event"); 1389 TRACE_EVENT ("Inside NETWORK_LIST_DESTORY Event");
1390 1390
1391 /* Destory the list window */ 1391 /* Destory the list window */
1392 listsDestroy(data->network_list->win); 1392 listsDestroy(data->network_list->win);
1393 1393
1394 TRACE_EVENT ("Destoryed list window successfully"); 1394 TRACE_EVENT ("Destoryed list window successfully");
1395 1395
1396 /* 1396 /*
1397 * If network list is available, destroy 1397 * If network list is available, destroy
1398 */ 1398 */
1399 if (data->network_list NEQ NULL) 1399 if (data->network_list NEQ NULL)
1400 { 1400 {
1401 1401
1402 #ifdef FF_2TO1_PS 1402 #ifdef FF_2TO1_PS
1403 /* Free the allocated memory for PLMN list window - OMAPS00061049 - 08-03-2006 */ 1403 /* Free the allocated memory for PLMN list window - OMAPS00061049 - 08-03-2006 */
1404 FREE_MEMORY ((UBYTE *)data->network_list->List, Plmn_list_count * sizeof (T_MFW_MNU_ITEM)); 1404 FREE_MEMORY ((UBYTE *)data->network_list->List, Plmn_list_count * sizeof (T_MFW_MNU_ITEM));
1405 #else 1405 #else
1406 /* Free the allocated memory for PLMN list window - OMAPS00061049 - 08-03-2006 */ 1406 /* Free the allocated memory for PLMN list window - OMAPS00061049 - 08-03-2006 */
1407 FREE_MEMORY ((UBYTE *)data->network_list->List, Plmn_list_count * sizeof (T_MFW_MNU_ITEM)); 1407 FREE_MEMORY ((UBYTE *)data->network_list->List, Plmn_list_count * sizeof (T_MFW_MNU_ITEM));
1408 #endif 1408 #endif
1409 1409
1410 FREE_MEMORY ((UBYTE *)data->network_list, sizeof (ListMenuData)); 1410 FREE_MEMORY ((UBYTE *)data->network_list, sizeof (ListMenuData));
1411 data->network_list = NULL; 1411 data->network_list = NULL;
1412 } 1412 }
1413 1413
1414 TRACE_EVENT ("List window memory freed"); 1414 TRACE_EVENT ("List window memory freed");
1415 break; 1415 break;
1416 /* OMAPS00061049 - 08-03-2006 - END */ 1416 /* OMAPS00061049 - 08-03-2006 - END */
1417 #endif 1417 #endif
1418 1418
1419 1419
1420 } 1420 }
1421 1421
1422 // June 02, 2006 DR: OMAPS00078005 x0021334 1422 // June 02, 2006 DR: OMAPS00078005 x0021334
1423 // Descripton: Test for NITZ (Network Identity and Timezone) support - No New time was displayed 1423 // Descripton: Test for NITZ (Network Identity and Timezone) support - No New time was displayed
1424 // Solution: New Time/Date received from network is sent to MFW by lower layer by invoking 'rAT_PercentCTZV' 1424 // Solution: New Time/Date received from network is sent to MFW by lower layer by invoking 'rAT_PercentCTZV'
1425 // function. The same is received and handled in case NETWORK_TIME_UPDATE in MMI for user 1425 // function. The same is received and handled in case NETWORK_TIME_UPDATE in MMI for user
1426 // confirmation and RTC updation. 1426 // confirmation and RTC updation.
1427 1427
1428 //Dec 13,2006 DR:OMAPS00098351 x0066814 - Begin 1428 //Dec 13,2006 DR:OMAPS00098351 x0066814 - Begin
1429 #ifdef FF_TIMEZONE 1429 #ifdef FF_TIMEZONE
1430 case NETWORK_TIME_UPDATE: 1430 case NETWORK_TIME_UPDATE:
1431 { 1431 {
1432 BOOL modify_date_negative = FALSE; 1432 BOOL modify_date_negative = FALSE;
1433 BOOL modify_date_positive = FALSE; 1433 BOOL modify_date_positive = FALSE;
1434 int actual_TD = 0; 1434 int actual_TD = 0;
1435 int absolute_value; 1435 int absolute_value;
1436 1436
1437 TRACE_EVENT ("Inside NETWORK_TIME_UPDATE Event"); 1437 TRACE_EVENT ("Inside NETWORK_TIME_UPDATE Event");
1438 1438
1439 if(FFS_flashData.nitz_option!=NitzOff) 1439 if(FFS_flashData.nitz_option!=NitzOff)
1440 { 1440 {
1441 1441
1453 TRACE_EVENT_P1("Absolute value: %x", absolute_value); 1453 TRACE_EVENT_P1("Absolute value: %x", absolute_value);
1454 if((actual_TD & 0x08)) 1454 if((actual_TD & 0x08))
1455 { 1455 {
1456 absolute_value = ~absolute_value+1; 1456 absolute_value = ~absolute_value+1;
1457 } 1457 }
1458 1458
1459 actual_TD = absolute_value; 1459 actual_TD = absolute_value;
1460 1460
1461 if(actual_TD >0) 1461 if(actual_TD >0)
1462 { 1462 {
1463 1463
1464 network_time->hour = network_time->hour + actual_TD/4 ; 1464 network_time->hour = network_time->hour + actual_TD/4 ;
1465 1465
1466 network_time->minute = network_time->minute + (actual_TD%4)*15; 1466 network_time->minute = network_time->minute + (actual_TD%4)*15;
1467 if(network_time->minute > 60) 1467 if(network_time->minute > 60)
1468 { 1468 {
1469 network_time->minute = network_time->minute - 60 ; 1469 network_time->minute = network_time->minute - 60 ;
1470 network_time->hour = network_time->hour +1; 1470 network_time->hour = network_time->hour +1;
1490 } 1490 }
1491 else if((network_time->minute - abs((actual_TD%4)*15)) == 0) 1491 else if((network_time->minute - abs((actual_TD%4)*15)) == 0)
1492 { 1492 {
1493 network_time->minute = 0; 1493 network_time->minute = 0;
1494 network_time->hour = network_time->hour - 1; 1494 network_time->hour = network_time->hour - 1;
1495 1495
1496 } 1496 }
1497 else 1497 else
1498 network_time->minute = network_time->minute - abs((actual_TD%4)*15); 1498 network_time->minute = network_time->minute - abs((actual_TD%4)*15);
1499 1499
1500 if((network_time->hour - abs(actual_TD/4 )) < 0) 1500 if((network_time->hour - abs(actual_TD/4 )) < 0)
1501 modify_date_negative = TRUE; 1501 modify_date_negative = TRUE;
1502 else 1502 else
1503 network_time->hour = network_time->hour - abs(actual_TD/4 ); 1503 network_time->hour = network_time->hour - abs(actual_TD/4 );
1504 1504
1505 } 1505 }
1506 1506
1507 //Assume the date is 1/07/2005 5 Am in the morning 1507 //Assume the date is 1/07/2005 5 Am in the morning
1508 //After time zone calculation it needs to become 30/06/2005 and not 31 st June 2005 since there are only 30 days 1508 //After time zone calculation it needs to become 30/06/2005 and not 31 st June 2005 since there are only 30 days
1509 //in all the odd months before July and in all the even months after july(7th Month) 1509 //in all the odd months before July and in all the even months after july(7th Month)
1510 //Similarly a problem arises if the year too needs to be adjusted after the timezone calculations. 1510 //Similarly a problem arises if the year too needs to be adjusted after the timezone calculations.
1511 1511
1512 1512
1515 1515
1516 TRACE_EVENT("modify date negative"); 1516 TRACE_EVENT("modify date negative");
1517 network_time->hour = 24 - abs(network_time->hour - abs(actual_TD/4 )); 1517 network_time->hour = 24 - abs(network_time->hour - abs(actual_TD/4 ));
1518 1518
1519 network_time->day = network_time->day -1; 1519 network_time->day = network_time->day -1;
1520 1520
1521 if(network_time->day == 0) 1521 if(network_time->day == 0)
1522 { 1522 {
1523 if(((network_time->month)%2 != 0) && network_time->month <= 7) 1523 if(((network_time->month)%2 != 0) && network_time->month <= 7)
1524 { 1524 {
1525 if( network_time->month == 1) 1525 if( network_time->month == 1)
1526 { 1526 {
1527 network_time->month = network_time->month -1; 1527 network_time->month = network_time->month -1;
1528 network_time->day = 31; 1528 network_time->day = 31;
1529 } 1529 }
1530 else{ 1530 else{
1531 network_time->month = network_time->month -1; 1531 network_time->month = network_time->month -1;
1532 network_time->day = 30; 1532 network_time->day = 30;
1533 } 1533 }
1534 } 1534 }
1535 else if(((network_time->month)%2 == 0) && network_time->month < 7) 1535 else if(((network_time->month)%2 == 0) && network_time->month < 7)
1536 { 1536 {
1537 network_time->month = network_time->month -1; 1537 network_time->month = network_time->month -1;
1538 network_time->day = 31; 1538 network_time->day = 31;
1539 } 1539 }
1540 if(((network_time->month)%2 == 0) && network_time->month > 7) 1540 if(((network_time->month)%2 == 0) && network_time->month > 7)
1541 { 1541 {
1542 if( network_time->month == 8) 1542 if( network_time->month == 8)
1543 { 1543 {
1544 network_time->month = network_time->month -1; 1544 network_time->month = network_time->month -1;
1545 network_time->day = 31; 1545 network_time->day = 31;
1546 } 1546 }
1547 else 1547 else
1548 { 1548 {
1549 network_time->month = network_time->month -1; 1549 network_time->month = network_time->month -1;
1550 network_time->day = 30; 1550 network_time->day = 30;
1551 } 1551 }
1552 1552
1553 } 1553 }
1554 if(network_time->month == 2) 1554 if(network_time->month == 2)
1555 { 1555 {
1556 if(((network_time->year+2000)%4 == 0) && ((network_time->year+2000)%100 != 0)) 1556 if(((network_time->year+2000)%4 == 0) && ((network_time->year+2000)%100 != 0))
1557 network_time->day = 29; 1557 network_time->day = 29;
1568 1568
1569 else if(modify_date_positive) 1569 else if(modify_date_positive)
1570 { 1570 {
1571 TRACE_EVENT("modify date positive"); 1571 TRACE_EVENT("modify date positive");
1572 network_time->hour = network_time->hour -24; 1572 network_time->hour = network_time->hour -24;
1573 1573
1574 network_time->day = network_time->day + 1; 1574 network_time->day = network_time->day + 1;
1575 1575
1576 if(network_time->month == 2) 1576 if(network_time->month == 2)
1577 { 1577 {
1578 if(network_time->day == 30) 1578 if(network_time->day == 30)
1579 { 1579 {
1580 network_time->day = 1; 1580 network_time->day = 1;
1581 network_time->month = 3; 1581 network_time->month = 3;
1582 } 1582 }
1583 if(network_time ->day == 29) 1583 if(network_time ->day == 29)
1584 { 1584 {
1585 if(((network_time->year+2000)%4 == 0) && ((network_time->year+2000)%100 != 0)) 1585 if(((network_time->year+2000)%4 == 0) && ((network_time->year+2000)%100 != 0))
1586 { 1586 {
1595 } 1595 }
1596 else 1596 else
1597 { 1597 {
1598 if(network_time->day>=31) 1598 if(network_time->day>=31)
1599 { 1599 {
1600 if(network_time->day == 31) 1600 if(network_time->day == 31)
1601 { 1601 {
1602 if(((network_time->month)%2 != 0) && network_time->month <= 7) 1602 if(((network_time->month)%2 != 0) && network_time->month <= 7)
1603 { 1603 {
1604 network_time->day = 31; 1604 network_time->day = 31;
1605 } 1605 }
1606 else if(((network_time->month)%2 == 0) && network_time->month > 7) 1606 else if(((network_time->month)%2 == 0) && network_time->month > 7)
1607 { 1607 {
1608 network_time->day = 31; 1608 network_time->day = 31;
1609 } 1609 }
1610 1610
1611 else 1611 else
1612 { 1612 {
1613 network_time->day = 1; 1613 network_time->day = 1;
1614 network_time->month = network_time->month +1; 1614 network_time->month = network_time->month +1;
1615 } 1615 }
1618 { 1618 {
1619 network_time->day = 1; 1619 network_time->day = 1;
1620 network_time->month = network_time->month +1; 1620 network_time->month = network_time->month +1;
1621 } 1621 }
1622 } 1622 }
1623 } 1623 }
1624 if(network_time->month > 12) 1624 if(network_time->month > 12)
1625 { 1625 {
1626 network_time->year = network_time->year + 1; 1626 network_time->year = network_time->year + 1;
1627 network_time->month = 1; 1627 network_time->month = 1;
1628 } 1628 }
1629 } 1629 }
1630 1630
1631 // Get the current time and format info set in the MS 1631 // Get the current time and format info set in the MS
1632 time_format = mfw_td_get_time(); 1632 time_format = mfw_td_get_time();
1633 1633
1634 // Copy this info in the structure that will be used to do RTC upation. 1634 // Copy this info in the structure that will be used to do RTC upation.
1635 // This ensures that the format set remains the same even after RTC updation. 1635 // This ensures that the format set remains the same even after RTC updation.
1636 newTime = *time_format; 1636 newTime = *time_format;
1637 1637
1638 TRACE_EVENT("------------------------------------"); 1638 TRACE_EVENT("------------------------------------");
1639 TRACE_EVENT_P1("Current format set in MS : %d", time_format->format); 1639 TRACE_EVENT_P1("Current format set in MS : %d", time_format->format);
1640 1640
1641 // The time info received from network is in 24Hrs format. Depeneding on the format 1641 // The time info received from network is in 24Hrs format. Depeneding on the format
1642 // curently set in the MS, we need to do conversion and then update the RTC. 1642 // curently set in the MS, we need to do conversion and then update the RTC.
1643 if (time_format->format == RTC_TIME_FORMAT_12HOUR) 1643 if (time_format->format == RTC_TIME_FORMAT_12HOUR)
1644 { 1644 {
1645 TRACE_EVENT("12 Hrs format"); 1645 TRACE_EVENT("12 Hrs format");
1646 1646
1647 if (network_time->hour == 0) // If hour info from network is 0, set hour as 12 1647 if (network_time->hour == 0) // If hour info from network is 0, set hour as 12
1648 { // and the AM/PM flag off to indicate AM. 1648 { // and the AM/PM flag off to indicate AM.
1649 newTime.PM_flag = 0; 1649 newTime.PM_flag = 0;
1650 newTime.hour = 12; 1650 newTime.hour = 12;
1651 } 1651 }
1652 else if (network_time->hour < 12) // If hour info from network is less than 12, 1652 else if (network_time->hour < 12) // If hour info from network is less than 12,
1653 { // set the hour info as it is and AM flag to off. 1653 { // set the hour info as it is and AM flag to off.
1654 newTime.PM_flag = 0; 1654 newTime.PM_flag = 0;
1655 newTime.hour = network_time->hour; 1655 newTime.hour = network_time->hour;
1656 } 1656 }
1657 else 1657 else
1658 { 1658 {
1659 newTime.PM_flag = 1; // If hour info from network is greater than 12, 1659 newTime.PM_flag = 1; // If hour info from network is greater than 12,
1660 newTime.hour = network_time->hour - 12; // set hour = received hour - 12 and AM/PM 1660 newTime.hour = network_time->hour - 12; // set hour = received hour - 12 and AM/PM
1661 } // flag to ON indicate PM. 1661 } // flag to ON indicate PM.
1662 1662
1663 newTime.minute = network_time->minute; // Set minute info 1663 newTime.minute = network_time->minute; // Set minute info
1664 newTime.second = network_time->second; // Set second info 1664 newTime.second = network_time->second; // Set second info
1665 1665
1666 // Set the date related info. Year information is decoded in the following way: 1666 // Set the date related info. Year information is decoded in the following way:
1667 // 0 - 2000 - default 1667 // 0 - 2000 - default
1668 // 1 - 2001 1668 // 1 - 2001
1669 // 2 - 2002 etc. 1669 // 2 - 2002 etc.
1670 // Hence we need to add 2000 to the year value received from network to 1670 // Hence we need to add 2000 to the year value received from network to
1671 // display the actual year. 1671 // display the actual year.
1672 1672
1673 newDate.day = network_time->day; // Day of the month 1673 newDate.day = network_time->day; // Day of the month
1674 newDate.month = network_time->month; // Month 1674 newDate.month = network_time->month; // Month
1675 newDate.year = network_time->year + 2000; // year 1675 newDate.year = network_time->year + 2000; // year
1676 } 1676 }
1677 else 1677 else
1678 { 1678 {
1679 TRACE_EVENT("24 Hrs format"); 1679 TRACE_EVENT("24 Hrs format");
1680 newTime.hour = network_time->hour; // In 24 Hrs format, set the received hour info as it is. 1680 newTime.hour = network_time->hour; // In 24 Hrs format, set the received hour info as it is.
1681 1681
1682 newTime.minute = network_time->minute; // Set minute info 1682 newTime.minute = network_time->minute; // Set minute info
1683 newTime.second = network_time->second; // Set second info 1683 newTime.second = network_time->second; // Set second info
1684 1684
1685 // Set the date related info. Year information is decoded in the following way: 1685 // Set the date related info. Year information is decoded in the following way:
1686 // 0 - 2000 - default 1686 // 0 - 2000 - default
1687 // 1 - 2001 1687 // 1 - 2001
1688 // 2 - 2002 etc. 1688 // 2 - 2002 etc.
1689 // Hence we need to add 2000 to the year value received from network to 1689 // Hence we need to add 2000 to the year value received from network to
1690 // display the actual year. 1690 // display the actual year.
1691 1691
1692 newDate.day = network_time->day; // Day of the month 1692 newDate.day = network_time->day; // Day of the month
1693 newDate.month = network_time->month; // Month 1693 newDate.month = network_time->month; // Month
1694 newDate.year = network_time->year + 2000; // year 1694 newDate.year = network_time->year + 2000; // year
1695 } 1695 }
1696 1696
1697 if(FFS_flashData.nitz_option==NitzAutomatic) 1697 if(FFS_flashData.nitz_option==NitzAutomatic)
1698 { 1698 {
1699 // Update RTC with new time info 1699 // Update RTC with new time info
1700 mfw_td_set_time(&newTime); 1700 mfw_td_set_time(&newTime);
1701 1701
1702 // Update RTC with new date info 1702 // Update RTC with new date info
1703 mfw_td_set_date(&newDate); 1703 mfw_td_set_date(&newDate);
1704 1704
1705 // Send IDLE_UPDATE event to force idle screen refresh 1705 // Send IDLE_UPDATE event to force idle screen refresh
1706 SEND_EVENT(idle_get_window(), IDLE_UPDATE, 0, 0); 1706 SEND_EVENT(idle_get_window(), IDLE_UPDATE, 0, 0);
1707 1707
1708 1708
1709 } 1709 }
1710 else //if(FFS_flashData.nitz_option==NITZOn) 1710 else //if(FFS_flashData.nitz_option==NITZOn)
1711 { 1711 {
1712 // Show a dialog to the user to get confirmation for Time/Date updation. 1712 // Show a dialog to the user to get confirmation for Time/Date updation.
1713 dlg_initDisplayData_TextId( &display_info, TxtYes, TxtNo, TxtTimeUpdate, TxtTimeUpdateConfirm, COLOUR_STATUS); 1713 dlg_initDisplayData_TextId( &display_info, TxtYes, TxtNo, TxtTimeUpdate, TxtTimeUpdateConfirm, COLOUR_STATUS);
1726 1726
1727 $Function: network_win_cb 1727 $Function: network_win_cb
1728 1728
1729 $Description: network top window 1729 $Description: network top window
1730 1730
1731 $Returns: 1731 $Returns:
1732 1732
1733 $Arguments: 1733 $Arguments:
1734 1734
1735 *******************************************************************************/ 1735 *******************************************************************************/
1736 static int network_win_cb (T_MFW_EVENT event, T_MFW_WIN * win) 1736 static int network_win_cb (T_MFW_EVENT event, T_MFW_WIN * win)
1737 { 1737 {
1738 /* 1738 /*
1739 * Top Window has no output 1739 * Top Window has no output
1746 1746
1747 $Function: network_nm_cb 1747 $Function: network_nm_cb
1748 1748
1749 $Description: network handler (mfw callback handler) 1749 $Description: network handler (mfw callback handler)
1750 1750
1751 $Returns: 1751 $Returns:
1752 1752
1753 $Arguments: 1753 $Arguments:
1754 1754
1755 *******************************************************************************/ 1755 *******************************************************************************/
1756 static int network_nm_cb (T_MFW_EVENT event, T_MFW_HND para) 1756 static int network_nm_cb (T_MFW_EVENT event, T_MFW_HND para)
1757 { 1757 {
1758 TRACE_FUNCTION("network_nm_cb"); 1758 TRACE_FUNCTION("network_nm_cb");
1759 1759
1761 { 1761 {
1762 case E_NM_FULL_SERVICE: 1762 case E_NM_FULL_SERVICE:
1763 //x0pleela 9 Feb, 2006 ER:OMAPS00065203 1763 //x0pleela 9 Feb, 2006 ER:OMAPS00065203
1764 //Handling E_NM_OPN for operator name display 1764 //Handling E_NM_OPN for operator name display
1765 case E_NM_OPN: 1765 case E_NM_OPN:
1766 1766
1767 SEND_EVENT (network_data.network_win, NETWORK_FULL_SERVICE, 0, para); 1767 SEND_EVENT (network_data.network_win, NETWORK_FULL_SERVICE, 0, para);
1768 break; 1768 break;
1769 //Sep 18,2006 DRT: OMAPS00090268 x0061088(Prachi) 1769 //Sep 18,2006 DRT: OMAPS00090268 x0061088(Prachi)
1770 //Description : To check for Forbidden network (for denied services),it takes long time. 1770 //Description : To check for Forbidden network (for denied services),it takes long time.
1771 //Solution : Function network_nm_cb() has now be implemented to handle E_NM_FORBIDDEN_NETWORK,which sends event 1771 //Solution : Function network_nm_cb() has now be implemented to handle E_NM_FORBIDDEN_NETWORK,which sends event
1772 //NETWORK_FORBIDDEN_NETWORK to network(),by setting flags network_data.aborted =False 1772 //NETWORK_FORBIDDEN_NETWORK to network(),by setting flags network_data.aborted =False
1773 //and network_data.forbidden = Ture 1773 //and network_data.forbidden = Ture
1774 case E_NM_FORBIDDEN_NETWORK: 1774 case E_NM_FORBIDDEN_NETWORK:
1775 network_data.forbidden = TRUE; 1775 network_data.forbidden = TRUE;
1776 network_data.aborted = FALSE; 1776 network_data.aborted = FALSE;
1777 /* Jan 10, 2007 REF: OMAPS00110741 x0039928(sumanth) */ 1777 /* Jan 10, 2007 REF: OMAPS00110741 x0039928(sumanth) */
1778 /* Fix : Pass NULL as parameter */ 1778 /* Fix : Pass NULL as parameter */
1779 SEND_EVENT (network_data.network_win, NETWORK_FORBIDDEN_NETWORK, 0, 0); 1779 SEND_EVENT (network_data.network_win, NETWORK_FORBIDDEN_NETWORK, 0, 0);
1780 break; 1780 break;
1781 1781
1782 case E_NM_LIMITED_SERVICE: 1782 case E_NM_LIMITED_SERVICE:
1783 SEND_EVENT (network_data.network_win, NETWORK_LIMITED_SERVICE, 0, para); 1783 SEND_EVENT (network_data.network_win, NETWORK_LIMITED_SERVICE, 0, para);
1784 break; 1784 break;
1785 1785
1786 case E_NM_NO_SERVICE: 1786 case E_NM_NO_SERVICE:
1819 /* SPR919 - SH - Band selection */ 1819 /* SPR919 - SH - Band selection */
1820 case E_NM_BAND: 1820 case E_NM_BAND:
1821 TRACE_EVENT("MmiNetwork:E_NM_BAND"); 1821 TRACE_EVENT("MmiNetwork:E_NM_BAND");
1822 nm_registration (nm_get_mode (),0, 0); 1822 nm_registration (nm_get_mode (),0, 0);
1823 //Sep 23, 2004 REF: CRR 24562 xvilliva 1823 //Sep 23, 2004 REF: CRR 24562 xvilliva
1824 //After retrieving the list we see if an error occured 1824 //After retrieving the list we see if an error occured
1825 //and flash an alert to the user accordingly. 1825 //and flash an alert to the user accordingly.
1826 if(g_ensErr == 1) 1826 if(g_ensErr == 1)
1827 { 1827 {
1828 g_ensErr = 0; 1828 g_ensErr = 0;
1829 info_screen(0, TxtNotAllowed, TxtNull, NULL); 1829 info_screen(0, TxtNotAllowed, TxtNull, NULL);
1838 /*Aug 07, 2007 DR:OMAPS00137726 x0066814(Geetha)*/ 1838 /*Aug 07, 2007 DR:OMAPS00137726 x0066814(Geetha)*/
1839 case E_NM_PLMN_LIST_BOOTUP: 1839 case E_NM_PLMN_LIST_BOOTUP:
1840 TRACE_EVENT("MmiNetwork:E_NM_PLMN_LIST_BOOTUP"); 1840 TRACE_EVENT("MmiNetwork:E_NM_PLMN_LIST_BOOTUP");
1841 /*Start the available plmn search*/ 1841 /*Start the available plmn search*/
1842 nm_avail_plmn_list(); 1842 nm_avail_plmn_list();
1843 /*After retrieving the list we see if an error occured 1843 /*After retrieving the list we see if an error occured
1844 and flash an alert to the user accordingly.*/ 1844 and flash an alert to the user accordingly.*/
1845 if(g_ensErr == 1) 1845 if(g_ensErr == 1)
1846 { 1846 {
1847 g_ensErr = 0; 1847 g_ensErr = 0;
1848 info_screen(0, TxtNotAllowed, TxtNull, NULL); 1848 info_screen(0, TxtNotAllowed, TxtNull, NULL);
1849 } 1849 }
1850 /* remove network log if needed */ 1850 /* remove network log if needed */
1851 network_remove_network_log (); 1851 network_remove_network_log ();
1852 network_start_animation (); 1852 network_start_animation ();
1853 network_data.aborted = FALSE; 1853 network_data.aborted = FALSE;
1854 1854
1855 break; 1855 break;
1856 1856
1857 // June 02, 2006 DR: OMAPS00078005 x0021334 1857 // June 02, 2006 DR: OMAPS00078005 x0021334
1858 // Send NETWORK_TIME_UPDATE event to update the new network time/date 1858 // Send NETWORK_TIME_UPDATE event to update the new network time/date
1859 //Dec 13,2006 DR:OMAPS00098351 x0066814 - Added the FF_TIMEZONE flag 1859 //Dec 13,2006 DR:OMAPS00098351 x0066814 - Added the FF_TIMEZONE flag
1860 #ifdef FF_TIMEZONE 1860 #ifdef FF_TIMEZONE
1861 case E_MFW_TIME_IND: 1861 case E_MFW_TIME_IND:
1862 TRACE_EVENT("E_MFW_TIME_IND"); 1862 TRACE_EVENT("E_MFW_TIME_IND");
1863 SEND_EVENT (network_data.network_win, NETWORK_TIME_UPDATE, 0, para); 1863 SEND_EVENT (network_data.network_win, NETWORK_TIME_UPDATE, 0, para);
1864 break; 1864 break;
1865 #endif 1865 #endif
1866 default: 1866 default:
1867 return 0; 1867 return 0;
1868 } 1868 }
1869 return 1; 1869 return 1;
1875 1875
1876 $Description: Attribut function for menu entries. 1876 $Description: Attribut function for menu entries.
1877 It defines whether the network log off function shall 1877 It defines whether the network log off function shall
1878 be displayed or not. 1878 be displayed or not.
1879 1879
1880 $Returns: 1880 $Returns:
1881 1881
1882 $Arguments: 1882 $Arguments:
1883 1883
1884 *******************************************************************************/ 1884 *******************************************************************************/
1885 USHORT nm_flag_log_off (T_MFW_MNU * m, T_MFW_MNU_ATTR * ma, T_MFW_MNU_ITEM * mi) 1885 USHORT nm_flag_log_off (T_MFW_MNU * m, T_MFW_MNU_ATTR * ma, T_MFW_MNU_ITEM * mi)
1886 { 1886 {
1887 if (FFS_flashData.net_log_status EQ NM_LOG_AVAIL_USED) 1887 if (FFS_flashData.net_log_status EQ NM_LOG_AVAIL_USED)
1888 return 0; 1888 return 0;
1895 1895
1896 $Description: Attribut function for menu entries. 1896 $Description: Attribut function for menu entries.
1897 It defines whether the network log off function shall 1897 It defines whether the network log off function shall
1898 be displayed or not. 1898 be displayed or not.
1899 1899
1900 $Returns: 1900 $Returns:
1901 1901
1902 $Arguments: 1902 $Arguments:
1903 1903
1904 *******************************************************************************/ 1904 *******************************************************************************/
1905 USHORT nm_flag_log_on (T_MFW_MNU * m, T_MFW_MNU_ATTR * ma, T_MFW_MNU_ITEM * mi) 1905 USHORT nm_flag_log_on (T_MFW_MNU * m, T_MFW_MNU_ATTR * ma, T_MFW_MNU_ITEM * mi)
1906 { 1906 {
1907 if (FFS_flashData.network_name == NULL) 1907 if (FFS_flashData.network_name == NULL)
1908 { 1908 {
1917 /******************************************************************************* 1917 /*******************************************************************************
1918 1918
1919 $Function: network_set_mode_auto 1919 $Function: network_set_mode_auto
1920 1920
1921 $Description: Start a automatic registration 1921 $Description: Start a automatic registration
1922 1922
1923 $Returns: 1923 $Returns:
1924 1924
1925 $Arguments: 1925 $Arguments:
1926 1926
1927 *******************************************************************************/ 1927 *******************************************************************************/
1928 int network_set_mode_auto(T_MFW_MNU *m, T_MFW_MNU_ITEM *i) 1928 int network_set_mode_auto(T_MFW_MNU *m, T_MFW_MNU_ITEM *i)
1929 { 1929 {
1930 TRACE_FUNCTION ("network_set_mode_auto()"); 1930 TRACE_FUNCTION ("network_set_mode_auto()");
1931 1931
1932 /* 1932 /*
1933 * Save the automatic mode in PCM for next power on 1933 * Save the automatic mode in PCM for next power on
1934 */ 1934 */
1935 nm_set_mode(NM_AUTOMATIC); 1935 nm_set_mode(NM_AUTOMATIC);
1936 1936
1957 /******************************************************************************* 1957 /*******************************************************************************
1958 1958
1959 $Function: network_set_mode_man 1959 $Function: network_set_mode_man
1960 1960
1961 $Description: Start a manual registration 1961 $Description: Start a manual registration
1962 1962
1963 $Returns: 1963 $Returns:
1964 1964
1965 $Arguments: 1965 $Arguments:
1966 1966
1967 *******************************************************************************/ 1967 *******************************************************************************/
1968 int network_set_mode_man(T_MFW_MNU *m, T_MFW_MNU_ITEM *i) 1968 int network_set_mode_man(T_MFW_MNU *m, T_MFW_MNU_ITEM *i)
1969 { 1969 {
1970 TRACE_FUNCTION ("network_set_mode_man()"); 1970 TRACE_FUNCTION ("network_set_mode_man()");
1971 1971
1977 /* 1977 /*
1978 * Start the available plmn search 1978 * Start the available plmn search
1979 */ 1979 */
1980 nm_avail_plmn_list(); 1980 nm_avail_plmn_list();
1981 //Sep 23, 2004 REF: CRR 24562 xvilliva 1981 //Sep 23, 2004 REF: CRR 24562 xvilliva
1982 //After retrieving the list we see if an error occured 1982 //After retrieving the list we see if an error occured
1983 //and flash an alert to the user accordingly. 1983 //and flash an alert to the user accordingly.
1984 if(g_ensErr == 1) 1984 if(g_ensErr == 1)
1985 { 1985 {
1986 g_ensErr = 0; 1986 g_ensErr = 0;
1987 info_screen(0, TxtNotAllowed, TxtNull, NULL); 1987 info_screen(0, TxtNotAllowed, TxtNull, NULL);
2016 int network_pref_list(T_MFW_MNU *m, T_MFW_MNU_ITEM *mi) 2016 int network_pref_list(T_MFW_MNU *m, T_MFW_MNU_ITEM *mi)
2017 { 2017 {
2018 //TRACE_FUNCTION ("network_pref_list()"); 2018 //TRACE_FUNCTION ("network_pref_list()");
2019 2019
2020 /* 2020 /*
2021 * Request the maximum number of preferred PLMN records 2021 * Request the maximum number of preferred PLMN records
2022 * on the SIM card 2022 * on the SIM card
2023 */ 2023 */
2024 nm_pplmn_mem_req(); 2024 nm_pplmn_mem_req();
2025 2025
2026 2026
2027 2027
2028 return 1; 2028 return 1;
2029 } 2029 }
2030 2030
2031 2031
2032 /******************************************************************************* 2032 /*******************************************************************************
2033 2033
2034 $Function: network_remove_network_log 2034 $Function: network_remove_network_log
2035 2035
2036 $Description: Reset network log if set. 2036 $Description: Reset network log if set.
2037 2037
2038 $Returns: 2038 $Returns:
2039 2039
2040 $Arguments: 2040 $Arguments:
2041 2041
2042 *******************************************************************************/ 2042 *******************************************************************************/
2043 static void network_remove_network_log (void) 2043 static void network_remove_network_log (void)
2044 { 2044 {
2045 2045
2046 if (FFS_flashData.net_log_status EQ NM_LOG_AVAIL_USED) 2046 if (FFS_flashData.net_log_status EQ NM_LOG_AVAIL_USED)
2049 * Until now the network log has been used. 2049 * Until now the network log has been used.
2050 * Now write to FFS 2050 * Now write to FFS
2051 */ 2051 */
2052 FFS_flashData.net_log_status = NM_LOG_AVAIL_NOT_USED; 2052 FFS_flashData.net_log_status = NM_LOG_AVAIL_NOT_USED;
2053 flash_write(); 2053 flash_write();
2054 2054
2055 } 2055 }
2056 } 2056 }
2057 2057
2058 /******************************************************************************* 2058 /*******************************************************************************
2059 2059
2060 $Function: network_log_off 2060 $Function: network_log_off
2061 2061
2062 $Description: Removes a network log and returns to automatic registration. 2062 $Description: Removes a network log and returns to automatic registration.
2063 2063
2064 $Returns: 2064 $Returns:
2065 2065
2066 $Arguments: 2066 $Arguments:
2067 2067
2068 *******************************************************************************/ 2068 *******************************************************************************/
2069 int network_log_off(T_MFW_MNU *m, T_MFW_MNU_ITEM *i) 2069 int network_log_off(T_MFW_MNU *m, T_MFW_MNU_ITEM *i)
2070 { 2070 {
2071 TRACE_FUNCTION ("network_log_off()"); 2071 TRACE_FUNCTION ("network_log_off()");
2072 2072
2084 /******************************************************************************* 2084 /*******************************************************************************
2085 2085
2086 $Function: network_log_on 2086 $Function: network_log_on
2087 2087
2088 $Description: Sets a network log. 2088 $Description: Sets a network log.
2089 2089
2090 $Returns: 2090 $Returns:
2091 2091
2092 $Arguments: 2092 $Arguments:
2093 2093
2094 *******************************************************************************/ 2094 *******************************************************************************/
2095 int network_log_on(T_MFW_MNU *m, T_MFW_MNU_ITEM *i) 2095 int network_log_on(T_MFW_MNU *m, T_MFW_MNU_ITEM *i)
2096 { 2096 {
2097 2097
2098 2098
2099 TRACE_FUNCTION ("network_log_on()"); 2099 TRACE_FUNCTION ("network_log_on()");
2100 2100
2101 2101
2102 if (FFS_flashData.net_log_status EQ NM_LOG_AVAIL_NOT_USED OR 2102 if (FFS_flashData.net_log_status EQ NM_LOG_AVAIL_NOT_USED OR
2108 */ 2108 */
2109 FFS_flashData.net_log_status = NM_LOG_AVAIL_USED; 2109 FFS_flashData.net_log_status = NM_LOG_AVAIL_USED;
2110 memcpy (FFS_flashData.plmn_name, network_data.plmn_name, SIZE_PLMN_NAME); 2110 memcpy (FFS_flashData.plmn_name, network_data.plmn_name, SIZE_PLMN_NAME);
2111 memcpy (FFS_flashData.network_name, network_data.network_name, SIZE_NETWORK_NAME); 2111 memcpy (FFS_flashData.network_name, network_data.network_name, SIZE_NETWORK_NAME);
2112 2112
2113 2113
2114 flash_write(); 2114 flash_write();
2115 /* 2115 /*
2116 * Save the manual mode in PCM for next power on 2116 * Save the manual mode in PCM for next power on
2117 */ 2117 */
2118 nm_set_mode(NM_MANUAL); 2118 nm_set_mode(NM_MANUAL);
2120 /* 2120 /*
2121 * Start the registration of the logged network 2121 * Start the registration of the logged network
2122 */ 2122 */
2123 nm_select_plmn (network_data.network_name); 2123 nm_select_plmn (network_data.network_name);
2124 //Sep 23, 2004 REF: CRR 24562 xvilliva 2124 //Sep 23, 2004 REF: CRR 24562 xvilliva
2125 //After retrieving the list we see if an error occured 2125 //After retrieving the list we see if an error occured
2126 //and flash an alert to the user accordingly. 2126 //and flash an alert to the user accordingly.
2127 if(g_ensErr == 1) 2127 if(g_ensErr == 1)
2128 { 2128 {
2129 g_ensErr = 0; 2129 g_ensErr = 0;
2130 info_screen(0, TxtNotAllowed, TxtNull, NULL); 2130 info_screen(0, TxtNotAllowed, TxtNull, NULL);
2143 2143
2144 $Description: Starts a full service registration. 2144 $Description: Starts a full service registration.
2145 a) manual selection 2145 a) manual selection
2146 b) automatic selection 2146 b) automatic selection
2147 c) network log selection 2147 c) network log selection
2148 2148
2149 $Returns: 2149 $Returns:
2150 2150
2151 $Arguments: 2151 $Arguments:
2152 2152
2153 *******************************************************************************/ 2153 *******************************************************************************/
2154 void network_start_full_service(void) 2154 void network_start_full_service(void)
2155 { 2155 {
2156 2156
2157 TRACE_FUNCTION ("network_start_full_service()"); 2157 TRACE_FUNCTION ("network_start_full_service()");
2158 2158
2159 network_data.status = NETWORK_SEARCH_NETWORK; 2159 network_data.status = NETWORK_SEARCH_NETWORK;
2160 2160
2161 if(FFS_flashData.plmn_name == NULL) //if no network data 2161 if(FFS_flashData.plmn_name == NULL) //if no network data
2191 nm_registration (nm_get_mode (),0, 0); 2191 nm_registration (nm_get_mode (),0, 0);
2192 break; 2192 break;
2193 } 2193 }
2194 } 2194 }
2195 //Sep 23, 2004 REF: CRR 24562 xvilliva 2195 //Sep 23, 2004 REF: CRR 24562 xvilliva
2196 //After retrieving the list we see if an error occured 2196 //After retrieving the list we see if an error occured
2197 //and flash an alert to the user accordingly. 2197 //and flash an alert to the user accordingly.
2198 if(g_ensErr == 1) 2198 if(g_ensErr == 1)
2199 { 2199 {
2200 g_ensErr = 0; 2200 g_ensErr = 0;
2201 info_screen(0, TxtNotAllowed, TxtNull, NULL); 2201 info_screen(0, TxtNotAllowed, TxtNull, NULL);
2206 2206
2207 $Function: network_get_name 2207 $Function: network_get_name
2208 2208
2209 $Description: Returns the textual and numeric representation of the 2209 $Description: Returns the textual and numeric representation of the
2210 network name. 2210 network name.
2211 2211
2212 $Returns: 2212 $Returns:
2213 2213
2214 $Arguments: 2214 $Arguments:
2215 2215
2216 *******************************************************************************/ 2216 *******************************************************************************/
2217 void network_get_name(T_CURRENT_NETWORK * nm) 2217 void network_get_name(T_CURRENT_NETWORK * nm)
2218 { 2218 {
2219 #ifdef NO_ASCIIZ 2219 #ifdef NO_ASCIIZ
2220 T_MFW_SP_NAME service_provider_name; 2220 T_MFW_SP_NAME service_provider_name;
2222 U8 service_provider_name[LONG_NAME]; 2222 U8 service_provider_name[LONG_NAME];
2223 #endif 2223 #endif
2224 TRACE_FUNCTION ("network_get_name()"); 2224 TRACE_FUNCTION ("network_get_name()");
2225 2225
2226 //x0pleela 15 Feb, 2006 ER: OMAPS00065203 2226 //x0pleela 15 Feb, 2006 ER: OMAPS00065203
2227 //Included flag NEPTUNE_BOARD to retain old code for operator get name and 2227 //Included flag NEPTUNE_BOARD to retain old code for operator get name and
2228 //added new code for this ER also 2228 //added new code for this ER also
2229 2229
2230 #ifndef NEPTUNE_BOARD 2230 #ifndef NEPTUNE_BOARD
2231 2231
2232 //x0pleela 09 Feb, 2006 ER: OMAPS00065203 2232 //x0pleela 09 Feb, 2006 ER: OMAPS00065203
2233 //Removed the code as prioritized operator name is already updated to network_data 2233 //Removed the code as prioritized operator name is already updated to network_data
2234 // and CPHS check is not required 2234 // and CPHS check is not required
2235 2235
2236 //x0pleela 09 Feb, 2006 ER: OMAPS00065203 2236 //x0pleela 09 Feb, 2006 ER: OMAPS00065203
2237 //Updating prioritized operator name 2237 //Updating prioritized operator name
2238 memset( nm->plmn_name, 0, SIZE_PLMN_NAME ); 2238 memset( nm->plmn_name, 0, SIZE_PLMN_NAME );
2239 memset( nm->network_name, 0, SIZE_NETWORK_NAME ); 2239 memset( nm->network_name, 0, SIZE_NETWORK_NAME );
2240 memcpy (nm->plmn_name, network_data.plmn_name, SIZE_PLMN_NAME); 2240 memcpy (nm->plmn_name, network_data.plmn_name, SIZE_PLMN_NAME);
2241 memcpy (nm->network_name, network_data.network_name, SIZE_NETWORK_NAME); 2241 memcpy (nm->network_name, network_data.network_name, SIZE_NETWORK_NAME);
2242 2242
2243 memset( nm->service_provider_name, 0, SP_NAME ); 2243 memset( nm->service_provider_name, 0, SP_NAME );
2244 #else 2244 #else
2245 if (CphsPresent() )//if CPHS supported 2245 if (CphsPresent() )//if CPHS supported
2246 { 2246 {
2247 T_MFW_CPHS_OP_NAME* operator_name; 2247 T_MFW_CPHS_OP_NAME* operator_name;
2248 operator_name = CphsRequestOperatorName(); //get operator name 2248 operator_name = CphsRequestOperatorName(); //get operator name
2249 2249
2250 if (operator_name->longName.data[0] != NULL)//if name not blank 2250 if (operator_name->longName.data[0] != NULL)//if name not blank
2251 { 2251 {
2252 memcpy(nm->plmn_name, operator_name->longName.data, SIZE_PLMN_NAME); 2252 memcpy(nm->plmn_name, operator_name->longName.data, SIZE_PLMN_NAME);
2253 TRACE_EVENT("Reading PLMN from SIM"); 2253 TRACE_EVENT("Reading PLMN from SIM");
2254 } 2254 }
2255 else 2255 else
2256 memcpy (nm->plmn_name, network_data.plmn_name, SIZE_PLMN_NAME); 2256 memcpy (nm->plmn_name, network_data.plmn_name, SIZE_PLMN_NAME);
2257 2257
2258 if (operator_name->shortName.data[0] != NULL)//if name not blank 2258 if (operator_name->shortName.data[0] != NULL)//if name not blank
2259 { 2259 {
2260 memcpy(nm->network_name, operator_name->shortName.data, SIZE_NETWORK_NAME); 2260 memcpy(nm->network_name, operator_name->shortName.data, SIZE_NETWORK_NAME);
2261 } 2261 }
2262 else 2262 else
2263 memcpy (nm->network_name, network_data.network_name, SIZE_NETWORK_NAME); 2263 memcpy (nm->network_name, network_data.network_name, SIZE_NETWORK_NAME);
2264 } 2264 }
2265 else 2265 else
2266 { 2266 {
2267 2267
2268 memcpy (nm->plmn_name, network_data.plmn_name, SIZE_PLMN_NAME); 2268 memcpy (nm->plmn_name, network_data.plmn_name, SIZE_PLMN_NAME);
2269 memcpy (nm->network_name, network_data.network_name, SIZE_NETWORK_NAME); 2269 memcpy (nm->network_name, network_data.network_name, SIZE_NETWORK_NAME);
2270 2270
2271 } 2271 }
2272 /* Marcus: Issue 1618: 24/01/2003: Start */ 2272 /* Marcus: Issue 1618: 24/01/2003: Start */
2273 /* Obtain the service provider name (from the SIM EF-SPN file) if any */ 2273 /* Obtain the service provider name (from the SIM EF-SPN file) if any */
2274 nm->service_provider_name[0] = '\0'; 2274 nm->service_provider_name[0] = '\0';
2275 #endif 2275 #endif
2278 if ((service_provider_name.len != 0) && 2278 if ((service_provider_name.len != 0) &&
2279 (service_provider_name.data[0] != '\0')) 2279 (service_provider_name.data[0] != '\0'))
2280 { 2280 {
2281 if (service_provider_name.len > sizeof(nm->service_provider_name)-1) 2281 if (service_provider_name.len > sizeof(nm->service_provider_name)-1)
2282 service_provider_name.len = sizeof(nm->service_provider_name)-1; 2282 service_provider_name.len = sizeof(nm->service_provider_name)-1;
2283 2283
2284 memcpy(nm->service_provider_name, 2284 memcpy(nm->service_provider_name,
2285 service_provider_name.data, 2285 service_provider_name.data,
2286 service_provider_name.len); 2286 service_provider_name.len);
2287 2287
2288 nm->service_provider_name[service_provider_name.len] = '\0'; 2288 nm->service_provider_name[service_provider_name.len] = '\0';
2289 } 2289 }
2290 #else 2290 #else
2291 nm_get_spn(service_provider_name); 2291 nm_get_spn(service_provider_name);
2292 if (strlen(service_provider_name)) 2292 if (strlen(service_provider_name))
2293 { 2293 {
2294 strncpy(nm->service_provider_name, 2294 strncpy(nm->service_provider_name,
2295 service_provider_name, 2295 service_provider_name,
2296 sizeof(nm->service_provider_name)-1); 2296 sizeof(nm->service_provider_name)-1);
2297 2297
2298 nm->service_provider_name[sizeof(nm->service_provider_name)-1] = '\0'; 2298 nm->service_provider_name[sizeof(nm->service_provider_name)-1] = '\0';
2299 } 2299 }
2300 #endif 2300 #endif
2301 /* Marcus: Issue 1618: 24/01/2003: End */ 2301 /* Marcus: Issue 1618: 24/01/2003: End */
2302 nm->roaming_indicator = network_data.roaming_indicator; 2302 nm->roaming_indicator = network_data.roaming_indicator;
2305 /******************************************************************************* 2305 /*******************************************************************************
2306 2306
2307 $Function: network_log_enabled 2307 $Function: network_log_enabled
2308 2308
2309 $Description: Checks whether a network log is active or not. 2309 $Description: Checks whether a network log is active or not.
2310 2310
2311 $Returns: 2311 $Returns:
2312 2312
2313 $Arguments: 2313 $Arguments:
2314 2314
2315 *******************************************************************************/ 2315 *******************************************************************************/
2316 static UBYTE network_log_enabled (void) 2316 static UBYTE network_log_enabled (void)
2317 { 2317 {
2318 2318
2319 TRACE_FUNCTION ("network_log_enabled()"); 2319 TRACE_FUNCTION ("network_log_enabled()");
2327 /******************************************************************************* 2327 /*******************************************************************************
2328 2328
2329 $Function: ListMenuData 2329 $Function: ListMenuData
2330 2330
2331 $Description: Creates a list of available PLMNs for selection. 2331 $Description: Creates a list of available PLMNs for selection.
2332 2332
2333 $Returns: 2333 $Returns:
2334 2334
2335 $Arguments: 2335 $Arguments:
2336 2336
2337 *******************************************************************************/ 2337 *******************************************************************************/
2338 static ListMenuData * network_create_list (T_network * data, T_MFW_PLMN_LIST * plmn_list) 2338 static ListMenuData * network_create_list (T_network * data, T_MFW_PLMN_LIST * plmn_list)
2339 { 2339 {
2340 UBYTE i; 2340 UBYTE i;
2341 2341
2344 if (list_menu_data EQ 0) 2344 if (list_menu_data EQ 0)
2345 return NULL; 2345 return NULL;
2346 2346
2347 /* Allocated memory only for availble number of plmn list count */ 2347 /* Allocated memory only for availble number of plmn list count */
2348 /* OMAPS00061049 - 08-03-2006 */ 2348 /* OMAPS00061049 - 08-03-2006 */
2349 #ifndef NEPTUNE_BOARD 2349 #ifndef NEPTUNE_BOARD
2350 list_menu_data->List = (T_MFW_MNU_ITEM *) ALLOC_MEMORY (MAX_PLMN * sizeof (T_MFW_MNU_ITEM)); 2350 list_menu_data->List = (T_MFW_MNU_ITEM *) ALLOC_MEMORY (MAX_PLMN * sizeof (T_MFW_MNU_ITEM));
2351 #else 2351 #else
2352 list_menu_data->List = (T_MFW_MNU_ITEM *) ALLOC_MEMORY (plmn_list->count * sizeof (T_MFW_MNU_ITEM)); 2352 list_menu_data->List = (T_MFW_MNU_ITEM *) ALLOC_MEMORY (plmn_list->count * sizeof (T_MFW_MNU_ITEM));
2353 #endif 2353 #endif
2354 2354
2355 if (list_menu_data->List EQ 0) 2355 if (list_menu_data->List EQ 0)
2362 for (i=0;i<MMREG_MAX_PLMN_ID;i++) 2362 for (i=0;i<MMREG_MAX_PLMN_ID;i++)
2363 #else 2363 #else
2364 for (i=0;i<MAX_PLMN_ID;i++) 2364 for (i=0;i<MAX_PLMN_ID;i++)
2365 #endif 2365 #endif
2366 { 2366 {
2367 #ifndef NEPTUNE_BOARD 2367 #ifndef NEPTUNE_BOARD
2368 /* Taken this statement inside the condition */ 2368 /* Taken this statement inside the condition */
2369 /* OMAPS00061049 - 08-03-2006 */ 2369 /* OMAPS00061049 - 08-03-2006 */
2370 mnuInitDataItem(&list_menu_data->List[i]); 2370 mnuInitDataItem(&list_menu_data->List[i]);
2371 #endif 2371 #endif
2372 2372
2373 if (i < plmn_list->count) 2373 if (i < plmn_list->count)
2374 { 2374 {
2375 #ifdef NEPTUNE_BOARD 2375 #ifdef NEPTUNE_BOARD
2376 mnuInitDataItem(&list_menu_data->List[i]); 2376 mnuInitDataItem(&list_menu_data->List[i]);
2377 #endif 2377 #endif
2378 2378
2379 /* 2379 /*
2380 * set network name 2380 * set network name
2381 */ 2381 */
2382 #ifdef NO_ASCIIZ 2382 #ifdef NO_ASCIIZ
2383 if (plmn_list->plmn[i].network_long.len NEQ 0) 2383 if (plmn_list->plmn[i].network_long.len NEQ 0)
2384 { 2384 {
2385 list_menu_data->List[i].str = (char *)plmn_list->plmn[i].network_long.data; 2385 list_menu_data->List[i].str = (char *)plmn_list->plmn[i].network_long.data;
2386 } 2386 }
2387 #else 2387 #else
2388 if (strlen((char *)plmn_list->plmn[i].network_long) NEQ 0) 2388 if (strlen((char *)plmn_list->plmn[i].network_long) NEQ 0)
2389 { 2389 {
2390 list_menu_data->List[i].str = (char *)plmn_list->plmn[i].network_long; 2390 list_menu_data->List[i].str = (char *)plmn_list->plmn[i].network_long;
2391 } 2391 }
2392 #endif 2392 #endif
2393 else 2393 else
2394 { 2394 {
2395 list_menu_data->List[i].str = (char *)plmn_list->plmn[i].network_numeric; 2395 list_menu_data->List[i].str = (char *)plmn_list->plmn[i].network_numeric;
2396 } 2396 }
2397 2397
2429 list_menu_data->Reason = 0; 2429 list_menu_data->Reason = 0;
2430 list_menu_data->Strings = TRUE; 2430 list_menu_data->Strings = TRUE;
2431 list_menu_data->Attr = &network_menuAttrib; 2431 list_menu_data->Attr = &network_menuAttrib;
2432 list_menu_data->autoDestroy = TRUE; 2432 list_menu_data->autoDestroy = TRUE;
2433 list_menu_data->listCol = COLOUR_LIST_XX; 2433 list_menu_data->listCol = COLOUR_LIST_XX;
2434 2434
2435 2435
2436 return list_menu_data; 2436 return list_menu_data;
2437 } 2437 }
2438 2438
2439 /******************************************************************************* 2439 /*******************************************************************************
2440 2440
2441 $Function: network_create_pref_list 2441 $Function: network_create_pref_list
2442 2442
2443 $Description: Creates a list of preferred PLMNs for selection. 2443 $Description: Creates a list of preferred PLMNs for selection.
2444 2444
2445 $Returns: 2445 $Returns:
2446 2446
2447 $Arguments: 2447 $Arguments:
2448 2448
2449 *******************************************************************************/ 2449 *******************************************************************************/
2450 static ListMenuData * network_create_pref_list (T_network * data) 2450 static ListMenuData * network_create_pref_list (T_network * data)
2451 { 2451 {
2452 UBYTE i; 2452 UBYTE i;
2453 2453
2460 2460
2461 list_menu_data->List = (T_MFW_MNU_ITEM *) ALLOC_MEMORY ((data->pplmn_mem.maxRcd) * sizeof (T_MFW_MNU_ITEM)); 2461 list_menu_data->List = (T_MFW_MNU_ITEM *) ALLOC_MEMORY ((data->pplmn_mem.maxRcd) * sizeof (T_MFW_MNU_ITEM));
2462 2462
2463 if (list_menu_data->List EQ 0) 2463 if (list_menu_data->List EQ 0)
2464 { 2464 {
2465 2465
2466 /* cq12719 If second memory alloc fails Free the memory allocated for list menu data. 16-03-04 MZ */ 2466 /* cq12719 If second memory alloc fails Free the memory allocated for list menu data. 16-03-04 MZ */
2467 if(NULL != list_menu_data) 2467 if(NULL != list_menu_data)
2468 FREE_MEMORY ((void *)list_menu_data, sizeof (ListMenuData)); 2468 FREE_MEMORY ((void *)list_menu_data, sizeof (ListMenuData));
2469 2469
2470 return NULL; 2470 return NULL;
2471 } 2471 }
2472 2472
2473 TRACE_EVENT ("network_create_pref_list ()"); 2473 TRACE_EVENT ("network_create_pref_list ()");
2474 2474
2478 * Fill Menu List 2478 * Fill Menu List
2479 */ 2479 */
2480 for (i=0; i < (network_data.pplmn_mem.maxRcd); i++) 2480 for (i=0; i < (network_data.pplmn_mem.maxRcd); i++)
2481 { 2481 {
2482 mnuInitDataItem(&list_menu_data->List[i]); 2482 mnuInitDataItem(&list_menu_data->List[i]);
2483 2483
2484 /* 2484 /*
2485 * set network name 2485 * set network name
2486 */ 2486 */
2487 2487
2488 #ifdef NO_ASCIIZ 2488 #ifdef NO_ASCIIZ
2489 if (network_data.pplmn[i].network_long.len NEQ 0 ) 2489 if (network_data.pplmn[i].network_long.len NEQ 0 )
2490 { 2490 {
2491 list_menu_data->List[i].str = (char *)network_data.pplmn[i].network_long.data; 2491 list_menu_data->List[i].str = (char *)network_data.pplmn[i].network_long.data;
2492 } 2492 }
2493 #else 2493 #else
2494 if (strlen((char *)network_data.pplmn[i].network_long) NEQ 0 ) 2494 if (strlen((char *)network_data.pplmn[i].network_long) NEQ 0 )
2495 { 2495 {
2496 list_menu_data->List[i].str = (char *)network_data.pplmn[i].network_long; 2496 list_menu_data->List[i].str = (char *)network_data.pplmn[i].network_long;
2497 } 2497 }
2498 #endif 2498 #endif
2519 list_menu_data->RightSoftKey = TxtSoftBack; 2519 list_menu_data->RightSoftKey = TxtSoftBack;
2520 list_menu_data->KeyEvents = KEY_CLEAR | KEY_RIGHT | KEY_LEFT | KEY_MNUUP | KEY_MNUDOWN; 2520 list_menu_data->KeyEvents = KEY_CLEAR | KEY_RIGHT | KEY_LEFT | KEY_MNUUP | KEY_MNUDOWN;
2521 list_menu_data->Reason = 0; 2521 list_menu_data->Reason = 0;
2522 list_menu_data->Strings = TRUE; 2522 list_menu_data->Strings = TRUE;
2523 list_menu_data->Attr = &network_menuAttrib; 2523 list_menu_data->Attr = &network_menuAttrib;
2524 list_menu_data->autoDestroy = TRUE; 2524 list_menu_data->autoDestroy = TRUE;
2525 list_menu_data->listCol = COLOUR_LIST_XX; 2525 list_menu_data->listCol = COLOUR_LIST_XX;
2526 2526
2527 return list_menu_data; 2527 return list_menu_data;
2528 } 2528 }
2529 2529
2530 /******************************************************************************* 2530 /*******************************************************************************
2531 2531
2532 $Function: network_create_mobile_list 2532 $Function: network_create_mobile_list
2533 2533
2534 $Description: 2534 $Description:
2535 2535
2536 $Returns: 2536 $Returns:
2537 2537
2538 $Arguments: 2538 $Arguments:
2539 2539
2540 *******************************************************************************/ 2540 *******************************************************************************/
2541 static ListMenuData * network_create_mobile_list (T_network_OPT * data) 2541 static ListMenuData * network_create_mobile_list (T_network_OPT * data)
2542 { 2542 {
2543 UBYTE i; 2543 UBYTE i;
2544 2544
2549 TRACE_EVENT ("failed to create the list"); 2549 TRACE_EVENT ("failed to create the list");
2550 return NULL; 2550 return NULL;
2551 } 2551 }
2552 2552
2553 mfwCheckMemoryLeft(); 2553 mfwCheckMemoryLeft();
2554 2554
2555 list_menu_data->List = (T_MFW_MNU_ITEM *) ALLOC_MEMORY (MAX_SHOW_OF_PLMN * sizeof (T_MFW_MNU_ITEM)); 2555 list_menu_data->List = (T_MFW_MNU_ITEM *) ALLOC_MEMORY (MAX_SHOW_OF_PLMN * sizeof (T_MFW_MNU_ITEM));
2556 2556
2557 mfwCheckMemoryLeft(); 2557 mfwCheckMemoryLeft();
2558 2558
2559 if (list_menu_data->List EQ 0) 2559 if (list_menu_data->List EQ 0)
2560 { 2560 {
2561 TRACE_EVENT ("failed to create the list"); 2561 TRACE_EVENT ("failed to create the list");
2562 return NULL; 2562 return NULL;
2563 } 2563 }
2564 2564
2565 TRACE_EVENT ("network_create_mobile_list ()"); 2565 TRACE_EVENT ("network_create_mobile_list ()");
2566 2566
2567 2567
2568 2568
2569 /* 2569 /*
2570 * Fill Menu List 2570 * Fill Menu List
2571 */ 2571 */
2572 for (i=0; i < MAX_SHOW_OF_PLMN; i++) 2572 for (i=0; i < MAX_SHOW_OF_PLMN; i++)
2573 { 2573 {
2574 mnuInitDataItem(&list_menu_data->List[i]); 2574 mnuInitDataItem(&list_menu_data->List[i]);
2575 2575
2576 /* 2576 /*
2577 * set network name 2577 * set network name
2578 */ 2578 */
2579 2579
2580 /*SPR 2635 copy set list strings pointing at longname strings*/ 2580 /*SPR 2635 copy set list strings pointing at longname strings*/
2581 if (data->pplmn_longnames[i][0] NEQ 0 ) 2581 if (data->pplmn_longnames[i][0] NEQ 0 )
2582 { 2582 {
2583 list_menu_data->List[i].str =data->pplmn_longnames[i]; 2583 list_menu_data->List[i].str =data->pplmn_longnames[i];
2584 } 2584 }
2585 else 2585 else
2586 2586
2587 { 2587 {
2588 list_menu_data->List[i].str = GET_TEXT(TxtEmpty); 2588 list_menu_data->List[i].str = GET_TEXT(TxtEmpty);
2589 } 2589 }
2590 2590
2591 /*SPR 2635, end*/ 2591 /*SPR 2635, end*/
2592 2592
2593 list_menu_data->List[i].flagFunc = item_flag_none; 2593 list_menu_data->List[i].flagFunc = item_flag_none;
2594 2594
2618 #if(0) /* x0039928 - Lint warning removal */ 2618 #if(0) /* x0039928 - Lint warning removal */
2619 /******************************************************************************* 2619 /*******************************************************************************
2620 2620
2621 $Function: network_submenu 2621 $Function: network_submenu
2622 2622
2623 $Description: Creates a submenu for the preferred list. 2623 $Description: Creates a submenu for the preferred list.
2624 2624
2625 $Returns: 2625 $Returns:
2626 2626
2627 $Arguments: 2627 $Arguments:
2628 2628
2629 *******************************************************************************/ 2629 *******************************************************************************/
2630 static ListMenuData * network_submenu (T_network * data, T_MFW_NETWORK_STRUCT * plmn_list) 2630 static ListMenuData * network_submenu (T_network * data, T_MFW_NETWORK_STRUCT * plmn_list)
2631 { 2631 {
2632 UBYTE i; 2632 UBYTE i;
2633 2633
2634 2634
2635 ListMenuData *list_menu_data = (ListMenuData *)ALLOC_MEMORY (sizeof (ListMenuData)); 2635 ListMenuData *list_menu_data = (ListMenuData *)ALLOC_MEMORY (sizeof (ListMenuData));
2636 2636
2637 if (list_menu_data EQ 0) 2637 if (list_menu_data EQ 0)
2638 return NULL; 2638 return NULL;
2645 * Fill Menu List 2645 * Fill Menu List
2646 */ 2646 */
2647 for (i=0;i<(NETWORK_MENU_ITEM);i++) 2647 for (i=0;i<(NETWORK_MENU_ITEM);i++)
2648 { 2648 {
2649 mnuInitDataItem(&list_menu_data->List[i]); 2649 mnuInitDataItem(&list_menu_data->List[i]);
2650 2650
2651 /* 2651 /*
2652 * set network name 2652 * set network name
2653 */ 2653 */
2654 #ifdef NO_ASCIIZ 2654 #ifdef NO_ASCIIZ
2655 if (plmn_list->network_long.len NEQ 0) 2655 if (plmn_list->network_long.len NEQ 0)
2656 list_menu_data->List[i].str = (char *)plmn_list->network_long.data; 2656 list_menu_data->List[i].str = (char *)plmn_list->network_long.data;
2657 #else 2657 #else
2658 if (strlen((char *)plmn_list->network_long) NEQ 0) 2658 if (strlen((char *)plmn_list->network_long) NEQ 0)
2659 list_menu_data->List[i].str = (char *)plmn_list->network_long; 2659 list_menu_data->List[i].str = (char *)plmn_list->network_long;
2660 #endif 2660 #endif
2661 2661
2662 else 2662 else
2691 /******************************************************************************* 2691 /*******************************************************************************
2692 2692
2693 $Function: network_list_cb 2693 $Function: network_list_cb
2694 2694
2695 $Description: Callback function list dialog. 2695 $Description: Callback function list dialog.
2696 2696
2697 $Returns: 2697 $Returns:
2698 2698
2699 $Arguments: 2699 $Arguments:
2700 2700
2701 *******************************************************************************/ 2701 *******************************************************************************/
2702 static void network_list_cb(T_MFW_HND win, ListMenuData * ListData) 2702 static void network_list_cb(T_MFW_HND win, ListMenuData * ListData)
2703 { 2703 {
2704 TRACE_FUNCTION ("network_list_cb()"); 2704 TRACE_FUNCTION ("network_list_cb()");
2705 2705
2714 { 2714 {
2715 SEND_EVENT (win, NETWORK_LIST_SELECT_PLMN, ListData->CursorPosition, NULL); 2715 SEND_EVENT (win, NETWORK_LIST_SELECT_PLMN, ListData->CursorPosition, NULL);
2716 SEND_EVENT (win, NETWORK_LIST_DESTORY, NULL, NULL); 2716 SEND_EVENT (win, NETWORK_LIST_DESTORY, NULL, NULL);
2717 } 2717 }
2718 2718
2719 if ((ListData->Reason EQ LISTS_REASON_BACK) || 2719 if ((ListData->Reason EQ LISTS_REASON_BACK) ||
2720 (ListData->Reason EQ LISTS_REASON_CLEAR)|| 2720 (ListData->Reason EQ LISTS_REASON_CLEAR)||
2721 (ListData->Reason EQ LISTS_REASON_HANGUP)) 2721 (ListData->Reason EQ LISTS_REASON_HANGUP))
2722 2722
2723 { 2723 {
2724 SEND_EVENT (win, NETWORK_LIST_DESTORY, NULL, NULL); 2724 SEND_EVENT (win, NETWORK_LIST_DESTORY, NULL, NULL);
2730 /******************************************************************************* 2730 /*******************************************************************************
2731 2731
2732 $Function: network_pref_list_cb 2732 $Function: network_pref_list_cb
2733 2733
2734 $Description: Callback function pref. list dialog. 2734 $Description: Callback function pref. list dialog.
2735 2735
2736 $Returns: 2736 $Returns:
2737 2737
2738 $Arguments: 2738 $Arguments:
2739 2739
2740 *******************************************************************************/ 2740 *******************************************************************************/
2741 static void network_pref_list_cb(T_MFW_HND win, ListMenuData * ListData) 2741 static void network_pref_list_cb(T_MFW_HND win, ListMenuData * ListData)
2742 { 2742 {
2743 TRACE_FUNCTION ("network_pref_list_cb()"); 2743 TRACE_FUNCTION ("network_pref_list_cb()");
2744 2744
2745 if (ListData->Reason EQ LISTS_REASON_SELECT) 2745 if (ListData->Reason EQ LISTS_REASON_SELECT)
2746 { 2746 {
2747 2747
2748 // call here the MenuOptions with the items "Select from the list" 2748 // call here the MenuOptions with the items "Select from the list"
2749 2749
2750 FREE_MEMORY ((UBYTE *)network_data.network_list->List, (network_data.pplmn_mem.maxRcd) * sizeof (T_MFW_MNU_ITEM)); 2750 FREE_MEMORY ((UBYTE *)network_data.network_list->List, (network_data.pplmn_mem.maxRcd) * sizeof (T_MFW_MNU_ITEM));
2751 2751
2752 FREE_MEMORY ((UBYTE *)network_data.network_list, sizeof (ListMenuData)); 2752 FREE_MEMORY ((UBYTE *)network_data.network_list, sizeof (ListMenuData));
2753 // xrashmic 10 Nov, 2004 MMI-SPR-OMAPS00044200-OMAPS00044851 2753 // xrashmic 10 Nov, 2004 MMI-SPR-OMAPS00044200-OMAPS00044851
2754 //Commented FREE_MEMORY for network_data.pplmn as this is required when we enter the option menu. 2754 //Commented FREE_MEMORY for network_data.pplmn as this is required when we enter the option menu.
2755 // Nov 02, 2005 REF: omaps00044855 Sumanth Kumar.C 2755 // Nov 02, 2005 REF: omaps00044855 Sumanth Kumar.C
2756 // Solution: Comment network_data.pplmn memory free. 2756 // Solution: Comment network_data.pplmn memory free.
2757 /* 2757 /*
2758 // cq12719 Stop the memory leak 17-03-04 MZ. 2758 // cq12719 Stop the memory leak 17-03-04 MZ.
2759 FREE_MEMORY ((UBYTE *)network_data.pplmn,(network_data.pplmn_mem.maxRcd) * sizeof (T_MFW_NETWORK_STRUCT)); 2759 FREE_MEMORY ((UBYTE *)network_data.pplmn,(network_data.pplmn_mem.maxRcd) * sizeof (T_MFW_NETWORK_STRUCT));
2760 */ 2760 */
2761 //keep the position of the selected PLMN, need it later to update the list 2761 //keep the position of the selected PLMN, need it later to update the list
2762 network_data.Listposition = ListData->ListPosition; 2762 network_data.Listposition = ListData->ListPosition;
2763 2763
2764 network_MNU_start(win,&network_OPTAttrib); 2764 network_MNU_start(win,&network_OPTAttrib);
2765 } 2765 }
2766 else 2766 else
2767 { 2767 {
2768 2768
2769 //user pressed Exit to go back to the network submenu 2769 //user pressed Exit to go back to the network submenu
2770 FREE_MEMORY ((UBYTE *)network_data.network_list->List, (network_data.pplmn_mem.maxRcd) * sizeof (T_MFW_MNU_ITEM)); 2770 FREE_MEMORY ((UBYTE *)network_data.network_list->List, (network_data.pplmn_mem.maxRcd) * sizeof (T_MFW_MNU_ITEM));
2771 2771
2772 FREE_MEMORY ((UBYTE *)network_data.network_list, sizeof (ListMenuData)); 2772 FREE_MEMORY ((UBYTE *)network_data.network_list, sizeof (ListMenuData));
2773 2773
2774 FREE_MEMORY ((UBYTE *)network_data.pplmn,(network_data.pplmn_mem.maxRcd) * sizeof (T_MFW_NETWORK_STRUCT)); 2774 FREE_MEMORY ((UBYTE *)network_data.pplmn,(network_data.pplmn_mem.maxRcd) * sizeof (T_MFW_NETWORK_STRUCT));
2775 2775
2776 } 2776 }
2777 2777
2778 2778
2779 } 2779 }
2780 2780
2781 /******************************************************************************* 2781 /*******************************************************************************
2782 2782
2783 $Function: network_mobile_list_cb 2783 $Function: network_mobile_list_cb
2784 2784
2785 $Description: Callback function international list dialog. 2785 $Description: Callback function international list dialog.
2786 2786
2787 $Returns: 2787 $Returns:
2788 2788
2789 $Arguments: 2789 $Arguments:
2790 2790
2791 *******************************************************************************/ 2791 *******************************************************************************/
2792 static void network_mobile_list_cb(T_MFW_HND win, ListMenuData * ListData) 2792 static void network_mobile_list_cb(T_MFW_HND win, ListMenuData * ListData)
2793 { 2793 {
2794 2794
2795 /* UBYTE i;*/ /* Warning Correction */ 2795 /* UBYTE i;*/ /* Warning Correction */
2797 T_MFW_PPLMN_MODE mode; 2797 T_MFW_PPLMN_MODE mode;
2798 2798
2799 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; 2799 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data;
2800 T_network_OPT * data = (T_network_OPT *)win_data->user; 2800 T_network_OPT * data = (T_network_OPT *)win_data->user;
2801 T_DISPLAY_DATA display_info; 2801 T_DISPLAY_DATA display_info;
2802 2802
2803 TRACE_EVENT ("network_mobile_list_cb()"); 2803 TRACE_EVENT ("network_mobile_list_cb()");
2804 2804
2805 2805
2806 switch (ListData->Reason) 2806 switch (ListData->Reason)
2807 { 2807 {
2808 case LISTS_REASON_SELECT: /* */ 2808 case LISTS_REASON_SELECT: /* */
2809 2809
2810 mode = REPLACE_PREF_PLMN; /* Overwrite an existing entry at a given index */ 2810 mode = REPLACE_PREF_PLMN; /* Overwrite an existing entry at a given index */
2811 /*SPR 2635, use new function to replace preferred PLMN using the longname*/ 2811 /*SPR 2635, use new function to replace preferred PLMN using the longname*/
2812 nm_change_pref_plmn_longname(mode,(network_data.Listposition) +1 , 0, data->pplmn_longnames[ListData->ListPosition]); 2812 nm_change_pref_plmn_longname(mode,(network_data.Listposition) +1 , 0, data->pplmn_longnames[ListData->ListPosition]);
2813 2813
2814 /* SPR#2354 - SH - Now display "Changed". On callback, redraw network list */ 2814 /* SPR#2354 - SH - Now display "Changed". On callback, redraw network list */
2815 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtChanged, TxtNull, COLOUR_STATUS_NETWORKS); 2815 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtChanged, TxtNull, COLOUR_STATUS_NETWORKS);
2816 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)network_mobile_list_changed_cb, THREE_SECS, 0 ); 2816 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)network_mobile_list_changed_cb, THREE_SECS, 0 );
2817 2817
2818 info_dialog (win, &display_info); 2818 info_dialog (win, &display_info);
2819 2819
2820 break; 2820 break;
2821 case LISTS_REASON_BACK: /* back to previous menu */ 2821 case LISTS_REASON_BACK: /* back to previous menu */
2822 2822
2823 TRACE_EVENT ("pressed Back-key"); 2823 TRACE_EVENT ("pressed Back-key");
2840 2840
2841 $Function: network_mobile_list_changed_cb 2841 $Function: network_mobile_list_changed_cb
2842 2842
2843 $Description: Callback from "Changed" message. Destroys the list and recreates the 2843 $Description: Callback from "Changed" message. Destroys the list and recreates the
2844 updated network list. 2844 updated network list.
2845 2845
2846 $Returns: 2846 $Returns:
2847 2847
2848 $Arguments: 2848 $Arguments:
2849 2849
2850 *******************************************************************************/ 2850 *******************************************************************************/
2851 2851
2852 void network_mobile_list_changed_cb(T_MFW_HND win , USHORT identifier, UBYTE reason) 2852 void network_mobile_list_changed_cb(T_MFW_HND win , USHORT identifier, UBYTE reason)
2853 { 2853 {
2854 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; 2854 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data;
2855 T_network_OPT * data = (T_network_OPT *)win_data->user; 2855 T_network_OPT * data = (T_network_OPT *)win_data->user;
2856 /* T_DISPLAY_DATA display_info; */ /* Warning Correction */ 2856 /* T_DISPLAY_DATA display_info; */ /* Warning Correction */
2857 2857
2858 /* destroy the Menu */ 2858 /* destroy the Menu */
2859 network_MNU_destroy(data->win); 2859 network_MNU_destroy(data->win);
2860 2860
2861 /* request the pref. PLMN list */ 2861 /* request the pref. PLMN list */
2862 nm_pref_plmn_list(network_data.pplmn, network_data.pplmn_mem.maxRcd, 1); 2862 nm_pref_plmn_list(network_data.pplmn, network_data.pplmn_mem.maxRcd, 1);
2868 /******************************************************************************* 2868 /*******************************************************************************
2869 2869
2870 $Function: network_start_animation 2870 $Function: network_start_animation
2871 2871
2872 $Description: Starts the network animation. 2872 $Description: Starts the network animation.
2873 2873
2874 $Returns: 2874 $Returns:
2875 2875
2876 $Arguments: 2876 $Arguments:
2877 2877
2878 *******************************************************************************/ 2878 *******************************************************************************/
2879 static void network_start_animation(void) 2879 static void network_start_animation(void)
2880 { 2880 {
2881 T_DISPLAY_DATA display_info; 2881 T_DISPLAY_DATA display_info;
2882 2882
2906 /******************************************************************************* 2906 /*******************************************************************************
2907 2907
2908 $Function: network_start_animation_plmn_selection 2908 $Function: network_start_animation_plmn_selection
2909 2909
2910 $Description: Starts the plmn selection animation. 2910 $Description: Starts the plmn selection animation.
2911 2911
2912 $Returns: 2912 $Returns:
2913 2913
2914 $Arguments: 2914 $Arguments:
2915 2915
2916 *******************************************************************************/ 2916 *******************************************************************************/
2917 static void network_start_animation_plmn_selection(int plmn_value) 2917 static void network_start_animation_plmn_selection(int plmn_value)
2918 { 2918 {
2919 T_DISPLAY_DATA display_info; 2919 T_DISPLAY_DATA display_info;
2920 /* T_MFW_PLMN_LIST * plmn_list; */ /* Warning Correction */ 2920 /* T_MFW_PLMN_LIST * plmn_list; */ /* Warning Correction */
2921 2921
2922 TRACE_FUNCTION ("network_start_animation()"); 2922 TRACE_FUNCTION ("network_start_animation()");
2923 2923
2924 dlg_initDisplayData_TextStr( &display_info, TxtNull, TxtNull, "Requesting....", NULL, COLOUR_STATUS_NETWORKS); 2924 dlg_initDisplayData_TextStr( &display_info, TxtNull, TxtNull, "Requesting....", NULL, COLOUR_STATUS_NETWORKS);
2925 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)network_animation_cb, FOREVER, KEY_CLEAR| KEY_RIGHT ); 2925 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)network_animation_cb, FOREVER, KEY_CLEAR| KEY_RIGHT );
2926 2926
2927 /* 2927 /*
2928 * Call Info Screen 2928 * Call Info Screen
2929 */ 2929 */
2930 2930
2931 network_data.network_search_win = info_dialog (network_data.network_win, &display_info); 2931 network_data.network_search_win = info_dialog (network_data.network_win, &display_info);
2935 /******************************************************************************* 2935 /*******************************************************************************
2936 2936
2937 $Function: network_forbidden_plmn 2937 $Function: network_forbidden_plmn
2938 2938
2939 $Description: Starts the forbidden plmn data screen. 2939 $Description: Starts the forbidden plmn data screen.
2940 2940
2941 $Returns: 2941 $Returns:
2942 2942
2943 $Arguments: 2943 $Arguments:
2944 2944
2945 *******************************************************************************/ 2945 *******************************************************************************/
2946 static void network_forbidden_plmn(void) 2946 static void network_forbidden_plmn(void)
2947 { 2947 {
2948 T_DISPLAY_DATA display_info; 2948 T_DISPLAY_DATA display_info;
2949 2949
2967 /******************************************************************************* 2967 /*******************************************************************************
2968 2968
2969 $Function: network_selected 2969 $Function: network_selected
2970 2970
2971 $Description: displays info screen on network selected 2971 $Description: displays info screen on network selected
2972 2972
2973 $Returns: 2973 $Returns:
2974 2974
2975 $Arguments: 2975 $Arguments:
2976 2976
2977 *******************************************************************************/ 2977 *******************************************************************************/
2978 static void network_selected(void) 2978 static void network_selected(void)
2979 { 2979 {
2980 T_DISPLAY_DATA display_info; 2980 T_DISPLAY_DATA display_info;
2981 2981
2996 /******************************************************************************* 2996 /*******************************************************************************
2997 2997
2998 $Function: network_no_plmns 2998 $Function: network_no_plmns
2999 2999
3000 $Description: Indicate Info Screen that the network list is empty. 3000 $Description: Indicate Info Screen that the network list is empty.
3001 3001
3002 $Returns: 3002 $Returns:
3003 3003
3004 $Arguments: 3004 $Arguments:
3005 3005
3006 *******************************************************************************/ 3006 *******************************************************************************/
3007 static void network_no_plmns(void) 3007 static void network_no_plmns(void)
3008 { 3008 {
3009 T_DISPLAY_DATA display_info; 3009 T_DISPLAY_DATA display_info;
3010 3010
3021 /******************************************************************************* 3021 /*******************************************************************************
3022 3022
3023 $Function: network_stop_animation 3023 $Function: network_stop_animation
3024 3024
3025 $Description: Stops the network animation. 3025 $Description: Stops the network animation.
3026 3026
3027 $Returns: 3027 $Returns:
3028 3028
3029 $Arguments: 3029 $Arguments:
3030 3030
3031 *******************************************************************************/ 3031 *******************************************************************************/
3032 static void network_stop_animation(void) 3032 static void network_stop_animation(void)
3033 { 3033 {
3034 TRACE_FUNCTION ("network_stop_animation()"); 3034 TRACE_FUNCTION ("network_stop_animation()");
3035 3035
3042 /******************************************************************************* 3042 /*******************************************************************************
3043 3043
3044 $Function: network_animation_cb 3044 $Function: network_animation_cb
3045 3045
3046 $Description: Callback for information dialog (not used)n 3046 $Description: Callback for information dialog (not used)n
3047 3047
3048 $Returns: 3048 $Returns:
3049 3049
3050 $Arguments: 3050 $Arguments:
3051 3051
3052 *******************************************************************************/ 3052 *******************************************************************************/
3053 void network_animation_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason) 3053 void network_animation_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason)
3054 { 3054 {
3055 TRACE_FUNCTION ("network_animation_cb()"); 3055 TRACE_FUNCTION ("network_animation_cb()");
3056 3056
3061 /******************************************************************************* 3061 /*******************************************************************************
3062 3062
3063 $Function: network_select_animation_cb 3063 $Function: network_select_animation_cb
3064 3064
3065 $Description: Callback for information dialog "Network Selected". 3065 $Description: Callback for information dialog "Network Selected".
3066 3066
3067 $Returns: 3067 $Returns:
3068 3068
3069 $Arguments: 3069 $Arguments:
3070 3070
3071 *******************************************************************************/ 3071 *******************************************************************************/
3072 void network_select_animation_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason) 3072 void network_select_animation_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason)
3073 { 3073 {
3074 TRACE_FUNCTION ("network_select_animation_cb()"); 3074 TRACE_FUNCTION ("network_select_animation_cb()");
3075 3075
3076 network_data.network_search_win = 0; 3076 network_data.network_search_win = 0;
3077 network_data.aborted = TRUE; 3077 network_data.aborted = TRUE;
3078 // Jul 21, 2004 REF: CRR 13348 xvilliva 3078 // Jul 21, 2004 REF: CRR 13348 xvilliva
3079 // If "gPhbkMenu" is not NULL, we destroy phonebook menu 3079 // If "gPhbkMenu" is not NULL, we destroy phonebook menu
3080 // to return to idle screen. 3080 // to return to idle screen.
3081 if(gPhbkMenu != NULL) 3081 if(gPhbkMenu != NULL)
3082 { 3082 {
3083 bookPhonebookDestroy( gPhbkMenu ); 3083 bookPhonebookDestroy( gPhbkMenu );
3084 } 3084 }
3086 3086
3087 /******************************************************************************* 3087 /*******************************************************************************
3088 3088
3089 $Function: network_MNU_start 3089 $Function: network_MNU_start
3090 3090
3091 $Description: called when the user press the Edit Softkey to enter the 3091 $Description: called when the user press the Edit Softkey to enter the
3092 Option Menu "Select from the list" & "Enter the Network Code" & 3092 Option Menu "Select from the list" & "Enter the Network Code" &
3093 "Delete" 3093 "Delete"
3094 $Returns: 3094 $Returns:
3095 3095
3096 $Arguments: 3096 $Arguments:
3097 3097
3098 *******************************************************************************/ 3098 *******************************************************************************/
3099 3099
3100 T_MFW_HND network_MNU_start(T_MFW_HND parent_window, MfwMnuAttr *menuAttr) 3100 T_MFW_HND network_MNU_start(T_MFW_HND parent_window, MfwMnuAttr *menuAttr)
3101 { 3101 {
3102 T_MFW_HND win; 3102 T_MFW_HND win;
3114 /******************************************************************************* 3114 /*******************************************************************************
3115 3115
3116 $Function: network_MNU_create 3116 $Function: network_MNU_create
3117 3117
3118 $Description: Create the Option window 3118 $Description: Create the Option window
3119 3119
3120 $Returns: mfw window handle 3120 $Returns: mfw window handle
3121 3121
3122 $Arguments: parent_window -parent window handle 3122 $Arguments: parent_window -parent window handle
3123 3123
3124 *******************************************************************************/ 3124 *******************************************************************************/
3125 3125
3126 static T_MFW_HND network_MNU_create(MfwHnd parent_window) 3126 static T_MFW_HND network_MNU_create(MfwHnd parent_window)
3127 { 3127 {
3128 T_network_OPT * data = (T_network_OPT *)ALLOC_MEMORY (sizeof (T_network_OPT)); 3128 T_network_OPT * data = (T_network_OPT *)ALLOC_MEMORY (sizeof (T_network_OPT));
3132 3132
3133 /* 3133 /*
3134 * Create window handler 3134 * Create window handler
3135 */ 3135 */
3136 3136
3137 data->win = 3137 data->win =
3138 win_create (parent_window, 0, E_WIN_VISIBLE, (T_MFW_CB)network_MNU_win_cb); 3138 win_create (parent_window, 0, E_WIN_VISIBLE, (T_MFW_CB)network_MNU_win_cb);
3139 if (data->win EQ NULL) 3139 if (data->win EQ NULL)
3140 { 3140 {
3141 return NULL; 3141 return NULL;
3142 } 3142 }
3143 3143
3144 /* 3144 /*
3145 * connect the dialog data to the MFW-window 3145 * connect the dialog data to the MFW-window
3146 */ 3146 */
3147 3147
3148 data->mmi_control.dialog = (T_DIALOG_FUNC)network_MNU_exec_cb; 3148 data->mmi_control.dialog = (T_DIALOG_FUNC)network_MNU_exec_cb;
3149 data->mmi_control.data = data; 3149 data->mmi_control.data = data;
3161 /******************************************************************************* 3161 /*******************************************************************************
3162 3162
3163 $Function: network_MNU_destroy 3163 $Function: network_MNU_destroy
3164 3164
3165 $Description: Destroy the Option window 3165 $Description: Destroy the Option window
3166 3166
3167 $Returns: mfw window handle 3167 $Returns: mfw window handle
3168 3168
3169 $Arguments: own_window - current window 3169 $Arguments: own_window - current window
3170 3170
3171 *******************************************************************************/ 3171 *******************************************************************************/
3172 3172
3173 static void network_MNU_destroy(MfwHnd own_window) 3173 static void network_MNU_destroy(MfwHnd own_window)
3174 { 3174 {
3175 T_MFW_WIN * win_data; 3175 T_MFW_WIN * win_data;
3180 3180
3181 if (own_window) 3181 if (own_window)
3182 { 3182 {
3183 win_data = ((T_MFW_HDR *)own_window)->data; 3183 win_data = ((T_MFW_HDR *)own_window)->data;
3184 data = (T_network_OPT *)win_data->user; 3184 data = (T_network_OPT *)win_data->user;
3185 3185
3186 if (data) 3186 if (data)
3187 { 3187 {
3188 kbd_delete(data->kbd); 3188 kbd_delete(data->kbd);
3189 kbd_delete(data->kbd_long); 3189 kbd_delete(data->kbd_long);
3190 mnuDelete (data->menu); 3190 mnuDelete (data->menu);
3191 /* 3191 /*
3192 * Delete WIN handler 3192 * Delete WIN handler
3193 */ 3193 */
3194 win_delete (data->win); 3194 win_delete (data->win);
3195 TRACE_EVENT("END of WIN DELETE"); 3195 TRACE_EVENT("END of WIN DELETE");
3196 3196
3197 if(data->network_list != NULL) 3197 if(data->network_list != NULL)
3198 { 3198 {
3199 TRACE_EVENT("START FREE MEMORY"); 3199 TRACE_EVENT("START FREE MEMORY");
3200 3200
3201 /* Free the allocated memory for PLMN list window - OMAPS00061049 - 08-03-2006 */ 3201 /* Free the allocated memory for PLMN list window - OMAPS00061049 - 08-03-2006 */
3202 #ifndef NEPTUNE_BOARD 3202 #ifndef NEPTUNE_BOARD
3203 FREE_MEMORY ((UBYTE *)data->network_list->List, MAX_SHOW_OF_PLMN* sizeof (T_MFW_MNU_ITEM)); 3203 FREE_MEMORY ((UBYTE *)data->network_list->List, MAX_SHOW_OF_PLMN* sizeof (T_MFW_MNU_ITEM));
3204 #else 3204 #else
3205 FREE_MEMORY ((UBYTE *)data->network_list->List, Plmn_list_count * sizeof (T_MFW_MNU_ITEM)); 3205 FREE_MEMORY ((UBYTE *)data->network_list->List, Plmn_list_count * sizeof (T_MFW_MNU_ITEM));
3206 #endif 3206 #endif
3207 3207
3208 FREE_MEMORY ((UBYTE *)data->network_list, sizeof (ListMenuData)); 3208 FREE_MEMORY ((UBYTE *)data->network_list, sizeof (ListMenuData));
3209 3209
3210 /*SPR 2635, free list of pointers to longname atrings*/ 3210 /*SPR 2635, free list of pointers to longname atrings*/
3211 FREE_MEMORY ((UBYTE *)data->pplmn_longnames,MAX_SHOW_OF_PLMN* sizeof (char*)); 3211 FREE_MEMORY ((UBYTE *)data->pplmn_longnames,MAX_SHOW_OF_PLMN* sizeof (char*));
3212 3212
3213 TRACE_EVENT("END of FREE MEMORY"); 3213 TRACE_EVENT("END of FREE MEMORY");
3214 } 3214 }
3215 3215
3216 /* 3216 /*
3217 * Free Memory 3217 * Free Memory
3218 */ 3218 */
3219 3219
3220 FREE_MEMORY ((void *)data, sizeof (T_network_OPT)); 3220 FREE_MEMORY ((void *)data, sizeof (T_network_OPT));
3221 } 3221 }
3222 else 3222 else
3223 { 3223 {
3224 TRACE_EVENT ("network_MNU_destroy() called twice"); 3224 TRACE_EVENT ("network_MNU_destroy() called twice");
3229 /******************************************************************************* 3229 /*******************************************************************************
3230 3230
3231 $Function: network_MNU_exec_cb 3231 $Function: network_MNU_exec_cb
3232 3232
3233 $Description: Exec callback function for the Option window 3233 $Description: Exec callback function for the Option window
3234 3234
3235 $Returns: none 3235 $Returns: none
3236 3236
3237 $Arguments: win - current window 3237 $Arguments: win - current window
3238 event - event id 3238 event - event id
3239 value - unique id 3239 value - unique id
3240 parameter - optional data. 3240 parameter - optional data.
3241 3241
3242 *******************************************************************************/ 3242 *******************************************************************************/
3243 3243
3244 void network_MNU_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter) 3244 void network_MNU_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter)
3245 { 3245 {
3246 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; 3246 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data;
3247 T_network_OPT * data = (T_network_OPT *)win_data->user; 3247 T_network_OPT * data = (T_network_OPT *)win_data->user;
3248 /* T_MFW_HND * l_parent; */ /* Warning Correction */ 3248 /* T_MFW_HND * l_parent; */ /* Warning Correction */
3249 /* SHORT l_id; */ /* Warning Correction */ 3249 /* SHORT l_id; */ /* Warning Correction */
3250 /* T_MFW_HDR * parent = data->parent; */ /* Warning Correction */ 3250 /* T_MFW_HDR * parent = data->parent; */ /* Warning Correction */
3251 /* T_MFW_EVENT MfwEvents; */ /* Warning Correction */ 3251 /* T_MFW_EVENT MfwEvents; */ /* Warning Correction */
3252 3252
3253 TRACE_FUNCTION ("network_MNU_exec_cb()"); 3253 TRACE_FUNCTION ("network_MNU_exec_cb()");
3254 3254
3255 3255
3256 switch (event) 3256 switch (event)
3257 { 3257 {
3262 mnuLang(data->menu,mainMmiLng); 3262 mnuLang(data->menu,mainMmiLng);
3263 3263
3264 /* put the (new) dialog window on top of the window stack */ 3264 /* put the (new) dialog window on top of the window stack */
3265 mnuUnhide(data->menu); 3265 mnuUnhide(data->menu);
3266 winShow(win); 3266 winShow(win);
3267 3267
3268 break; 3268 break;
3269 default: 3269 default:
3270 return; 3270 return;
3271 } 3271 }
3272 } 3272 }
3274 /******************************************************************************* 3274 /*******************************************************************************
3275 3275
3276 $Function: network_MNU_mnu_cb 3276 $Function: network_MNU_mnu_cb
3277 3277
3278 $Description: Menu callback function for the Option window 3278 $Description: Menu callback function for the Option window
3279 3279
3280 $Returns: none 3280 $Returns: none
3281 3281
3282 $Arguments: e - event id 3282 $Arguments: e - event id
3283 m - menu handle 3283 m - menu handle
3284 *******************************************************************************/ 3284 *******************************************************************************/
3299 network_MNU_destroy(data->win); 3299 network_MNU_destroy(data->win);
3300 3300
3301 // request MFW to fill up the pref. PLMN list 3301 // request MFW to fill up the pref. PLMN list
3302 nm_pref_plmn_list(network_data.pplmn, network_data.pplmn_mem.maxRcd, 1); 3302 nm_pref_plmn_list(network_data.pplmn, network_data.pplmn_mem.maxRcd, 1);
3303 3303
3304 3304
3305 break; 3305 break;
3306 default: /* in mnuCreate() only E_MNU_ESCAPE has been enabled! */ 3306 default: /* in mnuCreate() only E_MNU_ESCAPE has been enabled! */
3307 return MFW_EVENT_REJECTED; 3307 return MFW_EVENT_REJECTED;
3308 } 3308 }
3309 return MFW_EVENT_CONSUMED; 3309 return MFW_EVENT_CONSUMED;
3312 /******************************************************************************* 3312 /*******************************************************************************
3313 3313
3314 $Function: network_MNU_win_cb 3314 $Function: network_MNU_win_cb
3315 3315
3316 $Description: Window callback function for the Option window 3316 $Description: Window callback function for the Option window
3317 3317
3318 $Returns: execution status 3318 $Returns: execution status
3319 3319
3320 $Arguments: e - event id 3320 $Arguments: e - event id
3321 w - window handle 3321 w - window handle
3322 *******************************************************************************/ 3322 *******************************************************************************/
3323 3323
3324 static int network_MNU_win_cb (MfwEvt e, MfwWin *w) 3324 static int network_MNU_win_cb (MfwEvt e, MfwWin *w)
3325 { 3325 {
3326 TRACE_FUNCTION ("network_MNU_win_cb()"); 3326 TRACE_FUNCTION ("network_MNU_win_cb()");
3341 /******************************************************************************* 3341 /*******************************************************************************
3342 3342
3343 $Function: network_MNU_kbd_cb 3343 $Function: network_MNU_kbd_cb
3344 3344
3345 $Description: Exec callback function for the Option window 3345 $Description: Exec callback function for the Option window
3346 3346
3347 $Returns: execution status 3347 $Returns: execution status
3348 3348
3349 $Arguments: e - event id 3349 $Arguments: e - event id
3350 k - keyboard info 3350 k - keyboard info
3351 *******************************************************************************/ 3351 *******************************************************************************/
3398 /******************************************************************************* 3398 /*******************************************************************************
3399 3399
3400 $Function: network_request_plnm_list 3400 $Function: network_request_plnm_list
3401 3401
3402 $Description: Request existing network list in Mobile 3402 $Description: Request existing network list in Mobile
3403 3403
3404 $Returns: 3404 $Returns:
3405 3405
3406 $Arguments: 3406 $Arguments:
3407 3407
3408 3408
3409 *******************************************************************************/ 3409 *******************************************************************************/
3410 static int network_request_plnm_list(MfwMnu* m, MfwMnuItem* i) 3410 static int network_request_plnm_list(MfwMnu* m, MfwMnuItem* i)
3411 { 3411 {
3412 T_MFW_HND win = mfwParent(mfw_header()); 3412 T_MFW_HND win = mfwParent(mfw_header());
3413 /* T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; */ /* Warning Correction */ 3413 /* T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; */ /* Warning Correction */
3414 /* T_network_OPT * data = (T_network_OPT *)win_data->user; */ /* Warning Correction */ 3414 /* T_network_OPT * data = (T_network_OPT *)win_data->user; */ /* Warning Correction */
3415 T_DISPLAY_DATA display_info; 3415 T_DISPLAY_DATA display_info;
3416 3416
3417 TRACE_FUNCTION("network_request_plnm_list"); 3417 TRACE_FUNCTION("network_request_plnm_list");
3418 3418
3419 /* SPR#2354 - SH - Display "Choose Replacement" dialogue, 3419 /* SPR#2354 - SH - Display "Choose Replacement" dialogue,
3420 * so the function of the second list is more evident */ 3420 * so the function of the second list is more evident */
3421 3421
3422 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtChooseReplacement1, TxtChooseReplacement2, COLOUR_STATUS_NETWORKS); 3422 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtChooseReplacement1, TxtChooseReplacement2, COLOUR_STATUS_NETWORKS);
3423 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)network_request_plmn_list_cb, TWO_SECS, 0 ); 3423 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)network_request_plmn_list_cb, TWO_SECS, 0 );
3424 3424
3425 info_dialog (win, &display_info); 3425 info_dialog (win, &display_info);
3426 3426
3427 return 1; 3427 return 1;
3428 } 3428 }
3429 3429
3430 /******************************************************************************* 3430 /*******************************************************************************
3431 3431
3432 $Function: network_request_plnm_list_cb 3432 $Function: network_request_plnm_list_cb
3433 3433
3434 $Description: User has been advised to "choose replacement", now display the list! 3434 $Description: User has been advised to "choose replacement", now display the list!
3435 3435
3436 $Returns: None 3436 $Returns: None
3437 3437
3438 $Arguments: Usual info dialogue callback arguments. 3438 $Arguments: Usual info dialogue callback arguments.
3439 3439
3440 *******************************************************************************/ 3440 *******************************************************************************/
3469 3469
3470 /******************************************************************************* 3470 /*******************************************************************************
3471 3471
3472 $Function: network_delete 3472 $Function: network_delete
3473 3473
3474 $Description: 3474 $Description:
3475 3475
3476 $Returns: 3476 $Returns:
3477 3477
3478 $Arguments: 3478 $Arguments:
3479 3479
3480 3480
3481 *******************************************************************************/ 3481 *******************************************************************************/
3482 3482
3483 static int network_delete(MfwMnu* m, MfwMnuItem* i) 3483 static int network_delete(MfwMnu* m, MfwMnuItem* i)
3487 3487
3488 TRACE_FUNCTION ("network_delete()"); 3488 TRACE_FUNCTION ("network_delete()");
3489 3489
3490 #ifdef NO_ASCIIZ 3490 #ifdef NO_ASCIIZ
3491 if (network_data.pplmn[network_data.Listposition].network_short.len NEQ 0 ) 3491 if (network_data.pplmn[network_data.Listposition].network_short.len NEQ 0 )
3492 #else 3492 #else
3493 if (strlen((char *)network_data.pplmn[network_data.Listposition].network_short) NEQ 0 ) 3493 if (strlen((char *)network_data.pplmn[network_data.Listposition].network_short) NEQ 0 )
3494 #endif 3494 #endif
3495 { 3495 {
3496 // if the user selected a pref. PLMN 3496 // if the user selected a pref. PLMN
3497 // xrashmic 10 Nov, 2004 MMI-SPR-OMAPS00044200-OMAPS00044851 3497 // xrashmic 10 Nov, 2004 MMI-SPR-OMAPS00044200-OMAPS00044851
3498 //Made network_info_screen as a generic function as it can be reused to display different messgaes to the user 3498 //Made network_info_screen as a generic function as it can be reused to display different messgaes to the user
3499 //Hence need to pass the callback funtion as a parameter 3499 //Hence need to pass the callback funtion as a parameter
3506 //Made network_info_screen as a generic function as it can be reused to display different messgaes to the user 3506 //Made network_info_screen as a generic function as it can be reused to display different messgaes to the user
3507 //Hence need to pass the callback funtion as a parameter 3507 //Hence need to pass the callback funtion as a parameter
3508 network_info_screen (win, TxtEmptyList,(T_VOID_FUNC)network_delete_pref_plnm); 3508 network_info_screen (win, TxtEmptyList,(T_VOID_FUNC)network_delete_pref_plnm);
3509 } 3509 }
3510 3510
3511 // destroy the Menu 3511 // destroy the Menu
3512 network_MNU_destroy(win); 3512 network_MNU_destroy(win);
3513 3513
3514 /* Warning Correction - BEGIN */ 3514 /* Warning Correction - BEGIN */
3515 return 1; 3515 return 1;
3516 /* END */ 3516 /* END */
3517 3517
3518 3518
3519 } 3519 }
3520 3520
3521 /******************************************************************************* 3521 /*******************************************************************************
3522 3522
3523 $Function: network_delete_pref_plnm 3523 $Function: network_delete_pref_plnm
3524 3524
3525 $Description: Delete the selected pref. PLMN l 3525 $Description: Delete the selected pref. PLMN l
3526 3526
3527 $Returns: 3527 $Returns:
3528 3528
3529 $Arguments: 3529 $Arguments:
3530 3530
3531 3531
3532 *******************************************************************************/ 3532 *******************************************************************************/
3533 void network_delete_pref_plnm (T_MFW_HND win , USHORT identifier, UBYTE reason) 3533 void network_delete_pref_plnm (T_MFW_HND win , USHORT identifier, UBYTE reason)
3534 { 3534 {
3538 /* T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; */ /* Warning Correction */ 3538 /* T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; */ /* Warning Correction */
3539 /* T_network_OPT * data = (T_network_OPT *)win_data->user; */ /* Warning Correction */ 3539 /* T_network_OPT * data = (T_network_OPT *)win_data->user; */ /* Warning Correction */
3540 3540
3541 TRACE_FUNCTION ("network_delete_pref_plnm()"); 3541 TRACE_FUNCTION ("network_delete_pref_plnm()");
3542 3542
3543 3543
3544 mode = DELETE_PREF_PLMN; /* Delete an entry from the list */ 3544 mode = DELETE_PREF_PLMN; /* Delete an entry from the list */
3545 3545
3546 //update now the pref. PLMN list 3546 //update now the pref. PLMN list
3547 //(network_data.Listposition) "+1" because the zero is counted as well 3547 //(network_data.Listposition) "+1" because the zero is counted as well
3548 nm_change_pref_plmn(mode, (network_data.Listposition) +1 , 0, 0); 3548 nm_change_pref_plmn(mode, (network_data.Listposition) +1 , 0, 0);
3552 { 3552 {
3553 3553
3554 #ifdef NO_ASCIIZ 3554 #ifdef NO_ASCIIZ
3555 network_data.pplmn[i].network_long.len = 0; 3555 network_data.pplmn[i].network_long.len = 0;
3556 network_data.pplmn[i].network_short.len = 0; 3556 network_data.pplmn[i].network_short.len = 0;
3557 #else 3557 #else
3558 memset(network_data.pplmn[i].network_long, '\0', LONG_NAME); 3558 memset(network_data.pplmn[i].network_long, '\0', LONG_NAME);
3559 memset(network_data.pplmn[i].network_short, '\0', SHORT_NAME); 3559 memset(network_data.pplmn[i].network_short, '\0', SHORT_NAME);
3560 #endif 3560 #endif
3561 memset(network_data.pplmn[i].network_numeric, '\0', NUMERIC_LENGTH); 3561 memset(network_data.pplmn[i].network_numeric, '\0', NUMERIC_LENGTH);
3562 } 3562 }
3563 3563
3564 3564
3565 // request the updated pref. PLMN list 3565 // request the updated pref. PLMN list
3570 /******************************************************************************* 3570 /*******************************************************************************
3571 3571
3572 $Function: network_info_screen 3572 $Function: network_info_screen
3573 3573
3574 $Description: confirm the deleted PLMN 3574 $Description: confirm the deleted PLMN
3575 3575
3576 $Returns: 3576 $Returns:
3577 3577
3578 $Arguments: 3578 $Arguments:
3579 3579
3580 // xrashmic 10 Nov, 2004 MMI-SPR-OMAPS00044200-OMAPS00044851 3580 // xrashmic 10 Nov, 2004 MMI-SPR-OMAPS00044200-OMAPS00044851
3581 //Made this as a generic function so that it can be reused to display different messgaes to the user 3581 //Made this as a generic function so that it can be reused to display different messgaes to the user
3582 //Added the call back function pointer as the argument. 3582 //Added the call back function pointer as the argument.
3583 *******************************************************************************/ 3583 *******************************************************************************/
3588 TRACE_FUNCTION ("network_info_screen()"); 3588 TRACE_FUNCTION ("network_info_screen()");
3589 3589
3590 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, MessageId, TxtNull, COLOUR_STATUS_NETWORKS); 3590 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, MessageId, TxtNull, COLOUR_STATUS_NETWORKS);
3591 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)funt_ptr, THREE_SECS, 0 ); 3591 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)funt_ptr, THREE_SECS, 0 );
3592 3592
3593 info_dialog (win, &display_info); 3593 info_dialog (win, &display_info);
3594 } 3594 }
3595 3595
3596 3596
3597 /******************************************************************************* 3597 /*******************************************************************************
3598 3598
3599 $Function: network_OPT_EDT_start 3599 $Function: network_OPT_EDT_start
3600 3600
3601 $Description: 3601 $Description:
3602 3602
3603 $Returns: 3603 $Returns:
3604 3604
3605 $Arguments: 3605 $Arguments:
3606 3606
3607 *******************************************************************************/ 3607 *******************************************************************************/
3608 T_MFW_HND network_EDT_start (MfwMnu* m, MfwMnuItem* i) 3608 T_MFW_HND network_EDT_start (MfwMnu* m, MfwMnuItem* i)
3609 { 3609 {
3610 T_MFW_HND win; 3610 T_MFW_HND win;
3611 T_MFW_HND parent_window = mfwParent(mfw_header()); 3611 T_MFW_HND parent_window = mfwParent(mfw_header());
3623 3623
3624 /******************************************************************************* 3624 /*******************************************************************************
3625 3625
3626 $Function: network_OPT_EDT_create 3626 $Function: network_OPT_EDT_create
3627 3627
3628 $Description: 3628 $Description:
3629 3629
3630 $Returns: 3630 $Returns:
3631 3631
3632 $Arguments: 3632 $Arguments:
3633 3633
3634 *******************************************************************************/ 3634 *******************************************************************************/
3635 static T_MFW_HND network_EDT_create(MfwHnd parent_window) 3635 static T_MFW_HND network_EDT_create(MfwHnd parent_window)
3636 { 3636 {
3637 T_network_OPT * data = (T_network_OPT *)ALLOC_MEMORY (sizeof (T_network_OPT)); 3637 T_network_OPT * data = (T_network_OPT *)ALLOC_MEMORY (sizeof (T_network_OPT));
3638 T_MFW_WIN * win; 3638 T_MFW_WIN * win;
3642 /* 3642 /*
3643 * Create window handler 3643 * Create window handler
3644 */ 3644 */
3645 3645
3646 data->win = win_create (parent_window, 0, 0, NULL); 3646 data->win = win_create (parent_window, 0, 0, NULL);
3647 3647
3648 if (data->win EQ NULL) 3648 if (data->win EQ NULL)
3649 { 3649 {
3650 return NULL; 3650 return NULL;
3651 } 3651 }
3652 3652
3653 /* 3653 /*
3654 * connect the dialog data to the MFW-window 3654 * connect the dialog data to the MFW-window
3655 */ 3655 */
3656 3656
3657 data->mmi_control.dialog = (T_DIALOG_FUNC)network_EDT_exec_cb; 3657 data->mmi_control.dialog = (T_DIALOG_FUNC)network_EDT_exec_cb;
3658 data->mmi_control.data = data; 3658 data->mmi_control.data = data;
3671 3671
3672 /******************************************************************************* 3672 /*******************************************************************************
3673 3673
3674 $Function: network_EDT_destroy 3674 $Function: network_EDT_destroy
3675 3675
3676 $Description: 3676 $Description:
3677 3677
3678 $Returns: 3678 $Returns:
3679 3679
3680 $Arguments: 3680 $Arguments:
3681 3681
3682 *******************************************************************************/ 3682 *******************************************************************************/
3683 static void network_EDT_destroy(MfwHnd own_window) 3683 static void network_EDT_destroy(MfwHnd own_window)
3684 { 3684 {
3685 T_MFW_WIN * win_data; 3685 T_MFW_WIN * win_data;
3686 T_network_OPT * data; 3686 T_network_OPT * data;
3695 3695
3696 if (data) 3696 if (data)
3697 { 3697 {
3698 /* 3698 /*
3699 * Delete WIN handler 3699 * Delete WIN handler
3700 */ 3700 */
3701 win_delete (data->win); 3701 win_delete (data->win);
3702 3702
3703 /* 3703 /*
3704 * Free Memory 3704 * Free Memory
3705 */ 3705 */
3706 FREE_MEMORY ((void *)data, sizeof (T_network_OPT)); 3706 FREE_MEMORY ((void *)data, sizeof (T_network_OPT));
3707 } 3707 }
3708 else 3708 else
3715 3715
3716 /******************************************************************************* 3716 /*******************************************************************************
3717 3717
3718 $Function: network_EDT_exec_cb 3718 $Function: network_EDT_exec_cb
3719 3719
3720 $Description: 3720 $Description:
3721 3721
3722 $Returns: 3722 $Returns:
3723 3723
3724 $Arguments: 3724 $Arguments:
3725 3725
3726 *******************************************************************************/ 3726 *******************************************************************************/
3727 void network_EDT_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter) 3727 void network_EDT_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter)
3728 { 3728 {
3729 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; 3729 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data;
3730 T_network_OPT * data = (T_network_OPT *)win_data->user; 3730 T_network_OPT * data = (T_network_OPT *)win_data->user;
3757 data->editor_info.editor_attr.font = 0; 3757 data->editor_info.editor_attr.font = 0;
3758 data->editor_info.editor_attr.mode = edtCurBar1; 3758 data->editor_info.editor_attr.mode = edtCurBar1;
3759 data->editor_info.editor_attr.controls = 0; 3759 data->editor_info.editor_attr.controls = 0;
3760 data->editor_info.editor_attr.text = data->buffer; /* buffer to be edited */ 3760 data->editor_info.editor_attr.text = data->buffer; /* buffer to be edited */
3761 data->editor_info.editor_attr.size = 6; 3761 data->editor_info.editor_attr.size = 6;
3762 data->editor_info.LeftSoftKey = TxtSoftOK; 3762 data->editor_info.LeftSoftKey = TxtSoftOK;
3763 data->editor_info.RightSoftKey = TxtDelete; 3763 data->editor_info.RightSoftKey = TxtDelete;
3764 data->editor_info.TextId = TxtMCCMNC; 3764 data->editor_info.TextId = TxtMCCMNC;
3765 data->editor_info.Identifier = value; /* optional */ 3765 data->editor_info.Identifier = value; /* optional */
3766 data->editor_info.mode = DIGITS_MODE; 3766 data->editor_info.mode = DIGITS_MODE;
3767 data->editor_info.Callback = (T_EDIT_CB)network_EDT_editor_cb; 3767 data->editor_info.Callback = (T_EDIT_CB)network_EDT_editor_cb;
3771 data->editor_info.TextString = NULL; 3771 data->editor_info.TextString = NULL;
3772 data->editor_info.min_enter = 5; 3772 data->editor_info.min_enter = 5;
3773 data->editor_info.timeout = FOREVER; 3773 data->editor_info.timeout = FOREVER;
3774 3774
3775 /* create the dialog handler */ 3775 /* create the dialog handler */
3776 editor_start(data->win, &data->editor_info); /* start the editor */ 3776 editor_start(data->win, &data->editor_info); /* start the editor */
3777 #endif /* NEW_EDITOR */ 3777 #endif /* NEW_EDITOR */
3778 3778
3779 3779
3780 break; 3780 break;
3781 case E_ABORT: 3781 case E_ABORT:
3782 case E_EXIT: /* defaultreaction */ 3782 case E_EXIT: /* defaultreaction */
3783 network_EDT_destroy(data->win); 3783 network_EDT_destroy(data->win);
3784 break; 3784 break;
3792 3792
3793 $Function: network_change_pref_plmn 3793 $Function: network_change_pref_plmn
3794 3794
3795 $Description: Populates the preffered plmn List. 3795 $Description: Populates the preffered plmn List.
3796 3796
3797 $Returns: 3797 $Returns:
3798 3798
3799 $Arguments: 3799 $Arguments:
3800 // xrashmic 10 Nov, 2004 MMI-SPR-OMAPS00044200-OMAPS00044851 3800 // xrashmic 10 Nov, 2004 MMI-SPR-OMAPS00044200-OMAPS00044851
3801 *******************************************************************************/ 3801 *******************************************************************************/
3802 void network_change_pref_plmn (T_MFW_HND win , USHORT identifier, UBYTE reason) 3802 void network_change_pref_plmn (T_MFW_HND win , USHORT identifier, UBYTE reason)
3803 { 3803 {
3804 3804
3805 nm_pref_plmn_list(network_data.pplmn, network_data.pplmn_mem.maxRcd, 1); 3805 nm_pref_plmn_list(network_data.pplmn, network_data.pplmn_mem.maxRcd, 1);
3806 3806
3807 } 3807 }
3808 /******************************************************************************* 3808 /*******************************************************************************
3809 3809
3810 $Function: network_EDT_editor_cb 3810 $Function: network_EDT_editor_cb
3811 3811
3812 $Description: 3812 $Description:
3813 3813
3814 $Returns: 3814 $Returns:
3815 3815
3816 $Arguments: 3816 $Arguments:
3817 3817
3818 *******************************************************************************/ 3818 *******************************************************************************/
3819 static void network_EDT_editor_cb (T_MFW_HND win, USHORT Identifier, USHORT event) 3819 static void network_EDT_editor_cb (T_MFW_HND win, USHORT Identifier, USHORT event)
3820 { 3820 {
3821 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; 3821 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data;
3822 T_network_OPT * data = (T_network_OPT *)win_data->user; 3822 T_network_OPT * data = (T_network_OPT *)win_data->user;
3829 l_parent = data->parent; 3829 l_parent = data->parent;
3830 3830
3831 switch(event) 3831 switch(event)
3832 { 3832 {
3833 case INFO_KCD_LEFT: 3833 case INFO_KCD_LEFT:
3834 3834
3835 mode = REPLACE_PREF_PLMN; /* Overwrite an existing entry at a given index */ 3835 mode = REPLACE_PREF_PLMN; /* Overwrite an existing entry at a given index */
3836 3836
3837 //update now the pref. PLMN list 3837 //update now the pref. PLMN list
3838 //Overwrite an existing entry 3838 //Overwrite an existing entry
3839 //(network_data.Listposition) "+1" because the zero is counted as well 3839 //(network_data.Listposition) "+1" because the zero is counted as well
3840 nm_change_pref_plmn(mode, (network_data.Listposition) +1 , 0, (UBYTE*) data->buffer); 3840 nm_change_pref_plmn(mode, (network_data.Listposition) +1 , 0, (UBYTE*) data->buffer);
3841 3841
3842 // destroy the Editor 3842 // destroy the Editor
3843 network_EDT_destroy(data->win); 3843 network_EDT_destroy(data->win);
3844 // xrashmic 10 Nov, 2004 MMI-SPR-OMAPS00044200-OMAPS00044851 3844 // xrashmic 10 Nov, 2004 MMI-SPR-OMAPS00044200-OMAPS00044851
3845 //Added this info screen so that sim is updated by nm_change_pref_plmn with the new code 3845 //Added this info screen so that sim is updated by nm_change_pref_plmn with the new code
3846 //before populating the new list with nm_pref_plmn_list 3846 //before populating the new list with nm_pref_plmn_list
3847 network_info_screen (win, TxtPleaseWait,(T_VOID_FUNC)network_change_pref_plmn); 3847 network_info_screen (win, TxtPleaseWait,(T_VOID_FUNC)network_change_pref_plmn);
3848 // destroy the MENU 3848 // destroy the MENU
3849 network_MNU_destroy(l_parent); 3849 network_MNU_destroy(l_parent);
3850 break; 3850 break;
3851 case INFO_KCD_RIGHT: 3851 case INFO_KCD_RIGHT:
3852 case INFO_KCD_HUP: 3852 case INFO_KCD_HUP:
3853 // destroy the Editor 3853 // destroy the Editor
3854 network_EDT_destroy(data->win); 3854 network_EDT_destroy(data->win);
3855 // destroy the MENU 3855 // destroy the MENU
3856 network_MNU_destroy(l_parent); 3856 network_MNU_destroy(l_parent);
3857 3857
3858 // Nov 02, 2005 REF: omaps00044855 Sumanth Kumar.C 3858 // Nov 02, 2005 REF: omaps00044855 Sumanth Kumar.C
3859 // Solution: Free network_data.pplmn. 3859 // Solution: Free network_data.pplmn.
3860 FREE_MEMORY ((UBYTE *)network_data.pplmn,(network_data.pplmn_mem.maxRcd) * sizeof (T_MFW_NETWORK_STRUCT)); 3860 FREE_MEMORY ((UBYTE *)network_data.pplmn,(network_data.pplmn_mem.maxRcd) * sizeof (T_MFW_NETWORK_STRUCT));
3861 3861
3862 break; 3862 break;
3863 default: 3863 default:
3864 break; 3864 break;
3865 } 3865 }
3866 return; 3866 return;
3870 /******************************************************************************* 3870 /*******************************************************************************
3871 3871
3872 $Function: nm_abort_network 3872 $Function: nm_abort_network
3873 3873
3874 $Description: remove the searhing window dialog 3874 $Description: remove the searhing window dialog
3875 3875
3876 $Returns: 3876 $Returns:
3877 3877
3878 $Arguments: 3878 $Arguments:
3879 3879
3880 *******************************************************************************/ 3880 *******************************************************************************/
3881 void nm_abort_network( void ) 3881 void nm_abort_network( void )
3882 { 3882 {
3883 TRACE_FUNCTION ("nm_abort_network()"); 3883 TRACE_FUNCTION ("nm_abort_network()");
3884 //destroy the searching window dialog 3884 //destroy the searching window dialog
3885 dialog_info_destroy (network_data.network_search_win); 3885 dialog_info_destroy (network_data.network_search_win);
3886 network_data.network_search_win = 0; 3886 network_data.network_search_win = 0;
3887 network_data.aborted = TRUE; 3887 network_data.aborted = TRUE;
3888 3888
3889 return; 3889 return;
3890 } 3890 }
3891 3891
3892 //x0012849: Jagannatha 01 June, 2006 ER: OMAPS00079607 -To Support AcC and Info numbers 3892 //x0012849: Jagannatha 01 June, 2006 ER: OMAPS00079607 -To Support AcC and Info numbers
3893 /******************************************************************************* 3893 /*******************************************************************************
3894 3894
3895 $Function: getRoamingStatus 3895 $Function: getRoamingStatus
3896 3896
3897 $Description: Returns the value of roaming_indicator. 3897 $Description: Returns the value of roaming_indicator.
3898 3898
3899 $Returns: TRUE or FALSE based on the roaming status. 3899 $Returns: TRUE or FALSE based on the roaming status.
3900 3900
3901 $Arguments: None. 3901 $Arguments: None.
3902 3902
3903 *******************************************************************************/ 3903 *******************************************************************************/
3904 #ifdef FF_CPHS 3904 #ifdef FF_CPHS
3905 UBYTE getRoamingStatus() 3905 UBYTE getRoamingStatus()
3906 { 3906 {
3907 3907
3908 return network_data.roaming_indicator; 3908 return network_data.roaming_indicator;
3909 } 3909 }
3910 #endif 3910 #endif
3911 3911
3912 // June 02, 2006 DR: OMAPS00078005 x0021334 3912 // June 02, 2006 DR: OMAPS00078005 x0021334
3913 // Descripton: Test for NITZ (Network Identity and Timezone) support - No New time was displayed 3913 // Descripton: Test for NITZ (Network Identity and Timezone) support - No New time was displayed
3914 /******************************************************************************* 3914 /*******************************************************************************
3915 3915
3916 $Function: nw_time_update_callback 3916 $Function: nw_time_update_callback
3917 3917
3918 $Description: Call back function for network time update info dialog. 3918 $Description: Call back function for network time update info dialog.
3919 3919
3920 $Returns: Result code 3920 $Returns: Result code
3921 3921
3922 $Arguments: 3922 $Arguments:
3923 3923
3924 *******************************************************************************/ 3924 *******************************************************************************/
3925 //Dec 13,2006 DR:OMAPS00098351 x0066814 - Added the FF_TIMEZONE flag 3925 //Dec 13,2006 DR:OMAPS00098351 x0066814 - Added the FF_TIMEZONE flag
3926 #ifdef FF_TIMEZONE 3926 #ifdef FF_TIMEZONE
3927 static int nw_time_update_callback(T_MFW_HND win, USHORT identifier, UBYTE reason) 3927 static int nw_time_update_callback(T_MFW_HND win, USHORT identifier, UBYTE reason)
3928 { 3928 {
3940 TRACE_EVENT("INFO_KCD_LEFT"); 3940 TRACE_EVENT("INFO_KCD_LEFT");
3941 3941
3942 // Update RTC with new time info 3942 // Update RTC with new time info
3943 mfw_td_set_time(&newTime); 3943 mfw_td_set_time(&newTime);
3944 3944
3945 // Update RTC with new date info 3945 // Update RTC with new date info
3946 mfw_td_set_date(&newDate); 3946 mfw_td_set_date(&newDate);
3947 3947
3948 // Send IDLE_UPDATE event to force idle screen refresh 3948 // Send IDLE_UPDATE event to force idle screen refresh
3949 SEND_EVENT(idle_get_window(), IDLE_UPDATE, 0, 0); 3949 SEND_EVENT(idle_get_window(), IDLE_UPDATE, 0, 0);
3950 break; 3950 break;
3951 3951
3952 case INFO_KCD_HUP: // Ignore offer of network time updation 3952 case INFO_KCD_HUP: // Ignore offer of network time updation
3953 TRACE_EVENT("INFO_KCD_HUP"); 3953 TRACE_EVENT("INFO_KCD_HUP");
3962 3962
3963 return res; 3963 return res;
3964 } 3964 }
3965 #endif 3965 #endif
3966 3966
3967 //Feb 28,,2007 DR:OMAPS00098351 x0066814 3967 //Feb 28,,2007 DR:OMAPS00098351 x0066814
3968 /******************************************************************************* 3968 /*******************************************************************************
3969 3969
3970 $Function: settingsNITZ 3970 $Function: settingsNITZ
3971 3971
3972 $Description: Settings the time update to On, Off or Automatic 3972 $Description: Settings the time update to On, Off or Automatic
3973 3973
3974 $Returns: 3974 $Returns:
3975 3975
3976 $Arguments: 3976 $Arguments:
3977 3977
3978 *******************************************************************************/ 3978 *******************************************************************************/
3979 #ifdef FF_TIMEZONE 3979 #ifdef FF_TIMEZONE
3980 int settingsNITZ (T_MFW_MNU *menu, T_MFW_MNU_ITEM *i) 3980 int settingsNITZ (T_MFW_MNU *menu, T_MFW_MNU_ITEM *i)
3981 { 3981 {
3982 3982