comparison src/ui/bmi/mmiSmsIdle.c @ 83:718ede6f6f1f

mmiSmsIdle.c: white space fixes
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 26 Oct 2020 21:51:55 +0000
parents 67bfe9f274f6
children 7160f0d005d2
comparison
equal deleted inserted replaced
82:2e93bc63ba71 83:718ede6f6f1f
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: MmiSmsIdle.c 15 $File: MmiSmsIdle.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: Implementation for MMI smsidle unsolicited event handling 23 Description: Implementation for MMI smsidle unsolicited event handling
24 24
25 25
26 26
27 ******************************************************************************** 27 ********************************************************************************
28 28
29 $History: MmiSmsIdle.c 29 $History: MmiSmsIdle.c
30 30
31 25/10/00 Original Condat(UK) BMI version. 31 25/10/00 Original Condat(UK) BMI version.
32 32
33 May 7, 2007 OMAPS00130278 a0393213(R.Prabakar) 33 May 7, 2007 OMAPS00130278 a0393213(R.Prabakar)
34 Description : CT-GCF[34.2.5.1] - MS fails to display class 0 MT SMS when it contains alphanumeric and special characters 34 Description : CT-GCF[34.2.5.1] - MS fails to display class 0 MT SMS when it contains alphanumeric and special characters
35 Solution : Decoding of DCS was not done according to GSM spec 35 Solution : Decoding of DCS was not done according to GSM spec
36 36
37 Feb 28, 2007 OMAPS00109953 a0393213(R.Prabakar) 37 Feb 28, 2007 OMAPS00109953 a0393213(R.Prabakar)
38 Description : Need to be able to store SMS in SIM/ME 38 Description : Need to be able to store SMS in SIM/ME
39 Solution : Earlier, index alone was sufficient to identify messages. Now memory should also be taken care of. 39 Solution : Earlier, index alone was sufficient to identify messages. Now memory should also be taken care of.
40 40
41 Sep 04, 2006 REF:OMAPS00092060 x0039928 41 Sep 04, 2006 REF:OMAPS00092060 x0039928
42 Description: COMBO : MIDI ringer not played for incoming alarm or SMS during voice call on N5.16 42 Description: COMBO : MIDI ringer not played for incoming alarm or SMS during voice call on N5.16
43 Solution: A tone is played for an incoming SMS during voice call. 43 Solution: A tone is played for an incoming SMS during voice call.
44 44
45 July 06, 2006 REF:OMAPS00084767 x0039928 45 July 06, 2006 REF:OMAPS00084767 x0039928
46 Description: Locosto N5.14/N12.9- Configuration without MIDI does not build 46 Description: Locosto N5.14/N12.9- Configuration without MIDI does not build
47 Solution: extern T_call call_dat is moved out of FF_MIDI_RINGER flag 47 Solution: extern T_call call_dat is moved out of FF_MIDI_RINGER flag
48 48
49 May 10, 2006 DR: OMAPS00075379 x0021334 49 May 10, 2006 DR: OMAPS00075379 x0021334
50 Descripton: SMS - Status Request in idle mode - using Menu - no status in pending state 50 Descripton: SMS - Status Request in idle mode - using Menu - no status in pending state
51 Solution: The display of pending status is network dependent. In some networks this 51 Solution: The display of pending status is network dependent. In some networks this
52 status is not given. When available, it used to display 'Temp Error'. This has now been 52 status is not given. When available, it used to display 'Temp Error'. This has now been
53 replaced with 'Pending'. 53 replaced with 'Pending'.
54 54
55 Nov 02, 2005 REF:ER OMAPS00039044 xdeepadh 55 Nov 02, 2005 REF:ER OMAPS00039044 xdeepadh
56 Description: Mp3 Ringer Implementation 56 Description: Mp3 Ringer Implementation
57 Solution: The Midi Ringer application has been enhanced to support mp3 as ringer. 57 Solution: The Midi Ringer application has been enhanced to support mp3 as ringer.
58 The interface function names have been modified. 58 The interface function names have been modified.
59 59
60 May 27, 2005 MMI-FIX-29869 x0018858 60 May 27, 2005 MMI-FIX-29869 x0018858
61 Description: There is a limitation on the number of messages that can be downloaded from 61 Description: There is a limitation on the number of messages that can be downloaded from
62 server even though there is space on the sim. 62 server even though there is space on the sim.
63 Solution: The limitation has been removed and the number of messages that can be dowloaded 63 Solution: The limitation has been removed and the number of messages that can be dowloaded
64 has been modified to the maximum number that can be stored. 64 has been modified to the maximum number that can be stored.
65 65
66 Jun 14, 2005 REF: MMI-FIX-30439 x0018858 66 Jun 14, 2005 REF: MMI-FIX-30439 x0018858
67 Description: The homezone/cityzone tags were not being displayed properly. 67 Description: The homezone/cityzone tags were not being displayed properly.
68 Solution: Modified to save the tags properly in caches and also made the 68 Solution: Modified to save the tags properly in caches and also made the
69 appropriate modifications to update the same properly during mobility. 69 appropriate modifications to update the same properly during mobility.
70 70
71 Apr 05, 2005 REF: ENH 29994 xdeepadh 71 Apr 05, 2005 REF: ENH 29994 xdeepadh
72 Description: Implementation of Generic Midi Ringer and Modification of existing Midi Test Application 72 Description: Implementation of Generic Midi Ringer and Modification of existing Midi Test Application
73 Solution: Generic Midi Ringer and Midi Test Application were implemented. 73 Solution: Generic Midi Ringer and Midi Test Application were implemented.
74 74
75 x0018858 24 Mar, 2005 MMI-FIX-11321 75 x0018858 24 Mar, 2005 MMI-FIX-11321
76 Issue Description :- If the inbox is full and a new message is receivd, no indication is received. 76 Issue Description :- If the inbox is full and a new message is receivd, no indication is received.
77 Fix: Added support for handling indication when message box is full and 77 Fix: Added support for handling indication when message box is full and
78 there is a pending message. 78 there is a pending message.
79 79
80 Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar 80 Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar
81 Issue description: BMI: using the tool nowSMS the voicemail indication via sms does not work 81 Issue description: BMI: using the tool nowSMS the voicemail indication via sms does not work
82 Solution: Instead of identifying voice using addr[0] and pid, we use dcs. Also, messages belonging 82 Solution: Instead of identifying voice using addr[0] and pid, we use dcs. Also, messages belonging
83 to group "1100" are deleted when voicemail icon is displayed. 83 to group "1100" are deleted when voicemail icon is displayed.
84 84
85 Apr 27, 2004 REF: CRR 21336 Deepa M.D 85 Apr 27, 2004 REF: CRR 21336 Deepa M.D
86 Bug:SMSMT UCS2 Class0 message content not displayed. 86 Bug:SMSMT UCS2 Class0 message content not displayed.
87 Fix:The alphabet bits(UCS2) of DCS were not decoded properly. 87 Fix:The alphabet bits(UCS2) of DCS were not decoded properly.
88 88
89 $End 89 $End
90 90
91 *******************************************************************************/ 91 *******************************************************************************/
92 92
93 #define ENTITY_MFW 93 #define ENTITY_MFW
179 #ifndef PCM_2_FFS 179 #ifndef PCM_2_FFS
180 #include "pcm.h" 180 #include "pcm.h"
181 #endif 181 #endif
182 182
183 183
184 // Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar 184 // Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar
185 extern BOOL invalidVm; 185 extern BOOL invalidVm;
186 //Apr 05, 2005 REF: ENH 29994 xdeepadh 186 //Apr 05, 2005 REF: ENH 29994 xdeepadh
187 #ifdef FF_MIDI_RINGER 187 #ifdef FF_MIDI_RINGER
188 #include "mfw_midi.h" 188 #include "mfw_midi.h"
189 #endif 189 #endif
190 190
191 /* SMS arrival Setting */ 191 /* SMS arrival Setting */
192 #ifdef NEPTUNE_BOARD 192 #ifdef NEPTUNE_BOARD
196 #endif 196 #endif
197 197
198 /********************************************************************* 198 /*********************************************************************
199 ********************************************************************** 199 **********************************************************************
200 200
201 STATIC MENU WINDOW. DECLARATION 201 STATIC MENU WINDOW. DECLARATION
202 202
203 ********************************************************************* 203 *********************************************************************
204 **********************************************************************/ 204 **********************************************************************/
205 205
206 typedef struct 206 typedef struct
228 extern T_call call_data; 228 extern T_call call_data;
229 #endif 229 #endif
230 230
231 /********************************************************************* 231 /*********************************************************************
232 232
233 External Function Prototypes 233 External Function Prototypes
234 234
235 **********************************************************************/ 235 **********************************************************************/
236 extern UBYTE getcurrentSMSTone(void); 236 extern UBYTE getcurrentSMSTone(void);
237 extern UBYTE getcurrentVoiceTone(void); 237 extern UBYTE getcurrentVoiceTone(void);
238 extern UBYTE Delete_1_2_1_vm_icon; 238 extern UBYTE Delete_1_2_1_vm_icon;
239 extern UBYTE Display_1_2_1_vm_icon; 239 extern UBYTE Display_1_2_1_vm_icon;
240 /* cq15633 Access function returning incoming call alert window status. 23-03-04. MZ */ 240 /* cq15633 Access function returning incoming call alert window status. 23-03-04. MZ */
241 extern BOOL call_IsAlertScreenActive( void ); 241 extern BOOL call_IsAlertScreenActive( void );
242 // May 27, 2005 MMI-FIX-29869 x0018858 - Extern function 242 // May 27, 2005 MMI-FIX-29869 x0018858 - Extern function
243 #ifdef FF_MMI_SMS_DYNAMIC 243 #ifdef FF_MMI_SMS_DYNAMIC
244 extern Check_max_sms_allowed(void); 244 extern Check_max_sms_allowed(void);
245 #endif 245 #endif
246 /********************************************************************* 246 /*********************************************************************
247 247
248 Function Prototypes 248 Function Prototypes
249 249
250 **********************************************************************/ 250 **********************************************************************/
251 // ADDED BY RAVI - 28-11-2005 251 // ADDED BY RAVI - 28-11-2005
252 EXTERN UBYTE getCurrentRingerSettings(void); 252 EXTERN UBYTE getCurrentRingerSettings(void);
253 extern UBYTE sms_check_message_pending(void); 253 extern UBYTE sms_check_message_pending(void);
254 // END RAVI - 28-11-2005 254 // END RAVI - 28-11-2005
255 255
256 static SHORT smsidle_get_new_cb_messages_count(void); 256 static SHORT smsidle_get_new_cb_messages_count(void);
257 static T_smsidle smsidle_data; 257 static T_smsidle smsidle_data;
258 static int smsidle_sr_status_to_text_id(UBYTE status); /* Marcus: Issue 1170: 07/10/2002 */ 258 static int smsidle_sr_status_to_text_id(UBYTE status); /* Marcus: Issue 1170: 07/10/2002 */
259 259
260 260
266 static void smsidle_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter); 266 static void smsidle_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter);
267 int smsidle_sms_cb (MfwEvt e, MfwWin *w); 267 int smsidle_sms_cb (MfwEvt e, MfwWin *w);
268 268
269 /******************************************************************************* 269 /*******************************************************************************
270 270
271 $Function: smsidle_start 271 $Function: smsidle_start
272 272
273 $Description: This function will be call once.It is create a static sms handle 273 $Description: This function will be call once.It is create a static sms handle
274 274
275 $Returns: mfw window handler 275 $Returns: mfw window handler
276 276
277 $Arguments: parent_window - Parent window handler 277 $Arguments: parent_window - Parent window handler
278 param - optional data 278 param - optional data
279 279
280 *******************************************************************************/ 280 *******************************************************************************/
281 281
282 T_MFW_HND smsidle_start(T_MFW_HND parent_window, void *param) 282 T_MFW_HND smsidle_start(T_MFW_HND parent_window, void *param)
283 { 283 {
284 T_MFW_HND win; 284 T_MFW_HND win;
286 TRACE_FUNCTION ("smsidle_start()"); 286 TRACE_FUNCTION ("smsidle_start()");
287 287
288 win = smsidle_create (parent_window); 288 win = smsidle_create (parent_window);
289 289
290 if (win NEQ NULL) 290 if (win NEQ NULL)
291 { 291 {
292 SEND_EVENT (win, E_INIT, 0, NULL); 292 SEND_EVENT (win, E_INIT, 0, NULL);
293 } 293 }
294 return win; 294 return win;
295 } 295 }
296 296
297 /******************************************************************************* 297 /*******************************************************************************
298 298
299 $Function: smsidle_create 299 $Function: smsidle_create
300 300
301 $Description: Create sms Idle window 301 $Description: Create sms Idle window
302 302
303 $Returns: mfw window handler 303 $Returns: mfw window handler
304 304
305 $Arguments: parent_window - Parent window handler 305 $Arguments: parent_window - Parent window handler
306 306
307 *******************************************************************************/ 307 *******************************************************************************/
308 static T_MFW_HND smsidle_create(MfwHnd parent_window) 308 static T_MFW_HND smsidle_create(MfwHnd parent_window)
309 { 309 {
310 T_smsidle * data = &smsidle_data; 310 T_smsidle * data = &smsidle_data;
311 T_MFW_WIN * win; 311 T_MFW_WIN * win;
315 /* 315 /*
316 * Create window handler 316 * Create window handler
317 */ 317 */
318 318
319 if (data->win EQ NULL) 319 if (data->win EQ NULL)
320 { 320 {
321 data->win = 321 data->win =
322 win_create (parent_window, 0, 0, NULL); 322 win_create (parent_window, 0, 0, NULL);
323 if (data->win EQ NULL) 323 if (data->win EQ NULL)
324 { 324 {
325 return NULL; 325 return NULL;
326 } 326 }
327 } 327 }
328 else 328 else
329 { 329 {
330 TRACE_EVENT ("smsidle_create() called twice"); 330 TRACE_EVENT ("smsidle_create() called twice");
331 return NULL; 331 return NULL;
332 } 332 }
333 333
334 /* 334 /*
335 * connect the dialog data to the MFW-window 335 * connect the dialog data to the MFW-window
336 */ 336 */
337 337
338 data->mmi_control.dialog = (T_DIALOG_FUNC)smsidle_exec_cb; 338 data->mmi_control.dialog = (T_DIALOG_FUNC)smsidle_exec_cb;
339 data->mmi_control.data = data; 339 data->mmi_control.data = data;
349 return data->win; 349 return data->win;
350 } 350 }
351 351
352 /******************************************************************************* 352 /*******************************************************************************
353 353
354 $Function: smsidle_destroy 354 $Function: smsidle_destroy
355 355
356 $Description: Destroy the sms Idle window. 356 $Description: Destroy the sms Idle window.
357 357
358 $Returns: none 358 $Returns: none
359 359
360 $Arguments: none 360 $Arguments: none
361 361
362 *******************************************************************************/ 362 *******************************************************************************/
363 void smsidle_destroy(void) 363 void smsidle_destroy(void)
364 { 364 {
365 T_MFW_WIN * win_data; 365 T_MFW_WIN * win_data;
366 MfwHnd own_window; 366 MfwHnd own_window;
369 own_window = smsidle_data.win; 369 own_window = smsidle_data.win;
370 370
371 TRACE_FUNCTION ("smsidle_destroy()"); 371 TRACE_FUNCTION ("smsidle_destroy()");
372 372
373 if (own_window) 373 if (own_window)
374 { 374 {
375 win_data = (T_MFW_WIN *)((T_MFW_HDR *)own_window)->data; 375 win_data = (T_MFW_WIN *)((T_MFW_HDR *)own_window)->data;
376 data = (T_smsidle *)win_data->user; 376 data = (T_smsidle *)win_data->user;
377 377
378 if (data) 378 if (data)
379 { 379 {
380 /* 380 /*
381 * Delete WIN handler 381 * Delete WIN handler
382 */ 382 */
383 win_delete (data->win); 383 win_delete (data->win);
384 384
385 /* 385 /*
386 * Free Memory 386 * Free Memory
387 */ 387 */
388 /* Memory is static! */ 388 /* Memory is static! */
389 } 389 }
390 else 390 else
391 { 391 {
392 TRACE_EVENT ("smsidle_destroy() called twice"); 392 TRACE_EVENT ("smsidle_destroy() called twice");
393 return; 393 return;
394 } 394 }
395 } 395 }
396 } 396 }
397 397
398 398
399 399
400 /******************************************************************************* 400 /*******************************************************************************
401 401
402 $Function: smsidle_exec_cb 402 $Function: smsidle_exec_cb
403 403
404 $Description: Call back function for the sms Idle window. 404 $Description: Call back function for the sms Idle window.
405 405
406 $Returns: none 406 $Returns: none
407 407
408 $Arguments: win - current window 408 $Arguments: win - current window
409 event - window event 409 event - window event
410 value - unique id 410 value - unique id
411 parameter - pointer to optional data. 411 parameter - pointer to optional data.
412 412
413 *******************************************************************************/ 413 *******************************************************************************/
414 414
415 void smsidle_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter) 415 void smsidle_exec_cb (T_MFW_HND win, USHORT event, SHORT value, void * parameter)
416 /* callback handler for events sent to to trigger execution */ 416 /* callback handler for events sent to to trigger execution */
417 { 417 {
420 T_MFW_EVENT smsEvents; 420 T_MFW_EVENT smsEvents;
421 421
422 TRACE_FUNCTION ("smsidle_exec_cb()"); 422 TRACE_FUNCTION ("smsidle_exec_cb()");
423 423
424 switch (event) 424 switch (event)
425 { 425 {
426 case E_INIT: 426 case E_INIT:
427 /* initialization of administrative data */ 427 /* initialization of administrative data */
428 data->id = value; 428 data->id = value;
429 429
430 /* initialization of the dialog data */ 430 /* initialization of the dialog data */
431 431
432 sms_init(); /* startup sms in MFW */ 432 sms_init(); /* startup sms in MFW */
433 433
434 smsEvents = 434 smsEvents =
435 E_SMS_MO_AVAIL | E_SMS_CMD_AVAIL | E_SMS_SAVE_AVAIL 435 E_SMS_MO_AVAIL | E_SMS_CMD_AVAIL | E_SMS_SAVE_AVAIL
436 | E_SMS_MT | E_SMS_MO | E_SMS_MT_RECEIVED | E_SMS_STATUS 436 | E_SMS_MT | E_SMS_MO | E_SMS_MT_RECEIVED | E_SMS_STATUS
437 | E_SMS_MEM | E_SMS_OK | E_SMS_ERR | E_SMS_BUSY 437 | E_SMS_MEM | E_SMS_OK | E_SMS_ERR | E_SMS_BUSY
438 | E_SMS_MEM_FULL | E_SMS_MEM_FREE | E_SMS_RECEIVED | E_SMS_CB 438 | E_SMS_MEM_FULL | E_SMS_MEM_FREE | E_SMS_RECEIVED | E_SMS_CB
439 | E_SMS_READY | E_SMS_CB_RECEIVED; 439 | E_SMS_READY | E_SMS_CB_RECEIVED;
440 440
441 441
442 data->sms = sms_create(win, smsEvents, (T_MFW_CB) smsidle_sms_cb); 442 data->sms = sms_create(win, smsEvents, (T_MFW_CB) smsidle_sms_cb);
443 443
444 /* "sms_initialised" indicates that the SMS is ready or not */ 444 /* "sms_initialised" indicates that the SMS is ready or not */
445 /*api - 10-05-02 - Set To True so the SMS can be recieved (Event not Generated) */ 445 /*api - 10-05-02 - Set To True so the SMS can be recieved (Event not Generated) */
446 data->sms_initialised = FALSE; /* SMS not ready yet */ 446 data->sms_initialised = FALSE; /* SMS not ready yet */
447 447
448 /* "sms_store_free" indicates that the SMS Memory is full or not */ 448 /* "sms_store_free" indicates that the SMS Memory is full or not */
449 /* Set default to True !*/ 449 /* Set default to True !*/
450 data->sms_store_free = TRUE; // ??? 450 data->sms_store_free = TRUE; // ???
451 451
452 break; 452 break;
453 case E_BACK: 453 case E_BACK:
454 case E_ABORT: 454 case E_ABORT:
455 case E_EXIT: 455 case E_EXIT:
456 smsidle_destroy(); /* there's no default reaction */ 456 smsidle_destroy(); /* there's no default reaction */
457 sms_delete(data->sms); 457 sms_delete(data->sms);
458 sms_exit(); /* ??? implementation of routine is actually empty */ 458 sms_exit(); /* ??? implementation of routine is actually empty */
459 break; 459 break;
460 default: 460 default:
461 TRACE_EVENT("unhandled event in smsidle_exec_cb()"); 461 TRACE_EVENT("unhandled event in smsidle_exec_cb()");
462 return; 462 return;
463 } 463 }
464 } 464 }
465 /******************************************************************************* 465 /*******************************************************************************
466 466
467 $Function: smsidle_message_to_text 467 $Function: smsidle_message_to_text
468 468
469 $Description: function to format message information into a text string. SPR2363 469 $Description: function to format message information into a text string. SPR2363
470 470
471 $Returns: none 471 $Returns: none
472 472
473 $Arguments: message data structure, text buffer(should be at least MAX_EDITOR_LEN 473 $Arguments: message data structure, text buffer(should be at least MAX_EDITOR_LEN
474 chars long) 474 chars long)
475 475
476 *******************************************************************************/ 476 *******************************************************************************/
477 477
478 void smsidle_message_to_text(T_MFW_SMS_MT* SmsMt, char* text_buffer) 478 void smsidle_message_to_text(T_MFW_SMS_MT* SmsMt, char* text_buffer)
479 { 479 {
480 T_MFW_PHB_ENTRY pb_entry; 480 T_MFW_PHB_ENTRY pb_entry;
481 // UBYTE input_type, output_type; // RAVI 481 // UBYTE input_type, output_type; // RAVI
482 char sms_text_buffer[STANDARD_EDITOR_SIZE]; 482 char sms_text_buffer[STANDARD_EDITOR_SIZE];
483 UBYTE index=0; 483 UBYTE index=0;
484 // UBYTE msg_len; // RAVI 484 // UBYTE msg_len; // RAVI
485 T_ATB_TEXT main_text, temp_text; 485 T_ATB_TEXT main_text, temp_text;
486 char msg_buffer[MAX_MSG_LEN_ARRAY]; /*msg buffer which is used while converting 7-bit encoded system to ASCII*/ 486 char msg_buffer[MAX_MSG_LEN_ARRAY]; /*msg buffer which is used while converting 7-bit encoded system to ASCII*/
487 487
488 488
489 /*clear buffers*/ 489 /*clear buffers*/
490 memset(sms_text_buffer, 0, STANDARD_EDITOR_SIZE); 490 memset(sms_text_buffer, 0, STANDARD_EDITOR_SIZE);
491 memset(text_buffer, 0, MAX_EDITOR_LEN); 491 memset(text_buffer, 0, MAX_EDITOR_LEN);
492 492
493 493
494 494
495 495
496 496
497 /*, if new editor use nice string-handling functions*/ 497 /*, if new editor use nice string-handling functions*/
498 498
499 main_text.data = (UBYTE*)text_buffer; 499 main_text.data = (UBYTE*)text_buffer;
500 /*set up text data stucture for main display string*/ 500 /*set up text data stucture for main display string*/
501 if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) 501 if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE)
502 main_text.dcs = ATB_DCS_UNICODE; 502 main_text.dcs = ATB_DCS_UNICODE;
503 else 503 else
504 main_text.dcs = ATB_DCS_ASCII; 504 main_text.dcs = ATB_DCS_ASCII;
505 ATB_string_Length(&main_text); 505 ATB_string_Length(&main_text);
506 506
507 507
508 /*SPR 2539, if new editor use nice string-handling functions*/ 508 /*SPR 2539, if new editor use nice string-handling functions*/
509 /*see if the sender is in the phonebook*/ 509 /*see if the sender is in the phonebook*/
510 if (bookFindNameInPhonebook((const char*)SmsMt->orig_addr.number, &pb_entry) !=0) 510 if (bookFindNameInPhonebook((const char*)SmsMt->orig_addr.number, &pb_entry) !=0)
511 { char temp_string[PHB_MAX_LEN]; 511 { char temp_string[PHB_MAX_LEN];
512 512
513 memset(temp_string, 0, PHB_MAX_LEN); 513 memset(temp_string, 0, PHB_MAX_LEN);
514 /*copy name into a text data structure*/ 514 /*copy name into a text data structure*/
515 if ((pb_entry.name.dcs&0xC0) == MFW_DCS_UCS2 ||pb_entry.name.data[0] == 0x80 ) 515 if ((pb_entry.name.dcs&0xC0) == MFW_DCS_UCS2 ||pb_entry.name.data[0] == 0x80 )
516 temp_text.dcs = ATB_DCS_UNICODE; 516 temp_text.dcs = ATB_DCS_UNICODE;
517 else 517 else
518 temp_text.dcs = ATB_DCS_ASCII; 518 temp_text.dcs = ATB_DCS_ASCII;
519 if (temp_text.dcs != ATB_DCS_UNICODE) 519 if (temp_text.dcs != ATB_DCS_UNICODE)
520 { 520 {
521 temp_text.data = (UBYTE*)pb_entry.name.data; 521 temp_text.data = (UBYTE*)pb_entry.name.data;
522 } 522 }
523 523
524 else 524 else
525 { pb_entry.name.len-=2; 525 { pb_entry.name.len-=2;
526 memcpy(temp_string, &pb_entry.name.data[2], pb_entry.name.len); 526 memcpy(temp_string, &pb_entry.name.data[2], pb_entry.name.len);
527 temp_text.data = (UBYTE*)temp_string; 527 temp_text.data = (UBYTE*)temp_string;
528 } 528 }
529 ATB_string_Length(&temp_text); 529 ATB_string_Length(&temp_text);
530 /*add name text into main display string*/ 530 /*add name text into main display string*/
531 ATB_string_Concat(&main_text, &temp_text); 531 ATB_string_Concat(&main_text, &temp_text);
532 } 532 }
533 533
534 534
535 535
536 sms_text_buffer[index++]='\n'; 536 sms_text_buffer[index++]='\n';
537 537
538 sms_text_buffer[index++]='0'+SmsMt->sctp.day[0]; 538 sms_text_buffer[index++]='0'+SmsMt->sctp.day[0];
539 sms_text_buffer[index++]='0'+SmsMt->sctp.day[1]; 539 sms_text_buffer[index++]='0'+SmsMt->sctp.day[1];
540 sms_text_buffer[index++]='/'; 540 sms_text_buffer[index++]='/';
541 sms_text_buffer[index++]='0'+SmsMt->sctp.month[0]; 541 sms_text_buffer[index++]='0'+SmsMt->sctp.month[0];
542 sms_text_buffer[index++]='0'+SmsMt->sctp.month[1]; 542 sms_text_buffer[index++]='0'+SmsMt->sctp.month[1];
543 sms_text_buffer[index++]='/'; 543 sms_text_buffer[index++]='/';
544 sms_text_buffer[index++]='0'+SmsMt->sctp.year[0]; 544 sms_text_buffer[index++]='0'+SmsMt->sctp.year[0];
545 sms_text_buffer[index++]='0'+SmsMt->sctp.year[1]; 545 sms_text_buffer[index++]='0'+SmsMt->sctp.year[1];
546 sms_text_buffer[index++]=','; 546 sms_text_buffer[index++]=',';
547 sms_text_buffer[index++]='\n'; 547 sms_text_buffer[index++]='\n';
548 548
549 sms_text_buffer[index++] ='0'+SmsMt->sctp.hour[0]; 549 sms_text_buffer[index++] ='0'+SmsMt->sctp.hour[0];
550 sms_text_buffer[index++]='0'+SmsMt->sctp.hour[1]; 550 sms_text_buffer[index++]='0'+SmsMt->sctp.hour[1];
551 sms_text_buffer[index++]=':'; 551 sms_text_buffer[index++]=':';
552 sms_text_buffer[index++]='0'+SmsMt->sctp.minute[0]; 552 sms_text_buffer[index++]='0'+SmsMt->sctp.minute[0];
553 sms_text_buffer[index++]='0'+SmsMt->sctp.minute[1]; 553 sms_text_buffer[index++]='0'+SmsMt->sctp.minute[1];
554 sms_text_buffer[index++]='\n'; 554 sms_text_buffer[index++]='\n';
555 555
556 /* if new editor use nice string-handling functions*/ 556 /* if new editor use nice string-handling functions*/
557 557
558 temp_text.dcs = ATB_DCS_ASCII; 558 temp_text.dcs = ATB_DCS_ASCII;
559 temp_text.data = (UBYTE*)sms_text_buffer; 559 temp_text.data = (UBYTE*)sms_text_buffer;
560 ATB_string_Length(&temp_text); 560 ATB_string_Length(&temp_text);
561 ATB_string_Concat(&main_text, &temp_text); 561 ATB_string_Concat(&main_text, &temp_text);
562 // Apr 27, 2004 REF: CRR 21336 Deepa M.D 562 // Apr 27, 2004 REF: CRR 21336 Deepa M.D
563 //Check for the Alphabet bits(2nd and 3rd bits) in the DCS.(GSM 03.38 version 5.6.1,Section 4) 563 //Check for the Alphabet bits(2nd and 3rd bits) in the DCS.(GSM 03.38 version 5.6.1,Section 4)
564 //Bit 3 and 2 are equal to 1 &0 indicates UCS2 coding 564 //Bit 3 and 2 are equal to 1 &0 indicates UCS2 coding
565 /*a0393213(R.Prabakar) OMAPS00130278 - MS fails to display class 0 MT SMS when it contains alphanumeric and special characters. 565 /*a0393213(R.Prabakar) OMAPS00130278 - MS fails to display class 0 MT SMS when it contains alphanumeric and special characters.
566 DCS was not properly interpreted. Now its' done according to GSM 03.38 ver 7.2.0*/ 566 DCS was not properly interpreted. Now its' done according to GSM 03.38 ver 7.2.0*/
567 567
568 if((SmsMt->dcs & 0xC0) == 0x00) 568 if((SmsMt->dcs & 0xC0) == 0x00)
569 { 569 {
570 switch(SmsMt->dcs & 0x0C) 570 switch(SmsMt->dcs & 0x0C)
571 { 571 {
572 case 0x08: 572 case 0x08:
573 temp_text.dcs = ATB_DCS_UNICODE; 573 temp_text.dcs = ATB_DCS_UNICODE;
574 temp_text.data = (UBYTE*)SmsMt->sms_msg; 574 temp_text.data = (UBYTE*)SmsMt->sms_msg;
575 break; 575 break;
576 case 0x04: 576 case 0x04:
577 temp_text.dcs=ATB_DCS_ASCII; 577 temp_text.dcs=ATB_DCS_ASCII;
578 temp_text.data = (UBYTE*)SmsMt->sms_msg; 578 temp_text.data = (UBYTE*)SmsMt->sms_msg;
579 break; 579 break;
580 case 0x00: 580 case 0x00:
581 { 581 {
582 /*default alphabet (7 bit) - convert to ASCII*/ 582 /*default alphabet (7 bit) - convert to ASCII*/
583 convertUnpacked7To8(SmsMt->sms_msg, SmsMt->msg_len, 583 convertUnpacked7To8(SmsMt->sms_msg, SmsMt->msg_len,
584 msg_buffer, sizeof(msg_buffer)); 584 msg_buffer, sizeof(msg_buffer));
585 temp_text.dcs=ATB_DCS_ASCII; 585 temp_text.dcs=ATB_DCS_ASCII;
586 temp_text.data = (UBYTE*)msg_buffer; 586 temp_text.data = (UBYTE*)msg_buffer;
587 } 587 }
588 break; 588 break;
589 default: 589 default:
590 TRACE_ERROR("smsidle_message_to_text() : Unknown DCS"); 590 TRACE_ERROR("smsidle_message_to_text() : Unknown DCS");
591 } 591 }
592 592
593 } 593 }
594 else if((SmsMt->dcs & 0xF0) == 0xF0) 594 else if((SmsMt->dcs & 0xF0) == 0xF0)
595 { 595 {
596 switch(SmsMt->dcs & 0x04) 596 switch(SmsMt->dcs & 0x04)
597 { 597 {
598 case 0x04: 598 case 0x04:
599 temp_text.dcs=ATB_DCS_ASCII; 599 temp_text.dcs=ATB_DCS_ASCII;
600 temp_text.data = (UBYTE*)SmsMt->sms_msg; 600 temp_text.data = (UBYTE*)SmsMt->sms_msg;
601 break; 601 break;
602 case 0x00: 602 case 0x00:
603 { 603 {
604 /*default alphabet (7 bit) - convert to ASCII*/ 604 /*default alphabet (7 bit) - convert to ASCII*/
605 convertUnpacked7To8(SmsMt->sms_msg, SmsMt->msg_len, 605 convertUnpacked7To8(SmsMt->sms_msg, SmsMt->msg_len,
606 msg_buffer, sizeof(msg_buffer)); 606 msg_buffer, sizeof(msg_buffer));
607 temp_text.dcs=ATB_DCS_ASCII; 607 temp_text.dcs=ATB_DCS_ASCII;
608 temp_text.data = (UBYTE*)msg_buffer; 608 temp_text.data = (UBYTE*)msg_buffer;
609 } 609 }
610 break; 610 break;
611 default: 611 default:
612 TRACE_ERROR("smsidle_message_to_text() : Unknown DCS"); 612 TRACE_ERROR("smsidle_message_to_text() : Unknown DCS");
613 613
614 } 614 }
615 } 615 }
616 else 616 else
617 { 617 {
618 TRACE_ERROR("smsidle_message_to_text() : Unknown DCS"); 618 TRACE_ERROR("smsidle_message_to_text() : Unknown DCS");
619 } 619 }
620 620
621 /*if ((SmsMt->dcs&0x0C) == MFW_DCS_UCS2) 621 /*if ((SmsMt->dcs&0x0C) == MFW_DCS_UCS2)
622 temp_text.dcs = ATB_DCS_UNICODE; 622 temp_text.dcs = ATB_DCS_UNICODE;
623 else 623 else
624 temp_text.dcs = ATB_DCS_ASCII;*/ 624 temp_text.dcs = ATB_DCS_ASCII;*/
625 625
626 ATB_string_Length(&temp_text); 626 ATB_string_Length(&temp_text);
627 /*Add date and time to main display string*/ 627 /*Add date and time to main display string*/
628 ATB_string_Concat(&main_text, &temp_text); 628 ATB_string_Concat(&main_text, &temp_text);
629 629
630 630
631 631
632 } 632 }
633 633
634 634
635 /******************************************************************************* 635 /*******************************************************************************
636 636
637 $Function: smsidle_sms_cb 637 $Function: smsidle_sms_cb
638 638
639 $Description: Call back function for the sms Idle window. 639 $Description: Call back function for the sms Idle window.
640 640
641 $Returns: none 641 $Returns: none
642 642
643 $Arguments: event - window event 643 $Arguments: event - window event
644 w - current window 644 w - current window
645 *******************************************************************************/ 645 *******************************************************************************/
646 int smsidle_sms_cb (MfwEvt event, MfwWin *w) 646 int smsidle_sms_cb (MfwEvt event, MfwWin *w)
647 /* smsidle's sms event handler */ 647 /* smsidle's sms event handler */
648 { 648 {
649 T_MFW_HND win = mfwParent((MfwHdr *)mfw_header()); 649 T_MFW_HND win = mfwParent((MfwHdr *)mfw_header());
650 T_MFW_WIN * win_data = (T_MFW_WIN *)((T_MFW_HDR *)win)->data; 650 T_MFW_WIN * win_data = (T_MFW_WIN *)((T_MFW_HDR *)win)->data;
651 T_smsidle * data = (T_smsidle *)win_data->user; 651 T_smsidle * data = (T_smsidle *)win_data->user;
652 /*cq 15633 get current ringer settings */ 652 /*cq 15633 get current ringer settings */
653 UBYTE currentRinger = getCurrentRingerSettings(); 653 UBYTE currentRinger = getCurrentRingerSettings();
654 654
655 /*JVJ SPR1298 Converted to dynamic variable */ 655 /*JVJ SPR1298 Converted to dynamic variable */
656 //May 27, 2005 MMI-FIX-29869 x0018858 656 //May 27, 2005 MMI-FIX-29869 x0018858
657 #ifdef FF_MMI_SMS_DYNAMIC 657 #ifdef FF_MMI_SMS_DYNAMIC
658 T_MFW_SMS_IDX* msg_list; 658 T_MFW_SMS_IDX* msg_list;
659 T_MFW_SMS_IDX* urd_msg_list; 659 T_MFW_SMS_IDX* urd_msg_list;
660 #else 660 #else
661 T_MFW_SMS_IDX* msg_list= (T_MFW_SMS_IDX*)ALLOC_MEMORY(MAX_MESSAGES*sizeof(T_MFW_SMS_IDX)); 661 T_MFW_SMS_IDX* msg_list= (T_MFW_SMS_IDX*)ALLOC_MEMORY(MAX_MESSAGES*sizeof(T_MFW_SMS_IDX));
662 T_MFW_SMS_IDX* urd_msg_list= (T_MFW_SMS_IDX*)ALLOC_MEMORY(MAX_MESSAGES*sizeof(T_MFW_SMS_IDX)); 662 T_MFW_SMS_IDX* urd_msg_list= (T_MFW_SMS_IDX*)ALLOC_MEMORY(MAX_MESSAGES*sizeof(T_MFW_SMS_IDX));
663 #endif 663 #endif
664 SHORT urd_count; 664 SHORT urd_count;
665 // UBYTE alphabet; // RAVI 665 // UBYTE alphabet; // RAVI
666 /*JVJ SPR1298 Converted to dynamic variable */ 666 /*JVJ SPR1298 Converted to dynamic variable */
667 char* temp_buffer = NULL; 667 char* temp_buffer = NULL;
668 int result = MFW_EVENT_CONSUMED; 668 int result = MFW_EVENT_CONSUMED;
669 669
670 //May 27, 2005 MMI-FIX-29869 x0018858 670 //May 27, 2005 MMI-FIX-29869 x0018858
671 #ifdef FF_MMI_SMS_DYNAMIC 671 #ifdef FF_MMI_SMS_DYNAMIC
672 Check_max_sms_allowed(); 672 Check_max_sms_allowed();
673 673
674 msg_list = (T_MFW_SMS_IDX*)ALLOC_MEMORY(g_max_messages*sizeof(T_MFW_SMS_IDX)); 674 msg_list = (T_MFW_SMS_IDX*)ALLOC_MEMORY(g_max_messages*sizeof(T_MFW_SMS_IDX));
675 urd_msg_list = (T_MFW_SMS_IDX*)ALLOC_MEMORY(g_max_messages*sizeof(T_MFW_SMS_IDX)); 675 urd_msg_list = (T_MFW_SMS_IDX*)ALLOC_MEMORY(g_max_messages*sizeof(T_MFW_SMS_IDX));
676 #endif 676 #endif
677 677
678 TRACE_EVENT ("smsidle_sms_cb()"); 678 TRACE_EVENT ("smsidle_sms_cb()");
679 679
680 switch (event) 680 switch (event)
681 { 681 {
682 case E_SMS_READY: 682 case E_SMS_READY:
683 TRACE_EVENT ("E_SMS_READY"); 683 TRACE_EVENT ("E_SMS_READY");
684 /* now sms is now ready for using */ 684 /* now sms is now ready for using */
685 data->sms_initialised = TRUE; 685 data->sms_initialised = TRUE;
686 sms_set_mt_ind(MT_IND_IDX); /* MMI-FIX-17223. Needed for class 0 messages not to be stored in SIM */ 686 sms_set_mt_ind(MT_IND_IDX); /* MMI-FIX-17223. Needed for class 0 messages not to be stored in SIM */
687 sms_cb_init(); /*SPR 2470 initialise cell broadcast now SMS has initialised*/ 687 sms_cb_init(); /*SPR 2470 initialise cell broadcast now SMS has initialised*/
688 smscb_getCBsettings(); /* Get CB info from SIM or phone */ 688 smscb_getCBsettings(); /* Get CB info from SIM or phone */
689 #ifdef MMI_HOMEZONE_ENABLED 689 #ifdef MMI_HOMEZONE_ENABLED
690 //Jun 14, 2005 REF: MMI-FIX-30439 x0018858 690 //Jun 14, 2005 REF: MMI-FIX-30439 x0018858
691 //Commented the function call, 691 //Commented the function call,
692 //homezoneActivateCB(); /* SPR759 - SH - Activate Cell Broadcast channel for homezone */ 692 //homezoneActivateCB(); /* SPR759 - SH - Activate Cell Broadcast channel for homezone */
693 #endif 693 #endif
694 694
695 break; 695 break;
696 case E_SMS_MT_RECEIVED: /* new SMS received, automatically saved */ 696 case E_SMS_MT_RECEIVED: /* new SMS received, automatically saved */
697 case E_SMS_MT: /* new SMS received, NOT automatically saved */ 697 case E_SMS_MT: /* new SMS received, NOT automatically saved */
698 { 698 {
699 699
700 /*SPR#1408 - DS - Take the SMS data from MFW. Port of 1669 */ 700 /*SPR#1408 - DS - Take the SMS data from MFW. Port of 1669 */
701 T_MFW_SMS_MT *Message = (T_MFW_SMS_MT *) w; 701 T_MFW_SMS_MT *Message = (T_MFW_SMS_MT *) w;
702 702
703 // check for SMS indicating voice mail. 703 // check for SMS indicating voice mail.
704 //May 27, 2005 MMI-FIX-29869 x0018858 704 //May 27, 2005 MMI-FIX-29869 x0018858
705 #ifdef FF_MMI_SMS_DYNAMIC 705 #ifdef FF_MMI_SMS_DYNAMIC
706 urd_count = sms_index_list(MFW_SMS_UNREAD,urd_msg_list,g_max_messages); 706 urd_count = sms_index_list(MFW_SMS_UNREAD,urd_msg_list,g_max_messages);
707 707
708 sms_index_list(MFW_SMS_VOICE,msg_list,g_max_messages); 708 sms_index_list(MFW_SMS_VOICE,msg_list,g_max_messages);
709 #else 709 #else
710 urd_count=sms_index_list(MFW_SMS_UNREAD,urd_msg_list,MAX_MESSAGES); 710 urd_count=sms_index_list(MFW_SMS_UNREAD,urd_msg_list,MAX_MESSAGES);
711 711
712 sms_index_list(MFW_SMS_VOICE,msg_list,MAX_MESSAGES); 712 sms_index_list(MFW_SMS_VOICE,msg_list,MAX_MESSAGES);
713 #endif 713 #endif
714 TRACE_EVENT_P4("urd_count %d urd_msg_list-> index %d stat %d msg_type %d", 714 TRACE_EVENT_P4("urd_count %d urd_msg_list-> index %d stat %d msg_type %d",
715 urd_count,urd_msg_list[0].index,urd_msg_list[0].stat,urd_msg_list[0].msg_type); 715 urd_count,urd_msg_list[0].index,urd_msg_list[0].stat,urd_msg_list[0].msg_type);
716 716
717 TRACE_EVENT_P2("msg_type: %d, Message->voicemail: %d", msg_list[0].msg_type, Message->voicemail); 717 TRACE_EVENT_P2("msg_type: %d, Message->voicemail: %d", msg_list[0].msg_type, Message->voicemail);
718 718
719 //Check SMS indicating voice mail is the received SMS, by checking index is the same. 719 //Check SMS indicating voice mail is the received SMS, by checking index is the same.
720 /*SPR#1408 - DS - Added check for voicemail flag. 720 /*SPR#1408 - DS - Added check for voicemail flag.
721 *For E_SMS_MT_RECEIVED messages the MFW flags the message as a voicemail by setting the 721 *For E_SMS_MT_RECEIVED messages the MFW flags the message as a voicemail by setting the
722 *msg_type to MFW_SMS_VOICE. For E_SMS_MT messages the MFW flags as a voicemail by 722 *msg_type to MFW_SMS_VOICE. For E_SMS_MT messages the MFW flags as a voicemail by
723 *setting a boolean in the SMS MT structure. Port of 1669 (then modified). 723 *setting a boolean in the SMS MT structure. Port of 1669 (then modified).
724 */ 724 */
725 if ( ( (event == E_SMS_MT_RECEIVED) && (msg_list[0].msg_type == MFW_SMS_VOICE) ) || 725 if ( ( (event == E_SMS_MT_RECEIVED) && (msg_list[0].msg_type == MFW_SMS_VOICE) ) ||
726 ( (event == E_SMS_MT) && (Message->voicemail == TRUE) ) ) 726 ( (event == E_SMS_MT) && (Message->voicemail == TRUE) ) )
727 { 727 {
728 if(iconsGetState(iconIdVoice) == ICON_VISIBLE || (Delete_1_2_1_vm_icon == TRUE)) 728 if(iconsGetState(iconIdVoice) == ICON_VISIBLE || (Delete_1_2_1_vm_icon == TRUE))
729 { 729 {
730 if (iconsGetState(iconIdVoice) == ICON_VISIBLE && Display_1_2_1_vm_icon == TRUE) 730 if (iconsGetState(iconIdVoice) == ICON_VISIBLE && Display_1_2_1_vm_icon == TRUE)
731 { 731 {
732 // one-2-one only functionality, do nothing as icon is already being displayed. 732 // one-2-one only functionality, do nothing as icon is already being displayed.
733 break; 733 break;
734 } 734 }
735 else 735 else
736 { 736 {
737 Delete_1_2_1_vm_icon = FALSE; 737 Delete_1_2_1_vm_icon = FALSE;
738 Display_1_2_1_vm_icon = FALSE; 738 Display_1_2_1_vm_icon = FALSE;
739 iconsDeleteState(iconIdVoice); 739 iconsDeleteState(iconIdVoice);
740 } 740 }
741 } 741 }
742 else 742 else
743 { 743 {
744 iconsSetState(iconIdVoice); /* display voice mail icon.*/ 744 iconsSetState(iconIdVoice); /* display voice mail icon.*/
745 //Apr 05, 2005 REF: ENH 29994 xdeepadh 745 //Apr 05, 2005 REF: ENH 29994 xdeepadh
746 //Nov 02, 2005 REF:ER OMAPS00039044 xdeepadh 746 //Nov 02, 2005 REF:ER OMAPS00039044 xdeepadh
747 //Play the SMS tone alert 747 //Play the SMS tone alert
748 #ifdef FF_MIDI_RINGER 748 #ifdef FF_MIDI_RINGER
749 mfw_ringer_start(AS_RINGER_MODE_SMS,false,sounds_midi_ringer_start_cb); 749 mfw_ringer_start(AS_RINGER_MODE_SMS,false,sounds_midi_ringer_start_cb);
750 #else 750 #else
751 751
752 #ifdef FF_MMI_RINGTONE /* MSL SMS Tone Play */ 752 #ifdef FF_MMI_RINGTONE /* MSL SMS Tone Play */
753 audio_PlaySoundID( AUDIO_BUZZER, SMSTONE_SELECT, 200, AUDIO_PLAY_ONCE ); 753 audio_PlaySoundID( AUDIO_BUZZER, SMSTONE_SELECT, 200, AUDIO_PLAY_ONCE );
754 #else 754 #else
755 /* RAVI - 20-1-2006 */ 755 /* RAVI - 20-1-2006 */
756 #ifdef NEPTUNE_BOARD 756 #ifdef NEPTUNE_BOARD
757 { 757 {
758 UBYTE currentVoiceTone; 758 UBYTE currentVoiceTone;
759 currentVoiceTone = getcurrentVoiceTone(); 759 currentVoiceTone = getcurrentVoiceTone();
760 audio_PlaySoundID( AUDIO_BUZZER, currentVoiceTone, 200, 760 audio_PlaySoundID( AUDIO_BUZZER, currentVoiceTone, 200,
761 AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ 761 AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */
762 } 762 }
763 #else 763 #else
764 { 764 {
765 UBYTE currentVoiceTone; 765 UBYTE currentVoiceTone;
766 currentVoiceTone = getcurrentVoiceTone(); 766 currentVoiceTone = getcurrentVoiceTone();
767 audio_PlaySoundID( AUDIO_BUZZER, currentVoiceTone, 200, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ 767 audio_PlaySoundID( AUDIO_BUZZER, currentVoiceTone, 200, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */
768 } 768 }
769 #endif 769 #endif
770 770
771 #endif 771 #endif
772 #endif 772 #endif
773 mme_backlightEvent(BL_INCOMING_SMS); 773 mme_backlightEvent(BL_INCOMING_SMS);
774 } 774 }
775 775
776 /* Set */ 776 /* Set */
777 #ifdef NEPTUNE_BOARD 777 #ifdef NEPTUNE_BOARD
778 #ifdef MMI_POWER_MANAGEMENT_TEST 778 #ifdef MMI_POWER_MANAGEMENT_TEST
779 iSmsArrival = 1; 779 iSmsArrival = 1;
780 #endif 780 #endif
781 #endif 781 #endif
782 idleEvent(IdleUpdate); /* update the idle screen.*/ 782 idleEvent(IdleUpdate); /* update the idle screen.*/
783 783
784 784
785 785
786 // Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar 786 // Feb 16, 2005 REF: CRR MMI-SPR-27900 xnkulkar
787 // Check if this voice mail sms is marked for deletion (belonging to group "1100") 787 // Check if this voice mail sms is marked for deletion (belonging to group "1100")
788 if(msg_list[0].stat == MFW_SMS_VOICEMSG_DELETE) 788 if(msg_list[0].stat == MFW_SMS_VOICEMSG_DELETE)
789 { 789 {
790 //Delete this voice mail sms and set 'invalidVm' flag to FALSE 790 //Delete this voice mail sms and set 'invalidVm' flag to FALSE
791 /*a0393213 OMAPS00109953 - memory passed as parameter*/ 791 /*a0393213 OMAPS00109953 - memory passed as parameter*/
792 sms_msg_delete(msg_list[0].index,msg_list[0].memory); 792 sms_msg_delete(msg_list[0].index,msg_list[0].memory);
793 invalidVm = FALSE; 793 invalidVm = FALSE;
794 } 794 }
795 } 795 }
796 else if(urd_count > 0 && urd_msg_list[0].stat == MFW_SMS_UNREAD && (event != E_SMS_MT)) 796 else if(urd_count > 0 && urd_msg_list[0].stat == MFW_SMS_UNREAD && (event != E_SMS_MT))
797 { 797 {
798 798
799 /* Set */ 799 /* Set */
800 #ifdef NEPTUNE_BOARD 800 #ifdef NEPTUNE_BOARD
801 #ifdef MMI_POWER_MANAGEMENT_TEST 801 #ifdef MMI_POWER_MANAGEMENT_TEST
802 iSmsArrival = 1; 802 iSmsArrival = 1;
803 #endif 803 #endif
804 #endif 804 #endif
805 805
806 /* set the status: The sms icon and the string*/ 806 /* set the status: The sms icon and the string*/
807 /* "message(s) received" will be displayed */ 807 /* "message(s) received" will be displayed */
808 iconsSetState(iconIdSMS); /* Indicate SMS delivery to MS-User. */ 808 iconsSetState(iconIdSMS); /* Indicate SMS delivery to MS-User. */
809 idleEvent(IdleNewSmsMessage); 809 idleEvent(IdleNewSmsMessage);
810 //Apr 05, 2005 REF: ENH 29994 xdeepadh 810 //Apr 05, 2005 REF: ENH 29994 xdeepadh
811 //Nov 02, 2005 REF:ER OMAPS00039044 xdeepadh 811 //Nov 02, 2005 REF:ER OMAPS00039044 xdeepadh
812 //Play the SMS tone alert 812 //Play the SMS tone alert
813 //If SMS is recieved , while in call screen,dont play the tone. 813 //If SMS is recieved , while in call screen,dont play the tone.
814 814
815 815
816 /* Added Condtion( if((!(call_data.calls.numCalls))) ) to stop the 816 /* Added Condtion( if((!(call_data.calls.numCalls))) ) to stop the
817 SMS tone when call is active - OMAPS00066134 817 SMS tone when call is active - OMAPS00066134
818 */ 818 */
819 if((!(call_data.calls.numCalls))) 819 if((!(call_data.calls.numCalls)))
820 { 820 {
821 #ifdef FF_MIDI_RINGER 821 #ifdef FF_MIDI_RINGER
822 mfw_ringer_start(AS_RINGER_MODE_SMS,false,sounds_midi_ringer_start_cb); 822 mfw_ringer_start(AS_RINGER_MODE_SMS,false,sounds_midi_ringer_start_cb);
823 #else 823 #else
824 824
825 #ifdef NEPTUNE_BOARD 825 #ifdef NEPTUNE_BOARD
826 826
827 #ifdef FF_MMI_RINGTONE /* MSL SMS Tone Play */ 827 #ifdef FF_MMI_RINGTONE /* MSL SMS Tone Play */
828 audio_PlaySoundID( AUDIO_BUZZER, SMSTONE_SELECT, 200, AUDIO_PLAY_ONCE ); 828 audio_PlaySoundID( AUDIO_BUZZER, SMSTONE_SELECT, 200, AUDIO_PLAY_ONCE );
829 #else 829 #else
830 { 830 {
831 UBYTE currentSMSTone; 831 UBYTE currentSMSTone;
832 currentSMSTone = getcurrentSMSTone(); 832 currentSMSTone = getcurrentSMSTone();
833 audio_PlaySoundID( AUDIO_BUZZER, currentSMSTone, 833 audio_PlaySoundID( AUDIO_BUZZER, currentSMSTone,
834 getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ 834 getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */
835 } 835 }
836 #endif 836 #endif
837 #else 837 #else
838 { 838 {
839 UBYTE currentSMSTone; 839 UBYTE currentSMSTone;
840 currentSMSTone = getcurrentSMSTone(); 840 currentSMSTone = getcurrentSMSTone();
841 audio_PlaySoundID( AUDIO_BUZZER, currentSMSTone, 200, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ 841 audio_PlaySoundID( AUDIO_BUZZER, currentSMSTone, 200, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */
842 } 842 }
843 #endif 843 #endif
844 #endif 844 #endif
845 } 845 }
846 // Sep 04, 2006 REF:OMAPS00092060 x0039928 846 // Sep 04, 2006 REF:OMAPS00092060 x0039928
847 // Fix: A tone is played for incoming SMS during a call. 847 // Fix: A tone is played for incoming SMS during a call.
848 else 848 else
849 { 849 {
850 #ifdef FF_MIDI_RINGER 850 #ifdef FF_MIDI_RINGER
851 audio_PlaySoundID( AUDIO_SPEAKER, TONES_RINGING_TONE, 0 , AUDIO_PLAY_ONCE); 851 audio_PlaySoundID( AUDIO_SPEAKER, TONES_RINGING_TONE, 0 , AUDIO_PLAY_ONCE);
852 #endif 852 #endif
853 } 853 }
854 /* cq15633 If the Incoming call alert screen is active continue with the incoming call ringer after playing the 854 /* cq15633 If the Incoming call alert screen is active continue with the incoming call ringer after playing the
855 the SMS received tone. 23-03-04 MZ. */ 855 the SMS received tone. 23-03-04 MZ. */
856 //Apr 05, 2005 REF: ENH 29994 xdeepadh 856 //Apr 05, 2005 REF: ENH 29994 xdeepadh
857 #ifndef FF_MIDI_RINGER 857 #ifndef FF_MIDI_RINGER
858 if(TRUE == call_IsAlertScreenActive()) 858 if(TRUE == call_IsAlertScreenActive())
859 { 859 {
860 #ifdef FF_MMI_RINGTONE /* MSL SMS Tone Play */ 860 #ifdef FF_MMI_RINGTONE /* MSL SMS Tone Play */
861 audio_PlaySoundID(AUDIO_BUZZER, SMSTONE_SELECT, 0 , AUDIO_PLAY_INFINITE); 861 audio_PlaySoundID(AUDIO_BUZZER, SMSTONE_SELECT, 0 , AUDIO_PLAY_INFINITE);
862 #else 862 #else
863 /* RAVI - 20-1-2006 */ 863 /* RAVI - 20-1-2006 */
864 /* Silent Implementation */ 864 /* Silent Implementation */
865 #ifdef NEPTUNE_BOARD 865 #ifdef NEPTUNE_BOARD
866 audio_PlaySoundID(AUDIO_BUZZER, currentRinger, 866 audio_PlaySoundID(AUDIO_BUZZER, currentRinger,
867 getCurrentVoulmeSettings(), AUDIO_PLAY_INFINITE); 867 getCurrentVoulmeSettings(), AUDIO_PLAY_INFINITE);
868 #else 868 #else
869 audio_PlaySoundID(AUDIO_BUZZER, currentRinger, 0 , AUDIO_PLAY_INFINITE); 869 audio_PlaySoundID(AUDIO_BUZZER, currentRinger, 0 , AUDIO_PLAY_INFINITE);
870 #endif 870 #endif
871 /* END RAVI */ 871 /* END RAVI */
872 872
873 #endif 873 #endif
874 } 874 }
875 #endif 875 #endif
876 876
877 mme_backlightEvent(BL_INCOMING_SMS); 877 mme_backlightEvent(BL_INCOMING_SMS);
878 } 878 }
879 /*NM p029*/ 879 /*NM p029*/
880 /* API - Implemented NM changes from 3.3.3 mainline to show class 0 SMS on idle screen */ 880 /* API - Implemented NM changes from 3.3.3 mainline to show class 0 SMS on idle screen */
881 else if(event == E_SMS_MT) /* this sms identifier "E_SMS_MT" is not saved on the SIM */ 881 else if(event == E_SMS_MT) /* this sms identifier "E_SMS_MT" is not saved on the SIM */
882 { 882 {
883 /* take the SMS data from MFW */ 883 /* take the SMS data from MFW */
884 T_MFW_SMS_MT *Message = (T_MFW_SMS_MT *) w; 884 T_MFW_SMS_MT *Message = (T_MFW_SMS_MT *) w;
885 char* temp_buffer_sms = (char*)ALLOC_MEMORY(MAX_EDITOR_LEN); 885 char* temp_buffer_sms = (char*)ALLOC_MEMORY(MAX_EDITOR_LEN);
886 /* Marcus: Issue 1650: 28/01/2003: Start */ 886 /* Marcus: Issue 1650: 28/01/2003: Start */
887 TRACE_EVENT ("E_SMS_MT"); 887 TRACE_EVENT ("E_SMS_MT");
888 /* check for the class 0 message */ 888 /* check for the class 0 message */
889 TRACE_EVENT_P1("dcs: 0x%02X", Message->dcs); 889 TRACE_EVENT_P1("dcs: 0x%02X", Message->dcs);
890 /*if memory allocation successful*/ 890 /*if memory allocation successful*/
891 891
892 if (temp_buffer_sms != NULL) 892 if (temp_buffer_sms != NULL)
893 { 893 {
894 if ((Message->dcs & TEXT_CLASS_GIVEN) && 894 if ((Message->dcs & TEXT_CLASS_GIVEN) &&
895 ((Message->dcs & TEXT_CLASS_MASK) == TEXT_CLASS_0)) 895 ((Message->dcs & TEXT_CLASS_MASK) == TEXT_CLASS_0))
896 { 896 {
897 TRACE_EVENT ("Class 0 message"); 897 TRACE_EVENT ("Class 0 message");
898 898
899 /* 899 /*
900 ** SPR#1745 NDH Text from ACI may be compressed. if so 900 ** SPR#1745 NDH Text from ACI may be compressed. if so
901 ** the text will need to be converted to ASCII before it can 901 ** the text will need to be converted to ASCII before it can
902 ** be displayed properly 902 ** be displayed properly
903 */ 903 */
904 if (Message->dcs & TEXT_COMPRESSED) 904 if (Message->dcs & TEXT_COMPRESSED)
905 { 905 {
906 906
907 TRACE_EVENT ("text_compressed"); 907 TRACE_EVENT ("text_compressed");
908 908
909 /* 909 /*
910 ACI already (in case of 7bit-dcs!) extract the 7 bit to 8 bit, 910 ACI already (in case of 7bit-dcs!) extract the 7 bit to 8 bit,
911 so this is what we get and we have just only to decode from 911 so this is what we get and we have just only to decode from
912 7Bit-Default to ASCII 912 7Bit-Default to ASCII
913 */ 913 */
914 914
915 /*SPR 2512, convert message into a text string and then send to idle for display*/ 915 /*SPR 2512, convert message into a text string and then send to idle for display*/
916 smsidle_message_to_text(Message, temp_buffer_sms); 916 smsidle_message_to_text(Message, temp_buffer_sms);
917 addCBCH(temp_buffer_sms, IdleNewSmsMessage); 917 addCBCH(temp_buffer_sms, IdleNewSmsMessage);
918 918
919 919
920 920
921 921
922 } 922 }
923 else 923 else
924 { 924 {
925 TRACE_EVENT ("text_uncompressed"); 925 TRACE_EVENT ("text_uncompressed");
926 926
927 927
928 /*SPR 2512, convert message into a text string and then send to idle for display*/ 928 /*SPR 2512, convert message into a text string and then send to idle for display*/
929 smsidle_message_to_text(Message, temp_buffer_sms); 929 smsidle_message_to_text(Message, temp_buffer_sms);
930 addCBCH(temp_buffer_sms, IdleNewSmsMessage); 930 addCBCH(temp_buffer_sms, IdleNewSmsMessage);
931 931
932 932
933 } 933 }
934 /* 934 /*
935 ** SPR#1745 - End 935 ** SPR#1745 - End
936 */ 936 */
937 /* Added Condtion( if((!(call_data.calls.numCalls))) ) to stop the 937 /* Added Condtion( if((!(call_data.calls.numCalls))) ) to stop the
938 ring tone when call is active - OMAPS00066134 938 ring tone when call is active - OMAPS00066134
939 */ 939 */
940 #ifdef NEPTUNE_BOARD 940 #ifdef NEPTUNE_BOARD
941 if((!(call_data.calls.numCalls))) 941 if((!(call_data.calls.numCalls)))
942 { 942 {
943 #endif 943 #endif
944 /*CQ10826 - API - 27/06/03 - Add audio indication for class 0 SMS*/ 944 /*CQ10826 - API - 27/06/03 - Add audio indication for class 0 SMS*/
945 //Apr 05, 2005 REF: ENH 29994 xdeepadh 945 //Apr 05, 2005 REF: ENH 29994 xdeepadh
946 //Nov 02, 2005 REF:ER OMAPS00039044 xdeepadh 946 //Nov 02, 2005 REF:ER OMAPS00039044 xdeepadh
947 #ifdef FF_MIDI_RINGER 947 #ifdef FF_MIDI_RINGER
948 mfw_ringer_start(AS_RINGER_MODE_SMS,false,sounds_midi_ringer_start_cb); 948 mfw_ringer_start(AS_RINGER_MODE_SMS,false,sounds_midi_ringer_start_cb);
949 #else 949 #else
950 950
951 #ifdef FF_MMI_RINGTONE /* MSL SMS Tone Play */ 951 #ifdef FF_MMI_RINGTONE /* MSL SMS Tone Play */
952 audio_PlaySoundID( AUDIO_BUZZER, SMSTONE_SELECT, 200, AUDIO_PLAY_ONCE ); 952 audio_PlaySoundID( AUDIO_BUZZER, SMSTONE_SELECT, 200, AUDIO_PLAY_ONCE );
953 #else 953 #else
954 /* RAVI - 20-1-2006 */ 954 /* RAVI - 20-1-2006 */
955 #ifdef NEPTUNE_BOARD 955 #ifdef NEPTUNE_BOARD
956 { 956 {
957 UBYTE currentSMSTone; 957 UBYTE currentSMSTone;
958 currentSMSTone = getcurrentSMSTone(); 958 currentSMSTone = getcurrentSMSTone();
959 audio_PlaySoundID( AUDIO_BUZZER, currentSMSTone, 959 audio_PlaySoundID( AUDIO_BUZZER, currentSMSTone,
960 getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ 960 getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */
961 } 961 }
962 #else 962 #else
963 { 963 {
964 UBYTE currentSMSTone; 964 UBYTE currentSMSTone;
965 currentSMSTone = getcurrentSMSTone(); 965 currentSMSTone = getcurrentSMSTone();
966 audio_PlaySoundID( AUDIO_BUZZER, currentSMSTone, 200, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */ 966 audio_PlaySoundID( AUDIO_BUZZER, currentSMSTone, 200, AUDIO_PLAY_ONCE ); /* GW#2355 /CQ11341 */
967 } 967 }
968 #endif 968 #endif
969 969
970 #endif 970 #endif
971 #endif 971 #endif
972 mme_backlightEvent(BL_INCOMING_SMS); 972 mme_backlightEvent(BL_INCOMING_SMS);
973 /*CQ10826 - END*/ 973 /*CQ10826 - END*/
974 974
975 /* Added Condtion( if((!(call_data.calls.numCalls))) ) to stop the 975 /* Added Condtion( if((!(call_data.calls.numCalls))) ) to stop the
976 SMS tone when call is active - OMAPS00066134 976 SMS tone when call is active - OMAPS00066134
977 */ 977 */
978 #ifdef NEPTUNE_BOARD 978 #ifdef NEPTUNE_BOARD
979 } 979 }
980 #endif 980 #endif
981 981
982 } 982 }
983 983
984 984
985 /*temp_buffer_sms will be freed in editor callback*/ 985 /*temp_buffer_sms will be freed in editor callback*/
986 986
987 } 987 }
988 } 988 }
989 /*NM p029 end*/ 989 /*NM p029 end*/
990 } 990 }
991 991
992 /* Re-Set */ 992 /* Re-Set */
993 #ifdef NEPTUNE_BOARD 993 #ifdef NEPTUNE_BOARD
994 #ifdef MMI_POWER_MANAGEMENT_TEST 994 #ifdef MMI_POWER_MANAGEMENT_TEST
995 iSmsArrival = 0; 995 iSmsArrival = 0;
996 #endif 996 #endif
997 #endif 997 #endif
998 998
999 break; 999 break;
1000 case E_SMS_CB: /* new CBCH received */ 1000 case E_SMS_CB: /* new CBCH received */
1001 { 1001 {
1002 // USHORT i; // RAVI 1002 // USHORT i; // RAVI
1003 SHORT geograhical_scope = (SHORT)0xC000; 1003 SHORT geograhical_scope = (SHORT)0xC000;
1004 1004
1005 T_MFW_SMS_CB *Message = (T_MFW_SMS_CB *)w; 1005 T_MFW_SMS_CB *Message = (T_MFW_SMS_CB *)w;
1006 1006
1007 TRACE_EVENT ("E_SMS_CB"); 1007 TRACE_EVENT ("E_SMS_CB");
1008 1008
1009 temp_buffer = (char*)ALLOC_MEMORY(MAX_CBMSG_LEN); 1009 temp_buffer = (char*)ALLOC_MEMORY(MAX_CBMSG_LEN);
1010 memset(temp_buffer, '\0', MAX_CBMSG_LEN); 1010 memset(temp_buffer, '\0', MAX_CBMSG_LEN);
1011 1011
1012 //check: does the incoming CB indicates a immediate scope 1012 //check: does the incoming CB indicates a immediate scope
1013 if (! (Message->sn & geograhical_scope) ) 1013 if (! (Message->sn & geograhical_scope) )
1014 { 1014 {
1015 //Immediate scope 1015 //Immediate scope
1016 // API - 859 - German characters were not visable in the CB message 1016 // API - 859 - German characters were not visable in the CB message
1017 TRACE_EVENT("Immediate Scope"); 1017 TRACE_EVENT("Immediate Scope");
1018 1018
1019 // API - 859 - Convert the the incoming GSM Text to ASCII 1019 // API - 859 - Convert the the incoming GSM Text to ASCII
1020 /*SPR2175, use new function for conversion*/ 1020 /*SPR2175, use new function for conversion*/
1021 ATB_convert_String(Message->cb_msg, MFW_DCS_8bits, Message->msg_len, 1021 ATB_convert_String(Message->cb_msg, MFW_DCS_8bits, Message->msg_len,
1022 temp_buffer, MFW_ASCII, MAX_CBMSG_LEN, FALSE); 1022 temp_buffer, MFW_ASCII, MAX_CBMSG_LEN, FALSE);
1023 1023
1024 /* SPR 2429, removed search for terminating character*/ 1024 /* SPR 2429, removed search for terminating character*/
1025 1025
1026 #ifdef MMI_HOMEZONE_ENABLED // SH 11/12/01 1026 #ifdef MMI_HOMEZONE_ENABLED // SH 11/12/01
1027 /* SPR759 - SH - Homezone: check to see if CB gives us the coordinates of the centre of the current cell */ 1027 /* SPR759 - SH - Homezone: check to see if CB gives us the coordinates of the centre of the current cell */
1028 1028
1029 if (Message->msg_id==HZ_IDENTIFIER) 1029 if (Message->msg_id==HZ_IDENTIFIER)
1030 { 1030 {
1031 homezoneCBData(Message->cb_msg); 1031 homezoneCBData(Message->cb_msg);
1032 } 1032 }
1033 else 1033 else
1034 { 1034 {
1035 #endif // HOMEZONE 1035 #endif // HOMEZONE
1036 1036
1037 //display now on the idle screen 1037 //display now on the idle screen
1038 1038
1039 addCBCH(temp_buffer, IdleNewCBImmediateMessage); 1039 addCBCH(temp_buffer, IdleNewCBImmediateMessage);
1040 statusCBCH(TRUE); 1040 statusCBCH(TRUE);
1041 #ifdef MMI_HOMEZONE_ENABLED 1041 #ifdef MMI_HOMEZONE_ENABLED
1042 } /* SPR759 - SH */ 1042 } /* SPR759 - SH */
1043 #endif 1043 #endif
1044 } 1044 }
1045 else //Normal scope 1045 else //Normal scope
1046 { 1046 {
1047 TRACE_EVENT("Normal Scope"); 1047 TRACE_EVENT("Normal Scope");
1048 //only for single- and the last page of mulitpages 1048 //only for single- and the last page of mulitpages
1049 //other pages have not the termination "0x00D" 1049 //other pages have not the termination "0x00D"
1050 1050
1051 // API - 859 - Convert the the incoming GSM Text to ASCII 1051 // API - 859 - Convert the the incoming GSM Text to ASCII
1052 /*SPR2175, use new function for conversion*/ 1052 /*SPR2175, use new function for conversion*/
1053 ATB_convert_String(Message->cb_msg, MFW_DCS_8bits, Message->msg_len, 1053 ATB_convert_String(Message->cb_msg, MFW_DCS_8bits, Message->msg_len,
1054 temp_buffer, MFW_ASCII, MAX_MSG_LEN, FALSE); 1054 temp_buffer, MFW_ASCII, MAX_MSG_LEN, FALSE);
1055 1055
1056 memcpy(Message->cb_msg, temp_buffer, MAX_CBMSG_LEN); 1056 memcpy(Message->cb_msg, temp_buffer, MAX_CBMSG_LEN);
1057 1057
1058 /* SPR 2429, removed search for terminating character*/ 1058 /* SPR 2429, removed search for terminating character*/
1059 { 1059 {
1060 Message->cb_msg[MAX_CBMSG_LEN - 1 ]='\0'; // RAVI - Changed as MAX_CBMSG_LEN - 1. 1060 Message->cb_msg[MAX_CBMSG_LEN - 1 ]='\0'; // RAVI - Changed as MAX_CBMSG_LEN - 1.
1061 } 1061 }
1062 1062
1063 //indicate on the idle screen the new incoming cb 1063 //indicate on the idle screen the new incoming cb
1064 addCBCH( NULL, IdleNewCBNormalMessage ); 1064 addCBCH( NULL, IdleNewCBNormalMessage );
1065 statusCBCH(TRUE); 1065 statusCBCH(TRUE);
1066 1066
1067 //save the incoming cb messages in the fifo 1067 //save the incoming cb messages in the fifo
1068 sms_new_incoming_cb (Message); 1068 sms_new_incoming_cb (Message);
1069 1069
1070 } 1070 }
1071 FREE_MEMORY((void*)temp_buffer,MAX_CBMSG_LEN); 1071 FREE_MEMORY((void*)temp_buffer,MAX_CBMSG_LEN);
1072 } 1072 }
1073 break; 1073 break;
1074 1074
1075 case E_SMS_MEM_FULL: 1075 case E_SMS_MEM_FULL:
1076 /* the memory of SMS is FULL !!*/ 1076 /* the memory of SMS is FULL !!*/
1077 data->sms_store_free = FALSE; 1077 data->sms_store_free = FALSE;
1078 1078
1079 /* sendevent IDLE_UPDATE; */ 1079 /* sendevent IDLE_UPDATE; */
1080 SEND_EVENT(idle_get_window(),IDLE_UPDATE,0,0); 1080 SEND_EVENT(idle_get_window(),IDLE_UPDATE,0,0);
1081 break; 1081 break;
1082 case E_SMS_MEM_FREE: 1082 case E_SMS_MEM_FREE:
1083 /* the memory of SMS is FREE */ 1083 /* the memory of SMS is FREE */
1084 data->sms_store_free = TRUE; 1084 data->sms_store_free = TRUE;
1085 1085
1086 /* sendevent IDLE_UPDATE; */ 1086 /* sendevent IDLE_UPDATE; */
1087 SEND_EVENT(idle_get_window(),IDLE_UPDATE,0,0); 1087 SEND_EVENT(idle_get_window(),IDLE_UPDATE,0,0);
1088 /* ??? */ 1088 /* ??? */
1089 1089
1090 break; 1090 break;
1091 case E_SMS_STATUS: /* status report from service center */ 1091 case E_SMS_STATUS: /* status report from service center */
1092 /* Marcus: Issue 1170: 07/10/2002: Start */ 1092 /* Marcus: Issue 1170: 07/10/2002: Start */
1093 { 1093 {
1094 T_MFW_SMS_STATUS *sms_status = (T_MFW_SMS_STATUS *)w; 1094 T_MFW_SMS_STATUS *sms_status = (T_MFW_SMS_STATUS *)w;
1095 TRACE_EVENT("E_SMS_STATUS"); 1095 TRACE_EVENT("E_SMS_STATUS");
1096 //Apr 05, 2005 REF: ENH 29994 xdeepadh 1096 //Apr 05, 2005 REF: ENH 29994 xdeepadh
1097 //Nov 02, 2005 REF:ER OMAPS00039044 xdeepadh 1097 //Nov 02, 2005 REF:ER OMAPS00039044 xdeepadh
1098 //Play the SMS tone alert for status report indication 1098 //Play the SMS tone alert for status report indication
1099 #ifdef FF_MIDI_RINGER 1099 #ifdef FF_MIDI_RINGER
1100 mfw_ringer_start(AS_RINGER_MODE_SMS,false,sounds_midi_ringer_start_cb); 1100 mfw_ringer_start(AS_RINGER_MODE_SMS,false,sounds_midi_ringer_start_cb);
1101 #else 1101 #else
1102 1102
1103 #ifdef FF_MMI_RINGTONE /* MSL SMS Tone Play */ 1103 #ifdef FF_MMI_RINGTONE /* MSL SMS Tone Play */
1104 audio_PlaySoundID( AUDIO_BUZZER, SMSTONE_SELECT, 200, AUDIO_PLAY_ONCE ); 1104 audio_PlaySoundID( AUDIO_BUZZER, SMSTONE_SELECT, 200, AUDIO_PLAY_ONCE );
1105 #else 1105 #else
1106 /* RAVI - 20-1-2006 */ 1106 /* RAVI - 20-1-2006 */
1107 #ifdef NEPTUNE_BOARD 1107 #ifdef NEPTUNE_BOARD
1108 { 1108 {
1109 UBYTE currentSMSTone; 1109 UBYTE currentSMSTone;
1110 currentSMSTone = getcurrentSMSTone(); 1110 currentSMSTone = getcurrentSMSTone();
1111 audio_PlaySoundID( AUDIO_BUZZER, currentSMSTone, 1111 audio_PlaySoundID( AUDIO_BUZZER, currentSMSTone,
1112 getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE ); 1112 getCurrentVoulmeSettings(), AUDIO_PLAY_ONCE );
1113 } 1113 }
1114 #else 1114 #else
1115 { 1115 {
1116 UBYTE currentSMSTone; 1116 UBYTE currentSMSTone;
1117 currentSMSTone = getcurrentSMSTone(); 1117 currentSMSTone = getcurrentSMSTone();
1118 audio_PlaySoundID( AUDIO_BUZZER, currentSMSTone, 200, AUDIO_PLAY_ONCE ); 1118 audio_PlaySoundID( AUDIO_BUZZER, currentSMSTone, 200, AUDIO_PLAY_ONCE );
1119 } 1119 }
1120 #endif 1120 #endif
1121 /* END RAVI */ 1121 /* END RAVI */
1122 1122
1123 #endif 1123 #endif
1124 #endif 1124 #endif
1125 1125
1126 if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE) 1126 if (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE)
1127 { 1127 {
1128 /* 1128 /*
1129 * There is no support for Chinese in the addCBCH function, 1129 * There is no support for Chinese in the addCBCH function,
1130 * so will be problems with class 0 SMS messages and with cell 1130 * so will be problems with class 0 SMS messages and with cell
1131 * broadcast messages that need to be addressed anyway. 1131 * broadcast messages that need to be addressed anyway.
1132 * A new issue will be raised to handle this problem. 1132 * A new issue will be raised to handle this problem.
1133 */ 1133 */
1134 } 1134 }
1135 else 1135 else
1136 { 1136 {
1137 memset(status_report, '\0', sizeof(status_report)); 1137 memset(status_report, '\0', sizeof(status_report));
1138 strcpy(status_report, MmiRsrcGetText(TxtSRR)); 1138 strcpy(status_report, MmiRsrcGetText(TxtSRR));
1139 strcat(status_report, ": "); 1139 strcat(status_report, ": ");
1140 strcat(status_report, MmiRsrcGetText(TxtStatus)); 1140 strcat(status_report, MmiRsrcGetText(TxtStatus));
1141 strcat(status_report, ": "); 1141 strcat(status_report, ": ");
1142 strcat(status_report, MmiRsrcGetText(smsidle_sr_status_to_text_id(sms_status->status))); 1142 strcat(status_report, MmiRsrcGetText(smsidle_sr_status_to_text_id(sms_status->status)));
1143 sprintf(&status_report[strlen(status_report)], " (%u): ", sms_status->status); 1143 sprintf(&status_report[strlen(status_report)], " (%u): ", sms_status->status);
1144 #ifdef NO_ASCIIZ 1144 #ifdef NO_ASCIIZ
1145 if (sms_status->addr.len) 1145 if (sms_status->addr.len)
1146 { 1146 {
1147 memcpy(&status_report[strlen(status_report)], sms_status->addr.tag, sms_status->addr.len); 1147 memcpy(&status_report[strlen(status_report)], sms_status->addr.tag, sms_status->addr.len);
1148 strcat(status_report, " "); 1148 strcat(status_report, " ");
1149 } 1149 }
1150 #else 1150 #else
1151 if (strlen(sms_status->addr.tag)) 1151 if (strlen(sms_status->addr.tag))
1152 { 1152 {
1153 strcat(status_report, sms_status->addr.tag); 1153 strcat(status_report, sms_status->addr.tag);
1154 strcat(status_report, " "); 1154 strcat(status_report, " ");
1155 } 1155 }
1156 #endif 1156 #endif
1157 if (sms_status->addr.ton == MFW_TON_INTERNATIONAL) 1157 if (sms_status->addr.ton == MFW_TON_INTERNATIONAL)
1158 strcat(status_report, "+"); 1158 strcat(status_report, "+");
1159 1159
1172 sms_status->rctp.minute[1], 1172 sms_status->rctp.minute[1],
1173 sms_status->rctp.second[0], 1173 sms_status->rctp.second[0],
1174 sms_status->rctp.second[1], 1174 sms_status->rctp.second[1],
1175 MmiRsrcGetText(TxtMessage), 1175 MmiRsrcGetText(TxtMessage),
1176 sms_status->msg_ref); 1176 sms_status->msg_ref);
1177 1177
1178 addCBCH(status_report, IdleNewSmsMessage); 1178 addCBCH(status_report, IdleNewSmsMessage);
1179 1179
1180 //display now on the idle screen 1180 //display now on the idle screen
1181 statusCBCH(TRUE); 1181 statusCBCH(TRUE);
1182 } 1182 }
1183 } 1183 }
1184 /* Marcus: Issue 1170: 07/10/2002: End */ 1184 /* Marcus: Issue 1170: 07/10/2002: End */
1185 1185
1186 break; 1186 break;
1187 case E_SMS_MEM: /* indicates status of memory */ 1187 case E_SMS_MEM: /* indicates status of memory */
1188 /* not used */ 1188 /* not used */
1189 break; 1189 break;
1190 case E_SMS_MO: /* SMS sending has started */ 1190 case E_SMS_MO: /* SMS sending has started */
1191 /* not used */ 1191 /* not used */
1192 case E_SMS_OK: 1192 case E_SMS_OK:
1193 /* Only happens when an SMS message is deleted. */ 1193 /* Only happens when an SMS message is deleted. */
1194 1194
1195 break; 1195 break;
1196 case E_SMS_BUSY: 1196 case E_SMS_BUSY:
1197 TRACE_EVENT ("E_SMS_BUSY"); 1197 TRACE_EVENT ("E_SMS_BUSY");
1198 break; 1198 break;
1199 case E_SMS_SAVE_AVAIL: 1199 case E_SMS_SAVE_AVAIL:
1200 break; 1200 break;
1201 case E_SMS_CMD_AVAIL: 1201 case E_SMS_CMD_AVAIL:
1202 break; 1202 break;
1203 case E_SMS_ERR: 1203 case E_SMS_ERR:
1204 TRACE_EVENT ("E_SMS_ERR"); 1204 TRACE_EVENT ("E_SMS_ERR");
1205 break; 1205 break;
1206 default: 1206 default:
1207 TRACE_EVENT("unhandled event in smsidle_sms_cb()"); 1207 TRACE_EVENT("unhandled event in smsidle_sms_cb()");
1208 result = MFW_EVENT_PASSED; 1208 result = MFW_EVENT_PASSED;
1209 break; 1209 break;
1210 } 1210 }
1211 //May 27, 2005 MMI-FIX-29869 x0018858 1211 //May 27, 2005 MMI-FIX-29869 x0018858
1212 #ifdef FF_MMI_SMS_DYNAMIC 1212 #ifdef FF_MMI_SMS_DYNAMIC
1213 FREE_MEMORY((void*)msg_list,g_max_messages*sizeof(T_MFW_SMS_IDX)); 1213 FREE_MEMORY((void*)msg_list,g_max_messages*sizeof(T_MFW_SMS_IDX));
1214 FREE_MEMORY((void*)urd_msg_list,g_max_messages*sizeof(T_MFW_SMS_IDX)); 1214 FREE_MEMORY((void*)urd_msg_list,g_max_messages*sizeof(T_MFW_SMS_IDX));
1215 #else 1215 #else
1216 FREE_MEMORY((void*)msg_list,MAX_MESSAGES*sizeof(T_MFW_SMS_IDX)); 1216 FREE_MEMORY((void*)msg_list,MAX_MESSAGES*sizeof(T_MFW_SMS_IDX));
1220 return result; 1220 return result;
1221 } 1221 }
1222 1222
1223 /******************************************************************************* 1223 /*******************************************************************************
1224 1224
1225 $Function: smsidle_get_memory_full 1225 $Function: smsidle_get_memory_full
1226 1226
1227 $Description: Call back function for the sms Idle window. 1227 $Description: Call back function for the sms Idle window.
1228 1228
1229 $Returns: sms memory status. 1229 $Returns: sms memory status.
1230 1230
1231 $Arguments: none 1231 $Arguments: none
1232 1232
1233 *******************************************************************************/ 1233 *******************************************************************************/
1234 1234
1235 BOOL smsidle_get_memory_full(void) 1235 BOOL smsidle_get_memory_full(void)
1236 { 1236 {
1237 return (!smsidle_data.sms_store_free); 1237 return (!smsidle_data.sms_store_free);
1238 } 1238 }
1239 1239
1240 /******************************************************************************* 1240 /*******************************************************************************
1241 1241
1242 $Function: smsidle_get_new_cb_messages_count 1242 $Function: smsidle_get_new_cb_messages_count
1243 1243
1244 $Description: Call back function for the sms Idle window. 1244 $Description: Call back function for the sms Idle window.
1245 1245
1246 $Returns: sms count. 1246 $Returns: sms count.
1247 1247
1248 $Arguments: none 1248 $Arguments: none
1249 *******************************************************************************/ 1249 *******************************************************************************/
1250 1250
1251 SHORT smsidle_get_new_cb_messages_count(void) 1251 SHORT smsidle_get_new_cb_messages_count(void)
1252 { 1252 {
1253 if (smsidle_get_ready_state())
1254 {
1255 return smscb_get_new_cb_messages_count();
1256 }
1257 else
1258 {
1259 return 0;
1260 }
1261 }
1262
1263
1264 /*******************************************************************************
1265
1266 $Function: smsidle_get_ready_state
1267
1268 $Description: This function can be call from anywhere to get the information
1269 about the "sms_initialised"
1270
1271 $Returns: sms status
1272
1273 $Arguments: none
1274
1275 *******************************************************************************/
1276 BOOL smsidle_get_ready_state(void)
1277 {
1278 return (smsidle_data.sms_initialised);
1279 }
1280
1281 //GW SPR#1035 - Added SAT changes
1282 /*******************************************************************************
1283
1284 $Function: smsidle_unset_ready_state
1285
1286 $Description: this unset the flat "sms_initialised"
1287
1288 $Returns: sms status
1289
1290 $Arguments: none
1291
1292 *******************************************************************************/
1293 void smsidle_unset_ready_state(void)
1294 {
1295 smsidle_data.sms_initialised = FALSE;
1296 }
1297
1298 /*******************************************************************************
1299
1300 $Function: smsidle_get_unread_sms_available
1301
1302 $Description: This function allows an external process to determine the
1303 received and unread SMS PP message status.
1304
1305 $Returns: sms status.
1306
1307 $Arguments: none
1308
1309 *******************************************************************************/
1310 BOOL smsidle_get_unread_sms_available(void)
1311 { SHORT unread_sms_count;
1312
1313 //May 27, 2005 MMI-FIX-29869 x0018858
1314 #ifdef FF_MMI_SMS_DYNAMIC
1315 //begin
1316 qAT_PlusCPMS(CMD_SRC_LCL);
1317 Check_max_sms_allowed();
1318 //End
1319 #endif
1320 TRACE_FUNCTION("smsidle_get_unread_sms_available() ");
1321 if (smsidle_get_ready_state()) 1253 if (smsidle_get_ready_state())
1322 { 1254 {
1323 //API - 14-01-03 - 1403 - Remove the call to iconsSetState(iconIdSMS) to indicate new SMS incall 1255 return smscb_get_new_cb_messages_count();
1324 unread_sms_count = sms_message_count(MFW_SMS_UNREAD); 1256 }
1325
1326 return (unread_sms_count > 0 && (unread_sms_count > sms_message_count(MFW_SMS_VOICE)));
1327 }
1328 else 1257 else
1329 { 1258 {
1330 1259 return 0;
1331 iconsDeleteState(iconIdSMS); 1260 }
1332 return FALSE; 1261 }
1333 } 1262
1334 } 1263
1335 1264 /*******************************************************************************
1336 /******************************************************************************* 1265
1337 1266 $Function: smsidle_get_ready_state
1338 $Function: smsidle_display_sms_status 1267
1339 1268 $Description: This function can be call from anywhere to get the information
1340 $Description: Interogates the SMS unread message count and displays 1269 about the "sms_initialised"
1341 the result using the SMS icon and an information text. 1270
1342 1271 $Returns: sms status
1343 $Returns: id of text string to be displayed 1272
1344 1273 $Arguments: none
1345 $Arguments: noOfMsgs - returns number of unread messages (or 0 if there are no 1274
1346 messages or the memory is full). 1275 *******************************************************************************/
1276 BOOL smsidle_get_ready_state(void)
1277 {
1278 return (smsidle_data.sms_initialised);
1279 }
1280
1281 //GW SPR#1035 - Added SAT changes
1282 /*******************************************************************************
1283
1284 $Function: smsidle_unset_ready_state
1285
1286 $Description: this unset the flat "sms_initialised"
1287
1288 $Returns: sms status
1289
1290 $Arguments: none
1291
1292 *******************************************************************************/
1293 void smsidle_unset_ready_state(void)
1294 {
1295 smsidle_data.sms_initialised = FALSE;
1296 }
1297
1298 /*******************************************************************************
1299
1300 $Function: smsidle_get_unread_sms_available
1301
1302 $Description: This function allows an external process to determine the
1303 received and unread SMS PP message status.
1304
1305 $Returns: sms status.
1306
1307 $Arguments: none
1308
1309 *******************************************************************************/
1310 BOOL smsidle_get_unread_sms_available(void)
1311 { SHORT unread_sms_count;
1312
1313 //May 27, 2005 MMI-FIX-29869 x0018858
1314 #ifdef FF_MMI_SMS_DYNAMIC
1315 //begin
1316 qAT_PlusCPMS(CMD_SRC_LCL);
1317 Check_max_sms_allowed();
1318 //End
1319 #endif
1320 TRACE_FUNCTION("smsidle_get_unread_sms_available() ");
1321 if (smsidle_get_ready_state())
1322 {
1323 //API - 14-01-03 - 1403 - Remove the call to iconsSetState(iconIdSMS) to indicate new SMS incall
1324 unread_sms_count = sms_message_count(MFW_SMS_UNREAD);
1325
1326 return (unread_sms_count > 0 && (unread_sms_count > sms_message_count(MFW_SMS_VOICE)));
1327 }
1328 else
1329 {
1330
1331 iconsDeleteState(iconIdSMS);
1332 return FALSE;
1333 }
1334 }
1335
1336 /*******************************************************************************
1337
1338 $Function: smsidle_display_sms_status
1339
1340 $Description: Interogates the SMS unread message count and displays
1341 the result using the SMS icon and an information text.
1342
1343 $Returns: id of text string to be displayed
1344
1345 $Arguments: noOfMsgs - returns number of unread messages (or 0 if there are no
1346 messages or the memory is full).
1347 1347
1348 GW 02/10/01 - Modified code to work with chinese unicode text. 1348 GW 02/10/01 - Modified code to work with chinese unicode text.
1349 *******************************************************************************/ 1349 *******************************************************************************/
1350 int smsidle_display_sms_status(int* noOfMsgs) 1350 int smsidle_display_sms_status(int* noOfMsgs)
1351 { 1351 {
1352 SHORT SmsMsgCount; 1352 SHORT SmsMsgCount;
1353 SHORT SmsVmailCount; 1353 SHORT SmsVmailCount;
1354 int txtMsg; 1354 int txtMsg;
1355 1355
1356 TRACE_FUNCTION("smsidle_display_sms_status() "); 1356 TRACE_FUNCTION("smsidle_display_sms_status() ");
1357 *noOfMsgs = 0; 1357 *noOfMsgs = 0;
1358 txtMsg = TxtNull; 1358 txtMsg = TxtNull;
1359 1359
1360 if (smsidle_get_ready_state()) 1360 if (smsidle_get_ready_state())
1361 { 1361 {
1362 SmsVmailCount = sms_message_count(MFW_SMS_VOICE); 1362 SmsVmailCount = sms_message_count(MFW_SMS_VOICE);
1363 1363
1364 1364
1365 SmsMsgCount = sms_message_count (MFW_SMS_UNREAD); 1365 SmsMsgCount = sms_message_count (MFW_SMS_UNREAD);
1366 1366
1367 /* Envelope icon and text only appear if a non-Voicemail SMS exists. */ 1367 /* Envelope icon and text only appear if a non-Voicemail SMS exists. */
1368 1368
1369 if (smsidle_get_memory_full()) 1369 if (smsidle_get_memory_full())
1370 { 1370 {
1371 /* x0018858 24 Mar, 2005 MMI-FIX-11321 1371 /* x0018858 24 Mar, 2005 MMI-FIX-11321
1372 Added a condition to check for any pending message. 1372 Added a condition to check for any pending message.
1373 */ 1373 */
1374 //begin -x0018858 24 Mar, 2005 MMI-FIX-11321 1374 //begin -x0018858 24 Mar, 2005 MMI-FIX-11321
1375 if( TRUE == sms_check_message_pending()) 1375 if( TRUE == sms_check_message_pending())
1376 { 1376 {
1377 txtMsg = TxtSmsWaiting; 1377 txtMsg = TxtSmsWaiting;
1378 }//end. x0018858 24 Mar, 2005 MMI-FIX-11321 1378 }//end. x0018858 24 Mar, 2005 MMI-FIX-11321
1379 else 1379 else
1380 { 1380 {
1381 txtMsg = TxtSmsListFull; 1381 txtMsg = TxtSmsListFull;
1382 } 1382 }
1383 } 1383 }
1384 else if ((SmsMsgCount > 0) && (SmsMsgCount > SmsVmailCount)) 1384 else if ((SmsMsgCount > 0) && (SmsMsgCount > SmsVmailCount))
1385 { 1385 {
1386 txtMsg = TxtNewMessage; 1386 txtMsg = TxtNewMessage;
1387 *noOfMsgs = SmsMsgCount; 1387 *noOfMsgs = SmsMsgCount;
1388 1388
1389 } 1389 }
1390 else 1390 else
1391 { 1391 {
1392 iconsDeleteState(iconIdSMS); /* Turn off SMS icon. */ 1392 iconsDeleteState(iconIdSMS); /* Turn off SMS icon. */
1393 txtMsg = TxtNull; 1393 txtMsg = TxtNull;
1394 } 1394 }
1395 1395
1396 iconsShow(); 1396 iconsShow();
1397 } 1397 }
1398 return (txtMsg); 1398 return (txtMsg);
1399 } 1399 }
1400 1400
1401 /******************************************************************************* 1401 /*******************************************************************************
1402 1402
1403 $Function: smsidle_get_unread_smscb_available 1403 $Function: smsidle_get_unread_smscb_available
1404 1404
1405 $Description: This function allows an external process to determine the 1405 $Description: This function allows an external process to determine the
1406 received SMS CB message status. 1406 received SMS CB message status.
1407 1407
1408 $Returns: execution status 1408 $Returns: execution status
1409 1409
1410 $Arguments: none 1410 $Arguments: none
1411 1411
1412 *******************************************************************************/ 1412 *******************************************************************************/
1413 BOOL smsidle_get_unread_smscb_available(void) 1413 BOOL smsidle_get_unread_smscb_available(void)
1414 { 1414 {
1415 if (smsidle_get_ready_state()) 1415 if (smsidle_get_ready_state())
1416 return (smsidle_get_new_cb_messages_count() > 0); 1416 return (smsidle_get_new_cb_messages_count() > 0);
1418 return FALSE; 1418 return FALSE;
1419 } 1419 }
1420 1420
1421 /******************************************************************************* 1421 /*******************************************************************************
1422 1422
1423 $Function: smsidle_display_smscb_status 1423 $Function: smsidle_display_smscb_status
1424 1424
1425 $Description: Interogates the SMS CB message received status and 1425 $Description: Interogates the SMS CB message received status and
1426 returns the resulting string to the caller. 1426 returns the resulting string to the caller.
1427 1427
1428 $Returns: none 1428 $Returns: none
1429 1429
1430 $Arguments: TextString - Text String 1430 $Arguments: TextString - Text String
1431 *******************************************************************************/ 1431 *******************************************************************************/
1432 void smsidle_display_smscb_status(char *TextString) 1432 void smsidle_display_smscb_status(char *TextString)
1433 { 1433 {
1434 SHORT count; 1434 SHORT count;
1435 1435
1436 /* count the unread cb messagesc */ 1436 /* count the unread cb messagesc */
1437 count = smsidle_get_new_cb_messages_count(); 1437 count = smsidle_get_new_cb_messages_count();
1438 1438
1439 1439
1440 /* the unread CB should have a high priority than */ 1440 /* the unread CB should have a high priority than */
1441 /* the class 0 CB */ 1441 /* the class 0 CB */
1442 if (count > 0) 1442 if (count > 0)
1443 { 1443 {
1444 sprintf(TextString, "%d %s\0",count, GET_TEXT(TxtNewCbMessage)); 1444 sprintf(TextString, "%d %s\0",count, GET_TEXT(TxtNewCbMessage));
1445 iconsSetState(iconIdSMS); /* Indicate SMS delivery to MS-User. */ 1445 iconsSetState(iconIdSMS); /* Indicate SMS delivery to MS-User. */
1446 1446
1447 } 1447 }
1448 } 1448 }
1449 /* Marcus: Issue 1170: 07/10/2002: Start */ 1449 /* Marcus: Issue 1170: 07/10/2002: Start */
1450 /******************************************************************************* 1450 /*******************************************************************************
1451 1451
1452 $Function: smsidle_sr_status_to_text_id 1452 $Function: smsidle_sr_status_to_text_id
1453 1453
1454 $Description: Returns the text ID for the given status report status 1454 $Description: Returns the text ID for the given status report status
1455 1455
1456 $Returns: int : text ID 1456 $Returns: int : text ID
1457 1457
1458 $Arguments: UBYTE: SMS-STATUS-REPORT status 1458 $Arguments: UBYTE: SMS-STATUS-REPORT status
1459 *******************************************************************************/ 1459 *******************************************************************************/
1460 static int smsidle_sr_status_to_text_id(UBYTE status) 1460 static int smsidle_sr_status_to_text_id(UBYTE status)
1461 { 1461 {
1462 int ret = TxtError; 1462 int ret = TxtError;
1463 UBYTE group = ((status & 0x60) >> 5); 1463 UBYTE group = ((status & 0x60) >> 5);
1484 break; 1484 break;
1485 } 1485 }
1486 return ret; 1486 return ret;
1487 } 1487 }
1488 /* Marcus: Issue 1170: 07/10/2002: End */ 1488 /* Marcus: Issue 1170: 07/10/2002: End */
1489
1490
1491
1492
1493
1494