comparison src/ui/bmi/mmiSatCall.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 0b97ee8bf778
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: mmiSatInfo.c 15 $File: mmiSatInfo.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 of MMI SIM Application Toolkit (SAT) 25 Implementation of MMI SIM Application Toolkit (SAT)
26 26
27 ******************************************************************************** 27 ********************************************************************************
28 28
29 $History: mmiSatInfo.c 29 $History: mmiSatInfo.c
30 30
31 Nov 17, 2006 REF:DR:OMAPS00104580 x0039928 31 Nov 17, 2006 REF:DR:OMAPS00104580 x0039928
32 Description: CT GCF - TC27.22.4.13.1 Seq 1.10 - PROACTIVE SIM COMMANDS: 32 Description: CT GCF - TC27.22.4.13.1 Seq 1.10 - PROACTIVE SIM COMMANDS:
33 SET UP CALL (NORMAL) - Call Set-up Failed 33 SET UP CALL (NORMAL) - Call Set-up Failed
34 Solution: Removed the Redial flag enabling. 34 Solution: Removed the Redial flag enabling.
35 35
36 Mar 11, 2006 REF:DR:OMAPS00061467 x0035544 36 Mar 11, 2006 REF:DR:OMAPS00061467 x0035544
37 Description: 27.22.4.13.3 SET UP CALL (display of icons) fails. 37 Description: 27.22.4.13.3 SET UP CALL (display of icons) fails.
38 Solution: In the function sat_call_setup_exec() copied the icon data in to display_info structure 38 Solution: In the function sat_call_setup_exec() copied the icon data in to display_info structure
39 inorder to display on the call screen during SAT call setup. 39 inorder to display on the call screen during SAT call setup.
40 40
41 25/10/00 Original Condat(UK) BMI version. 41 25/10/00 Original Condat(UK) BMI version.
42 21/02/03 removed all calls to function sat_add_unicode_tag_if_needed() 42 21/02/03 removed all calls to function sat_add_unicode_tag_if_needed()
43 43
44 $End 44 $End
45 45
46 *******************************************************************************/ 46 *******************************************************************************/
47 47
48 #define ENTITY_MFW 48 #define ENTITY_MFW
139 139
140 /******************************************************************************* 140 /*******************************************************************************
141 141
142 $Function: sat_call_setup_create 142 $Function: sat_call_setup_create
143 143
144 $Description: Creation of an instance for the SAT CALL dialog.Window must be 144 $Description: Creation of an instance for the SAT CALL dialog.Window must be
145 available after reception of SAT command only one instance. 145 available after reception of SAT command only one instance.
146 146
147 $Returns: mfw window handler 147 $Returns: mfw window handler
148 148
149 $Arguments: parent_window - Parent window handler 149 $Arguments: parent_window - Parent window handler
150 150
151 *******************************************************************************/ 151 *******************************************************************************/
152 T_MFW_HND sat_call_setup_create (T_MFW_HND parent_window) 152 T_MFW_HND sat_call_setup_create (T_MFW_HND parent_window)
153 { 153 {
154 T_sat_call_setup * data = (T_sat_call_setup *)ALLOC_MEMORY (sizeof (T_sat_call_setup)); 154 T_sat_call_setup * data = (T_sat_call_setup *)ALLOC_MEMORY (sizeof (T_sat_call_setup));
155 T_MFW_WIN * win; 155 T_MFW_WIN * win;
183 $Description: Destroy the sat call dialog. 183 $Description: Destroy the sat call dialog.
184 184
185 $Returns: none 185 $Returns: none
186 186
187 $Arguments: own_window - Current window 187 $Arguments: own_window - Current window
188 188
189 *******************************************************************************/ 189 *******************************************************************************/
190 static void sat_call_setup_destroy (T_MFW_HND own_window) 190 static void sat_call_setup_destroy (T_MFW_HND own_window)
191 { 191 {
192 T_MFW_WIN * win_data = ((T_MFW_HDR *)own_window)->data; 192 T_MFW_WIN * win_data = ((T_MFW_HDR *)own_window)->data;
193 T_sat_call_setup * data = (T_sat_call_setup *)win_data->user; 193 T_sat_call_setup * data = (T_sat_call_setup *)win_data->user;
222 222
223 $Arguments: win - current window 223 $Arguments: win - current window
224 event - window event 224 event - window event
225 value - unique id 225 value - unique id
226 call_setup_parameter - call setup info 226 call_setup_parameter - call setup info
227 227
228 *******************************************************************************/ 228 *******************************************************************************/
229 static void sat_call_setup_exec (T_MFW_HND win, USHORT event, SHORT value, T_SAT_call_setup_parameter * call_setup_parameter) 229 static void sat_call_setup_exec (T_MFW_HND win, USHORT event, SHORT value, T_SAT_call_setup_parameter * call_setup_parameter)
230 { 230 {
231 231
232 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; 232 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data;
233 T_sat_call_setup * data = (T_sat_call_setup *)win_data->user; 233 T_sat_call_setup * data = (T_sat_call_setup *)win_data->user;
234 234
235 T_DISPLAY_DATA display_info; 235 T_DISPLAY_DATA display_info;
236 236
237 TRACE_FUNCTION ("sat_call_setup_exec()"); 237 TRACE_FUNCTION ("sat_call_setup_exec()");
238 238
239 if ((win EQ NULL) || (win_data EQ NULL) || (data EQ NULL)) 239 if ((win EQ NULL) || (win_data EQ NULL) || (data EQ NULL))
240 return; 240 return;
241 241
242 switch (event) 242 switch (event)
243 { 243 {
244 case SAT_CALL_ALERT: 244 case SAT_CALL_ALERT:
245 245
246 TRACE_EVENT("sat_call_setup_exec(): SAT_CALL_ALERT"); 246 TRACE_EVENT("sat_call_setup_exec(): SAT_CALL_ALERT");
247 247
248 /* start an info screen to accept or reject the call setup */ 248 /* start an info screen to accept or reject the call setup */
249 data->call_setup_parameter = call_setup_parameter; 249 data->call_setup_parameter = call_setup_parameter;
250 250
251 /* SPR#1700 - DS - Modified so SAT will not display "Setup call?" if the first alpha id has been supplied by the SIM 251 /* SPR#1700 - DS - Modified so SAT will not display "Setup call?" if the first alpha id has been supplied by the SIM
252 */ 252 */
253 253
254 if (call_setup_parameter->TextString) /* Alpha id supplied by SIM */ 254 if (call_setup_parameter->TextString) /* Alpha id supplied by SIM */
255 { 255 {
256 /* 01-06-2006, x0045876 (OMAPS00070741) */ 256 /* 01-06-2006, x0045876 (OMAPS00070741) */
257 dlg_initDisplayData_TextStr( &display_info, TxtAccept, TxtReject, call_setup_parameter->TextString, " ", COLOUR_STATUS); 257 dlg_initDisplayData_TextStr( &display_info, TxtAccept, TxtReject, call_setup_parameter->TextString, " ", COLOUR_STATUS);
258 //x0035544 Feb 07, 2006 DR:OMAPS00061467 258 //x0035544 Feb 07, 2006 DR:OMAPS00061467
259 #ifdef FF_MMI_SAT_ICON 259 #ifdef FF_MMI_SAT_ICON
260 if(call_setup_parameter->IconInfo.dst != NULL) 260 if(call_setup_parameter->IconInfo.dst != NULL)
261 { 261 {
262 display_info.IconData.width = call_setup_parameter->IconInfo.width; 262 display_info.IconData.width = call_setup_parameter->IconInfo.width;
263 display_info.IconData.height = call_setup_parameter->IconInfo.height; 263 display_info.IconData.height = call_setup_parameter->IconInfo.height;
264 display_info.IconData.dst = call_setup_parameter->IconInfo.dst; 264 display_info.IconData.dst = call_setup_parameter->IconInfo.dst;
265 display_info.IconData.selfExplanatory = call_setup_parameter->IconInfo.selfExplanatory; 265 display_info.IconData.selfExplanatory = call_setup_parameter->IconInfo.selfExplanatory;
266 } 266 }
267 #endif 267 #endif
268 268
269 } 269 }
270 270
271 else /* No alpha id supplied so show "Setup call?" */ 271 else /* No alpha id supplied so show "Setup call?" */
272 { 272 {
273 //x0035544 Mar 14, 2006 DR:OMAPS00061467 273 //x0035544 Mar 14, 2006 DR:OMAPS00061467
274 //added missing '?' to the string "Setup call" as below 274 //added missing '?' to the string "Setup call" as below
275 /* 01-06-2006, x0045876 (OMAPS00070741) */ 275 /* 01-06-2006, x0045876 (OMAPS00070741) */
276 dlg_initDisplayData_TextStr( &display_info, TxtAccept, TxtReject, "Setup call?", " ", COLOUR_STATUS); 276 dlg_initDisplayData_TextStr( &display_info, TxtAccept, TxtReject, "Setup call?", " ", COLOUR_STATUS);
277 } 277 }
284 /* 284 /*
285 * Call Info Screen 285 * Call Info Screen
286 */ 286 */
287 info_dialog (win, &display_info); 287 info_dialog (win, &display_info);
288 break; 288 break;
289 289
290 case SAT_CALL_REDIAL: 290 case SAT_CALL_REDIAL:
291 /* attempt a redial if the timer has not yet elapsed */ 291 /* attempt a redial if the timer has not yet elapsed */
292 /* if redial is not commanded by SAT_CALL_ALERT the timer will be NULL (see sat_call_setup_cb()) */ 292 /* if redial is not commanded by SAT_CALL_ALERT the timer will be NULL (see sat_call_setup_cb()) */
293 /* if the timer has already elapsed it is set to NULL (see sat_call_setup_tim_cb()) */ 293 /* if the timer has already elapsed it is set to NULL (see sat_call_setup_tim_cb()) */
294 294
295 TRACE_EVENT("sat_call_setup_exec(): SAT_CALL_REDIAL"); 295 TRACE_EVENT("sat_call_setup_exec(): SAT_CALL_REDIAL");
296 296
297 if ((data->redial_tim NEQ NULL) || (call_setup_parameter->redialTime EQ FOREVER)) 297 if ((data->redial_tim NEQ NULL) || (call_setup_parameter->redialTime EQ FOREVER))
298 298
299 { 299 {
307 SEND_EVENT(data->parent_win, SAT_CALL_END, 0, NULL); /* inform the parent */ 307 SEND_EVENT(data->parent_win, SAT_CALL_END, 0, NULL); /* inform the parent */
308 } 308 }
309 break; 309 break;
310 310
311 case SAT_CALL_END: 311 case SAT_CALL_END:
312 312
313 TRACE_EVENT("sat_call_setup_exec(): SAT_CALL_END"); 313 TRACE_EVENT("sat_call_setup_exec(): SAT_CALL_END");
314 314
315 /* Nov 17, 2006 REF:DR:OMAPS00104580 x0039928 315 /* Nov 17, 2006 REF:DR:OMAPS00104580 x0039928
316 -Deleted Redial flag enabling/disabling code*/ 316 -Deleted Redial flag enabling/disabling code*/
317 317
335 $Returns: none 335 $Returns: none
336 336
337 $Arguments: win - current window 337 $Arguments: win - current window
338 identifier - unique id 338 identifier - unique id
339 reason - window event id 339 reason - window event id
340 340
341 *******************************************************************************/ 341 *******************************************************************************/
342 342
343 static void sat_call_setup_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason) 343 static void sat_call_setup_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason)
344 { 344 {
345 T_MFW_WIN * info_win_data = ((T_MFW_HDR *) win)->data; 345 T_MFW_WIN * info_win_data = ((T_MFW_HDR *) win)->data;
346 T_sat_call_setup * data = (T_sat_call_setup *)info_win_data->user; 346 T_sat_call_setup * data = (T_sat_call_setup *)info_win_data->user;
347 347
348 TRACE_FUNCTION("sat_call_setup_cb()"); 348 TRACE_FUNCTION("sat_call_setup_cb()");
349 349
350 if ((win EQ NULL) || (info_win_data EQ NULL) || (data EQ NULL)) 350 if ((win EQ NULL) || (info_win_data EQ NULL) || (data EQ NULL))
351 return; 351 return;
352 352
353 switch (reason) 353 switch (reason)
354 { 354 {
355 case INFO_KCD_LEFT: /* the user has accepted the call setup */ 355 case INFO_KCD_LEFT: /* the user has accepted the call setup */
356 /* start the call */ 356 /* start the call */
357 sat_call_active = TRUE; // Marcus: Issue 1812: 13/03/2003 357 sat_call_active = TRUE; // Marcus: Issue 1812: 13/03/2003
359 call_create(0); 359 call_create(0);
360 SEND_EVENT(call_get_window(),CALL_OUTGOING_SAT,0,data->call_setup_parameter); 360 SEND_EVENT(call_get_window(),CALL_OUTGOING_SAT,0,data->call_setup_parameter);
361 satAccept(); 361 satAccept();
362 362
363 /* create and start the redial timer handler */ 363 /* create and start the redial timer handler */
364 if ((data->call_setup_parameter->redialTime NEQ 0) && 364 if ((data->call_setup_parameter->redialTime NEQ 0) &&
365 (data->call_setup_parameter->redialTime NEQ FOREVER)) 365 (data->call_setup_parameter->redialTime NEQ FOREVER))
366 { 366 {
367 data->redial_tim = 367 data->redial_tim =
368 tim_create (win, data->call_setup_parameter->redialTime, (T_MFW_CB)sat_call_setup_tim_cb); 368 tim_create (win, data->call_setup_parameter->redialTime, (T_MFW_CB)sat_call_setup_tim_cb);
369 tim_start (data->redial_tim); 369 tim_start (data->redial_tim);
370 } 370 }
371 else 371 else
372 { 372 {
373 data->redial_tim = NULL; /* timer not used */ 373 data->redial_tim = NULL; /* timer not used */
374 } 374 }
375 375
376 /* destroying will be done in response to SAT_CALL_END */ 376 /* destroying will be done in response to SAT_CALL_END */
377 SEND_EVENT(data->parent_win, SAT_CALL_END, 0, NULL); // Marcus: Issue 1812: 13/03/2003 377 SEND_EVENT(data->parent_win, SAT_CALL_END, 0, NULL); // Marcus: Issue 1812: 13/03/2003
378 break; 378 break;
379 case INFO_KCD_RIGHT: /* the user has rejected the call setup */ 379 case INFO_KCD_RIGHT: /* the user has rejected the call setup */
380 TRACE_EVENT("sat_call_setup_cb(): User rejected call setup"); 380 TRACE_EVENT("sat_call_setup_cb(): User rejected call setup");
395 395
396 $Returns: Execution status 396 $Returns: Execution status
397 397
398 $Arguments: event - window event 398 $Arguments: event - window event
399 tc - timer info 399 tc - timer info
400 400
401 *******************************************************************************/ 401 *******************************************************************************/
402 static int sat_call_setup_tim_cb (T_MFW_EVENT event, T_MFW_TIM *tc) 402 static int sat_call_setup_tim_cb (T_MFW_EVENT event, T_MFW_TIM *tc)
403 { 403 {
404 T_MFW_HND win = mfw_parent (mfw_header()); 404 T_MFW_HND win = mfw_parent (mfw_header());
405 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; 405 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data;