FreeCalypso > hg > fc-magnetite
comparison src/aci2/bmi/mmiDummy.c @ 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 /******************************************************************************* | |
2 | |
3 CONDAT (UK) | |
4 | |
5 ******************************************************************************** | |
6 | |
7 This software product is the property of Condat (UK) Ltd and may not be | |
8 disclosed to any third party without the express permission of the owner. | |
9 | |
10 ******************************************************************************** | |
11 | |
12 $Project name: Basic MMI | |
13 $Project code: BMI (6349) | |
14 $Module: Start | |
15 $File: MmiDummy.c | |
16 $Revision: 1.0 | |
17 | |
18 $Author: Condat(UK) | |
19 $Date: 25/10/00 | |
20 | |
21 ******************************************************************************** | |
22 | |
23 Description: | |
24 | |
25 | |
26 | |
27 ******************************************************************************** | |
28 $History: MmiDummy.c | |
29 | |
30 July 09, 2005 REF : MMI-22565 - a0876501 | |
31 Description: IMEI CD byte calculation added | |
32 Solution: Byte alignment done for IMEI display. | |
33 | |
34 May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg | |
35 Description: IMEI retreival by posting a call to ACI sAT_xx API | |
36 Solution: The direct call to cl_get_imeisv() is replaced with the | |
37 call to the callNUmber() which inturn calls sAT_Dn() and | |
38 retrieves the IMEI info | |
39 | |
40 ******************************************************************************* | |
41 | |
42 Include files | |
43 | |
44 *******************************************************************************/ | |
45 | |
46 | |
47 #define ENTITY_MFW | |
48 | |
49 /* includes */ | |
50 #include <string.h> | |
51 #include <stdio.h> | |
52 #include <stdlib.h> | |
53 | |
54 #if defined (NEW_FRAME) | |
55 | |
56 #include "typedefs.h" | |
57 #include "vsi.h" | |
58 #include "pei.h" | |
59 #include "custom.h" | |
60 #include "gsm.h" | |
61 | |
62 #else | |
63 | |
64 #include "STDDEFS.H" | |
65 #include "custom.h" | |
66 #include "gsm.h" | |
67 #include "vsi.h" | |
68 | |
69 #endif | |
70 #include "mon_aci.h" | |
71 #include "tok.h" | |
72 #ifndef PCM_2_FFS | |
73 #include "pcm.h" | |
74 #else | |
75 #include "prim.h" | |
76 #endif | |
77 | |
78 | |
79 | |
80 #include "message.h" | |
81 #include "prim.h" | |
82 #include "aci_cmh.h" | |
83 //NM | |
84 | |
85 #include "mfw_sys.h" | |
86 #include "mfw_mfw.h" | |
87 #include "mfw_win.h" | |
88 #include "mfw_kbd.h" | |
89 #include "mfw_lng.h" | |
90 #include "mfw_icn.h" | |
91 /* SPR#1428 - SH - New Editor changes */ | |
92 #ifndef NEW_EDITOR | |
93 #include "mfw_edt.h" | |
94 #endif | |
95 #include "mfw_mnu.h" | |
96 #include "mfw_sat.h" | |
97 #include "mfw_nm.h" | |
98 #include "mfw_tim.h" | |
99 #include "mfw_phb.h" | |
100 #include "mfw_sms.h" | |
101 | |
102 #include "dspl.h" | |
103 | |
104 #include "ksd.h" | |
105 #include "psa.h" | |
106 | |
107 //NM | |
108 #include "gdi.h" | |
109 #include "audio.h" | |
110 #ifndef FF_2TO1_PS | |
111 #include "cl_imei.h" /* IMEI common library */ | |
112 #endif | |
113 //NM | |
114 | |
115 #include "MmiVersion.h" | |
116 #include "MmiMmi.h" | |
117 #include "MmiDummy.h" | |
118 #include "MmiDialogs.h" | |
119 #include "MmiLists.h" | |
120 | |
121 #include "MmiMain.h" | |
122 // May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg | |
123 #ifdef FF_MMI_ATC_MIGRATION | |
124 #define ATD_IMEI "*#06#" | |
125 #define IMEI_LEN 15 | |
126 EXTERN void callNumber(UBYTE *number); | |
127 #endif | |
128 | |
129 // May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg | |
130 #ifdef FF_MMI_ATC_MIGRATION | |
131 char imei[IMEI_LEN+1]; | |
132 #endif | |
133 | |
134 // July 09, 2005 REF : MMI-22565 - a0876501 | |
135 extern UBYTE getCdByteFromImei(UBYTE *imei); | |
136 | |
137 | |
138 //Added by Muthu for PCM Replacemeny | |
139 | |
140 #ifdef PCM_2_FFS | |
141 #define PSPDF_IMEI_ID "/PCM/IMEI" /* Int. Mobile Equipment Id */ | |
142 #endif | |
143 | |
144 /******************************************************************************************* | |
145 * | |
146 * Global definition of message function plus some dummies | |
147 * | |
148 *******************************************************************************************/ | |
149 | |
150 void mmi_send_event (T_MFW_HND win, USHORT event, USHORT value, void * parameter) | |
151 { | |
152 | |
153 if (win){ | |
154 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; | |
155 T_MMI_CONTROL * control = (T_MMI_CONTROL *)win_data->user; | |
156 | |
157 if (control->dialog NEQ 0) | |
158 (control->dialog) (win, event, value, parameter); | |
159 } | |
160 } | |
161 | |
162 UBYTE idle_screen_has_focus() | |
163 { | |
164 return TRUE; | |
165 } | |
166 | |
167 // May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg | |
168 // this function is no more referenced hence omit it | |
169 #ifdef FF_MMI_ATC_MIGRATION | |
170 /******************************************************************************* | |
171 | |
172 $Function: mmi_imei_retrieve | |
173 | |
174 $Description: This function invokes sAT_Dn() to retrieve the IMEI and store it | |
175 in the global variabel "imei". | |
176 | |
177 $Returns: | |
178 | |
179 $Arguments: | |
180 *******************************************************************************/ | |
181 void mmi_imei_retrieve() | |
182 { | |
183 callNumber((UBYTE*)ATD_IMEI); | |
184 } | |
185 #else | |
186 /******************************************************************************* | |
187 | |
188 $Function: get_imei | |
189 | |
190 $Description: This function invokes the operation for key sequence | |
191 command for getting the IMEI. | |
192 | |
193 $Returns: | |
194 | |
195 $Arguments: | |
196 *******************************************************************************/ | |
197 int get_imei(char *imei) | |
198 { | |
199 #ifdef FF_2TO1_PS | |
200 UBYTE retVal; /* holds return value */ | |
201 UBYTE version; /* holds version */ | |
202 | |
203 #ifdef PCM_2_FFS | |
204 UBYTE buf[8]; // Sizeof ( T_PSPDF_IMEI ) | |
205 #else | |
206 UBYTE buf[SIZE_EF_IMEI]; | |
207 #endif | |
208 | |
209 TRACE_FUNCTION ("get_imei()"); | |
210 | |
211 #ifdef PCM_2_FFS | |
212 retVal = ffs_file_read((UBYTE *)PSPDF_IMEI_ID, buf, sizeof( T_PSPDF_IMEI ) ); | |
213 #else | |
214 retVal = pcm_ReadFile ((UBYTE *)EF_IMEI_ID, SIZE_EF_IMEI, buf, &version); | |
215 #endif | |
216 | |
217 #ifndef PCM_2_FFS | |
218 if( retVal EQ PCM_INVALID_SIZE OR retVal EQ PCM_INVALID_FILE ) | |
219 return( FALSE ); | |
220 #endif | |
221 | |
222 #else | |
223 UBYTE buf[CL_IMEI_SIZE]; | |
224 | |
225 TRACE_FUNCTION ("get_imei()"); | |
226 | |
227 cl_get_imeisv(CL_IMEI_SIZE, buf, CL_IMEI_GET_STORED_IMEI); | |
228 #endif | |
229 | |
230 imei[0] = ((buf [0] >> 4) & 0x0F)+0x30; | |
231 imei[1] = ( buf [0] & 0x0F) +0x30; | |
232 imei[2] = ((buf [1] >> 4) & 0x0F)+0x30; | |
233 imei[3] = ( buf [1] & 0x0F)+0x30; | |
234 imei[4] = ((buf [2] >> 4) & 0x0F)+0x30; | |
235 imei[5] = ( buf [2] & 0x0F)+0x30; | |
236 imei[6] = ((buf [3] >> 4) & 0x0F)+0x30; | |
237 imei[7] = ( buf [3] & 0x0F)+0x30; | |
238 imei[8] = ((buf [4] >> 4) & 0x0F)+0x30; | |
239 imei[9] = ( buf [4] & 0x0F)+0x30; | |
240 imei[10] = ((buf [5] >> 4) & 0x0F)+0x30; | |
241 imei[11] = ( buf [5] & 0x0F)+0x30; | |
242 imei[12] = ((buf [6] >> 4) & 0x0F)+0x30; | |
243 imei[13] = ( buf [6] & 0x0F)+0x30; | |
244 // July 09, 2005 REF : MMI-22565 - a0876501 | |
245 // For calculating the Cd byte | |
246 imei[14] = ((getCdByteFromImei(buf)) & 0x0F)+0x30; | |
247 imei[15] = (( buf [7] >> 4) & 0x0F)+0x30; | |
248 imei[16] = ( buf [7] & 0x0F)+0x30; | |
249 imei[17] = 0; | |
250 | |
251 TRACE_EVENT_P8("MMI INFO IMEI: TAC %1c%1c%1c%1c%1c%1c%1c%1c", | |
252 imei[0], imei[1], imei[2], imei[3], | |
253 imei[4], imei[5], imei[6], imei[7]); | |
254 TRACE_EVENT_P6("MMI INFO IMEI: SNR %1c%1c%1c%1c%1c%1c", | |
255 imei[8], imei[9], imei[10], imei[11], | |
256 imei[12], imei[13]); | |
257 TRACE_EVENT_P4("MMI INFO IMEI: SV CD %1c%1c%1c%1c", imei[14], imei[15], imei[16],imei[17]); | |
258 | |
259 return( TRUE ); | |
260 } | |
261 #endif | |
262 | |
263 char* get_build_user() | |
264 { | |
265 return BUILD_USER; | |
266 } | |
267 | |
268 char* get_build_date() | |
269 { | |
270 return BUILD_DATE; | |
271 } | |
272 | |
273 char* get_build_time() | |
274 { | |
275 return BUILD_TIME; | |
276 } | |
277 | |
278 /************************ End of functions *************************************************/ | |
279 | |
280 #ifndef FF_WAP | |
281 void rAT_WAP_start_gprs_login(void) | |
282 { | |
283 //Dummy function - WAP disabled/not compiled | |
284 } | |
285 #endif | |
286 /* END OF DUMMY FUNCTIONS */ |