annotate src/ui/bmi/mmiSmsIdle.c @ 287:3dee79757ae4

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