FreeCalypso > hg > fc-tourmaline
diff src/ui/bmi/mmiSatInfo.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 | b89fc69b96e1 |
line wrap: on
line diff
--- a/src/ui/bmi/mmiSatInfo.c Sun Nov 08 05:12:05 2020 +0000 +++ b/src/ui/bmi/mmiSatInfo.c Sun Nov 08 06:39:16 2020 +0000 @@ -2,39 +2,39 @@ CONDAT (UK) -******************************************************************************** +******************************************************************************** This software product is the property of Condat (UK) Ltd and may not be - disclosed to any third party without the express permission of the owner. - + disclosed to any third party without the express permission of the owner. + ******************************************************************************** - $Project name: Basic MMI - $Project code: BMI + $Project name: Basic MMI + $Project code: BMI $Module: SMS $File: mmiSatInfo.c - $Revision: 1.0 - - $Author: Condat(UK) - $Date: 25/10/00 - + $Revision: 1.0 + + $Author: Condat(UK) + $Date: 25/10/00 + ******************************************************************************** - + Description: - + Implementation of MMI SIM Application Toolkit (SAT) - + ******************************************************************************** $History: mmiSatInfo.c July 26, 2005 REF: SPR 29520 x0018858 - Issue: 27.22.4.5 Proactive SIM Command: PLAY TONE fails + Issue: 27.22.4.5 Proactive SIM Command: PLAY TONE fails Solution: The window which used to come up "Please wait" was not getting destroyed. Care has been taken to check this. - 25/10/00 Original Condat(UK) BMI version. - 21/02/03 removed all calls to function sat_add_unicode_tag_if_needed() + 25/10/00 Original Condat(UK) BMI version. + 21/02/03 removed all calls to function sat_add_unicode_tag_if_needed() $End *******************************************************************************/ @@ -129,12 +129,12 @@ /* * Tone Definitions */ -#define SAT_TONE_DIAL 1 +#define SAT_TONE_DIAL 1 #define SAT_TONE_CALL_SUB_BUSY 2 #define SAT_TONE_CONGESTION 3 #define SAT_TONE_RADIO_PATH_ACK 4 #define SAT_TONE_RADIO_PATH_NOT 5 -#define SAT_TONE_ERROR 6 +#define SAT_TONE_ERROR 6 #define SAT_TONE_CALL_WAITING 7 #define SAT_TONE_RINGING_TONE 8 #define SAT_TONE_GENERAL_BEEP 0x10 @@ -174,11 +174,11 @@ $Description: Creation of an instance for the SAT PLAY TONE dialog. Window must be available after reception of SAT command, only one instance. - + $Returns: window handle $Arguments: own_window - window handler - + *******************************************************************************/ T_MFW_HND sat_play_tone_create (T_MFW_HND parent_window) @@ -201,7 +201,7 @@ win->user = (MfwUserDataPtr)data; data->kbd = kbdCreate( data->win, KEY_ALL, (T_MFW_CB) sat_kbd_cb); /* sbh - add keyboard handler */ - + /* * return window handle */ @@ -215,11 +215,11 @@ $Description: Destroy the sat play tone dialog. - + $Returns: none $Arguments: own_window - window handler - + *******************************************************************************/ static void sat_play_tone_destroy (T_MFW_HND own_window) { @@ -258,23 +258,23 @@ event -window event value - unique id sat_command - Sat Command. - + *******************************************************************************/ static void sat_play_tone_exec (T_MFW_HND win, USHORT event, SHORT value, T_SAT_CMD * sat_command) { - + T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; T_sat_play_tone * data = (T_sat_play_tone *)win_data->user; - + T_SAT_TXT * txt; ULONG time = 0; /* x0039928 - Lint warning fix */ e_TONE_DURATION res; T_SAT_RES sat_res; - + T_DISPLAY_DATA display_info; TRACE_FUNCTION ("sat_play_tone_exec()"); - + switch (event) { case SAT_PLAY_TONE: @@ -317,7 +317,7 @@ { /* to be stopped by timer */ data->tim = tim_create (win, time, (T_MFW_CB)sat_play_tone_tim_cb); - tim_start (data->tim); + tim_start (data->tim); audio_PlaySoundID(data->device_id, data->sound_id , data->volume, AUDIO_PLAY_INFINITE); } break; @@ -329,7 +329,7 @@ txt = &sat_command->c.tone.alpha; /*SPR#2340 - DS - Handle cases where no alpha id and/or duration is present */ - + if (txt->len > 0) /* alpha id supplied in command */ { int timer=0; @@ -338,24 +338,24 @@ timer = TEN_SECS; else /* duration supplied, info_dialog destroyed when audio timer expires */ timer = FOREVER; - + data->TextString = sat_create_TEXT_ASCIIZ (txt); //July 26, 2005 REF: SPR 29520 x0018858 //Function call modified to pass the string as a differant argument(initially 4th arg but now as the 5th arg). dlg_initDisplayData_TextStr( &display_info, TxtNull, TxtCancel, NULL, data->TextString, COLOUR_STATUS); - + dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)sat_info_cb, timer, KEY_LEFT | KEY_RIGHT | KEY_HUP); display_info.Identifier = event; //July 26, 2005 REF: SPR 29520 x0018858 //wrapping enabled for the display. display_info.WrapStrings=WRAP_STRING_2; - + /* * Call Info Screen */ data->info = info_dialog (win, &display_info); - /* destroy when dialog times out */ + /* destroy when dialog times out */ display_info.TextString = data->TextString; } else if (txt->text EQ 0 && res NEQ SINGLE_TONE) @@ -376,10 +376,10 @@ * Call Info Screen */ data->info = info_dialog (win, &display_info); - /* destroy when dialog times out */ + /* destroy when dialog times out */ display_info.TextString = data->TextString; } - else if (res EQ SINGLE_TONE) + else if (res EQ SINGLE_TONE) { /* destroy immediately, if SINGLE_TONE and no info */ sat_res[SAT_ERR_INDEX] = SatResSuccess; @@ -395,7 +395,7 @@ sat_play_tone_destroy (win); break; /* ...sbh */ - + default: TRACE_EVENT ("sat_play_tone_exec() unexpected event"); break; @@ -407,12 +407,12 @@ $Function: sat_play_tone_tim_cb $Description: Callback function for the play tone timer. - + $Returns: Execution status $Arguments: event -window event tc - timer info - + *******************************************************************************/ static int sat_play_tone_tim_cb (T_MFW_EVENT event, T_MFW_TIM *tc) @@ -421,26 +421,26 @@ T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; T_sat_play_tone * data = (T_sat_play_tone *)win_data->user; T_SAT_RES sat_res; - + if ((win EQ NULL) || (win_data EQ NULL) || (data EQ NULL)) return MFW_EVENT_CONSUMED; /* we have been interrupted by user action */ TRACE_FUNCTION("sat_play_tone_tim_cb()"); - + /* timer elapsed */ - + sat_res[SAT_ERR_INDEX] = SatResSuccess; sat_res[SAT_AI_INDEX] = SatResAiNoCause; sat_done (data->sat_command, sat_res); data->sat_command = NULL; /* signal response issued to info */ - + /* the last one has to destroy the window */ data->tim = NULL; /* signal end of timer to info */ /* API/DSM - 04/09/03 - SPR2491 - Add a call to stop the play of the continuous AUDIO sound*/ audio_StopSoundbyID(data->device_id, data->sound_id); /* API/DSM - 04/09/03 - SPR2491 - END */ - + /* SPR#2340 - DS - If timer has expired, destroy info_dialog if necessary */ if (data->info NEQ NULL) @@ -448,13 +448,13 @@ /* timer has expired therefore destroy info dialog */ TRACE_EVENT("Destroy Play Tone dialog and data"); // July 26, 2005 REF: SPR 29520 x0018858 -//The wndow displaying "Please wait was not getting destroyed. +//The wndow displaying "Please wait was not getting destroyed. //Destroyed the window and initialized to NULL. //Begin 29520 //sat_play_tone_destroy(data->info); dialog_info_destroy(data->info); data->info = NULL; -//End 29520 +//End 29520 } if (data->info EQ NULL) @@ -471,12 +471,12 @@ $Function: sat_calculate_time $Description: Calculate timeout value - + $Returns: time out in ms $Arguments: unit - number of units value - unit value. - + *******************************************************************************/ static ULONG sat_calculate_time (UBYTE unit, UBYTE value) { @@ -505,12 +505,12 @@ $Function: sat_set_selected_sound $Description: Choose the Sound IDīs, return appropriate duration and support info - + $Returns: time out $Arguments: tone_tag - tone name data - tone info - + *******************************************************************************/ @@ -518,7 +518,7 @@ { e_TONE_DURATION ret; - + TRACE_FUNCTION("sat_set_selected_sound()"); /* SPR#2340 - DS - Removed code that set ret to NOT_SUPPORTED if durUnit equals zero (i.e. Minutes) */ @@ -559,7 +559,7 @@ } ret = DURATION; - + TRACE_EVENT_P2("tone %d, sound_id %x", tone_tag.tone, data->sound_id); return ret; @@ -570,13 +570,13 @@ $Function: sat_info_cb $Description: Callback function information dialog. - + $Returns: none $Arguments: win - window identifier - unique id reason - event - + *******************************************************************************/ static void sat_info_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason) @@ -585,7 +585,7 @@ T_MFW_WIN * play_win_data = ((T_MFW_HDR *)win)->data; T_sat_play_tone * play_data = (T_sat_play_tone *)play_win_data->user; T_SAT_RES sat_res; - + if (win EQ NULL) return; @@ -607,18 +607,18 @@ case INFO_TIMEOUT: if (play_data->tim NEQ NULL) { - /* NOP on short info timeout && infinite: - * tone will be stopped and SUCCESS will be signalled by sat_play_tone_tim_cb() + /* NOP on short info timeout && infinite: + * tone will be stopped and SUCCESS will be signalled by sat_play_tone_tim_cb() */ play_data->info = NULL; /* signal the end of info to timer */ - } - else + } + else { /* no timer (single tone) or timer timed out: we are the last */ if (play_data->sat_command NEQ NULL) { /* response not yet issued, i.e single tone with info */ - sat_res[SAT_ERR_INDEX] = SatResSuccess; + sat_res[SAT_ERR_INDEX] = SatResSuccess; sat_res[SAT_AI_INDEX] = SatResAiNoCause; sat_done (play_data->sat_command, sat_res); } @@ -635,7 +635,7 @@ /* timer has not yet elapsed, stop it */ tim_stop (play_data->tim); } - + /* API/DSM - 04/09/03 - SPR2491 - Add a call to stop the play of the continuous AUDIO sound*/ audio_StopSoundbyID(play_data->device_id, play_data->sound_id); /* API/DSM - 04/09/03 - SPR2491 - END */ @@ -651,7 +651,7 @@ break; } break; - + default: TRACE_EVENT("sat_info_cb(): unexp. event"); break;