FreeCalypso > hg > fc-tourmaline
comparison src/ui/bmi/mmiSmsSend.c @ 92:c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 08 Nov 2020 06:39:16 +0000 |
parents | 67bfe9f274f6 |
children | 6838be2e9067 |
comparison
equal
deleted
inserted
replaced
91:c3d28a37caad | 92:c0052fe355d3 |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 | 2 |
3 CONDAT (UK) | 3 CONDAT (UK) |
4 | 4 |
5 ******************************************************************************** | 5 ******************************************************************************** |
6 | 6 |
7 This software product is the property of Condat (UK) Ltd and may not be | 7 This software product is the property of Condat (UK) Ltd and may not be |
8 disclosed to any third party without the express permission of the owner. | 8 disclosed to any third party without the express permission of the owner. |
9 | 9 |
10 ******************************************************************************** | 10 ******************************************************************************** |
11 | 11 |
12 $Project name: Basic MMI | 12 $Project name: Basic MMI |
13 $Project code: BMI | 13 $Project code: BMI |
14 $Module: SMS | 14 $Module: SMS |
15 $File: MmiSmsSend.c | 15 $File: MmiSmsSend.c |
16 $Revision: 1.0 | 16 $Revision: 1.0 |
17 | 17 |
18 $Author: Condat(UK) | 18 $Author: Condat(UK) |
19 $Date: 25/10/00 | 19 $Date: 25/10/00 |
20 | 20 |
21 ******************************************************************************** | 21 ******************************************************************************** |
22 | 22 |
23 Description: | 23 Description: |
24 | 24 |
25 Implementation template for MMI yyy dynamic menu handling | 25 Implementation template for MMI yyy dynamic menu handling |
26 | 26 |
27 ******************************************************************************** | 27 ******************************************************************************** |
28 | 28 |
29 | 29 |
30 $History: MmiSmsSend.c | 30 $History: MmiSmsSend.c |
31 | 31 |
32 June 4 2007 REF: ACT_X0073106-BMI-5X-OMAPS00133906 | 32 June 4 2007 REF: ACT_X0073106-BMI-5X-OMAPS00133906 |
33 Description:Sending SMS fails when the sender's number contain '+' international symbol in it. | 33 Description:Sending SMS fails when the sender's number contain '+' international symbol in it. |
34 Solution:In file mmiSmsSend.c, In SmsSend_NBEDIT_edit_cb function, case INFO_KCD_LEFT i changed if condition. | 34 Solution:In file mmiSmsSend.c, In SmsSend_NBEDIT_edit_cb function, case INFO_KCD_LEFT i changed if condition. |
35 | 35 |
36 Mar 22 2007 ER:OMAPS00113882 x0061088 (Prachi) | 36 Mar 22 2007 ER:OMAPS00113882 x0061088 (Prachi) |
37 Description:SMS alphanumeric address | 37 Description:SMS alphanumeric address |
38 Solution:Inorder to support alphanumeric address,MMI is setting editor mode as | 38 Solution:Inorder to support alphanumeric address,MMI is setting editor mode as |
39 "ED_MODE_ALPHA" in the function SmsSend_R_OPTExeSend(). Also MMI is checking whether user | 39 "ED_MODE_ALPHA" in the function SmsSend_R_OPTExeSend(). Also MMI is checking whether user |
40 have entered Numeric oralphanumeric address in the function sms_submit() and | 40 have entered Numeric oralphanumeric address in the function sms_submit() and |
41 sms_submit before calling sAT_PlusCMGS() and sAT_PlusCMGW() respectively. | 41 sms_submit before calling sAT_PlusCMGS() and sAT_PlusCMGW() respectively. |
42 | 42 |
43 Jun 15, 2006 REF: OMAPS00067510 xreddymn | 43 Jun 15, 2006 REF: OMAPS00067510 xreddymn |
44 Description: MMI Hangs when SMS Memory is full and while reading a message | 44 Description: MMI Hangs when SMS Memory is full and while reading a message |
45 Solution: msgBuffer is now released after sending or saving a message, so that this heap | 45 Solution: msgBuffer is now released after sending or saving a message, so that this heap |
46 memory is now available for use by other applications. | 46 memory is now available for use by other applications. |
47 | 47 |
48 Jan 18, 2006 REF: OMAPS00049169 x0pleela | 48 Jan 18, 2006 REF: OMAPS00049169 x0pleela |
49 Description: MS sends SMS with RP wrong destination address. Anite TC 34.2.8 was failing. | 49 Description: MS sends SMS with RP wrong destination address. Anite TC 34.2.8 was failing. |
50 Solution: Removed the code where global variable reply_path_bit was reset to 0 in function | 50 Solution: Removed the code where global variable reply_path_bit was reset to 0 in function |
51 SmsSend_SEND_mfw_cb(), switch case E_SMS_MO_AVAIL | 51 SmsSend_SEND_mfw_cb(), switch case E_SMS_MO_AVAIL |
52 | 52 |
53 March 2, 2005 REF: CRR 11536 x0018858 | 53 March 2, 2005 REF: CRR 11536 x0018858 |
54 Description: Reply path not supported while sending a reply. | 54 Description: Reply path not supported while sending a reply. |
55 Solution: Added menu option for the reply path. | 55 Solution: Added menu option for the reply path. |
56 | 56 |
57 Feb 02, 2005 REF: CRR 28479 xnkulkar | 57 Feb 02, 2005 REF: CRR 28479 xnkulkar |
58 Bug: While saving a SMS, if the user presses LSK while the 'Saved' dialog is displayed, the 'Saved' | 58 Bug: While saving a SMS, if the user presses LSK while the 'Saved' dialog is displayed, the 'Saved' |
59 dialog doesn't get dismissed. | 59 dialog doesn't get dismissed. |
60 Solution: Only RSK and Hangup keys dismiss the 'Saved' info screen and all other key presses | 60 Solution: Only RSK and Hangup keys dismiss the 'Saved' info screen and all other key presses |
61 are ignored. | 61 are ignored. |
62 | 62 |
63 Aug 16, 2004 REF: CRR 24323 Deepa M.D | 63 Aug 16, 2004 REF: CRR 24323 Deepa M.D |
64 Bug:Clenup of sprintf used for tracing | 64 Bug:Clenup of sprintf used for tracing |
65 Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX | 65 Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX |
66 | 66 |
67 Aug 16, 2004 REF: CRR 24281 Deepa M.D | 67 Aug 16, 2004 REF: CRR 24281 Deepa M.D |
68 Bug:Go-lite Optimization Remove the unsed variable temp_conv_buffer | 68 Bug:Go-lite Optimization Remove the unsed variable temp_conv_buffer |
69 Fix:Removed the unused variable static UBYTE temp_conv_buffer[MAX_MSG_LEN_ARRAY]. | 69 Fix:Removed the unused variable static UBYTE temp_conv_buffer[MAX_MSG_LEN_ARRAY]. |
70 | 70 |
71 | 71 |
72 Sep 01, 2004 REF: CRR 21380 Deepa M.D | 72 Sep 01, 2004 REF: CRR 21380 Deepa M.D |
73 Bug:Not getting proper display, When Messages Memory is Full. | 73 Bug:Not getting proper display, When Messages Memory is Full. |
74 Fix:A new Dialog displaying "Full Not Saved" will be displayed, | 74 Fix:A new Dialog displaying "Full Not Saved" will be displayed, |
75 when memory is full and saving a message fails. | 75 when memory is full and saving a message fails. |
76 | 76 |
77 | 77 |
78 | 78 |
79 | 79 |
80 Jul 13, 2004 REF: CRR 21615 Deepa M.D | 80 Jul 13, 2004 REF: CRR 21615 Deepa M.D |
81 Bug:Message once entered into message editor not storing in memory. | 81 Bug:Message once entered into message editor not storing in memory. |
82 Fix:When a SMS is typed in the Editor, it is stored in a temporary buffer. | 82 Fix:When a SMS is typed in the Editor, it is stored in a temporary buffer. |
83 When the user accesses the editor,the temporary buffer is copied into the | 83 When the user accesses the editor,the temporary buffer is copied into the |
84 Editor back. | 84 Editor back. |
85 | 85 |
86 25/10/00 Original Condat(UK) BMI version. | 86 25/10/00 Original Condat(UK) BMI version. |
87 | 87 |
88 $End | 88 $End |
89 | 89 |
90 *******************************************************************************/ | 90 *******************************************************************************/ |
91 | 91 |
92 #define MMI_SMSSEND_C | 92 #define MMI_SMSSEND_C |
226 /* x0039928 - Lint warning fix | 226 /* x0039928 - Lint warning fix |
227 static T_MFW_HND parentWindow4SMS; */ | 227 static T_MFW_HND parentWindow4SMS; */ |
228 | 228 |
229 UBYTE SmsSend_set_SrvCntr_number (T_MFW_SMS_INFO *config_data); | 229 UBYTE SmsSend_set_SrvCntr_number (T_MFW_SMS_INFO *config_data); |
230 UBYTE SmsSend_set_dcs_number (T_MFW_SMS_INFO *config_data); | 230 UBYTE SmsSend_set_dcs_number (T_MFW_SMS_INFO *config_data); |
231 //Jul 13, 2004 REF: CRR 21615 Deepa M.D | 231 //Jul 13, 2004 REF: CRR 21615 Deepa M.D |
232 extern UBYTE TempTextBuffer[MAX_MSG_LEN_ARRAY]; | 232 extern UBYTE TempTextBuffer[MAX_MSG_LEN_ARRAY]; |
233 | 233 |
234 extern UBYTE reply_path_bit ; | 234 extern UBYTE reply_path_bit ; |
235 | 235 |
236 /*************************************************** | 236 /*************************************************** |
272 /* administrative data */ | 272 /* administrative data */ |
273 | 273 |
274 T_MMI_CONTROL mmi_control; | 274 T_MMI_CONTROL mmi_control; |
275 T_MFW_HND win; | 275 T_MFW_HND win; |
276 T_MFW_HND parent; | 276 T_MFW_HND parent; |
277 T_MFW_HND child_dialog;/* to keep the window of dialog */ | 277 T_MFW_HND child_dialog;/* to keep the window of dialog */ |
278 T_MFW_HND sms_handler; | 278 T_MFW_HND sms_handler; |
279 SHORT id; | 279 SHORT id; |
280 /*SPR1991, removed edt_data: not needed*/ | 280 /*SPR1991, removed edt_data: not needed*/ |
281 /* will call from idle or phonebook */ | 281 /* will call from idle or phonebook */ |
282 } T_SAVE; | 282 } T_SAVE; |
296 static int SmsSend_R_OPT_dialog_cb(T_MFW_HND win, USHORT Identifier, USHORT Reason); | 296 static int SmsSend_R_OPT_dialog_cb(T_MFW_HND win, USHORT Identifier, USHORT Reason); |
297 static void SmsSend_SCNBEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason); | 297 static void SmsSend_SCNBEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason); |
298 /* !!! **************************************** modify here **************************************** !!!*/ | 298 /* !!! **************************************** modify here **************************************** !!!*/ |
299 static int SmsSend_R_OPT_kbd_cb (MfwEvt e, MfwKbd *k); | 299 static int SmsSend_R_OPT_kbd_cb (MfwEvt e, MfwKbd *k); |
300 static int SmsSend_R_OPT_mnu_cb (MfwEvt e, MfwMnu *m); | 300 static int SmsSend_R_OPT_mnu_cb (MfwEvt e, MfwMnu *m); |
301 //Sep 01, 2004 REF: CRR 21380 Deepa M.D | 301 //Sep 01, 2004 REF: CRR 21380 Deepa M.D |
302 static UBYTE memfull=FALSE; //Variable used check whether E_SMS_MEM_FULL event has been received. | 302 static UBYTE memfull=FALSE; //Variable used check whether E_SMS_MEM_FULL event has been received. |
303 /* !!! **************************************** end modify here **************************************** !!! */ | 303 /* !!! **************************************** end modify here **************************************** !!! */ |
304 | 304 |
305 | 305 |
306 | 306 |
343 { | 343 { |
344 | 344 |
345 int i; | 345 int i; |
346 UBYTE* temp_conv_buffer = outText; | 346 UBYTE* temp_conv_buffer = outText; |
347 | 347 |
348 if (ipText[0] == 0x80) | 348 if (ipText[0] == 0x80) |
349 { //skip first 2 chars | 349 { //skip first 2 chars |
350 *outLen = 0; | 350 *outLen = 0; |
351 for (i=0;i<MAX_MSG_LEN/2;i++) | 351 for (i=0;i<MAX_MSG_LEN/2;i++) |
352 { /*SPR 2175, bytes should not be swapped*/ | 352 { /*SPR 2175, bytes should not be swapped*/ |
353 temp_conv_buffer[i*2+1] = ipText[i*2+2+1]; | 353 temp_conv_buffer[i*2+1] = ipText[i*2+2+1]; |
354 temp_conv_buffer[i*2] =ipText[i*2+2]; | 354 temp_conv_buffer[i*2] =ipText[i*2+2]; |
355 | 355 |
356 | 356 |
357 | 357 |
358 | 358 |
359 if ((*outLen ==0) && | 359 if ((*outLen ==0) && |
360 (temp_conv_buffer[i*2] == 0x00) && | 360 (temp_conv_buffer[i*2] == 0x00) && |
361 (temp_conv_buffer[i*2+1] == 0x00)) | 361 (temp_conv_buffer[i*2+1] == 0x00)) |
362 *outLen = i*2+2; | 362 *outLen = i*2+2; |
363 } | 363 } |
364 if (*outLen == 0) | 364 if (*outLen == 0) |
365 {//Reached end of message without finding 0x0000 - set last word to 0x0000 | 365 {//Reached end of message without finding 0x0000 - set last word to 0x0000 |
371 } | 371 } |
372 return; | 372 return; |
373 | 373 |
374 } | 374 } |
375 else | 375 else |
376 { | 376 { |
377 *outLen = strlen((char*)ipText); | 377 *outLen = strlen((char*)ipText); |
378 /*MC SPR1319, use string's actual length to convert to GSM alphabet*/ | 378 /*MC SPR1319, use string's actual length to convert to GSM alphabet*/ |
379 /*SPR2175, use new function for conversion*/ | 379 /*SPR2175, use new function for conversion*/ |
380 ATB_convert_String((char*)ipText, MFW_ASCII, *outLen, (char*)temp_conv_buffer, MFW_DCS_8bits,MAX_MSG_LEN , FALSE); | 380 ATB_convert_String((char*)ipText, MFW_ASCII, *outLen, (char*)temp_conv_buffer, MFW_DCS_8bits,MAX_MSG_LEN , FALSE); |
381 return; | 381 return; |
385 /******************************************************************************* | 385 /******************************************************************************* |
386 | 386 |
387 $Function: SmsSend_R_OPTExeSend | 387 $Function: SmsSend_R_OPTExeSend |
388 | 388 |
389 $Description: Start the creation of the main window for SMS Send. | 389 $Description: Start the creation of the main window for SMS Send. |
390 | 390 |
391 $Returns: none | 391 $Returns: none |
392 | 392 |
393 $Arguments: m - Menu handle | 393 $Arguments: m - Menu handle |
394 i - Menu item selected. | 394 i - Menu item selected. |
395 | 395 |
396 *******************************************************************************/ | 396 *******************************************************************************/ |
397 | 397 |
398 static int SmsSend_R_OPTExeSend(MfwMnu* m, MfwMnuItem* i) | 398 static int SmsSend_R_OPTExeSend(MfwMnu* m, MfwMnuItem* i) |
399 { | 399 { |
400 T_MFW_HND win = mfwParent(mfw_header()); | 400 T_MFW_HND win = mfwParent(mfw_header()); |
401 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; | 401 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; |
402 T_SMSSEND_R_OPT * data = (T_SMSSEND_R_OPT *)win_data->user; | 402 T_SMSSEND_R_OPT * data = (T_SMSSEND_R_OPT *)win_data->user; |
403 /* access to data from parent */ | 403 /* access to data from parent */ |
404 T_SEND * parent_data = (T_SEND *)data->parent_data; | 404 T_SEND * parent_data = (T_SEND *)data->parent_data; |
405 | 405 |
406 | 406 |
407 #ifdef NEW_EDITOR | 407 #ifdef NEW_EDITOR |
408 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ | 408 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ |
409 #else | 409 #else |
410 T_EDITOR_DATA editor_data; | 410 T_EDITOR_DATA editor_data; |
417 AUI_edit_SetEvents(&editor_data, SMSSEND_ID_NBEDIT, FALSE, FOREVER, (T_AUI_EDIT_CB)SmsSend_NBEDIT_edit_cb); | 417 AUI_edit_SetEvents(&editor_data, SMSSEND_ID_NBEDIT, FALSE, FOREVER, (T_AUI_EDIT_CB)SmsSend_NBEDIT_edit_cb); |
418 // Mar 22 2007 ER:OMAPS00113882 x0061088 (Prachi) | 418 // Mar 22 2007 ER:OMAPS00113882 x0061088 (Prachi) |
419 AUI_edit_SetTextStr(&editor_data, TxtSend, TxtDelete, TxtTo, NULL); | 419 AUI_edit_SetTextStr(&editor_data, TxtSend, TxtDelete, TxtTo, NULL); |
420 AUI_edit_SetAltTextStr(&editor_data, 1, TxtNames, TRUE, TxtSoftBack); | 420 AUI_edit_SetAltTextStr(&editor_data, 1, TxtNames, TRUE, TxtSoftBack); |
421 // Mar 22 2007 ER:OMAPS00113882 x0061088 (Prachi) | 421 // Mar 22 2007 ER:OMAPS00113882 x0061088 (Prachi) |
422 //Mode is changed to alphanumeric mode | 422 //Mode is changed to alphanumeric mode |
423 AUI_edit_SetMode(&editor_data, ED_MODE_ALPHA, ED_CURSOR_UNDERLINE); | 423 AUI_edit_SetMode(&editor_data, ED_MODE_ALPHA, ED_CURSOR_UNDERLINE); |
424 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, parent_data->edt_data.NumberBuffer, PHB_MAX_LEN); | 424 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, parent_data->edt_data.NumberBuffer, PHB_MAX_LEN); |
425 parent_data->number_editor = AUI_edit_Start(parent_data->win, &editor_data); | 425 parent_data->number_editor = AUI_edit_Start(parent_data->win, &editor_data); |
426 #else /* NEW_EDITOR */ | 426 #else /* NEW_EDITOR */ |
427 | 427 |
428 SmsSend_loadEditDefault(&editor_data); | 428 SmsSend_loadEditDefault(&editor_data); |
429 | 429 |
430 bookSetEditAttributes( PHNO_EDITOR, COLOUR_EDITOR_XX, 0, edtCurBar1, 0, | 430 bookSetEditAttributes( PHNO_EDITOR, COLOUR_EDITOR_XX, 0, edtCurBar1, 0, |
431 (char *) parent_data->edt_data.NumberBuffer, /*MAX_SEARCH_CHAR*/NUMBER_LENGTH, &editor_data.editor_attr); | 431 (char *) parent_data->edt_data.NumberBuffer, /*MAX_SEARCH_CHAR*/NUMBER_LENGTH, &editor_data.editor_attr); |
432 editor_data.editor_attr.text = (char *)parent_data->edt_data.NumberBuffer; | 432 editor_data.editor_attr.text = (char *)parent_data->edt_data.NumberBuffer; |
433 | 433 |
434 editor_data.editor_attr.size = PHB_MAX_LEN; | 434 editor_data.editor_attr.size = PHB_MAX_LEN; |
435 | 435 |
436 editor_data.TextId = TxtSmsEnterNumber; | 436 editor_data.TextId = TxtSmsEnterNumber; |
437 editor_data.LeftSoftKey = TxtSend; | 437 editor_data.LeftSoftKey = TxtSend; |
438 editor_data.AlternateLeftSoftKey = TxtNames; | 438 editor_data.AlternateLeftSoftKey = TxtNames; |
439 editor_data.RightSoftKey = TxtDelete; | 439 editor_data.RightSoftKey = TxtDelete; |
440 editor_data.Identifier = SMSSEND_ID_NBEDIT ; | 440 editor_data.Identifier = SMSSEND_ID_NBEDIT ; |
441 editor_data.mode = E_EDIT_DIGITS_MODE; | 441 editor_data.mode = E_EDIT_DIGITS_MODE; |
442 editor_data.Callback = (T_EDIT_CB)SmsSend_NBEDIT_edit_cb; | 442 editor_data.Callback = (T_EDIT_CB)SmsSend_NBEDIT_edit_cb; |
443 editor_data.destroyEditor = FALSE; | 443 editor_data.destroyEditor = FALSE; |
444 parent_data->number_editor = editor_start(parent_data->win, &editor_data); /* start the editor */ | 444 parent_data->number_editor = editor_start(parent_data->win, &editor_data); /* start the editor */ |
445 #endif /* NEW_EDITOR */ | 445 #endif /* NEW_EDITOR */ |
446 return 1; // ADDED BY RAVI - 28-11-2005 | 446 return 1; // ADDED BY RAVI - 28-11-2005 |
447 | 447 |
448 } | 448 } |
449 | 449 |
450 /******************************************************************************* | 450 /******************************************************************************* |
451 | 451 |
452 $Function: SmsSend_R_OPTExeDiscard | 452 $Function: SmsSend_R_OPTExeDiscard |
453 | 453 |
454 $Description: | 454 $Description: |
455 | 455 |
456 $Returns: execution status | 456 $Returns: execution status |
457 | 457 |
458 $Arguments: m - Menu handle | 458 $Arguments: m - Menu handle |
459 i - Menu item selected. | 459 i - Menu item selected. |
460 | 460 |
461 *******************************************************************************/ | 461 *******************************************************************************/ |
462 | 462 |
463 static int SmsSend_R_OPTExeDiscard(MfwMnu* m, MfwMnuItem* i) | 463 static int SmsSend_R_OPTExeDiscard(MfwMnu* m, MfwMnuItem* i) |
464 { | 464 { |
465 T_MFW_HND win = mfwParent(mfw_header()); | 465 T_MFW_HND win = mfwParent(mfw_header()); |
488 msgBuffer = NULL; | 488 msgBuffer = NULL; |
489 } | 489 } |
490 parent_data->text_editor = 0; | 490 parent_data->text_editor = 0; |
491 SmsSend_SEND_destroy(parent_data->win); | 491 SmsSend_SEND_destroy(parent_data->win); |
492 | 492 |
493 | 493 |
494 return 1; | 494 return 1; |
495 } | 495 } |
496 | 496 |
497 | 497 |
498 /******************************************************************************* | 498 /******************************************************************************* |
499 | 499 |
500 $Function: SmsSend_R_OPTExeSave | 500 $Function: SmsSend_R_OPTExeSave |
501 | 501 |
502 $Description: called when the user press Call sender in the Option menu | 502 $Description: called when the user press Call sender in the Option menu |
503 | 503 |
504 $Returns: execution status | 504 $Returns: execution status |
505 | 505 |
506 $Arguments: m - Menu handle | 506 $Arguments: m - Menu handle |
507 i - Menu item selected. | 507 i - Menu item selected. |
508 | 508 |
509 *******************************************************************************/ | 509 *******************************************************************************/ |
510 | 510 |
511 static int SmsSend_R_OPTExeSave(MfwMnu* m, MfwMnuItem* i) | 511 static int SmsSend_R_OPTExeSave(MfwMnu* m, MfwMnuItem* i) |
512 { | 512 { |
513 T_MFW_HND win = mfwParent(mfw_header()); | 513 T_MFW_HND win = mfwParent(mfw_header()); |
535 /******************************************************************************* | 535 /******************************************************************************* |
536 | 536 |
537 $Function: SmsSend_OPT_start | 537 $Function: SmsSend_OPT_start |
538 | 538 |
539 $Description: called when the user press Call sender in the Option menu | 539 $Description: called when the user press Call sender in the Option menu |
540 | 540 |
541 $Returns: execution status | 541 $Returns: execution status |
542 | 542 |
543 $Arguments: parent_window -parent window handle | 543 $Arguments: parent_window -parent window handle |
544 menuAttr - Menu attributes. | 544 menuAttr - Menu attributes. |
545 | 545 |
546 *******************************************************************************/ | 546 *******************************************************************************/ |
547 | 547 |
548 T_MFW_HND SmsSend_OPT_start(T_MFW_HND parent_window, MfwMnuAttr *menuAttr) | 548 T_MFW_HND SmsSend_OPT_start(T_MFW_HND parent_window, MfwMnuAttr *menuAttr) |
549 { | 549 { |
550 T_MFW_HND win; | 550 T_MFW_HND win; |
563 /******************************************************************************* | 563 /******************************************************************************* |
564 | 564 |
565 $Function: SmsSend_R_OPT_create | 565 $Function: SmsSend_R_OPT_create |
566 | 566 |
567 $Description: Create the Option window | 567 $Description: Create the Option window |
568 | 568 |
569 $Returns: mfw window handle | 569 $Returns: mfw window handle |
570 | 570 |
571 $Arguments: parent_window -parent window handle | 571 $Arguments: parent_window -parent window handle |
572 | 572 |
573 *******************************************************************************/ | 573 *******************************************************************************/ |
574 | 574 |
575 static T_MFW_HND SmsSend_R_OPT_create(MfwHnd parent_window) | 575 static T_MFW_HND SmsSend_R_OPT_create(MfwHnd parent_window) |
576 { | 576 { |
577 T_SMSSEND_R_OPT * data = (T_SMSSEND_R_OPT *)ALLOC_MEMORY (sizeof (T_SMSSEND_R_OPT)); | 577 T_SMSSEND_R_OPT * data = (T_SMSSEND_R_OPT *)ALLOC_MEMORY (sizeof (T_SMSSEND_R_OPT)); |
581 | 581 |
582 /* | 582 /* |
583 * Create window handler | 583 * Create window handler |
584 */ | 584 */ |
585 | 585 |
586 data->win = | 586 data->win = |
587 win_create (parent_window, 0, E_WIN_VISIBLE, (T_MFW_CB)SmsSend_R_OPT_win_cb); | 587 win_create (parent_window, 0, E_WIN_VISIBLE, (T_MFW_CB)SmsSend_R_OPT_win_cb); |
588 if (data->win EQ NULL) | 588 if (data->win EQ NULL) |
589 { | 589 { |
590 return NULL; | 590 return NULL; |
591 } | 591 } |
592 /* | 592 /* |
593 * connect the dialog data to the MFW-window | 593 * connect the dialog data to the MFW-window |
594 */ | 594 */ |
595 | 595 |
596 data->mmi_control.dialog = (T_DIALOG_FUNC)SmsSend_R_OPT_exec_cb; | 596 data->mmi_control.dialog = (T_DIALOG_FUNC)SmsSend_R_OPT_exec_cb; |
597 data->mmi_control.data = data; | 597 data->mmi_control.data = data; |
609 /******************************************************************************* | 609 /******************************************************************************* |
610 | 610 |
611 $Function: SmsSend_R_OPT_destroy | 611 $Function: SmsSend_R_OPT_destroy |
612 | 612 |
613 $Description: Destroy the Option window | 613 $Description: Destroy the Option window |
614 | 614 |
615 $Returns: mfw window handle | 615 $Returns: mfw window handle |
616 | 616 |
617 $Arguments: own_window - current window | 617 $Arguments: own_window - current window |
618 | 618 |
619 *******************************************************************************/ | 619 *******************************************************************************/ |
620 | 620 |
621 static void SmsSend_R_OPT_destroy(MfwHnd own_window) | 621 static void SmsSend_R_OPT_destroy(MfwHnd own_window) |
622 { | 622 { |
623 T_MFW_WIN * win_data; | 623 T_MFW_WIN * win_data; |
632 | 632 |
633 if (data) | 633 if (data) |
634 { | 634 { |
635 /* | 635 /* |
636 * Delete WIN handler | 636 * Delete WIN handler |
637 */ | 637 */ |
638 data->parent_data->options_win = 0; | 638 data->parent_data->options_win = 0; |
639 win_delete (data->win); | 639 win_delete (data->win); |
640 | 640 |
641 /* | 641 /* |
642 * Free Memory | 642 * Free Memory |
643 */ | 643 */ |
644 FREE_MEMORY ((void *)data, sizeof (T_SMSSEND_R_OPT)); | 644 FREE_MEMORY ((void *)data, sizeof (T_SMSSEND_R_OPT)); |
645 } | 645 } |
646 else | 646 else |
653 /******************************************************************************* | 653 /******************************************************************************* |
654 | 654 |
655 $Function: SmsSend_R_OPT_exec_cb | 655 $Function: SmsSend_R_OPT_exec_cb |
656 | 656 |
657 $Description: Exec callback function for the Option window | 657 $Description: Exec callback function for the Option window |
658 | 658 |
659 $Returns: none | 659 $Returns: none |
660 | 660 |
661 $Arguments: win - current window | 661 $Arguments: win - current window |
662 event - event id | 662 event - event id |
663 value - unique id | 663 value - unique id |
664 parameter - optional data. | 664 parameter - optional data. |
665 | 665 |
666 *******************************************************************************/ | 666 *******************************************************************************/ |
667 | 667 |
668 void SmsSend_R_OPT_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter) | 668 void SmsSend_R_OPT_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter) |
669 /* callback handler for events sent to to trigger execution */ | 669 /* callback handler for events sent to to trigger execution */ |
670 { | 670 { |
675 T_MFW_HDR * parent = data->parent; | 675 T_MFW_HDR * parent = data->parent; |
676 T_MFW_WIN * win_data2 = ((T_MFW_HDR *)parent)->data; | 676 T_MFW_WIN * win_data2 = ((T_MFW_HDR *)parent)->data; |
677 T_SEND * parent_data = (T_SEND *)win_data2->user; | 677 T_SEND * parent_data = (T_SEND *)win_data2->user; |
678 | 678 |
679 // T_MFW_EVENT MfwEvents; // RAVI | 679 // T_MFW_EVENT MfwEvents; // RAVI |
680 | 680 |
681 TRACE_FUNCTION ("SmsSend_R_OPT_exec_cb()"); | 681 TRACE_FUNCTION ("SmsSend_R_OPT_exec_cb()"); |
682 | 682 |
683 | 683 |
684 switch (event) | 684 switch (event) |
685 { | 685 { |
686 case E_INIT: | 686 case E_INIT: |
687 | 687 |
688 TRACE_EVENT("SmsSend_R_OPT_exec_cb() Event:5.E_INIT"); | 688 TRACE_EVENT("SmsSend_R_OPT_exec_cb() Event:5.E_INIT"); |
689 /* initialization of administrative data */ | 689 /* initialization of administrative data */ |
690 data->parent_data = parent_data; | 690 data->parent_data = parent_data; |
691 data->id = value; | 691 data->id = value; |
692 data->kbd = kbdCreate(data->win,KEY_ALL, (MfwCb)SmsSend_R_OPT_kbd_cb); | 692 data->kbd = kbdCreate(data->win,KEY_ALL, (MfwCb)SmsSend_R_OPT_kbd_cb); |
693 data->kbd_long = kbdCreate(data->win,KEY_ALL|KEY_LONG,(MfwCb)SmsSend_R_OPT_kbd_cb); | 693 data->kbd_long = kbdCreate(data->win,KEY_ALL|KEY_LONG,(MfwCb)SmsSend_R_OPT_kbd_cb); |
694 data->menu = mnuCreate(data->win,(MfwMnuAttr*)&SmsSend_R_OPTAttrib, E_MNU_ESCAPE, (MfwCb)SmsSend_R_OPT_mnu_cb); | 694 data->menu = mnuCreate(data->win,(MfwMnuAttr*)&SmsSend_R_OPTAttrib, E_MNU_ESCAPE, (MfwCb)SmsSend_R_OPT_mnu_cb); |
695 mnuLang(data->menu,mainMmiLng); | 695 mnuLang(data->menu,mainMmiLng); |
705 /******************************************************************************* | 705 /******************************************************************************* |
706 | 706 |
707 $Function: SmsSend_R_OPT_mnu_cb | 707 $Function: SmsSend_R_OPT_mnu_cb |
708 | 708 |
709 $Description: Menu callback function for the Option window | 709 $Description: Menu callback function for the Option window |
710 | 710 |
711 $Returns: none | 711 $Returns: none |
712 | 712 |
713 $Arguments: e - event id | 713 $Arguments: e - event id |
714 m - menu handle | 714 m - menu handle |
715 *******************************************************************************/ | 715 *******************************************************************************/ |
716 | 716 |
717 static int SmsSend_R_OPT_mnu_cb (MfwEvt e, MfwMnu *m) | 717 static int SmsSend_R_OPT_mnu_cb (MfwEvt e, MfwMnu *m) |
718 | 718 |
719 { | 719 { |
720 T_MFW_HND win = mfwParent(mfw_header()); | 720 T_MFW_HND win = mfwParent(mfw_header()); |
721 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; | 721 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; |
722 T_SMSSEND_R_OPT * data = (T_SMSSEND_R_OPT *)win_data->user; | 722 T_SMSSEND_R_OPT * data = (T_SMSSEND_R_OPT *)win_data->user; |
723 // T_MFW_HND * l_parent; // RAVI | 723 // T_MFW_HND * l_parent; // RAVI |
724 // SHORT l_id; // RAVI | 724 // SHORT l_id; // RAVI |
725 | 725 |
726 TRACE_FUNCTION ("SmsRead_R_OPT_mnu_cb()"); | 726 TRACE_FUNCTION ("SmsRead_R_OPT_mnu_cb()"); |
727 | 727 |
728 switch (e) | 728 switch (e) |
729 { | 729 { |
739 /******************************************************************************* | 739 /******************************************************************************* |
740 | 740 |
741 $Function: SmsSend_R_OPT_win_cb | 741 $Function: SmsSend_R_OPT_win_cb |
742 | 742 |
743 $Description: Window callback function for the Option window | 743 $Description: Window callback function for the Option window |
744 | 744 |
745 $Returns: execution status | 745 $Returns: execution status |
746 | 746 |
747 $Arguments: e - event id | 747 $Arguments: e - event id |
748 w - window handle | 748 w - window handle |
749 *******************************************************************************/ | 749 *******************************************************************************/ |
750 | 750 |
751 static int SmsSend_R_OPT_win_cb (MfwEvt e, MfwWin *w) | 751 static int SmsSend_R_OPT_win_cb (MfwEvt e, MfwWin *w) |
752 { | 752 { |
753 TRACE_FUNCTION ("SmsSend_R_OPT_win_cb()"); | 753 TRACE_FUNCTION ("SmsSend_R_OPT_win_cb()"); |
769 /******************************************************************************* | 769 /******************************************************************************* |
770 | 770 |
771 $Function: SmsSend_R_OPT_kbd_cb | 771 $Function: SmsSend_R_OPT_kbd_cb |
772 | 772 |
773 $Description: Exec callback function for the Option window | 773 $Description: Exec callback function for the Option window |
774 | 774 |
775 $Returns: execution status | 775 $Returns: execution status |
776 | 776 |
777 $Arguments: e - event id | 777 $Arguments: e - event id |
778 k - keyboard info | 778 k - keyboard info |
779 *******************************************************************************/ | 779 *******************************************************************************/ |
828 /******************************************************************************* | 828 /******************************************************************************* |
829 | 829 |
830 $Function: SmsSend_SEND_start | 830 $Function: SmsSend_SEND_start |
831 | 831 |
832 $Description: Create SMS send window | 832 $Description: Create SMS send window |
833 | 833 |
834 $Returns: execution status | 834 $Returns: execution status |
835 | 835 |
836 $Arguments: parent_window - parent window. | 836 $Arguments: parent_window - parent window. |
837 UserData - SMS data | 837 UserData - SMS data |
838 *******************************************************************************/ | 838 *******************************************************************************/ |
856 /******************************************************************************* | 856 /******************************************************************************* |
857 | 857 |
858 $Function: SmsSend_SEND_create | 858 $Function: SmsSend_SEND_create |
859 | 859 |
860 $Description: Create a window for entering the text | 860 $Description: Create a window for entering the text |
861 | 861 |
862 $Returns: window handle | 862 $Returns: window handle |
863 | 863 |
864 $Arguments: parent_window - parent window. | 864 $Arguments: parent_window - parent window. |
865 | 865 |
866 *******************************************************************************/ | 866 *******************************************************************************/ |
867 | 867 |
868 static T_MFW_HND SmsSend_SEND_create(MfwHnd parent_window) | 868 static T_MFW_HND SmsSend_SEND_create(MfwHnd parent_window) |
869 { | 869 { |
870 T_SEND * data = (T_SEND *)ALLOC_MEMORY (sizeof (T_SEND)); | 870 T_SEND * data = (T_SEND *)ALLOC_MEMORY (sizeof (T_SEND)); |
894 /******************************************************************************* | 894 /******************************************************************************* |
895 | 895 |
896 $Function: SmsSend_SEND_destroy | 896 $Function: SmsSend_SEND_destroy |
897 | 897 |
898 $Description: Destroy the windows for entering the text | 898 $Description: Destroy the windows for entering the text |
899 | 899 |
900 $Returns: none | 900 $Returns: none |
901 | 901 |
902 $Arguments: own_window - window. | 902 $Arguments: own_window - window. |
903 | 903 |
904 *******************************************************************************/ | 904 *******************************************************************************/ |
905 | 905 |
906 static void SmsSend_SEND_destroy(MfwHnd own_window) | 906 static void SmsSend_SEND_destroy(MfwHnd own_window) |
907 { | 907 { |
908 T_MFW_WIN * win_data; | 908 T_MFW_WIN * win_data; |
909 T_SEND * data = NULL; | 909 T_SEND * data = NULL; |
910 | 910 |
911 TRACE_FUNCTION ("SmsSend_SEND_destroy()"); | 911 TRACE_FUNCTION ("SmsSend_SEND_destroy()"); |
912 | 912 |
913 if (own_window) | 913 if (own_window) |
914 { | 914 { |
915 win_data = ((T_MFW_HDR *)own_window)->data; | 915 win_data = ((T_MFW_HDR *)own_window)->data; |
916 if (win_data != NULL) | 916 if (win_data != NULL) |
917 data = (T_SEND *)win_data->user; | 917 data = (T_SEND *)win_data->user; |
918 | 918 |
919 if (data) | 919 if (data) |
920 { | 920 { |
921 | 921 |
922 // Delete sms handle | 922 // Delete sms handle |
923 if (data->sms_handler != NULL) | 923 if (data->sms_handler != NULL) |
924 sms_delete(data->sms_handler); | 924 sms_delete(data->sms_handler); |
925 | 925 |
926 if (data->child_dialog != NULL) | 926 if (data->child_dialog != NULL) |
929 } | 929 } |
930 | 930 |
931 if (data->text_editor != NULL) | 931 if (data->text_editor != NULL) |
932 { | 932 { |
933 TRACE_EVENT("current_editor not deleted?"); | 933 TRACE_EVENT("current_editor not deleted?"); |
934 | 934 |
935 | 935 |
936 } | 936 } |
937 | 937 |
938 | 938 |
939 // Delete WIN handler | 939 // Delete WIN handler |
940 win_delete (data->win); | 940 win_delete (data->win); |
941 | 941 |
942 // Free Memory | 942 // Free Memory |
943 FREE_MEMORY ((void *)data, sizeof (T_SEND)); | 943 FREE_MEMORY ((void *)data, sizeof (T_SEND)); |
944 //win_data->user = NULL; | 944 //win_data->user = NULL; |
945 } | 945 } |
946 else | 946 else |
947 { | 947 { |
948 TRACE_EVENT ("SmsSend_SEND_destroy() called twice"); | 948 TRACE_EVENT ("SmsSend_SEND_destroy() called twice"); |
949 } | 949 } |
953 /******************************************************************************* | 953 /******************************************************************************* |
954 | 954 |
955 $Function: SmsSend_main_exec_cb | 955 $Function: SmsSend_main_exec_cb |
956 | 956 |
957 $Description: Main callback handler for events sent to to trigger execution | 957 $Description: Main callback handler for events sent to to trigger execution |
958 | 958 |
959 $Returns: none | 959 $Returns: none |
960 | 960 |
961 $Arguments: win - current window | 961 $Arguments: win - current window |
962 event - event id | 962 event - event id |
963 identifier - unique id | 963 identifier - unique id |
964 parameter - optional data. | 964 parameter - optional data. |
965 *******************************************************************************/ | 965 *******************************************************************************/ |
966 | 966 |
967 static void SmsSend_main_exec_cb (T_MFW_HND win, USHORT event, SHORT identifier, void * parameter) | 967 static void SmsSend_main_exec_cb (T_MFW_HND win, USHORT event, SHORT identifier, void * parameter) |
968 { | 968 { |
969 TRACE_FUNCTION ("SmsSend_main_exec_cb()"); | 969 TRACE_FUNCTION ("SmsSend_main_exec_cb()"); |
970 | 970 |
971 /* In this field we get the identifier of the window sending the event */ | 971 /* In this field we get the identifier of the window sending the event */ |
972 switch (identifier) | 972 switch (identifier) |
973 { | 973 { |
976 case SMSSEND_ID_SAVE_NOT_READY: | 976 case SMSSEND_ID_SAVE_NOT_READY: |
977 SmsSend_SEND_exec_cb(win, event, parameter); | 977 SmsSend_SEND_exec_cb(win, event, parameter); |
978 break; | 978 break; |
979 case PHBK_ID: | 979 case PHBK_ID: |
980 SmsSend_PHBK_exec_cb(win, event, parameter); | 980 SmsSend_PHBK_exec_cb(win, event, parameter); |
981 break; | 981 break; |
982 case SMSSEND_ID_TEXTEDIT: | 982 case SMSSEND_ID_TEXTEDIT: |
983 SmsSend_TEXTEDIT_exec_cb(win, event, parameter); | 983 SmsSend_TEXTEDIT_exec_cb(win, event, parameter); |
984 break; | 984 break; |
985 case SMSSEND_ID_SC_NOT_READY: | 985 case SMSSEND_ID_SC_NOT_READY: |
986 /* MZ cq11074 delete the info dialog window. */ | 986 /* MZ cq11074 delete the info dialog window. */ |
987 SmsSend_SEND_destroy(win); | 987 SmsSend_SEND_destroy(win); |
988 break; | 988 break; |
989 case SMSSEND_ID_NBEDIT: | 989 case SMSSEND_ID_NBEDIT: |
990 SmsSend_NBEDIT_exec_cb(win, event, parameter); | 990 SmsSend_NBEDIT_exec_cb(win, event, parameter); |
1001 /******************************************************************************* | 1001 /******************************************************************************* |
1002 | 1002 |
1003 $Function: SmsSend_SEND_exec_cb | 1003 $Function: SmsSend_SEND_exec_cb |
1004 | 1004 |
1005 $Description: Callback handler for events sent by the window itself | 1005 $Description: Callback handler for events sent by the window itself |
1006 | 1006 |
1007 $Returns: none | 1007 $Returns: none |
1008 | 1008 |
1009 $Arguments: win - current window | 1009 $Arguments: win - current window |
1010 event - event id | 1010 event - event id |
1011 parameter - optional data. | 1011 parameter - optional data. |
1034 case E_INIT: | 1034 case E_INIT: |
1035 /* Create a sms handler to receive events */ | 1035 /* Create a sms handler to receive events */ |
1036 MfwEvents = E_SMS_ERR | E_SMS_MO_AVAIL; | 1036 MfwEvents = E_SMS_ERR | E_SMS_MO_AVAIL; |
1037 data->sms_handler = sms_create(data->win,MfwEvents,(MfwCb)SmsSend_SEND_mfw_cb); | 1037 data->sms_handler = sms_create(data->win,MfwEvents,(MfwCb)SmsSend_SEND_mfw_cb); |
1038 data->child_dialog = NULL; | 1038 data->child_dialog = NULL; |
1039 | 1039 |
1040 /* store NUMBER and TEXT */ | 1040 /* store NUMBER and TEXT */ |
1041 memcpy(&(data->edt_data), (T_SmsUserData *)parameter, sizeof(T_SmsUserData)); | 1041 memcpy(&(data->edt_data), (T_SmsUserData *)parameter, sizeof(T_SmsUserData)); |
1042 /* in case of reply the sms we have to | 1042 /* in case of reply the sms we have to |
1043 use the service center number from the | 1043 use the service center number from the |
1044 caller | 1044 caller |
1045 */ | 1045 */ |
1046 TRACE_EVENT_P1("data->edt_data.called_from_reply_item is %d",data->edt_data.called_from_reply_item); | 1046 TRACE_EVENT_P1("data->edt_data.called_from_reply_item is %d",data->edt_data.called_from_reply_item); |
1047 if (data->edt_data.called_from_reply_item EQ FALSE) | 1047 if (data->edt_data.called_from_reply_item EQ FALSE) |
1048 { | 1048 { |
1049 TRACE_EVENT("RP false"); | 1049 TRACE_EVENT("RP false"); |
1062 * or a unicode message, use the chinese editor */ | 1062 * or a unicode message, use the chinese editor */ |
1063 if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE | 1063 if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE |
1064 && (data->edt_data.TextBuffer[0]==0x00 || data->edt_data.TextBuffer[0] ==0x80)) | 1064 && (data->edt_data.TextBuffer[0]==0x00 || data->edt_data.TextBuffer[0] ==0x80)) |
1065 { | 1065 { |
1066 T_CHINESE_DATA chinese_data; | 1066 T_CHINESE_DATA chinese_data; |
1067 | 1067 |
1068 chinese_data.TextString = (char*) data->edt_data.TextBuffer; | 1068 chinese_data.TextString = (char*) data->edt_data.TextBuffer; |
1069 | 1069 |
1070 chinese_data.TextString[0] = (char)0x80; | 1070 chinese_data.TextString[0] = (char)0x80; |
1071 chinese_data.TextString[1] = 0x00;/*a0393213 warnings removal-MAX_MSG_LEN changed to 0x00*/ | 1071 chinese_data.TextString[1] = 0x00;/*a0393213 warnings removal-MAX_MSG_LEN changed to 0x00*/ |
1072 chinese_data.Callback = (T_AUI_EDIT_CB)SmsSend_TEXTEDIT_edit_cb; | 1072 chinese_data.Callback = (T_AUI_EDIT_CB)SmsSend_TEXTEDIT_edit_cb; |
1073 chinese_data.Identifier = SMSSEND_ID_TEXTEDIT ; | 1073 chinese_data.Identifier = SMSSEND_ID_TEXTEDIT ; |
1074 chinese_data.LeftSoftKey = TxtSoftOptions; | 1074 chinese_data.LeftSoftKey = TxtSoftOptions; |
1075 chinese_data.DestroyEditor = FALSE; | 1075 chinese_data.DestroyEditor = FALSE; |
1076 #ifdef TI_PS_FF_CONC_SMS | 1076 #ifdef TI_PS_FF_CONC_SMS |
1077 if(FFS_flashData.ConcatenateStatus == TRUE) | 1077 if(FFS_flashData.ConcatenateStatus == TRUE) |
1078 chinese_data.EditorSize = (USHORT)((MAX_MSG_LEN_CHI)/2 - 1); | 1078 chinese_data.EditorSize = (USHORT)((MAX_MSG_LEN_CHI)/2 - 1); |
1079 else | 1079 else |
1080 #endif /*TI_PS_FF_CONC_SMS*/ | 1080 #endif /*TI_PS_FF_CONC_SMS*/ |
1081 chinese_data.EditorSize = (USHORT)((MAX_MSG_LEN_SGL_CHI)/2 - 1); | 1081 chinese_data.EditorSize = (USHORT)((MAX_MSG_LEN_SGL_CHI)/2 - 1); |
1082 data->text_editor = chinese_input(win, &chinese_data); | 1082 data->text_editor = chinese_input(win, &chinese_data); |
1083 } | 1083 } |
1084 else | 1084 else |
1085 #endif /* CHINESE_MMI && EASY_TEXT_ENABLED */ | 1085 #endif /* CHINESE_MMI && EASY_TEXT_ENABLED */ |
1086 /* We're opening up an ascii or unicode latin editor */ | 1086 /* We're opening up an ascii or unicode latin editor */ |
1087 { | 1087 { |
1088 | 1088 |
1089 AUI_edit_SetDefault(&editor_data); | 1089 AUI_edit_SetDefault(&editor_data); |
1090 | 1090 |
1091 /* Set the appropriate mode if easy text is enabled */ | 1091 /* Set the appropriate mode if easy text is enabled */ |
1092 #ifdef EASY_TEXT_ENABLED | 1092 #ifdef EASY_TEXT_ENABLED |
1093 AUI_edit_SetMode(&editor_data, ED_MODE_ALPHA | ED_MODE_PREDTEXT, ED_CURSOR_BAR); | 1093 AUI_edit_SetMode(&editor_data, ED_MODE_ALPHA | ED_MODE_PREDTEXT, ED_CURSOR_BAR); |
1094 #else /* EASY_TEXT_ENABLED */ | 1094 #else /* EASY_TEXT_ENABLED */ |
1095 AUI_edit_SetMode(&editor_data, ED_MODE_ALPHA, ED_CURSOR_BAR); | 1095 AUI_edit_SetMode(&editor_data, ED_MODE_ALPHA, ED_CURSOR_BAR); |
1096 #endif /* EASY_TEXT_ENABLED */ | 1096 #endif /* EASY_TEXT_ENABLED */ |
1097 | 1097 |
1098 /* Check if concatenated SMS is enabled */ | 1098 /* Check if concatenated SMS is enabled */ |
1099 #ifdef TI_PS_FF_CONC_SMS | 1099 #ifdef TI_PS_FF_CONC_SMS |
1100 if(FFS_flashData.ConcatenateStatus == TRUE) | 1100 if(FFS_flashData.ConcatenateStatus == TRUE) |
1101 size = MAX_MSG_LEN; | 1101 size = MAX_MSG_LEN; |
1102 else | 1102 else |
1103 #endif /*TI_PS_FF_CONC_SMS*/ | 1103 #endif /*TI_PS_FF_CONC_SMS*/ |
1104 size = MAX_MSG_LEN_SGL; | 1104 size = MAX_MSG_LEN_SGL; |
1105 | 1105 |
1106 /* Set the DCS type of the message */ | 1106 /* Set the DCS type of the message */ |
1107 | 1107 |
1108 if (data->edt_data.TextBuffer[0]==0x80) | 1108 if (data->edt_data.TextBuffer[0]==0x80) |
1109 { | 1109 { |
1110 TRACE_EVENT("Unicode SMS message starting 0x80"); | 1110 TRACE_EVENT("Unicode SMS message starting 0x80"); |
1111 AUI_edit_SetBuffer(&editor_data, ATB_DCS_UNICODE, &data->edt_data.TextBuffer[2], size/2); | 1111 AUI_edit_SetBuffer(&editor_data, ATB_DCS_UNICODE, &data->edt_data.TextBuffer[2], size/2); |
1112 } | 1112 } |
1124 data->text_editor = AUI_edit_Start(win,&editor_data); /* start the editor */ | 1124 data->text_editor = AUI_edit_Start(win,&editor_data); /* start the editor */ |
1125 } | 1125 } |
1126 #else /* NEW_EDITOR */ | 1126 #else /* NEW_EDITOR */ |
1127 | 1127 |
1128 /* END OF NEW EDITOR CODE */ | 1128 /* END OF NEW EDITOR CODE */ |
1129 | 1129 |
1130 /*SPR 1434*/ | 1130 /*SPR 1434*/ |
1131 #if defined(CHINESE_MMI) && defined(EASY_TEXT_ENABLED) | 1131 #if defined(CHINESE_MMI) && defined(EASY_TEXT_ENABLED) |
1132 /*MC SPR1242, merged section in from b-sample build*/ | 1132 /*MC SPR1242, merged section in from b-sample build*/ |
1133 if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) | 1133 if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) |
1134 { T_CHINESE_DATA chinese_data; | 1134 { T_CHINESE_DATA chinese_data; |
1135 | 1135 |
1136 chinese_data.TextString = (char*) data->edt_data.TextBuffer; | 1136 chinese_data.TextString = (char*) data->edt_data.TextBuffer; |
1137 /*if empty or unicode string, add unicode tag*/ | 1137 /*if empty or unicode string, add unicode tag*/ |
1138 if(chinese_data.TextString[0] ==0x00 || chinese_data.TextString[0] ==0x80) | 1138 if(chinese_data.TextString[0] ==0x00 || chinese_data.TextString[0] ==0x80) |
1139 { chinese_data.TextString[0] = 0x80; | 1139 { chinese_data.TextString[0] = 0x80; |
1140 chinese_data.TextString[1] = MAX_MSG_LEN; | 1140 chinese_data.TextString[1] = MAX_MSG_LEN; |
1141 | 1141 |
1142 chinese_data.Callback = (T_EDIT_CB)SmsSend_TEXTEDIT_edit_cb; | 1142 chinese_data.Callback = (T_EDIT_CB)SmsSend_TEXTEDIT_edit_cb; |
1143 chinese_data.Identifier = SMSSEND_ID_TEXTEDIT ; | 1143 chinese_data.Identifier = SMSSEND_ID_TEXTEDIT ; |
1144 chinese_data.LeftSoftKey = TxtSoftOptions; | 1144 chinese_data.LeftSoftKey = TxtSoftOptions; |
1145 chinese_data.DestroyEditor = FALSE; | 1145 chinese_data.DestroyEditor = FALSE; |
1146 #ifdef TI_PS_FF_CONC_SMS | 1146 #ifdef TI_PS_FF_CONC_SMS |
1147 if(FFS_flashData.ConcatenateStatus == TRUE) | 1147 if(FFS_flashData.ConcatenateStatus == TRUE) |
1148 chinese_data.EditorSize = (USHORT)((MAX_MSG_LEN_CHI)/2 - 1); | 1148 chinese_data.EditorSize = (USHORT)((MAX_MSG_LEN_CHI)/2 - 1); |
1149 else | 1149 else |
1150 #endif /*TI_PS_FF_CONC_SMS*/ | 1150 #endif /*TI_PS_FF_CONC_SMS*/ |
1151 chinese_data.EditorSize = (USHORT)((MAX_MSG_LEN_SGL_CHI)/2 - 1); | 1151 chinese_data.EditorSize = (USHORT)((MAX_MSG_LEN_SGL_CHI)/2 - 1); |
1152 data->text_editor = chinese_input(win, &chinese_data); | 1152 data->text_editor = chinese_input(win, &chinese_data); |
1153 | 1153 |
1154 } | 1154 } |
1155 else/*if ascii string use ASCII editor rather than converting to unicode, MC, SPR 1292*/ | 1155 else/*if ascii string use ASCII editor rather than converting to unicode, MC, SPR 1292*/ |
1156 { SmsSend_loadEditDefault(&editor_data); | 1156 { SmsSend_loadEditDefault(&editor_data); |
1157 editor_data.editor_attr.text = (char *)data->edt_data.TextBuffer; | 1157 editor_data.editor_attr.text = (char *)data->edt_data.TextBuffer; |
1158 //1227 - API - 05/10/02 - Size of Editor dependent on whether Conc_Switch is TRUE or FALSE | 1158 //1227 - API - 05/10/02 - Size of Editor dependent on whether Conc_Switch is TRUE or FALSE |
1159 #ifdef TI_PS_FF_CONC_SMS | 1159 #ifdef TI_PS_FF_CONC_SMS |
1160 if(FFS_flashData.ConcatenateStatus == TRUE) | 1160 if(FFS_flashData.ConcatenateStatus == TRUE) |
1161 editor_data.editor_attr.size = MAX_MSG_LEN; | 1161 editor_data.editor_attr.size = MAX_MSG_LEN; |
1162 else | 1162 else |
1163 #endif /*TI_PS_FF_CONC_SMS*/ | 1163 #endif /*TI_PS_FF_CONC_SMS*/ |
1164 editor_data.editor_attr.size = MAX_MSG_LEN_SGL; | 1164 editor_data.editor_attr.size = MAX_MSG_LEN_SGL; |
1165 editor_data.min_enter = 0; | 1165 editor_data.min_enter = 0; |
1166 editor_data.LeftSoftKey = TxtSoftOptions; | 1166 editor_data.LeftSoftKey = TxtSoftOptions; |
1167 editor_data.AlternateLeftSoftKey = TxtSoftOptions; | 1167 editor_data.AlternateLeftSoftKey = TxtSoftOptions; |
1168 editor_data.RightSoftKey = TxtDelete; | 1168 editor_data.RightSoftKey = TxtDelete; |
1169 editor_data.Identifier = SMSSEND_ID_TEXTEDIT ; | 1169 editor_data.Identifier = SMSSEND_ID_TEXTEDIT ; |
1170 editor_data.Callback = (T_EDIT_CB)SmsSend_TEXTEDIT_edit_cb; | 1170 editor_data.Callback = (T_EDIT_CB)SmsSend_TEXTEDIT_edit_cb; |
1171 editor_data.destroyEditor = FALSE; | 1171 editor_data.destroyEditor = FALSE; |
1172 data->text_editor = editor_start(win,&editor_data); /* start the editor */ | 1172 data->text_editor = editor_start(win,&editor_data); /* start the editor */ |
1173 } | 1173 } |
1174 } | 1174 } |
1176 #endif /* CHINESE_MMI && EASY_TEXT_ENABLED */ | 1176 #endif /* CHINESE_MMI && EASY_TEXT_ENABLED */ |
1177 | 1177 |
1178 { | 1178 { |
1179 #ifdef EASY_TEXT_ENABLED | 1179 #ifdef EASY_TEXT_ENABLED |
1180 editor_data.hide = FALSE; | 1180 editor_data.hide = FALSE; |
1181 editor_data.TextId = '\0'; | 1181 editor_data.TextId = '\0'; |
1182 editor_data.Identifier = 0; | 1182 editor_data.Identifier = 0; |
1183 editor_data.TextString = NULL; | 1183 editor_data.TextString = NULL; |
1184 editor_data.timeout = FOREVER; // Avoid to return empty strings | 1184 editor_data.timeout = FOREVER; // Avoid to return empty strings |
1185 editor_data.mode = ALPHA_MODE; | 1185 editor_data.mode = ALPHA_MODE; |
1186 editor_attr_init_pred(&editor_data.editor_attr, ZONE_FULL_SK_TITLE, edtCurBar1, NULL, (char *)data->edt_data.TextBuffer, MAX_MSG_LEN, COLOUR_EDITOR); | 1186 editor_attr_init_pred(&editor_data.editor_attr, ZONE_FULL_SK_TITLE, edtCurBar1, NULL, (char *)data->edt_data.TextBuffer, MAX_MSG_LEN, COLOUR_EDITOR); |
1187 #else /* EASY_TEXT_ENABLED */ | 1187 #else /* EASY_TEXT_ENABLED */ |
1188 SmsSend_loadEditDefault(&editor_data); | 1188 SmsSend_loadEditDefault(&editor_data); |
1189 editor_attr_init(&editor_data.editor_attr, ZONE_FULL_SK_TITLE, edtCurBar1, NULL, (char *)data->edt_data.TextBuffer, MAX_MSG_LEN, COLOUR_EDITOR); | 1189 editor_attr_init(&editor_data.editor_attr, ZONE_FULL_SK_TITLE, edtCurBar1, NULL, (char *)data->edt_data.TextBuffer, MAX_MSG_LEN, COLOUR_EDITOR); |
1190 #endif /* EASY_TEXT_ENABLED */ | 1190 #endif /* EASY_TEXT_ENABLED */ |
1191 | 1191 |
1192 editor_data.editor_attr.text = (char *)data->edt_data.TextBuffer; | 1192 editor_data.editor_attr.text = (char *)data->edt_data.TextBuffer; |
1193 //1227 - API - 05/10/02 - Size of Editor dependent on whether Conc_Switch is TRUE or FALSE | 1193 //1227 - API - 05/10/02 - Size of Editor dependent on whether Conc_Switch is TRUE or FALSE |
1194 #ifdef TI_PS_FF_CONC_SMS | 1194 #ifdef TI_PS_FF_CONC_SMS |
1195 if(FFS_flashData.ConcatenateStatus == TRUE) | 1195 if(FFS_flashData.ConcatenateStatus == TRUE) |
1196 editor_data.editor_attr.size = MAX_MSG_LEN; | 1196 editor_data.editor_attr.size = MAX_MSG_LEN; |
1197 else | 1197 else |
1198 #endif /*TI_PS_FF_CONC_SMS*/ | 1198 #endif /*TI_PS_FF_CONC_SMS*/ |
1199 editor_data.editor_attr.size = MAX_MSG_LEN_SGL; | 1199 editor_data.editor_attr.size = MAX_MSG_LEN_SGL; |
1200 editor_data.min_enter = 0; | 1200 editor_data.min_enter = 0; |
1201 editor_data.LeftSoftKey = TxtSoftOptions; | 1201 editor_data.LeftSoftKey = TxtSoftOptions; |
1202 editor_data.AlternateLeftSoftKey = TxtSoftOptions; | 1202 editor_data.AlternateLeftSoftKey = TxtSoftOptions; |
1203 editor_data.RightSoftKey = TxtDelete; | 1203 editor_data.RightSoftKey = TxtDelete; |
1204 | 1204 |
1205 editor_data.Identifier = SMSSEND_ID_TEXTEDIT ; | 1205 editor_data.Identifier = SMSSEND_ID_TEXTEDIT ; |
1206 editor_data.Callback = (T_EDIT_CB)SmsSend_TEXTEDIT_edit_cb; | 1206 editor_data.Callback = (T_EDIT_CB)SmsSend_TEXTEDIT_edit_cb; |
1207 editor_data.destroyEditor = FALSE; | 1207 editor_data.destroyEditor = FALSE; |
1208 data->text_editor = editor_start(win,&editor_data); /* start the editor */ | 1208 data->text_editor = editor_start(win,&editor_data); /* start the editor */ |
1209 } | 1209 } |
1210 #endif /* NEW_EDITOR */ | 1210 #endif /* NEW_EDITOR */ |
1231 break; | 1231 break; |
1232 } | 1232 } |
1233 /* Marcus: Issue 1170: 07/10/2002: Start */ | 1233 /* Marcus: Issue 1170: 07/10/2002: Start */ |
1234 | 1234 |
1235 break; | 1235 break; |
1236 case E_RETURN: | 1236 case E_RETURN: |
1237 break; | 1237 break; |
1238 case E_EXIT: | 1238 case E_EXIT: |
1239 if(data->sc_number_editor != NULL) | 1239 if(data->sc_number_editor != NULL) |
1240 { | 1240 { |
1241 | 1241 |
1242 //GW Read config data - then set dcs parameter | 1242 //GW Read config data - then set dcs parameter |
1243 SmsSend_get_config_data(&sms_parameter); | 1243 SmsSend_get_config_data(&sms_parameter); |
1244 | 1244 |
1245 if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) | 1245 if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) |
1246 { //We have a chinese text message - set dcs parameter to | 1246 { //We have a chinese text message - set dcs parameter to |
1247 sms_parameter.dcs = MFW_DCS_UCS2; | 1247 sms_parameter.dcs = MFW_DCS_UCS2; |
1248 } | 1248 } |
1249 else | 1249 else |
1250 { | 1250 { |
1251 sms_parameter.dcs = MFW_DCS_7bits; | 1251 sms_parameter.dcs = MFW_DCS_7bits; |
1264 #else /* NEW_EDITOR */ | 1264 #else /* NEW_EDITOR */ |
1265 editor_destroy(data->sc_number_editor); | 1265 editor_destroy(data->sc_number_editor); |
1266 #endif /* NEW_EDITOR */ | 1266 #endif /* NEW_EDITOR */ |
1267 data->sc_number_editor = NULL; | 1267 data->sc_number_editor = NULL; |
1268 } | 1268 } |
1269 | 1269 |
1270 break; | 1270 break; |
1271 default: | 1271 default: |
1272 TRACE_EVENT("Err: Default"); | 1272 TRACE_EVENT("Err: Default"); |
1273 break; | 1273 break; |
1274 } | 1274 } |
1277 /******************************************************************************* | 1277 /******************************************************************************* |
1278 | 1278 |
1279 $Function: SmsSend_PHBK_exec_cb | 1279 $Function: SmsSend_PHBK_exec_cb |
1280 | 1280 |
1281 $Description: Callback handler for events sent by the phonebook window | 1281 $Description: Callback handler for events sent by the phonebook window |
1282 | 1282 |
1283 $Returns: none | 1283 $Returns: none |
1284 | 1284 |
1285 $Arguments: win - current window | 1285 $Arguments: win - current window |
1286 event - event id | 1286 event - event id |
1287 parameter - optional data. | 1287 parameter - optional data. |
1314 memcpy(data->edt_data.NumberBuffer, (char *)parameter, MINIMUM(sizeof(data->edt_data.NumberBuffer) - 1, strlen((char *)parameter)+1)); | 1314 memcpy(data->edt_data.NumberBuffer, (char *)parameter, MINIMUM(sizeof(data->edt_data.NumberBuffer) - 1, strlen((char *)parameter)+1)); |
1315 break; | 1315 break; |
1316 /* SPR#1428 - SH - Insert service centre number into editor */ | 1316 /* SPR#1428 - SH - Insert service centre number into editor */ |
1317 case SMSSC_PHBK_NUMBER: | 1317 case SMSSC_PHBK_NUMBER: |
1318 memcpy(data->edt_data.CentreBuffer, (char *)parameter, MINIMUM(sizeof(data->edt_data.CentreBuffer) - 1, strlen((char *)parameter)+1)); | 1318 memcpy(data->edt_data.CentreBuffer, (char *)parameter, MINIMUM(sizeof(data->edt_data.CentreBuffer) - 1, strlen((char *)parameter)+1)); |
1319 break; | 1319 break; |
1320 #endif /* NEW_EDITOR */ | 1320 #endif /* NEW_EDITOR */ |
1321 default: | 1321 default: |
1322 TRACE_EVENT("Err: Default"); | 1322 TRACE_EVENT("Err: Default"); |
1323 break; | 1323 break; |
1324 } | 1324 } |
1328 /******************************************************************************* | 1328 /******************************************************************************* |
1329 | 1329 |
1330 $Function: SmsSend_TEXTEDIT_exec_cb | 1330 $Function: SmsSend_TEXTEDIT_exec_cb |
1331 | 1331 |
1332 $Description: Callback handler for events sent by the TEXTEDIT editor | 1332 $Description: Callback handler for events sent by the TEXTEDIT editor |
1333 | 1333 |
1334 $Returns: none | 1334 $Returns: none |
1335 | 1335 |
1336 $Arguments: win - current window | 1336 $Arguments: win - current window |
1337 event - event id | 1337 event - event id |
1338 parameter - optional data. | 1338 parameter - optional data. |
1366 event - event id | 1366 event - event id |
1367 parameter - optional data. | 1367 parameter - optional data. |
1368 *******************************************************************************/ | 1368 *******************************************************************************/ |
1369 | 1369 |
1370 static void SmsSend_NBEDIT_exec_cb(T_MFW_HND win, USHORT event, void *parameter) | 1370 static void SmsSend_NBEDIT_exec_cb(T_MFW_HND win, USHORT event, void *parameter) |
1371 { | 1371 { |
1372 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; | 1372 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; |
1373 T_SEND * data = (T_SEND *)win_data->user; | 1373 T_SEND * data = (T_SEND *)win_data->user; |
1374 T_MFW_SMS_INFO sms_parameter; | 1374 T_MFW_SMS_INFO sms_parameter; |
1375 #ifdef NEW_EDITOR | 1375 #ifdef NEW_EDITOR |
1376 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ | 1376 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ |
1388 { | 1388 { |
1389 mmi_dialog_information_screen(win,TxtNotImplemented, "NOT ALLOWED", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_NOT_ALLOWED); | 1389 mmi_dialog_information_screen(win,TxtNotImplemented, "NOT ALLOWED", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_NOT_ALLOWED); |
1390 } | 1390 } |
1391 else | 1391 else |
1392 { | 1392 { |
1393 | 1393 |
1394 if (!smsidle_get_ready_state()) | 1394 if (!smsidle_get_ready_state()) |
1395 { | 1395 { |
1396 // SMS init processing not ready to access SIM to store the SMS | 1396 // SMS init processing not ready to access SIM to store the SMS |
1397 /* MZ cq11074 do not invoke the editor until SMS Service Centre number has been read, | 1397 /* MZ cq11074 do not invoke the editor until SMS Service Centre number has been read, |
1398 display info dialog. */ | 1398 display info dialog. */ |
1399 mmi_dialog_information_screen(win,TxtPleaseWait, "NOT READY", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_SC_NOT_READY ); | 1399 mmi_dialog_information_screen(win,TxtPleaseWait, "NOT READY", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_SC_NOT_READY ); |
1400 return; | 1400 return; |
1401 // Recreate the editor on dialog callback | 1401 // Recreate the editor on dialog callback |
1402 } | 1402 } |
1416 } | 1416 } |
1417 } | 1417 } |
1418 } | 1418 } |
1419 | 1419 |
1420 /* SPR#1428 - SH - New Editor changes */ | 1420 /* SPR#1428 - SH - New Editor changes */ |
1421 | 1421 |
1422 #ifdef NEW_EDITOR | 1422 #ifdef NEW_EDITOR |
1423 AUI_edit_SetDefault(&editor_data); | 1423 AUI_edit_SetDefault(&editor_data); |
1424 AUI_edit_SetDisplay(&editor_data, CENTRE_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); | 1424 AUI_edit_SetDisplay(&editor_data, CENTRE_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); |
1425 AUI_edit_SetEvents(&editor_data, 0, FALSE, FOREVER, (T_AUI_EDIT_CB)SmsSend_SCNBEDIT_edit_cb); | 1425 AUI_edit_SetEvents(&editor_data, 0, FALSE, FOREVER, (T_AUI_EDIT_CB)SmsSend_SCNBEDIT_edit_cb); |
1426 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtDelete, TxtServiceCentre, NULL); | 1426 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtDelete, TxtServiceCentre, NULL); |
1430 data->number_editor = AUI_edit_Start(data->win, &editor_data); | 1430 data->number_editor = AUI_edit_Start(data->win, &editor_data); |
1431 #else /* NEW_EDITOR */ | 1431 #else /* NEW_EDITOR */ |
1432 | 1432 |
1433 SmsSend_loadEditDefault(&editor_data); | 1433 SmsSend_loadEditDefault(&editor_data); |
1434 | 1434 |
1435 bookSetEditAttributes( CENTRE_EDITOR, COLOUR_EDITOR_XX,0,edtCurBar1, 0, | 1435 bookSetEditAttributes( CENTRE_EDITOR, COLOUR_EDITOR_XX,0,edtCurBar1, 0, |
1436 (char *) data->edt_data.CentreBuffer, NUMBER_LENGTH, &editor_data.editor_attr); | 1436 (char *) data->edt_data.CentreBuffer, NUMBER_LENGTH, &editor_data.editor_attr); |
1437 | 1437 |
1438 editor_data.TextId = TxtServiceCentre; | 1438 editor_data.TextId = TxtServiceCentre; |
1439 editor_data.editor_attr.text = (char *)data->edt_data.CentreBuffer; | 1439 editor_data.editor_attr.text = (char *)data->edt_data.CentreBuffer; |
1440 editor_data.editor_attr.size = NUMBER_LENGTH; | 1440 editor_data.editor_attr.size = NUMBER_LENGTH; |
1441 editor_data.LeftSoftKey = TxtSoftOK; | 1441 editor_data.LeftSoftKey = TxtSoftOK; |
1442 editor_data.AlternateLeftSoftKey = TxtNames; | 1442 editor_data.AlternateLeftSoftKey = TxtNames; |
1443 editor_data.RightSoftKey = TxtDelete; | 1443 editor_data.RightSoftKey = TxtDelete; |
1444 editor_data.Identifier = NULL; | 1444 editor_data.Identifier = NULL; |
1445 editor_data.Callback = (T_EDIT_CB)SmsSend_SCNBEDIT_edit_cb; | 1445 editor_data.Callback = (T_EDIT_CB)SmsSend_SCNBEDIT_edit_cb; |
1446 editor_data.mode = E_EDIT_DIGITS_MODE; | 1446 editor_data.mode = E_EDIT_DIGITS_MODE; |
1447 editor_data.destroyEditor = FALSE; | 1447 editor_data.destroyEditor = FALSE; |
1448 data->number_editor = editor_start(data->win,&editor_data); | 1448 data->number_editor = editor_start(data->win,&editor_data); |
1449 #endif /* NEW_EDITOR */ | 1449 #endif /* NEW_EDITOR */ |
1450 | 1450 |
1451 /* start the editor */ | 1451 /* start the editor */ |
1452 | 1452 |
1453 break; | 1453 break; |
1454 default: | 1454 default: |
1455 TRACE_EVENT("Err: Default"); | 1455 TRACE_EVENT("Err: Default"); |
1456 break; | 1456 break; |
1457 } | 1457 } |
1469 event - event id | 1469 event - event id |
1470 parameter - optional data. | 1470 parameter - optional data. |
1471 *******************************************************************************/ | 1471 *******************************************************************************/ |
1472 | 1472 |
1473 static void SmsSend_CENTREEDIT_exec_cb(T_MFW_HND win, USHORT event, void *parameter) | 1473 static void SmsSend_CENTREEDIT_exec_cb(T_MFW_HND win, USHORT event, void *parameter) |
1474 { | 1474 { |
1475 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; | 1475 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; |
1476 T_SEND * data = (T_SEND *)win_data->user; | 1476 T_SEND * data = (T_SEND *)win_data->user; |
1477 | 1477 |
1478 #ifdef NEW_EDITOR | 1478 #ifdef NEW_EDITOR |
1479 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ | 1479 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ |
1497 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, data->edt_data.CentreBuffer, PHB_MAX_LEN); | 1497 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, data->edt_data.CentreBuffer, PHB_MAX_LEN); |
1498 data->sc_number_editor = AUI_edit_Start(data->win, &editor_data); | 1498 data->sc_number_editor = AUI_edit_Start(data->win, &editor_data); |
1499 #else /* NEW_EDITOR */ | 1499 #else /* NEW_EDITOR */ |
1500 | 1500 |
1501 SmsSend_loadEditDefault(&editor_data); | 1501 SmsSend_loadEditDefault(&editor_data); |
1502 bookSetEditAttributes( CENTRE_EDITOR, COLOUR_EDITOR_XX, 0, edtCurBar1, 0, | 1502 bookSetEditAttributes( CENTRE_EDITOR, COLOUR_EDITOR_XX, 0, edtCurBar1, 0, |
1503 (char *) data->edt_data.CentreBuffer, NUMBER_LENGTH, &editor_data.editor_attr); | 1503 (char *) data->edt_data.CentreBuffer, NUMBER_LENGTH, &editor_data.editor_attr); |
1504 | 1504 |
1505 editor_data.TextId = TxtServiceCentre; | 1505 editor_data.TextId = TxtServiceCentre; |
1506 editor_data.editor_attr.text = (char *)data->edt_data.CentreBuffer; | 1506 editor_data.editor_attr.text = (char *)data->edt_data.CentreBuffer; |
1507 editor_data.editor_attr.size = PHB_MAX_LEN; | 1507 editor_data.editor_attr.size = PHB_MAX_LEN; |
1508 editor_data.LeftSoftKey = TxtSoftOK; | 1508 editor_data.LeftSoftKey = TxtSoftOK; |
1509 editor_data.RightSoftKey = TxtDelete; | 1509 editor_data.RightSoftKey = TxtDelete; |
1510 editor_data.Identifier = *(USHORT*)parameter; | 1510 editor_data.Identifier = *(USHORT*)parameter; |
1511 editor_data.Callback = (T_EDIT_CB)SmsSend_CENTREEDIT_edit_cb; | 1511 editor_data.Callback = (T_EDIT_CB)SmsSend_CENTREEDIT_edit_cb; |
1512 editor_data.mode = E_EDIT_DIGITS_MODE; | 1512 editor_data.mode = E_EDIT_DIGITS_MODE; |
1513 editor_data.destroyEditor = TRUE ; | 1513 editor_data.destroyEditor = TRUE ; |
1514 data->sc_number_editor = editor_start(data->win,&editor_data); | 1514 data->sc_number_editor = editor_start(data->win,&editor_data); |
1515 /* start the Service Centre Number editor */ | 1515 /* start the Service Centre Number editor */ |
1516 #endif /* NEW_EDITOR */ | 1516 #endif /* NEW_EDITOR */ |
1517 break; | 1517 break; |
1518 | 1518 |
1519 case E_RETURN: | 1519 case E_RETURN: |
1520 | 1520 |
1521 break; | 1521 break; |
1522 default: | 1522 default: |
1523 TRACE_EVENT("Err: Default"); | 1523 TRACE_EVENT("Err: Default"); |
1524 return; | 1524 return; |
1525 } | 1525 } |
1540 | 1540 |
1541 static void SmsSend_TEXTEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason) | 1541 static void SmsSend_TEXTEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason) |
1542 { | 1542 { |
1543 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; | 1543 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; |
1544 T_SEND * data = (T_SEND *)win_data->user; | 1544 T_SEND * data = (T_SEND *)win_data->user; |
1545 | 1545 |
1546 TRACE_FUNCTION ("SmsSend_TEXTEDIT_edit_cb()"); | 1546 TRACE_FUNCTION ("SmsSend_TEXTEDIT_edit_cb()"); |
1547 | 1547 |
1548 // Jul 13, 2004 REF: CRR 21615 Deepa M.D | 1548 // Jul 13, 2004 REF: CRR 21615 Deepa M.D |
1549 //Copy the sms content from the editor buffer into the temporary buffer. | 1549 //Copy the sms content from the editor buffer into the temporary buffer. |
1550 memcpy(TempTextBuffer,data->edt_data.TextBuffer,MAX_MSG_LEN); | 1550 memcpy(TempTextBuffer,data->edt_data.TextBuffer,MAX_MSG_LEN); |
1551 | 1551 |
1552 switch (reason) | 1552 switch (reason) |
1553 { | 1553 { |
1554 case INFO_KCD_ALTERNATELEFT: | 1554 case INFO_KCD_ALTERNATELEFT: |
1555 case INFO_KCD_LEFT: | 1555 case INFO_KCD_LEFT: |
1556 data->options_win = SmsSend_OPT_start(win,(MfwMnuAttr*)&SmsSend_R_OPTAttrib); | 1556 data->options_win = SmsSend_OPT_start(win,(MfwMnuAttr*)&SmsSend_R_OPTAttrib); |
1557 | 1557 |
1558 /* Create number editor: | 1558 /* Create number editor: |
1559 -the editor min length is 1 | 1559 -the editor min length is 1 |
1560 */ | 1560 */ |
1561 break; | 1561 break; |
1562 | 1562 |
1563 case INFO_KCD_RIGHT: | 1563 case INFO_KCD_RIGHT: |
1564 case INFO_KCD_HUP: | 1564 case INFO_KCD_HUP: |
1565 // Commit suicide so come back to previous menu | 1565 // Commit suicide so come back to previous menu |
1566 #if defined(CHINESE_MMI) && defined(EASY_TEXT_ENABLED) | 1566 #if defined(CHINESE_MMI) && defined(EASY_TEXT_ENABLED) |
1567 if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) | 1567 if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) |
1568 chinese_input_destroy(data->text_editor); | 1568 chinese_input_destroy(data->text_editor); |
1569 else | 1569 else |
1570 #endif | 1570 #endif |
1571 | 1571 |
1572 /* SPR#1428 - SH - New Editor changes */ | 1572 /* SPR#1428 - SH - New Editor changes */ |
1573 #ifdef NEW_EDITOR | 1573 #ifdef NEW_EDITOR |
1574 AUI_edit_Destroy(data->text_editor); | 1574 AUI_edit_Destroy(data->text_editor); |
1575 #else /* NEW_EDITOR */ | 1575 #else /* NEW_EDITOR */ |
1576 editor_destroy(data->text_editor); | 1576 editor_destroy(data->text_editor); |
1577 #endif /* NEW_EDITOR */ | 1577 #endif /* NEW_EDITOR */ |
1578 | 1578 |
1579 data->text_editor = 0; | 1579 data->text_editor = 0; |
1580 SmsSend_SEND_destroy(data->win); | 1580 SmsSend_SEND_destroy(data->win); |
1581 break; | 1581 break; |
1582 | 1582 |
1583 default: | 1583 default: |
1584 TRACE_EVENT("Err: Default"); | 1584 TRACE_EVENT("Err: Default"); |
1585 break; | 1585 break; |
1586 } | 1586 } |
1587 } | 1587 } |
1599 Identifier - unique id | 1599 Identifier - unique id |
1600 reason - event cause | 1600 reason - event cause |
1601 *******************************************************************************/ | 1601 *******************************************************************************/ |
1602 | 1602 |
1603 static void SmsSend_NBEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason) | 1603 static void SmsSend_NBEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason) |
1604 { | 1604 { |
1605 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; | 1605 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; |
1606 T_SEND * data = (T_SEND *)win_data->user; | 1606 T_SEND * data = (T_SEND *)win_data->user; |
1607 | 1607 |
1608 T_MFW_SMS_INFO sms_parameter; | 1608 T_MFW_SMS_INFO sms_parameter; |
1609 USHORT parameter; | 1609 USHORT parameter; |
1610 | 1610 |
1611 TRACE_FUNCTION ("SmsSend_NBEDIT_edit_cb()"); | 1611 TRACE_FUNCTION ("SmsSend_NBEDIT_edit_cb()"); |
1612 | 1612 |
1613 | 1613 |
1614 switch (reason) | 1614 switch (reason) |
1615 { | 1615 { |
1616 case INFO_KCD_LEFT: | 1616 case INFO_KCD_LEFT: |
1617 // Check if we can go to the next stage | 1617 // Check if we can go to the next stage |
1618 if ( (phb_check_number(data->edt_data.NumberBuffer) EQ MFW_PHB_FAIL) && (phb_get_mode() EQ PHB_RESTRICTED))//ACT_X0073106-BMI-5X-OMAPS00133906 | 1618 if ( (phb_check_number(data->edt_data.NumberBuffer) EQ MFW_PHB_FAIL) && (phb_get_mode() EQ PHB_RESTRICTED))//ACT_X0073106-BMI-5X-OMAPS00133906 |
1619 { | 1619 { |
1620 | 1620 |
1621 mmi_dialog_information_screen(win,TxtNotImplemented, "NOT ALLOWED", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_NOT_ALLOWED); | 1621 mmi_dialog_information_screen(win,TxtNotImplemented, "NOT ALLOWED", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_NOT_ALLOWED); |
1622 | 1622 |
1623 } | 1623 } |
1624 else | 1624 else |
1625 { | 1625 { |
1626 | 1626 |
1627 if (!smsidle_get_ready_state()) | 1627 if (!smsidle_get_ready_state()) |
1628 { | 1628 { |
1629 // SMS init processing not ready to access SIM to store the SMS | 1629 // SMS init processing not ready to access SIM to store the SMS |
1630 mmi_dialog_information_screen(win,TxtPleaseWait, "NOT READY", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_SC_NOT_READY); | 1630 mmi_dialog_information_screen(win,TxtPleaseWait, "NOT READY", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_SC_NOT_READY); |
1631 // Recreate the editor on dialog callback | 1631 // Recreate the editor on dialog callback |
1654 /***************************Go-lite Optimization changes Start***********************/ | 1654 /***************************Go-lite Optimization changes Start***********************/ |
1655 // Aug 16, 2004 REF: CRR 24323 Deepa M.D | 1655 // Aug 16, 2004 REF: CRR 24323 Deepa M.D |
1656 TRACE_EVENT_P1("serviceNr:%s",data->edt_data.CentreBuffer); | 1656 TRACE_EVENT_P1("serviceNr:%s",data->edt_data.CentreBuffer); |
1657 /***************************Go-lite Optimization changes end***********************/ | 1657 /***************************Go-lite Optimization changes end***********************/ |
1658 } | 1658 } |
1659 | 1659 |
1660 } | 1660 } |
1661 else | 1661 else |
1662 { | 1662 { |
1663 TRACE_EVENT("from the caller, reply"); | 1663 TRACE_EVENT("from the caller, reply"); |
1664 | 1664 |
1665 /* in case of reply the sms, we took already the | 1665 /* in case of reply the sms, we took already the |
1666 the service center number from the caller !!!*/ | 1666 the service center number from the caller !!!*/ |
1667 | 1667 |
1668 { | 1668 { |
1669 /***************************Go-lite Optimization changes Start***********************/ | 1669 /***************************Go-lite Optimization changes Start***********************/ |
1670 // Aug 16, 2004 REF: CRR 24323 Deepa M.D | 1670 // Aug 16, 2004 REF: CRR 24323 Deepa M.D |
1687 | 1687 |
1688 data->number_editor = 0; | 1688 data->number_editor = 0; |
1689 SmsSend_R_OPT_destroy(data->options_win); | 1689 SmsSend_R_OPT_destroy(data->options_win); |
1690 | 1690 |
1691 break; | 1691 break; |
1692 | 1692 |
1693 case INFO_KCD_ALTERNATELEFT: | 1693 case INFO_KCD_ALTERNATELEFT: |
1694 bookPhonebookStart(win, PhbkFromSms); | 1694 bookPhonebookStart(win, PhbkFromSms); |
1695 break; | 1695 break; |
1696 case INFO_KCD_RIGHT: | 1696 case INFO_KCD_RIGHT: |
1697 case INFO_KCD_HUP: | 1697 case INFO_KCD_HUP: |
1722 Identifier - unique id | 1722 Identifier - unique id |
1723 reason - event cause | 1723 reason - event cause |
1724 *******************************************************************************/ | 1724 *******************************************************************************/ |
1725 | 1725 |
1726 static void SmsSend_CENTREEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason) | 1726 static void SmsSend_CENTREEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason) |
1727 { | 1727 { |
1728 // T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; // RAVI | 1728 // T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; // RAVI |
1729 // T_SEND * data = (T_SEND *)win_data->user; // RAVI | 1729 // T_SEND * data = (T_SEND *)win_data->user; // RAVI |
1730 | 1730 |
1731 TRACE_FUNCTION ("SmsSend_CENTREEDIT_edit_cb()"); | 1731 TRACE_FUNCTION ("SmsSend_CENTREEDIT_edit_cb()"); |
1732 switch (reason) | 1732 switch (reason) |
1734 case INFO_KCD_LEFT: | 1734 case INFO_KCD_LEFT: |
1735 TRACE_EVENT("SmsSend_CENTREEDIT_edit_cb,INFO_KCD_LEFT "); | 1735 TRACE_EVENT("SmsSend_CENTREEDIT_edit_cb,INFO_KCD_LEFT "); |
1736 if (Identifier==SMSSEND_ID_CENTREEDIT) | 1736 if (Identifier==SMSSEND_ID_CENTREEDIT) |
1737 { | 1737 { |
1738 TRACE_EVENT("SmsSend_CENTREEDIT_edit_cb,INFO_KCD_LEFT Send to mfw "); | 1738 TRACE_EVENT("SmsSend_CENTREEDIT_edit_cb,INFO_KCD_LEFT Send to mfw "); |
1739 | 1739 |
1740 //Submit the SMS message to the service centre. | 1740 //Submit the SMS message to the service centre. |
1741 SmsSend_send_to_mfw(win); | 1741 SmsSend_send_to_mfw(win); |
1742 } | 1742 } |
1743 break; | 1743 break; |
1744 | 1744 |
1745 case INFO_KCD_RIGHT: | 1745 case INFO_KCD_RIGHT: |
1746 case INFO_KCD_HUP: | 1746 case INFO_KCD_HUP: |
1747 /* send an event that will lead to the display of the number edition window */ | 1747 /* send an event that will lead to the display of the number edition window */ |
1748 SEND_EVENT (win, E_RETURN, SMSSEND_ID_CENTREEDIT, NULL); | 1748 SEND_EVENT (win, E_RETURN, SMSSEND_ID_CENTREEDIT, NULL); |
1749 break; | 1749 break; |
1750 default: | 1750 default: |
1751 | 1751 |
1752 break; | 1752 break; |
1753 } | 1753 } |
1754 } | 1754 } |
1755 | 1755 |
1756 /******************************************************************************* | 1756 /******************************************************************************* |
1778 | 1778 |
1779 switch (event) | 1779 switch (event) |
1780 { | 1780 { |
1781 case E_SMS_MO_AVAIL: | 1781 case E_SMS_MO_AVAIL: |
1782 TRACE_EVENT ("Sent was successful -> ok"); | 1782 TRACE_EVENT ("Sent was successful -> ok"); |
1783 /* Sent was successful */ | 1783 /* Sent was successful */ |
1784 /* abort the current Dialog "Please wait" */ | 1784 /* abort the current Dialog "Please wait" */ |
1785 if (data->child_dialog != NULL) | 1785 if (data->child_dialog != NULL) |
1786 { | 1786 { |
1787 SEND_EVENT (data->child_dialog, DIALOG_DESTROY, 0, NULL); | 1787 SEND_EVENT (data->child_dialog, DIALOG_DESTROY, 0, NULL); |
1788 data->child_dialog = NULL; | 1788 data->child_dialog = NULL; |
1789 } | 1789 } |
1790 //GW Display sent not send | 1790 //GW Display sent not send |
1791 /* FTA 34.2.2 - CQ 101443 - API & MZ pass NULL instead of win to the dialog window*/ | 1791 /* FTA 34.2.2 - CQ 101443 - API & MZ pass NULL instead of win to the dialog window*/ |
1792 //Sep 01, 2004 REF: CRR 21380 Deepa M.D | 1792 //Sep 01, 2004 REF: CRR 21380 Deepa M.D |
1793 //Second string is same as the TextId .Hence passed NULL. | 1793 //Second string is same as the TextId .Hence passed NULL. |
1794 mmi_dialog_information_screen(NULL,TxtSent, NULL, (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_SENT); | 1794 mmi_dialog_information_screen(NULL,TxtSent, NULL, (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_SENT); |
1795 data->id = SMSSEND_ID_SENT; | 1795 data->id = SMSSEND_ID_SENT; |
1796 | 1796 |
1797 /* xreddymn OMAPS00067510 Jun-15-2006 */ | 1797 /* xreddymn OMAPS00067510 Jun-15-2006 */ |
1798 if (msgBuffer != NULL) | 1798 if (msgBuffer != NULL) |
1799 { | 1799 { |
1800 FREE_MEMORY((void*)msgBuffer, MAX_MSG_LEN_ARRAY); | 1800 FREE_MEMORY((void*)msgBuffer, MAX_MSG_LEN_ARRAY); |
1801 msgBuffer = NULL; | 1801 msgBuffer = NULL; |
1802 } | 1802 } |
1803 break; | 1803 break; |
1804 | 1804 |
1805 case E_SMS_ERR: | 1805 case E_SMS_ERR: |
1806 // Waiting dialog is destroyed | 1806 // Waiting dialog is destroyed |
1807 if (data->child_dialog != NULL) | 1807 if (data->child_dialog != NULL) |
1808 { | 1808 { |
1809 SEND_EVENT (data->child_dialog, DIALOG_DESTROY, 0, NULL); | 1809 SEND_EVENT (data->child_dialog, DIALOG_DESTROY, 0, NULL); |
1810 data->child_dialog = NULL; | 1810 data->child_dialog = NULL; |
1811 } | 1811 } |
1812 // and the status dialog is displayed during 3 secs. | 1812 // and the status dialog is displayed during 3 secs. |
1813 /* FTA 34.2.2 - CQ 101443 - API & MZ pass NULL instead of win to the dialog window */ | 1813 /* FTA 34.2.2 - CQ 101443 - API & MZ pass NULL instead of win to the dialog window */ |
1814 //Sep 01, 2004 REF: CRR 21380 Deepa M.D | 1814 //Sep 01, 2004 REF: CRR 21380 Deepa M.D |
1815 //Second string is same as the TextId .Hence passed NULL. | 1815 //Second string is same as the TextId .Hence passed NULL. |
1816 mmi_dialog_information_screen(NULL,TxtNotSent, NULL, (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_NOT_SENT); | 1816 mmi_dialog_information_screen(NULL,TxtNotSent, NULL, (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_NOT_SENT); |
1817 data->id = SMSSEND_ID_NOT_SENT; //TB3 | 1817 data->id = SMSSEND_ID_NOT_SENT; //TB3 |
1818 | 1818 |
1819 /* xreddymn OMAPS00067510 Jun-15-2006 */ | 1819 /* xreddymn OMAPS00067510 Jun-15-2006 */ |
1821 { | 1821 { |
1822 FREE_MEMORY((void*)msgBuffer, MAX_MSG_LEN_ARRAY); | 1822 FREE_MEMORY((void*)msgBuffer, MAX_MSG_LEN_ARRAY); |
1823 msgBuffer = NULL; | 1823 msgBuffer = NULL; |
1824 } | 1824 } |
1825 break; | 1825 break; |
1826 | 1826 |
1827 default: | 1827 default: |
1828 TRACE_EVENT("Err: default"); | 1828 TRACE_EVENT("Err: default"); |
1829 return 0; | 1829 return 0; |
1830 } | 1830 } |
1831 | 1831 |
1832 return 1; | 1832 return 1; |
1833 } | 1833 } |
1834 | 1834 |
1838 | 1838 |
1839 $Description: Create the Save SMS text window. | 1839 $Description: Create the Save SMS text window. |
1840 | 1840 |
1841 $Returns: mfw window handle | 1841 $Returns: mfw window handle |
1842 | 1842 |
1843 $Arguments: parent_window - parent window | 1843 $Arguments: parent_window - parent window |
1844 UserData - SMS info | 1844 UserData - SMS info |
1845 | 1845 |
1846 *******************************************************************************/ | 1846 *******************************************************************************/ |
1847 | 1847 |
1848 T_MFW_HND SmsSend_SAVE_start(T_MFW_HND parent_window, T_SmsUserData *UserData) | 1848 T_MFW_HND SmsSend_SAVE_start(T_MFW_HND parent_window, T_SmsUserData *UserData) |
1866 | 1866 |
1867 $Description: Create a window for info dialog | 1867 $Description: Create a window for info dialog |
1868 | 1868 |
1869 $Returns: mfw window handle | 1869 $Returns: mfw window handle |
1870 | 1870 |
1871 $Arguments: parent_window - parent window | 1871 $Arguments: parent_window - parent window |
1872 | 1872 |
1873 *******************************************************************************/ | 1873 *******************************************************************************/ |
1874 | 1874 |
1875 static T_MFW_HND SmsSend_SAVE_create(MfwHnd parent_window) | 1875 static T_MFW_HND SmsSend_SAVE_create(MfwHnd parent_window) |
1876 { | 1876 { |
1886 if (data->win EQ NULL) | 1886 if (data->win EQ NULL) |
1887 { | 1887 { |
1888 return NULL; | 1888 return NULL; |
1889 } | 1889 } |
1890 | 1890 |
1891 /* | 1891 /* |
1892 * connect the dialog data to the MFW-window | 1892 * connect the dialog data to the MFW-window |
1893 */ | 1893 */ |
1894 data->mmi_control.dialog = (T_DIALOG_FUNC)SmsSend_SAVE_exec_cb; | 1894 data->mmi_control.dialog = (T_DIALOG_FUNC)SmsSend_SAVE_exec_cb; |
1895 data->mmi_control.data = data; | 1895 data->mmi_control.data = data; |
1896 win = ((T_MFW_HDR *)data->win)->data; | 1896 win = ((T_MFW_HDR *)data->win)->data; |
1908 | 1908 |
1909 $Description: Destroy the windows for info dialog | 1909 $Description: Destroy the windows for info dialog |
1910 | 1910 |
1911 $Returns: none | 1911 $Returns: none |
1912 | 1912 |
1913 $Arguments: own_window - current window | 1913 $Arguments: own_window - current window |
1914 | 1914 |
1915 *******************************************************************************/ | 1915 *******************************************************************************/ |
1916 | 1916 |
1917 static void SmsSend_SAVE_destroy(MfwHnd own_window) | 1917 static void SmsSend_SAVE_destroy(MfwHnd own_window) |
1918 { | 1918 { |
1919 T_MFW_WIN * win_data; | 1919 T_MFW_WIN * win_data; |
1920 T_SAVE * data = NULL; | 1920 T_SAVE * data = NULL; |
1921 | 1921 |
1922 TRACE_FUNCTION ("SmsSend_SAVE_destroy()"); | 1922 TRACE_FUNCTION ("SmsSend_SAVE_destroy()"); |
1923 | 1923 |
1924 if (own_window) | 1924 if (own_window) |
1925 { | 1925 { |
1926 win_data = ((T_MFW_HDR *)own_window)->data; | 1926 win_data = ((T_MFW_HDR *)own_window)->data; |
1927 if (win_data) | 1927 if (win_data) |
1928 data = (T_SAVE *)win_data->user; | 1928 data = (T_SAVE *)win_data->user; |
1929 | 1929 |
1930 if (data) | 1930 if (data) |
1931 { | 1931 { |
1932 // Delete sms handle | 1932 // Delete sms handle |
1936 if (data->child_dialog != NULL) | 1936 if (data->child_dialog != NULL) |
1937 { | 1937 { |
1938 TRACE_EVENT("child_dialog not deleted?"); | 1938 TRACE_EVENT("child_dialog not deleted?"); |
1939 } | 1939 } |
1940 | 1940 |
1941 // Delete WIN handler | 1941 // Delete WIN handler |
1942 win_delete (data->win); | 1942 win_delete (data->win); |
1943 | 1943 |
1944 // Free Memory | 1944 // Free Memory |
1945 FREE_MEMORY ((void *)data, sizeof (T_SAVE)); | 1945 FREE_MEMORY ((void *)data, sizeof (T_SAVE)); |
1946 | 1946 |
1947 } | 1947 } |
1948 else | 1948 else |
1949 { | 1949 { |
1950 TRACE_EVENT ("SmsSend_SAVE_destroy() called twice"); | 1950 TRACE_EVENT ("SmsSend_SAVE_destroy() called twice"); |
1951 } | 1951 } |
1958 | 1958 |
1959 $Description: Callback handler for events sent to to trigger execution | 1959 $Description: Callback handler for events sent to to trigger execution |
1960 | 1960 |
1961 $Returns: none | 1961 $Returns: none |
1962 | 1962 |
1963 $Arguments: own_window - current window | 1963 $Arguments: own_window - current window |
1964 | 1964 |
1965 *******************************************************************************/ | 1965 *******************************************************************************/ |
1966 | 1966 |
1967 void SmsSend_SAVE_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter) | 1967 void SmsSend_SAVE_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter) |
1968 { | 1968 { |
1977 | 1977 |
1978 TRACE_FUNCTION ("SmsSend_SAVE_exec_cb()"); | 1978 TRACE_FUNCTION ("SmsSend_SAVE_exec_cb()"); |
1979 | 1979 |
1980 switch (event) | 1980 switch (event) |
1981 { | 1981 { |
1982 case E_INIT: | 1982 case E_INIT: |
1983 | 1983 |
1984 /*MZ issue 10202 only alloc memory when you need it */ | 1984 /*MZ issue 10202 only alloc memory when you need it */ |
1985 if (msgBuffer ==NULL) | 1985 if (msgBuffer ==NULL) |
1986 msgBuffer = (UBYTE*)ALLOC_MEMORY(MAX_MSG_LEN_ARRAY); | 1986 msgBuffer = (UBYTE*)ALLOC_MEMORY(MAX_MSG_LEN_ARRAY); |
1987 | 1987 |
1988 data->child_dialog = NULL; | 1988 data->child_dialog = NULL; |
1989 | 1989 |
1990 /* Create a sms handler to receive events */ | 1990 /* Create a sms handler to receive events */ |
1991 data->sms_handler = sms_create(data->win, | 1991 data->sms_handler = sms_create(data->win, |
1992 E_SMS_SAVE_AVAIL | E_SMS_ERR | E_SMS_MEM_FULL | 1992 E_SMS_SAVE_AVAIL | E_SMS_ERR | E_SMS_MEM_FULL |
1993 ,(MfwCb)SmsSend_SAVE_mfw_cb); | 1993 ,(MfwCb)SmsSend_SAVE_mfw_cb); |
1995 // | 1995 // |
1996 /*SPR1991, set local pointer to passed parameter, rather than copying data and | 1996 /*SPR1991, set local pointer to passed parameter, rather than copying data and |
1997 using up more dynamic memory*/ | 1997 using up more dynamic memory*/ |
1998 message_parameter = parameter; | 1998 message_parameter = parameter; |
1999 if (message_parameter->TextBuffer[0] == 0x80) | 1999 if (message_parameter->TextBuffer[0] == 0x80) |
2000 { //String is unicode - | 2000 { //String is unicode - |
2001 sms_parameter.dcs = MFW_DCS_UCS2; | 2001 sms_parameter.dcs = MFW_DCS_UCS2; |
2002 } | 2002 } |
2003 else | 2003 else |
2004 { | 2004 { |
2005 sms_parameter.dcs = MFW_DCS_7bits; | 2005 sms_parameter.dcs = MFW_DCS_7bits; |
2013 convertToUnicodeForOutput(message_parameter->TextBuffer,msgBuffer, &outLen); | 2013 convertToUnicodeForOutput(message_parameter->TextBuffer,msgBuffer, &outLen); |
2014 TRACE_EVENT_P1("Save SMS, length: %d", outLen); | 2014 TRACE_EVENT_P1("Save SMS, length: %d", outLen); |
2015 | 2015 |
2016 store_status = sms_store(MFW_SMS_SUBMIT, (char*)message_parameter->NumberBuffer, msgBuffer, outLen, NULL); | 2016 store_status = sms_store(MFW_SMS_SUBMIT, (char*)message_parameter->NumberBuffer, msgBuffer, outLen, NULL); |
2017 } | 2017 } |
2018 #else | 2018 #else |
2019 { | 2019 { |
2020 convertToUnicodeForOutput(data->edt_data.TextBuffer,msgBuffer, &outLen); | 2020 convertToUnicodeForOutput(data->edt_data.TextBuffer,msgBuffer, &outLen); |
2021 store_status = sms_store(MFW_SMS_SUBMIT, (char*)message_parameter->NumberBuffer, msgBuffer, outLen, NULL); | 2021 store_status = sms_store(MFW_SMS_SUBMIT, (char*)message_parameter->NumberBuffer, msgBuffer, outLen, NULL); |
2022 // sbh - added length to the above function call, since '@' characters stored as NULL & will stop | 2022 // sbh - added length to the above function call, since '@' characters stored as NULL & will stop |
2023 // strlen from working properly. | 2023 // strlen from working properly. |
2031 /* show now to user "Please wait" for save*/ | 2031 /* show now to user "Please wait" for save*/ |
2032 // Do not start please wait if ever the MFW result event as already been received | 2032 // Do not start please wait if ever the MFW result event as already been received |
2033 if (data->child_dialog == NULL) | 2033 if (data->child_dialog == NULL) |
2034 { | 2034 { |
2035 // Feb 02, 2005 REF: CRR 28479 xnkulkar | 2035 // Feb 02, 2005 REF: CRR 28479 xnkulkar |
2036 // Call function "mmi_dialog_information_screen_save_sms" which has only | 2036 // Call function "mmi_dialog_information_screen_save_sms" which has only |
2037 // KEY_RIGHT and KEY_HUP registered instead of KEY_ALL | 2037 // KEY_RIGHT and KEY_HUP registered instead of KEY_ALL |
2038 //data->child_dialog = mmi_dialog_information_screen(win,TxtPleaseWait, "SAVING", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_WAIT_SAVE); | 2038 //data->child_dialog = mmi_dialog_information_screen(win,TxtPleaseWait, "SAVING", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_WAIT_SAVE); |
2039 data->child_dialog = mmi_dialog_information_screen_save_sms(win,TxtPleaseWait, "SAVING", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_WAIT_SAVE); | 2039 data->child_dialog = mmi_dialog_information_screen_save_sms(win,TxtPleaseWait, "SAVING", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_WAIT_SAVE); |
2040 } | 2040 } |
2041 | 2041 |
2042 } | 2042 } |
2043 else | 2043 else |
2044 { | 2044 { |
2045 TRACE_EVENT ("Save operation -> failed"); | 2045 TRACE_EVENT ("Save operation -> failed"); |
2046 //Sep 01, 2004 REF: CRR 21380 Deepa M.D | 2046 //Sep 01, 2004 REF: CRR 21380 Deepa M.D |
2047 //If E_SMS_MEM_FULL event has already been received, then destroy the Messagefull Dialog | 2047 //If E_SMS_MEM_FULL event has already been received, then destroy the Messagefull Dialog |
2048 //and dispaly a new dialog "Full NOT SAVED". | 2048 //and dispaly a new dialog "Full NOT SAVED". |
2049 if(memfull==TRUE) | 2049 if(memfull==TRUE) |
2050 { | 2050 { |
2051 // Feb 02, 2005 REF: CRR 28479 xnkulkar | 2051 // Feb 02, 2005 REF: CRR 28479 xnkulkar |
2052 // Call function "mmi_dialog_information_screen_save_sms" which has only | 2052 // Call function "mmi_dialog_information_screen_save_sms" which has only |
2053 // KEY_RIGHT and KEY_HUP registered instead of KEY_ALL | 2053 // KEY_RIGHT and KEY_HUP registered instead of KEY_ALL |
2054 //mmi_dialog_information_screen(win, TxtFull,"NOT SAVED", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_NOT_SAVED); | 2054 //mmi_dialog_information_screen(win, TxtFull,"NOT SAVED", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_NOT_SAVED); |
2055 mmi_dialog_information_screen_save_sms(win, TxtFull,"NOT SAVED", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_NOT_SAVED); | 2055 mmi_dialog_information_screen_save_sms(win, TxtFull,"NOT SAVED", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_NOT_SAVED); |
2056 memfull=FALSE;//Set the memful flag to False. | 2056 memfull=FALSE;//Set the memful flag to False. |
2057 | 2057 |
2058 } | 2058 } |
2059 // If the saving message failed due to other reason than memory full, display this message | 2059 // If the saving message failed due to other reason than memory full, display this message |
2060 else if (data->child_dialog == NULL) | 2060 else if (data->child_dialog == NULL) |
2061 { | 2061 { |
2062 // Feb 02, 2005 REF: CRR 28479 xnkulkar | 2062 // Feb 02, 2005 REF: CRR 28479 xnkulkar |
2063 // Call function "mmi_dialog_information_screen_save_sms" which has only | 2063 // Call function "mmi_dialog_information_screen_save_sms" which has only |
2064 // KEY_RIGHT and KEY_HUP registered instead of KEY_ALL | 2064 // KEY_RIGHT and KEY_HUP registered instead of KEY_ALL |
2065 //mmi_dialog_information_screen(win, TxtFailed,"NOT SAVED", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_NOT_SAVED); | 2065 //mmi_dialog_information_screen(win, TxtFailed,"NOT SAVED", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_NOT_SAVED); |
2066 mmi_dialog_information_screen_save_sms(win, TxtFailed,"NOT SAVED", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_NOT_SAVED); | 2066 mmi_dialog_information_screen_save_sms(win, TxtFailed,"NOT SAVED", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_NOT_SAVED); |
2067 } | 2067 } |
2068 | 2068 |
2069 } | 2069 } |
2070 /*SPr 1991, check memory allocated before deallocatting it*/ | 2070 /*SPr 1991, check memory allocated before deallocatting it*/ |
2071 /* MZ 10202 Remove the memory deallocation until later.*/ | 2071 /* MZ 10202 Remove the memory deallocation until later.*/ |
2072 | 2072 |
2073 break; | 2073 break; |
2074 | 2074 |
2075 default: | 2075 default: |
2076 TRACE_EVENT("Err: default"); | 2076 TRACE_EVENT("Err: default"); |
2077 break; | 2077 break; |
2078 } | 2078 } |
2079 | 2079 |
2080 return; | 2080 return; |
2081 } | 2081 } |
2082 | 2082 |
2083 /******************************************************************************* | 2083 /******************************************************************************* |
2084 | 2084 |
2099 T_MFW_HND win = mfw_parent(mfw_header()); | 2099 T_MFW_HND win = mfw_parent(mfw_header()); |
2100 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; | 2100 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; |
2101 T_SAVE * data = (T_SAVE *)win_data->user; | 2101 T_SAVE * data = (T_SAVE *)win_data->user; |
2102 | 2102 |
2103 // T_DISPLAY_DATA display_info; | 2103 // T_DISPLAY_DATA display_info; |
2104 | 2104 |
2105 TRACE_FUNCTION ("SmsSend_SAVE_mfw_cb"); | 2105 TRACE_FUNCTION ("SmsSend_SAVE_mfw_cb"); |
2106 | 2106 |
2107 switch (event) | 2107 switch (event) |
2108 { | 2108 { |
2109 /* Save is successful */ | 2109 /* Save is successful */ |
2110 case E_SMS_SAVE_AVAIL: | 2110 case E_SMS_SAVE_AVAIL: |
2111 // Waiting dialog is destroyed | 2111 // Waiting dialog is destroyed |
2112 | 2112 |
2113 if (data->child_dialog != NULL) | 2113 if (data->child_dialog != NULL) |
2114 { | 2114 { |
2115 SEND_EVENT (data->child_dialog, DIALOG_DESTROY, 0, NULL); | 2115 SEND_EVENT (data->child_dialog, DIALOG_DESTROY, 0, NULL); |
2116 data->child_dialog = NULL; | 2116 data->child_dialog = NULL; |
2117 } | 2117 } |
2118 //Sep 01, 2004 REF: CRR 21380 Deepa M.D | 2118 //Sep 01, 2004 REF: CRR 21380 Deepa M.D |
2119 //Second string is same as the TextId .Hence passed NULL. | 2119 //Second string is same as the TextId .Hence passed NULL. |
2120 | 2120 |
2121 // Feb 02, 2005 REF: CRR 28479 xnkulkar | 2121 // Feb 02, 2005 REF: CRR 28479 xnkulkar |
2122 // Call function "mmi_dialog_information_screen_save_sms" which has only | 2122 // Call function "mmi_dialog_information_screen_save_sms" which has only |
2123 // KEY_RIGHT and KEY_HUP registered instead of KEY_ALL | 2123 // KEY_RIGHT and KEY_HUP registered instead of KEY_ALL |
2124 | 2124 |
2125 // mmi_dialog_information_screen(win, TxtSaved,NULL, (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_SAVED); | 2125 // mmi_dialog_information_screen(win, TxtSaved,NULL, (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_SAVED); |
2126 mmi_dialog_information_screen_save_sms(win, TxtSaved,NULL, (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_SAVED); | 2126 mmi_dialog_information_screen_save_sms(win, TxtSaved,NULL, (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_SAVED); |
2127 | 2127 |
2128 /* xreddymn OMAPS00067510 Jun-15-2006 */ | 2128 /* xreddymn OMAPS00067510 Jun-15-2006 */ |
2129 if (msgBuffer != NULL) | 2129 if (msgBuffer != NULL) |
2130 { | 2130 { |
2131 FREE_MEMORY((void*)msgBuffer, MAX_MSG_LEN_ARRAY); | 2131 FREE_MEMORY((void*)msgBuffer, MAX_MSG_LEN_ARRAY); |
2132 msgBuffer = NULL; | 2132 msgBuffer = NULL; |
2133 } | 2133 } |
2134 break; | 2134 break; |
2135 | 2135 |
2136 case E_SMS_MEM_FULL: | 2136 case E_SMS_MEM_FULL: |
2137 //Sep 01, 2004 REF: CRR 21380 Deepa M.D | 2137 //Sep 01, 2004 REF: CRR 21380 Deepa M.D |
2138 //Flag to check E_SMS_MEM_FULL event has already been received. | 2138 //Flag to check E_SMS_MEM_FULL event has already been received. |
2139 memfull=TRUE; | 2139 memfull=TRUE; |
2140 TRACE_EVENT ("Memory for sms save is full"); | 2140 TRACE_EVENT ("Memory for sms save is full"); |
2141 | 2141 |
2142 if (data->child_dialog != NULL) | 2142 if (data->child_dialog != NULL) |
2143 { | 2143 { |
2144 // Waiting dialog is destroyed | 2144 // Waiting dialog is destroyed |
2145 SEND_EVENT (data->child_dialog, DIALOG_DESTROY, 0, NULL); | 2145 SEND_EVENT (data->child_dialog, DIALOG_DESTROY, 0, NULL); |
2146 data->child_dialog = NULL; | 2146 data->child_dialog = NULL; |
2147 } | 2147 } |
2148 // and the status dialog is displayed during 3 secs. | 2148 // and the status dialog is displayed during 3 secs. |
2149 // set data->child_dialog as message received before sms_store is ended | 2149 // set data->child_dialog as message received before sms_store is ended |
2150 //Sep 01, 2004 REF: CRR 21380 Deepa M.D | 2150 //Sep 01, 2004 REF: CRR 21380 Deepa M.D |
2151 //Second string is same as the TextId .Hence passed NULL. | 2151 //Second string is same as the TextId .Hence passed NULL. |
2152 mmi_dialog_information_screen(win,TxtFull, NULL, (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_LIST_FULL); | 2152 mmi_dialog_information_screen(win,TxtFull, NULL, (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_LIST_FULL); |
2153 | 2153 |
2154 /* xreddymn OMAPS00067510 Jun-15-2006 */ | 2154 /* xreddymn OMAPS00067510 Jun-15-2006 */ |
2155 if (msgBuffer != NULL) | 2155 if (msgBuffer != NULL) |
2157 FREE_MEMORY((void*)msgBuffer, MAX_MSG_LEN_ARRAY); | 2157 FREE_MEMORY((void*)msgBuffer, MAX_MSG_LEN_ARRAY); |
2158 msgBuffer = NULL; | 2158 msgBuffer = NULL; |
2159 } | 2159 } |
2160 return MFW_EVENT_PASSED; /*SPR 2640, pass event along to idle screen*/ | 2160 return MFW_EVENT_PASSED; /*SPR 2640, pass event along to idle screen*/ |
2161 // break; // RAVI | 2161 // break; // RAVI |
2162 | 2162 |
2163 case E_SMS_ERR: | 2163 case E_SMS_ERR: |
2164 TRACE_EVENT ("Save sms failed -> nok"); | 2164 TRACE_EVENT ("Save sms failed -> nok"); |
2165 | 2165 |
2166 if (data->child_dialog != NULL) | 2166 if (data->child_dialog != NULL) |
2167 { | 2167 { |
2168 // Waiting dialog is destroyed | 2168 // Waiting dialog is destroyed |
2169 SEND_EVENT (data->child_dialog, DIALOG_DESTROY, 0, NULL); | 2169 SEND_EVENT (data->child_dialog, DIALOG_DESTROY, 0, NULL); |
2170 data->child_dialog = NULL; | 2170 data->child_dialog = NULL; |
2171 } | 2171 } |
2172 // and the status dialog is displayed during 3 secs. | 2172 // and the status dialog is displayed during 3 secs. |
2173 // set data->child_dialog if message received before sms_store is ended | 2173 // set data->child_dialog if message received before sms_store is ended |
2174 mmi_dialog_information_screen(win,TxtFailed, "NOT SAVED", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_NOT_SAVED); | 2174 mmi_dialog_information_screen(win,TxtFailed, "NOT SAVED", (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_NOT_SAVED); |
2175 | 2175 |
2178 { | 2178 { |
2179 FREE_MEMORY((void*)msgBuffer, MAX_MSG_LEN_ARRAY); | 2179 FREE_MEMORY((void*)msgBuffer, MAX_MSG_LEN_ARRAY); |
2180 msgBuffer = NULL; | 2180 msgBuffer = NULL; |
2181 } | 2181 } |
2182 break; | 2182 break; |
2183 | 2183 |
2184 default: | 2184 default: |
2185 TRACE_EVENT("Err: default"); | 2185 TRACE_EVENT("Err: default"); |
2186 return 0; | 2186 return 0; |
2187 } | 2187 } |
2188 return 1; | 2188 return 1; |
2189 } | 2189 } |
2190 | 2190 |
2191 /******************************************************************************* | 2191 /******************************************************************************* |
2192 | 2192 |
2202 GW 09/10/01 - Added code to convert unicode strings from 8 bits to 7 bits. | 2202 GW 09/10/01 - Added code to convert unicode strings from 8 bits to 7 bits. |
2203 | 2203 |
2204 *******************************************************************************/ | 2204 *******************************************************************************/ |
2205 | 2205 |
2206 static int SmsSend_send_to_mfw (T_MFW_HND win) | 2206 static int SmsSend_send_to_mfw (T_MFW_HND win) |
2207 { | 2207 { |
2208 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; | 2208 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; |
2209 T_SEND * data = (T_SEND *)win_data->user; | 2209 T_SEND * data = (T_SEND *)win_data->user; |
2210 T_MFW submit_status; /* Result of SMS send operation. */ | 2210 T_MFW submit_status; /* Result of SMS send operation. */ |
2211 T_MFW_SMS_INFO sms_parameter; | 2211 T_MFW_SMS_INFO sms_parameter; |
2212 | 2212 |
2215 /*SPR2453 only alloc memory when you need it */ | 2215 /*SPR2453 only alloc memory when you need it */ |
2216 if (msgBuffer ==NULL) | 2216 if (msgBuffer ==NULL) |
2217 msgBuffer = (UBYTE*)ALLOC_MEMORY(MAX_MSG_LEN_ARRAY); | 2217 msgBuffer = (UBYTE*)ALLOC_MEMORY(MAX_MSG_LEN_ARRAY); |
2218 TRACE_FUNCTION ("SmsSend_send_to_mfw()"); | 2218 TRACE_FUNCTION ("SmsSend_send_to_mfw()"); |
2219 if (data->edt_data.TextBuffer[0] == 0x80) | 2219 if (data->edt_data.TextBuffer[0] == 0x80) |
2220 { //String is unicode - | 2220 { //String is unicode - |
2221 sms_parameter.dcs = MFW_DCS_UCS2; | 2221 sms_parameter.dcs = MFW_DCS_UCS2; |
2222 } | 2222 } |
2223 else | 2223 else |
2224 { | 2224 { |
2225 sms_parameter.dcs = MFW_DCS_7bits; | 2225 sms_parameter.dcs = MFW_DCS_7bits; |
2226 } | 2226 } |
2227 | 2227 |
2228 SmsSend_set_dcs_number (&sms_parameter); | 2228 SmsSend_set_dcs_number (&sms_parameter); |
2229 /* Send the SMS */ | 2229 /* Send the SMS */ |
2230 | 2230 |
2231 | 2231 |
2232 | 2232 |
2233 #ifdef NO_ASCIIZ | 2233 #ifdef NO_ASCIIZ |
2234 { | 2234 { |
2235 | 2235 |
2236 convertToUnicodeForOutput(data->edt_data.TextBuffer,msgBuffer, &outLen); | 2236 convertToUnicodeForOutput(data->edt_data.TextBuffer,msgBuffer, &outLen); |
2237 | 2237 |
2264 | 2264 |
2265 #endif | 2265 #endif |
2266 | 2266 |
2267 } | 2267 } |
2268 #endif | 2268 #endif |
2269 | 2269 |
2270 | 2270 |
2271 | 2271 |
2272 /* display "Please wait" for sent sms */ | 2272 /* display "Please wait" for sent sms */ |
2273 if (submit_status EQ MFW_SMS_OK) | 2273 if (submit_status EQ MFW_SMS_OK) |
2274 { | 2274 { |
2275 T_DISPLAY_DATA display_info; | 2275 T_DISPLAY_DATA display_info; |
2276 | 2276 |
2277 TRACE_EVENT ("to give SMS to MFW -> ok"); | 2277 TRACE_EVENT ("to give SMS to MFW -> ok"); |
2278 /* show the use "Please wait" for send sms */ | 2278 /* show the use "Please wait" for send sms */ |
2279 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtSending, TxtMessage , COLOUR_STATUS); | 2279 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtSending, TxtMessage , COLOUR_STATUS); |
2280 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)SmsSend_standard_dialog_cb, FOREVER, KEY_LEFT ); | 2280 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)SmsSend_standard_dialog_cb, FOREVER, KEY_LEFT ); |
2281 display_info.Identifier = SMSSEND_ID_WAIT_SEND; | 2281 display_info.Identifier = SMSSEND_ID_WAIT_SEND; |
2285 } | 2285 } |
2286 else | 2286 else |
2287 { | 2287 { |
2288 TRACE_EVENT ("to give SMS to MFW -> failed"); | 2288 TRACE_EVENT ("to give SMS to MFW -> failed"); |
2289 /* the result operation of sent was NOT OK*/ | 2289 /* the result operation of sent was NOT OK*/ |
2290 //Sep 01, 2004 REF: CRR 21380 Deepa M.D | 2290 //Sep 01, 2004 REF: CRR 21380 Deepa M.D |
2291 //Second string is same as the TextId .Hence passed NULL. | 2291 //Second string is same as the TextId .Hence passed NULL. |
2292 mmi_dialog_information_screen(win,TxtNotSent, NULL, (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_NOT_SENT); | 2292 mmi_dialog_information_screen(win,TxtNotSent, NULL, (T_VOID_FUNC)SmsSend_standard_dialog_cb, SMSSEND_ID_NOT_SENT); |
2293 // No forever dialog to be destroyed | 2293 // No forever dialog to be destroyed |
2294 data->child_dialog = NULL; | 2294 data->child_dialog = NULL; |
2295 data->id = SMSSEND_ID_NOT_SENT; | 2295 data->id = SMSSEND_ID_NOT_SENT; |
2315 UBYTE SmsSend_get_config_data (T_MFW_SMS_INFO *config_data) | 2315 UBYTE SmsSend_get_config_data (T_MFW_SMS_INFO *config_data) |
2316 { | 2316 { |
2317 T_MFW Submit_Status; /* store theh result of SMS send operation. */ | 2317 T_MFW Submit_Status; /* store theh result of SMS send operation. */ |
2318 | 2318 |
2319 TRACE_FUNCTION ("SmsSend_get_config_data()"); | 2319 TRACE_FUNCTION ("SmsSend_get_config_data()"); |
2320 // get the current config data from SIM | 2320 // get the current config data from SIM |
2321 Submit_Status = sms_parameter(config_data, TRUE); | 2321 Submit_Status = sms_parameter(config_data, TRUE); |
2322 | 2322 |
2323 if (Submit_Status == MFW_SMS_FAIL) | 2323 if (Submit_Status == MFW_SMS_FAIL) |
2324 { | 2324 { |
2325 TRACE_EVENT ("ret MFW_SMS_FAIL"); | 2325 TRACE_EVENT ("ret MFW_SMS_FAIL"); |
2326 return FALSE; | 2326 return FALSE; |
2327 } | 2327 } |
2328 else | 2328 else |
2329 { | 2329 { |
2330 TRACE_EVENT ("ret OK"); | 2330 TRACE_EVENT ("ret OK"); |
2331 return TRUE; | 2331 return TRUE; |
2346 UBYTE SmsSend_set_SrvCntr_number (T_MFW_SMS_INFO *config_data) | 2346 UBYTE SmsSend_set_SrvCntr_number (T_MFW_SMS_INFO *config_data) |
2347 { | 2347 { |
2348 T_MFW Submit_Status; /* store theh result of SMS send operation. */ | 2348 T_MFW Submit_Status; /* store theh result of SMS send operation. */ |
2349 | 2349 |
2350 TRACE_FUNCTION ("SmsSend_set_SrvCntr_number()"); | 2350 TRACE_FUNCTION ("SmsSend_set_SrvCntr_number()"); |
2351 // get the current config data from SIM | 2351 // get the current config data from SIM |
2352 Submit_Status = sms_set_SrvCntr_number(config_data); | 2352 Submit_Status = sms_set_SrvCntr_number(config_data); |
2353 | 2353 |
2354 if (Submit_Status == MFW_SMS_FAIL) | 2354 if (Submit_Status == MFW_SMS_FAIL) |
2355 { | 2355 { |
2356 TRACE_EVENT ("ret MFW_SMS_FAIL"); | 2356 TRACE_EVENT ("ret MFW_SMS_FAIL"); |
2357 return FALSE; | 2357 return FALSE; |
2358 } | 2358 } |
2359 else | 2359 else |
2360 { | 2360 { |
2361 TRACE_EVENT ("ret OK"); | 2361 TRACE_EVENT ("ret OK"); |
2362 return TRUE; | 2362 return TRUE; |
2365 UBYTE SmsSend_set_dcs_number (T_MFW_SMS_INFO *config_data) | 2365 UBYTE SmsSend_set_dcs_number (T_MFW_SMS_INFO *config_data) |
2366 { | 2366 { |
2367 T_MFW Submit_Status; /* store theh result of SMS send operation. */ | 2367 T_MFW Submit_Status; /* store theh result of SMS send operation. */ |
2368 | 2368 |
2369 TRACE_EVENT ("SmsSend_set_dcs_number()"); | 2369 TRACE_EVENT ("SmsSend_set_dcs_number()"); |
2370 // get the current config data from SIM | 2370 // get the current config data from SIM |
2371 Submit_Status = sms_set_dcs_number(config_data); | 2371 Submit_Status = sms_set_dcs_number(config_data); |
2372 | 2372 |
2373 if (Submit_Status == MFW_SMS_FAIL) | 2373 if (Submit_Status == MFW_SMS_FAIL) |
2374 { | 2374 { |
2375 TRACE_EVENT ("ret MFW_SMS_FAIL"); | 2375 TRACE_EVENT ("ret MFW_SMS_FAIL"); |
2376 return FALSE; | 2376 return FALSE; |
2377 } | 2377 } |
2378 else | 2378 else |
2379 { | 2379 { |
2380 TRACE_EVENT ("ret OK"); | 2380 TRACE_EVENT ("ret OK"); |
2381 return TRUE; | 2381 return TRUE; |
2389 $Function: SmsSend_loadEditDefault | 2389 $Function: SmsSend_loadEditDefault |
2390 | 2390 |
2391 $Description: Configure T_EDITOR_DATA structure with default editor settings. | 2391 $Description: Configure T_EDITOR_DATA structure with default editor settings. |
2392 | 2392 |
2393 $Returns: none | 2393 $Returns: none |
2394 | 2394 |
2395 $Arguments: editor_data - editor data. | 2395 $Arguments: editor_data - editor data. |
2396 | 2396 |
2397 *******************************************************************************/ | 2397 *******************************************************************************/ |
2398 | 2398 |
2399 void SmsSend_loadEditDefault(T_EDITOR_DATA *editor_data) | 2399 void SmsSend_loadEditDefault(T_EDITOR_DATA *editor_data) |
2402 | 2402 |
2403 editor_attr_init(&editor_data->editor_attr, NULL, edtCurBar1, 0, 0, 0, COLOUR_EDITOR); | 2403 editor_attr_init(&editor_data->editor_attr, NULL, edtCurBar1, 0, 0, 0, COLOUR_EDITOR); |
2404 editor_data_init(editor_data, NULL, TxtSoftSelect, TxtSoftBack, 0, 1, ALPHA_MODE, FOREVER); | 2404 editor_data_init(editor_data, NULL, TxtSoftSelect, TxtSoftBack, 0, 1, ALPHA_MODE, FOREVER); |
2405 editor_data->hide = FALSE; | 2405 editor_data->hide = FALSE; |
2406 editor_data->AlternateLeftSoftKey = TxtNull; | 2406 editor_data->AlternateLeftSoftKey = TxtNull; |
2407 editor_data->Identifier = 0; | 2407 editor_data->Identifier = 0; |
2408 editor_data->TextString = NULL; | 2408 editor_data->TextString = NULL; |
2409 editor_data->destroyEditor = TRUE ; | 2409 editor_data->destroyEditor = TRUE ; |
2410 } | 2410 } |
2411 | 2411 |
2412 | 2412 |
2413 /******************************************************************************* | 2413 /******************************************************************************* |
2414 | 2414 |
2415 $Function: SmsSend_loadUCS2EditDefault | 2415 $Function: SmsSend_loadUCS2EditDefault |
2416 | 2416 |
2417 $Description: Configure T_EDITOR2_DATA structure with default editor settings. | 2417 $Description: Configure T_EDITOR2_DATA structure with default editor settings. |
2418 | 2418 |
2419 $Returns: none | 2419 $Returns: none |
2420 | 2420 |
2421 $Arguments: editor_data - editor data. | 2421 $Arguments: editor_data - editor data. |
2422 | 2422 |
2423 *******************************************************************************/ | 2423 *******************************************************************************/ |
2424 | 2424 |
2425 static void SmsSend_loadUCS2EditDefault(T_EDITOR_DATA *editor_data) | 2425 static void SmsSend_loadUCS2EditDefault(T_EDITOR_DATA *editor_data) |
2426 { | 2426 { |
2427 TRACE_FUNCTION ("SmsSend_loadUCS2EditDefault()"); | 2427 TRACE_FUNCTION ("SmsSend_loadUCS2EditDefault()"); |
2428 | 2428 |
2429 memset(editor_data, 0, sizeof(T_EDITOR_DATA)); | 2429 memset(editor_data, 0, sizeof(T_EDITOR_DATA)); |
2430 editor_data->hide = FALSE; | 2430 editor_data->hide = FALSE; |
2431 editor_data->LeftSoftKey = TxtSend; | 2431 editor_data->LeftSoftKey = TxtSend; |
2432 editor_data->AlternateLeftSoftKey = TxtSend; | 2432 editor_data->AlternateLeftSoftKey = TxtSend; |
2433 editor_data->RightSoftKey = TxtSave; | 2433 editor_data->RightSoftKey = TxtSave; |
2434 editor_data->Identifier = SMSSEND_ID_TEXTEDIT; | 2434 editor_data->Identifier = SMSSEND_ID_TEXTEDIT; |
2435 editor_data->mode = ALPHA_MODE; | 2435 editor_data->mode = ALPHA_MODE; |
2445 $Function: SmsSend_standard_dialog_cb | 2445 $Function: SmsSend_standard_dialog_cb |
2446 | 2446 |
2447 $Description: Callback function for standard dialogs in smssend module | 2447 $Description: Callback function for standard dialogs in smssend module |
2448 | 2448 |
2449 $Returns: none | 2449 $Returns: none |
2450 | 2450 |
2451 $Arguments: win - current window | 2451 $Arguments: win - current window |
2452 Identifier - unique id | 2452 Identifier - unique id |
2453 Reason - event id | 2453 Reason - event id |
2454 | 2454 |
2455 *******************************************************************************/ | 2455 *******************************************************************************/ |
2456 | 2456 |
2457 static int SmsSend_standard_dialog_cb(T_MFW_HND win, USHORT Identifier, USHORT Reason) | 2457 static int SmsSend_standard_dialog_cb(T_MFW_HND win, USHORT Identifier, USHORT Reason) |
2458 { | 2458 { |
2459 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; | 2459 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; |
2460 T_SAVE * save_data = NULL; | 2460 T_SAVE * save_data = NULL; |
2461 T_SEND * send_data = NULL; | 2461 T_SEND * send_data = NULL; |
2462 T_MFW_HND * l_parent = NULL; | 2462 T_MFW_HND * l_parent = NULL; |
2463 | 2463 |
2464 TRACE_FUNCTION ("SmsSend_standard_dialog_cb()"); | 2464 TRACE_FUNCTION ("SmsSend_standard_dialog_cb()"); |
2465 | 2465 |
2466 | 2466 |
2467 | 2467 |
2468 switch (Identifier) | 2468 switch (Identifier) |
2469 { | 2469 { |
2470 | 2470 |
2471 case SMSSEND_ID_SAVE_NOT_READY: | 2471 case SMSSEND_ID_SAVE_NOT_READY: |
2472 case SMSSEND_ID_SC_NOT_READY: | 2472 case SMSSEND_ID_SC_NOT_READY: |
2473 // SEND an event to recreate the text editor | 2473 // SEND an event to recreate the text editor |
2474 // or to recreate the destination address number editor | 2474 // or to recreate the destination address number editor |
2475 SEND_EVENT (win, E_RETURN, Identifier, NULL); | 2475 SEND_EVENT (win, E_RETURN, Identifier, NULL); |
2476 break; | 2476 break; |
2477 | 2477 |
2478 case SMSSEND_ID_WAIT_SEND: | 2478 case SMSSEND_ID_WAIT_SEND: |
2479 if (win_data != NULL) | 2479 if (win_data != NULL) |
2480 { | 2480 { |
2481 send_data = (T_SEND *)win_data->user; | 2481 send_data = (T_SEND *)win_data->user; |
2482 // Forever child dialog has been destroyed | 2482 // Forever child dialog has been destroyed |
2493 // Forever child dialog has been destroyed | 2493 // Forever child dialog has been destroyed |
2494 if (save_data != NULL) | 2494 if (save_data != NULL) |
2495 save_data->child_dialog = NULL; | 2495 save_data->child_dialog = NULL; |
2496 } | 2496 } |
2497 break; | 2497 break; |
2498 | 2498 |
2499 // Destroy the window then send the EXIT event to the SEND window->display of the text editor | 2499 // Destroy the window then send the EXIT event to the SEND window->display of the text editor |
2500 case SMSSEND_ID_SENT: | 2500 case SMSSEND_ID_SENT: |
2501 case SMSSEND_ID_NOT_SENT: | 2501 case SMSSEND_ID_NOT_SENT: |
2502 if ((Reason EQ INFO_KCD_RIGHT) || (Reason EQ INFO_KCD_HUP) || (Reason EQ INFO_TIMEOUT)) | 2502 if ((Reason EQ INFO_KCD_RIGHT) || (Reason EQ INFO_KCD_HUP) || (Reason EQ INFO_TIMEOUT)) |
2503 SEND_EVENT(win, E_EXIT, SEND_ID, NULL); | 2503 SEND_EVENT(win, E_EXIT, SEND_ID, NULL); |
2521 // Destroy the window | 2521 // Destroy the window |
2522 SmsSend_SAVE_destroy(win); | 2522 SmsSend_SAVE_destroy(win); |
2523 // This will make SEND frame to recreate the text editor | 2523 // This will make SEND frame to recreate the text editor |
2524 if (l_parent != NULL) | 2524 if (l_parent != NULL) |
2525 SEND_EVENT(l_parent, E_EXIT, SAVE_ID, NULL); | 2525 SEND_EVENT(l_parent, E_EXIT, SAVE_ID, NULL); |
2526 | 2526 |
2527 } | 2527 } |
2528 break; | 2528 break; |
2529 | 2529 |
2530 | 2530 |
2531 default: | 2531 default: |
2537 | 2537 |
2538 /******************************************************************************* | 2538 /******************************************************************************* |
2539 | 2539 |
2540 $Function: SmsSend_convert_to_inter | 2540 $Function: SmsSend_convert_to_inter |
2541 | 2541 |
2542 $Description: Transform a phone number in T_MFW_SMS_ADDR format to a string | 2542 $Description: Transform a phone number in T_MFW_SMS_ADDR format to a string |
2543 with a '+' character if international number | 2543 with a '+' character if international number |
2544 | 2544 |
2545 $Returns: none | 2545 $Returns: none |
2546 | 2546 |
2547 $Arguments: source_number - calling number | 2547 $Arguments: source_number - calling number |
2548 dest_number - called number | 2548 dest_number - called number |
2549 *******************************************************************************/ | 2549 *******************************************************************************/ |
2550 | 2550 |
2551 void SmsSend_convert_to_inter(T_MFW_SMS_ADDR *source_number, // The number to convert | 2551 void SmsSend_convert_to_inter(T_MFW_SMS_ADDR *source_number, // The number to convert |
2572 /******************************************************************************* | 2572 /******************************************************************************* |
2573 | 2573 |
2574 $Function: SmsSend_R_OPTExeCentreEdit | 2574 $Function: SmsSend_R_OPTExeCentreEdit |
2575 | 2575 |
2576 $Description: Create editor for entering the Service center number. | 2576 $Description: Create editor for entering the Service center number. |
2577 | 2577 |
2578 $Returns: none | 2578 $Returns: none |
2579 | 2579 |
2580 $Arguments: m - menu handler | 2580 $Arguments: m - menu handler |
2581 i - menu item selected. | 2581 i - menu item selected. |
2582 *******************************************************************************/ | 2582 *******************************************************************************/ |
2583 | 2583 |
2584 | 2584 |
2585 int SmsSend_R_OPTExeCentreEdit(MfwMnu* m, MfwMnuItem* i) | 2585 int SmsSend_R_OPTExeCentreEdit(MfwMnu* m, MfwMnuItem* i) |
2586 { | 2586 { |
2587 T_MFW_HND parent_win = mfw_parent(mfw_header()); | 2587 T_MFW_HND parent_win = mfw_parent(mfw_header()); |
2588 T_MFW_HND win = SmsSend_SEND_create(parent_win); | 2588 T_MFW_HND win = SmsSend_SEND_create(parent_win); |
2589 SEND_EVENT(win,E_INIT,SMSSEND_ID_NBEDIT,0); | 2589 SEND_EVENT(win,E_INIT,SMSSEND_ID_NBEDIT,0); |
2590 return 1; // ADDED BY RAVI-28-11-2005 | 2590 return 1; // ADDED BY RAVI-28-11-2005 |
2591 } | 2591 } |
2592 /******************************************************************************* | 2592 /******************************************************************************* |
2593 | 2593 |
2594 $Function: SmsSend_SCNBEDIT_edit_cb | 2594 $Function: SmsSend_SCNBEDIT_edit_cb |
2595 | 2595 |
2604 | 2604 |
2605 static void SmsSend_SCNBEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason) | 2605 static void SmsSend_SCNBEDIT_edit_cb (T_MFW_HND win, USHORT Identifier, SHORT reason) |
2606 { | 2606 { |
2607 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; | 2607 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; |
2608 T_SEND * data = (T_SEND *)win_data->user; | 2608 T_SEND * data = (T_SEND *)win_data->user; |
2609 | 2609 |
2610 T_MFW_SMS_INFO sms_parameter; | 2610 T_MFW_SMS_INFO sms_parameter; |
2611 | 2611 |
2612 | 2612 |
2613 TRACE_FUNCTION ("SmsSend_SCNBEDIT_edit_cb()"); | 2613 TRACE_FUNCTION ("SmsSend_SCNBEDIT_edit_cb()"); |
2614 | 2614 |
2615 | 2615 |
2616 switch (reason) | 2616 switch (reason) |
2617 { | 2617 { |
2618 case INFO_KCD_LEFT: | 2618 case INFO_KCD_LEFT: |
2619 TRACE_EVENT("INFO_KCD_LEFT"); | 2619 TRACE_EVENT("INFO_KCD_LEFT"); |
2620 //GW Read config data to get value of dcs | 2620 //GW Read config data to get value of dcs |
2621 SmsSend_get_config_data(&sms_parameter); | 2621 SmsSend_get_config_data(&sms_parameter); |
2622 if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) | 2622 if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) |
2623 { //We have a chinese text message - set dcs parameter to | 2623 { //We have a chinese text message - set dcs parameter to |
2624 sms_parameter.dcs = MFW_DCS_UCS2; | 2624 sms_parameter.dcs = MFW_DCS_UCS2; |
2625 } | 2625 } |
2626 else | 2626 else |
2627 { | 2627 { |
2628 sms_parameter.dcs = MFW_DCS_7bits; | 2628 sms_parameter.dcs = MFW_DCS_7bits; |
2629 } | 2629 } |
2630 //copy the sevice center number into the | 2630 //copy the sevice center number into the |
2631 | 2631 |
2632 strcpy((char*)sms_parameter.sc_addr,(char*)data->edt_data.CentreBuffer); | 2632 strcpy((char*)sms_parameter.sc_addr,(char*)data->edt_data.CentreBuffer); |
2633 // store the Service center number into the SIM. | 2633 // store the Service center number into the SIM. |
2634 SmsSend_set_SrvCntr_number (&sms_parameter); | 2634 SmsSend_set_SrvCntr_number (&sms_parameter); |
2635 SmsSend_set_dcs_number (&sms_parameter); | 2635 SmsSend_set_dcs_number (&sms_parameter); |
2636 | 2636 |
2637 /* SPR#1428 - SH - New Editor changes */ | 2637 /* SPR#1428 - SH - New Editor changes */ |
2638 #ifdef NEW_EDITOR | 2638 #ifdef NEW_EDITOR |
2639 AUI_edit_Destroy(data->number_editor); | 2639 AUI_edit_Destroy(data->number_editor); |
2640 #else /* NEW_EDITOR */ | 2640 #else /* NEW_EDITOR */ |
2641 editor_destroy(data->number_editor); | 2641 editor_destroy(data->number_editor); |
2642 #endif /* NEW_EDITOR */ | 2642 #endif /* NEW_EDITOR */ |
2643 | 2643 |
2644 SmsSend_SEND_destroy(win); | 2644 SmsSend_SEND_destroy(win); |
2645 data->number_editor = 0; | 2645 data->number_editor = 0; |
2646 | 2646 |
2647 break; | 2647 break; |
2648 | 2648 |
2649 case INFO_KCD_ALTERNATELEFT: | 2649 case INFO_KCD_ALTERNATELEFT: |
2650 TRACE_EVENT("INFO_KCD_ALTERNATELEFT"); | 2650 TRACE_EVENT("INFO_KCD_ALTERNATELEFT"); |
2651 | 2651 |
2652 bookPhonebookStart(win, PhbkFromSmsSC); /* SH - changed from PhbFromSms */ | 2652 bookPhonebookStart(win, PhbkFromSmsSC); /* SH - changed from PhbFromSms */ |
2653 break; | 2653 break; |
2661 editor_destroy(data->number_editor); | 2661 editor_destroy(data->number_editor); |
2662 #endif /* NEW_EDITOR */ | 2662 #endif /* NEW_EDITOR */ |
2663 | 2663 |
2664 SmsSend_SEND_destroy(win); | 2664 SmsSend_SEND_destroy(win); |
2665 data->number_editor = 0; | 2665 data->number_editor = 0; |
2666 | 2666 |
2667 break; | 2667 break; |
2668 | 2668 |
2669 default: | 2669 default: |
2670 TRACE_EVENT("Err: Default"); | 2670 TRACE_EVENT("Err: Default"); |
2671 break; | 2671 break; |
2672 } | 2672 } |
2673 } | 2673 } |
2674 | 2674 |
2675 // Feb 02, 2005 REF: CRR 28479 xnkulkar | 2675 // Feb 02, 2005 REF: CRR 28479 xnkulkar |
2676 // Bug: While saving a SMS, if the user presses LSK while the 'Saved' dialog is displayed, the 'Saved' | 2676 // Bug: While saving a SMS, if the user presses LSK while the 'Saved' dialog is displayed, the 'Saved' |
2677 // dialog doesn't get dismissed. | 2677 // dialog doesn't get dismissed. |
2678 // Solution: New function "mmi_dialog_information_screen_save_sms" which has only | 2678 // Solution: New function "mmi_dialog_information_screen_save_sms" which has only |
2679 // KEY_RIGHT and KEY_HUP registered instead of KEY_ALL | 2679 // KEY_RIGHT and KEY_HUP registered instead of KEY_ALL |
2680 /******************************************************************************* | 2680 /******************************************************************************* |
2681 | 2681 |
2682 $Function: mmi_dialog_information_screen_save_sms | 2682 $Function: mmi_dialog_information_screen_save_sms |
2683 | 2683 |
2684 $Description: Function to display SMS "Saved" info screen | 2684 $Description: Function to display SMS "Saved" info screen |
2685 | 2685 |
2686 $Returns: info_dialog | 2686 $Returns: info_dialog |
2687 | 2687 |
2688 $Arguments: | 2688 $Arguments: |
2689 | 2689 |
2690 *******************************************************************************/ | 2690 *******************************************************************************/ |
2691 T_MFW_HND mmi_dialog_information_screen_save_sms(T_MFW_HND parent_win, int TxtId, char* text, T_VOID_FUNC call_back, USHORT identifier) | 2691 T_MFW_HND mmi_dialog_information_screen_save_sms(T_MFW_HND parent_win, int TxtId, char* text, T_VOID_FUNC call_back, USHORT identifier) |
2692 { | 2692 { |
2693 T_DISPLAY_DATA display_info; | 2693 T_DISPLAY_DATA display_info; |
2694 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtId, TxtNull, COLOUR_STATUS); | 2694 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtId, TxtNull, COLOUR_STATUS); |
2695 dlg_initDisplayData_events( &display_info, call_back, THREE_SECS, KEY_RIGHT | KEY_HUP ); | 2695 dlg_initDisplayData_events( &display_info, call_back, THREE_SECS, KEY_RIGHT | KEY_HUP ); |
2696 display_info.TextString2 = text; | 2696 display_info.TextString2 = text; |
2697 display_info.Identifier = identifier; | 2697 display_info.Identifier = identifier; |
2698 return info_dialog(parent_win,&display_info); //information screen | 2698 return info_dialog(parent_win,&display_info); //information screen |
2699 | 2699 |
2700 } | 2700 } |
2701 | 2701 |
2702 #undef MMI_SMSSEND_C | 2702 #undef MMI_SMSSEND_C |