comparison src/aci2/bmi/MmiMain.h @ 3:93999a60b835

src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 26 Sep 2016 00:29:36 +0000
parents
children
comparison
equal deleted inserted replaced
2:c41a534f33c6 3:93999a60b835
1 #ifndef _DEF_MMI_MAIN_H_
2 #define _DEF_MMI_MAIN_H_
3
4 /*******************************************************************************
5
6 CONDAT (UK)
7
8 ********************************************************************************
9
10 This software product is the property of Condat (UK) Ltd and may not be
11 disclosed to any third party without the express permission of the owner.
12
13 ********************************************************************************
14
15 $Project name: Basic MMI
16 $Project code: BMI (6349)
17 $Module: MMI
18 $File: MmiMain.h
19 $Revision: 1.0
20
21 $Author: Condat(UK)
22 $Date: 25/10/00
23
24 ********************************************************************************
25
26 Description:
27
28 This provides the root mofule for the basic MMI
29
30 ********************************************************************************
31 $History: MmiMmi.h
32
33 25/10/00 Original Condat(UK) BMI version.
34
35 $End
36
37 *******************************************************************************/
38
39
40
41
42 /*******************************************************************************
43
44 Type definitions
45
46 *******************************************************************************/
47
48
49
50
51 #include "mfw_cphs.h"
52
53 #include "MmiResources.h"
54
55
56 #define PROMPT(x, y, a, id) dspl_TextOut(x, y, a|DSPL_TXTATTR_CURRENT_MODE, (char*)MmiRsrcGetText(id))
57 #define ALIGNED_PROMPT(x_a, y, a, id) displayAlignedPrompt(x_a, y, a, id)
58 #define GET_TEXT(id) MmiRsrcGetText( id )
59
60 #define ETRACE(str) \
61 { char buf[64];##str##;\
62 TRACE_EVENT(buf);}
63
64 #define FTRACE(str) \
65 { char buf[64];##str##;\
66 TRACE_EVENT(buf);}
67
68
69 /* typedefs */
70 typedef enum {
71 NM_UNDEFINED,
72 NM_FULL_SERVICE,
73 NM_LIMITED_SERVICE,
74 NM_NO_SERVICE,
75 NM_SEARCHING,
76 NM_NO_NETWORK
77 } MMI_NM_SERVICE;
78
79
80 typedef enum
81 {
82 LEFT,
83 RIGHT,
84 CENTER
85 } T_MMI_ALIGN;
86
87
88 typedef enum {
89 SIM_UNDEFINED,
90 SIM_AVAIL,
91 SIM_REJECTED,
92 SIM_NOT_AVAIL
93 } MMI_SIM_STATUS;
94
95 typedef enum {
96 TWELVE_HOUR,
97 TWENTYFOUR_HOUR
98 } ClockFormats;
99
100 /*MC SPR 1725 removed date and clock definition*/
101
102
103 #define MAX_LINE 14
104
105 #define POS_BEGIN 0
106 #define POS_END 1
107 #define MAX_LINE 14
108 #define EDITOR_SIZE 41
109
110 /* GLOBAL DATA */
111 extern UBYTE editControls [KCD_MAX];
112 extern LngInfo mainLngInfo; /* language control block */
113 extern MfwHnd mainMmiLng; /* global language handler */
114
115 /* PROTOTYPES */
116 void mainInit (UBYTE InitCause);
117 void mainExit (UBYTE InitCause);
118
119 void setClockFormat(UBYTE format);
120 // Issue Number : MMI-SPR-12159 on 07/04/04 by Rashmi C N and Deepa M D
121 // change by Sasken ( Rashmi C N and Deepa M D) on April 07th 2004
122 // Bug : The AM PM for 12 hour fomrat was not being shown
123 // Solution : Added the following function to get the current time format from flash
124 UBYTE getClockFormat(void); // RAVI
125
126 /*SPR 1725, removed getClockString(), Clockset() and DateSet() function headers*/
127 void showCLOCK(void);
128 void showDATE(void);
129 /*SPR 1442 obsolete function*/
130 //void truncateString(char* strDest,char* strOrig,unsigned int truncLength,int pos,char* trunChar);
131 void displayAlignedText( T_MMI_ALIGN x_alignment, USHORT y_lineNum, UBYTE attrib, char* string );
132 void displayAlignedPrompt( T_MMI_ALIGN x_alignment, USHORT y_lineNum, UBYTE attrib, int string_id);
133 void mainShutdown(void);
134
135 extern char stringTrace[50];
136
137 /* Battery and Signal Status */
138 #define GlobalNothingIconFlag 0x00
139 #define GlobalBatteryIconFlag 0x01
140 #define GlobalSignalIconFlag 0x02
141 #define GlobalSMSIconFlag 0x04
142 #define GlobalVoiceMailIconFlag 0x08
143 #define GlobalCallForwardingIconFlag 0x10
144 #define GlobalSilentRingerIconFlag 0x20
145 #define GlobalKeyplockIconFlag 0x40
146 #define GlobalRingerIconFlag 0x80
147 #define GlobalVibratorIconFlag 0x100
148 #define GlobalRingVibrIconFlag 0x200
149 #define GlobalAlarmIconFlag 0x400
150 #define GlobalCipheringActivIconFlag 0x800
151 #define GlobalCipheringDeactivIconFlag 0x1000
152 /* SH 18/01/02. Indication for GPRS */
153 #ifdef MMI_GPRS_ENABLED
154 #define GlobalGPRSOnIconFlag 0x2000
155 #endif
156 /* SPR877 - SH - Indication for Homezone */
157 #ifdef MMI_HOMEZONE_ENABLED
158 #define GlobalHomezoneIconFlag 0x4000
159 #endif
160
161 #ifdef MMI_TTY_ENABLED
162 #ifndef GlobalHomezoneIconFlag
163 #define GlobalHomezoneIconFlag 0x4000
164 #endif
165 #endif
166
167 /* SPR#1352 - SH - TTY indication */
168 #define GlobalTTYIconFlag 0x8000
169 /* end SH */
170
171 extern U16 GlobalIconStatus;
172 extern T_MFW_CFLAG_STATUS DivertStatus;
173
174 /* It could be helpful to check the */
175 /* global status where the user is : */
176
177 /* It is also possible to be in several */
178 /* status ! */
179
180 #define ModuleIdle 0x001 /*in Idle Screen */
181 #define ModuleCall 0x002 /*in during a call */
182 #define ModuleInCall 0x004 /*in Incoming call */
183 #define ModuleMenu 0x008 /*in Menu */
184 #define ModulePhon 0x010 /*in Phonebook */
185 #define ModuleSms 0x020 /*in SMS */
186 #define ModuleBattLow 0x040 /*in Battery Status < 5% */
187 #define ModuleSAT 0x080 /*in Sim Toolkit, like Idle*/
188 #define ModuleAlarm 0x100 /*in Organiser Alarm */
189 #define ModuleFax 0x200 /*in Fax/Data */
190 #define ModuleDialling 0x400 /*in Dialling state */
191
192 extern int MmiModule;
193
194
195
196
197 /* PROTOTYPES */
198
199 void MmiModuleSet (int modul); /* Set the status where the user is */
200 void MmiModuleDel (int modul); /* Delete the status where the user was */
201
202
203
204
205 /* Settings status*/
206
207 #define SettingsAnyKeyAnswerOn 0x01
208 #define SettingsAutoAnswerOn 0x02
209 #define SettingsKeyPadLockOn 0x04
210 #define SettingsKeypadClick 0x08
211 #define SettingsKeypadDTMF 0x10
212 #define SettingsSilentMode 0x20
213 #define SettingsCBDisable 0x80 /* SPR 2470 0x80- disable CB display 0-display CB */
214 //extern USHORT settingsStatus;
215
216 #define GlobalBatteryLesser5 1
217 #define GlobalBatteryGreater5 2
218 #define GlobalBatteryFull 3
219
220 extern UBYTE globalBatteryMode; /* */
221
222
223 extern UBYTE globalBatteryPicNumber;
224 extern UBYTE globalSignalPicNumber;
225
226
227 #define GlobalTimeout1sec 0x03e8 /* 1 second for flash the battery icon */
228 #define GlobalTimeout2min 0x01d4c0 /* 2 min for battery beep */
229 #define GlobalTimeout15min 0x0dbba0 /* 15 min for battery beep */
230
231
232 void editActivate (MfwHnd e,int AlphaMode);
233 void editHiddenActivate (char *buffer);
234 void editDeactivate (void);
235 int editEventKey (MfwEvt e, MfwKbd *k);
236 MfwHnd activeEditor(void);
237
238 // sbh - functions for format mode (WAP)
239
240 void setFormatPointers (char *format, int *index, int *index2);
241 void editCharFindNext(char character);
242 int editFindPrev(void); // RAVI
243
244 /*NM p032
245 this flag indicate when the TEST SIM
246 is inserted*/
247 extern UBYTE test_sim;
248
249 #endif