FreeCalypso > hg > fc-tourmaline
comparison src/ui/bmi/mmiSatClassE.c @ 163:d6bc1298a377
mmiSatClassE.c: bogotab fixes
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 18 Nov 2020 22:26:23 +0000 |
parents | c0052fe355d3 |
children |
comparison
equal
deleted
inserted
replaced
162:0b97ee8bf778 | 163:d6bc1298a377 |
---|---|
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: MMI | 14 $Module: MMI |
15 $File: MmiSatClassE.c | 15 $File: MmiSatClassE.c |
16 $Revision: 1.0 | 16 $Revision: 1.0 |
17 | 17 |
18 $Author: Condat(UK) | 18 $Author: Condat(UK) |
19 $Date: 13/03/03 | 19 $Date: 13/03/03 |
20 | 20 |
21 ******************************************************************************** | 21 ******************************************************************************** |
22 | 22 |
23 Description: Contains the implementation of SAT Class E | 23 Description: Contains the implementation of SAT Class E |
24 | |
25 | 24 |
26 | 25 |
27 ******************************************************************************** | 26 ******************************************************************************** |
28 | 27 |
29 $History: MmiSatClassE.c | 28 $History: MmiSatClassE.c |
187 /* | 186 /* |
188 * Create window handler | 187 * Create window handler |
189 */ | 188 */ |
190 data->mmi_control.dialog = (T_DIALOG_FUNC)sat_class_e_exec; | 189 data->mmi_control.dialog = (T_DIALOG_FUNC)sat_class_e_exec; |
191 data->mmi_control.data = data; | 190 data->mmi_control.data = data; |
192 data->parent_win = parent_window; | 191 data->parent_win = parent_window; |
193 win = ((T_MFW_HDR *)data->win)->data; | 192 win = ((T_MFW_HDR *)data->win)->data; |
194 win->user = (MfwUserDataPtr)data; | 193 win->user = (MfwUserDataPtr)data; |
195 | 194 |
196 /* | 195 /* |
197 * return window handle | 196 * return window handle |
198 */ | 197 */ |
199 winShow(data->win); | 198 winShow(data->win); |
203 /******************************************************************************* | 202 /******************************************************************************* |
204 | 203 |
205 $Function: sat_open_channel_cb | 204 $Function: sat_open_channel_cb |
206 | 205 |
207 $Description: Callback for accept/reject dialog. | 206 $Description: Callback for accept/reject dialog. |
208 $Returns: None. | 207 $Returns: None. |
209 | 208 |
210 $Arguments: win: current window | 209 $Arguments: win: current window |
211 identifier: unique id | 210 identifier: unique id |
212 reason: event id | 211 reason: event id |
213 | 212 |
214 *******************************************************************************/ | 213 *******************************************************************************/ |
215 static void sat_open_channel_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason) | 214 static void sat_open_channel_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason) |
216 { | 215 { |
217 TRACE_FUNCTION("sat_open_channel_cb()"); | 216 TRACE_FUNCTION("sat_open_channel_cb()"); |
246 | 245 |
247 $Description: Close the alert dialog | 246 $Description: Close the alert dialog |
248 | 247 |
249 $Returns: None. | 248 $Returns: None. |
250 | 249 |
251 $Arguments: alert_dialog: window handle. | 250 $Arguments: alert_dialog: window handle. |
252 | 251 |
253 *******************************************************************************/ | 252 *******************************************************************************/ |
254 static void sat_class_e_dialog_destroy(T_MFW_HND win) | 253 static void sat_class_e_dialog_destroy(T_MFW_HND win) |
255 { | 254 { |
256 | |
257 T_MFW_WIN * win_data; | 255 T_MFW_WIN * win_data; |
258 T_sat_open_channel * data; | 256 T_sat_open_channel * data; |
259 | 257 |
260 TRACE_FUNCTION ("sat_class_e_dialog_destroy()"); | 258 TRACE_FUNCTION ("sat_class_e_dialog_destroy()"); |
261 | 259 |
295 /******************************************************************************* | 293 /******************************************************************************* |
296 | 294 |
297 $Function: sat_class_e_cb | 295 $Function: sat_class_e_cb |
298 | 296 |
299 $Description: Callback for Sat Class E dialogs. | 297 $Description: Callback for Sat Class E dialogs. |
300 $Returns: None. | 298 $Returns: None. |
301 | 299 |
302 $Arguments: win: current window | 300 $Arguments: win: current window |
303 identifier: unique id | 301 identifier: unique id |
304 reason: event id | 302 reason: event id |
305 | 303 |
306 *******************************************************************************/ | 304 *******************************************************************************/ |
307 static void sat_class_e_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason) | 305 static void sat_class_e_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason) |
308 { | 306 { |
309 TRACE_FUNCTION("sat_class_e_cb()"); | 307 TRACE_FUNCTION("sat_class_e_cb()"); |
316 switch (reason) | 314 switch (reason) |
317 { | 315 { |
318 case INFO_KCD_LEFT: | 316 case INFO_KCD_LEFT: |
319 case INFO_KCD_RIGHT: | 317 case INFO_KCD_RIGHT: |
320 case INFO_TIMEOUT: | 318 case INFO_TIMEOUT: |
321 | |
322 /* Destroy the dialog */ | 319 /* Destroy the dialog */ |
323 sat_class_e_dialog_destroy(win); | 320 sat_class_e_dialog_destroy(win); |
324 break; | 321 break; |
322 | |
325 default: | 323 default: |
326 break; | 324 break; |
327 } | 325 } |
328 } | 326 } |
329 | 327 |
330 /******************************************************************************* | 328 /******************************************************************************* |
331 | 329 |
332 $Function: sat_class_e_exec | 330 $Function: sat_class_e_exec |
333 | 331 |
334 $Description: Dialog function for Sat Class E window. | 332 $Description: Dialog function for Sat Class E window. |
335 | 333 |
336 $Returns: none | 334 $Returns: none |
337 | 335 |
338 $Arguments: win - current window | 336 $Arguments: win - current window |
339 event - window event | 337 event - window event |
340 value - unique id | 338 value - unique id |
341 call_setup_parameter - call setup info | 339 call_setup_parameter - call setup info |
342 | 340 |
343 SPR#2321 - DS - Corrected misleading comments. | 341 SPR#2321 - DS - Corrected misleading comments. |
344 | 342 |
345 *******************************************************************************/ | 343 *******************************************************************************/ |
346 void sat_class_e_exec (T_MFW_HND win, USHORT event, SHORT value, T_SAT_CMD * sat_command) | 344 void sat_class_e_exec (T_MFW_HND win, USHORT event, SHORT value, T_SAT_CMD * sat_command) |
347 { | 345 { |
348 | |
349 T_MFW_WIN * win_data; | 346 T_MFW_WIN * win_data; |
350 T_sat_open_channel * data; | 347 T_sat_open_channel * data; |
351 char* text_string; | 348 char* text_string; |
352 | 349 |
353 T_DISPLAY_DATA display_info; | 350 T_DISPLAY_DATA display_info; |
387 | 384 |
388 /* Extract the data from the Open Channel sat command */ | 385 /* Extract the data from the Open Channel sat command */ |
389 if (sat_command != NULL) | 386 if (sat_command != NULL) |
390 { | 387 { |
391 | 388 |
392 TRACE_EVENT_P2("dcs: %x, len: %d", sat_command->c.open.alpha_id.code, sat_command->c.open.alpha_id.len); | 389 TRACE_EVENT_P2("dcs: %x, len: %d", sat_command->c.open.alpha_id.code, sat_command->c.open.alpha_id.len); |
393 | 390 |
394 /* Alpha identifier */ | 391 /* Alpha identifier */ |
395 | 392 |
396 /* Check alpha identifier has valid length */ | 393 /* Check alpha identifier has valid length */ |
397 if ( (sat_command->c.open.alpha_id.len > 0) && | 394 if ( (sat_command->c.open.alpha_id.len > 0) && |
403 else | 400 else |
404 { | 401 { |
405 data->alpha_id = NULL; | 402 data->alpha_id = NULL; |
406 } | 403 } |
407 } | 404 } |
408 else | 405 else |
409 { | 406 { |
410 TRACE_ERROR("ERROR: NULL sat_command!"); | 407 TRACE_ERROR("ERROR: NULL sat_command!"); |
411 } | 408 } |
412 | 409 |
413 if (data->alpha_id) | 410 if (data->alpha_id) |
414 { | 411 { |
415 text_string = data->alpha_id; | 412 text_string = data->alpha_id; |
416 #ifdef NO_ASCIIZ/*MC SPR 940/2 Add tag to Unicode strings so info dialog displays them correctly*/ | 413 #ifdef NO_ASCIIZ/*MC SPR 940/2 Add tag to Unicode strings so info dialog displays them correctly*/ |
417 sat_add_unicode_tag_if_needed(text_string); | 414 sat_add_unicode_tag_if_needed(text_string); |
418 #endif | 415 #endif |
419 } | 416 } |
420 else | 417 else |
421 { | 418 { |
422 text_string = "Open Channel"; //Need to implement for Chinese | 419 text_string = "Open Channel"; //Need to implement for Chinese |
423 } | 420 } |
424 | |
425 | 421 |
426 dlg_initDisplayData_TextStr( &display_info, TxtAccept, TxtReject, text_string, NULL, COLOUR_STATUS); | 422 dlg_initDisplayData_TextStr( &display_info, TxtAccept, TxtReject, text_string, NULL, COLOUR_STATUS); |
427 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)sat_open_channel_cb, FOREVER, KEY_LEFT|KEY_RIGHT ); | 423 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)sat_open_channel_cb, FOREVER, KEY_LEFT|KEY_RIGHT ); |
428 | 424 |
429 display_info.Identifier = event; | 425 display_info.Identifier = event; |
430 | 426 |
431 /* | 427 /* |
432 * Call Info Screen | 428 * Call Info Screen |
433 */ | 429 */ |
434 info_dialog (win, &display_info); | 430 info_dialog (win, &display_info); |
435 | 431 |
436 break; | 432 break; |
437 | 433 |
438 case SAT_CLOSE_CHANNEL: | 434 case SAT_CLOSE_CHANNEL: |
464 | 460 |
465 if (data->alpha_id) | 461 if (data->alpha_id) |
466 { | 462 { |
467 text_string = data->alpha_id; | 463 text_string = data->alpha_id; |
468 #ifdef NO_ASCIIZ/*MC SPR 940/2 Add tag to Unicode strings so info dialog displays them correctly*/ | 464 #ifdef NO_ASCIIZ/*MC SPR 940/2 Add tag to Unicode strings so info dialog displays them correctly*/ |
469 sat_add_unicode_tag_if_needed(text_string); | 465 sat_add_unicode_tag_if_needed(text_string); |
470 #endif | 466 #endif |
471 } | 467 } |
472 else | 468 else |
473 { | 469 { |
474 text_string = "Closing Channel"; //Need to implement for Chinese | 470 text_string = "Closing Channel"; //Need to implement for Chinese |
475 } | 471 } |
476 | |
477 | 472 |
478 dlg_initDisplayData_TextStr( &display_info, TxtNull, TxtNull, text_string, NULL, COLOUR_STATUS); | 473 dlg_initDisplayData_TextStr( &display_info, TxtNull, TxtNull, text_string, NULL, COLOUR_STATUS); |
479 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)sat_class_e_cb, THREE_SECS, KEY_LEFT|KEY_RIGHT ); | 474 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)sat_class_e_cb, THREE_SECS, KEY_LEFT|KEY_RIGHT ); |
480 | 475 |
481 display_info.Identifier = event; | 476 display_info.Identifier = event; |
482 | 477 |
483 /* | 478 /* |
484 * Call Info Screen | 479 * Call Info Screen |
485 */ | 480 */ |
486 info_dialog (win, &display_info); | 481 info_dialog (win, &display_info); |
487 | 482 |
488 break; | 483 break; |
489 | 484 |
490 case SAT_SEND_DATA: | 485 case SAT_SEND_DATA: |
491 | 486 |
492 TRACE_EVENT("SAT_SEND_DATA"); | 487 TRACE_EVENT("SAT_SEND_DATA"); |
493 | 488 |
494 /* Start an info screen to inform the user that the SIM is sending data */ | 489 /* Start an info screen to inform the user that the SIM is sending data */ |
495 data->sat_command = sat_command; | 490 data->sat_command = sat_command; |
496 | 491 |
497 /* Extract the data from the Send Data sat command */ | 492 /* Extract the data from the Send Data sat command */ |
516 | 511 |
517 if (data->alpha_id) | 512 if (data->alpha_id) |
518 { | 513 { |
519 text_string = data->alpha_id; | 514 text_string = data->alpha_id; |
520 #ifdef NO_ASCIIZ/*MC SPR 940/2 Add tag to Unicode strings so info dialog displays them correctly*/ | 515 #ifdef NO_ASCIIZ/*MC SPR 940/2 Add tag to Unicode strings so info dialog displays them correctly*/ |
521 sat_add_unicode_tag_if_needed(text_string); | 516 sat_add_unicode_tag_if_needed(text_string); |
522 #endif | 517 #endif |
523 } | 518 } |
524 else | 519 else |
525 { | 520 { |
526 text_string = "Sending Data"; //Need to implement for Chinese | 521 text_string = "Sending Data"; //Need to implement for Chinese |
530 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)sat_class_e_cb, THREE_SECS, KEY_LEFT|KEY_RIGHT ); | 525 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)sat_class_e_cb, THREE_SECS, KEY_LEFT|KEY_RIGHT ); |
531 | 526 |
532 display_info.Identifier = event; | 527 display_info.Identifier = event; |
533 | 528 |
534 /* | 529 /* |
535 * Call Info Screen | 530 * Call Info Screen |
536 */ | 531 */ |
537 info_dialog (win, &display_info); | 532 info_dialog (win, &display_info); |
538 | 533 |
539 break; | 534 break; |
540 | 535 |
541 case SAT_RECEIVE_DATA: | 536 case SAT_RECEIVE_DATA: |
542 | 537 |
543 TRACE_EVENT("SAT_RECEIVE_DATA"); | 538 TRACE_EVENT("SAT_RECEIVE_DATA"); |
544 | 539 |
545 /* Start an info screen to inform the user that the SIM is receiving data */ | 540 /* Start an info screen to inform the user that the SIM is receiving data */ |
546 data->sat_command = sat_command; | 541 data->sat_command = sat_command; |
547 | 542 |
548 /* Extract the data from the Receive Data sat command */ | 543 /* Extract the data from the Receive Data sat command */ |
567 | 562 |
568 if (data->alpha_id) | 563 if (data->alpha_id) |
569 { | 564 { |
570 text_string = data->alpha_id; | 565 text_string = data->alpha_id; |
571 #ifdef NO_ASCIIZ/*MC SPR 940/2 Add tag to Unicode strings so info dialog displays them correctly*/ | 566 #ifdef NO_ASCIIZ/*MC SPR 940/2 Add tag to Unicode strings so info dialog displays them correctly*/ |
572 sat_add_unicode_tag_if_needed(text_string); | 567 sat_add_unicode_tag_if_needed(text_string); |
573 #endif | 568 #endif |
574 } | 569 } |
575 else | 570 else |
576 { | 571 { |
577 text_string = "Receiving Data"; //Need to implement for Chinese | 572 text_string = "Receiving Data"; //Need to implement for Chinese |
581 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)sat_class_e_cb, THREE_SECS, KEY_LEFT|KEY_RIGHT ); | 576 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)sat_class_e_cb, THREE_SECS, KEY_LEFT|KEY_RIGHT ); |
582 | 577 |
583 display_info.Identifier = event; | 578 display_info.Identifier = event; |
584 | 579 |
585 /* | 580 /* |
586 * Call Info Screen | 581 * Call Info Screen |
587 */ | 582 */ |
588 info_dialog (win, &display_info); | 583 info_dialog (win, &display_info); |
589 | 584 |
590 break; | 585 break; |
591 | 586 |
592 default: | 587 default: |