FreeCalypso > hg > fc-tourmaline
comparison src/ui/bmi/mmiCPHS.c @ 143:fbe284e160c1
mmiCPHS.c: bogotab fixes
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 16 Nov 2020 05:13:08 +0000 |
parents | c0052fe355d3 |
children |
comparison
equal
deleted
inserted
replaced
142:ec9f955fc487 | 143:fbe284e160c1 |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 | 2 |
3 CONDAT (UK) | 3 CONDAT (UK) |
4 | 4 |
5 ******************************************************************************** | 5 ******************************************************************************** |
6 | 6 |
7 This software product is the property of Condat (UK) Ltd and may not be | 7 This software product is the property of Condat (UK) Ltd and may not be |
8 disclosed to any third party without the express permission of the owner. | 8 disclosed to any third party without the express permission of the owner. |
9 | 9 |
10 ******************************************************************************** | 10 ******************************************************************************** |
11 | 11 |
12 $Project name: Basic MMI | 12 $Project name: Basic MMI |
13 $Project code: BMI (6349) | 13 $Project code: BMI (6349) |
14 $Module: CPHS | 14 $Module: CPHS |
15 $File: MmiCPHS.c | 15 $File: MmiCPHS.c |
16 $Revision: 1.0 | 16 $Revision: 1.0 |
17 | 17 |
18 $Author: Condat(UK) | 18 $Author: Condat(UK) |
19 $Date: 25/01/02 | 19 $Date: 25/01/02 |
20 | 20 |
21 ******************************************************************************** | 21 ******************************************************************************** |
22 | 22 |
23 Description | 23 Description |
24 | 24 |
25 This module provides the CPHS functionality | 25 This module provides the CPHS functionality |
26 | 26 |
27 | 27 |
28 ******************************************************************************** | 28 ******************************************************************************** |
29 $History: MmiCall.c | 29 $History: MmiCall.c |
30 Nov 27, 2006 OMAPS00098359 a0393213(R.Prabakar) | 30 Nov 27, 2006 OMAPS00098359 a0393213(R.Prabakar) |
31 Description: CPHS 4.2 : Call Divert doesn't work properly for Line 2 | 31 Description: CPHS 4.2 : Call Divert doesn't work properly for Line 2 |
32 | 32 |
33 Oct 11, 2006 REF:OMAPS00098287 x0039928 | 33 Oct 11, 2006 REF:OMAPS00098287 x0039928 |
34 Description : CPHS 4.2: MMI variable als_status is not updated proplery with the SIM contents. | 34 Description : CPHS 4.2: MMI variable als_status is not updated proplery with the SIM contents. |
35 Solution : als_status update is deffered until the idle screen is displayed. | 35 Solution : als_status update is deffered until the idle screen is displayed. |
36 | 36 |
37 May 30, 2006 REF:OMAPS00079650 a0393213 (R.Prabakar) | 37 May 30, 2006 REF:OMAPS00079650 a0393213 (R.Prabakar) |
38 Description : CPHS Call Forwarding feature implementation | 38 Description : CPHS Call Forwarding feature implementation |
39 Solution : As part of this implementation, E_CPHS_SET_DV_STAT and E_CPHS_GET_DV_STAT in cphs_mfw_cb() | 39 Solution : As part of this implementation, E_CPHS_SET_DV_STAT and E_CPHS_GET_DV_STAT in cphs_mfw_cb() |
40 are modified | 40 are modified |
41 | 41 |
42 May 26, 2006 ER: OMAPS00079607 x0012849 :Jagannatha M | 42 May 26, 2006 ER: OMAPS00079607 x0012849 :Jagannatha M |
43 Description: CPHS: Display 'charge/Timers' menu based on AOC ( Advice of charge ) and support info numbers. | 43 Description: CPHS: Display 'charge/Timers' menu based on AOC ( Advice of charge ) and support info numbers. |
44 Solution:Made the following changes | 44 Solution:Made the following changes |
45 1. Aoc_flag variable is defined and it will be set based on the CSP information. | 45 1. Aoc_flag variable is defined and it will be set based on the CSP information. |
46 2. New function info_num_msg_cb() added to support info numbers. | 46 2. New function info_num_msg_cb() added to support info numbers. |
47 | 47 |
48 May 30, 2006 DR: OMAPS00070657 x0pleela | 48 May 30, 2006 DR: OMAPS00070657 x0pleela |
49 Description: CPHS feature on Locosto-Lite | 49 Description: CPHS feature on Locosto-Lite |
50 Solution: For ALS feature, | 50 Solution: For ALS feature, |
51 a) Defined a new macro "MAX_LINE_NAME_LEN" | 51 a) Defined a new macro "MAX_LINE_NAME_LEN" |
52 b) Defined new structure "T_ALS_DATA" for editing Line 1 and 2 names | 52 b) Defined new structure "T_ALS_DATA" for editing Line 1 and 2 names |
53 c) Defined new flag "Als_flag" to store the staus of ALS bit from CSP data | 53 c) Defined new flag "Als_flag" to store the staus of ALS bit from CSP data |
54 d) Added new functions cphs_Line_Edit_cb(), cphs_edit_line_exec_cb(), | 54 d) Added new functions cphs_Line_Edit_cb(), cphs_edit_line_exec_cb(), |
55 cphs_edit_line_create(), cphs_edit_line1(), cphs_edit_line2(), | 55 cphs_edit_line_create(), cphs_edit_line1(), cphs_edit_line2(), |
56 mmi_cphs_get_als_info(), mmi_cphs_get_als_info(), mmi_cphs_set_als_value(), | 56 mmi_cphs_get_als_info(), mmi_cphs_get_als_info(), mmi_cphs_set_als_value(), |
57 mmi_cphs_get_als_value(), mmi_get_als_selectedLine() | 57 mmi_cphs_get_als_value(), mmi_get_als_selectedLine() |
58 | 58 |
59 Jun 14, 2005 REF: MMI-FIX-30439 x0018858 | 59 Jun 14, 2005 REF: MMI-FIX-30439 x0018858 |
60 Description: The homezone/cityzone tags were not being displayed properly. | 60 Description: The homezone/cityzone tags were not being displayed properly. |
61 Solution: Modified to save the tags properly in caches and also made the | 61 Solution: Modified to save the tags properly in caches and also made the |
62 appropriate modifications to update the same properly during mobility. | 62 appropriate modifications to update the same properly during mobility. |
63 | 63 |
64 Aug 16, 2004 REF: CRR 24323 Deepa M.D | 64 Aug 16, 2004 REF: CRR 24323 Deepa M.D |
65 Bug:Clenup of sprintf used for tracing | 65 Bug:Clenup of sprintf used for tracing |
66 Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX | 66 Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX |
67 | 67 |
68 Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) | 68 Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) |
69 Solution: The CF state is maintained in flash. During bootup the CF icon in the idle screen | 69 Solution: The CF state is maintained in flash. During bootup the CF icon in the idle screen |
70 is displayed depending upon its state in the ffs | 70 is displayed depending upon its state in the ffs |
71 | 71 |
72 | 72 |
73 // May 31, 2004 REF: CRR 17291 xvilliva | 73 // May 31, 2004 REF: CRR 17291 xvilliva |
74 // Bug: After power cycle the setting of the used line which have been made | 74 // Bug: After power cycle the setting of the used line which have been made |
75 // from the BMI is lost. | 75 // from the BMI is lost. |
76 // Fix: 1.The global g_pin2 is defined here. | 76 // Fix: 1.The global g_pin2 is defined here. |
77 // 2. sAT_PlusCLCK() is called while locking and unlocking ALS. | 77 // 2. sAT_PlusCLCK() is called while locking and unlocking ALS. |
78 // 3. ALSPresent() is modified to call tAT_PercentALS() & qAT_PercentALS(). | 78 // 3. ALSPresent() is modified to call tAT_PercentALS() & qAT_PercentALS(). |
79 // NOTE:- ALSPresent() was giving faulty status earlier. | 79 // NOTE:- ALSPresent() was giving faulty status earlier. |
80 | 80 |
81 | 81 |
82 25/01/02 Original Condat(UK) BMI version. (MC) | 82 25/01/02 Original Condat(UK) BMI version. (MC) |
83 | 83 |
84 $End | 84 $End |
85 | 85 |
86 *******************************************************************************/ | 86 *******************************************************************************/ |
87 | 87 |
88 | 88 |
89 /****************************************************************************** | 89 /****************************************************************************** |
90 | 90 |
91 Include Files | 91 Include Files |
92 | 92 |
93 *******************************************************************************/ | 93 *******************************************************************************/ |
94 | 94 |
95 /* includes */ | 95 /* includes */ |
96 #include <string.h> | 96 #include <string.h> |
178 #ifdef FF_CPHS | 178 #ifdef FF_CPHS |
179 #include "MmiNetwork.h" | 179 #include "MmiNetwork.h" |
180 #endif | 180 #endif |
181 | 181 |
182 | 182 |
183 | |
184 /****************************************************************************** | 183 /****************************************************************************** |
185 | 184 |
186 Definitions | 185 Definitions |
187 | 186 |
188 *******************************************************************************/ | 187 *******************************************************************************/ |
189 //#define CPHS_PROV_TEST /*Test to bypass the reading of the CPHS field from the SIM card*/ | 188 //#define CPHS_PROV_TEST /*Test to bypass the reading of the CPHS field from the SIM card*/ |
190 char g_pin2[MAX_PIN+1];//xvilliva SPR17291 | 189 char g_pin2[MAX_PIN+1];//xvilliva SPR17291 |
191 | 190 |
192 typedef enum | 191 typedef enum |
193 | 192 { |
194 | 193 INFO_NUM_LIST, |
195 { | 194 MAILBOX_LIST, |
196 INFO_NUM_LIST, | 195 MAILBOX_LIST_CALL |
197 MAILBOX_LIST, | 196 } |
198 MAILBOX_LIST_CALL | 197 T_MENU_TYPE; |
199 } | |
200 T_MENU_TYPE; | |
201 | 198 |
202 | 199 |
203 static MfwMnuAttr InfoNum_menuAttrib = | 200 static MfwMnuAttr InfoNum_menuAttrib = |
204 { | 201 { |
205 &melody_menuArea, | 202 &melody_menuArea, |
206 MNU_LEFT | MNU_LIST | MNU_CUR_LINE, /* centered page menu */ | 203 MNU_LEFT | MNU_LIST | MNU_CUR_LINE, /* centered page menu */ |
207 (U8)-1, /* use default font */ | 204 (U8)-1, /* use default font */ |
208 NULL, /* with these items */ | 205 NULL, /* with these items */ |
209 0, /* number of items */ | 206 0, /* number of items */ |
210 COLOUR_LIST_XX, TxtNull, NULL, MNUATTRSPARE | 207 COLOUR_LIST_XX, TxtNull, NULL, MNUATTRSPARE |
211 | |
212 }; | 208 }; |
213 | 209 |
214 typedef struct | 210 typedef struct |
215 { | 211 { |
216 /* administrative data */ | 212 /* administrative data */ |
217 | 213 |
218 T_MMI_CONTROL mmi_control; | 214 T_MMI_CONTROL mmi_control; |
219 T_MFW_HND win; | 215 T_MFW_HND win; |
220 T_MFW_HND parent_win; | 216 T_MFW_HND parent_win; |
221 #ifdef NEW_EDITOR | 217 #ifdef NEW_EDITOR |
222 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ | 218 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ |
223 #else /* NEW_EDITOR */ | 219 #else /* NEW_EDITOR */ |
224 T_EDITOR_DATA editor_data; | 220 T_EDITOR_DATA editor_data; |
225 #endif /* NEW_EDITOR */ | 221 #endif /* NEW_EDITOR */ |
226 | 222 |
227 /* associated handlers */ | 223 /* associated handlers */ |
228 | 224 |
229 T_MFW_HND kbd; | 225 T_MFW_HND kbd; |
230 T_MFW_HND kbd_long; | 226 T_MFW_HND kbd_long; |
231 T_MFW_HND menu; | 227 T_MFW_HND menu; |
232 T_MFW_HND menu_tim; | 228 T_MFW_HND menu_tim; |
233 UBYTE status_of_timer; /* use for the keypadlock */ | 229 UBYTE status_of_timer; /* use for the keypadlock */ |
234 | 230 |
235 T_MFW_HND mailbox_win; | 231 T_MFW_HND mailbox_win; |
236 T_MFW_CPHS_ENTRY cphs_voicemail_num; | 232 T_MFW_CPHS_ENTRY cphs_voicemail_num; |
237 T_MFW_CPHS_VC_STAT* cphs_voicemail_status; | 233 T_MFW_CPHS_VC_STAT* cphs_voicemail_status; |
238 T_MFW_CPHS_STATUS cphs_status; | 234 T_MFW_CPHS_STATUS cphs_status; |
239 T_MFW_CPHS_OP_NAME* operator_name; | 235 T_MFW_CPHS_OP_NAME* operator_name; |
240 | 236 |
241 } T_MMI_CPHS_DATA; | 237 } T_MMI_CPHS_DATA; |
242 | 238 |
243 | 239 |
244 typedef struct | 240 typedef struct |
245 { | 241 { |
246 T_MMI_CONTROL mmi_control; | 242 T_MMI_CONTROL mmi_control; |
247 T_MFW_HND numbers_win; /* MFW win handler */ | 243 T_MFW_HND numbers_win; /* MFW win handler */ |
248 T_MFW_HND parent; | 244 T_MFW_HND parent; |
249 T_MFW_HND melody_handler; /* MFW sms handler */ | 245 T_MFW_HND melody_handler; /* MFW sms handler */ |
250 unsigned char local_status; | 246 unsigned char local_status; |
251 ListMenuData * menu_list_data; | 247 ListMenuData * menu_list_data; |
252 } T_INFO_NUM_INFO; | 248 } T_INFO_NUM_INFO; |
253 | 249 |
254 #ifdef FF_CPHS_REL4 | 250 #ifdef FF_CPHS_REL4 |
255 typedef struct | 251 typedef struct |
256 { | 252 { |
257 T_MMI_CONTROL mmi_control; | 253 T_MMI_CONTROL mmi_control; |
258 T_MFW_HND msp_win; /* MFW win handler */ | 254 T_MFW_HND msp_win; /* MFW win handler */ |
259 T_MFW_HND parent; | 255 T_MFW_HND parent; |
260 ListMenuData * menu_list_data; | 256 ListMenuData * menu_list_data; |
261 } T_MSP_INFO; | 257 } T_MSP_INFO; |
262 | 258 |
263 typedef struct | 259 typedef struct |
264 { | 260 { |
265 T_MMI_CONTROL mmi_control; | 261 T_MMI_CONTROL mmi_control; |
266 T_MFW_HND mwis_win; /* MFW win handler */ | 262 T_MFW_HND mwis_win; /* MFW win handler */ |
267 T_MFW_HND parent; | 263 T_MFW_HND parent; |
268 ListMenuData * menu_list_data; | 264 ListMenuData * menu_list_data; |
269 } T_MWIS_INFO; | 265 } T_MWIS_INFO; |
270 | 266 |
271 #endif | 267 #endif |
272 | 268 |
273 //x0pleela 23 May, 2006 DR: OMAPS00070657 | 269 //x0pleela 23 May, 2006 DR: OMAPS00070657 |
274 #ifdef FF_CPHS | 270 #ifdef FF_CPHS |
275 #define MAX_LINE_NAME_LEN (20+1) | 271 #define MAX_LINE_NAME_LEN (20+1) |
276 | 272 |
277 typedef struct | 273 typedef struct |
278 { | 274 { |
279 /* administrative data */ | 275 /* administrative data */ |
280 | 276 |
281 T_MMI_CONTROL mmi_control; | 277 T_MMI_CONTROL mmi_control; |
282 T_MFW_HND win; | 278 T_MFW_HND win; |
283 T_MFW_HND parent_win; | 279 T_MFW_HND parent_win; |
284 T_MFW_HND input_number_win; | 280 T_MFW_HND input_number_win; |
285 #ifndef NEW_EDITOR | 281 #ifndef NEW_EDITOR |
286 MfwEdtAttr edt_attr_name; | 282 MfwEdtAttr edt_attr_name; |
287 #endif /* NEW_EDITOR */ | 283 #endif /* NEW_EDITOR */ |
288 UBYTE edt_buf_name[MAX_LINE_NAME_LEN]; | 284 UBYTE edt_buf_name[MAX_LINE_NAME_LEN]; |
289 } T_ALS_DATA; | 285 } T_ALS_DATA; |
290 | 286 |
291 | |
292 #endif | 287 #endif |
293 | 288 |
294 #define E_INIT 1 | 289 #define E_INIT 1 |
295 | 290 |
296 | 291 |
297 | 292 #define CPHS_TELESERVICES_BYTE_VALUE 0x06 |
298 #define CPHS_TELESERVICES_BYTE_VALUE 0x06 | 293 #define ALS_MASK 0x80 |
299 #define ALS_MASK 0x80 | 294 |
300 | 295 #define CPHS_INFONUMS_BYTE_VALUE 0xC0 |
301 #define CPHS_INFONUMS_BYTE_VALUE 0xC0 | 296 #define INFONUM_MASK 0xFF |
302 #define INFONUM_MASK 0xFF | |
303 | 297 |
304 //x0pleela 23 May, 2006 DR: OMAPS00070657 | 298 //x0pleela 23 May, 2006 DR: OMAPS00070657 |
305 #ifdef FF_CPHS | 299 #ifdef FF_CPHS |
306 static UBYTE Als_flag; //Stores the status of ALS from CSP data | 300 static UBYTE Als_flag; //Stores the status of ALS from CSP data |
307 #endif | 301 #endif |
315 T_MFW_CPHS_MSP_INFO* msp_info; | 309 T_MFW_CPHS_MSP_INFO* msp_info; |
316 BOOL mwis_flag = FALSE; | 310 BOOL mwis_flag = FALSE; |
317 #endif | 311 #endif |
318 | 312 |
319 | 313 |
320 | |
321 | |
322 /****************************************************************************** | 314 /****************************************************************************** |
323 | 315 |
324 Static Global variables | 316 Static Global variables |
325 | 317 |
326 *******************************************************************************/ | 318 *******************************************************************************/ |
327 | 319 |
328 static T_MFW_HND cphs_wait_dialog_win = NULL; | 320 static T_MFW_HND cphs_wait_dialog_win = NULL; |
329 static T_DISPLAY_DATA mmi_cphs_wait_dialog_data = {0}; | 321 static T_DISPLAY_DATA mmi_cphs_wait_dialog_data = {0}; |
330 static T_MFW_CPHS_ENTRY cphs_voicemail_num; | 322 static T_MFW_CPHS_ENTRY cphs_voicemail_num; |
331 static T_MFW_CPHS_INFONUM_ENTRY current_info_num; | 323 static T_MFW_CPHS_INFONUM_ENTRY current_info_num; |
332 static T_MFW_CPHS_VC_NUM cphs_voicemail_numbers; | 324 static T_MFW_CPHS_VC_NUM cphs_voicemail_numbers; |
333 static T_MFW_CPHS_VC_STAT* cphs_voicemail_status; | 325 static T_MFW_CPHS_VC_STAT* cphs_voicemail_status; |
334 static T_MFW_CPHS_STATUS cphs_status = CPHS_NotPresent; | 326 static T_MFW_CPHS_STATUS cphs_status = CPHS_NotPresent; |
352 | 344 |
353 static T_MENU_TYPE type_of_list = INFO_NUM_LIST; | 345 static T_MENU_TYPE type_of_list = INFO_NUM_LIST; |
354 | 346 |
355 /****************************************************************************** | 347 /****************************************************************************** |
356 | 348 |
357 Function Prototypes | 349 Function Prototypes |
358 | 350 |
359 *******************************************************************************/ | 351 *******************************************************************************/ |
360 int InfoNumbers2(void); // RAVI | 352 int InfoNumbers2(void); // RAVI |
361 | 353 |
362 int show_cphs_mb_number(T_MFW_CPHS_ENTRY* mb_number); | 354 int show_cphs_mb_number(T_MFW_CPHS_ENTRY* mb_number); |
366 static int msp_cb (T_MFW_EVENT event, T_MFW_WIN * win); | 358 static int msp_cb (T_MFW_EVENT event, T_MFW_WIN * win); |
367 #endif | 359 #endif |
368 int cphs_mfw_cb(T_MFW_EVENT event, void* para); | 360 int cphs_mfw_cb(T_MFW_EVENT event, void* para); |
369 void cphs_dialog_cb(T_MFW_HND win, USHORT e, SHORT identifier, void *parameter); | 361 void cphs_dialog_cb(T_MFW_HND win, USHORT e, SHORT identifier, void *parameter); |
370 T_MFW_HND mmi_cphs_create(T_MFW_HND parent_window); | 362 T_MFW_HND mmi_cphs_create(T_MFW_HND parent_window); |
371 T_MFW_HND edit_mailbox_start(T_MFW_HND parent_window); | 363 T_MFW_HND edit_mailbox_start(T_MFW_HND parent_window); |
372 | 364 |
373 static T_MFW_HND buildInfoNumberMenu( MfwHnd parent_window); | 365 static T_MFW_HND buildInfoNumberMenu( MfwHnd parent_window); |
374 void info_num_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter); | 366 void info_num_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter); |
375 void InfonumList_cb(T_MFW_HND * Parent, ListMenuData * ListData); | 367 void InfonumList_cb(T_MFW_HND * Parent, ListMenuData * ListData); |
376 static void InfoNum_destroy(MfwHnd own_window); | 368 static void InfoNum_destroy(MfwHnd own_window); |
385 /* x0045876, 14-Aug-2006 (WR - function declared implicitly)*/ | 377 /* x0045876, 14-Aug-2006 (WR - function declared implicitly)*/ |
386 EXTERN void setAOCflag(int aocValue); | 378 EXTERN void setAOCflag(int aocValue); |
387 #endif | 379 #endif |
388 | 380 |
389 | 381 |
390 | |
391 | |
392 /****************************************************************************** | 382 /****************************************************************************** |
393 | 383 |
394 Public functions | 384 Public functions |
395 | 385 |
396 *******************************************************************************/ | 386 *******************************************************************************/ |
397 /******************************************************************************* | 387 /******************************************************************************* |
398 | 388 |
399 $Function: mmi_cphs_init() | 389 $Function: mmi_cphs_init() |
400 | 390 |
401 $Description: initiatialise cphs module | 391 $Description: initiatialise cphs module |
402 | 392 |
403 $Returns: mfw handle | 393 $Returns: mfw handle |
404 | 394 |
405 $Arguments: none | 395 $Arguments: none |
406 | 396 |
407 *******************************************************************************/ | 397 *******************************************************************************/ |
408 T_MFW_HND mmi_cphs_init() | 398 T_MFW_HND mmi_cphs_init() |
409 { | 399 { |
410 T_MFW_HND status; | 400 T_MFW_HND status; |
411 | 401 |
412 TRACE_FUNCTION("mmi_cphs_init()"); | 402 TRACE_FUNCTION("mmi_cphs_init()"); |
413 cphs_init(); //initialise MFW CPHS module | 403 cphs_init(); //initialise MFW CPHS module |
414 | 404 |
415 status = cphs_create(NULL, 0xFFFFF, cphs_mfw_cb); //create handler for MFW CPHS EVENTS | 405 status = cphs_create(NULL, 0xFFFFF, cphs_mfw_cb); //create handler for MFW CPHS EVENTS |
416 | 406 |
417 info_num_level = 0; | 407 info_num_level = 0; |
418 info_num_index = 1; | 408 info_num_index = 1; |
419 | 409 |
420 | 410 |
421 #ifndef FF_CPHS_REL4 | 411 #ifndef FF_CPHS_REL4 |
422 #ifdef FF_CPHS | 412 #ifdef FF_CPHS |
423 // Oct 11, 2006 REF:OMAPS00098287 x0039928 | 413 // Oct 11, 2006 REF:OMAPS00098287 x0039928 |
424 // Fix: als update is done in idle_draw_main_idle | 414 // Fix: als update is done in idle_draw_main_idle |
425 // mmi_cphs_get_als_info(); | 415 // mmi_cphs_get_als_info(); |
426 als_bootup = TRUE; | 416 als_bootup = TRUE; |
427 #else | 417 #else |
428 cphs_get_als_info(&als_status); | 418 cphs_get_als_info(&als_status); |
429 #endif | 419 #endif |
430 #endif | 420 #endif |
431 | 421 |
432 return status; | 422 return status; |
433 } | 423 } |
434 | 424 |
435 void mmi_cphs_refresh() | 425 void mmi_cphs_refresh() |
436 { | 426 { |
437 //x0pleela 02 June, 2006 DR: OMAPS00079688 | 427 //x0pleela 02 June, 2006 DR: OMAPS00079688 |
438 //Initialising CPHS | 428 //Initialising CPHS |
439 #ifdef FF_CPHS | 429 #ifdef FF_CPHS |
440 if (sAT_PercentCPHS(CMD_SRC_LCL,1) /* 1 => ACI_CPHS_INIT */ | 430 if (sAT_PercentCPHS(CMD_SRC_LCL,1) /* 1 => ACI_CPHS_INIT */ |
441 NEQ AT_EXCT) | 431 NEQ AT_EXCT) |
442 { | 432 { |
443 TRACE_ERROR("Abnormal error Not able to turn on CPHS in ACI"); | 433 TRACE_ERROR("Abnormal error Not able to turn on CPHS in ACI"); |
444 } | 434 } |
445 #endif | 435 #endif |
446 cphs_support_check(); //check if cphs supported | 436 cphs_support_check(); //check if cphs supported |
447 /*retrieval of other values set off by callback function cphs_mfw_cb | 437 /*retrieval of other values set off by callback function cphs_mfw_cb |
448 so when the CPHS status is retrieved, the operator name is then requested and | 438 so when the CPHS status is retrieved, the operator name is then requested and |
449 when it has returned, then the CSP is requested etc etec */ | 439 when it has returned, then the CSP is requested etc etec */ |
450 | 440 |
451 } | 441 } |
452 /******************************************************************************* | 442 /******************************************************************************* |
453 | 443 |
454 $Function: cphs_E_plus_ALS_supported | 444 $Function: cphs_E_plus_ALS_supported |
455 | 445 |
456 $Description: returns TRUE if SIM is from E-plus, FALSE otherwise | 446 $Description: returns TRUE if SIM is from E-plus, FALSE otherwise |
457 | 447 |
458 $Returns: status BOOL | 448 $Returns: status BOOL |
459 | 449 |
460 $Arguments: none | 450 $Arguments: none |
461 | 451 |
462 *******************************************************************************/ | 452 *******************************************************************************/ |
463 BOOL cphs_E_plus_ALS_supported() | 453 BOOL cphs_E_plus_ALS_supported() |
464 { char IMSI[17]; | 454 { char IMSI[17]; |
465 char MNC_MCC[6]; | 455 char MNC_MCC[6]; |
466 char E_plus_MNC_MCC[] = "26203"; | 456 char E_plus_MNC_MCC[] = "26203"; |
467 int i=0; | 457 int i=0; |
468 T_ACI_RETURN result; | 458 T_ACI_RETURN result; |
469 // char debug[40]; // RAVI | 459 // char debug[40]; // RAVI |
470 | 460 |
471 result = qAT_PlusCIMI(CMD_SRC_LCL, IMSI); | 461 result = qAT_PlusCIMI(CMD_SRC_LCL, IMSI); |
472 while (result != AT_CMPL && i < 5) | 462 while (result != AT_CMPL && i < 5) |
473 { | 463 { |
474 i++; | 464 i++; |
475 } | 465 } |
476 | 466 |
477 strncpy(MNC_MCC, IMSI, 5); | 467 strncpy(MNC_MCC, IMSI, 5); |
478 MNC_MCC[5] =0;//terminate string | 468 MNC_MCC[5] =0;//terminate string |
479 TRACE_EVENT("E-plus IMSI?"); | 469 TRACE_EVENT("E-plus IMSI?"); |
480 TRACE_EVENT(MNC_MCC); | 470 TRACE_EVENT(MNC_MCC); |
481 if (!strncmp(E_plus_MNC_MCC, MNC_MCC, 5)) //if e-plus IMSI | 471 if (!strncmp(E_plus_MNC_MCC, MNC_MCC, 5)) //if e-plus IMSI |
482 { | 472 { |
483 return TRUE; | 473 return TRUE; |
484 | 474 |
485 } | 475 } |
486 else | 476 else |
487 { TRACE_EVENT("Not e-plus IMSI"); | 477 { TRACE_EVENT("Not e-plus IMSI"); |
488 return FALSE; | 478 return FALSE; |
489 } | 479 } |
490 | 480 |
491 } | 481 } |
492 /******************************************************************************* | 482 /******************************************************************************* |
493 | 483 |
494 $Function: cphs_als_status | 484 $Function: cphs_als_status |
495 | 485 |
496 $Description: display which ALS line is enabled | 486 $Description: display which ALS line is enabled |
497 | 487 |
498 $Returns: status int | 488 $Returns: status int |
499 | 489 |
500 $Arguments: menu, tag (not used) | 490 $Arguments: menu, tag (not used) |
501 | 491 |
502 *******************************************************************************/ | 492 *******************************************************************************/ |
503 int cphs_als_status(MfwMnu* m, MfwMnuItem* i) | 493 int cphs_als_status(MfwMnu* m, MfwMnuItem* i) |
504 { T_MFW_HND parent = mfwParent( mfw_header()); | 494 { T_MFW_HND parent = mfwParent( mfw_header()); |
505 UBYTE line; | 495 UBYTE line; |
506 line = GetAlsLine(); | 496 line = GetAlsLine(); |
507 #ifndef CPHS_PROV_TEST | 497 #ifndef CPHS_PROV_TEST |
508 if (CphsPresent() == TRUE || cphs_E_plus_ALS_supported()) | 498 if (CphsPresent() == TRUE || cphs_E_plus_ALS_supported()) |
509 #endif | 499 #endif |
510 { | 500 { |
511 if (als_status.selectedLine != MFW_SERV_NotPresent) | 501 if (als_status.selectedLine != MFW_SERV_NotPresent) |
512 switch(line) | 502 switch(line) |
513 { | 503 { |
514 case (MFW_SERV_LINE1): ShowMessage(parent, TxtLine1, TxtActivated);break; | 504 case (MFW_SERV_LINE1): ShowMessage(parent, TxtLine1, TxtActivated);break; |
515 case (MFW_SERV_LINE2): ShowMessage(parent, TxtLine2, TxtActivated);break; | 505 case (MFW_SERV_LINE2): ShowMessage(parent, TxtLine2, TxtActivated);break; |
516 default: ShowMessage(parent, TxtReadError, TxtNull);break; | 506 default: ShowMessage(parent, TxtReadError, TxtNull);break; |
517 } | 507 } |
518 else | 508 else |
519 ShowMessage(parent, TxtReadError, TxtNull); | 509 ShowMessage(parent, TxtReadError, TxtNull); |
520 } | 510 } |
521 #ifndef CPHS_PROV_TEST | 511 #ifndef CPHS_PROV_TEST |
522 else | 512 else |
523 ShowMessage(parent, TxtNotSupported, TxtNull); | 513 ShowMessage(parent, TxtNotSupported, TxtNull); |
524 #else | 514 #else |
525 cphs_support_check(); | 515 cphs_support_check(); |
526 #endif | 516 #endif |
527 | 517 |
528 return MFW_EVENT_CONSUMED; | 518 return MFW_EVENT_CONSUMED; |
529 } | 519 } |
530 | 520 |
531 /******************************************************************************* | 521 /******************************************************************************* |
532 | 522 |
533 $Function: cphs_lock_als | 523 $Function: cphs_lock_als |
534 | 524 |
535 $Description: Lock ALS Line Selection from menu | 525 $Description: Lock ALS Line Selection from menu |
536 | 526 |
537 $Returns: status int | 527 $Returns: status int |
538 | 528 |
539 $Arguments: menu, tag (not used) | 529 $Arguments: menu, tag (not used) |
540 | 530 |
541 *******************************************************************************/ | 531 *******************************************************************************/ |
542 int cphs_lock_als(MfwMnu* m, MfwMnuItem* i) | 532 int cphs_lock_als(MfwMnu* m, MfwMnuItem* i) |
543 { | 533 { |
544 T_MFW_HND parent = mfwParent( mfw_header()); | 534 T_MFW_HND parent = mfwParent( mfw_header()); |
545 T_MFW retVal; | 535 T_MFW retVal; |
546 | 536 |
547 TRACE_FUNCTION("cphs_lock_als"); | 537 TRACE_FUNCTION("cphs_lock_als"); |
548 | 538 |
549 #ifndef CPHS_PROV_TEST | 539 #ifndef CPHS_PROV_TEST |
550 if (!ALSPresent(NULL, NULL, NULL)) | 540 if (!ALSPresent(NULL, NULL, NULL)) |
551 #endif | 541 #endif |
552 { | 542 { |
553 //xvilliva SPR17291 | 543 //xvilliva SPR17291 |
554 //We call sAT_PlusCLCK(), to update the value in FFS. This is the value used by | 544 //We call sAT_PlusCLCK(), to update the value in FFS. This is the value used by |
555 //ACI to estabilish a call on Line1 or Line2. | 545 //ACI to estabilish a call on Line1 or Line2. |
556 #ifndef FF_2TO1_PS | 546 #ifndef FF_2TO1_PS |
557 /*a0393213 warnings removal - CLCK_FAC_Al changed to FAC_Al as a result of ACI enum change*/ | 547 /*a0393213 warnings removal - CLCK_FAC_Al changed to FAC_Al as a result of ACI enum change*/ |
558 sAT_PlusCLCK(CMD_SRC_LCL,FAC_Al,CLCK_MOD_Lock,g_pin2, | 548 sAT_PlusCLCK(CMD_SRC_LCL,FAC_Al,CLCK_MOD_Lock,g_pin2, |
559 ((als_status.selectedLine == MFW_SERV_LINE1) ? CLASS_Vce : CLASS_AuxVce));// | 549 ((als_status.selectedLine == MFW_SERV_LINE1) ? CLASS_Vce : CLASS_AuxVce));// |
560 #endif | 550 #endif |
561 retVal = cphs_set_als_status(MFW_LINE_LOCKED); | 551 retVal = cphs_set_als_status(MFW_LINE_LOCKED); |
562 //x0pleela 11 June, 2006 DR:OMAPS00079692 | 552 //x0pleela 11 June, 2006 DR:OMAPS00079692 |
563 //changed from CPHS_OK to MFW_CPHS_OK | 553 //changed from CPHS_OK to MFW_CPHS_OK |
564 if (retVal == MFW_CPHS_OK) | 554 if (retVal == MFW_CPHS_OK) |
565 { | 555 { |
566 als_status.status = MFW_LINE_LOCKED; | 556 als_status.status = MFW_LINE_LOCKED; |
567 ShowMessage(parent, TxtAlsLocked, TxtNull); | 557 ShowMessage(parent, TxtAlsLocked, TxtNull); |
568 } | 558 } |
569 } | 559 } |
570 #ifndef CPHS_PROV_TEST | 560 #ifndef CPHS_PROV_TEST |
571 else | 561 else |
572 ShowMessage(parent, TxtNotSupported, TxtNull); | 562 ShowMessage(parent, TxtNotSupported, TxtNull); |
573 #endif | 563 #endif |
574 | 564 |
575 return MFW_EVENT_CONSUMED; | 565 return MFW_EVENT_CONSUMED; |
576 } | 566 } |
577 | 567 |
578 /******************************************************************************* | 568 /******************************************************************************* |
579 | 569 |
580 $Function: cphs_unlock_als | 570 $Function: cphs_unlock_als |
581 | 571 |
582 $Description: Unlock ALS Line Selection from menu | 572 $Description: Unlock ALS Line Selection from menu |
583 | 573 |
584 $Returns: status int | 574 $Returns: status int |
585 | 575 |
586 $Arguments: menu, tag (not used) | 576 $Arguments: menu, tag (not used) |
587 | 577 |
588 *******************************************************************************/ | 578 *******************************************************************************/ |
589 int cphs_unlock_als(MfwMnu* m, MfwMnuItem* i) | 579 int cphs_unlock_als(MfwMnu* m, MfwMnuItem* i) |
590 { | 580 { |
591 T_MFW_HND parent = mfwParent( mfw_header()); | 581 T_MFW_HND parent = mfwParent( mfw_header()); |
592 T_MFW retVal; | 582 T_MFW retVal; |
593 | 583 |
594 TRACE_FUNCTION("cphs_unlock_als"); | 584 TRACE_FUNCTION("cphs_unlock_als"); |
595 | 585 |
596 #ifndef CPHS_PROV_TEST | 586 #ifndef CPHS_PROV_TEST |
597 if (!ALSPresent(NULL, NULL, NULL)) | 587 if (!ALSPresent(NULL, NULL, NULL)) |
598 #endif | 588 #endif |
599 { | 589 { |
600 //xvilliva SPR17291 | 590 //xvilliva SPR17291 |
601 //We call sAT_PlusCLCK(), to update the value in FFS. This is the value used by | 591 //We call sAT_PlusCLCK(), to update the value in FFS. This is the value used by |
602 //ACI to estabilish a call on Line1 or Line2. | 592 //ACI to estabilish a call on Line1 or Line2. |
603 #ifndef FF_2TO1_PS | 593 #ifndef FF_2TO1_PS |
604 /*a0393213 warnings removal - CLCK_FAC_Al changed to FAC_Al as a result of ACI enum change*/ | 594 /*a0393213 warnings removal - CLCK_FAC_Al changed to FAC_Al as a result of ACI enum change*/ |
605 sAT_PlusCLCK(CMD_SRC_LCL,FAC_Al,CLCK_MOD_Unlock,g_pin2,((als_status.selectedLine == MFW_SERV_LINE1) ? CLASS_Vce : CLASS_AuxVce));// | 595 sAT_PlusCLCK(CMD_SRC_LCL,FAC_Al,CLCK_MOD_Unlock,g_pin2,((als_status.selectedLine == MFW_SERV_LINE1) ? CLASS_Vce : CLASS_AuxVce));// |
606 #endif | 596 #endif |
607 retVal = cphs_set_als_status(MFW_LINE_UNLOCKED); | 597 retVal = cphs_set_als_status(MFW_LINE_UNLOCKED); |
608 //x0pleela 11 June, 2006 DR:OMAPS00079692 | 598 //x0pleela 11 June, 2006 DR:OMAPS00079692 |
609 //changed from CPHS_OK to MFW_CPHS_OK | 599 //changed from CPHS_OK to MFW_CPHS_OK |
610 if (retVal == MFW_CPHS_OK) | 600 if (retVal == MFW_CPHS_OK) |
611 { | 601 { |
612 als_status.status = MFW_LINE_UNLOCKED; | 602 als_status.status = MFW_LINE_UNLOCKED; |
613 ShowMessage(parent, TxtAlsUnlocked, TxtNull); | 603 ShowMessage(parent, TxtAlsUnlocked, TxtNull); |
614 } | 604 } |
615 } | 605 } |
616 #ifndef CPHS_PROV_TEST | 606 #ifndef CPHS_PROV_TEST |
617 else | 607 else |
618 ShowMessage(parent, TxtNotSupported, TxtNull); | 608 ShowMessage(parent, TxtNotSupported, TxtNull); |
619 #endif | 609 #endif |
620 | 610 |
621 return MFW_EVENT_CONSUMED; | 611 return MFW_EVENT_CONSUMED; |
622 } | 612 } |
623 | 613 |
624 #ifdef FF_CPHS_REL4 | 614 #ifdef FF_CPHS_REL4 |
625 | 615 |
626 /******************************************************************************* | 616 /******************************************************************************* |
632 *******************************************************************************/ | 622 *******************************************************************************/ |
633 int item_flag_isMWISFilePresent(struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi) | 623 int item_flag_isMWISFilePresent(struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi) |
634 { | 624 { |
635 TRACE_FUNCTION("item_flag_isMBDNFilePresent"); | 625 TRACE_FUNCTION("item_flag_isMBDNFilePresent"); |
636 if(isMWISFilePresent()) | 626 if(isMWISFilePresent()) |
637 return 0; | 627 return 0; |
638 else | 628 else |
639 return 1; | 629 return 1; |
640 } | 630 } |
641 | 631 |
642 /******************************************************************************* | 632 /******************************************************************************* |
643 | 633 |
644 $Function: item_flag_isMBDNFileNotPresent | 634 $Function: item_flag_isMBDNFileNotPresent |
648 *******************************************************************************/ | 638 *******************************************************************************/ |
649 int item_flag_isMBDNFileNotPresent(struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi) | 639 int item_flag_isMBDNFileNotPresent(struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi) |
650 { | 640 { |
651 TRACE_FUNCTION("item_flag_isMBDNFilePresent"); | 641 TRACE_FUNCTION("item_flag_isMBDNFilePresent"); |
652 if(isMBDNFilePresent()) | 642 if(isMBDNFilePresent()) |
653 return 1; | 643 return 1; |
654 else | 644 else |
655 return 0; | 645 return 0; |
656 } | 646 } |
657 /******************************************************************************* | 647 /******************************************************************************* |
658 | 648 |
659 $Function: item_flag_isMBDNFilePresent | 649 $Function: item_flag_isMBDNFilePresent |
660 | 650 |
664 | 654 |
665 int item_flag_isMBDNFilePresent(struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi) | 655 int item_flag_isMBDNFilePresent(struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi) |
666 { | 656 { |
667 TRACE_FUNCTION("item_flag_isMBDNFileNotPresent"); | 657 TRACE_FUNCTION("item_flag_isMBDNFileNotPresent"); |
668 if(isMBDNFilePresent()) | 658 if(isMBDNFilePresent()) |
669 return 0; | 659 return 0; |
670 else | 660 else |
671 return 1; | 661 return 1; |
672 } | 662 } |
673 | 663 |
674 | 664 |
675 /******************************************************************************* | 665 /******************************************************************************* |
676 | 666 |
677 $Function: mmi_msp_interrogate_done | 667 $Function: mmi_msp_interrogate_done |
678 | 668 |
679 $Description: Interrogation is finished. | 669 $Description: Interrogation is finished. |
680 | 670 |
681 $Returns: void | 671 $Returns: void |
682 | 672 |
683 $Arguments: void | 673 $Arguments: void |
684 | 674 |
685 *******************************************************************************/ | 675 *******************************************************************************/ |
686 | 676 |
687 void mmi_msp_interrogate_done(void) | 677 void mmi_msp_interrogate_done(void) |
688 { | 678 { |
689 TRACE_FUNCTION("mmi_msp_interrogate_done()"); | 679 TRACE_FUNCTION("mmi_msp_interrogate_done()"); |
690 | 680 |
691 /*a0393213 cphs rel4*/ | 681 /*a0393213 cphs rel4*/ |
692 if(isCFISFilePresent()) | 682 if(isCFISFilePresent()) |
693 cphs_get_divert_status(); | 683 cphs_get_divert_status(); |
694 | 684 |
695 /*invalidate the local cache of mbi and mbdn*/ | 685 /*invalidate the local cache of mbi and mbdn*/ |
696 cphs_rel4_mbi.valid=0x00; | 686 cphs_rel4_mbi.valid=0x00; |
697 cphs_rel4_mbdn.valid=0x00; | 687 cphs_rel4_mbdn.valid=0x00; |
698 } | 688 } |
699 | 689 |
700 /******************************************************************************* | 690 /******************************************************************************* |
701 | 691 |
702 $Function: mmi_msp_interrogate | 692 $Function: mmi_msp_interrogate |
703 | 693 |
704 $Description: Start MSP interrogation | 694 $Description: Start MSP interrogation |
705 | 695 |
706 $Returns: void | 696 $Returns: void |
707 | 697 |
708 $Arguments: void | 698 $Arguments: void |
709 | 699 |
710 *******************************************************************************/ | 700 *******************************************************************************/ |
711 | 701 |
712 void mmi_msp_interrogate(void) | 702 void mmi_msp_interrogate(void) |
713 { | 703 { |
714 char actstr[8]; | 704 char actstr[8]; |
715 TRACE_FUNCTION("mmi_msp_interrogate()"); | 705 TRACE_FUNCTION("mmi_msp_interrogate()"); |
716 | 706 |
717 interrogate = 1; | 707 interrogate = 1; |
718 strcpy(actstr, "*#59#"); | 708 strcpy(actstr, "*#59#"); |
719 ss_execute_transaction((UBYTE*)actstr, 0); | 709 ss_execute_transaction((UBYTE*)actstr, 0); |
720 } | 710 } |
721 | 711 |
722 /******************************************************************************* | 712 /******************************************************************************* |
723 | 713 |
724 $Function: msp_cb | 714 $Function: msp_cb |
725 | 715 |
726 $Description: Window event handler | 716 $Description: Window event handler |
727 | 717 |
728 $Returns: status int | 718 $Returns: status int |
729 | 719 |
730 $Arguments: event, window handler | 720 $Arguments: event, window handler |
731 | 721 |
732 *******************************************************************************/ | 722 *******************************************************************************/ |
733 | 723 |
734 static int mwis_cb (MfwEvt e, MfwWin *w) /* yyy window event handler */ | 724 static int mwis_cb (MfwEvt e, MfwWin *w) /* yyy window event handler */ |
735 { | 725 { |
736 TRACE_EVENT ("mwis_cb()"); | 726 TRACE_EVENT ("mwis_cb()"); |
737 | 727 |
738 switch (e) | 728 switch (e) |
739 { | 729 { |
740 case MfwWinVisible: /* window is visible */ | 730 case MfwWinVisible: /* window is visible */ |
741 break; | 731 break; |
742 case MfwWinFocussed: /* input focus / selected */ | 732 case MfwWinFocussed: /* input focus / selected */ |
743 case MfwWinDelete: /* window will be deleted */ | 733 case MfwWinDelete: /* window will be deleted */ |
744 | 734 |
745 default: | 735 default: |
746 return MFW_EVENT_REJECTED; | 736 return MFW_EVENT_REJECTED; |
747 } | 737 } |
748 return MFW_EVENT_CONSUMED; | 738 return MFW_EVENT_CONSUMED; |
749 } | 739 } |
750 | 740 |
751 /******************************************************************************* | 741 /******************************************************************************* |
752 | 742 |
753 $Function: msp_cb | 743 $Function: msp_cb |
754 | 744 |
755 $Description: Window event handler | 745 $Description: Window event handler |
756 | 746 |
757 $Returns: status int | 747 $Returns: status int |
758 | 748 |
759 $Arguments: event, window handler | 749 $Arguments: event, window handler |
760 | 750 |
761 *******************************************************************************/ | 751 *******************************************************************************/ |
762 | 752 |
763 static int msp_cb (MfwEvt e, MfwWin *w) /* yyy window event handler */ | 753 static int msp_cb (MfwEvt e, MfwWin *w) /* yyy window event handler */ |
764 { | 754 { |
765 TRACE_EVENT ("msp_cb()"); | 755 TRACE_EVENT ("msp_cb()"); |
766 | 756 |
767 switch (e) | 757 switch (e) |
768 { | 758 { |
769 case MfwWinVisible: /* window is visible */ | 759 case MfwWinVisible: /* window is visible */ |
770 break; | 760 break; |
771 case MfwWinFocussed: /* input focus / selected */ | 761 case MfwWinFocussed: /* input focus / selected */ |
772 case MfwWinDelete: /* window will be deleted */ | 762 case MfwWinDelete: /* window will be deleted */ |
773 | 763 |
774 default: | 764 default: |
775 return MFW_EVENT_REJECTED; | 765 return MFW_EVENT_REJECTED; |
776 } | 766 } |
777 return MFW_EVENT_CONSUMED; | 767 return MFW_EVENT_CONSUMED; |
778 } | 768 } |
779 | 769 |
780 /******************************************************************************* | 770 /******************************************************************************* |
781 | 771 |
782 $Function: MSPPresent | 772 $Function: MSPPresent |
783 | 773 |
784 $Description: MSP is provisioned. | 774 $Description: MSP is provisioned. |
785 | 775 |
786 $Returns: status USHORT | 776 $Returns: status USHORT |
787 | 777 |
788 $Arguments: menu tag, attribute, item tag | 778 $Arguments: menu tag, attribute, item tag |
789 | 779 |
790 *******************************************************************************/ | 780 *******************************************************************************/ |
791 | 781 |
792 USHORT MSPPresent( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ) | 782 USHORT MSPPresent( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ) |
793 { | 783 { |
794 TRACE_EVENT_P1("MSPPresent - %d ", msp_info->count); | 784 TRACE_EVENT_P1("MSPPresent - %d ", msp_info->count); |
795 if(MSP_flag) | 785 if(MSP_flag) |
796 return 0; | 786 return 0; |
797 else | 787 else |
798 return 1; | 788 return 1; |
799 } | 789 } |
800 | 790 |
801 /******************************************************************************* | 791 /******************************************************************************* |
802 | 792 |
803 $Function: cphs_select_profile | 793 $Function: cphs_select_profile |
804 | 794 |
805 $Description: Select a profile for registration | 795 $Description: Select a profile for registration |
806 | 796 |
807 $Returns: void | 797 $Returns: void |
808 | 798 |
809 $Arguments: profile id | 799 $Arguments: profile id |
810 | 800 |
811 *******************************************************************************/ | 801 *******************************************************************************/ |
812 | 802 |
813 void cphs_select_profile(int pf_id) | 803 void cphs_select_profile(int pf_id) |
814 { | 804 { |
815 char seq[6]; | 805 char seq[6]; |
816 | 806 |
817 TRACE_EVENT_P1("cphs_select_profile - %d", pf_id); | 807 TRACE_EVENT_P1("cphs_select_profile - %d", pf_id); |
818 strcpy(seq,"*59"); | 808 strcpy(seq,"*59"); |
819 switch(pf_id) | 809 switch(pf_id) |
820 { | 810 { |
821 case 1: | 811 case 1: |
822 strcat(seq,"1"); | 812 strcat(seq,"1"); |
823 break; | 813 break; |
824 case 2: | 814 case 2: |
825 strcat(seq,"2"); | 815 strcat(seq,"2"); |
826 break; | 816 break; |
827 case 3: | 817 case 3: |
828 strcat(seq,"3"); | 818 strcat(seq,"3"); |
829 break; | 819 break; |
830 case 4: | 820 case 4: |
831 strcat(seq,"4"); | 821 strcat(seq,"4"); |
832 break; | 822 break; |
833 default: | 823 default: |
834 break; | 824 break; |
835 } | 825 } |
836 strcat(seq,"#"); | 826 strcat(seq,"#"); |
837 | 827 |
838 msp_register = TRUE; | 828 msp_register = TRUE; |
839 msp_reg_profid = pf_id; | 829 msp_reg_profid = pf_id; |
840 sAT_Dn(CMD_SRC_LCL,seq,-1,-1,-1); | 830 sAT_Dn(CMD_SRC_LCL,seq,-1,-1,-1); |
841 } | 831 } |
842 | 832 |
843 /******************************************************************************* | 833 /******************************************************************************* |
844 | 834 |
845 $Function: msp_menu_destroy | 835 $Function: msp_menu_destroy |
846 | 836 |
847 $Description: Destroy menu | 837 $Description: Destroy menu |
848 | 838 |
849 $Returns: void | 839 $Returns: void |
850 | 840 |
851 $Arguments: window handler | 841 $Arguments: window handler |
852 | 842 |
853 *******************************************************************************/ | 843 *******************************************************************************/ |
854 | 844 |
855 static void msp_menu_destroy(MfwHnd window) | 845 static void msp_menu_destroy(MfwHnd window) |
856 { | 846 { |
857 T_MFW_WIN * win_data = ((T_MFW_HDR *)window)->data; | 847 T_MFW_WIN * win_data = ((T_MFW_HDR *)window)->data; |
858 T_MSP_INFO * data = (T_MSP_INFO *)win_data->user; | 848 T_MSP_INFO * data = (T_MSP_INFO *)win_data->user; |
859 | 849 |
860 TRACE_FUNCTION ("msp_menu_destroy"); | 850 TRACE_FUNCTION ("msp_menu_destroy"); |
861 | 851 |
862 if (window == NULL) | 852 if (window == NULL) |
863 { | 853 { |
864 return; | 854 return; |
865 } | 855 } |
866 | 856 |
867 if (data) | 857 if (data) |
868 { | 858 { |
869 win_delete(data->msp_win); | 859 win_delete(data->msp_win); |
870 | 860 |
871 /* | 861 /* |
872 ** Free Memory | 862 ** Free Memory |
873 */ | 863 */ |
874 mfwFree((void *)data, sizeof (T_MSP_INFO)); | 864 mfwFree((void *)data, sizeof (T_MSP_INFO)); |
875 } | 865 } |
876 } | 866 } |
877 | 867 |
878 /******************************************************************************* | 868 /******************************************************************************* |
879 | 869 |
880 $Function: mwis_menu_destroy | 870 $Function: mwis_menu_destroy |
881 | 871 |
882 $Description: Destroy menu | 872 $Description: Destroy menu |
883 | 873 |
884 $Returns: void | 874 $Returns: void |
885 | 875 |
886 $Arguments: window handler | 876 $Arguments: window handler |
887 | 877 |
888 *******************************************************************************/ | 878 *******************************************************************************/ |
889 | 879 |
890 static void mwis_menu_destroy(MfwHnd window) | 880 static void mwis_menu_destroy(MfwHnd window) |
891 { | 881 { |
892 T_MFW_WIN * win_data = ((T_MFW_HDR *)window)->data; | 882 T_MFW_WIN * win_data = ((T_MFW_HDR *)window)->data; |
893 T_MWIS_INFO * data = (T_MWIS_INFO *)win_data->user; | 883 T_MWIS_INFO * data = (T_MWIS_INFO *)win_data->user; |
894 | 884 |
895 TRACE_FUNCTION ("mwis_menu_destroy"); | 885 TRACE_FUNCTION ("mwis_menu_destroy"); |
896 | 886 |
897 if (window == NULL) | 887 if (window == NULL) |
898 { | 888 { |
899 return; | 889 return; |
900 } | 890 } |
901 | 891 |
902 if (data) | 892 if (data) |
903 { | 893 { |
904 win_delete(data->mwis_win); | 894 win_delete(data->mwis_win); |
905 | 895 |
906 /* | 896 /* |
907 ** Free Memory | 897 ** Free Memory |
908 */ | 898 */ |
909 mfwFree((void *)data, sizeof (T_MWIS_INFO)); | 899 mfwFree((void *)data, sizeof (T_MWIS_INFO)); |
910 } | 900 } |
911 } | 901 } |
912 | 902 |
913 /******************************************************************************* | 903 /******************************************************************************* |
914 | 904 |
915 $Function: MwisList_cb | 905 $Function: MwisList_cb |
916 | 906 |
917 $Description: Callback for MWIS list | 907 $Description: Callback for MWIS list |
918 | 908 |
919 $Returns: void | 909 $Returns: void |
920 | 910 |
921 $Arguments: parent window, list data | 911 $Arguments: parent window, list data |
922 | 912 |
923 *******************************************************************************/ | 913 *******************************************************************************/ |
924 | 914 |
925 void MwisList_cb(T_MFW_HND * Parent, ListMenuData * ListData) | 915 void MwisList_cb(T_MFW_HND * Parent, ListMenuData * ListData) |
926 { | 916 { |
927 T_MFW_WIN *win_data = ((T_MFW_HDR *)Parent)->data; | 917 T_MFW_WIN *win_data = ((T_MFW_HDR *)Parent)->data; |
928 T_MWIS_INFO *data = (T_MWIS_INFO *)win_data->user; | 918 T_MWIS_INFO *data = (T_MWIS_INFO *)win_data->user; |
929 TRACE_FUNCTION ("MwisList_cb()"); | 919 TRACE_FUNCTION ("MwisList_cb()"); |
930 | 920 |
931 if ((ListData->Reason EQ LISTS_REASON_BACK) || | 921 if ((ListData->Reason EQ LISTS_REASON_BACK) || |
932 (ListData->Reason EQ LISTS_REASON_CLEAR) || | 922 (ListData->Reason EQ LISTS_REASON_CLEAR) || |
933 (ListData->Reason EQ LISTS_REASON_HANGUP)) | 923 (ListData->Reason EQ LISTS_REASON_HANGUP)) |
934 { | 924 { |
935 /* | 925 /* |
936 ** Destroy the window --- Not sure if this is required! ... leave it out for now | 926 ** Destroy the window --- Not sure if this is required! ... leave it out for now |
937 */ | 927 */ |
938 listsDestroy(ListData->win); | 928 listsDestroy(ListData->win); |
939 | 929 |
940 /* | 930 /* |
941 ** Free the memory set aside for ALL the devices to be listed. | 931 ** Free the memory set aside for ALL the devices to be listed. |
942 */ | 932 */ |
943 if (data->menu_list_data != NULL) | 933 if (data->menu_list_data != NULL) |
944 { | 934 { |
945 FREE_MEMORY ((void *)data->menu_list_data->List, (U16)(4 * sizeof (T_MFW_MNU_ITEM))); | 935 FREE_MEMORY ((void *)data->menu_list_data->List, (U16)(4 * sizeof (T_MFW_MNU_ITEM))); |
946 FREE_MEMORY ((void *)data->menu_list_data, sizeof (ListMenuData)); | 936 FREE_MEMORY ((void *)data->menu_list_data, sizeof (ListMenuData)); |
947 } | 937 } |
948 | 938 |
949 mwis_menu_destroy(data->mwis_win); | 939 mwis_menu_destroy(data->mwis_win); |
950 | 940 |
951 } | 941 } |
952 } | 942 } |
953 | 943 |
954 /******************************************************************************* | 944 /******************************************************************************* |
955 | 945 |
956 $Function: mwis_exec_cb | 946 $Function: mwis_exec_cb |
957 | 947 |
958 $Description: Dialog function to display the mwis list | 948 $Description: Dialog function to display the mwis list |
959 | 949 |
960 $Returns: void | 950 $Returns: void |
961 | 951 |
962 $Arguments: window handler, event, value and parameter | 952 $Arguments: window handler, event, value and parameter |
963 | 953 |
964 *******************************************************************************/ | 954 *******************************************************************************/ |
965 | 955 |
966 void mwis_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter) | 956 void mwis_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter) |
967 { | 957 { |
968 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; | 958 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; |
969 T_MWIS_INFO * data = (T_MWIS_INFO*)win_data->user; | 959 T_MWIS_INFO * data = (T_MWIS_INFO*)win_data->user; |
970 T_MFW_CPHS_REL4_MWIS * mwis_ptr; | 960 T_MFW_CPHS_REL4_MWIS * mwis_ptr; |
971 int i; | 961 int i; |
972 char temp[4][50]; | 962 char temp[4][50]; |
973 | 963 |
974 switch (event) | 964 switch (event) |
975 { | 965 { |
976 case E_INIT: | 966 case E_INIT: |
977 | 967 |
978 TRACE_EVENT(">>>> mwis_exec_cb() Event:E_INIT"); | 968 TRACE_EVENT(">>>> mwis_exec_cb() Event:E_INIT"); |
979 | 969 |
980 /* initialization of administrative data */ | 970 /* initialization of administrative data */ |
981 | 971 |
982 | 972 |
983 data->menu_list_data = (ListMenuData *)ALLOC_MEMORY(sizeof(ListMenuData)); | 973 data->menu_list_data = (ListMenuData *)ALLOC_MEMORY(sizeof(ListMenuData)); |
984 | 974 |
985 if(data->menu_list_data == 0) | 975 if(data->menu_list_data == 0) |
986 { | 976 { |
987 TRACE_EVENT("Failed memory alloc 1 "); | 977 TRACE_EVENT("Failed memory alloc 1 "); |
988 return; | 978 return; |
989 } | 979 } |
990 | 980 |
991 data->menu_list_data->List = (T_MFW_MNU_ITEM *)ALLOC_MEMORY( 4 * sizeof(T_MFW_MNU_ITEM) ); | 981 data->menu_list_data->List = (T_MFW_MNU_ITEM *)ALLOC_MEMORY( 4 * sizeof(T_MFW_MNU_ITEM) ); |
992 | 982 |
993 if(data->menu_list_data->List == 0) | 983 if(data->menu_list_data->List == 0) |
994 { | 984 { |
995 TRACE_EVENT("Failed memory alloc 2"); | 985 TRACE_EVENT("Failed memory alloc 2"); |
996 return; | 986 return; |
997 } | 987 } |
998 | 988 |
999 mwis_ptr = get_mwis_stat(prof_sel); | 989 mwis_ptr = get_mwis_stat(prof_sel); |
1000 | 990 |
1001 sprintf(temp[0],"Voice Mesage - %d ", mwis_ptr->voicemail); | 991 sprintf(temp[0],"Voice Mesage - %d ", mwis_ptr->voicemail); |
1002 mnuInitDataItem(&data->menu_list_data->List[0]); | 992 mnuInitDataItem(&data->menu_list_data->List[0]); |
1003 data->menu_list_data->List[0].flagFunc = item_flag_none; | 993 data->menu_list_data->List[0].flagFunc = item_flag_none; |
1004 data->menu_list_data->List[0].str = temp[0]; | 994 data->menu_list_data->List[0].str = temp[0]; |
1005 | 995 |
1006 sprintf(temp[1],"Fax Message - %d ", mwis_ptr->fax); | 996 sprintf(temp[1],"Fax Message - %d ", mwis_ptr->fax); |
1007 mnuInitDataItem(&data->menu_list_data->List[1]); | 997 mnuInitDataItem(&data->menu_list_data->List[1]); |
1008 data->menu_list_data->List[1].flagFunc = item_flag_none; | 998 data->menu_list_data->List[1].flagFunc = item_flag_none; |
1009 data->menu_list_data->List[1].str = temp[1]; | 999 data->menu_list_data->List[1].str = temp[1]; |
1010 | 1000 |
1011 sprintf(temp[2],"Electronic Message - %d ", mwis_ptr->electronic); | 1001 sprintf(temp[2],"Electronic Message - %d ", mwis_ptr->electronic); |
1012 mnuInitDataItem(&data->menu_list_data->List[2]); | 1002 mnuInitDataItem(&data->menu_list_data->List[2]); |
1013 data->menu_list_data->List[2].flagFunc = item_flag_none; | 1003 data->menu_list_data->List[2].flagFunc = item_flag_none; |
1014 data->menu_list_data->List[2].str = temp[2]; | 1004 data->menu_list_data->List[2].str = temp[2]; |
1015 | 1005 |
1016 sprintf(temp[3],"Other Message - %d ", mwis_ptr->other); | 1006 sprintf(temp[3],"Other Message - %d ", mwis_ptr->other); |
1017 mnuInitDataItem(&data->menu_list_data->List[3]); | 1007 mnuInitDataItem(&data->menu_list_data->List[3]); |
1018 data->menu_list_data->List[3].flagFunc = item_flag_none; | 1008 data->menu_list_data->List[3].flagFunc = item_flag_none; |
1019 data->menu_list_data->List[3].str = temp[3]; | 1009 data->menu_list_data->List[3].str = temp[3]; |
1020 | 1010 |
1021 data->menu_list_data->ListLength = 4; | 1011 data->menu_list_data->ListLength = 4; |
1022 data->menu_list_data->ListPosition = 0; | 1012 data->menu_list_data->ListPosition = 0; |
1023 data->menu_list_data->CursorPosition = 0; | 1013 data->menu_list_data->CursorPosition = 0; |
1024 data->menu_list_data->SnapshotSize = 4; | 1014 data->menu_list_data->SnapshotSize = 4; |
1025 data->menu_list_data->Font = 0; | 1015 data->menu_list_data->Font = 0; |
1026 data->menu_list_data->LeftSoftKey = TxtNull; | 1016 data->menu_list_data->LeftSoftKey = TxtNull; |
1027 data->menu_list_data->RightSoftKey = TxtSoftBack; | 1017 data->menu_list_data->RightSoftKey = TxtSoftBack; |
1028 data->menu_list_data->KeyEvents = KEY_RIGHT; | 1018 data->menu_list_data->KeyEvents = KEY_RIGHT; |
1029 data->menu_list_data->Reason = 0; | 1019 data->menu_list_data->Reason = 0; |
1030 data->menu_list_data->Strings = TRUE; | 1020 data->menu_list_data->Strings = TRUE; |
1031 data->menu_list_data->Attr = &InfoNum_menuAttrib; | 1021 data->menu_list_data->Attr = &InfoNum_menuAttrib; |
1032 data->menu_list_data->autoDestroy = FALSE; | 1022 data->menu_list_data->autoDestroy = FALSE; |
1033 | 1023 |
1034 /* Create the dynamic menu window */ | 1024 /* Create the dynamic menu window */ |
1035 listDisplayListMenu(win, data->menu_list_data,(ListCbFunc)MwisList_cb,0); | 1025 listDisplayListMenu(win, data->menu_list_data,(ListCbFunc)MwisList_cb,0); |
1036 | 1026 |
1037 break; | 1027 break; |
1038 default: | 1028 default: |
1039 break; | 1029 break; |
1040 } | 1030 } |
1041 | 1031 |
1042 } | 1032 } |
1043 | 1033 |
1044 /******************************************************************************* | 1034 /******************************************************************************* |
1045 | 1035 |
1046 $Function: mmi_build_mwis_menu | 1036 $Function: mmi_build_mwis_menu |
1047 | 1037 |
1048 $Description: Create mwis menu | 1038 $Description: Create mwis menu |
1049 | 1039 |
1050 $Returns: window handler | 1040 $Returns: window handler |
1051 | 1041 |
1052 $Arguments: parent window handler | 1042 $Arguments: parent window handler |
1053 | 1043 |
1054 *******************************************************************************/ | 1044 *******************************************************************************/ |
1055 | 1045 |
1056 static T_MFW_HND mmi_build_mwis_menu( MfwHnd parent_window) | 1046 static T_MFW_HND mmi_build_mwis_menu( MfwHnd parent_window) |
1057 { | 1047 { |
1058 T_MWIS_INFO * data = (T_MWIS_INFO *)ALLOC_MEMORY (sizeof (T_MWIS_INFO)); | 1048 T_MWIS_INFO * data = (T_MWIS_INFO *)ALLOC_MEMORY (sizeof (T_MWIS_INFO)); |
1059 T_MFW_WIN * win; | 1049 T_MFW_WIN * win; |
1060 TRACE_FUNCTION("mmi_build_mwis_menu"); | 1050 TRACE_FUNCTION("mmi_build_mwis_menu"); |
1061 | 1051 |
1062 /* | 1052 /* |
1063 * Create window handler | 1053 * Create window handler |
1064 */ | 1054 */ |
1065 | 1055 |
1066 data->mwis_win = win_create (parent_window, 0, E_WIN_VISIBLE, (T_MFW_CB)mwis_cb); | 1056 data->mwis_win = win_create (parent_window, 0, E_WIN_VISIBLE, (T_MFW_CB)mwis_cb); |
1067 if (data->mwis_win EQ NULL) | 1057 if (data->mwis_win EQ NULL) |
1068 { | 1058 { |
1069 return NULL; | 1059 return NULL; |
1070 } | 1060 } |
1071 | 1061 |
1072 TRACE_EVENT(">>>> mwis menu window created: " ); | 1062 TRACE_EVENT(">>>> mwis menu window created: " ); |
1073 /* | 1063 /* |
1074 * connect the dialog data to the MFW-window | 1064 * connect the dialog data to the MFW-window |
1075 */ | 1065 */ |
1076 | 1066 |
1077 data->mmi_control.dialog = (T_DIALOG_FUNC)mwis_exec_cb; | 1067 data->mmi_control.dialog = (T_DIALOG_FUNC)mwis_exec_cb; |
1078 data->mmi_control.data = data; | 1068 data->mmi_control.data = data; |
1079 win = ((T_MFW_HDR *)data->mwis_win)->data; | 1069 win = ((T_MFW_HDR *)data->mwis_win)->data; |
1080 win->user = (void *)data; | 1070 win->user = (void *)data; |
1081 data->parent = parent_window; | 1071 data->parent = parent_window; |
1082 winShow(data->mwis_win); | 1072 winShow(data->mwis_win); |
1083 /* | 1073 /* |
1084 * return window handle | 1074 * return window handle |
1085 */ | 1075 */ |
1086 | 1076 |
1087 return data->mwis_win; | 1077 return data->mwis_win; |
1088 } | 1078 } |
1089 | 1079 |
1090 | 1080 |
1091 /******************************************************************************* | 1081 /******************************************************************************* |
1092 | 1082 |
1093 $Function: MspList_cb | 1083 $Function: MspList_cb |
1094 | 1084 |
1095 $Description: Callback for MSP list | 1085 $Description: Callback for MSP list |
1096 | 1086 |
1097 $Returns: void | 1087 $Returns: void |
1098 | 1088 |
1099 $Arguments: parent window, list data | 1089 $Arguments: parent window, list data |
1100 | 1090 |
1101 *******************************************************************************/ | 1091 *******************************************************************************/ |
1102 | 1092 |
1103 void MspList_cb(T_MFW_HND * Parent, ListMenuData * ListData) | 1093 void MspList_cb(T_MFW_HND * Parent, ListMenuData * ListData) |
1104 { | 1094 { |
1105 T_MFW_WIN *win_data = ((T_MFW_HDR *)Parent)->data; | 1095 T_MFW_WIN *win_data = ((T_MFW_HDR *)Parent)->data; |
1106 T_MSP_INFO *data = (T_MSP_INFO *)win_data->user; | 1096 T_MSP_INFO *data = (T_MSP_INFO *)win_data->user; |
1107 TRACE_FUNCTION ("MspList_cb()"); | 1097 TRACE_FUNCTION ("MspList_cb()"); |
1108 | 1098 |
1109 if ((ListData->Reason EQ LISTS_REASON_BACK) || | 1099 if ((ListData->Reason EQ LISTS_REASON_BACK) || |
1110 (ListData->Reason EQ LISTS_REASON_CLEAR) || | 1100 (ListData->Reason EQ LISTS_REASON_CLEAR) || |
1111 (ListData->Reason EQ LISTS_REASON_HANGUP)) | 1101 (ListData->Reason EQ LISTS_REASON_HANGUP)) |
1112 { | 1102 { |
1113 /* | 1103 /* |
1114 ** Destroy the window --- Not sure if this is required! ... leave it out for now | 1104 ** Destroy the window --- Not sure if this is required! ... leave it out for now |
1115 */ | 1105 */ |
1116 listsDestroy(ListData->win); | 1106 listsDestroy(ListData->win); |
1117 | 1107 |
1118 /* | 1108 /* |
1119 ** Free the memory set aside for ALL the devices to be listed. | 1109 ** Free the memory set aside for ALL the devices to be listed. |
1120 */ | 1110 */ |
1121 if (data->menu_list_data != NULL) | 1111 if (data->menu_list_data != NULL) |
1122 { | 1112 { |
1123 FREE_MEMORY ((void *)data->menu_list_data->List, (U16)(msp_info->count * sizeof (T_MFW_MNU_ITEM))); | 1113 FREE_MEMORY ((void *)data->menu_list_data->List, (U16)(msp_info->count * sizeof (T_MFW_MNU_ITEM))); |
1124 FREE_MEMORY ((void *)data->menu_list_data, sizeof (ListMenuData)); | 1114 FREE_MEMORY ((void *)data->menu_list_data, sizeof (ListMenuData)); |
1125 } | 1115 } |
1126 | 1116 |
1127 msp_menu_destroy(data->msp_win); | 1117 msp_menu_destroy(data->msp_win); |
1128 mwis_flag = FALSE; | 1118 mwis_flag = FALSE; |
1129 } | 1119 } |
1130 else if(ListData->Reason EQ LISTS_REASON_SELECT) | 1120 else if(ListData->Reason EQ LISTS_REASON_SELECT) |
1131 { | 1121 { |
1132 TRACE_EVENT_P1("list position is %d",ListData->ListPosition); | 1122 TRACE_EVENT_P1("list position is %d",ListData->ListPosition); |
1133 if(mwis_flag == FALSE) | 1123 if(mwis_flag == FALSE) |
1134 cphs_select_profile(ListData->ListPosition); | 1124 cphs_select_profile(ListData->ListPosition); |
1135 else | 1125 else |
1136 { | 1126 { |
1137 T_MFW_HND win; | 1127 T_MFW_HND win; |
1138 T_MFW_HND parent_win = mfw_parent(mfw_header()); | 1128 T_MFW_HND parent_win = mfw_parent(mfw_header()); |
1139 | 1129 |
1140 TRACE_FUNCTION("build_mwis_list()"); | 1130 TRACE_FUNCTION("build_mwis_list()"); |
1141 | 1131 |
1142 mwis_flag = TRUE; | 1132 mwis_flag = TRUE; |
1143 prof_sel = ListData->ListPosition; | 1133 prof_sel = ListData->ListPosition; |
1144 win = mmi_build_mwis_menu(parent_win); | 1134 win = mmi_build_mwis_menu(parent_win); |
1145 if (win NEQ NULL) | 1135 if (win NEQ NULL) |
1146 { | 1136 { |
1147 SEND_EVENT (win, E_INIT, 0, 0); | 1137 SEND_EVENT (win, E_INIT, 0, 0); |
1148 } | 1138 } |
1149 } | 1139 } |
1150 } | 1140 } |
1151 } | 1141 } |
1152 | 1142 |
1153 | 1143 |
1154 /******************************************************************************* | 1144 /******************************************************************************* |
1155 | 1145 |
1156 $Function: msp_exec_cb | 1146 $Function: msp_exec_cb |
1157 | 1147 |
1158 $Description: Dialog function to display the msp list | 1148 $Description: Dialog function to display the msp list |
1159 | 1149 |
1160 $Returns: void | 1150 $Returns: void |
1161 | 1151 |
1162 $Arguments: window handler, event, value and parameter | 1152 $Arguments: window handler, event, value and parameter |
1163 | 1153 |
1164 *******************************************************************************/ | 1154 *******************************************************************************/ |
1165 | 1155 |
1166 void msp_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter) | 1156 void msp_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter) |
1167 { | 1157 { |
1168 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; | 1158 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; |
1169 T_MSP_INFO* data = (T_MSP_INFO*)win_data->user; | 1159 T_MSP_INFO* data = (T_MSP_INFO*)win_data->user; |
1170 int i; | 1160 int i; |
1171 | 1161 |
1172 switch (event) | 1162 switch (event) |
1173 { | 1163 { |
1174 case E_INIT: | 1164 case E_INIT: |
1175 | 1165 |
1176 TRACE_EVENT(">>>> msp_exec_cb() Event:E_INIT"); | 1166 TRACE_EVENT(">>>> msp_exec_cb() Event:E_INIT"); |
1177 | 1167 |
1178 /* initialization of administrative data */ | 1168 /* initialization of administrative data */ |
1179 | 1169 |
1180 | 1170 |
1181 data->menu_list_data = (ListMenuData *)ALLOC_MEMORY(sizeof(ListMenuData)); | 1171 data->menu_list_data = (ListMenuData *)ALLOC_MEMORY(sizeof(ListMenuData)); |
1182 | 1172 |
1183 if(data->menu_list_data == 0) | 1173 if(data->menu_list_data == 0) |
1184 { | 1174 { |
1185 TRACE_EVENT("Failed memory alloc 1 "); | 1175 TRACE_EVENT("Failed memory alloc 1 "); |
1186 return; | 1176 return; |
1187 } | 1177 } |
1188 | 1178 |
1189 data->menu_list_data->List = (T_MFW_MNU_ITEM *)ALLOC_MEMORY( msp_info->count * sizeof(T_MFW_MNU_ITEM) ); | 1179 data->menu_list_data->List = (T_MFW_MNU_ITEM *)ALLOC_MEMORY( msp_info->count * sizeof(T_MFW_MNU_ITEM) ); |
1190 | 1180 |
1191 if(data->menu_list_data->List == 0) | 1181 if(data->menu_list_data->List == 0) |
1192 { | 1182 { |
1193 TRACE_EVENT("Failed memory alloc 2"); | 1183 TRACE_EVENT("Failed memory alloc 2"); |
1194 return; | 1184 return; |
1195 } | 1185 } |
1196 | 1186 |
1197 for (i = 0; i < msp_info->count; i++) | 1187 for (i = 0; i < msp_info->count; i++) |
1198 { | 1188 { |
1199 mnuInitDataItem(&data->menu_list_data->List[i]); | 1189 mnuInitDataItem(&data->menu_list_data->List[i]); |
1200 data->menu_list_data->List[i].flagFunc = item_flag_none; | 1190 data->menu_list_data->List[i].flagFunc = item_flag_none; |
1201 data->menu_list_data->List[i].str = (char *)msp_info->profile[i].alpha; | 1191 data->menu_list_data->List[i].str = (char *)msp_info->profile[i].alpha; |
1202 } | 1192 } |
1203 | 1193 |
1204 data->menu_list_data->ListLength =msp_info->count; | 1194 data->menu_list_data->ListLength =msp_info->count; |
1205 data->menu_list_data->ListPosition = 1; | 1195 data->menu_list_data->ListPosition = 1; |
1206 data->menu_list_data->CursorPosition = 1; | 1196 data->menu_list_data->CursorPosition = 1; |
1207 data->menu_list_data->SnapshotSize = msp_info->count; | 1197 data->menu_list_data->SnapshotSize = msp_info->count; |
1208 data->menu_list_data->Font = 0; | 1198 data->menu_list_data->Font = 0; |
1209 data->menu_list_data->LeftSoftKey = TxtSoftSelect; | 1199 data->menu_list_data->LeftSoftKey = TxtSoftSelect; |
1210 data->menu_list_data->RightSoftKey = TxtSoftBack; | 1200 data->menu_list_data->RightSoftKey = TxtSoftBack; |
1211 data->menu_list_data->KeyEvents = KEY_ALL; | 1201 data->menu_list_data->KeyEvents = KEY_ALL; |
1212 data->menu_list_data->Reason = 0; | 1202 data->menu_list_data->Reason = 0; |
1213 data->menu_list_data->Strings = TRUE; | 1203 data->menu_list_data->Strings = TRUE; |
1214 data->menu_list_data->Attr = &InfoNum_menuAttrib; | 1204 data->menu_list_data->Attr = &InfoNum_menuAttrib; |
1215 data->menu_list_data->autoDestroy = FALSE; | 1205 data->menu_list_data->autoDestroy = FALSE; |
1216 | 1206 |
1217 /* Create the dynamic menu window */ | 1207 /* Create the dynamic menu window */ |
1218 listDisplayListMenu(win, data->menu_list_data,(ListCbFunc)MspList_cb,0); | 1208 listDisplayListMenu(win, data->menu_list_data,(ListCbFunc)MspList_cb,0); |
1219 | 1209 |
1220 break; | 1210 break; |
1221 default: | 1211 default: |
1222 break; | 1212 break; |
1223 } | 1213 } |
1224 | 1214 |
1225 } | 1215 } |
1226 | 1216 |
1227 | 1217 |
1228 /******************************************************************************* | 1218 /******************************************************************************* |
1229 | 1219 |
1230 $Function: mmi_build_msp_menu | 1220 $Function: mmi_build_msp_menu |
1231 | 1221 |
1232 $Description: Create MSP menu | 1222 $Description: Create MSP menu |
1233 | 1223 |
1234 $Returns: window handler | 1224 $Returns: window handler |
1235 | 1225 |
1236 $Arguments: parent window handler | 1226 $Arguments: parent window handler |
1237 | 1227 |
1238 *******************************************************************************/ | 1228 *******************************************************************************/ |
1239 | 1229 |
1240 static T_MFW_HND mmi_build_msp_menu( MfwHnd parent_window) | 1230 static T_MFW_HND mmi_build_msp_menu( MfwHnd parent_window) |
1241 { | 1231 { |
1242 T_MSP_INFO * data = (T_MSP_INFO *)ALLOC_MEMORY (sizeof (T_MSP_INFO)); | 1232 T_MSP_INFO * data = (T_MSP_INFO *)ALLOC_MEMORY (sizeof (T_MSP_INFO)); |
1243 T_MFW_WIN * win; | 1233 T_MFW_WIN * win; |
1244 TRACE_FUNCTION("mmi_build_msp_menu"); | 1234 TRACE_FUNCTION("mmi_build_msp_menu"); |
1245 | 1235 |
1246 /* | 1236 /* |
1247 * Create window handler | 1237 * Create window handler |
1248 */ | 1238 */ |
1249 | 1239 |
1250 data->msp_win = win_create (parent_window, 0, E_WIN_VISIBLE, (T_MFW_CB)msp_cb); | 1240 data->msp_win = win_create (parent_window, 0, E_WIN_VISIBLE, (T_MFW_CB)msp_cb); |
1251 if (data->msp_win EQ NULL) | 1241 if (data->msp_win EQ NULL) |
1252 { | 1242 { |
1253 return NULL; | 1243 return NULL; |
1254 } | 1244 } |
1255 | 1245 |
1256 TRACE_EVENT(">>>> msp menu window created: " ); | 1246 TRACE_EVENT(">>>> msp menu window created: " ); |
1257 /* | 1247 /* |
1258 * connect the dialog data to the MFW-window | 1248 * connect the dialog data to the MFW-window |
1259 */ | 1249 */ |
1260 | 1250 |
1261 data->mmi_control.dialog = (T_DIALOG_FUNC)msp_exec_cb; | 1251 data->mmi_control.dialog = (T_DIALOG_FUNC)msp_exec_cb; |
1262 data->mmi_control.data = data; | 1252 data->mmi_control.data = data; |
1263 win = ((T_MFW_HDR *)data->msp_win)->data; | 1253 win = ((T_MFW_HDR *)data->msp_win)->data; |
1264 win->user = (void *)data; | 1254 win->user = (void *)data; |
1265 data->parent = parent_window; | 1255 data->parent = parent_window; |
1266 winShow(data->msp_win); | 1256 winShow(data->msp_win); |
1267 /* | 1257 /* |
1268 * return window handle | 1258 * return window handle |
1269 */ | 1259 */ |
1270 | 1260 |
1271 return data->msp_win; | 1261 return data->msp_win; |
1272 } | 1262 } |
1273 | 1263 |
1274 /******************************************************************************* | 1264 /******************************************************************************* |
1275 | 1265 |
1276 $Function: build_profile_list | 1266 $Function: build_profile_list |
1277 | 1267 |
1278 $Description: generate profile list | 1268 $Description: generate profile list |
1279 | 1269 |
1280 $Returns: status int | 1270 $Returns: status int |
1281 | 1271 |
1282 $Arguments: menu, menu item | 1272 $Arguments: menu, menu item |
1283 | 1273 |
1284 *******************************************************************************/ | 1274 *******************************************************************************/ |
1285 | 1275 |
1286 int build_profile_list(MfwMnu* m, MfwMnuItem* i) | 1276 int build_profile_list(MfwMnu* m, MfwMnuItem* i) |
1287 { | 1277 { |
1288 T_MFW_HND win; | 1278 T_MFW_HND win; |
1289 T_MFW_HND parent_win = mfw_parent(mfw_header()); | 1279 T_MFW_HND parent_win = mfw_parent(mfw_header()); |
1290 | 1280 |
1291 TRACE_FUNCTION("build_profile_list()"); | 1281 TRACE_FUNCTION("build_profile_list()"); |
1292 | 1282 |
1293 win = mmi_build_msp_menu(parent_win); | 1283 win = mmi_build_msp_menu(parent_win); |
1294 if (win NEQ NULL) | 1284 if (win NEQ NULL) |
1295 { | 1285 { |
1296 SEND_EVENT (win, E_INIT, 0, 0); | 1286 SEND_EVENT (win, E_INIT, 0, 0); |
1297 } | 1287 } |
1298 return MFW_EVENT_CONSUMED; | 1288 return MFW_EVENT_CONSUMED; |
1299 } | 1289 } |
1300 | 1290 |
1301 int build_profile_list1(MfwMnu* m, MfwMnuItem* i) | 1291 int build_profile_list1(MfwMnu* m, MfwMnuItem* i) |
1302 { | 1292 { |
1303 T_MFW_HND win; | 1293 T_MFW_HND win; |
1304 T_MFW_HND parent_win = mfw_parent(mfw_header()); | 1294 T_MFW_HND parent_win = mfw_parent(mfw_header()); |
1305 | 1295 |
1306 TRACE_FUNCTION("build_profile_list()"); | 1296 TRACE_FUNCTION("build_profile_list()"); |
1307 | 1297 |
1308 mwis_flag = TRUE; | 1298 mwis_flag = TRUE; |
1309 | 1299 |
1310 win = mmi_build_msp_menu(parent_win); | 1300 win = mmi_build_msp_menu(parent_win); |
1311 if (win NEQ NULL) | 1301 if (win NEQ NULL) |
1312 { | 1302 { |
1313 SEND_EVENT (win, E_INIT, 0, 0); | 1303 SEND_EVENT (win, E_INIT, 0, 0); |
1314 } | 1304 } |
1315 return MFW_EVENT_CONSUMED; | 1305 return MFW_EVENT_CONSUMED; |
1316 } | 1306 } |
1317 | 1307 |
1318 #endif | 1308 #endif |
1319 /******************************************************************************* | 1309 /******************************************************************************* |
1320 | 1310 |
1321 $Function: cphs_line1_select | 1311 $Function: cphs_line1_select |
1322 | 1312 |
1323 $Description: Enable ALS Line1 from menu | 1313 $Description: Enable ALS Line1 from menu |
1324 | 1314 |
1325 $Returns: status int | 1315 $Returns: status int |
1326 | 1316 |
1327 $Arguments: menu, tag (not used) | 1317 $Arguments: menu, tag (not used) |
1328 | 1318 |
1329 *******************************************************************************/ | 1319 *******************************************************************************/ |
1330 int cphs_line1_select(MfwMnu* m, MfwMnuItem* i) | 1320 int cphs_line1_select(MfwMnu* m, MfwMnuItem* i) |
1331 { | 1321 { |
1332 T_MFW_HND parent = mfwParent( mfw_header()); | 1322 T_MFW_HND parent = mfwParent( mfw_header()); |
1333 TRACE_FUNCTION("cphs_line1_select"); | 1323 TRACE_FUNCTION("cphs_line1_select"); |
1334 #ifndef CPHS_PROV_TEST | 1324 #ifndef CPHS_PROV_TEST |
1335 if (!ALSPresent(NULL, NULL, NULL)) | 1325 if (!ALSPresent(NULL, NULL, NULL)) |
1336 #endif | 1326 #endif |
1337 { cphs_select_line(MFW_SERV_LINE1); | 1327 { cphs_select_line(MFW_SERV_LINE1); |
1338 /*cphs_get_divert_status();*//*a0393213 - the call forward icon is now shown taking both the lines into consideration*/ | 1328 /*cphs_get_divert_status();*//*a0393213 - the call forward icon is now shown taking both the lines into consideration*/ |
1339 } | 1329 } |
1340 #ifndef CPHS_PROV_TEST | 1330 #ifndef CPHS_PROV_TEST |
1341 else | 1331 else |
1342 ShowMessage(parent, TxtNotSupported, TxtNull); | 1332 ShowMessage(parent, TxtNotSupported, TxtNull); |
1343 #endif | 1333 #endif |
1344 return MFW_EVENT_CONSUMED; | 1334 return MFW_EVENT_CONSUMED; |
1345 } | 1335 } |
1346 /******************************************************************************* | 1336 /******************************************************************************* |
1347 | 1337 |
1348 $Function: cphs_line2_select | 1338 $Function: cphs_line2_select |
1349 | 1339 |
1350 $Description: Enable ALS Line2 from menu | 1340 $Description: Enable ALS Line2 from menu |
1351 | 1341 |
1352 $Returns: status int | 1342 $Returns: status int |
1353 | 1343 |
1354 $Arguments: menu, tag (not used) | 1344 $Arguments: menu, tag (not used) |
1355 | 1345 |
1356 *******************************************************************************/ | 1346 *******************************************************************************/ |
1357 int cphs_line2_select(MfwMnu* m, MfwMnuItem* i) | 1347 int cphs_line2_select(MfwMnu* m, MfwMnuItem* i) |
1358 { | 1348 { |
1359 | 1349 |
1360 T_MFW_HND parent = mfwParent( mfw_header()); | 1350 T_MFW_HND parent = mfwParent( mfw_header()); |
1361 TRACE_FUNCTION("cphs_line2_select"); | 1351 TRACE_FUNCTION("cphs_line2_select"); |
1362 #ifndef CPHS_PROV_TEST | 1352 #ifndef CPHS_PROV_TEST |
1363 if (!ALSPresent(NULL, NULL, NULL)) | 1353 if (!ALSPresent(NULL, NULL, NULL)) |
1364 #endif | 1354 #endif |
1365 { | 1355 { |
1366 cphs_select_line(MFW_SERV_LINE2); | 1356 cphs_select_line(MFW_SERV_LINE2); |
1367 /*cphs_get_divert_status();*//*a0393213 - the call forward icon is now shown taking both the lines into consideration*/ | 1357 /*cphs_get_divert_status();*//*a0393213 - the call forward icon is now shown taking both the lines into consideration*/ |
1368 } | 1358 } |
1369 #ifndef CPHS_PROV_TEST | 1359 #ifndef CPHS_PROV_TEST |
1370 else | 1360 else |
1371 ShowMessage(parent, TxtNotSupported, TxtNull); | 1361 ShowMessage(parent, TxtNotSupported, TxtNull); |
1372 #endif | 1362 #endif |
1373 return MFW_EVENT_CONSUMED; | 1363 return MFW_EVENT_CONSUMED; |
1374 } | 1364 } |
1375 | 1365 |
1376 //x0pleela 23 May, 2006 DR: OMAPS00070657 | 1366 //x0pleela 23 May, 2006 DR: OMAPS00070657 |
1377 #ifdef FF_CPHS | 1367 #ifdef FF_CPHS |
1378 /******************************************************************************* | 1368 /******************************************************************************* |
1379 | 1369 |
1380 $Function: cphs_Line_Edit_cb | 1370 $Function: cphs_Line_Edit_cb |
1381 | 1371 |
1382 $Description: Callback function for Line rename editor | 1372 $Description: Callback function for Line rename editor |
1383 | 1373 |
1384 $Returns: none | 1374 $Returns: none |
1385 | 1375 |
1386 $Arguments: win - current window | 1376 $Arguments: win - current window |
1387 Identifier - unique id | 1377 Identifier - unique id |
1388 reason - event cause | 1378 reason - event cause |
1389 *******************************************************************************/ | 1379 *******************************************************************************/ |
1390 | 1380 |
1391 static void cphs_Line_Edit_cb(T_MFW_HND win, USHORT Identifier, SHORT reason) | 1381 static void cphs_Line_Edit_cb(T_MFW_HND win, USHORT Identifier, SHORT reason) |
1392 { | 1382 { |
1393 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; | 1383 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; |
1394 T_ALS_DATA* data = (T_ALS_DATA *)win_data->user; | 1384 T_ALS_DATA* data = (T_ALS_DATA *)win_data->user; |
1395 T_DISPLAY_DATA display_info; | 1385 T_DISPLAY_DATA display_info; |
1396 | 1386 |
1397 switch (reason) | 1387 switch (reason) |
1398 { | 1388 { |
1399 case INFO_KCD_ALTERNATELEFT: | 1389 case INFO_KCD_ALTERNATELEFT: |
1400 case INFO_KCD_LEFT: | 1390 case INFO_KCD_LEFT: |
1401 { | 1391 { |
1402 if( Identifier == LINE1 ) | 1392 if( Identifier == LINE1 ) |
1403 strcpy(FFS_flashData.line1,(char *)data->edt_buf_name); | 1393 strcpy(FFS_flashData.line1,(char *)data->edt_buf_name); |
1404 else | 1394 else |
1405 strcpy(FFS_flashData.line2,(char *)data->edt_buf_name); | 1395 strcpy(FFS_flashData.line2,(char *)data->edt_buf_name); |
1406 | 1396 |
1407 flash_write(); | 1397 flash_write(); |
1408 | 1398 |
1409 | 1399 dlg_initDisplayData_TextId(&display_info, TxtNull, TxtNull, TxtDone, TxtNull, COLOUR_STATUS_WELCOME); |
1410 dlg_initDisplayData_TextId(&display_info, TxtNull, TxtNull, TxtDone, TxtNull, COLOUR_STATUS_WELCOME); | 1400 |
1411 | 1401 dlg_initDisplayData_events( &display_info, NULL, TWO_SECS, KEY_ALL ); |
1412 dlg_initDisplayData_events( &display_info, NULL, TWO_SECS, KEY_ALL ); | 1402 |
1413 | 1403 info_dialog(win,&display_info); |
1414 info_dialog(win,&display_info); | 1404 |
1415 | 1405 #ifdef NEW_EDITOR |
1416 #ifdef NEW_EDITOR | 1406 AUI_edit_Destroy(data->input_number_win); |
1417 AUI_edit_Destroy(data->input_number_win); | 1407 #else /* NEW_EDITOR */ |
1418 #else /* NEW_EDITOR */ | 1408 editor_destroy(data->input_number_win); |
1419 editor_destroy(data->input_number_win); | 1409 #endif /* NEW_EDITOR */ |
1420 #endif /* NEW_EDITOR */ | 1410 data->input_number_win = 0; |
1421 data->input_number_win = 0; | 1411 //dspl_ClearAll(); |
1422 //dspl_ClearAll(); | 1412 |
1423 | 1413 winDelete(win); |
1424 | 1414 } |
1425 winDelete(win); | |
1426 } | |
1427 break; | 1415 break; |
1428 case INFO_KCD_RIGHT: | 1416 |
1429 case INFO_KCD_HUP: | 1417 case INFO_KCD_RIGHT: |
1430 { | 1418 case INFO_KCD_HUP: |
1431 /* SPR#1428 - SH - New Editor changes */ | 1419 { |
1432 #ifdef NEW_EDITOR | 1420 /* SPR#1428 - SH - New Editor changes */ |
1433 AUI_edit_Destroy(data->input_number_win); | 1421 #ifdef NEW_EDITOR |
1434 #else /* NEW_EDITOR */ | 1422 AUI_edit_Destroy(data->input_number_win); |
1435 editor_destroy(data->input_number_win); | 1423 #else /* NEW_EDITOR */ |
1436 #endif /* NEW_EDITOR */ | 1424 editor_destroy(data->input_number_win); |
1437 data->input_number_win = 0; | 1425 #endif /* NEW_EDITOR */ |
1438 //dspl_ClearAll(); | 1426 data->input_number_win = 0; |
1439 winDelete(win); | 1427 //dspl_ClearAll(); |
1440 | 1428 winDelete(win); |
1441 } | 1429 |
1442 break; | 1430 } |
1443 | 1431 break; |
1444 default: | 1432 |
1445 TRACE_EVENT("Err: Default"); | 1433 default: |
1446 break; | 1434 TRACE_EVENT("Err: Default"); |
1447 | 1435 break; |
1448 | 1436 |
1449 } | 1437 } |
1450 } | 1438 } |
1451 | 1439 |
1452 static void cphs_edit_line_exec_cb(T_MFW_HND win, USHORT event, SHORT identifier, void *parameter) | 1440 static void cphs_edit_line_exec_cb(T_MFW_HND win, USHORT event, SHORT identifier, void *parameter) |
1453 { | 1441 { |
1454 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; | 1442 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; |
1455 T_ALS_DATA* data = (T_ALS_DATA *)win_data->user; | 1443 T_ALS_DATA* data = (T_ALS_DATA *)win_data->user; |
1456 #ifdef NEW_EDITOR | 1444 #ifdef NEW_EDITOR |
1457 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ | 1445 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ |
1458 #else | 1446 #else |
1459 T_EDITOR_DATA editor_data; | 1447 T_EDITOR_DATA editor_data; |
1460 #endif | 1448 #endif |
1461 if( identifier==LINE1 ) | 1449 if( identifier==LINE1 ) |
1462 strcpy((char *) data->edt_buf_name,(char*)MmiRsrcGetText(TxtLine1)); | 1450 strcpy((char *) data->edt_buf_name,(char*)MmiRsrcGetText(TxtLine1)); |
1463 else | 1451 else |
1464 strcpy((char *) data->edt_buf_name,(char*)MmiRsrcGetText(TxtLine2)); | 1452 strcpy((char *) data->edt_buf_name,(char*)MmiRsrcGetText(TxtLine2)); |
1465 | 1453 |
1466 TRACE_FUNCTION ("cphs_edit_line_exec_cb()"); | 1454 TRACE_FUNCTION ("cphs_edit_line_exec_cb()"); |
1467 | 1455 |
1468 switch (event) | 1456 switch (event) |
1469 { | 1457 { |
1470 case E_INIT: | 1458 case E_INIT: |
1471 | 1459 |
1472 #ifdef NEW_EDITOR | 1460 #ifdef NEW_EDITOR |
1473 AUI_edit_SetDefault(&editor_data); | 1461 AUI_edit_SetDefault(&editor_data); |
1474 AUI_edit_SetDisplay(&editor_data, PHNO_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); | 1462 AUI_edit_SetDisplay(&editor_data, PHNO_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); |
1475 AUI_edit_SetEvents(&editor_data, identifier, FALSE, FOREVER, (T_AUI_EDIT_CB)cphs_Line_Edit_cb); | 1463 AUI_edit_SetEvents(&editor_data, identifier, FALSE, FOREVER, (T_AUI_EDIT_CB)cphs_Line_Edit_cb); |
1476 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtDelete, TxtNull, NULL); | 1464 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtDelete, TxtNull, NULL); |
1477 AUI_edit_SetAltTextStr(&editor_data, 1, TxtSoftOK, TRUE, TxtSoftBack); | 1465 AUI_edit_SetAltTextStr(&editor_data, 1, TxtSoftOK, TRUE, TxtSoftBack); |
1478 AUI_edit_SetMode(&editor_data, ED_MODE_ALPHA, ED_CURSOR_NONE); | 1466 AUI_edit_SetMode(&editor_data, ED_MODE_ALPHA, ED_CURSOR_NONE); |
1479 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII,(UBYTE *) data->edt_buf_name, MAX_LINE_NAME_LEN); | 1467 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII,(UBYTE *) data->edt_buf_name, MAX_LINE_NAME_LEN); |
1480 data->input_number_win=AUI_edit_Start(data->win, &editor_data); | 1468 data->input_number_win=AUI_edit_Start(data->win, &editor_data); |
1481 #else /* NEW_EDITOR */ | 1469 #else /* NEW_EDITOR */ |
1482 | 1470 |
1483 SmsSend_loadEditDefault(&editor_data); | 1471 SmsSend_loadEditDefault(&editor_data); |
1484 | 1472 |
1485 bookSetEditAttributes( PHNO_EDITOR, COLOUR_EDITOR_XX, 0, edtCurBar1, 0, | 1473 bookSetEditAttributes( PHNO_EDITOR, COLOUR_EDITOR_XX, 0, edtCurBar1, 0, |
1486 (char *) data->edt_data.NumberBuffer, /*MAX_SEARCH_CHAR*/NUMBER_LENGTH, &editor_data.editor_attr); | 1474 (char *) data->edt_data.NumberBuffer, /*MAX_SEARCH_CHAR*/NUMBER_LENGTH, &editor_data.editor_attr); |
1487 editor_data.editor_attr.text = (char *)data->edt_buf_name; | 1475 editor_data.editor_attr.text = (char *)data->edt_buf_name; |
1488 | 1476 |
1489 editor_data.editor_attr.size = MAX_LINE_NAME_LEN; | 1477 editor_data.editor_attr.size = MAX_LINE_NAME_LEN; |
1490 | 1478 |
1491 editor_data.TextId = TxtNull; | 1479 editor_data.TextId = TxtNull; |
1492 editor_data.LeftSoftKey = TxtSoftOK; | 1480 editor_data.LeftSoftKey = TxtSoftOK; |
1493 editor_data.AlternateLeftSoftKey = TxtSoftOK; | 1481 editor_data.AlternateLeftSoftKey = TxtSoftOK; |
1494 editor_data.RightSoftKey = TxtDelete; | 1482 editor_data.RightSoftKey = TxtDelete; |
1495 editor_data.Identifier = identifier ; | 1483 editor_data.Identifier = identifier ; |
1496 editor_data.mode = E_EDIT_DIGITS_MODE; | 1484 editor_data.mode = E_EDIT_DIGITS_MODE; |
1497 editor_data.Callback = (T_EDIT_CB)cphs_Line_Edit_cb; | 1485 editor_data.Callback = (T_EDIT_CB)cphs_Line_Edit_cb; |
1498 editor_data.destroyEditor = FALSE; | 1486 editor_data.destroyEditor = FALSE; |
1499 data->input_number_win =editor_start(data->win, &editor_data); /* start the editor */ | 1487 data->input_number_win =editor_start(data->win, &editor_data); /* start the editor */ |
1500 | 1488 |
1501 | 1489 /* SPR#1428 - SH - New Editor changes */ |
1502 /* SPR#1428 - SH - New Editor changes */ | 1490 #endif |
1503 | 1491 |
1504 #endif | 1492 break; |
1505 | 1493 default: |
1506 break; | 1494 TRACE_EVENT("Err: Default"); |
1507 default: | 1495 break; |
1508 TRACE_EVENT("Err: Default"); | 1496 } |
1509 break; | 1497 } |
1510 } | 1498 |
1511 } | 1499 /******************************************************************************* |
1512 | 1500 |
1513 /******************************************************************************* | 1501 $Function: cphs_edit_line_create |
1514 | 1502 |
1515 $Function: cphs_edit_line_create | 1503 $Description: Create a window for entering the text |
1516 | 1504 |
1517 $Description: Create a window for entering the text | 1505 $Returns: window handle |
1518 | 1506 |
1519 $Returns: window handle | 1507 $Arguments: parent_window - parent window. |
1520 | 1508 |
1521 $Arguments: parent_window - parent window. | 1509 *******************************************************************************/ |
1522 | |
1523 *******************************************************************************/ | |
1524 | |
1525 | 1510 |
1526 static T_MFW_HND cphs_edit_line_create(MfwHnd parent_window) | 1511 static T_MFW_HND cphs_edit_line_create(MfwHnd parent_window) |
1527 { | 1512 { |
1528 T_ALS_DATA* data = (T_ALS_DATA *)ALLOC_MEMORY (sizeof (T_ALS_DATA)); | 1513 T_ALS_DATA* data = (T_ALS_DATA *)ALLOC_MEMORY (sizeof (T_ALS_DATA)); |
1529 T_MFW_WIN * win; | 1514 T_MFW_WIN * win; |
1530 | 1515 |
1531 TRACE_FUNCTION ("cphs_edit_line_create()"); | 1516 TRACE_FUNCTION ("cphs_edit_line_create()"); |
1532 | 1517 |
1533 // Create window handler | 1518 // Create window handler |
1534 data->win = win_create (parent_window, 0, E_WIN_VISIBLE, NULL); | 1519 data->win = win_create (parent_window, 0, E_WIN_VISIBLE, NULL); |
1535 if (data->win EQ NULL) | 1520 if (data->win EQ NULL) |
1536 { | 1521 { |
1537 return NULL; | 1522 return NULL; |
1538 } | 1523 } |
1539 | 1524 |
1540 // connect the dialog data to the MFW-window | 1525 // connect the dialog data to the MFW-window |
1541 data->mmi_control.dialog = (T_DIALOG_FUNC)cphs_edit_line_exec_cb; | 1526 data->mmi_control.dialog = (T_DIALOG_FUNC)cphs_edit_line_exec_cb; |
1542 data->mmi_control.data = data; | 1527 data->mmi_control.data = data; |
1543 win = ((T_MFW_HDR *)data->win)->data; | 1528 win = ((T_MFW_HDR *)data->win)->data; |
1544 win->user = (MfwUserDataPtr)data; | 1529 win->user = (MfwUserDataPtr)data; |
1545 data->parent_win = parent_window; | 1530 data->parent_win = parent_window; |
1546 | 1531 |
1547 winShow(data->win); | 1532 winShow(data->win); |
1548 return data->win; | 1533 return data->win; |
1549 } | 1534 } |
1550 | 1535 |
1551 /******************************************************************************* | 1536 /******************************************************************************* |
1552 | 1537 |
1553 $Function: cphs_edit_line1 | 1538 $Function: cphs_edit_line1 |
1554 | 1539 |
1555 $Description: edit line name from menu | 1540 $Description: edit line name from menu |
1556 | 1541 |
1557 $Returns: status int | 1542 $Returns: status int |
1558 | 1543 |
1559 $Arguments: menu, tag (not used) | 1544 $Arguments: menu, tag (not used) |
1560 | 1545 |
1561 *******************************************************************************/ | 1546 *******************************************************************************/ |
1562 int cphs_edit_line1(MfwMnu* m, MfwMnuItem* i) | 1547 int cphs_edit_line1(MfwMnu* m, MfwMnuItem* i) |
1563 { | 1548 { |
1564 T_MFW_HND parent_win = mfw_parent(mfw_header()); | 1549 T_MFW_HND parent_win = mfw_parent(mfw_header()); |
1565 T_MFW_HND win = cphs_edit_line_create(parent_win); | 1550 T_MFW_HND win = cphs_edit_line_create(parent_win); |
1566 SEND_EVENT(win,E_INIT,LINE1,0); | 1551 SEND_EVENT(win,E_INIT,LINE1,0); |
1567 /* a0393213 (WR - missing return statement at end of non-void function "cphs_edit_line1")*/ | 1552 /* a0393213 (WR - missing return statement at end of non-void function "cphs_edit_line1")*/ |
1568 return MFW_EVENT_CONSUMED; | 1553 return MFW_EVENT_CONSUMED; |
1569 } | 1554 } |
1570 | 1555 |
1571 | 1556 |
1572 /******************************************************************************* | 1557 /******************************************************************************* |
1573 | 1558 |
1574 $Function: cphs_edit_line2 | 1559 $Function: cphs_edit_line2 |
1575 | 1560 |
1576 $Description: edit line name from menu | 1561 $Description: edit line name from menu |
1577 | 1562 |
1578 $Returns: status int | 1563 $Returns: status int |
1579 | 1564 |
1580 $Arguments: menu, tag (not used) | 1565 $Arguments: menu, tag (not used) |
1581 | 1566 |
1582 *******************************************************************************/ | 1567 *******************************************************************************/ |
1583 int cphs_edit_line2(MfwMnu* m, MfwMnuItem* i) | 1568 int cphs_edit_line2(MfwMnu* m, MfwMnuItem* i) |
1584 { | 1569 { |
1585 T_MFW_HND parent_win = mfw_parent(mfw_header()); | 1570 T_MFW_HND parent_win = mfw_parent(mfw_header()); |
1586 T_MFW_HND win = cphs_edit_line_create(parent_win); | 1571 T_MFW_HND win = cphs_edit_line_create(parent_win); |
1587 SEND_EVENT(win,E_INIT,LINE2,0); | 1572 SEND_EVENT(win,E_INIT,LINE2,0); |
1588 /* a0393213 (WR - missing return statement at end of non-void function "cphs_edit_line2")*/ | 1573 /* a0393213 (WR - missing return statement at end of non-void function "cphs_edit_line2")*/ |
1589 return MFW_EVENT_CONSUMED; | 1574 return MFW_EVENT_CONSUMED; |
1590 } | 1575 } |
1591 #endif /*FF_CPHS*/ | 1576 #endif /*FF_CPHS*/ |
1592 | 1577 |
1593 /******************************************************************************* | 1578 /******************************************************************************* |
1594 | 1579 |
1595 $Function: menu_cphs_call_mailbox_number | 1580 $Function: menu_cphs_call_mailbox_number |
1596 | 1581 |
1597 $Description: edit mailbox numbers from menu | 1582 $Description: edit mailbox numbers from menu |
1598 | 1583 |
1599 $Returns: status int | 1584 $Returns: status int |
1600 | 1585 |
1601 $Arguments: menu, tag (not used) | 1586 $Arguments: menu, tag (not used) |
1602 | 1587 |
1603 *******************************************************************************/ | 1588 *******************************************************************************/ |
1604 int menu_cphs_call_mailbox_number(MfwMnu* m, MfwMnuItem* i) | 1589 int menu_cphs_call_mailbox_number(MfwMnu* m, MfwMnuItem* i) |
1605 { T_MFW_HND parent = mfwParent( mfw_header()); | 1590 { T_MFW_HND parent = mfwParent( mfw_header()); |
1606 T_MFW_CPHS_INFO configuration; | 1591 T_MFW_CPHS_INFO configuration; |
1607 | 1592 |
1608 TRACE_FUNCTION("menu_cphs_call_mailbox_number"); | 1593 TRACE_FUNCTION("menu_cphs_call_mailbox_number"); |
1609 | 1594 |
1610 type_of_list = MAILBOX_LIST_CALL; | 1595 type_of_list = MAILBOX_LIST_CALL; |
1611 cphs_config(&configuration); | 1596 cphs_config(&configuration); |
1612 /***************************Go-lite Optimization changes Start***********************/ | 1597 /***************************Go-lite Optimization changes Start***********************/ |
1613 //Aug 16, 2004 REF: CRR 24323 Deepa M.D | 1598 //Aug 16, 2004 REF: CRR 24323 Deepa M.D |
1614 TRACE_EVENT_P2( "CPHS? %d Mailbox config info: %d", configuration.mbNum, CphsPresent()); | 1599 TRACE_EVENT_P2( "CPHS? %d Mailbox config info: %d", configuration.mbNum, CphsPresent()); |
1615 /***************************Go-lite Optimization changes end***********************/ | 1600 /***************************Go-lite Optimization changes end***********************/ |
1616 if (CphsMailboxPresent()==TRUE ) | 1601 if (CphsMailboxPresent()==TRUE ) |
1617 cphs_get_mailbox(); | 1602 cphs_get_mailbox(); |
1618 else | 1603 else |
1619 M_callVoice(m, i); | 1604 M_callVoice(m, i); |
1620 return MFW_EVENT_CONSUMED; | 1605 return MFW_EVENT_CONSUMED; |
1621 } | 1606 } |
1622 /******************************************************************************* | 1607 /******************************************************************************* |
1623 | 1608 |
1624 $Function: menu_cphs_edit_mailbox_number | 1609 $Function: menu_cphs_edit_mailbox_number |
1625 | 1610 |
1626 $Description: edit mailbox numbers from menu | 1611 $Description: edit mailbox numbers from menu |
1627 | 1612 |
1628 $Returns: status int | 1613 $Returns: status int |
1629 | 1614 |
1630 $Arguments: menu, tag (not used) | 1615 $Arguments: menu, tag (not used) |
1631 | 1616 |
1632 *******************************************************************************/ | 1617 *******************************************************************************/ |
1633 int menu_cphs_edit_mailbox_number(MfwMnu* m, MfwMnuItem* i) | 1618 int menu_cphs_edit_mailbox_number(MfwMnu* m, MfwMnuItem* i) |
1634 { T_MFW_HND parent = mfwParent( mfw_header()); | 1619 { T_MFW_HND parent = mfwParent( mfw_header()); |
1635 T_MFW_CPHS_INFO configuration; | 1620 T_MFW_CPHS_INFO configuration; |
1636 | 1621 |
1637 TRACE_FUNCTION("menu_cphs_edit_mailbox_number"); | 1622 TRACE_FUNCTION("menu_cphs_edit_mailbox_number"); |
1638 type_of_list = MAILBOX_LIST; | 1623 type_of_list = MAILBOX_LIST; |
1639 | 1624 |
1640 cphs_config(&configuration); | 1625 cphs_config(&configuration); |
1641 /***************************Go-lite Optimization changes Start***********************/ | 1626 /***************************Go-lite Optimization changes Start***********************/ |
1642 //Aug 16, 2004 REF: CRR 24323 Deepa M.D | 1627 //Aug 16, 2004 REF: CRR 24323 Deepa M.D |
1643 TRACE_EVENT_P2( "CPHS? %d Mailbox config info: %d", configuration.mbNum, CphsPresent()); | 1628 TRACE_EVENT_P2( "CPHS? %d Mailbox config info: %d", configuration.mbNum, CphsPresent()); |
1644 /***************************Go-lite Optimization changes end***********************/ | 1629 /***************************Go-lite Optimization changes end***********************/ |
1645 if (CphsMailboxPresent()==TRUE ) | 1630 if (CphsMailboxPresent()==TRUE ) |
1646 cphs_get_mailbox(); | 1631 cphs_get_mailbox(); |
1647 else | 1632 else |
1648 M_exeVoice(m, i); | 1633 M_exeVoice(m, i); |
1649 return MFW_EVENT_CONSUMED; | 1634 return MFW_EVENT_CONSUMED; |
1650 } | 1635 } |
1651 | 1636 |
1652 | 1637 |
1653 #ifdef FF_CPHS_REL4 | 1638 #ifdef FF_CPHS_REL4 |
1654 /******************************************************************************* | 1639 /******************************************************************************* |
1655 | 1640 |
1656 $Function: menu_cphs_rel4_show_mailbox_number | 1641 $Function: menu_cphs_rel4_show_mailbox_number |
1657 | 1642 |
1658 $Description: menu handler function for any item in MailBox menu | 1643 $Description: menu handler function for any item in MailBox menu |
1659 | 1644 |
1660 *******************************************************************************/ | 1645 *******************************************************************************/ |
1661 int menu_cphs_rel4_show_mailbox_number(MfwMnu* m, MfwMnuItem* i) | 1646 int menu_cphs_rel4_show_mailbox_number(MfwMnu* m, MfwMnuItem* i) |
1662 { | 1647 { |
1663 if(cphs_rel4_mbi.valid==1) | 1648 if(cphs_rel4_mbi.valid==1) |
1664 { | 1649 { |
1665 /*already cached - no need to read SIM*/ | 1650 /*already cached - no need to read SIM*/ |
1666 sendCPHSSignal(E_CPHS_REL4_GET_MBI,&cphs_rel4_mbi ); | 1651 sendCPHSSignal(E_CPHS_REL4_GET_MBI,&cphs_rel4_mbi ); |
1667 } | 1652 } |
1668 else | 1653 else |
1669 { | 1654 { |
1670 /*local copy not valid - read from SIM*/ | 1655 /*local copy not valid - read from SIM*/ |
1671 UBYTE msp_id=mfw_cphs_get_reg_profile(); | 1656 UBYTE msp_id=mfw_cphs_get_reg_profile(); |
1672 T_DISPLAY_DATA display_info; | 1657 T_DISPLAY_DATA display_info; |
1673 TRACE_FUNCTION("menu_cphs_rel4_show_mailbox_number"); | 1658 TRACE_FUNCTION("menu_cphs_rel4_show_mailbox_number"); |
1674 switch (m->lCursor[m->level]) | 1659 switch (m->lCursor[m->level]) |
1675 { | 1660 { |
1676 case 0: | 1661 case 0: |
1677 TRACE_EVENT("voice selected"); | 1662 TRACE_EVENT("voice selected"); |
1678 mailbox_type=T_MFW_CPHS_REL4_MAILBOX_VOICE; | 1663 mailbox_type=T_MFW_CPHS_REL4_MAILBOX_VOICE; |
1679 break; | 1664 break; |
1680 case 1: | 1665 case 1: |
1681 TRACE_EVENT("fax selected"); | 1666 TRACE_EVENT("fax selected"); |
1682 mailbox_type=T_MFW_CPHS_REL4_MAILBOX_FAX; | 1667 mailbox_type=T_MFW_CPHS_REL4_MAILBOX_FAX; |
1683 break; | 1668 break; |
1684 case 2: | 1669 case 2: |
1685 TRACE_EVENT("electronic selected"); | 1670 TRACE_EVENT("electronic selected"); |
1686 mailbox_type=T_MFW_CPHS_REL4_MAILBOX_ELECTRONIC; | 1671 mailbox_type=T_MFW_CPHS_REL4_MAILBOX_ELECTRONIC; |
1687 break; | 1672 break; |
1688 case 3: | 1673 case 3: |
1689 TRACE_EVENT("other selected"); | 1674 TRACE_EVENT("other selected"); |
1690 mailbox_type=T_MFW_CPHS_REL4_MAILBOX_OTHER; | 1675 mailbox_type=T_MFW_CPHS_REL4_MAILBOX_OTHER; |
1691 break; | 1676 break; |
1692 default: | 1677 default: |
1693 TRACE_ERROR("menu index out of range"); | 1678 TRACE_ERROR("menu index out of range"); |
1694 break; | 1679 break; |
1695 } | 1680 } |
1696 qAT_PercentMBI(CMD_SRC_LCL,msp_id); | 1681 qAT_PercentMBI(CMD_SRC_LCL,msp_id); |
1697 | 1682 |
1698 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtPleaseWait, TxtNull, COLOUR_STATUS_WAIT); | 1683 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtPleaseWait, TxtNull, COLOUR_STATUS_WAIT); |
1699 dlg_initDisplayData_events( &display_info, NULL, FOREVER, 0 ); | 1684 dlg_initDisplayData_events( &display_info, NULL, FOREVER, 0 ); |
1700 | 1685 |
1701 mailbox_waiting_dialog=info_dialog (mfw_parent(mfwFocus), &display_info); | 1686 mailbox_waiting_dialog=info_dialog (mfw_parent(mfwFocus), &display_info); |
1702 | 1687 |
1703 } | 1688 } |
1704 } | 1689 } |
1705 #endif | 1690 #endif |
1706 /******************************************************************************* | 1691 /******************************************************************************* |
1707 | 1692 |
1708 $Function: InfoNumbers | 1693 $Function: InfoNumbers |
1709 | 1694 |
1710 $Description: displays information number list from CPHS | 1695 $Description: displays information number list from CPHS |
1711 | 1696 |
1712 $Returns: MFW_EVENT_CONSUMED always | 1697 $Returns: MFW_EVENT_CONSUMED always |
1713 | 1698 |
1714 $Arguments: m, menu, i, item | 1699 $Arguments: m, menu, i, item |
1715 | 1700 |
1716 *******************************************************************************/ | 1701 *******************************************************************************/ |
1717 | 1702 |
1718 int InfoNumbers( MfwMnu *m, MfwMnuItem *i ) | 1703 int InfoNumbers( MfwMnu *m, MfwMnuItem *i ) |
1719 { | 1704 { |
1720 T_MFW_HND win; | 1705 T_MFW_HND win; |
1721 T_MFW_HND parent_win = mfw_parent(mfw_header()); | 1706 T_MFW_HND parent_win = mfw_parent(mfw_header()); |
1722 T_MFW_CPHS_INFO config_info; | 1707 T_MFW_CPHS_INFO config_info; |
1723 | 1708 |
1724 cphs_config(&config_info); | 1709 cphs_config(&config_info); |
1725 /***************************Go-lite Optimization changes Start***********************/ | 1710 /***************************Go-lite Optimization changes Start***********************/ |
1726 //Aug 16, 2004 REF: CRR 24323 Deepa M.D | 1711 //Aug 16, 2004 REF: CRR 24323 Deepa M.D |
1727 TRACE_EVENT_P1("Info Num config info: %d", config_info.iNum); | 1712 TRACE_EVENT_P1("Info Num config info: %d", config_info.iNum); |
1728 /***************************Go-lite Optimization changes end***********************/ | 1713 /***************************Go-lite Optimization changes end***********************/ |
1729 if (CphsPresent() && config_info.iNum&0x03) | 1714 if (CphsPresent() && config_info.iNum&0x03) |
1730 { if (info_numbers[0] != NULL&& info_numbers[0]->count != 0) | 1715 { if (info_numbers[0] != NULL&& info_numbers[0]->count != 0) |
1731 { type_of_list = INFO_NUM_LIST; | 1716 { type_of_list = INFO_NUM_LIST; |
1732 info_num_level = 1; | 1717 info_num_level = 1; |
1733 win = buildInfoNumberMenu(parent_win); | 1718 win = buildInfoNumberMenu(parent_win); |
1734 | 1719 |
1735 if (win NEQ NULL) | 1720 if (win NEQ NULL) |
1736 { | 1721 { |
1737 SEND_EVENT (win, E_INIT, 0, 0); | 1722 SEND_EVENT (win, E_INIT, 0, 0); |
1738 } | 1723 } |
1739 } | 1724 } |
1740 else | 1725 else |
1741 ShowMessage(parent_win, TxtEmptyList, TxtNull); | 1726 ShowMessage(parent_win, TxtEmptyList, TxtNull); |
1742 } | 1727 } |
1743 else | 1728 else |
1744 ShowMessage(parent_win, TxtNotSupported, TxtNull); | 1729 ShowMessage(parent_win, TxtNotSupported, TxtNull); |
1745 | 1730 |
1746 return MFW_EVENT_CONSUMED; | 1731 return MFW_EVENT_CONSUMED; |
1747 } | 1732 } |
1748 | 1733 |
1749 | 1734 |
1750 /******************************************************************************* | 1735 /******************************************************************************* |
1751 | 1736 |
1752 $Function: CphsRequestOperatorName() | 1737 $Function: CphsRequestOperatorName() |
1753 | 1738 |
1754 $Description: returns operator name data structure from CPHS SIM data | 1739 $Description: returns operator name data structure from CPHS SIM data |
1755 | 1740 |
1756 $Returns: see above | 1741 $Returns: see above |
1757 | 1742 |
1758 $Arguments: none | 1743 $Arguments: none |
1759 | 1744 |
1760 *******************************************************************************/ | 1745 *******************************************************************************/ |
1761 T_MFW_CPHS_OP_NAME* CphsRequestOperatorName() | 1746 T_MFW_CPHS_OP_NAME* CphsRequestOperatorName() |
1762 { | 1747 { |
1763 return &operator_name; | 1748 return &operator_name; |
1764 } | 1749 } |
1765 | 1750 |
1766 /******************************************************************************* | 1751 /******************************************************************************* |
1767 | 1752 |
1768 $Function: CphsPresent() | 1753 $Function: CphsPresent() |
1769 | 1754 |
1770 $Description: indicates whether CPHS sim or not | 1755 $Description: indicates whether CPHS sim or not |
1771 | 1756 |
1772 $Returns: TRUE if it is, FALSe if it isn't | 1757 $Returns: TRUE if it is, FALSe if it isn't |
1773 $Arguments: none | 1758 $Arguments: none |
1774 | 1759 |
1775 *******************************************************************************/ | 1760 *******************************************************************************/ |
1776 UBYTE CphsPresent() | 1761 UBYTE CphsPresent() |
1777 { | 1762 { |
1778 //x0pleela 11 June, 2006 DR:OMAPS00079692 | 1763 //x0pleela 11 June, 2006 DR:OMAPS00079692 |
1779 //changed from CPHS_OK to MFW_CPHS_OK | 1764 //changed from CPHS_OK to MFW_CPHS_OK |
1780 if (cphs_status == MFW_CPHS_OK) | 1765 if (cphs_status == MFW_CPHS_OK) |
1781 return TRUE; | 1766 return TRUE; |
1782 else | 1767 else |
1783 { if (cphs_status == CPHS_NotPresent) | 1768 { if (cphs_status == CPHS_NotPresent) |
1784 return FALSE; | 1769 return FALSE; |
1785 else /*MC 21/05/02, CONQ5999->6007 Helps diagnose initialisation probs*/ | 1770 else /*MC 21/05/02, CONQ5999->6007 Helps diagnose initialisation probs*/ |
1786 return CPHS_ERR; | 1771 return CPHS_ERR; |
1787 } | 1772 } |
1788 } | 1773 } |
1789 /******************************************************************************* | 1774 /******************************************************************************* |
1790 | 1775 |
1791 $Function: CphsMailboxPresent | 1776 $Function: CphsMailboxPresent |
1792 | 1777 |
1793 $Description: indicates whether a CPHS SIM which supports mailbox numbers | 1778 $Description: indicates whether a CPHS SIM which supports mailbox numbers |
1794 | 1779 |
1795 $Returns: TRUE if it is, FALSe if it isn't | 1780 $Returns: TRUE if it is, FALSe if it isn't |
1796 $Arguments: none | 1781 $Arguments: none |
1797 | 1782 |
1798 *******************************************************************************/ | 1783 *******************************************************************************/ |
1799 USHORT CphsMailboxPresent( /*struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi*/ ) | 1784 USHORT CphsMailboxPresent( /*struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi*/ ) |
1800 { T_MFW_CPHS_INFO config_info; | 1785 { T_MFW_CPHS_INFO config_info; |
1801 | 1786 |
1802 TRACE_FUNCTION("CphsMailboxPresent"); | 1787 TRACE_FUNCTION("CphsMailboxPresent"); |
1803 cphs_config(&config_info); | 1788 cphs_config(&config_info); |
1804 | 1789 |
1805 if (config_info.mbNum &0x03 && CphsPresent()) | 1790 if (config_info.mbNum &0x03 && CphsPresent()) |
1806 return /*0*/TRUE; | 1791 return /*0*/TRUE; |
1807 else | 1792 else |
1808 return /*1*/FALSE; | 1793 return /*1*/FALSE; |
1809 | 1794 |
1810 } | 1795 } |
1811 /******************************************************************************* | 1796 /******************************************************************************* |
1812 | 1797 |
1813 $Function: ALSPresent | 1798 $Function: ALSPresent |
1814 | 1799 |
1815 $Description: indicates whether a CPHS SIM supports ALS by checking CSP | 1800 $Description: indicates whether a CPHS SIM supports ALS by checking CSP |
1816 | 1801 |
1817 $Returns: 0 if it does, 1 if it doesn't | 1802 $Returns: 0 if it does, 1 if it doesn't |
1818 $Arguments: menu tag, menu attribute tag, menu item tag (none of them used, | 1803 $Arguments: menu tag, menu attribute tag, menu item tag (none of them used, |
1819 this is merely the format for menu display/suppression functions) | 1804 this is merely the format for menu display/suppression functions) |
1820 | 1805 |
1821 *******************************************************************************/ | 1806 *******************************************************************************/ |
1822 USHORT ALSPresent( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ) | 1807 USHORT ALSPresent( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ) |
1823 { | 1808 { |
1824 //xvilliva SPR17291 - The pre-existing code was returning ALS not supported | 1809 //xvilliva SPR17291 - The pre-existing code was returning ALS not supported |
1825 // even if it the SIM supported. Changed the code to call | 1810 // even if it the SIM supported. Changed the code to call |
1826 // tAT_PercentALS() and qAT_PercentALS(). | 1811 // tAT_PercentALS() and qAT_PercentALS(). |
1827 | 1812 |
1828 #ifndef FF_CPHS | 1813 #ifndef FF_CPHS |
1829 T_ACI_ALS_MOD ALSmode = (T_ACI_ALS_MOD)0; // RAVI | 1814 T_ACI_ALS_MOD ALSmode = (T_ACI_ALS_MOD)0; // RAVI |
1830 #endif | 1815 #endif |
1831 | 1816 |
1832 //x0pleela 23 May, 2006 DR: OMAP00070657 | 1817 //x0pleela 23 May, 2006 DR: OMAP00070657 |
1833 //Returning the status of ALS based on CSP data | 1818 //Returning the status of ALS based on CSP data |
1834 #ifdef FF_CPHS | 1819 #ifdef FF_CPHS |
1835 if( mmi_cphs_get_als_value() ) | 1820 if( mmi_cphs_get_als_value() ) |
1836 return 0; | 1821 return 0; |
1837 else | 1822 else |
1838 return 1; | 1823 return 1; |
1839 #else | 1824 #else |
1840 | 1825 |
1841 tAT_PercentALS( CMD_SRC_NONE, &ALSmode ); | 1826 tAT_PercentALS( CMD_SRC_NONE, &ALSmode ); |
1842 qAT_PercentALS( CMD_SRC_NONE, &ALSmode ); | 1827 qAT_PercentALS( CMD_SRC_NONE, &ALSmode ); |
1843 | 1828 |
1844 // ALSmode = 1;//xvilliva SPR17291 - IMP: Hardcoded for our SIMS - got to test on ALS sim. | 1829 // ALSmode = 1;//xvilliva SPR17291 - IMP: Hardcoded for our SIMS - got to test on ALS sim. |
1845 | 1830 |
1846 return (!ALSmode);//returns 0 (if line1 or line2) returns 1 if not supported. | 1831 return (!ALSmode);//returns 0 (if line1 or line2) returns 1 if not supported. |
1847 #endif | 1832 #endif |
1848 } | 1833 } |
1849 | 1834 |
1850 /******************************************************************************* | 1835 /******************************************************************************* |
1851 | 1836 |
1852 $Function: CphsALSUnlocked | 1837 $Function: CphsALSUnlocked |
1853 | 1838 |
1854 $Description: Indicates whether a CPHS SIM's support of ALS has been locked by the User | 1839 $Description: Indicates whether a CPHS SIM's support of ALS has been locked by the User |
1855 | 1840 |
1856 $Returns: 0 if it hasn't, 1 if it has | 1841 $Returns: 0 if it hasn't, 1 if it has |
1857 $Arguments: menu tag, menu attribute tag, menu item tag (none of them used, | 1842 $Arguments: menu tag, menu attribute tag, menu item tag (none of them used, |
1858 this is merely the format for menu display/suppression functions) | 1843 this is merely the format for menu display/suppression functions) |
1859 | 1844 |
1860 *******************************************************************************/ | 1845 *******************************************************************************/ |
1861 USHORT CphsALSUnlocked( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ) | 1846 USHORT CphsALSUnlocked( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ) |
1862 { | 1847 { |
1863 USHORT retVal = CphsALSLocked(m, ma, mi); | 1848 USHORT retVal = CphsALSLocked(m, ma, mi); |
1864 | 1849 |
1865 if (retVal == 0) | 1850 if (retVal == 0) |
1866 retVal = 1; | 1851 retVal = 1; |
1867 else | 1852 else |
1868 retVal = 0; | 1853 retVal = 0; |
1869 | 1854 |
1870 return (retVal); | 1855 return (retVal); |
1871 } | 1856 } |
1872 /******************************************************************************* | 1857 /******************************************************************************* |
1873 | 1858 |
1874 $Function: CphsALSUnlocked | 1859 $Function: CphsALSUnlocked |
1875 | 1860 |
1876 $Description: Indicates whether a CPHS SIM's support of ALS has been locked by the User | 1861 $Description: Indicates whether a CPHS SIM's support of ALS has been locked by the User |
1877 | 1862 |
1878 $Returns: 0 if it has, 1 if it hasn't | 1863 $Returns: 0 if it has, 1 if it hasn't |
1879 $Arguments: menu tag, menu attribute tag, menu item tag (none of them used, | 1864 $Arguments: menu tag, menu attribute tag, menu item tag (none of them used, |
1880 this is merely the format for menu display/suppression functions) | 1865 this is merely the format for menu display/suppression functions) |
1881 | 1866 |
1882 *******************************************************************************/ | 1867 *******************************************************************************/ |
1883 USHORT CphsALSLocked( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ) | 1868 USHORT CphsALSLocked( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ) |
1884 { | 1869 { |
1885 USHORT retVal; | 1870 USHORT retVal; |
1886 | 1871 |
1887 if (als_status.status == MFW_LINE_LOCKED) | 1872 if (als_status.status == MFW_LINE_LOCKED) |
1888 retVal = 0; | 1873 retVal = 0; |
1889 else | 1874 else |
1890 retVal = 1; | 1875 retVal = 1; |
1891 | 1876 |
1892 return (retVal); | 1877 return (retVal); |
1893 } | 1878 } |
1894 /******************************************************************************* | 1879 /******************************************************************************* |
1895 | 1880 |
1896 $Function: InfoNumbersPresent | 1881 $Function: InfoNumbersPresent |
1897 | 1882 |
1898 $Description: indicates whether a CPHS SIM has Info Numbers by checking CSP | 1883 $Description: indicates whether a CPHS SIM has Info Numbers by checking CSP |
1899 | 1884 |
1900 $Returns: 0 if it does, 1 if it doesn't | 1885 $Returns: 0 if it does, 1 if it doesn't |
1901 $Arguments: none | 1886 $Arguments: none |
1902 | 1887 |
1903 *******************************************************************************/ | 1888 *******************************************************************************/ |
1904 USHORT InfoNumbersPresent( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ) | 1889 USHORT InfoNumbersPresent( struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi ) |
1905 { T_MFW_CPHS_INFO config_info; | 1890 { T_MFW_CPHS_INFO config_info; |
1906 | 1891 |
1907 int i,len; | 1892 int i,len; |
1908 cphs_config(&config_info); | 1893 cphs_config(&config_info); |
1909 /***************************Go-lite Optimization changes Start***********************/ | 1894 /***************************Go-lite Optimization changes Start***********************/ |
1910 //Aug 16, 2004 REF: CRR 24323 Deepa M.D | 1895 //Aug 16, 2004 REF: CRR 24323 Deepa M.D |
1911 TRACE_EVENT_P1("InfoNum config: %d", config_info.iNum); | 1896 TRACE_EVENT_P1("InfoNum config: %d", config_info.iNum); |
1912 /***************************Go-lite Optimization changes end***********************/ | 1897 /***************************Go-lite Optimization changes end***********************/ |
1913 len = strlen((char*)customer_service_profile.csp); /* x0039928 - Lint warning fix */ | 1898 len = strlen((char*)customer_service_profile.csp); /* x0039928 - Lint warning fix */ |
1914 for(i=0; i<len; i+=2) | 1899 for(i=0; i<len; i+=2) |
1915 { | 1900 { |
1916 if (customer_service_profile.csp[i] ==CPHS_INFONUMS_BYTE_VALUE) | 1901 if (customer_service_profile.csp[i] ==CPHS_INFONUMS_BYTE_VALUE) |
1917 if (customer_service_profile.csp[(i+1)] & INFONUM_MASK) | 1902 if (customer_service_profile.csp[(i+1)] & INFONUM_MASK) |
1918 return 0; //ALS is supported | 1903 return 0; //ALS is supported |
1919 } | 1904 } |
1920 return 1; | 1905 return 1; |
1921 } | 1906 } |
1922 /******************************************************************************* | 1907 /******************************************************************************* |
1923 | 1908 |
1924 $Function: GetCphsVoicemailStatus | 1909 $Function: GetCphsVoicemailStatus |
1925 | 1910 |
1926 $Description: Asks MFW to check voicemail status on CPHS SIM | 1911 $Description: Asks MFW to check voicemail status on CPHS SIM |
1927 cphs_mfw_cb handles callback from this | 1912 cphs_mfw_cb handles callback from this |
1928 $Returns: status of line passed as parameter | 1913 $Returns: status of line passed as parameter |
1929 $Arguments: line | 1914 $Arguments: line |
1930 | 1915 |
1931 *******************************************************************************/ | 1916 *******************************************************************************/ |
1932 T_MFW_CFLAG_STATUS GetCphsVoicemailStatus(UBYTE line) | 1917 T_MFW_CFLAG_STATUS GetCphsVoicemailStatus(UBYTE line) |
1933 { | 1918 { |
1934 cphs_get_mailbox_status (); | 1919 cphs_get_mailbox_status (); |
1935 TRACE_EVENT("Requesting voicemail status"); | 1920 TRACE_EVENT("Requesting voicemail status"); |
1936 | 1921 |
1937 /*SPR 2653, removed unneccessary code*/ | 1922 /*SPR 2653, removed unneccessary code*/ |
1938 /*requesting the mailbox status will trigger an event from the MFW if | 1923 /*requesting the mailbox status will trigger an event from the MFW if |
1939 CPHS is supported and that event will cause a voicemail indication window if a | 1924 CPHS is supported and that event will cause a voicemail indication window if a |
1940 voicemail flag has been set in the SIM*/ | 1925 voicemail flag has been set in the SIM*/ |
1941 return MFW_CFLAG_NotPresent; | 1926 return MFW_CFLAG_NotPresent; |
1942 | 1927 } |
1943 | 1928 /******************************************************************************* |
1944 } | 1929 |
1945 /******************************************************************************* | 1930 $Function: GetCphsDivertStatus |
1946 | 1931 |
1947 $Function: GetCphsDivertStatus | 1932 $Description: get call forwarding status of specified line |
1948 | 1933 cphs_mfw_cb handles callback from this |
1949 $Description: get call forwarding status of specified line | 1934 $Returns: status of line passed as parameter |
1950 cphs_mfw_cb handles callback from this | 1935 $Arguments: line |
1951 $Returns: status of line passed as parameter | |
1952 $Arguments: line | |
1953 | 1936 |
1954 *******************************************************************************/ | 1937 *******************************************************************************/ |
1955 | 1938 |
1956 T_MFW_CFLAG_STATUS GetCphsDivertStatus(UBYTE line) | 1939 T_MFW_CFLAG_STATUS GetCphsDivertStatus(UBYTE line) |
1957 { | 1940 { |
1958 switch (line) | 1941 switch (line) |
1959 { | 1942 { |
1960 case MFW_SERV_LINE1: return call_forwarding_status.line1; //break; // RAVI | 1943 case MFW_SERV_LINE1: return call_forwarding_status.line1; //break; // RAVI |
1961 case MFW_SERV_LINE2: return call_forwarding_status.line2; // break; // RAVI | 1944 case MFW_SERV_LINE2: return call_forwarding_status.line2; // break; // RAVI |
1962 case MFW_SERV_FAX: return call_forwarding_status.fax; // break; // RAVI | 1945 case MFW_SERV_FAX: return call_forwarding_status.fax; // break; // RAVI |
1963 case MFW_SERV_DATA: return call_forwarding_status.data; // break; // RAVI | 1946 case MFW_SERV_DATA: return call_forwarding_status.data; // break; // RAVI |
1964 default: return MFW_CFLAG_NotPresent; | 1947 default: return MFW_CFLAG_NotPresent; |
1965 } | 1948 } |
1966 } | 1949 } |
1967 | 1950 |
1968 /******************************************************************************* | 1951 /******************************************************************************* |
1969 | 1952 |
1970 $Function: GetCphsRel4DivertStatus | 1953 $Function: GetCphsRel4DivertStatus |
1971 | 1954 |
1972 $Description: get current call forwarding status | 1955 $Description: get current call forwarding status |
1973 $Arguments: none | 1956 $Arguments: none |
1974 | 1957 |
1975 *******************************************************************************/ | 1958 *******************************************************************************/ |
1976 #ifdef FF_CPHS_REL4 | 1959 #ifdef FF_CPHS_REL4 |
1977 T_MFW_CPHS_REL4_DV_STAT GetCphsRel4DivertStatus() | 1960 T_MFW_CPHS_REL4_DV_STAT GetCphsRel4DivertStatus() |
1978 { | 1961 { |
1979 TRACE_FUNCTION("GetCphsRel4DivertStatus()"); | 1962 TRACE_FUNCTION("GetCphsRel4DivertStatus()"); |
1980 return call_forwarding_status_rel4; | 1963 return call_forwarding_status_rel4; |
1981 } | 1964 } |
1982 | 1965 |
1983 | 1966 |
1984 /******************************************************************************* | 1967 /******************************************************************************* |
1985 | 1968 |
1986 $Function: isCFISFilePresent | 1969 $Function: isCFISFilePresent |
1987 | 1970 |
1988 $Description: says whether the file is allocated and activated or not | 1971 $Description: says whether the file is allocated and activated or not |
1989 $Arguments: none | 1972 $Arguments: none |
1990 $Returns : TRUE - if present | 1973 $Returns : TRUE - if present |
1991 FALSE - if absent | 1974 FALSE - if absent |
1992 | 1975 |
1993 *******************************************************************************/ | 1976 *******************************************************************************/ |
1994 BOOL isCFISFilePresent() | 1977 BOOL isCFISFilePresent() |
1995 { | 1978 { |
1996 TRACE_FUNCTION("isCFISFilePresent()"); | 1979 TRACE_FUNCTION("isCFISFilePresent()"); |
1997 if(sim_serv_table_check((UBYTE)SRV_No_55) == ALLOCATED_AND_ACTIVATED) | 1980 if(sim_serv_table_check((UBYTE)SRV_No_55) == ALLOCATED_AND_ACTIVATED) |
1998 { | 1981 { |
1999 TRACE_EVENT("CFIS PRESENT"); | 1982 TRACE_EVENT("CFIS PRESENT"); |
2000 TRUE; | 1983 TRUE; |
2001 } | 1984 } |
2002 else | 1985 else |
2003 { | 1986 { |
2004 TRACE_EVENT("CFIS NOT PRESENT"); | 1987 TRACE_EVENT("CFIS NOT PRESENT"); |
2005 FALSE; | 1988 FALSE; |
2006 } | 1989 } |
2007 } | 1990 } |
2008 | 1991 |
2009 /******************************************************************************* | 1992 /******************************************************************************* |
2010 | 1993 |
2011 $Function: isMWISFilePresent | 1994 $Function: isMWISFilePresent |
2012 | 1995 |
2013 $Description: says whether the file is allocated and activated or not | 1996 $Description: says whether the file is allocated and activated or not |
2014 $Arguments: none | 1997 $Arguments: none |
2015 $Returns : TRUE - if present | 1998 $Returns : TRUE - if present |
2016 FALSE - if absent | 1999 FALSE - if absent |
2017 | 2000 |
2018 *******************************************************************************/ | 2001 *******************************************************************************/ |
2019 BOOL isMWISFilePresent(void) | 2002 BOOL isMWISFilePresent(void) |
2020 { | 2003 { |
2021 TRACE_FUNCTION("isMWISFilePresent()"); | 2004 TRACE_FUNCTION("isMWISFilePresent()"); |
2022 if(sim_serv_table_check((UBYTE)SRV_No_54) == ALLOCATED_AND_ACTIVATED) | 2005 if(sim_serv_table_check((UBYTE)SRV_No_54) == ALLOCATED_AND_ACTIVATED) |
2023 { | 2006 { |
2024 TRACE_EVENT("MWIS PRESENT"); | 2007 TRACE_EVENT("MWIS PRESENT"); |
2025 TRUE; | 2008 TRUE; |
2026 } | 2009 } |
2027 else | 2010 else |
2028 { | 2011 { |
2029 TRACE_EVENT("MWIS NOT PRESENT"); | 2012 TRACE_EVENT("MWIS NOT PRESENT"); |
2030 FALSE; | 2013 FALSE; |
2031 } | 2014 } |
2032 | 2015 } |
2033 } | 2016 |
2034 | 2017 /******************************************************************************* |
2035 /******************************************************************************* | 2018 |
2036 | 2019 $Function: isMBDNFilePresent |
2037 $Function: isMBDNFilePresent | 2020 |
2038 | 2021 $Description: says whether the file is allocated and activated or not |
2039 $Description: says whether the file is allocated and activated or not | 2022 $Arguments: none |
2040 $Arguments: none | 2023 $Returns : TRUE - if present |
2041 $Returns : TRUE - if present | 2024 FALSE - if absent |
2042 FALSE - if absent | |
2043 | 2025 |
2044 *******************************************************************************/ | 2026 *******************************************************************************/ |
2045 BOOL isMBDNFilePresent(void) | 2027 BOOL isMBDNFilePresent(void) |
2046 { | 2028 { |
2047 TRACE_FUNCTION("isMWISFilePresent()"); | 2029 TRACE_FUNCTION("isMWISFilePresent()"); |
2048 if(sim_serv_table_check((UBYTE)SRV_No_53) == ALLOCATED_AND_ACTIVATED) | 2030 if(sim_serv_table_check((UBYTE)SRV_No_53) == ALLOCATED_AND_ACTIVATED) |
2049 { | 2031 { |
2050 TRACE_EVENT("MBDN PRESENT"); | 2032 TRACE_EVENT("MBDN PRESENT"); |
2051 TRUE; | 2033 TRUE; |
2052 } | 2034 } |
2053 else | 2035 else |
2054 { | 2036 { |
2055 TRACE_EVENT("MBDN NOT PRESENT"); | 2037 TRACE_EVENT("MBDN NOT PRESENT"); |
2056 FALSE; | 2038 FALSE; |
2057 } | 2039 } |
2058 | 2040 } |
2059 } | 2041 #endif |
2060 #endif | 2042 |
2061 | 2043 /******************************************************************************* |
2062 /******************************************************************************* | 2044 |
2063 | 2045 $Function: GetAlsLine |
2064 $Function: GetAlsLine | 2046 $Description: gets current als line |
2065 $Description: gets current als line | 2047 $Returns: current als line |
2066 $Returns: current als line | 2048 $Arguments: line |
2067 $Arguments: line | |
2068 | 2049 |
2069 *******************************************************************************/ | 2050 *******************************************************************************/ |
2070 UBYTE GetAlsLine() | 2051 UBYTE GetAlsLine() |
2071 { | 2052 { |
2072 return als_status.selectedLine; | 2053 return als_status.selectedLine; |
2073 } | 2054 } |
2074 | 2055 |
2075 /******************************************************************************* | 2056 /******************************************************************************* |
2076 | 2057 |
2077 $Function: ShowMessage | 2058 $Function: ShowMessage |
2078 $Description: Displays screen with passed text ids | 2059 $Description: Displays screen with passed text ids |
2079 $Returns: nothing | 2060 $Returns: nothing |
2080 $Arguments: parent window, 2 text ids | 2061 $Arguments: parent window, 2 text ids |
2081 | 2062 |
2082 *******************************************************************************/ | 2063 *******************************************************************************/ |
2083 void ShowMessage(T_MFW_HND win, USHORT TextId1, USHORT TextId2) | 2064 void ShowMessage(T_MFW_HND win, USHORT TextId1, USHORT TextId2) |
2084 { | 2065 { |
2085 | 2066 T_DISPLAY_DATA Dialog; |
2086 T_DISPLAY_DATA Dialog; | 2067 |
2087 | 2068 /* Initialise the dialog control block with default information |
2088 /* Initialise the dialog control block with default information | 2069 */ |
2089 */ | 2070 dlg_initDisplayData_TextId( &Dialog, TxtNull, TxtNull, TextId1, TextId2 , COLOUR_STATUS); |
2090 dlg_initDisplayData_TextId( &Dialog, TxtNull, TxtNull, TextId1, TextId2 , COLOUR_STATUS); | 2071 dlg_initDisplayData_events( &Dialog, NULL, THREE_SECS, KEY_LEFT| KEY_RIGHT|KEY_CLEAR ); |
2091 dlg_initDisplayData_events( &Dialog, NULL, THREE_SECS, KEY_LEFT| KEY_RIGHT|KEY_CLEAR ); | 2072 |
2092 | 2073 /* Show the dialog |
2093 /* Show the dialog | 2074 */ |
2094 */ | 2075 info_dialog( win, &Dialog ); |
2095 info_dialog( win, &Dialog ); | 2076 } |
2096 } | 2077 |
2097 | 2078 |
2098 | 2079 /******************************************************************************* |
2099 /******************************************************************************* | 2080 |
2100 | 2081 $Function: mmi_cphs_wait_dialog |
2101 $Function: mmi_cphs_wait_dialog | 2082 $Description: Displays the "Pls. wait" Dialog |
2102 $Description: Displays the "Pls. wait" Dialog | 2083 $Returns: Nothing |
2103 $Returns: Nothing | 2084 $Arguments: parent window |
2104 $Arguments: parent window | |
2105 | 2085 |
2106 *******************************************************************************/ | 2086 *******************************************************************************/ |
2107 void mmi_cphs_wait_dialog(T_MFW_HND win) | 2087 void mmi_cphs_wait_dialog(T_MFW_HND win) |
2108 { | 2088 { |
2109 | 2089 cphs_wait_dialog_win = NULL; |
2110 cphs_wait_dialog_win = NULL; | 2090 memset( (void *)&mmi_cphs_wait_dialog_data, 0, sizeof(T_DISPLAY_DATA) ); |
2111 memset( (void *)&mmi_cphs_wait_dialog_data, 0, sizeof(T_DISPLAY_DATA) ); | 2091 |
2112 | 2092 /* Initialise the dialog control block with default information |
2113 /* Initialise the dialog control block with default information | 2093 */ |
2114 */ | 2094 dlg_initDisplayData_TextId( &mmi_cphs_wait_dialog_data, TxtNull, TxtNull, TxtPleaseWait, NULL , COLOUR_STATUS); |
2115 dlg_initDisplayData_TextId( &mmi_cphs_wait_dialog_data, TxtNull, TxtNull, TxtPleaseWait, NULL , COLOUR_STATUS); | 2095 dlg_initDisplayData_events( &mmi_cphs_wait_dialog_data, NULL, FOREVER, KEY_MAX ); |
2116 dlg_initDisplayData_events( &mmi_cphs_wait_dialog_data, NULL, FOREVER, KEY_MAX ); | 2096 |
2117 | 2097 /* Show the dialog */ |
2118 /* Show the dialog */ | 2098 cphs_wait_dialog_win = info_dialog( win, &mmi_cphs_wait_dialog_data ); |
2119 cphs_wait_dialog_win = info_dialog( win, &mmi_cphs_wait_dialog_data ); | 2099 } |
2120 } | 2100 |
2121 | 2101 |
2122 | 2102 /******************************************************************************* |
2123 /******************************************************************************* | 2103 |
2124 | 2104 $Function: mmi_cphs_wait_dialog_destroy |
2125 $Function: mmi_cphs_wait_dialog_destroy | 2105 $Description: Deletes the "Pls. wait" Dialog |
2126 $Description: Deletes the "Pls. wait" Dialog | 2106 $Returns: Nothing |
2127 $Returns: Nothing | 2107 $Arguments: None |
2128 $Arguments: None | |
2129 | 2108 |
2130 *******************************************************************************/ | 2109 *******************************************************************************/ |
2131 void mmi_cphs_wait_dialog_destroy(void) | 2110 void mmi_cphs_wait_dialog_destroy(void) |
2132 { | 2111 { |
2133 if ( cphs_wait_dialog_win != NULL ) | 2112 if ( cphs_wait_dialog_win != NULL ) |
2134 { | 2113 { |
2135 SEND_EVENT( cphs_wait_dialog_win, DIALOG_DESTROY, 0, &mmi_cphs_wait_dialog_data ); | 2114 SEND_EVENT( cphs_wait_dialog_win, DIALOG_DESTROY, 0, &mmi_cphs_wait_dialog_data ); |
2136 } | 2115 } |
2137 | 2116 |
2138 cphs_wait_dialog_win = NULL; | 2117 cphs_wait_dialog_win = NULL; |
2139 memset( (void *)&mmi_cphs_wait_dialog_data, 0, sizeof(T_DISPLAY_DATA) ); | 2118 memset( (void *)&mmi_cphs_wait_dialog_data, 0, sizeof(T_DISPLAY_DATA) ); |
2140 } | 2119 } |
2141 | 2120 |
2142 | 2121 |
2143 /****************************************************************************** | 2122 /****************************************************************************** |
2144 | 2123 |
2145 Private functions | 2124 Private functions |
2146 | 2125 |
2147 *******************************************************************************/ | 2126 *******************************************************************************/ |
2148 | 2127 |
2149 T_MFW_HND edit_mailbox_start(T_MFW_HND parent_window) | 2128 T_MFW_HND edit_mailbox_start(T_MFW_HND parent_window) |
2150 { | 2129 { |
2151 T_MFW_HND win = mmi_cphs_create(parent_window); | 2130 T_MFW_HND win = mmi_cphs_create(parent_window); |
2152 TRACE_FUNCTION("calc_start()"); | 2131 TRACE_FUNCTION("calc_start()"); |
2153 if (win NEQ NULL) | 2132 if (win NEQ NULL) |
2154 { | 2133 { |
2155 SEND_EVENT(win, MAILBOX, NULL, NULL); | 2134 SEND_EVENT(win, MAILBOX, NULL, NULL); |
2156 | 2135 } |
2157 } | 2136 |
2158 | 2137 return win; |
2159 return win; | 2138 } |
2160 } | |
2161 | |
2162 | |
2163 | |
2164 | 2139 |
2165 | 2140 |
2166 T_MFW_HND mmi_cphs_create(T_MFW_HND parent) | 2141 T_MFW_HND mmi_cphs_create(T_MFW_HND parent) |
2167 { T_MMI_CPHS_DATA * data = (T_MMI_CPHS_DATA *)ALLOC_MEMORY (sizeof (T_MMI_CPHS_DATA )); | 2142 { T_MMI_CPHS_DATA * data = (T_MMI_CPHS_DATA *)ALLOC_MEMORY (sizeof (T_MMI_CPHS_DATA )); |
2168 T_MFW_WIN * mailbox_win; | 2143 T_MFW_WIN * mailbox_win; |
2169 | 2144 |
2170 if (data EQ NULL) | 2145 if (data EQ NULL) |
2171 { | 2146 { |
2172 return NULL; | 2147 return NULL; |
2173 } | 2148 } |
2174 | 2149 |
2175 // Create window handler | 2150 // Create window handler |
2176 data->mailbox_win = win_create (parent, 0, E_WIN_VISIBLE, (MfwCb)cphs_win_cb); | 2151 data->mailbox_win = win_create (parent, 0, E_WIN_VISIBLE, (MfwCb)cphs_win_cb); |
2177 if (data->mailbox_win EQ NULL) | 2152 if (data->mailbox_win EQ NULL) |
2178 { | 2153 { |
2179 | 2154 |
2180 return NULL; | 2155 return NULL; |
2181 } | 2156 } |
2182 // connect the dialog data to the MFW-window | 2157 // connect the dialog data to the MFW-window |
2183 data->mmi_control.dialog = (T_DIALOG_FUNC)cphs_dialog_cb; | 2158 data->mmi_control.dialog = (T_DIALOG_FUNC)cphs_dialog_cb; |
2184 data->mmi_control.data = data; | 2159 data->mmi_control.data = data; |
2185 mailbox_win = ((T_MFW_HDR *)data->mailbox_win)->data; | 2160 mailbox_win = ((T_MFW_HDR *)data->mailbox_win)->data; |
2186 mailbox_win->user = (void *)data; | 2161 mailbox_win->user = (void *)data; |
2187 data->parent_win = parent; | 2162 data->parent_win = parent; |
2188 data->win = mailbox_win; | 2163 data->win = mailbox_win; |
2189 return data->mailbox_win; | 2164 return data->mailbox_win; |
2190 | |
2191 } | 2165 } |
2192 | 2166 |
2193 void mailbox_destroy(MfwHnd own_window) | 2167 void mailbox_destroy(MfwHnd own_window) |
2194 { | 2168 { |
2195 T_MFW_WIN * win_data; | 2169 T_MFW_WIN * win_data; |
2196 T_MMI_CPHS_DATA * data = NULL; | 2170 T_MMI_CPHS_DATA * data = NULL; |
2197 | 2171 |
2198 if (own_window) | 2172 if (own_window) |
2199 { | 2173 { |
2200 | 2174 |
2201 win_data = ((T_MFW_HDR *)own_window)->data; | 2175 win_data = ((T_MFW_HDR *)own_window)->data; |
2202 if (win_data != NULL) //PATCH TB | 2176 if (win_data != NULL) //PATCH TB |
2203 data = (T_MMI_CPHS_DATA *)win_data->user; | 2177 data = (T_MMI_CPHS_DATA *)win_data->user; |
2204 | 2178 |
2205 if (data) | 2179 if (data) |
2206 { | 2180 { |
2207 TRACE_EVENT ("mailbox_destroy()"); | 2181 TRACE_EVENT ("mailbox_destroy()"); |
2208 | 2182 |
2209 win_delete (data->win); | 2183 win_delete (data->win); |
2210 // Free Memory | 2184 // Free Memory |
2211 FREE_MEMORY ((void *)data, sizeof (T_MMI_CPHS_DATA)); | 2185 FREE_MEMORY ((void *)data, sizeof (T_MMI_CPHS_DATA)); |
2212 | 2186 |
2213 } | 2187 } |
2214 else | 2188 else |
2215 { | 2189 { |
2216 TRACE_EVENT ("mailbox_destroy() called twice"); | 2190 TRACE_EVENT ("mailbox_destroy() called twice"); |
2217 } | 2191 } |
2218 } | 2192 } |
2219 } | 2193 } |
2220 | 2194 |
2221 void cphs_dialog_cb(T_MFW_HND win, USHORT e, SHORT identifier, void *parameter) | 2195 void cphs_dialog_cb(T_MFW_HND win, USHORT e, SHORT identifier, void *parameter) |
2222 { TRACE_EVENT("cphs_dialog_cb()"); | 2196 { TRACE_EVENT("cphs_dialog_cb()"); |
2223 switch(e) | 2197 switch(e) |
2224 { case (MAILBOX): | 2198 { case (MAILBOX): |
2225 cphs_get_mailbox();break; | 2199 cphs_get_mailbox();break; |
2226 default: break; | 2200 default: break; |
2227 } | 2201 } |
2228 } | 2202 } |
2229 | 2203 |
2230 static int cphs_win_cb (T_MFW_EVENT event, T_MFW_WIN * win) | 2204 static int cphs_win_cb (T_MFW_EVENT event, T_MFW_WIN * win) |
2231 { | 2205 { |
2232 T_MMI_CPHS_DATA * data = (T_MMI_CPHS_DATA *)win->user; | 2206 T_MMI_CPHS_DATA * data = (T_MMI_CPHS_DATA *)win->user; |
2233 | 2207 |
2234 TRACE_FUNCTION ("cphs_win_cb()"); | 2208 TRACE_FUNCTION ("cphs_win_cb()"); |
2235 | 2209 |
2236 if(data EQ 0) | 2210 if(data EQ 0) |
2237 return 1; | 2211 return 1; |
2238 switch (event) | 2212 switch (event) |
2239 { | 2213 { |
2240 case E_WIN_VISIBLE: | 2214 case E_WIN_VISIBLE: |
2241 if (win->flags & E_WIN_VISIBLE) | 2215 if (win->flags & E_WIN_VISIBLE) |
2242 { | 2216 { |
2243 /* Print the information dialog */ | 2217 /* Print the information dialog */ |
2244 /* Clear Screen */ | 2218 /* Clear Screen */ |
2245 dspl_ClearAll(); | 2219 dspl_ClearAll(); |
2246 } | 2220 } |
2247 default: | 2221 default: |
2248 return 0; | 2222 return 0; |
2249 } | 2223 } |
2250 } | 2224 } |
2251 /******************************************************************************* | 2225 /******************************************************************************* |
2252 | 2226 |
2253 $Function: show_cphs_mb_numbers | 2227 $Function: show_cphs_mb_numbers |
2254 $Description: Show the list of mailbox numbers | 2228 $Description: Show the list of mailbox numbers |
2255 $Returns: nothing | 2229 $Returns: nothing |
2256 $Arguments: none | 2230 $Arguments: none |
2257 | 2231 |
2258 *******************************************************************************/ | 2232 *******************************************************************************/ |
2259 void show_cphs_mb_numbers() | 2233 void show_cphs_mb_numbers() |
2260 { | 2234 { |
2261 T_MFW_HND win; | 2235 T_MFW_HND win; |
2262 T_MFW_HND parent_win= mfw_parent(mfw_header()); | 2236 T_MFW_HND parent_win= mfw_parent(mfw_header()); |
2263 | 2237 |
2264 TRACE_FUNCTION("show_cphs_mb_numbers"); | 2238 TRACE_FUNCTION("show_cphs_mb_numbers"); |
2265 | 2239 |
2266 { | 2240 { |
2267 win = buildInfoNumberMenu(parent_win); | 2241 win = buildInfoNumberMenu(parent_win); |
2268 | 2242 |
2269 if (win NEQ NULL) | 2243 if (win NEQ NULL) |
2270 { | 2244 { |
2271 SEND_EVENT (win, E_INIT, 0, 0); | 2245 SEND_EVENT (win, E_INIT, 0, 0); |
2272 } | 2246 } |
2273 } | 2247 } |
2274 } | 2248 } |
2275 static UBYTE* temp_ed; | 2249 static UBYTE* temp_ed; |
2276 | 2250 |
2277 /******************************************************************************* | 2251 /******************************************************************************* |
2278 | 2252 |
2279 $Function: show_cphs_mb_number | 2253 $Function: show_cphs_mb_number |
2280 $Description: Show the passed mailbox number in editor | 2254 $Description: Show the passed mailbox number in editor |
2281 $Returns: status int | 2255 $Returns: status int |
2282 $Arguments: mailbox number entry | 2256 $Arguments: mailbox number entry |
2283 | 2257 |
2284 *******************************************************************************/ | 2258 *******************************************************************************/ |
2285 | 2259 |
2286 int show_cphs_mb_number(T_MFW_CPHS_ENTRY* mb_number) | 2260 int show_cphs_mb_number(T_MFW_CPHS_ENTRY* mb_number) |
2287 { T_MFW_HND parent_win = mfw_parent(mfw_header()); | 2261 { T_MFW_HND parent_win = mfw_parent(mfw_header()); |
2288 #ifdef NEW_EDITOR | 2262 #ifdef NEW_EDITOR |
2289 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data*/ | 2263 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data*/ |
2290 #else | 2264 #else |
2291 T_EDITOR_DATA editor_data; | 2265 T_EDITOR_DATA editor_data; |
2292 #endif | 2266 #endif |
2293 char temp_number[MFW_CPHS_VM_NUMBER_MAXLEN - 10]; | 2267 char temp_number[MFW_CPHS_VM_NUMBER_MAXLEN - 10]; |
2294 | 2268 |
2295 TRACE_FUNCTION("show_cphs_mb_number"); | 2269 TRACE_FUNCTION("show_cphs_mb_number"); |
2296 | 2270 |
2297 memset( temp_number, 0, (MFW_CPHS_VM_NUMBER_MAXLEN - 10) ); | 2271 memset( temp_number, 0, (MFW_CPHS_VM_NUMBER_MAXLEN - 10) ); |
2298 | 2272 |
2299 //if it's an international number without a '+' | 2273 //if it's an international number without a '+' |
2300 if (mb_number->ton == MFW_TON_INTERNATIONAL && mb_number->number[0] != '+') | 2274 if (mb_number->ton == MFW_TON_INTERNATIONAL && mb_number->number[0] != '+') |
2301 { strcat(temp_number, "+"); //put a + in front of number | 2275 { strcat(temp_number, "+"); //put a + in front of number |
2302 strncat(temp_number, (char*)mb_number->number, (PHB_MAX_LEN - 1) ); | 2276 strncat(temp_number, (char*)mb_number->number, (PHB_MAX_LEN - 1) ); |
2303 strcpy((char*)mb_number->number, temp_number); | 2277 strcpy((char*)mb_number->number, temp_number); |
2304 } | 2278 } |
2305 /* SPR#1428 - SH - New Editor changes */ | 2279 /* SPR#1428 - SH - New Editor changes */ |
2306 | 2280 |
2307 #ifdef NEW_EDITOR | 2281 #ifdef NEW_EDITOR |
2308 AUI_edit_SetDefault(&editor_data); | 2282 AUI_edit_SetDefault(&editor_data); |
2309 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)mb_number->number, PHB_MAX_LEN - 1); | 2283 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)mb_number->number, PHB_MAX_LEN - 1); |
2310 AUI_edit_SetMode(&editor_data, 0, ED_CURSOR_UNDERLINE); | 2284 AUI_edit_SetMode(&editor_data, 0, ED_CURSOR_UNDERLINE); |
2311 AUI_edit_SetDisplay(&editor_data, 0, COLOUR_EDITOR, EDITOR_FONT); | 2285 AUI_edit_SetDisplay(&editor_data, 0, COLOUR_EDITOR, EDITOR_FONT); |
2312 AUI_edit_SetEvents(&editor_data, 0, TRUE, FOREVER, (T_AUI_EDIT_CB)mailbox_edit_cb); | 2286 AUI_edit_SetEvents(&editor_data, 0, TRUE, FOREVER, (T_AUI_EDIT_CB)mailbox_edit_cb); |
2313 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtDelete, TxtNull, NULL); | 2287 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtDelete, TxtNull, NULL); |
2314 | 2288 |
2315 temp_ed = (UBYTE *)mb_number->number; | 2289 temp_ed = (UBYTE *)mb_number->number; |
2316 | 2290 |
2317 AUI_edit_Start(parent_win, &editor_data); | 2291 AUI_edit_Start(parent_win, &editor_data); |
2318 #else /* NEW_EDITOR */ | 2292 #else /* NEW_EDITOR */ |
2319 editor_attr_init(&editor_data.editor_attr, 0, edtCurBar1, NULL, (char*)mb_number->number, PHB_MAX_LEN-1, COLOUR_EDITOR); | 2293 editor_attr_init(&editor_data.editor_attr, 0, edtCurBar1, NULL, (char*)mb_number->number, PHB_MAX_LEN-1, COLOUR_EDITOR); |
2320 editor_data_init(&editor_data, (T_EDIT_CB)mailbox_edit_cb, TxtSoftOK, TxtDelete, NULL, 1, DIGITS_MODE, FOREVER); | 2294 editor_data_init(&editor_data, (T_EDIT_CB)mailbox_edit_cb, TxtSoftOK, TxtDelete, NULL, 1, DIGITS_MODE, FOREVER); |
2321 editor_data.Identifier = 0; | 2295 editor_data.Identifier = 0; |
2322 editor_data.hide = FALSE; | 2296 editor_data.hide = FALSE; |
2323 editor_data.destroyEditor = TRUE; | 2297 editor_data.destroyEditor = TRUE; |
2324 editor_data.TextString = NULL; /*MC SPR 1257, stops glitch in Chinese*/ | 2298 editor_data.TextString = NULL; /*MC SPR 1257, stops glitch in Chinese*/ |
2325 | 2299 |
2326 | 2300 |
2327 editor_start(parent_win,&editor_data); /* start the editor */ | 2301 editor_start(parent_win,&editor_data); /* start the editor */ |
2328 #endif /* NEW_EDITOR */ | 2302 #endif /* NEW_EDITOR */ |
2329 return 1; | 2303 return 1; |
2330 } | 2304 } |
2331 | 2305 |
2332 #ifdef FF_CPHS_REL4 | 2306 #ifdef FF_CPHS_REL4 |
2333 /******************************************************************************* | 2307 /******************************************************************************* |
2334 | 2308 |
2335 $Function: show_cphs_rel4_mb_number | 2309 $Function: show_cphs_rel4_mb_number |
2336 $Description: Show the passed cphs rel4 mailbox number in editor | 2310 $Description: Show the passed cphs rel4 mailbox number in editor |
2337 $Returns: status int | 2311 $Returns: status int |
2338 $Arguments: mailbox number entry | 2312 $Arguments: mailbox number entry |
2339 | 2313 |
2340 *******************************************************************************/ | 2314 *******************************************************************************/ |
2341 | 2315 |
2342 int show_cphs_rel4_mb_number(T_MFW_MBDN* mb_number) | 2316 int show_cphs_rel4_mb_number(T_MFW_MBDN* mb_number) |
2343 { T_MFW_HND parent_win = mfw_parent(mfw_header()); | 2317 { T_MFW_HND parent_win = mfw_parent(mfw_header()); |
2344 #ifdef NEW_EDITOR | 2318 #ifdef NEW_EDITOR |
2345 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data*/ | 2319 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data*/ |
2346 #else | 2320 #else |
2347 T_EDITOR_DATA editor_data; | 2321 T_EDITOR_DATA editor_data; |
2348 #endif | 2322 #endif |
2349 char temp_number[MAX_MB_NUM_LEN]; | 2323 char temp_number[MAX_MB_NUM_LEN]; |
2350 | 2324 |
2351 TRACE_FUNCTION("show_cphs_mb_number"); | 2325 TRACE_FUNCTION("show_cphs_mb_number"); |
2352 | 2326 |
2353 memset(temp_number, 0, MAX_MB_NUM_LEN); | 2327 memset(temp_number, 0, MAX_MB_NUM_LEN); |
2354 | 2328 |
2355 //if it's an international number without a '+' | 2329 //if it's an international number without a '+' |
2356 if (mb_number->type.ton == MFW_TON_INTERNATIONAL && mb_number->number[0] != '+') | 2330 if (mb_number->type.ton == MFW_TON_INTERNATIONAL && mb_number->number[0] != '+') |
2357 { strcat(temp_number, "+"); //put a + in front of number | 2331 { strcat(temp_number, "+"); //put a + in front of number |
2358 strcat(temp_number, (char*)mb_number->number); | 2332 strcat(temp_number, (char*)mb_number->number); |
2359 strcpy((char*)mb_number->number, temp_number); | 2333 strcpy((char*)mb_number->number, temp_number); |
2360 } | 2334 } |
2361 /* SPR#1428 - SH - New Editor changes */ | 2335 /* SPR#1428 - SH - New Editor changes */ |
2362 | 2336 |
2363 #ifdef NEW_EDITOR | 2337 #ifdef NEW_EDITOR |
2364 AUI_edit_SetDefault(&editor_data); | 2338 AUI_edit_SetDefault(&editor_data); |
2365 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)mb_number->number, MAX_MB_NUM_LEN-1); | 2339 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)mb_number->number, MAX_MB_NUM_LEN-1); |
2366 AUI_edit_SetMode(&editor_data, ED_MODE_READONLY, ED_CURSOR_NONE); | 2340 AUI_edit_SetMode(&editor_data, ED_MODE_READONLY, ED_CURSOR_NONE); |
2367 AUI_edit_SetDisplay(&editor_data, 0, COLOUR_EDITOR, EDITOR_FONT); | 2341 AUI_edit_SetDisplay(&editor_data, 0, COLOUR_EDITOR, EDITOR_FONT); |
2368 AUI_edit_SetEvents(&editor_data, 0, TRUE, FOREVER, NULL); | 2342 AUI_edit_SetEvents(&editor_data, 0, TRUE, FOREVER, NULL); |
2369 switch(mailbox_type) | 2343 switch(mailbox_type) |
2370 { | 2344 { |
2371 case T_MFW_CPHS_REL4_MAILBOX_VOICE: | 2345 case T_MFW_CPHS_REL4_MAILBOX_VOICE: |
2372 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, NULL, TxtVoice, NULL); | 2346 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, NULL, TxtVoice, NULL); |
2373 break; | 2347 break; |
2374 case T_MFW_CPHS_REL4_MAILBOX_FAX: | 2348 case T_MFW_CPHS_REL4_MAILBOX_FAX: |
2375 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, NULL, TxtFax, NULL); | 2349 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, NULL, TxtFax, NULL); |
2376 break; | 2350 break; |
2377 case T_MFW_CPHS_REL4_MAILBOX_ELECTRONIC: | 2351 case T_MFW_CPHS_REL4_MAILBOX_ELECTRONIC: |
2378 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, NULL, TxtElectronic, NULL); | 2352 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, NULL, TxtElectronic, NULL); |
2379 break; | 2353 break; |
2380 case T_MFW_CPHS_REL4_MAILBOX_OTHER: | 2354 case T_MFW_CPHS_REL4_MAILBOX_OTHER: |
2381 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, NULL, TxtOther, NULL); | 2355 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, NULL, TxtOther, NULL); |
2382 break; | 2356 break; |
2383 } | 2357 } |
2384 AUI_edit_Start(parent_win, &editor_data); | 2358 AUI_edit_Start(parent_win, &editor_data); |
2385 #else /* NEW_EDITOR */ | 2359 #else /* NEW_EDITOR */ |
2386 editor_attr_init(&editor_data.editor_attr, 0, edtCurNone, NULL, (char*)mb_number->number, MAX_MB_NUM_LEN-1, COLOUR_EDITOR); | 2360 editor_attr_init(&editor_data.editor_attr, 0, edtCurNone, NULL, (char*)mb_number->number, MAX_MB_NUM_LEN-1, COLOUR_EDITOR); |
2387 editor_data_init(&editor_data, NULL, TxtSoftOK, NULL, NULL, 1, DIGITS_MODE, FOREVER); | 2361 editor_data_init(&editor_data, NULL, TxtSoftOK, NULL, NULL, 1, DIGITS_MODE, FOREVER); |
2388 editor_data.Identifier = 0; | 2362 editor_data.Identifier = 0; |
2389 editor_data.hide = FALSE; | 2363 editor_data.hide = FALSE; |
2390 editor_data.destroyEditor = TRUE; | 2364 editor_data.destroyEditor = TRUE; |
2391 editor_data.TextString = NULL; /*MC SPR 1257, stops glitch in Chinese*/ | 2365 editor_data.TextString = NULL; /*MC SPR 1257, stops glitch in Chinese*/ |
2392 | 2366 |
2393 | 2367 |
2394 editor_start(parent_win,&editor_data); /* start the editor */ | 2368 editor_start(parent_win,&editor_data); /* start the editor */ |
2395 #endif /* NEW_EDITOR */ | 2369 #endif /* NEW_EDITOR */ |
2396 // ADDED BY RAVI - 29-11-2005 | 2370 // ADDED BY RAVI - 29-11-2005 |
2397 #if (BOARD == 61) | 2371 #if (BOARD == 61) |
2398 return 1; | 2372 return 1; |
2399 #endif | 2373 #endif |
2400 // END RAVI | 2374 // END RAVI |
2401 } | 2375 } |
2402 #endif | 2376 #endif |
2403 | 2377 |
2404 /******************************************************************************* | 2378 /******************************************************************************* |
2405 | 2379 |
2406 $Function: mailbox_edit_cb | 2380 $Function: mailbox_edit_cb |
2407 $Description: callback for mailbox editor screen | 2381 $Description: callback for mailbox editor screen |
2408 $Returns: nothing | 2382 $Returns: nothing |
2409 $Arguments: window, identifier, reason | 2383 $Arguments: window, identifier, reason |
2410 | 2384 |
2411 *******************************************************************************/ | 2385 *******************************************************************************/ |
2412 static void mailbox_edit_cb( T_MFW_HND win, USHORT Identifier,UBYTE reason) | 2386 static void mailbox_edit_cb( T_MFW_HND win, USHORT Identifier,UBYTE reason) |
2413 { | 2387 { |
2414 T_MFW set_mailbox_errcode = MFW_CPHS_OK; | 2388 T_MFW set_mailbox_errcode = MFW_CPHS_OK; |
2415 UBYTE write_error_number[MFW_CPHS_VM_NUMBER_MAXLEN]; | 2389 UBYTE write_error_number[MFW_CPHS_VM_NUMBER_MAXLEN]; |
2416 | 2390 |
2417 TRACE_FUNCTION("mailbox_edit_cb()"); | 2391 TRACE_FUNCTION("mailbox_edit_cb()"); |
2418 switch (reason ) | 2392 switch (reason ) |
2419 { | 2393 { |
2420 case INFO_KCD_LEFT: | 2394 case INFO_KCD_LEFT: |
2421 { | 2395 { |
2422 memcpy( (void *)&write_error_number[0], (void *)&cphs_voicemail_num.number[0], MFW_CPHS_VM_NUMBER_MAXLEN ); | 2396 memcpy( (void *)&write_error_number[0], (void *)&cphs_voicemail_num.number[0], MFW_CPHS_VM_NUMBER_MAXLEN ); |
2423 memset ( (void *)&cphs_voicemail_num.number[0], 0, MFW_CPHS_VM_NUMBER_MAXLEN ); | 2397 memset ( (void *)&cphs_voicemail_num.number[0], 0, MFW_CPHS_VM_NUMBER_MAXLEN ); |
2424 memcpy ( (void *)&cphs_voicemail_num.number[0], (void *)temp_ed, MFW_CPHS_VM_NUMBER_MAXLEN ); | 2398 memcpy ( (void *)&cphs_voicemail_num.number[0], (void *)temp_ed, MFW_CPHS_VM_NUMBER_MAXLEN ); |
2425 | 2399 |
2426 set_mailbox_errcode = cphs_set_mailbox(&cphs_voicemail_num); | 2400 set_mailbox_errcode = cphs_set_mailbox(&cphs_voicemail_num); |
2427 | 2401 |
2428 if ( set_mailbox_errcode == MFW_CPHS_OK ) | 2402 if ( set_mailbox_errcode == MFW_CPHS_OK ) |
2429 { | 2403 { |
2430 mmi_cphs_wait_dialog(win); /* Display the "Pls. wait" Dialog as SIM Write consumes quite some time */ | 2404 mmi_cphs_wait_dialog(win); /* Display the "Pls. wait" Dialog as SIM Write consumes quite some time */ |
2431 } | 2405 } |
2432 else | 2406 else |
2433 { | 2407 { |
2434 memcpy( (void *)&cphs_voicemail_numbers.entries[cphs_voicemail_num.list_index].number[0], | 2408 memcpy( (void *)&cphs_voicemail_numbers.entries[cphs_voicemail_num.list_index].number[0], |
2435 (void *)&write_error_number[0], MFW_CPHS_VM_NUMBER_MAXLEN); | 2409 (void *)&write_error_number[0], MFW_CPHS_VM_NUMBER_MAXLEN); |
2436 } | 2410 } |
2437 | 2411 |
2438 break; | 2412 break; |
2439 } | 2413 } |
2440 | 2414 |
2441 | 2415 default: |
2442 default: | 2416 { |
2443 { | 2417 /* otherwise no action to be performed */ |
2444 /* otherwise no action to be performed */ | 2418 break; |
2445 break; | 2419 } |
2446 } | 2420 } |
2447 } | 2421 } |
2448 } | 2422 |
2449 | 2423 |
2450 | 2424 /******************************************************************************* |
2451 | 2425 |
2452 | 2426 $Function: cphs_mfw_cb |
2453 /******************************************************************************* | 2427 $Description: Callback handler for mfw_cphs events |
2454 | 2428 $Returns: status int |
2455 $Function: cphs_mfw_cb | 2429 $Arguments: event, parameter pointer |
2456 $Description: Callback handler for mfw_cphs events | |
2457 $Returns: status int | |
2458 $Arguments: event, parameter pointer | |
2459 | 2430 |
2460 *******************************************************************************/ | 2431 *******************************************************************************/ |
2461 int cphs_mfw_cb(T_MFW_EVENT event, void* para) | 2432 int cphs_mfw_cb(T_MFW_EVENT event, void* para) |
2462 { T_MFW_HND parent = mfwParent( mfw_header()); | 2433 { T_MFW_HND parent = mfwParent( mfw_header()); |
2463 | 2434 |
2464 // T_MFW_CPHS_VC_NUM* number_list =(T_MFW_CPHS_VC_NUM* )para; // RAVI | 2435 // T_MFW_CPHS_VC_NUM* number_list =(T_MFW_CPHS_VC_NUM* )para; // RAVI |
2465 | 2436 |
2466 // T_MFW_CPHS_PARA* parameter = (T_MFW_CPHS_PARA*)para; // RAVI | 2437 // T_MFW_CPHS_PARA* parameter = (T_MFW_CPHS_PARA*)para; // RAVI |
2467 // T_MFW_CPHS_STATUS temp; // RAVI | 2438 // T_MFW_CPHS_STATUS temp; // RAVI |
2468 TRACE_FUNCTION("cphs_mfw_cb"); | 2439 TRACE_FUNCTION("cphs_mfw_cb"); |
2469 switch(event) | 2440 switch(event) |
2470 { case E_CPHS_IND: | 2441 { case E_CPHS_IND: |
2471 TRACE_EVENT("Getting cphs status"); | 2442 TRACE_EVENT("Getting cphs status"); |
2472 if(para != NULL) | 2443 if(para != NULL) |
2473 { cphs_status =(* (T_MFW_CPHS_STATUS*)para); | 2444 { cphs_status =(* (T_MFW_CPHS_STATUS*)para); |
2474 //x0pleela 11 June, 2006 DR:OMAPS00079692 | 2445 //x0pleela 11 June, 2006 DR:OMAPS00079692 |
2475 //changed from CPHS_OK to MFW_CPHS_OK | 2446 //changed from CPHS_OK to MFW_CPHS_OK |
2476 if (cphs_status != MFW_CPHS_OK) | 2447 if (cphs_status != MFW_CPHS_OK) |
2477 { | 2448 { |
2478 /***************************Go-lite Optimization changes Start***********************/ | 2449 /***************************Go-lite Optimization changes Start***********************/ |
2479 //Aug 16, 2004 REF: CRR 24323 Deepa M.D | 2450 //Aug 16, 2004 REF: CRR 24323 Deepa M.D |
2480 TRACE_EVENT_P1("cphs not supported, apparently%d", cphs_status); | 2451 TRACE_EVENT_P1("cphs not supported, apparently%d", cphs_status); |
2481 /***************************Go-lite Optimization changes end***********************/ | 2452 /***************************Go-lite Optimization changes end***********************/ |
2482 } | 2453 } |
2483 cphs_operator_name(); | 2454 cphs_operator_name(); |
2484 } | 2455 } |
2485 break; | 2456 break; |
2486 case E_CPHS_OP_NAME: | 2457 case E_CPHS_OP_NAME: |
2487 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS | 2458 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS |
2488 TRACE_EVENT("case: E_CPHS_OP_NAME"); | 2459 TRACE_EVENT("case: E_CPHS_OP_NAME"); |
2489 if(para != NULL) | 2460 if(para != NULL) |
2490 { | 2461 { |
2491 int csp_status; //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 - No need to include this under FF_CPHS flag. | 2462 int csp_status; //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 - No need to include this under FF_CPHS flag. |
2492 memcpy(&operator_name, para, sizeof(T_MFW_CPHS_OP_NAME)); | 2463 memcpy(&operator_name, para, sizeof(T_MFW_CPHS_OP_NAME)); |
2493 TRACE_EVENT("operator name callback"); | 2464 TRACE_EVENT("operator name callback"); |
2494 | 2465 |
2495 if (operator_name.longName.data[0] == NULL) | 2466 if (operator_name.longName.data[0] == NULL) |
2496 TRACE_EVENT("Blank long name"); | 2467 TRACE_EVENT("Blank long name"); |
2497 | 2468 |
2498 if (operator_name.shortName.data[0] == NULL) | 2469 if (operator_name.shortName.data[0] == NULL) |
2499 TRACE_EVENT("Blank short name"); | 2470 TRACE_EVENT("Blank short name"); |
2500 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS | 2471 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS |
2501 csp_status = cphs_get_csp(); | 2472 csp_status = cphs_get_csp(); |
2502 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS | 2473 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS |
2503 // In case if cphs_get_csp returns less than 'MFW_CPHS_OK' then either CPHS is not present or CPS is not allocated or activated in serice table. | 2474 // In case if cphs_get_csp returns less than 'MFW_CPHS_OK' then either CPHS is not present or CPS is not allocated or activated in serice table. |
2504 #ifdef FF_CPHS | 2475 #ifdef FF_CPHS |
2505 //x0pleela 11 June, 2006 DR:OMAPS00079692 | 2476 //x0pleela 11 June, 2006 DR:OMAPS00079692 |
2506 //changed from CPHS_OK to MFW_CPHS_OK | 2477 //changed from CPHS_OK to MFW_CPHS_OK |
2507 if( csp_status < MFW_CPHS_OK) | 2478 if( csp_status < MFW_CPHS_OK) |
2508 { | 2479 { |
2509 TRACE_EVENT("E_CPHS_OP_NAME : AOC is set to TRUE"); | 2480 TRACE_EVENT("E_CPHS_OP_NAME : AOC is set to TRUE"); |
2510 setAOCflag(TRUE); | 2481 setAOCflag(TRUE); |
2511 } | 2482 } |
2512 #endif | 2483 #endif |
2513 } | 2484 } |
2514 break; | 2485 break; |
2515 case E_CPHS_GET_VC_NUM: | 2486 case E_CPHS_GET_VC_NUM: |
2516 { | 2487 { |
2517 if (para!= NULL) | 2488 if (para!= NULL) |
2518 { | 2489 { |
2519 memcpy(&cphs_voicemail_numbers, para, sizeof(T_MFW_CPHS_VC_NUM)); | 2490 memcpy(&cphs_voicemail_numbers, para, sizeof(T_MFW_CPHS_VC_NUM)); |
2520 /***************************Go-lite Optimization changes Start***********************/ | 2491 /***************************Go-lite Optimization changes Start***********************/ |
2521 //Aug 16, 2004 REF: CRR 24323 Deepa M.D | 2492 //Aug 16, 2004 REF: CRR 24323 Deepa M.D |
2522 TRACE_EVENT_P1("Voicemail No %s", cphs_voicemail_numbers.entries[0].number); | 2493 TRACE_EVENT_P1("Voicemail No %s", cphs_voicemail_numbers.entries[0].number); |
2523 /***************************Go-lite Optimization changes end***********************/ | 2494 /***************************Go-lite Optimization changes end***********************/ |
2524 show_cphs_mb_numbers(); | 2495 show_cphs_mb_numbers(); |
2525 } | 2496 } |
2526 | 2497 |
2527 } | 2498 } |
2528 break; | 2499 break; |
2529 #ifdef FF_CPHS_REL4 | 2500 #ifdef FF_CPHS_REL4 |
2530 case E_CPHS_REL4_GET_MBI: | 2501 case E_CPHS_REL4_GET_MBI: |
2531 if(para!=NULL) | 2502 if(para!=NULL) |
2532 { | 2503 { |
2533 /*update local cache*/ | 2504 /*update local cache*/ |
2534 memcpy(&cphs_rel4_mbi,para,sizeof(T_MFW_CPHS_REL4_MBI)); | 2505 memcpy(&cphs_rel4_mbi,para,sizeof(T_MFW_CPHS_REL4_MBI)); |
2535 /*get mbdn*/ | 2506 /*get mbdn*/ |
2536 switch(mailbox_type) | 2507 switch(mailbox_type) |
2537 { | 2508 { |
2538 case T_MFW_CPHS_REL4_MAILBOX_VOICE: | 2509 case T_MFW_CPHS_REL4_MAILBOX_VOICE: |
2539 if(cphs_rel4_mbdn.valid & 0x01) | 2510 if(cphs_rel4_mbdn.valid & 0x01) |
2540 cphs_mfw_cb(E_CPHS_REL4_GET_MBDN,&(cphs_rel4_mbdn.mailbox_numbers[0])); | 2511 cphs_mfw_cb(E_CPHS_REL4_GET_MBDN,&(cphs_rel4_mbdn.mailbox_numbers[0])); |
2541 else | 2512 else |
2542 cphs_rel4_get_mailbox_no( cphs_rel4_mbi.voice); | 2513 cphs_rel4_get_mailbox_no( cphs_rel4_mbi.voice); |
2543 break; | 2514 break; |
2544 case T_MFW_CPHS_REL4_MAILBOX_FAX: | 2515 case T_MFW_CPHS_REL4_MAILBOX_FAX: |
2545 if(cphs_rel4_mbdn.valid & 0x02) | 2516 if(cphs_rel4_mbdn.valid & 0x02) |
2546 cphs_mfw_cb(E_CPHS_REL4_GET_MBDN,&(cphs_rel4_mbdn.mailbox_numbers[1])); | 2517 cphs_mfw_cb(E_CPHS_REL4_GET_MBDN,&(cphs_rel4_mbdn.mailbox_numbers[1])); |
2547 else | 2518 else |
2548 cphs_rel4_get_mailbox_no(cphs_rel4_mbi.fax); | 2519 cphs_rel4_get_mailbox_no(cphs_rel4_mbi.fax); |
2549 break; | 2520 break; |
2550 case T_MFW_CPHS_REL4_MAILBOX_ELECTRONIC: | 2521 case T_MFW_CPHS_REL4_MAILBOX_ELECTRONIC: |
2551 if(cphs_rel4_mbdn.valid & 0x04) | 2522 if(cphs_rel4_mbdn.valid & 0x04) |
2552 cphs_mfw_cb(E_CPHS_REL4_GET_MBDN,&(cphs_rel4_mbdn.mailbox_numbers[2])); | 2523 cphs_mfw_cb(E_CPHS_REL4_GET_MBDN,&(cphs_rel4_mbdn.mailbox_numbers[2])); |
2553 else | 2524 else |
2554 cphs_rel4_get_mailbox_no(cphs_rel4_mbi.electronic); | 2525 cphs_rel4_get_mailbox_no(cphs_rel4_mbi.electronic); |
2555 break; | 2526 break; |
2556 case T_MFW_CPHS_REL4_MAILBOX_OTHER: | 2527 case T_MFW_CPHS_REL4_MAILBOX_OTHER: |
2557 if(cphs_rel4_mbdn.valid & 0x08) | 2528 if(cphs_rel4_mbdn.valid & 0x08) |
2558 cphs_mfw_cb(E_CPHS_REL4_GET_MBDN,&(cphs_rel4_mbdn.mailbox_numbers[3])); | 2529 cphs_mfw_cb(E_CPHS_REL4_GET_MBDN,&(cphs_rel4_mbdn.mailbox_numbers[3])); |
2559 else | 2530 else |
2560 cphs_rel4_get_mailbox_no( cphs_rel4_mbi.other); | 2531 cphs_rel4_get_mailbox_no( cphs_rel4_mbi.other); |
2561 break; | 2532 break; |
2562 } | 2533 } |
2563 } | 2534 } |
2564 break; | 2535 break; |
2565 case E_CPHS_REL4_GET_MBDN: | 2536 case E_CPHS_REL4_GET_MBDN: |
2566 /*destroy the dialog showing waiting*/ | 2537 /*destroy the dialog showing waiting*/ |
2567 SEND_EVENT(mailbox_waiting_dialog, DIALOG_DESTROY, 0, 0); | 2538 SEND_EVENT(mailbox_waiting_dialog, DIALOG_DESTROY, 0, 0); |
2568 if(para!=NULL) | 2539 if(para!=NULL) |
2569 { | 2540 { |
2570 | 2541 |
2571 /*update local cache and show mailbox number*/ | 2542 /*update local cache and show mailbox number*/ |
2572 switch(mailbox_type) | 2543 switch(mailbox_type) |
2573 { | 2544 { |
2574 case T_MFW_CPHS_REL4_MAILBOX_VOICE: | 2545 case T_MFW_CPHS_REL4_MAILBOX_VOICE: |
2575 memcpy(&cphs_rel4_mbdn.mailbox_numbers[0],para,sizeof(T_MFW_MBDN)); | 2546 memcpy(&cphs_rel4_mbdn.mailbox_numbers[0],para,sizeof(T_MFW_MBDN)); |
2576 cphs_rel4_mbdn.valid|=0x01; | 2547 cphs_rel4_mbdn.valid|=0x01; |
2577 show_cphs_rel4_mb_number(&cphs_rel4_mbdn.mailbox_numbers[0]); | 2548 show_cphs_rel4_mb_number(&cphs_rel4_mbdn.mailbox_numbers[0]); |
2578 break; | 2549 break; |
2579 case T_MFW_CPHS_REL4_MAILBOX_FAX: | 2550 case T_MFW_CPHS_REL4_MAILBOX_FAX: |
2580 memcpy(&cphs_rel4_mbdn.mailbox_numbers[1],para,sizeof(T_MFW_MBDN)); | 2551 memcpy(&cphs_rel4_mbdn.mailbox_numbers[1],para,sizeof(T_MFW_MBDN)); |
2581 cphs_rel4_mbdn.valid|=0x02; | 2552 cphs_rel4_mbdn.valid|=0x02; |
2582 show_cphs_rel4_mb_number(&cphs_rel4_mbdn.mailbox_numbers[1]); | 2553 show_cphs_rel4_mb_number(&cphs_rel4_mbdn.mailbox_numbers[1]); |
2583 break; | 2554 break; |
2584 case T_MFW_CPHS_REL4_MAILBOX_ELECTRONIC: | 2555 case T_MFW_CPHS_REL4_MAILBOX_ELECTRONIC: |
2585 memcpy(&cphs_rel4_mbdn.mailbox_numbers[2],para,sizeof(T_MFW_MBDN)); | 2556 memcpy(&cphs_rel4_mbdn.mailbox_numbers[2],para,sizeof(T_MFW_MBDN)); |
2586 cphs_rel4_mbdn.valid|=0x04; | 2557 cphs_rel4_mbdn.valid|=0x04; |
2587 show_cphs_rel4_mb_number(&cphs_rel4_mbdn.mailbox_numbers[2]); | 2558 show_cphs_rel4_mb_number(&cphs_rel4_mbdn.mailbox_numbers[2]); |
2588 break; | 2559 break; |
2589 case T_MFW_CPHS_REL4_MAILBOX_OTHER: | 2560 case T_MFW_CPHS_REL4_MAILBOX_OTHER: |
2590 memcpy(&cphs_rel4_mbdn.mailbox_numbers[3],para,sizeof(T_MFW_MBDN)); | 2561 memcpy(&cphs_rel4_mbdn.mailbox_numbers[3],para,sizeof(T_MFW_MBDN)); |
2591 cphs_rel4_mbdn.valid|=0x08; | 2562 cphs_rel4_mbdn.valid|=0x08; |
2592 show_cphs_rel4_mb_number(&cphs_rel4_mbdn.mailbox_numbers[3]); | 2563 show_cphs_rel4_mb_number(&cphs_rel4_mbdn.mailbox_numbers[3]); |
2593 break; | 2564 break; |
2594 } | 2565 } |
2595 | 2566 |
2596 } | 2567 } |
2597 break; | 2568 break; |
2598 #endif | 2569 #endif |
2599 case E_CPHS_SET_VC_NUM: | 2570 case E_CPHS_SET_VC_NUM: |
2600 { //result of writing mailbox number | 2571 { //result of writing mailbox number |
2601 UBYTE write_result; | 2572 UBYTE write_result; |
2602 if(para != NULL) | 2573 if(para != NULL) |
2603 { write_result = *(UBYTE*)para; | 2574 { write_result = *(UBYTE*)para; |
2604 mmi_cphs_wait_dialog_destroy(); /* Delete the "Pls. wait" screen */ | 2575 mmi_cphs_wait_dialog_destroy(); /* Delete the "Pls. wait" screen */ |
2605 if (write_result == MFW_SIMOP_WRITE_OK) | 2576 if (write_result == MFW_SIMOP_WRITE_OK) |
2606 ShowMessage(parent, TxtSaved, TxtNull); | 2577 ShowMessage(parent, TxtSaved, TxtNull); |
2607 else | 2578 else |
2608 ShowMessage(parent, TxtWriteError, TxtNull);//display "Write Error" | 2579 ShowMessage(parent, TxtWriteError, TxtNull);//display "Write Error" |
2609 } | 2580 } |
2610 } | 2581 } |
2611 break; | 2582 break; |
2612 case E_CPHS_GET_VC_STAT: | 2583 case E_CPHS_GET_VC_STAT: |
2613 { | 2584 { |
2614 MfwHnd idle_win =idle_get_window(); | 2585 MfwHnd idle_win =idle_get_window(); |
2615 // UBYTE line; // RAVI | 2586 // UBYTE line; // RAVI |
2616 | 2587 |
2617 /*a0393213 cphs rel4 - the parameter sent are of different type for CPHS Rel4 and non-CPHS Rel4*/ | 2588 /*a0393213 cphs rel4 - the parameter sent are of different type for CPHS Rel4 and non-CPHS Rel4*/ |
2618 #ifdef FF_CPHS_REL4 | 2589 #ifdef FF_CPHS_REL4 |
2619 if(!isMWISFilePresent() ) | 2590 if(!isMWISFilePresent() ) |
2620 { | 2591 { |
2621 #endif | 2592 #endif |
2622 if(para != NULL) | 2593 if(para != NULL) |
2623 { cphs_voicemail_status = (T_MFW_CPHS_VC_STAT*)para; | 2594 { cphs_voicemail_status = (T_MFW_CPHS_VC_STAT*)para; |
2624 | 2595 |
2625 TRACE_EVENT("Getting voicemail status"); | 2596 TRACE_EVENT("Getting voicemail status"); |
2626 if (cphs_voicemail_status->line1 == MFW_CFLAG_SET) | 2597 if (cphs_voicemail_status->line1 == MFW_CFLAG_SET) |
2627 { | 2598 { |
2628 //x0pleela 01 June, 2006 DR: OMAPS00079692 | 2599 //x0pleela 01 June, 2006 DR: OMAPS00079692 |
2629 //Commented below line to avoid displaying a popup msg showing the line # | 2600 //Commented below line to avoid displaying a popup msg showing the line # |
2630 //Idle screen will be updated with the voice mail icon | 2601 //Idle screen will be updated with the voice mail icon |
2631 //ShowMessage(idle_win, TxtVoicemail, TxtLine1); | 2602 //ShowMessage(idle_win, TxtVoicemail, TxtLine1); |
2632 | 2603 |
2633 /* SPR#1929 - DS - Set voicemail icon on idle screen. Port of 1960 */ | 2604 /* SPR#1929 - DS - Set voicemail icon on idle screen. Port of 1960 */ |
2634 iconsSetState(iconIdVoice); | 2605 iconsSetState(iconIdVoice); |
2635 } | 2606 } |
2636 | 2607 |
2637 | 2608 |
2638 if (cphs_voicemail_status->line2 == MFW_CFLAG_SET) | 2609 if (cphs_voicemail_status->line2 == MFW_CFLAG_SET) |
2639 { | 2610 { |
2640 //x0pleela 01 June, 2006 DR: OMAPS00079692 | 2611 //x0pleela 01 June, 2006 DR: OMAPS00079692 |
2641 //Commented below line to avoid displaying a popup msg showing the line # | 2612 //Commented below line to avoid displaying a popup msg showing the line # |
2642 //Idle screen will be updated with the voice mail icon | 2613 //Idle screen will be updated with the voice mail icon |
2643 //ShowMessage(idle_win, TxtVoicemail, TxtLine2); | 2614 //ShowMessage(idle_win, TxtVoicemail, TxtLine2); |
2644 | 2615 |
2645 /* SPR#1929 - DS - Set voicemail icon on idle screen. Port of 1960 */ | 2616 /* SPR#1929 - DS - Set voicemail icon on idle screen. Port of 1960 */ |
2646 iconsSetState(iconIdVoice); | 2617 iconsSetState(iconIdVoice); |
2647 } | 2618 } |
2648 | 2619 |
2649 /* SPR#1929 - DS - Remove voicemail icon from idle screen if | 2620 /* SPR#1929 - DS - Remove voicemail icon from idle screen if |
2650 * there is no voicemail waiting on either line1/line2. Port of 1960. | 2621 * there is no voicemail waiting on either line1/line2. Port of 1960. |
2651 */ | 2622 */ |
2652 if ( (cphs_voicemail_status->line1 != MFW_CFLAG_SET) && | 2623 if ( (cphs_voicemail_status->line1 != MFW_CFLAG_SET) && |
2653 (cphs_voicemail_status->line2 != MFW_CFLAG_SET) ) | 2624 (cphs_voicemail_status->line2 != MFW_CFLAG_SET) ) |
2654 { | 2625 { |
2655 iconsDeleteState(iconIdVoice); | 2626 iconsDeleteState(iconIdVoice); |
2656 } | 2627 } |
2657 } | 2628 } |
2658 #ifdef FF_CPHS_REL4 | 2629 #ifdef FF_CPHS_REL4 |
2659 } | 2630 } |
2660 else | 2631 else |
2661 { | 2632 { |
2662 if(is_message_waiting()) | 2633 if(is_message_waiting()) |
2663 { | 2634 { |
2664 iconsSetState(iconIdVoice); | 2635 iconsSetState(iconIdVoice); |
2665 } | 2636 } |
2666 else | 2637 else |
2667 { | 2638 { |
2668 iconsDeleteState(iconIdVoice); | 2639 iconsDeleteState(iconIdVoice); |
2669 } | 2640 } |
2670 | 2641 |
2671 } | 2642 } |
2672 #endif | 2643 #endif |
2673 | 2644 |
2674 } | 2645 } |
2675 break; | 2646 break; |
2676 case E_CPHS_SET_VC_STAT: | 2647 case E_CPHS_SET_VC_STAT: |
2677 | 2648 |
2678 { //result of resetting mailbox status | 2649 { //result of resetting mailbox status |
2679 // UBYTE write_result; // RAVI | 2650 // UBYTE write_result; // RAVI |
2680 | 2651 |
2681 TRACE_EVENT("Mailbox status set"); | 2652 TRACE_EVENT("Mailbox status set"); |
2682 //Update our copy of the mailbox status | 2653 //Update our copy of the mailbox status |
2683 GetCphsVoicemailStatus(0); | 2654 GetCphsVoicemailStatus(0); |
2684 } | 2655 } |
2685 break; | 2656 break; |
2686 case E_CPHS_GET_DV_STAT: | 2657 case E_CPHS_GET_DV_STAT: |
2687 { | 2658 { |
2688 /*a0393213 cphs rel4 - the parameter sent are of different type for CPHS Rel4 and non-CPHS Rel4*/ | 2659 /*a0393213 cphs rel4 - the parameter sent are of different type for CPHS Rel4 and non-CPHS Rel4*/ |
2689 #ifdef FF_CPHS_REL4 | 2660 #ifdef FF_CPHS_REL4 |
2690 if(!isCFISFilePresent() ) | 2661 if(!isCFISFilePresent() ) |
2691 { | 2662 { |
2692 #endif | 2663 #endif |
2693 UBYTE line; | 2664 UBYTE line; |
2694 //check for divert on active line | 2665 //check for divert on active line |
2695 line = GetAlsLine(); | 2666 line = GetAlsLine(); |
2696 | 2667 |
2697 TRACE_EVENT_P4("cphs_mfw_cb():E_CPHS_GET_DV_STAT %d %x %x %x", ((T_MFW_CPHS_DV_STAT*)para)->result, | 2668 TRACE_EVENT_P4("cphs_mfw_cb():E_CPHS_GET_DV_STAT %d %x %x %x", ((T_MFW_CPHS_DV_STAT*)para)->result, |
2698 ((T_MFW_CPHS_DV_STAT*)para)->line1,((T_MFW_CPHS_DV_STAT*)para)->line2,line); | 2669 ((T_MFW_CPHS_DV_STAT*)para)->line1,((T_MFW_CPHS_DV_STAT*)para)->line2,line); |
2699 | 2670 |
2700 /* 30th May,2006 OMAPS00079650 a0393213 (R.Prabakar) | 2671 /* 30th May,2006 OMAPS00079650 a0393213 (R.Prabakar) |
2701 Description : CPHS Call Forwarding feature implementation | 2672 Description : CPHS Call Forwarding feature implementation |
2702 Solution : call_forwarding_status is updated. The data is not written into flash as it would be done | 2673 Solution : call_forwarding_status is updated. The data is not written into flash as it would be done |
2703 in E_CPHS_SET_DV_STAT. However the present code is not disturbed*/ | 2674 in E_CPHS_SET_DV_STAT. However the present code is not disturbed*/ |
2704 | 2675 |
2705 #ifdef FF_CPHS | 2676 #ifdef FF_CPHS |
2706 if(((T_MFW_CPHS_DV_STAT*)para)->result == MFW_SIMOP_READ_ERR) | 2677 if(((T_MFW_CPHS_DV_STAT*)para)->result == MFW_SIMOP_READ_ERR) |
2707 { | 2678 { |
2708 | 2679 |
2709 if(FFS_flashData.CFState==TRUE) | 2680 if(FFS_flashData.CFState==TRUE) |
2710 { | 2681 { |
2711 if (line == MFW_SERV_LINE2) | 2682 if (line == MFW_SERV_LINE2) |
2712 ((T_MFW_CPHS_DV_STAT*)para)->line2=MFW_CFLAG_SET; | 2683 ((T_MFW_CPHS_DV_STAT*)para)->line2=MFW_CFLAG_SET; |
2713 else | 2684 else |
2714 ((T_MFW_CPHS_DV_STAT*)para)->line1=MFW_CFLAG_SET; | 2685 ((T_MFW_CPHS_DV_STAT*)para)->line1=MFW_CFLAG_SET; |
2715 | 2686 |
2716 } | 2687 } |
2717 else | 2688 else |
2718 { | 2689 { |
2719 if (line == MFW_SERV_LINE2) | 2690 if (line == MFW_SERV_LINE2) |
2720 ((T_MFW_CPHS_DV_STAT*)para)->line2=MFW_CFLAG_NOTSet; | 2691 ((T_MFW_CPHS_DV_STAT*)para)->line2=MFW_CFLAG_NOTSet; |
2721 else | 2692 else |
2722 ((T_MFW_CPHS_DV_STAT*)para)->line1=MFW_CFLAG_NOTSet; | 2693 ((T_MFW_CPHS_DV_STAT*)para)->line1=MFW_CFLAG_NOTSet; |
2723 } | 2694 } |
2724 } | 2695 } |
2725 #endif | 2696 #endif |
2726 if(para != NULL) | 2697 if(para != NULL) |
2727 memcpy(&call_forwarding_status, para, sizeof(T_MFW_CPHS_DV_STAT)); | 2698 memcpy(&call_forwarding_status, para, sizeof(T_MFW_CPHS_DV_STAT)); |
2728 { | 2699 { |
2729 | 2700 |
2730 //check if current outgoing line diverted | 2701 //check if current outgoing line diverted |
2731 /*a0393213 - the call forward icon is now shown taking both the lines into consideration*/ | 2702 /*a0393213 - the call forward icon is now shown taking both the lines into consideration*/ |
2732 /*if (line == MFW_SERV_LINE2) | 2703 /*if (line == MFW_SERV_LINE2) |
2733 DivertStatus = GetCphsDivertStatus(MFW_SERV_LINE2); | 2704 DivertStatus = GetCphsDivertStatus(MFW_SERV_LINE2); |
2734 else//if (line == MFW_SERV_LINE1) | 2705 else//if (line == MFW_SERV_LINE1) |
2735 DivertStatus = GetCphsDivertStatus(MFW_SERV_LINE1);*/ | 2706 DivertStatus = GetCphsDivertStatus(MFW_SERV_LINE1);*/ |
2736 | 2707 |
2737 //set the call forwarding icon | 2708 //set the call forwarding icon |
2738 if ((GetCphsDivertStatus(MFW_SERV_LINE1)==MFW_CFLAG_SET) || | 2709 if ((GetCphsDivertStatus(MFW_SERV_LINE1)==MFW_CFLAG_SET) || |
2739 (GetCphsDivertStatus(MFW_SERV_LINE2)==MFW_CFLAG_SET)) | 2710 (GetCphsDivertStatus(MFW_SERV_LINE2)==MFW_CFLAG_SET)) |
2740 { | 2711 { |
2741 iconsSetState(iconIdCallFor); | 2712 iconsSetState(iconIdCallFor); |
2742 #ifndef FF_CPHS | 2713 #ifndef FF_CPHS |
2743 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) | 2714 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) |
2744 // Setting the Current state of CF in Flash | 2715 // Setting the Current state of CF in Flash |
2745 FFS_flashData.CFState=TRUE; | 2716 FFS_flashData.CFState=TRUE; |
2746 #endif | 2717 #endif |
2747 } | 2718 } |
2748 //gid rid of call forwarding icon | 2719 //gid rid of call forwarding icon |
2749 if ((GetCphsDivertStatus(MFW_SERV_LINE1)==MFW_CFLAG_NOTSet) && | 2720 if ((GetCphsDivertStatus(MFW_SERV_LINE1)==MFW_CFLAG_NOTSet) && |
2750 (GetCphsDivertStatus(MFW_SERV_LINE2)==MFW_CFLAG_NOTSet)) | 2721 (GetCphsDivertStatus(MFW_SERV_LINE2)==MFW_CFLAG_NOTSet)) |
2751 { | 2722 { |
2752 iconsDeleteState(iconIdCallFor); | 2723 iconsDeleteState(iconIdCallFor); |
2753 #ifndef FF_CPHS | 2724 #ifndef FF_CPHS |
2754 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) | 2725 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) |
2755 // Setting the Current state of CF in Flash | 2726 // Setting the Current state of CF in Flash |
2756 FFS_flashData.CFState=FALSE; | 2727 FFS_flashData.CFState=FALSE; |
2757 #endif | 2728 #endif |
2758 } | 2729 } |
2759 | 2730 |
2760 #ifndef FF_CPHS | 2731 #ifndef FF_CPHS |
2761 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) | 2732 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) |
2762 // Writng the Current state of CF into ffs | 2733 // Writng the Current state of CF into ffs |
2763 flash_write(); | 2734 flash_write(); |
2764 #endif | 2735 #endif |
2765 } | 2736 } |
2766 #ifdef FF_CPHS_REL4 | 2737 #ifdef FF_CPHS_REL4 |
2767 } | 2738 } |
2768 else | 2739 else |
2769 { | 2740 { |
2770 /*store info in call_forwarding_status_rel4*/ | 2741 /*store info in call_forwarding_status_rel4*/ |
2771 memcpy(&call_forwarding_status_rel4, para, sizeof(T_MFW_CPHS_REL4_DV_STAT)); | 2742 memcpy(&call_forwarding_status_rel4, para, sizeof(T_MFW_CPHS_REL4_DV_STAT)); |
2772 if(((T_MFW_CPHS_REL4_DV_STAT*)para)->voice==MFW_CFLAG_SET) | 2743 if(((T_MFW_CPHS_REL4_DV_STAT*)para)->voice==MFW_CFLAG_SET) |
2773 iconsSetState(iconIdCallFor); | 2744 iconsSetState(iconIdCallFor); |
2774 else | 2745 else |
2775 iconsDeleteState(iconIdCallFor); | 2746 iconsDeleteState(iconIdCallFor); |
2776 } | 2747 } |
2777 if(isMWISFilePresent()) | 2748 if(isMWISFilePresent()) |
2778 cphs_rel4_get_mailbox_status(); | 2749 cphs_rel4_get_mailbox_status(); |
2779 #endif | 2750 #endif |
2780 } | 2751 } |
2781 break; | 2752 break; |
2782 case E_CPHS_SET_DV_STAT: | 2753 case E_CPHS_SET_DV_STAT: |
2783 { | 2754 { |
2784 //result of setting divert status | 2755 //result of setting divert status |
2785 // UBYTE write_result; // RAVI | 2756 // UBYTE write_result; // RAVI |
2786 /* 30th May,2006 OMAPS00079650 a0393213 (R.Prabakar) | 2757 /* 30th May,2006 OMAPS00079650 a0393213 (R.Prabakar) |
2787 Description : CPHS Call Forwarding feature implementation | 2758 Description : CPHS Call Forwarding feature implementation |
2788 Solution : CF status is written into flash if sim write had failed*/ | 2759 Solution : CF status is written into flash if sim write had failed*/ |
2789 #ifdef FF_CPHS_REL4 | 2760 #ifdef FF_CPHS_REL4 |
2790 if(!isCFISFilePresent() ) | 2761 if(!isCFISFilePresent() ) |
2791 { | 2762 { |
2792 #endif | 2763 #endif |
2793 #ifdef FF_CPHS | 2764 #ifdef FF_CPHS |
2794 if(para != NULL) | 2765 if(para != NULL) |
2795 { | 2766 { |
2796 UBYTE write_result; | 2767 UBYTE write_result; |
2797 write_result = *(UBYTE*)para; | 2768 write_result = *(UBYTE*)para; |
2798 if (write_result == MFW_SIMOP_WRITE_OK) | 2769 if (write_result == MFW_SIMOP_WRITE_OK) |
2799 TRACE_EVENT("cphs_mfw_cb:Call forward flag set in sim"); | 2770 TRACE_EVENT("cphs_mfw_cb:Call forward flag set in sim"); |
2800 if (write_result == MFW_SIMOP_WRITE_ERR) | 2771 if (write_result == MFW_SIMOP_WRITE_ERR) |
2801 { | 2772 { |
2802 TRACE_EVENT("cphs_mfw_cb:Unable to set call forward flag in sim"); | 2773 TRACE_EVENT("cphs_mfw_cb:Unable to set call forward flag in sim"); |
2803 | 2774 |
2804 if(ss_data.cfu_services&0x01) | 2775 if(ss_data.cfu_services&0x01) |
2805 { | 2776 { |
2806 FFS_flashData.CFState=TRUE; | 2777 FFS_flashData.CFState=TRUE; |
2807 } | 2778 } |
2808 else | 2779 else |
2809 { | 2780 { |
2810 FFS_flashData.CFState=FALSE; | 2781 FFS_flashData.CFState=FALSE; |
2811 } | 2782 } |
2812 flash_write(); | 2783 flash_write(); |
2813 } | 2784 } |
2814 } | 2785 } |
2815 #endif | 2786 #endif |
2816 | 2787 |
2817 cphs_get_divert_status(); //refresh divert status | 2788 cphs_get_divert_status(); //refresh divert status |
2818 #ifdef FF_CPHS_REL4 | 2789 #ifdef FF_CPHS_REL4 |
2819 } | 2790 } |
2820 else/*a0393213 cphs rel4 supported*/ | 2791 else/*a0393213 cphs rel4 supported*/ |
2821 { | 2792 { |
2822 if(call_forwarding_status_rel4.voice==MFW_CFLAG_SET) | 2793 if(call_forwarding_status_rel4.voice==MFW_CFLAG_SET) |
2823 iconsSetState(iconIdCallFor); | 2794 iconsSetState(iconIdCallFor); |
2824 else | 2795 else |
2825 iconsDeleteState(iconIdCallFor); | 2796 iconsDeleteState(iconIdCallFor); |
2826 } | 2797 } |
2827 #endif | 2798 #endif |
2828 | 2799 |
2829 } | 2800 } |
2830 break; | 2801 break; |
2831 case E_CPHS_GET_ALS_STATUS: | 2802 case E_CPHS_GET_ALS_STATUS: |
2832 { if(para != NULL) | 2803 { if(para != NULL) |
2833 memcpy(&als_status, para, sizeof(T_MFW_CPHS_ALS_STATUS)); | 2804 memcpy(&als_status, para, sizeof(T_MFW_CPHS_ALS_STATUS)); |
2834 } | 2805 } |
2835 break; | 2806 break; |
2836 case E_CPHS_SET_LINE: | 2807 case E_CPHS_SET_LINE: |
2837 { //result of set ALS line | 2808 { //result of set ALS line |
2838 UBYTE write_result; | 2809 UBYTE write_result; |
2839 if(para != NULL) | 2810 if(para != NULL) |
2840 { write_result = *(UBYTE*)para; | 2811 { write_result = *(UBYTE*)para; |
2841 if (write_result == MFW_SIMOP_WRITE_OK) | 2812 if (write_result == MFW_SIMOP_WRITE_OK) |
2842 { | 2813 { |
2843 TRACE_EVENT("cphs_mfw_cb() : ALS status written into flash"); | 2814 TRACE_EVENT("cphs_mfw_cb() : ALS status written into flash"); |
2844 ShowMessage(parent, TxtChanged, TxtNull); | 2815 ShowMessage(parent, TxtChanged, TxtNull); |
2845 } | 2816 } |
2846 if (write_result == MFW_SIMOP_WRITE_ERR) | 2817 if (write_result == MFW_SIMOP_WRITE_ERR) |
2847 { | 2818 { |
2848 TRACE_EVENT("cphs_mfw_cb() : ALS status not written into flash"); | 2819 TRACE_EVENT("cphs_mfw_cb() : ALS status not written into flash"); |
2849 ShowMessage(parent, TxtWriteError, TxtNull);//display "Write Error" | 2820 ShowMessage(parent, TxtWriteError, TxtNull);//display "Write Error" |
2850 } | 2821 } |
2851 } | 2822 } |
2852 #ifdef FF_CPHS | 2823 #ifdef FF_CPHS |
2853 mmi_cphs_get_als_info(); | 2824 mmi_cphs_get_als_info(); |
2854 #else | 2825 #else |
2855 cphs_get_als_info(&als_status);//refresh current line | 2826 cphs_get_als_info(&als_status);//refresh current line |
2856 #endif | 2827 #endif |
2857 /*cphs_get_divert_status(); //refresh divert status*//*a0393213 - the call forward icon is now shown taking both the lines into consideration*/ | 2828 /*cphs_get_divert_status(); //refresh divert status*//*a0393213 - the call forward icon is now shown taking both the lines into consideration*/ |
2858 } | 2829 } |
2859 break; | 2830 break; |
2860 case E_CPHS_SET_ALS_STATUS: | 2831 case E_CPHS_SET_ALS_STATUS: |
2861 { //result of setting ALS status | 2832 { //result of setting ALS status |
2862 UBYTE write_result; | 2833 UBYTE write_result; |
2863 if(para != NULL) | 2834 if(para != NULL) |
2864 { write_result = *(UBYTE*)para; | 2835 { write_result = *(UBYTE*)para; |
2865 if (write_result == MFW_SIMOP_WRITE_OK) | 2836 if (write_result == MFW_SIMOP_WRITE_OK) |
2866 ShowMessage(parent, TxtSaved, TxtNull); | 2837 ShowMessage(parent, TxtSaved, TxtNull); |
2867 if (write_result == MFW_SIMOP_WRITE_ERR) | 2838 if (write_result == MFW_SIMOP_WRITE_ERR) |
2868 ShowMessage(parent, TxtWriteError, TxtNull);//display "Write Error" | 2839 ShowMessage(parent, TxtWriteError, TxtNull);//display "Write Error" |
2869 } | 2840 } |
2870 } | 2841 } |
2871 break; | 2842 break; |
2872 case E_CPHS_GET_CSP: | 2843 case E_CPHS_GET_CSP: |
2873 { | 2844 { |
2874 #ifdef FF_CPHS | 2845 #ifdef FF_CPHS |
2875 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS | 2846 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS |
2876 int i; | 2847 int i; |
2877 #endif | 2848 #endif |
2878 TRACE_EVENT("Reached E_CPHS_GET_CSP"); | 2849 TRACE_EVENT("Reached E_CPHS_GET_CSP"); |
2879 if(para != NULL) | 2850 if(para != NULL) |
2880 { | 2851 { |
2881 memcpy(&customer_service_profile, para, sizeof(T_MFW_CPHS_CSP)); | 2852 memcpy(&customer_service_profile, para, sizeof(T_MFW_CPHS_CSP)); |
2882 | 2853 |
2883 /***************************Go-lite Optimization changes Start***********************/ | 2854 /***************************Go-lite Optimization changes Start***********************/ |
2884 //Aug 16, 2004 REF: CRR 24323 Deepa M.D | 2855 //Aug 16, 2004 REF: CRR 24323 Deepa M.D |
2885 TRACE_EVENT_P7("CSP: %x,%x,%x,%x,%x,%x,%x", customer_service_profile.csp[0], customer_service_profile.csp[1], | 2856 TRACE_EVENT_P7("CSP: %x,%x,%x,%x,%x,%x,%x", customer_service_profile.csp[0], customer_service_profile.csp[1], |
2886 customer_service_profile.csp[2], customer_service_profile.csp[3], customer_service_profile.csp[4], customer_service_profile.csp[5], | 2857 customer_service_profile.csp[2], customer_service_profile.csp[3], customer_service_profile.csp[4], customer_service_profile.csp[5], |
2887 customer_service_profile.csp[6]); | 2858 customer_service_profile.csp[6]); |
2888 TRACE_EVENT_P3("%x,%x,%x", customer_service_profile.csp[7], customer_service_profile.csp[8], customer_service_profile.csp[9]); | 2859 TRACE_EVENT_P3("%x,%x,%x", customer_service_profile.csp[7], customer_service_profile.csp[8], customer_service_profile.csp[9]); |
2889 TRACE_EVENT_P7("CSP: %x,%x,%x,%x,%x,%x,%x", customer_service_profile.csp[10], customer_service_profile.csp[11], | 2860 TRACE_EVENT_P7("CSP: %x,%x,%x,%x,%x,%x,%x", customer_service_profile.csp[10], customer_service_profile.csp[11], |
2890 customer_service_profile.csp[12], customer_service_profile.csp[13], customer_service_profile.csp[14], customer_service_profile.csp[15], | 2861 customer_service_profile.csp[12], customer_service_profile.csp[13], customer_service_profile.csp[14], customer_service_profile.csp[15], |
2891 customer_service_profile.csp[16]); | 2862 customer_service_profile.csp[16]); |
2892 TRACE_EVENT_P3("%x,%x,%x", customer_service_profile.csp[17], customer_service_profile.csp[18], customer_service_profile.csp[19]); | 2863 TRACE_EVENT_P3("%x,%x,%x", customer_service_profile.csp[17], customer_service_profile.csp[18], customer_service_profile.csp[19]); |
2893 /***************************Go-lite Optimization changes end***********************/ | 2864 /***************************Go-lite Optimization changes end***********************/ |
2894 | 2865 |
2895 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS | 2866 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS |
2896 #ifdef FF_CPHS | 2867 #ifdef FF_CPHS |
2897 TRACE_EVENT_P2("AOC : Service group code =%d value =%d", | 2868 TRACE_EVENT_P2("AOC : Service group code =%d value =%d", |
2898 customer_service_profile.csp[4], customer_service_profile.csp[5]); | 2869 customer_service_profile.csp[4], customer_service_profile.csp[5]); |
2899 // No need to check if Aoc_flag is already set to TRUE. | 2870 // No need to check if Aoc_flag is already set to TRUE. |
2900 | 2871 |
2901 /*check for Byte 1 service group code =03 and Byte2 bit 6 =1*/ | 2872 /*check for Byte 1 service group code =03 and Byte2 bit 6 =1*/ |
2902 for (i=0;i<20; i++) | 2873 for (i=0;i<20; i++) |
2903 { | 2874 { |
2904 //check for AOC bit | 2875 //check for AOC bit |
2905 if( customer_service_profile.csp[i] EQ 0x03) | 2876 if( customer_service_profile.csp[i] EQ 0x03) |
2906 { | 2877 { |
2907 if(i == 19) break; /* x0039928 - Lint warning fix */ | 2878 if(i == 19) break; /* x0039928 - Lint warning fix */ |
2908 i++; | 2879 i++; |
2909 if( customer_service_profile.csp[i] & 0x20) | 2880 if( customer_service_profile.csp[i] & 0x20) |
2910 { | 2881 { |
2911 TRACE_EVENT("E_CPHS_GET_CSP: AOC flag is SET in CPHS "); | 2882 TRACE_EVENT("E_CPHS_GET_CSP: AOC flag is SET in CPHS "); |
2912 setAOCflag(TRUE); | 2883 setAOCflag(TRUE); |
2913 break; | 2884 break; |
2914 } | 2885 } |
2915 else { | 2886 else { |
2916 TRACE_EVENT("E_CPHS_GET_CSP: AOC flag is NOT SET in CPHS "); | 2887 TRACE_EVENT("E_CPHS_GET_CSP: AOC flag is NOT SET in CPHS "); |
2917 setAOCflag(FALSE); | 2888 setAOCflag(FALSE); |
2918 } | 2889 } |
2919 } | 2890 } |
2920 //check for ALS bit | 2891 //check for ALS bit |
2921 else if( customer_service_profile.csp[i] == 0x06) | 2892 else if( customer_service_profile.csp[i] == 0x06) |
2922 { | 2893 { |
2923 if(i == 19) break; /* x0039928 - Lint warning fix */ | 2894 if(i == 19) break; /* x0039928 - Lint warning fix */ |
2924 i++; | 2895 i++; |
2925 if( customer_service_profile.csp[i] & 0x80 ) | 2896 if( customer_service_profile.csp[i] & 0x80 ) |
2926 { | 2897 { |
2927 mmi_cphs_set_als_value( TRUE); | 2898 mmi_cphs_set_als_value( TRUE); |
2928 break; | 2899 break; |
2929 } | 2900 } |
2930 else | 2901 else |
2931 mmi_cphs_set_als_value( FALSE); | 2902 mmi_cphs_set_als_value( FALSE); |
2932 } | 2903 } |
2933 else | 2904 else |
2934 i++; | 2905 i++; |
2935 } | 2906 } |
2936 | 2907 |
2937 #endif | 2908 #endif |
2938 cphs_get_info_num(1, info_num_index); | 2909 cphs_get_info_num(1, info_num_index); |
2939 } | 2910 } |
2940 | 2911 |
2941 }break; | 2912 }break; |
2942 case E_CPHS_GET_INFO_NUM: | 2913 case E_CPHS_GET_INFO_NUM: |
2943 { | 2914 { |
2944 if(para != NULL) | 2915 if(para != NULL) |
2945 { | 2916 { |
2946 memcpy(¤t_info_num, para, sizeof( T_MFW_CPHS_INFONUM_ENTRY)); | 2917 memcpy(¤t_info_num, para, sizeof( T_MFW_CPHS_INFONUM_ENTRY)); |
2947 | 2918 |
2948 TRACE_EVENT("Getting info number"); | 2919 TRACE_EVENT("Getting info number"); |
2949 if (current_info_num.result !=MFW_SIMOP_READ_ERR) | 2920 if (current_info_num.result !=MFW_SIMOP_READ_ERR) |
2950 { T_DISPLAY_DATA Dialog; | 2921 { T_DISPLAY_DATA Dialog; |
2951 TRACE_EVENT("Displaying num"); | 2922 TRACE_EVENT("Displaying num"); |
2952 /* Initialise the dialog control block with default information | 2923 /* Initialise the dialog control block with default information |
2953 */ | 2924 */ |
2954 dlg_initDisplayData_TextStr( &Dialog, TxtSoftCall, TxtSoftBack, (char*)current_info_num.alpha.data, (char*)current_info_num.number, COLOUR_STATUS); | 2925 dlg_initDisplayData_TextStr( &Dialog, TxtSoftCall, TxtSoftBack, (char*)current_info_num.alpha.data, (char*)current_info_num.number, COLOUR_STATUS); |
2955 dlg_initDisplayData_events( &Dialog, (T_VOID_FUNC) info_num_display_cb, FOREVER, KEY_LEFT| KEY_RIGHT|KEY_CLEAR ); | 2926 dlg_initDisplayData_events( &Dialog, (T_VOID_FUNC) info_num_display_cb, FOREVER, KEY_LEFT| KEY_RIGHT|KEY_CLEAR ); |
2956 | 2927 |
2957 /* Show the dialog | 2928 /* Show the dialog |
2958 */ | 2929 */ |
2959 info_dialog( parent, &Dialog ); | 2930 info_dialog( parent, &Dialog ); |
2960 } | 2931 } |
2961 } | 2932 } |
2962 } | 2933 } |
2963 | 2934 |
2964 break; | 2935 break; |
2965 case E_CPHS_GET_INFO_LIST: | 2936 case E_CPHS_GET_INFO_LIST: |
2966 { | 2937 { |
2967 if (para == NULL) | 2938 if (para == NULL) |
2968 { | 2939 { |
2969 TRACE_EVENT("Invalid info num list"); | 2940 TRACE_EVENT("Invalid info num list"); |
2970 } | 2941 } |
2971 else | 2942 else |
2972 { //populate next pointer | 2943 { //populate next pointer |
2973 //RAVI - 29-11-2005 | 2944 //RAVI - 29-11-2005 |
2974 /* x0045876, 14-Aug-2006 (WR - assignment in condition)*/ | 2945 /* x0045876, 14-Aug-2006 (WR - assignment in condition)*/ |
2975 info_numbers[info_num_level] = (T_MFW_CPHS_INFONUM_LIST*) ALLOC_MEMORY(sizeof(T_MFW_CPHS_INFONUM_LIST)); | 2946 info_numbers[info_num_level] = (T_MFW_CPHS_INFONUM_LIST*) ALLOC_MEMORY(sizeof(T_MFW_CPHS_INFONUM_LIST)); |
2976 if (info_numbers[info_num_level]) | 2947 if (info_numbers[info_num_level]) |
2977 memcpy(info_numbers[info_num_level], para, sizeof(T_MFW_CPHS_INFONUM_LIST)); | 2948 memcpy(info_numbers[info_num_level], para, sizeof(T_MFW_CPHS_INFONUM_LIST)); |
2978 | 2949 |
2979 | 2950 |
2980 TRACE_EVENT("Getting info numbers!!"); | 2951 TRACE_EVENT("Getting info numbers!!"); |
2981 if (info_numbers[info_num_level]->count != 0) | 2952 if (info_numbers[info_num_level]->count != 0) |
2982 { | 2953 { |
2983 /***************************Go-lite Optimization changes Start***********************/ | 2954 /***************************Go-lite Optimization changes Start***********************/ |
2984 //Aug 16, 2004 REF: CRR 24323 Deepa M.D | 2955 //Aug 16, 2004 REF: CRR 24323 Deepa M.D |
2985 TRACE_EVENT_P1("Valid info num list, count:%d",info_numbers[info_num_level]->count); | 2956 TRACE_EVENT_P1("Valid info num list, count:%d",info_numbers[info_num_level]->count); |
2986 /***************************Go-lite Optimization changes end***********************/ | 2957 /***************************Go-lite Optimization changes end***********************/ |
2987 if (info_num_level) | 2958 if (info_num_level) |
2988 { info_num_level++; | 2959 { info_num_level++; |
2989 InfoNumbers2(); | 2960 InfoNumbers2(); |
2990 | 2961 |
2991 } | 2962 } |
2992 } | 2963 } |
2993 else | 2964 else |
2994 info_numbers[info_num_level]=NULL; | 2965 info_numbers[info_num_level]=NULL; |
2995 } | 2966 } |
2996 } | 2967 } |
2997 break; | 2968 break; |
2998 case E_CPHS_GET_SIM_FIELD: | 2969 case E_CPHS_GET_SIM_FIELD: |
2999 { T_MFW_CPHS_READ_SIM_ENTRY temp; | 2970 { T_MFW_CPHS_READ_SIM_ENTRY temp; |
3000 | 2971 |
3001 memcpy(&temp, para, sizeof(T_MFW_CPHS_READ_SIM_ENTRY)); | 2972 memcpy(&temp, para, sizeof(T_MFW_CPHS_READ_SIM_ENTRY)); |
3002 if (temp.data_len >0) | 2973 if (temp.data_len >0) |
3003 //Jun 14, 2005 REF: MMI-FIX-30439 x0018858 | 2974 //Jun 14, 2005 REF: MMI-FIX-30439 x0018858 |
3004 //begin 30439 | 2975 //begin 30439 |
3005 //temp.exchange_data[temp.data_len-1] = 0; | 2976 //temp.exchange_data[temp.data_len-1] = 0; |
3006 //end 30439 | 2977 //end 30439 |
3007 /***************************Go-lite Optimization changes Start***********************/ | 2978 /***************************Go-lite Optimization changes Start***********************/ |
3008 //Aug 16, 2004 REF: CRR 24323 Deepa M.D | 2979 //Aug 16, 2004 REF: CRR 24323 Deepa M.D |
3009 TRACE_EVENT_P3("Sim Read, Field: %d (Record: %d) Errcode: %d",temp.requested_field, temp.record, temp.sim_result); | 2980 TRACE_EVENT_P3("Sim Read, Field: %d (Record: %d) Errcode: %d",temp.requested_field, temp.record, temp.sim_result); |
3010 /***************************Go-lite Optimization changes end***********************/ | 2981 /***************************Go-lite Optimization changes end***********************/ |
3011 /* SPR759 - SH - Read Sim for homezone, calls appropriate functions */ | 2982 /* SPR759 - SH - Read Sim for homezone, calls appropriate functions */ |
3012 #ifdef MMI_HOMEZONE_ENABLED | 2983 #ifdef MMI_HOMEZONE_ENABLED |
3013 if (temp.requested_field>=HZ_SIM_PARAMETERS | 2984 if (temp.requested_field>=HZ_SIM_PARAMETERS |
3014 && temp.requested_field < (HZ_SIM_CELL_CACHE+HZ_ZONES_MAX) ) | 2985 && temp.requested_field < (HZ_SIM_CELL_CACHE+HZ_ZONES_MAX) ) |
3015 { | 2986 { |
3016 homezoneReadSimCb(temp.requested_field, temp.record, temp.sim_result); | 2987 homezoneReadSimCb(temp.requested_field, temp.record, temp.sim_result); |
3017 } | 2988 } |
3018 #endif | 2989 #endif |
3019 } | 2990 } |
3020 break; | 2991 break; |
3021 | 2992 |
3022 case E_CPHS_SET_SIM_FIELD: | 2993 case E_CPHS_SET_SIM_FIELD: |
3023 { | 2994 { |
3024 T_MFW_CPHS_READ_SIM_ENTRY temp; | 2995 T_MFW_CPHS_READ_SIM_ENTRY temp; |
3025 | 2996 |
3026 memcpy(&temp, para, sizeof(T_MFW_CPHS_READ_SIM_ENTRY)); | 2997 memcpy(&temp, para, sizeof(T_MFW_CPHS_READ_SIM_ENTRY)); |
3027 if (temp.data_len >0) | 2998 if (temp.data_len >0) |
3028 temp.exchange_data[temp.data_len-1] = 0; | 2999 temp.exchange_data[temp.data_len-1] = 0; |
3029 /***************************Go-lite Optimization changes Start***********************/ | 3000 /***************************Go-lite Optimization changes Start***********************/ |
3030 //Aug 16, 2004 REF: CRR 24323 Deepa M.D | 3001 //Aug 16, 2004 REF: CRR 24323 Deepa M.D |
3031 TRACE_EVENT_P2("Sim Write, Requested_field: %d Errcode: %d",temp.requested_field, temp.sim_result); | 3002 TRACE_EVENT_P2("Sim Write, Requested_field: %d Errcode: %d",temp.requested_field, temp.sim_result); |
3032 /***************************Go-lite Optimization changes end***********************/ | 3003 /***************************Go-lite Optimization changes end***********************/ |
3033 /* SPR759 - SH - Read Sim for homezone, calls appropriate functions */ | 3004 /* SPR759 - SH - Read Sim for homezone, calls appropriate functions */ |
3034 #ifdef MMI_HOMEZONE_ENABLED | 3005 #ifdef MMI_HOMEZONE_ENABLED |
3035 if (temp.requested_field>=HZ_SIM_PARAMETERS | 3006 if (temp.requested_field>=HZ_SIM_PARAMETERS |
3036 && temp.requested_field < (HZ_SIM_CELL_CACHE+HZ_ZONES_MAX) ) | 3007 && temp.requested_field < (HZ_SIM_CELL_CACHE+HZ_ZONES_MAX) ) |
3037 { | 3008 { |
3038 homezoneWriteSimCb(temp.requested_field, temp.record, temp.sim_result); | 3009 homezoneWriteSimCb(temp.requested_field, temp.record, temp.sim_result); |
3039 } | 3010 } |
3040 #endif | 3011 #endif |
3041 } | 3012 } |
3042 break; | 3013 break; |
3043 #ifdef FF_CPHS_REL4 | 3014 #ifdef FF_CPHS_REL4 |
3044 case E_CPHS_MSP_IND: | 3015 case E_CPHS_MSP_IND: |
3045 { | 3016 { |
3046 if(para != NULL) | 3017 if(para != NULL) |
3047 { | 3018 { |
3048 msp_info = mfw_cphs_get_msp(); | 3019 msp_info = mfw_cphs_get_msp(); |
3049 TRACE_EVENT_P1("E_CPHS_MSP_IND - mspcount %d",msp_info->count); | 3020 TRACE_EVENT_P1("E_CPHS_MSP_IND - mspcount %d",msp_info->count); |
3050 if(msp_info->count < 2) | 3021 if(msp_info->count < 2) |
3051 { | 3022 { |
3052 MSP_flag = FALSE; | 3023 MSP_flag = FALSE; |
3053 #ifdef FF_CPHS | 3024 #ifdef FF_CPHS |
3054 mmi_cphs_get_als_info(); | 3025 mmi_cphs_get_als_info(); |
3055 #else | 3026 #else |
3056 cphs_get_als_info(&als_status); | 3027 cphs_get_als_info(&als_status); |
3057 #endif | 3028 #endif |
3058 return TRUE; | 3029 return TRUE; |
3059 } | 3030 } |
3060 else | 3031 else |
3061 { | 3032 { |
3062 MSP_flag = TRUE; | 3033 MSP_flag = TRUE; |
3063 mfw_cphs_set_default_profile(1); | 3034 mfw_cphs_set_default_profile(1); |
3064 mfw_cphs_set_reg_profile(1); | 3035 mfw_cphs_set_reg_profile(1); |
3065 mmi_msp_interrogate(); | 3036 mmi_msp_interrogate(); |
3066 } | 3037 } |
3067 } | 3038 } |
3068 } | 3039 } |
3069 break; | 3040 break; |
3070 #endif | 3041 #endif |
3071 default: break; | 3042 default: break; |
3072 } | 3043 } |
3073 | 3044 |
3074 | 3045 |
3075 return TRUE; | 3046 return TRUE; |
3076 } | 3047 } |
3077 | 3048 |
3078 | 3049 |
3079 | 3050 /******************************************************************************* |
3080 | 3051 |
3081 | 3052 $Function: int InfoNumbers2( ) |
3082 | 3053 $Description: Displays info number sub-menus |
3083 | 3054 $Returns: status int |
3084 | 3055 $Arguments: nothing |
3085 /******************************************************************************* | |
3086 | |
3087 $Function: int InfoNumbers2( ) | |
3088 $Description: Displays info number sub-menus | |
3089 $Returns: status int | |
3090 $Arguments: nothing | |
3091 | 3056 |
3092 *******************************************************************************/ | 3057 *******************************************************************************/ |
3093 //for sub-menus | 3058 //for sub-menus |
3094 int InfoNumbers2( ) | 3059 int InfoNumbers2( ) |
3095 { | 3060 { |
3096 T_MFW_HND win; | 3061 T_MFW_HND win; |
3097 T_MFW_HND parent_win = mfw_parent(mfw_header()); | 3062 T_MFW_HND parent_win = mfw_parent(mfw_header()); |
3098 | 3063 |
3099 TRACE_FUNCTION("InfoNumbers2"); | 3064 TRACE_FUNCTION("InfoNumbers2"); |
3100 | 3065 |
3101 if (info_numbers != NULL) | 3066 if (info_numbers != NULL) |
3102 { type_of_list = INFO_NUM_LIST; | 3067 { type_of_list = INFO_NUM_LIST; |
3103 win = buildInfoNumberMenu(parent_win); | 3068 win = buildInfoNumberMenu(parent_win); |
3104 | 3069 |
3105 if (win NEQ NULL) | 3070 if (win NEQ NULL) |
3106 { | 3071 { |
3107 SEND_EVENT (win, E_INIT, 0, 0); | 3072 SEND_EVENT (win, E_INIT, 0, 0); |
3108 } | 3073 } |
3109 } | 3074 } |
3110 | 3075 |
3111 return MFW_EVENT_CONSUMED; | 3076 return MFW_EVENT_CONSUMED; |
3112 } | 3077 } |
3113 /******************************************************************************* | 3078 /******************************************************************************* |
3114 | 3079 |
3115 $Function: buildInfoNumberMenu | 3080 $Function: buildInfoNumberMenu |
3116 $Description: Creates window for Information numbers | 3081 $Description: Creates window for Information numbers |
3117 $Returns: window created | 3082 $Returns: window created |
3118 $Arguments: parent window | 3083 $Arguments: parent window |
3119 | 3084 |
3120 *******************************************************************************/ | 3085 *******************************************************************************/ |
3121 static T_MFW_HND buildInfoNumberMenu( MfwHnd parent_window) | 3086 static T_MFW_HND buildInfoNumberMenu( MfwHnd parent_window) |
3122 { | 3087 { |
3123 T_INFO_NUM_INFO * data = (T_INFO_NUM_INFO *)ALLOC_MEMORY (sizeof (T_INFO_NUM_INFO)); | 3088 T_INFO_NUM_INFO * data = (T_INFO_NUM_INFO *)ALLOC_MEMORY (sizeof (T_INFO_NUM_INFO)); |
3124 T_MFW_WIN * win; | 3089 T_MFW_WIN * win; |
3125 TRACE_FUNCTION("buildInfoNumberMenu"); | 3090 TRACE_FUNCTION("buildInfoNumberMenu"); |
3126 | 3091 |
3127 /* | 3092 /* |
3128 * Create window handler | 3093 * Create window handler |
3129 */ | 3094 */ |
3130 | 3095 |
3131 data->numbers_win = win_create (parent_window, 0, E_WIN_VISIBLE, (T_MFW_CB)info_num_win_cb); | 3096 data->numbers_win = win_create (parent_window, 0, E_WIN_VISIBLE, (T_MFW_CB)info_num_win_cb); |
3132 if (data->numbers_win EQ NULL) | 3097 if (data->numbers_win EQ NULL) |
3133 { | 3098 { |
3134 return NULL; | 3099 return NULL; |
3135 } | 3100 } |
3136 | 3101 |
3137 TRACE_EVENT(">>>> Info num window created: " ); | 3102 TRACE_EVENT(">>>> Info num window created: " ); |
3138 /* | 3103 /* |
3139 * connect the dialog data to the MFW-window | 3104 * connect the dialog data to the MFW-window |
3140 */ | 3105 */ |
3141 | 3106 |
3142 data->mmi_control.dialog = (T_DIALOG_FUNC)info_num_exec_cb; | 3107 data->mmi_control.dialog = (T_DIALOG_FUNC)info_num_exec_cb; |
3143 data->mmi_control.data = data; | 3108 data->mmi_control.data = data; |
3144 win = ((T_MFW_HDR *)data->numbers_win)->data; | 3109 win = ((T_MFW_HDR *)data->numbers_win)->data; |
3145 win->user = (void *)data; | 3110 win->user = (void *)data; |
3146 data->parent = parent_window; | 3111 data->parent = parent_window; |
3147 winShow(data->numbers_win); | 3112 winShow(data->numbers_win); |
3148 /* | 3113 /* |
3149 * return window handle | 3114 * return window handle |
3150 */ | 3115 */ |
3151 | 3116 |
3152 return data->numbers_win; | 3117 return data->numbers_win; |
3153 } | 3118 } |
3154 | 3119 |
3155 | 3120 |
3156 //x0012849: Jagannatha 01 June, 2006 ER: OMAPS00079607 -To Support AcC and Info numbers | 3121 //x0012849: Jagannatha 01 June, 2006 ER: OMAPS00079607 -To Support AcC and Info numbers |
3157 /******************************************************************************* | 3122 /******************************************************************************* |
3158 $Function: info_num_msg_cb | 3123 $Function: info_num_msg_cb |
3159 $Description: Dialogue callback function of the information Numbers message window | 3124 $Description: Dialogue callback function of the information Numbers message window |
3160 $Returns: none | 3125 $Returns: none |
3161 $Arguments: win - window handler, dialogue id, key pressed | 3126 $Arguments: win - window handler, dialogue id, key pressed |
3162 | 3127 |
3163 *******************************************************************************/ | 3128 *******************************************************************************/ |
3164 #ifdef FF_CPHS | 3129 #ifdef FF_CPHS |
3165 void info_num_msg_cb(T_MFW_HND win, USHORT identifier, UBYTE reason) | 3130 void info_num_msg_cb(T_MFW_HND win, USHORT identifier, UBYTE reason) |
3166 { | 3131 { |
3173 // This code is not executed for the case - If mobile is in roaming and service is Network specific. | 3138 // This code is not executed for the case - If mobile is in roaming and service is Network specific. |
3174 if (info_numbers[info_num_level-1]->entry[identifier].entryStat & 0x80) //if bit 8 set/*a0393213 warnings removal - Dialog.Identifier changed to identifier*/ | 3139 if (info_numbers[info_num_level-1]->entry[identifier].entryStat & 0x80) //if bit 8 set/*a0393213 warnings removal - Dialog.Identifier changed to identifier*/ |
3175 { | 3140 { |
3176 TRACE_EVENT("CPHS INFO:Should be number entry"); | 3141 TRACE_EVENT("CPHS INFO:Should be number entry"); |
3177 if (info_num_level < 4) | 3142 if (info_num_level < 4) |
3178 cphs_select_info_num(info_num_index); | 3143 cphs_select_info_num(info_num_index); |
3179 } | 3144 } |
3180 else | 3145 else |
3181 { | 3146 { |
3182 if (info_num_level < 4) | 3147 if (info_num_level < 4) |
3183 { | 3148 { |
3191 break; | 3156 break; |
3192 } | 3157 } |
3193 } | 3158 } |
3194 #endif | 3159 #endif |
3195 /******************************************************************************* | 3160 /******************************************************************************* |
3196 $Function: info_num_display_cb | 3161 $Function: info_num_display_cb |
3197 | 3162 |
3198 $Description: Dialogue callback function of the information Numbers display window | 3163 $Description: Dialogue callback function of the information Numbers display window |
3199 | 3164 |
3200 $Returns: none | 3165 $Returns: none |
3201 | 3166 |
3202 $Arguments: win - window handler, dialogue id, key pressed | 3167 $Arguments: win - window handler, dialogue id, key pressed |
3203 | 3168 |
3204 | 3169 |
3205 *******************************************************************************/ | 3170 *******************************************************************************/ |
3206 | 3171 |
3207 void info_num_display_cb(T_MFW_HND win, USHORT identifier, UBYTE reason) | 3172 void info_num_display_cb(T_MFW_HND win, USHORT identifier, UBYTE reason) |
3208 { | 3173 { |
3209 | 3174 |
3210 // char buf [40]; // RAVI | 3175 // char buf [40]; // RAVI |
3211 | 3176 |
3212 TRACE_FUNCTION ("info_num_display_cb"); | 3177 TRACE_FUNCTION ("info_num_display_cb"); |
3213 | 3178 |
3214 switch (reason) | 3179 switch (reason) |
3215 { | 3180 { |
3216 case INFO_KCD_LEFT: callNumber((UBYTE*)current_info_num.number); | 3181 case INFO_KCD_LEFT: callNumber((UBYTE*)current_info_num.number); |
3217 default: break; // RAVI - Deafault corrected to default. | 3182 default: break; // RAVI - Deafault corrected to default. |
3218 | 3183 } |
3219 } | 3184 } |
3220 } | 3185 /******************************************************************************* |
3221 /******************************************************************************* | 3186 |
3222 | 3187 $Function: info_num_exec_cb |
3223 $Function: info_num_exec_cb | 3188 |
3224 | 3189 $Description: Exec callback function of the information Numbers window |
3225 $Description: Exec callback function of the information Numbers window | 3190 |
3226 | 3191 $Returns: none |
3227 $Returns: none | 3192 |
3228 | 3193 $Arguments: win - window handler |
3229 $Arguments: win - window handler | 3194 event - mfw event |
3230 event - mfw event | 3195 parameter - optional data. |
3231 parameter - optional data. | |
3232 | 3196 |
3233 *******************************************************************************/ | 3197 *******************************************************************************/ |
3234 void info_num_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter) | 3198 void info_num_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter) |
3235 { | 3199 { |
3236 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; | 3200 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; |
3237 T_INFO_NUM_INFO * data = (T_INFO_NUM_INFO *)win_data->user; | 3201 T_INFO_NUM_INFO * data = (T_INFO_NUM_INFO *)win_data->user; |
3238 UBYTE i; | 3202 UBYTE i; |
3239 UBYTE numberOfEntries; | 3203 UBYTE numberOfEntries; |
3240 // ListWinInfo * mnu_data = (ListWinInfo *)parameter; // RAVI | 3204 // ListWinInfo * mnu_data = (ListWinInfo *)parameter; // RAVI |
3241 | 3205 |
3242 | 3206 |
3243 MmiRsrcGetText(TxtLine1); | 3207 MmiRsrcGetText(TxtLine1); |
3244 MmiRsrcGetText(TxtLine2); | 3208 MmiRsrcGetText(TxtLine2); |
3245 MmiRsrcGetText(TxtFax); | 3209 MmiRsrcGetText(TxtFax); |
3246 MmiRsrcGetText(TxtData); | 3210 MmiRsrcGetText(TxtData); |
3247 TRACE_FUNCTION (">>>>> info_num_exec_cb()"); | 3211 TRACE_FUNCTION (">>>>> info_num_exec_cb()"); |
3248 | 3212 |
3249 switch (event) | 3213 switch (event) |
3250 { | 3214 { |
3251 case E_INIT: | 3215 case E_INIT: |
3252 | 3216 |
3253 TRACE_EVENT(">>>> info_num_exec_cb() Event:E_INIT"); | 3217 TRACE_EVENT(">>>> info_num_exec_cb() Event:E_INIT"); |
3254 | 3218 |
3255 /* initialization of administrative data */ | 3219 /* initialization of administrative data */ |
3256 | 3220 |
3257 | 3221 |
3258 data->menu_list_data = (ListMenuData *)ALLOC_MEMORY(sizeof(ListMenuData)); | 3222 data->menu_list_data = (ListMenuData *)ALLOC_MEMORY(sizeof(ListMenuData)); |
3259 | 3223 |
3260 if(data->menu_list_data == 0) | 3224 if(data->menu_list_data == 0) |
3261 { | 3225 { |
3262 TRACE_EVENT("Failed memory alloc 1 "); | 3226 TRACE_EVENT("Failed memory alloc 1 "); |
3263 return; | 3227 return; |
3264 } | 3228 } |
3265 if (type_of_list == MAILBOX_LIST || type_of_list == MAILBOX_LIST_CALL) | 3229 if (type_of_list == MAILBOX_LIST || type_of_list == MAILBOX_LIST_CALL) |
3266 { numberOfEntries = cphs_voicemail_numbers.count; | 3230 { numberOfEntries = cphs_voicemail_numbers.count; |
3267 if (numberOfEntries > 4) | 3231 if (numberOfEntries > 4) |
3268 numberOfEntries = 4; | 3232 numberOfEntries = 4; |
3269 } | 3233 } |
3270 else | 3234 else |
3271 numberOfEntries = info_numbers[info_num_level-1]->count; | 3235 numberOfEntries = info_numbers[info_num_level-1]->count; |
3272 | 3236 |
3273 data->menu_list_data->List = (T_MFW_MNU_ITEM *)ALLOC_MEMORY( 4 * sizeof(T_MFW_MNU_ITEM) ); | 3237 data->menu_list_data->List = (T_MFW_MNU_ITEM *)ALLOC_MEMORY( 4 * sizeof(T_MFW_MNU_ITEM) ); |
3274 | 3238 |
3275 if(data->menu_list_data->List == 0) | 3239 if(data->menu_list_data->List == 0) |
3276 { | 3240 { |
3277 TRACE_EVENT("Failed memory alloc 2"); | 3241 TRACE_EVENT("Failed memory alloc 2"); |
3278 return; | 3242 return; |
3279 } | 3243 } |
3280 | 3244 |
3281 for (i = 0; i < numberOfEntries ; i++) | 3245 for (i = 0; i < numberOfEntries ; i++) |
3282 { | 3246 { |
3283 mnuInitDataItem(&data->menu_list_data->List[i]); | 3247 mnuInitDataItem(&data->menu_list_data->List[i]); |
3284 if (type_of_list == MAILBOX_LIST || type_of_list == MAILBOX_LIST_CALL) | 3248 if (type_of_list == MAILBOX_LIST || type_of_list == MAILBOX_LIST_CALL) |
3285 data->menu_list_data->List[i].str = (char *)cphs_voicemail_numbers.entries[i].alpha.data; | 3249 data->menu_list_data->List[i].str = (char *)cphs_voicemail_numbers.entries[i].alpha.data; |
3286 else | 3250 else |
3287 data->menu_list_data->List[i].str = (char *)info_numbers[info_num_level-1]->entry[i].alpha.data; | 3251 data->menu_list_data->List[i].str = (char *)info_numbers[info_num_level-1]->entry[i].alpha.data; |
3288 data->menu_list_data->List[i].flagFunc = item_flag_none; | 3252 data->menu_list_data->List[i].flagFunc = item_flag_none; |
3289 } | 3253 } |
3290 | 3254 |
3291 data->menu_list_data->ListLength =numberOfEntries; | 3255 data->menu_list_data->ListLength =numberOfEntries; |
3292 data->menu_list_data->ListPosition = 1; | 3256 data->menu_list_data->ListPosition = 1; |
3293 data->menu_list_data->CursorPosition = 1; | 3257 data->menu_list_data->CursorPosition = 1; |
3294 data->menu_list_data->SnapshotSize = numberOfEntries; | 3258 data->menu_list_data->SnapshotSize = numberOfEntries; |
3295 data->menu_list_data->Font = 0; | 3259 data->menu_list_data->Font = 0; |
3296 if (type_of_list == MAILBOX_LIST_CALL) | 3260 if (type_of_list == MAILBOX_LIST_CALL) |
3297 data->menu_list_data->LeftSoftKey = TxtSoftCall; | 3261 data->menu_list_data->LeftSoftKey = TxtSoftCall; |
3298 else | 3262 else |
3299 data->menu_list_data->LeftSoftKey = TxtSoftSelect; | 3263 data->menu_list_data->LeftSoftKey = TxtSoftSelect; |
3300 data->menu_list_data->RightSoftKey = TxtSoftBack; | 3264 data->menu_list_data->RightSoftKey = TxtSoftBack; |
3301 data->menu_list_data->KeyEvents = KEY_ALL; | 3265 data->menu_list_data->KeyEvents = KEY_ALL; |
3302 data->menu_list_data->Reason = 0; | 3266 data->menu_list_data->Reason = 0; |
3303 data->menu_list_data->Strings = TRUE; | 3267 data->menu_list_data->Strings = TRUE; |
3304 data->menu_list_data->Attr = &InfoNum_menuAttrib; | 3268 data->menu_list_data->Attr = &InfoNum_menuAttrib; |
3305 data->menu_list_data->autoDestroy = FALSE; | 3269 data->menu_list_data->autoDestroy = FALSE; |
3306 | 3270 |
3307 | 3271 |
3308 /* Create the dynamic menu window */ | 3272 /* Create the dynamic menu window */ |
3309 listDisplayListMenu(win, data->menu_list_data,(ListCbFunc)InfonumList_cb,0); | 3273 listDisplayListMenu(win, data->menu_list_data,(ListCbFunc)InfonumList_cb,0); |
3310 | 3274 |
3311 break; | 3275 break; |
3312 | 3276 |
3313 case LISTS_REASON_VISIBLE: | 3277 case LISTS_REASON_VISIBLE: |
3314 case LISTS_REASON_RESUME: | 3278 case LISTS_REASON_RESUME: |
3315 { | 3279 { |
3316 dspl_ClearAll(); // sbh - clear screen before update | 3280 dspl_ClearAll(); // sbh - clear screen before update |
3317 | 3281 |
3318 if (type_of_list == MAILBOX_LIST) | 3282 if (type_of_list == MAILBOX_LIST) |
3319 { | 3283 { |
3320 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, COLOUR_LIST_SUBMENU); | 3284 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, COLOUR_LIST_SUBMENU); |
3321 } | 3285 } |
3322 else if (type_of_list == MAILBOX_LIST_CALL) | 3286 else if (type_of_list == MAILBOX_LIST_CALL) |
3323 { | 3287 { |
3324 softKeys_displayId( TxtSoftCall, TxtSoftBack, 0, COLOUR_LIST_SUBMENU); | 3288 softKeys_displayId( TxtSoftCall, TxtSoftBack, 0, COLOUR_LIST_SUBMENU); |
3325 } | 3289 } |
3326 | 3290 |
3327 break; | 3291 break; |
3328 } | 3292 } |
3329 | 3293 |
3330 default: | 3294 default: |
3331 break; | 3295 break; |
3332 } | 3296 } |
3333 } | 3297 } |
3334 /******************************************************************************* | 3298 /******************************************************************************* |
3335 | 3299 |
3336 $Function: InfonumList_cb | 3300 $Function: InfonumList_cb |
3337 | 3301 |
3338 $Description: Callback function for the info num list. | 3302 $Description: Callback function for the info num list. |
3339 | 3303 |
3340 $Returns: none | 3304 $Returns: none |
3341 | 3305 |
3342 $Arguments: Parent - parent window. | 3306 $Arguments: Parent - parent window. |
3343 ListData - Menu item list | 3307 ListData - Menu item list |
3344 *******************************************************************************/ | 3308 *******************************************************************************/ |
3345 | 3309 |
3346 void InfonumList_cb(T_MFW_HND * Parent, ListMenuData * ListData) | 3310 void InfonumList_cb(T_MFW_HND * Parent, ListMenuData * ListData) |
3347 { | 3311 { |
3348 T_MFW_WIN * win_data = ((T_MFW_HDR *)Parent)->data; | 3312 T_MFW_WIN * win_data = ((T_MFW_HDR *)Parent)->data; |
3349 T_INFO_NUM_INFO * data = (T_INFO_NUM_INFO *)win_data->user; | 3313 T_INFO_NUM_INFO * data = (T_INFO_NUM_INFO *)win_data->user; |
3350 | 3314 |
3351 // char debug[40]; // RAVI | 3315 // char debug[40]; // RAVI |
3352 | 3316 |
3353 TRACE_FUNCTION("InfonumList_cb"); | 3317 TRACE_FUNCTION("InfonumList_cb"); |
3354 if ((ListData->Reason EQ LISTS_REASON_BACK) || (ListData->Reason EQ LISTS_REASON_CLEAR)) | 3318 if ((ListData->Reason EQ LISTS_REASON_BACK) || (ListData->Reason EQ LISTS_REASON_CLEAR)) |
3355 { | 3319 { |
3356 listsDestroy(ListData->win); | 3320 listsDestroy(ListData->win); |
3357 InfoNum_destroy(data->numbers_win); | 3321 InfoNum_destroy(data->numbers_win); |
3358 info_num_level--; | 3322 info_num_level--; |
3359 } | 3323 } |
3360 else if(ListData->Reason EQ LISTS_REASON_SELECT) | 3324 else if(ListData->Reason EQ LISTS_REASON_SELECT) |
3361 { | 3325 { |
3362 if (type_of_list == MAILBOX_LIST || type_of_list == MAILBOX_LIST_CALL) //get the correct voicemail num | 3326 if (type_of_list == MAILBOX_LIST || type_of_list == MAILBOX_LIST_CALL) //get the correct voicemail num |
3363 { | 3327 { |
3364 cphs_voicemail_numbers.entries[ListData->ListPosition].list_index = ListData->ListPosition; | 3328 cphs_voicemail_numbers.entries[ListData->ListPosition].list_index = ListData->ListPosition; |
3365 | 3329 |
3366 if (type_of_list == MAILBOX_LIST) | 3330 if (type_of_list == MAILBOX_LIST) |
3367 { /*If we're editing*/ | 3331 { /*If we're editing*/ |
3368 TRACE_FUNCTION_P2("List Posn2: %d, MBN: %s", ListData->ListPosition, cphs_voicemail_numbers.entries[ListData->ListPosition].number ); | 3332 TRACE_FUNCTION_P2("List Posn2: %d, MBN: %s", ListData->ListPosition, cphs_voicemail_numbers.entries[ListData->ListPosition].number ); |
3369 show_cphs_mb_number(&cphs_voicemail_numbers.entries[ListData->ListPosition]); | 3333 show_cphs_mb_number(&cphs_voicemail_numbers.entries[ListData->ListPosition]); |
3370 memcpy(&cphs_voicemail_num, &cphs_voicemail_numbers.entries[ListData->ListPosition], sizeof(T_MFW_CPHS_ENTRY)); | 3334 memcpy(&cphs_voicemail_num, &cphs_voicemail_numbers.entries[ListData->ListPosition], sizeof(T_MFW_CPHS_ENTRY)); |
3371 } | 3335 } |
3372 else | 3336 else |
3373 { | 3337 { |
3374 char temp_number[MFW_CPHS_VM_NUMBER_MAXLEN]; | 3338 char temp_number[MFW_CPHS_VM_NUMBER_MAXLEN]; |
3375 | 3339 |
3376 memcpy(&cphs_voicemail_num, &cphs_voicemail_numbers.entries[ListData->ListPosition], sizeof(T_MFW_CPHS_ENTRY)); | 3340 memcpy(&cphs_voicemail_num, &cphs_voicemail_numbers.entries[ListData->ListPosition], sizeof(T_MFW_CPHS_ENTRY)); |
3377 memset(temp_number, 0, MFW_CPHS_VM_NUMBER_MAXLEN); | 3341 memset(temp_number, 0, MFW_CPHS_VM_NUMBER_MAXLEN); |
3378 | 3342 |
3379 /*If we're calling the number*/ | 3343 /*If we're calling the number*/ |
3380 //if it's an international number without a '+' | 3344 //if it's an international number without a '+' |
3381 if (cphs_voicemail_num.ton == MFW_TON_INTERNATIONAL && cphs_voicemail_num.number[0] != '+') | 3345 if (cphs_voicemail_num.ton == MFW_TON_INTERNATIONAL && cphs_voicemail_num.number[0] != '+') |
3382 { | 3346 { |
3383 strcat(temp_number, "+"); //put a + in front of number | 3347 strcat(temp_number, "+"); //put a + in front of number |
3384 strncat(temp_number, (char*)cphs_voicemail_num.number, strlen((char*)cphs_voicemail_num.number)); | 3348 strncat(temp_number, (char*)cphs_voicemail_num.number, strlen((char*)cphs_voicemail_num.number)); |
3385 memset((void*)cphs_voicemail_num.number, 0, MFW_CPHS_VM_NUMBER_MAXLEN); | 3349 memset((void*)cphs_voicemail_num.number, 0, MFW_CPHS_VM_NUMBER_MAXLEN); |
3386 strncpy((char*)cphs_voicemail_num.number, temp_number, strlen((char *)temp_number)); | 3350 strncpy((char*)cphs_voicemail_num.number, temp_number, strlen((char *)temp_number)); |
3387 } | 3351 } |
3388 | 3352 |
3389 callNumber(cphs_voicemail_num.number); | 3353 callNumber(cphs_voicemail_num.number); |
3390 | 3354 |
3391 } | 3355 } |
3392 | 3356 |
3393 | 3357 } |
3394 } | 3358 else |
3395 else | 3359 { |
3396 { | |
3397 #ifdef FF_CPHS | 3360 #ifdef FF_CPHS |
3398 T_DISPLAY_DATA Dialog; | 3361 T_DISPLAY_DATA Dialog; |
3399 //x0012849: Jagannatha 01 June, 2006 ER: OMAPS00079607 -To Support AcC and Info numbers | 3362 //x0012849: Jagannatha 01 June, 2006 ER: OMAPS00079607 -To Support AcC and Info numbers |
3400 UBYTE inRoaming; | 3363 UBYTE inRoaming; |
3401 inRoaming = getRoamingStatus(); | 3364 inRoaming = getRoamingStatus(); |
3402 TRACE_EVENT_P1("Roaming status = %d", inRoaming); | 3365 TRACE_EVENT_P1("Roaming status = %d", inRoaming); |
3403 #endif | 3366 #endif |
3404 //get the number/directory | 3367 //get the number/directory |
3405 info_num_index = info_numbers[info_num_level-1]->entry[ListData->ListPosition].index; | 3368 info_num_index = info_numbers[info_num_level-1]->entry[ListData->ListPosition].index; |
3406 /***************************Go-lite Optimization changes Start***********************/ | 3369 /***************************Go-lite Optimization changes Start***********************/ |
3407 //Aug 16, 2004 REF: CRR 24323 Deepa M.D | 3370 //Aug 16, 2004 REF: CRR 24323 Deepa M.D |
3408 TRACE_EVENT_P3("Index selected: %d, Level, %d, entryStat:%d",info_num_index, info_num_level, | 3371 TRACE_EVENT_P3("Index selected: %d, Level, %d, entryStat:%d",info_num_index, info_num_level, |
3409 info_numbers[info_num_level-1]->entry[ListData->ListPosition].entryStat); | 3372 info_numbers[info_num_level-1]->entry[ListData->ListPosition].entryStat); |
3410 /***************************Go-lite Optimization changes end***********************/ | 3373 /***************************Go-lite Optimization changes end***********************/ |
3411 //x0012849: Jagannatha 01 June, 2006 ER: OMAPS00079607 -To Support AcC and Info numbers | 3374 //x0012849: Jagannatha 01 June, 2006 ER: OMAPS00079607 -To Support AcC and Info numbers |
3412 //0x20 in Binary 0010 0000 - If bit 6 is set to 1 that indicates that service is specific to network. | 3375 //0x20 in Binary 0010 0000 - If bit 6 is set to 1 that indicates that service is specific to network. |
3413 #ifdef FF_CPHS | 3376 #ifdef FF_CPHS |
3414 if( (current_info_num.entryStat & 0x20) && inRoaming ) | 3377 if( (current_info_num.entryStat & 0x20) && inRoaming ) |
3415 { | 3378 { |
3416 dlg_initDisplayData_TextStr( &Dialog, TxtSoftOK, TxtSoftBack, (char*)MmiRsrcGetText(TxtNotAvailable), NULL, COLOUR_STATUS); | 3379 dlg_initDisplayData_TextStr( &Dialog, TxtSoftOK, TxtSoftBack, (char*)MmiRsrcGetText(TxtNotAvailable), NULL, COLOUR_STATUS); |
3417 dlg_initDisplayData_events( &Dialog, (T_VOID_FUNC) info_num_msg_cb, THREE_SECS, KEY_RIGHT|KEY_CLEAR ); | 3380 dlg_initDisplayData_events( &Dialog, (T_VOID_FUNC) info_num_msg_cb, THREE_SECS, KEY_RIGHT|KEY_CLEAR ); |
3418 Dialog.Identifier = (USHORT)ListData->ListPosition; | 3381 Dialog.Identifier = (USHORT)ListData->ListPosition; |
3419 info_dialog( Parent, &Dialog ); | 3382 info_dialog( Parent, &Dialog ); |
3420 } | 3383 } |
3421 //x0012849: Jagannatha 01 June, 2006 ER: OMAPS00079607 -To Support AcC and Info numbers | 3384 //x0012849: Jagannatha 01 June, 2006 ER: OMAPS00079607 -To Support AcC and Info numbers |
3422 //0x10 in Binary 0001 0000 - If bit 5 is set to 1 that indicates that service is charged at premium rate. | 3385 //0x10 in Binary 0001 0000 - If bit 5 is set to 1 that indicates that service is charged at premium rate. |
3423 else if(current_info_num.entryStat & 0x10) | 3386 else if(current_info_num.entryStat & 0x10) |
3424 { | 3387 { |
3425 dlg_initDisplayData_TextStr( &Dialog, TxtSoftOK, TxtSoftBack, (char*)"Charging will be done at a", (char*)"Premium Rate", COLOUR_STATUS); | 3388 dlg_initDisplayData_TextStr( &Dialog, TxtSoftOK, TxtSoftBack, (char*)"Charging will be done at a", (char*)"Premium Rate", COLOUR_STATUS); |
3426 dlg_initDisplayData_events( &Dialog, (T_VOID_FUNC) info_num_msg_cb, FOREVER, KEY_LEFT|KEY_RIGHT|KEY_CLEAR ); | 3389 dlg_initDisplayData_events( &Dialog, (T_VOID_FUNC) info_num_msg_cb, FOREVER, KEY_LEFT|KEY_RIGHT|KEY_CLEAR ); |
3427 Dialog.Identifier = (USHORT)ListData->ListPosition; | 3390 Dialog.Identifier = (USHORT)ListData->ListPosition; |
3428 info_dialog( Parent, &Dialog ); | 3391 info_dialog( Parent, &Dialog ); |
3429 } | 3392 } |
3430 else | 3393 else |
3431 { | 3394 { |
3432 #endif | 3395 #endif |
3433 if (info_numbers[info_num_level-1]->entry[ListData->ListPosition].entryStat & 0x80) //if bit 8 set | 3396 if (info_numbers[info_num_level-1]->entry[ListData->ListPosition].entryStat & 0x80) //if bit 8 set |
3434 { | 3397 { |
3435 TRACE_EVENT("CPHS INFO:Should be number entry"); | 3398 TRACE_EVENT("CPHS INFO:Should be number entry"); |
3436 if (info_num_level < 4) | 3399 if (info_num_level < 4) |
3437 cphs_select_info_num(info_num_index); | 3400 cphs_select_info_num(info_num_index); |
3438 } | 3401 } |
3439 else | 3402 else |
3440 { | 3403 { |
3441 if (info_num_level < 4) | 3404 if (info_num_level < 4) |
3442 { | 3405 { |
3443 TRACE_EVENT("CPHS INFO:Should be dir entry"); | 3406 TRACE_EVENT("CPHS INFO:Should be dir entry"); |
3444 cphs_get_info_num(info_num_level+1, info_num_index+1); | 3407 cphs_get_info_num(info_num_level+1, info_num_index+1); |
3445 } | 3408 } |
3446 } | 3409 } |
3447 #ifdef FF_CPHS | 3410 #ifdef FF_CPHS |
3448 } | 3411 } |
3449 #endif | 3412 #endif |
3450 | 3413 |
3451 } | 3414 } |
3452 | 3415 |
3453 } | 3416 } |
3454 | 3417 |
3455 | 3418 } |
3456 } | 3419 |
3457 | 3420 /******************************************************************************* |
3458 /******************************************************************************* | 3421 |
3459 | 3422 $Function: InfoNum_destroy |
3460 $Function: InfoNum_destroy | 3423 |
3461 | 3424 $Description: Destroy the info num window. |
3462 $Description: Destroy the info num window. | 3425 |
3463 | 3426 $Returns: none |
3464 $Returns: none | 3427 |
3465 | 3428 $Arguments: own_window- current window |
3466 $Arguments: own_window- current window | |
3467 *******************************************************************************/ | 3429 *******************************************************************************/ |
3468 | 3430 |
3469 static void InfoNum_destroy(MfwHnd own_window) | 3431 static void InfoNum_destroy(MfwHnd own_window) |
3470 { | 3432 { |
3471 T_MFW_WIN * win_data; | 3433 T_MFW_WIN * win_data; |
3472 T_INFO_NUM_INFO * data; | 3434 T_INFO_NUM_INFO * data; |
3473 UBYTE numberOfEntries; | 3435 UBYTE numberOfEntries; |
3474 | 3436 |
3475 TRACE_FUNCTION ("InfoNum_destroy()"); | 3437 TRACE_FUNCTION ("InfoNum_destroy()"); |
3476 | 3438 |
3477 if (own_window) | 3439 if (own_window) |
3478 { | 3440 { |
3479 win_data = ((T_MFW_HDR *)own_window)->data; | 3441 win_data = ((T_MFW_HDR *)own_window)->data; |
3480 data = (T_INFO_NUM_INFO *)win_data->user; | 3442 data = (T_INFO_NUM_INFO *)win_data->user; |
3481 | 3443 |
3482 if (data) | 3444 if (data) |
3483 { | 3445 { |
3484 /* | 3446 /* |
3485 * Delete WIN handler | 3447 * Delete WIN handler |
3486 */ | 3448 */ |
3487 win_delete (data->numbers_win); | 3449 win_delete (data->numbers_win); |
3488 | 3450 |
3489 /* | 3451 /* |
3490 * Free Memory | 3452 * Free Memory |
3491 */ | 3453 */ |
3492 if ( ( type_of_list == MAILBOX_LIST ) || ( type_of_list == MAILBOX_LIST_CALL ) ) | 3454 if ( ( type_of_list == MAILBOX_LIST ) || ( type_of_list == MAILBOX_LIST_CALL ) ) |
3493 { numberOfEntries = cphs_voicemail_numbers.count; | 3455 { numberOfEntries = cphs_voicemail_numbers.count; |
3494 if (numberOfEntries > 4) | 3456 if (numberOfEntries > 4) |
3495 numberOfEntries = 4; | 3457 numberOfEntries = 4; |
3496 } | 3458 } |
3497 else | 3459 else |
3498 numberOfEntries =info_numbers[info_num_level-1]->count; | 3460 numberOfEntries =info_numbers[info_num_level-1]->count; |
3499 if (data->menu_list_data != NULL) | 3461 if (data->menu_list_data != NULL) |
3500 { //int i; // RAVI | 3462 { //int i; // RAVI |
3501 FREE_MEMORY ((void *)data->menu_list_data->List, numberOfEntries * sizeof (T_MFW_MNU_ITEM)); | 3463 FREE_MEMORY ((void *)data->menu_list_data->List, numberOfEntries * sizeof (T_MFW_MNU_ITEM)); |
3502 FREE_MEMORY ((void *)data->menu_list_data, sizeof (ListMenuData)); | 3464 FREE_MEMORY ((void *)data->menu_list_data, sizeof (ListMenuData)); |
3503 if (type_of_list == INFO_NUM_LIST && info_num_level > 1)//if info numbers, | 3465 if (type_of_list == INFO_NUM_LIST && info_num_level > 1)//if info numbers, |
3504 { FREE_MEMORY((void*)info_numbers[info_num_level-1], sizeof(T_MFW_CPHS_INFONUM_LIST)); | 3466 { FREE_MEMORY((void*)info_numbers[info_num_level-1], sizeof(T_MFW_CPHS_INFONUM_LIST)); |
3505 info_numbers[info_num_level-1] = NULL; | 3467 info_numbers[info_num_level-1] = NULL; |
3506 } | 3468 } |
3507 } | 3469 } |
3508 FREE_MEMORY ((void *)data, sizeof (T_INFO_NUM_INFO)); | 3470 FREE_MEMORY ((void *)data, sizeof (T_INFO_NUM_INFO)); |
3509 | 3471 |
3510 } | 3472 } |
3511 else | 3473 else |
3512 { | 3474 { |
3513 TRACE_EVENT ("InfoNum_destroy() called twice"); | 3475 TRACE_EVENT ("InfoNum_destroy() called twice"); |
3514 } | 3476 } |
3515 } | 3477 } |
3516 } | 3478 } |
3517 | 3479 |
3518 /******************************************************************************* | 3480 /******************************************************************************* |
3519 | 3481 |
3520 $Function: info_num_win_cb | 3482 $Function: info_num_win_cb |
3521 | 3483 |
3522 $Description: Window callback function for the info numbers window. | 3484 $Description: Window callback function for the info numbers window. |
3523 | 3485 |
3524 $Returns: none | 3486 $Returns: none |
3525 | 3487 |
3526 $Arguments: w - mfw window handler | 3488 $Arguments: w - mfw window handler |
3527 e - mfw event | 3489 e - mfw event |
3528 | 3490 |
3529 *******************************************************************************/ | 3491 *******************************************************************************/ |
3530 | 3492 |
3531 static int info_num_win_cb (MfwEvt e, MfwWin *w) /* yyy window event handler */ | 3493 static int info_num_win_cb (MfwEvt e, MfwWin *w) /* yyy window event handler */ |
3532 { | 3494 { |
3533 TRACE_EVENT ("info_num_win_cb()"); | 3495 TRACE_EVENT ("info_num_win_cb()"); |
3534 | 3496 |
3535 switch (e) | 3497 switch (e) |
3536 { | 3498 { |
3537 case MfwWinVisible: /* window is visible */ | 3499 case MfwWinVisible: /* window is visible */ |
3538 break; | 3500 break; |
3539 | 3501 |
3540 case MfwWinFocussed: /* input focus / selected */ | 3502 case MfwWinFocussed: /* input focus / selected */ |
3541 case MfwWinDelete: /* window will be deleted */ | 3503 case MfwWinDelete: /* window will be deleted */ |
3542 | 3504 |
3543 default: | 3505 default: |
3544 return MFW_EVENT_REJECTED; | 3506 return MFW_EVENT_REJECTED; |
3545 } | 3507 } |
3546 return MFW_EVENT_CONSUMED; | 3508 return MFW_EVENT_CONSUMED; |
3547 } | 3509 } |
3548 | 3510 |
3549 | 3511 |
3550 | 3512 /******************************************************************************* |
3551 /******************************************************************************* | 3513 |
3552 | 3514 $Function: mmi_cphs_get_als_info |
3553 $Function: mmi_cphs_get_als_info | 3515 |
3554 | 3516 $Description: Returns the current Line enabled |
3555 $Description: Returns the current Line enabled | 3517 |
3556 | 3518 $Returns: none |
3557 $Returns: none | |
3558 | 3519 |
3559 $Arguments: | 3520 $Arguments: |
3560 | 3521 |
3561 *******************************************************************************/ | 3522 *******************************************************************************/ |
3562 //x0pleela 23 May, 2006 DR: OMAPS00070657 | 3523 //x0pleela 23 May, 2006 DR: OMAPS00070657 |
3563 #ifdef FF_CPHS | 3524 #ifdef FF_CPHS |
3564 void mmi_cphs_get_als_info() | 3525 void mmi_cphs_get_als_info() |
3565 { | 3526 { |
3566 int nALS_line_data; | 3527 int nALS_line_data; |
3567 | 3528 |
3568 nALS_line_data= mfw_cphs_get_als_info(); | 3529 nALS_line_data= mfw_cphs_get_als_info(); |
3569 TRACE_EVENT_P1("mmi_cphs_get_als_info() : %d",nALS_line_data); | 3530 TRACE_EVENT_P1("mmi_cphs_get_als_info() : %d",nALS_line_data); |
3570 switch (nALS_line_data) | 3531 switch (nALS_line_data) |
3571 { | 3532 { |
3572 case ALS_MOD_SPEECH: | 3533 case ALS_MOD_SPEECH: |
3573 als_status.selectedLine = MFW_SERV_LINE1; | 3534 als_status.selectedLine = MFW_SERV_LINE1; |
3574 break; | 3535 break; |
3575 | 3536 |
3576 case ALS_MOD_AUX_SPEECH: | 3537 case ALS_MOD_AUX_SPEECH: |
3577 als_status.selectedLine = MFW_SERV_LINE2; | 3538 als_status.selectedLine = MFW_SERV_LINE2; |
3578 break; | 3539 break; |
3579 default: | 3540 |
3580 als_status.selectedLine = MFW_SERV_NotPresent; | 3541 default: |
3581 break; | 3542 als_status.selectedLine = MFW_SERV_NotPresent; |
3582 } | 3543 break; |
3583 } | 3544 } |
3584 | 3545 } |
3585 | 3546 |
3586 /******************************************************************************* | 3547 |
3587 | 3548 /******************************************************************************* |
3588 $Function: mmi_cphs_set_als_value | 3549 |
3589 | 3550 $Function: mmi_cphs_set_als_value |
3590 $Description: Set the Als flag based on the CSP data read from CPHS enabled SIM | 3551 |
3591 | 3552 $Description: Set the Als flag based on the CSP data read from CPHS enabled SIM |
3592 $Returns: none | 3553 |
3554 $Returns: none | |
3593 | 3555 |
3594 $Arguments: | 3556 $Arguments: |
3595 | 3557 |
3596 *******************************************************************************/ | 3558 *******************************************************************************/ |
3597 //x0pleela 29 May, 2006 DR: OMAPS00070657 | 3559 //x0pleela 29 May, 2006 DR: OMAPS00070657 |
3598 | 3560 |
3599 void mmi_cphs_set_als_value( UBYTE als_val) | 3561 void mmi_cphs_set_als_value( UBYTE als_val) |
3600 { | 3562 { |
3601 TRACE_FUNCTION("mmi_cphs_set_als_value()"); | 3563 TRACE_FUNCTION("mmi_cphs_set_als_value()"); |
3602 Als_flag = als_val; | 3564 Als_flag = als_val; |
3603 } | 3565 } |
3604 | 3566 |
3605 /******************************************************************************* | 3567 /******************************************************************************* |
3606 | 3568 |
3607 $Function: mmi_cphs_get_als_value | 3569 $Function: mmi_cphs_get_als_value |
3608 | 3570 |
3609 $Description: Returns the Als flag value | 3571 $Description: Returns the Als flag value |
3610 | 3572 |
3611 $Returns: none | 3573 $Returns: none |
3612 | 3574 |
3613 $Arguments: | 3575 $Arguments: |
3614 | 3576 |
3615 *******************************************************************************/ | 3577 *******************************************************************************/ |
3616 //x0pleela 29 May, 2006 DR: OMAPS00070657 | 3578 //x0pleela 29 May, 2006 DR: OMAPS00070657 |
3617 | 3579 |
3618 UBYTE mmi_cphs_get_als_value( void ) | 3580 UBYTE mmi_cphs_get_als_value( void ) |
3619 { | 3581 { |
3620 TRACE_EVENT_P1("mmi_cphs_get_als_value() %d",Als_flag); | 3582 TRACE_EVENT_P1("mmi_cphs_get_als_value() %d",Als_flag); |
3621 return Als_flag; | 3583 return Als_flag; |
3622 } | 3584 } |
3623 | 3585 |
3624 #ifdef FF_CPHS_REL4 | 3586 #ifdef FF_CPHS_REL4 |
3625 UBYTE mmi_cphs_get_msp_value( void ) | 3587 UBYTE mmi_cphs_get_msp_value( void ) |
3626 { | 3588 { |
3627 TRACE_EVENT_P1("mmi_cphs_get_msp_value - MSP_flag - %d", MSP_flag); | 3589 TRACE_EVENT_P1("mmi_cphs_get_msp_value - MSP_flag - %d", MSP_flag); |
3628 return MSP_flag; | 3590 return MSP_flag; |
3629 } | 3591 } |
3630 #endif | 3592 #endif |
3631 /******************************************************************************* | 3593 /******************************************************************************* |
3632 | 3594 |
3633 $Function: mmi_get_als_selectedLine | 3595 $Function: mmi_get_als_selectedLine |
3634 | 3596 |
3635 $Description: Returns the current Line enabled | 3597 $Description: Returns the current Line enabled |
3636 | 3598 |
3637 $Returns: none | 3599 $Returns: none |
3638 | 3600 |
3639 $Arguments: | 3601 $Arguments: |
3640 | 3602 |
3641 *******************************************************************************/ | 3603 *******************************************************************************/ |
3642 //x0pleela 30 May, 2006 DR: OMAPS00070657 | 3604 //x0pleela 30 May, 2006 DR: OMAPS00070657 |
3643 T_MFW_LINE_INDEX mmi_get_als_selectedLine( void) | 3605 T_MFW_LINE_INDEX mmi_get_als_selectedLine( void) |
3644 { | 3606 { |
3645 return als_status.selectedLine; | 3607 return als_status.selectedLine; |
3646 } | 3608 } |
3647 #endif /* FF_CPHS */ | 3609 #endif /* FF_CPHS */ |