annotate src/ui/bmi/mmiSmsIdle.c @ 3:67bfe9f274f6

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