# HG changeset patch # User Mychaela Falconia # Date 1605741876 0 # Node ID 0b8ebd4dd2ef7c2bee5e583634a5fa4d765a9458 # Parent d6bc1298a37788e04796344ed9e50f272028640b mmiSatInfo.c: bogotab fixes diff -r d6bc1298a377 -r 0b8ebd4dd2ef src/ui/bmi/mmiSatInfo.c --- a/src/ui/bmi/mmiSatInfo.c Wed Nov 18 22:26:23 2020 +0000 +++ b/src/ui/bmi/mmiSatInfo.c Wed Nov 18 23:24:36 2020 +0000 @@ -1,6 +1,6 @@ /******************************************************************************* - CONDAT (UK) + CONDAT (UK) ******************************************************************************** @@ -11,12 +11,12 @@ $Project name: Basic MMI $Project code: BMI - $Module: SMS - $File: mmiSatInfo.c - $Revision: 1.0 + $Module: SMS + $File: mmiSatInfo.c + $Revision: 1.0 - $Author: Condat(UK) - $Date: 25/10/00 + $Author: Condat(UK) + $Date: 25/10/00 ******************************************************************************** @@ -33,8 +33,8 @@ 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 *******************************************************************************/ @@ -149,11 +149,11 @@ T_MFW_HND tim; T_MFW_HND info; T_SAT_CMD *sat_command; /* pointer to sat_command in parent */ - T_MFW_HND kbd; /* sbh - keyboard handler, so window can be destroyed by user */ - char *TextString; - UBYTE sound_id; /* sound to play */ - UBYTE device_id; /* device to play sound on */ - BYTE volume; /* volume to play */ + T_MFW_HND kbd; /* sbh - keyboard handler, so window can be destroyed by user */ + char *TextString; + UBYTE sound_id; /* sound to play */ + UBYTE device_id; /* device to play sound on */ + BYTE volume; /* volume to play */ } T_sat_play_tone; typedef enum { @@ -173,9 +173,9 @@ $Function: sat_play_tone_create $Description: Creation of an instance for the SAT PLAY TONE dialog. Window must - be available after reception of SAT command, only one instance. + be available after reception of SAT command, only one instance. - $Returns: window handle + $Returns: window handle $Arguments: own_window - window handler @@ -216,7 +216,7 @@ $Description: Destroy the sat play tone dialog. - $Returns: none + $Returns: none $Arguments: own_window - window handler @@ -226,11 +226,11 @@ T_MFW_WIN * win_data = ((T_MFW_HDR *)own_window)->data; T_sat_play_tone * data = (T_sat_play_tone *)win_data->user; - if (own_window == NULL) - { - TRACE_EVENT ("Error : sat_play_tone_destroy called with NULL Pointer"); - return; - } + if (own_window == NULL) + { + TRACE_EVENT ("Error : sat_play_tone_destroy called with NULL Pointer"); + return; + } if (data) { @@ -252,17 +252,16 @@ $Description: Dialog function for sat_play_tone_exec window. - $Returns: none + $Returns: none $Arguments: win - window handler - event -window event - value - unique id - sat_command - Sat Command. + 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; @@ -284,8 +283,8 @@ data->tim = NULL; /* NULL means no timer running */ /* - * --> Select the right Sound ID, if not supported: return - */ + * --> Select the right Sound ID, if not supported: return + */ res = sat_set_selected_sound(sat_command->c.tone, data); @@ -305,7 +304,7 @@ audio_PlaySoundID(data->device_id, data->sound_id , data->volume, AUDIO_PLAY_ONCE); break; case DURATION: - TRACE_EVENT("DURATION"); + TRACE_EVENT("DURATION"); time = sat_calculate_time (sat_command->c.tone.durUnit, sat_command->c.tone.durValue); if (time EQ 0) { @@ -324,8 +323,8 @@ } /* - * --> display alpha identifier (if any) - */ + * --> display alpha identifier (if any) + */ txt = &sat_command->c.tone.alpha; /*SPR#2340 - DS - Handle cases where no alpha id and/or duration is present */ @@ -352,8 +351,8 @@ display_info.WrapStrings=WRAP_STRING_2; /* - * Call Info Screen - */ + * Call Info Screen + */ data->info = info_dialog (win, &display_info); /* destroy when dialog times out */ display_info.TextString = data->TextString; @@ -408,10 +407,10 @@ $Description: Callback function for the play tone timer. - $Returns: Execution status + $Returns: Execution status $Arguments: event -window event - tc - timer info + tc - timer info *******************************************************************************/ @@ -437,9 +436,9 @@ /* 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*/ + /* 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 */ + /* API/DSM - 04/09/03 - SPR2491 - END */ /* SPR#2340 - DS - If timer has expired, destroy info_dialog if necessary */ @@ -453,7 +452,7 @@ //Begin 29520 //sat_play_tone_destroy(data->info); dialog_info_destroy(data->info); - data->info = NULL; + data->info = NULL; //End 29520 } @@ -472,10 +471,10 @@ $Description: Calculate timeout value - $Returns: time out in ms + $Returns: time out in ms $Arguments: unit - number of units - value - unit value. + value - unit value. *******************************************************************************/ static ULONG sat_calculate_time (UBYTE unit, UBYTE value) @@ -506,16 +505,14 @@ $Description: Choose the Sound IDs, return appropriate duration and support info - $Returns: time out + $Returns: time out $Arguments: tone_tag - tone name - data - tone info + data - tone info *******************************************************************************/ - static e_TONE_DURATION sat_set_selected_sound (SatTone tone_tag, T_sat_play_tone * data) - { e_TONE_DURATION ret; @@ -527,35 +524,35 @@ switch(tone_tag.tone) { - case SAT_TONE_CALL_SUB_BUSY: - data->sound_id = TONES_BUSY /*17*/; - break; - case SAT_TONE_CONGESTION: - data->sound_id = TONES_CONGEST /*18*/; - break; - case SAT_TONE_RADIO_PATH_ACK: - case SAT_TONE_GENERAL_BEEP: + case SAT_TONE_CALL_SUB_BUSY: + data->sound_id = TONES_BUSY /*17*/; + break; + case SAT_TONE_CONGESTION: + data->sound_id = TONES_CONGEST /*18*/; + break; + case SAT_TONE_RADIO_PATH_ACK: + case SAT_TONE_GENERAL_BEEP: data->sound_id = TONES_ACK /*20*/; break; - case SAT_TONE_RADIO_PATH_NOT: - data->sound_id = TONES_DROPPED /*19 - also call dropped*/; - break; - case SAT_TONE_DIAL: - case SAT_TONE_CALL_WAITING: - data->sound_id = TONES_CW /*21*/; - break; - case SAT_TONE_POSITIV_ACK: - case SAT_TONE_RINGING_TONE: - data->sound_id = TONES_RINGING_TONE /*0x27*/; - break; - case SAT_TONE_ERROR: - case SAT_TONE_NEGATIV_ACK: - data->sound_id = TONES_ERROR /*16*/; - break; - default: - /* Unknown tone value - default is 'general beep' */ - data->sound_id = TONES_KEYBEEP /*0x26*/; - break; + case SAT_TONE_RADIO_PATH_NOT: + data->sound_id = TONES_DROPPED /*19 - also call dropped*/; + break; + case SAT_TONE_DIAL: + case SAT_TONE_CALL_WAITING: + data->sound_id = TONES_CW /*21*/; + break; + case SAT_TONE_POSITIV_ACK: + case SAT_TONE_RINGING_TONE: + data->sound_id = TONES_RINGING_TONE /*0x27*/; + break; + case SAT_TONE_ERROR: + case SAT_TONE_NEGATIV_ACK: + data->sound_id = TONES_ERROR /*16*/; + break; + default: + /* Unknown tone value - default is 'general beep' */ + data->sound_id = TONES_KEYBEEP /*0x26*/; + break; } ret = DURATION; @@ -571,11 +568,11 @@ $Description: Callback function information dialog. - $Returns: none + $Returns: none $Arguments: win - window - identifier - unique id - reason - event + identifier - unique id + reason - event *******************************************************************************/ @@ -586,18 +583,18 @@ T_sat_play_tone * play_data = (T_sat_play_tone *)play_win_data->user; T_SAT_RES sat_res; - if (win EQ NULL) - return; + if (win EQ NULL) + return; - TRACE_FUNCTION("sat_info_cb()"); + TRACE_FUNCTION("sat_info_cb()"); - TRACE_EVENT_P2("identifier %d, reason %d", identifier, reason); + TRACE_EVENT_P2("identifier %d, reason %d", identifier, reason); /* - * Who has initiated the information screen - */ + * Who has initiated the information screen + */ switch (identifier) - { + { case SAT_PLAY_TONE: if ((play_win_data EQ NULL) || (play_data EQ NULL)) return; /* we have been interrupted by sat_play_tone_tim_cb() */ @@ -608,10 +605,10 @@ 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() - */ + * 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 { /* no timer (single tone) or timer timed out: we are the last */ @@ -636,9 +633,9 @@ 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 */ + /* 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 */ if (play_data->sat_command NEQ NULL) {