FreeCalypso > hg > fc-tourmaline
comparison src/ui/bmi/mmiStart.c @ 178:053ff6a94961
mmiStart.c: formatting fixes and dead code elimination
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 19 Jan 2021 04:05:57 +0000 |
parents | c0052fe355d3 |
children |
comparison
equal
deleted
inserted
replaced
177:2cd1c1abdbb5 | 178:053ff6a94961 |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 | 2 |
3 CONDAT (UK) | 3 CONDAT (UK) |
4 | 4 |
5 ******************************************************************************** | 5 ******************************************************************************** |
6 | 6 |
7 This software product is the property of Condat (UK) Ltd and may not be | 7 This software product is the property of Condat (UK) Ltd and may not be |
8 disclosed to any third party without the express permission of the owner. | 8 disclosed to any third party without the express permission of the owner. |
9 | 9 |
10 ******************************************************************************** | 10 ******************************************************************************** |
11 | 11 |
12 $Project name: Basic MMI | 12 $Project name: Basic MMI |
13 $Project code: BMI (6349) | 13 $Project code: BMI (6349) |
14 $Module: Start | 14 $Module: Start |
15 $File: MmiStart.c | 15 $File: MmiStart.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 |
44 Solution: Voice Memo feature is put under the flag #ifndef FF_NO_VOICE_MEMO to compile | 44 Solution: Voice Memo feature is put under the flag #ifndef FF_NO_VOICE_MEMO to compile |
45 out voice memo feature if the above flag is enabled. | 45 out voice memo feature if the above flag is enabled. |
46 | 46 |
47 Oct 11, 2005 REF: LOCOSTO-SPR-34629 - xpradipg | 47 Oct 11, 2005 REF: LOCOSTO-SPR-34629 - xpradipg |
48 Description: Temporary removal of animation logo and replacing with | 48 Description: Temporary removal of animation logo and replacing with |
49 static image | 49 static image |
50 Solution: The Animation at bootup is removed and replaced with a static | 50 Solution: The Animation at bootup is removed and replaced with a static |
51 image also the display of logo is done before initiating the | 51 image also the display of logo is done before initiating the |
52 AT_CMD_CFUN full functionality | 52 AT_CMD_CFUN full functionality |
53 | 53 |
54 Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) | 54 Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) |
55 Solution: The CF state is maintained in flash. During bootup the CF icon in the idle screen | 55 Solution: The CF state is maintained in flash. During bootup the CF icon in the idle screen |
56 is displayed depending upon its state in the ffs | 56 is displayed depending upon its state in the ffs |
57 | 57 |
58 25/10/00 Original Condat(UK) BMI version. | 58 25/10/00 Original Condat(UK) BMI version. |
59 | 59 |
60 Dec 23, 2005 REF: SR13873 - x0020906 | 60 Dec 23, 2005 REF: SR13873 - x0020906 |
61 Description : Store the FFS value into current sound structure | 61 Description : Store the FFS value into current sound structure |
62 Fix : Call setDefaultSound () to assign FFS value into current sound structure. | 62 Fix : Call setDefaultSound () to assign FFS value into current sound structure. |
63 | 63 |
64 $End | 64 $End |
65 | 65 |
66 *******************************************************************************/ | 66 *******************************************************************************/ |
67 | |
68 | |
69 | 67 |
70 | 68 |
71 /******************************************************************************* | 69 /******************************************************************************* |
72 | 70 |
73 Include files | 71 Include files |
253 | 251 |
254 Private methods | 252 Private methods |
255 | 253 |
256 *******************************************************************************/ | 254 *******************************************************************************/ |
257 | 255 |
258 #if(0) /* x0039928 - Lint warning fix */ | |
259 /******************************************************************************* | |
260 | |
261 $Function: winEvent | |
262 | |
263 $Description: Window event handler, handles window visible events and | |
264 ignores all others | |
265 | |
266 $Returns: MFW_EVENT_CONSUMED or MFW_EVENT_PASSED | |
267 | |
268 $Arguments: e, event to be handles, w, window handle | |
269 | |
270 *******************************************************************************/ | |
271 | |
272 static int winEvent( MfwEvt e, MfwWin *w ) | |
273 { | |
274 TRACE_FUNCTION("WinEvent(Start)"); | |
275 switch( e ) | |
276 { | |
277 case MfwWinVisible: | |
278 { | |
279 if (w->flags & MfwWinVisible) | |
280 show(); | |
281 } | |
282 break; | |
283 | |
284 default: | |
285 { | |
286 return MFW_EVENT_PASSED; | |
287 } | |
288 } | |
289 | |
290 return MFW_EVENT_CONSUMED; | |
291 } | |
292 | |
293 | |
294 /******************************************************************************* | |
295 | |
296 $Function: winanimEvent | |
297 | |
298 $Description: Handle events during the window animation | |
299 | |
300 $Returns: None. | |
301 | |
302 $Arguments: None. | |
303 | |
304 *******************************************************************************/ | |
305 | |
306 static int winanimEvent( MfwEvt e, MfwWin *w ) | |
307 { | |
308 | |
309 TRACE_FUNCTION("winanimEvent"); | |
310 | |
311 switch( e ) | |
312 { | |
313 case MfwWinVisible: | |
314 dspl_ClearAll(); | |
315 | |
316 break; | |
317 default: | |
318 { | |
319 return MFW_EVENT_PASSED; | |
320 } | |
321 } | |
322 | |
323 return MFW_EVENT_CONSUMED; | |
324 } | |
325 | |
326 #endif | |
327 | |
328 /******************************************************************************* | 256 /******************************************************************************* |
329 | 257 |
330 $Function: startregis | 258 $Function: startregis |
331 | 259 |
332 $Description: All we need to do here is start the SIM | 260 $Description: All we need to do here is start the SIM |
333 | 261 |
334 $Returns: None. | 262 $Returns: None. |
335 | 263 |
336 $Arguments: None. | 264 $Arguments: None. |
337 | 265 |
338 *******************************************************************************/ | 266 *******************************************************************************/ |
339 | 267 |
344 // the static image is displayed just before intiating the full functionality | 272 // the static image is displayed just before intiating the full functionality |
345 #ifdef TI_PS_UICC_CHIPSET_15 | 273 #ifdef TI_PS_UICC_CHIPSET_15 |
346 dspl_BitBlt2(WELCOME_ANI_POS_X, WELCOME_ANI_POS_Y,176,60,(char *)&TIlogColour[0],0,ICON_TYPE_256_COL); | 274 dspl_BitBlt2(WELCOME_ANI_POS_X, WELCOME_ANI_POS_Y,176,60,(char *)&TIlogColour[0],0,ICON_TYPE_256_COL); |
347 #endif | 275 #endif |
348 sim_activate(); | 276 sim_activate(); |
349 | |
350 | |
351 | |
352 } | 277 } |
353 | 278 |
354 /******************************************************************************* | 279 /******************************************************************************* |
355 | 280 |
356 Public methods | 281 Public methods |
361 | 286 |
362 $Function: startInit | 287 $Function: startInit |
363 | 288 |
364 $Description: Initialises the MMI startup functions | 289 $Description: Initialises the MMI startup functions |
365 | 290 |
366 $Returns: None. | 291 $Returns: None. |
367 | 292 |
368 $Arguments: None. | 293 $Arguments: None. |
369 | 294 |
370 *******************************************************************************/ | 295 *******************************************************************************/ |
371 | 296 |
372 void startInit( void ) | 297 void startInit( void ) |
373 { | 298 { |
374 | |
375 #ifdef FF_MMI_MMS | 299 #ifdef FF_MMI_MMS |
376 /* TISHMMS Project */ | 300 /* TISHMMS Project */ |
377 extern void mms_wap_data_init(void); | 301 extern void mms_wap_data_init(void); |
378 extern void mms_mms_data_init(void); | 302 extern void mms_mms_data_init(void); |
379 #endif | 303 #endif |
382 | 306 |
383 /* Assume the welcome status is welcome | 307 /* Assume the welcome status is welcome |
384 */ | 308 */ |
385 /* welcome_status = WELCOME; x0039928 - Lint warning fix */ | 309 /* welcome_status = WELCOME; x0039928 - Lint warning fix */ |
386 | 310 |
387 animation_complete = FALSE; | 311 animation_complete = FALSE; |
388 | 312 |
389 /* unset the flag for ready state at the beginning*/ | 313 /* unset the flag for ready state at the beginning*/ |
390 smsidle_unset_ready_state(); | 314 smsidle_unset_ready_state(); |
391 | 315 |
392 /* setup signalling and AUTOFOCUS | 316 /* setup signalling and AUTOFOCUS |
393 */ | 317 */ |
394 mfwSetSignallingMethod( 1 ); | 318 mfwSetSignallingMethod( 1 ); |
395 winAutoFocus( TRUE ); | 319 winAutoFocus( TRUE ); |
396 | 320 |
397 /* API/GW - Set Colour of displays */ | 321 /* API/GW - Set Colour of displays */ |
398 colour_initial_colours(); | 322 colour_initial_colours(); |
399 | 323 |
400 /* GW-SPR#1035-Added SAT changes by Nebi (changed initialisation order). */ | 324 /* GW-SPR#1035-Added SAT changes by Nebi (changed initialisation order). */ |
401 /* initialise network services */ | 325 /* initialise network services */ |
402 simToolkitInit( 0 ); | 326 simToolkitInit( 0 ); |
403 bookInitialise( 0 ); | 327 bookInitialise( 0 ); |
404 callInit( 0 ); | 328 callInit( 0 ); |
405 iconsInit(); | 329 iconsInit(); |
406 | 330 |
407 #ifdef BTE_MOBILE | 331 #ifdef BTE_MOBILE |
408 mmi_bt_init(); | 332 mmi_bt_init(); |
409 #endif | 333 #endif |
410 | 334 |
411 /* Handlers created on windows */ | 335 /* Handlers created on windows */ |
412 pin_init( 0 ); | 336 pin_init( 0 ); |
413 networkInit( 0 ); | 337 networkInit( 0 ); |
414 smsidle_start(0, NULL); | 338 smsidle_start(0, NULL); |
415 servicesInit( 0 ); | 339 servicesInit( 0 ); |
416 | 340 |
417 idleInit( 0 ); | 341 idleInit( 0 ); |
418 | 342 |
419 #ifndef FF_NO_VOICE_MEMO | 343 #ifndef FF_NO_VOICE_MEMO |
420 voice_memo_init (); | 344 voice_memo_init (); |
421 #endif | 345 #endif |
422 | 346 |
423 voice_mail_init (); | 347 voice_mail_init (); |
424 sms_cb_init (); | 348 sms_cb_init (); |
425 | 349 |
426 mmi_cphs_init(); | 350 mmi_cphs_init(); |
427 | 351 |
428 /* SPR#2346 - SH - GPRS */ | 352 /* SPR#2346 - SH - GPRS */ |
429 #ifdef MMI_GPRS_ENABLED | 353 #ifdef MMI_GPRS_ENABLED |
430 GPRS_Init(); | 354 GPRS_Init(); |
431 #endif /* GPRS */ | 355 #endif /* GPRS */ |
432 | 356 |
433 #ifndef NEPTUNE_BOARD | 357 #ifndef NEPTUNE_BOARD |
434 #ifdef FF_EM_MODE | 358 #ifdef FF_EM_MODE |
435 mmi_em_init();/*MC SPR1209 engineering mode*/ | 359 mmi_em_init();/*MC SPR1209 engineering mode*/ |
436 #endif | 360 #endif |
437 | 361 |
438 /* SPR#2086 - SH - Startup WAP */ | 362 /* SPR#2086 - SH - Startup WAP */ |
439 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) | 363 #if defined (FF_WAP) && defined (FF_GPF_TCPIP) |
440 AUI_wap_init(); | 364 AUI_wap_init(); |
498 /******************************************************************************* | 422 /******************************************************************************* |
499 | 423 |
500 $Function: startExit | 424 $Function: startExit |
501 | 425 |
502 $Description: Stops the MMI start windows, basically reverses the effect | 426 $Description: Stops the MMI start windows, basically reverses the effect |
503 of the startInit above | 427 of the startInit above |
504 | 428 |
505 $Returns: None. | 429 $Returns: None. |
506 | 430 |
507 $Arguments: None. | 431 $Arguments: None. |
508 | 432 |
509 *******************************************************************************/ | 433 *******************************************************************************/ |
510 | 434 |
511 void startExit( void ) | 435 void startExit( void ) |
512 { | 436 { |
513 /* remove keyboard handlers | 437 /* remove keyboard handlers |
514 */ | 438 */ |
515 kbdDelete(kbd); | 439 kbdDelete(kbd); |
516 kbd = 0; | 440 kbd = 0; |
517 | 441 |
518 /* SPR#2346 - SH - GPRS */ | 442 /* SPR#2346 - SH - GPRS */ |
519 #ifdef MMI_GPRS_ENABLED | 443 #ifdef MMI_GPRS_ENABLED |
520 GPRS_Exit(); | 444 GPRS_Exit(); |
521 #endif /* GPRS */ | 445 #endif /* GPRS */ |
522 | 446 |
523 | 447 |
524 /* shut down the sim toolkit | 448 /* shut down the sim toolkit |
525 */ | 449 */ |
526 simToolkitExit(); | 450 simToolkitExit(); |
527 | 451 |
528 /* close the phonebook, calls, idle, services, icons, sounds | 452 /* close the phonebook, calls, idle, services, icons, sounds |
529 and network handlers | 453 and network handlers |
530 */ | 454 */ |
531 bookExit(); | 455 bookExit(); |
532 | 456 |
533 #ifdef BTE_MOBILE | 457 #ifdef BTE_MOBILE |
534 mmi_bt_exit(); | 458 mmi_bt_exit(); |
535 #endif | 459 #endif |
536 | 460 |
537 callExit(); | 461 callExit(); |
538 idleExit(); | 462 idleExit(); |
539 smsidle_destroy (); | 463 smsidle_destroy (); |
540 iconsExit(); | 464 iconsExit(); |
541 cphs_exit(); //MC | 465 cphs_exit(); //MC |
542 #ifdef NEPTUNE_BOARD | 466 #ifdef NEPTUNE_BOARD |
543 #ifdef TI_PS_FF_EM | 467 #ifdef TI_PS_FF_EM |
544 mmi_em_exit();/*MC, SPR1209 engineering mode */ | 468 mmi_em_exit();/*MC, SPR1209 engineering mode */ |
554 | 478 |
555 $Function: startExec | 479 $Function: startExec |
556 | 480 |
557 $Description: start window execute method | 481 $Description: start window execute method |
558 | 482 |
559 $Returns: None. | 483 $Returns: None. |
560 | 484 |
561 $Arguments: reason, for invoking the execute method, | 485 $Arguments: reason, for invoking the execute method, |
562 next, not used passed for compatibility | 486 next, not used passed for compatibility |
563 | 487 |
564 *******************************************************************************/ | 488 *******************************************************************************/ |
565 | 489 |
566 void startExec( int reason, MmiState next ) | 490 void startExec( int reason, MmiState next ) |
567 { | 491 { |
613 | 537 |
614 $Function: startWhoIsFocused | 538 $Function: startWhoIsFocused |
615 | 539 |
616 $Description: provides handle of currently focussed window | 540 $Description: provides handle of currently focussed window |
617 | 541 |
618 $Returns: mfwFocus | 542 $Returns: mfwFocus |
619 | 543 |
620 $Arguments: None. | 544 $Arguments: None. |
621 | 545 |
622 *******************************************************************************/ | 546 *******************************************************************************/ |
623 | 547 |
628 | 552 |
629 /******************************************************************************* | 553 /******************************************************************************* |
630 | 554 |
631 $Function: showwelcome | 555 $Function: showwelcome |
632 | 556 |
633 $Description: shows a welcome Message when swiching on the mobile | 557 $Description: shows a welcome Message when swiching on the mobile |
634 | 558 |
635 $Returns: none | 559 $Returns: none |
636 | 560 |
637 $Arguments: | 561 $Arguments: |
638 | 562 |
639 *******************************************************************************/ | 563 *******************************************************************************/ |
640 | 564 |
641 void showwelcome (T_MFW_HND win) /* SH - not static, as now externally called */ | 565 void showwelcome (T_MFW_HND win) /* SH - not static, as now externally called */ |
642 { | 566 { |
643 | 567 TRACE_FUNCTION("showwelcome ()"); |
644 TRACE_FUNCTION("showwelcome ()"); | |
645 | |
646 | 568 |
647 idle_set_starting_up(FALSE); /*SPR#1662-NH Starting is finished for Idle */ | 569 idle_set_starting_up(FALSE); /*SPR#1662-NH Starting is finished for Idle */ |
648 // Oct 11, 2005 REF: LOCOSTO-SPR-34629 - xpradipg | 570 // Oct 11, 2005 REF: LOCOSTO-SPR-34629 - xpradipg |
649 // Since the static image is displayed at bootup and it is preponed, this | 571 // Since the static image is displayed at bootup and it is preponed, this |
650 // function will be called after the sim insert indication is recieved hence | 572 // function will be called after the sim insert indication is recieved hence |
674 | 596 |
675 /******************************************************************************* | 597 /******************************************************************************* |
676 | 598 |
677 $Function: show_welcome_cb | 599 $Function: show_welcome_cb |
678 | 600 |
679 $Description: shows a welcome Message when swiching on the mobile | 601 $Description: shows a welcome Message when swiching on the mobile |
680 | 602 |
681 $Returns: none | 603 $Returns: none |
682 | 604 |
683 $Arguments: | 605 $Arguments: |
684 | 606 |
685 *******************************************************************************/ | 607 *******************************************************************************/ |
686 | 608 |
780 KEY_6, | 702 KEY_6, |
781 KEY_7, | 703 KEY_7, |
782 KEY_8, | 704 KEY_8, |
783 KEY_9, | 705 KEY_9, |
784 KEY_STAR, | 706 KEY_STAR, |
785 | |
786 }; | 707 }; |
787 | 708 |
788 void mfw_keyMap(int mfw_key, int hw_key) | 709 void mfw_keyMap(int mfw_key, int hw_key) |
789 { | 710 { |
790 if ((hw_key >0) && (hw_key<MAX_KEY)) | 711 if ((hw_key >0) && (hw_key<MAX_KEY)) |
816 | 737 |
817 mfw_keyMap(KEY_MNUUP, KPD_KEY_UP); | 738 mfw_keyMap(KEY_MNUUP, KPD_KEY_UP); |
818 mfw_keyMap(KEY_MNUDOWN, KPD_KEY_DOWN); | 739 mfw_keyMap(KEY_MNUDOWN, KPD_KEY_DOWN); |
819 mfw_keyMap(KEY_MNULEFT, KPD_KEY_LEFT); | 740 mfw_keyMap(KEY_MNULEFT, KPD_KEY_LEFT); |
820 mfw_keyMap(KEY_MNURIGHT, KPD_KEY_RIGHT); | 741 mfw_keyMap(KEY_MNURIGHT, KPD_KEY_RIGHT); |
821 | |
822 | |
823 } | 742 } |
824 | 743 |
825 #endif | 744 #endif |
826 | 745 |
827 /******************************************************************************* | 746 /******************************************************************************* |