FreeCalypso > hg > fc-tourmaline
comparison src/ui/bmi/mmiDummy.c @ 147:1075ec44acca
mmiDummy.c: bogotab fixes
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 16 Nov 2020 05:47:02 +0000 |
parents | c0052fe355d3 |
children |
comparison
equal
deleted
inserted
replaced
146:303704cf0701 | 147:1075ec44acca |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 | 2 |
3 CONDAT (UK) | 3 CONDAT (UK) |
4 | 4 |
5 ******************************************************************************** | 5 ******************************************************************************** |
6 | 6 |
7 This software product is the property of Condat (UK) Ltd and may not be | 7 This software product is the property of Condat (UK) Ltd and may not be |
8 disclosed to any third party without the express permission of the owner. | 8 disclosed to any third party without the express permission of the owner. |
9 | 9 |
10 ******************************************************************************** | 10 ******************************************************************************** |
11 | 11 |
12 $Project name: Basic MMI | 12 $Project name: Basic MMI |
13 $Project code: BMI (6349) | 13 $Project code: BMI (6349) |
14 $Module: Start | 14 $Module: Start |
15 $File: MmiDummy.c | 15 $File: MmiDummy.c |
16 $Revision: 1.0 | 16 $Revision: 1.0 |
17 | 17 |
18 $Author: Condat(UK) | 18 $Author: Condat(UK) |
19 $Date: 25/10/00 | 19 $Date: 25/10/00 |
20 | 20 |
21 ******************************************************************************** | 21 ******************************************************************************** |
22 | 22 |
23 Description: | 23 Description: |
24 | |
25 | 24 |
26 | 25 |
27 ******************************************************************************** | 26 ******************************************************************************** |
28 $History: MmiDummy.c | 27 $History: MmiDummy.c |
29 | 28 |
30 July 09, 2005 REF : MMI-22565 - a0876501 | 29 July 09, 2005 REF : MMI-22565 - a0876501 |
31 Description: IMEI CD byte calculation added | 30 Description: IMEI CD byte calculation added |
32 Solution: Byte alignment done for IMEI display. | 31 Solution: Byte alignment done for IMEI display. |
33 | 32 |
34 May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg | 33 May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg |
35 Description: IMEI retreival by posting a call to ACI sAT_xx API | 34 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 | 35 Solution: The direct call to cl_get_imeisv() is replaced with the |
37 call to the callNUmber() which inturn calls sAT_Dn() and | 36 call to the callNUmber() which inturn calls sAT_Dn() and |
38 retrieves the IMEI info | 37 retrieves the IMEI info |
39 | 38 |
40 ******************************************************************************* | 39 ******************************************************************************* |
41 | 40 |
42 Include files | 41 Include files |
43 | 42 |
89 #else | 88 #else |
90 #include "prim.h" | 89 #include "prim.h" |
91 #endif | 90 #endif |
92 | 91 |
93 | 92 |
94 | |
95 #include "message.h" | 93 #include "message.h" |
96 #include "prim.h" | 94 #include "prim.h" |
97 #include "aci_cmh.h" | 95 #include "aci_cmh.h" |
98 //NM | 96 //NM |
99 | 97 |
118 #include "MmiDummy.h" | 116 #include "MmiDummy.h" |
119 #include "MmiDialogs.h" | 117 #include "MmiDialogs.h" |
120 #include "MmiLists.h" | 118 #include "MmiLists.h" |
121 | 119 |
122 #include "MmiMain.h" | 120 #include "MmiMain.h" |
123 // May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg | 121 // May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg |
124 #ifdef FF_MMI_ATC_MIGRATION | 122 #ifdef FF_MMI_ATC_MIGRATION |
125 #define ATD_IMEI "*#06#" | 123 #define ATD_IMEI "*#06#" |
126 #define IMEI_LEN 15 | 124 #define IMEI_LEN 15 |
127 EXTERN void callNumber(UBYTE *number); | 125 EXTERN void callNumber(UBYTE *number); |
128 #endif | 126 #endif |
131 #ifdef NEPTUNE_BOARD | 129 #ifdef NEPTUNE_BOARD |
132 extern const UBYTE C_DEFAULT_IMEISV[CL_IMEI_SIZE]; | 130 extern const UBYTE C_DEFAULT_IMEISV[CL_IMEI_SIZE]; |
133 #endif | 131 #endif |
134 | 132 |
135 | 133 |
136 // May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg | 134 // May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg |
137 #ifdef FF_MMI_ATC_MIGRATION | 135 #ifdef FF_MMI_ATC_MIGRATION |
138 char imei[IMEI_LEN+1]; | 136 char imei[IMEI_LEN+1]; |
139 #endif | 137 #endif |
140 | 138 |
141 // July 09, 2005 REF : MMI-22565 - a0876501 | 139 // July 09, 2005 REF : MMI-22565 - a0876501 |
142 extern UBYTE getCdByteFromImei(UBYTE *imei); | 140 extern UBYTE getCdByteFromImei(UBYTE *imei); |
143 | 141 |
144 | 142 |
145 //Added by Muthu for PCM Replacemeny | 143 //Added by Muthu for PCM Replacemeny |
146 | 144 |
155 *******************************************************************************************/ | 153 *******************************************************************************************/ |
156 | 154 |
157 void mmi_send_event (T_MFW_HND win, USHORT event, USHORT value, void * parameter) | 155 void mmi_send_event (T_MFW_HND win, USHORT event, USHORT value, void * parameter) |
158 { | 156 { |
159 | 157 |
160 if (win){ | 158 if (win){ |
161 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; | 159 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; |
162 T_MMI_CONTROL * control = (T_MMI_CONTROL *)win_data->user; | 160 T_MMI_CONTROL * control = (T_MMI_CONTROL *)win_data->user; |
163 | 161 |
164 if (control->dialog NEQ 0) | 162 if (control->dialog NEQ 0) |
165 (control->dialog) (win, event, value, parameter); | 163 (control->dialog) (win, event, value, parameter); |
166 } | 164 } |
167 } | 165 } |
168 | 166 |
169 UBYTE idle_screen_has_focus() | 167 UBYTE idle_screen_has_focus() |
170 { | 168 { |
171 return TRUE; | 169 return TRUE; |
172 } | 170 } |
173 | 171 |
174 // May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg | 172 // May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg |
175 // this function is no more referenced hence omit it | 173 // this function is no more referenced hence omit it |
176 #ifdef FF_MMI_ATC_MIGRATION | 174 #ifdef FF_MMI_ATC_MIGRATION |
177 /******************************************************************************* | 175 /******************************************************************************* |
178 | 176 |
179 $Function: mmi_imei_retrieve | 177 $Function: mmi_imei_retrieve |
180 | 178 |
181 $Description: This function invokes sAT_Dn() to retrieve the IMEI and store it | 179 $Description: This function invokes sAT_Dn() to retrieve the IMEI and store it |
182 in the global variabel "imei". | 180 in the global variabel "imei". |
183 | 181 |
184 $Returns: | 182 $Returns: |
185 | 183 |
186 $Arguments: | 184 $Arguments: |
187 *******************************************************************************/ | 185 *******************************************************************************/ |
188 void mmi_imei_retrieve() | 186 void mmi_imei_retrieve() |
189 { | 187 { |
190 callNumber((UBYTE*)ATD_IMEI); | 188 callNumber((UBYTE*)ATD_IMEI); |
191 } | 189 } |
192 #else | 190 #else |
193 /******************************************************************************* | 191 /******************************************************************************* |
194 | 192 |
195 $Function: get_imei | 193 $Function: get_imei |
196 | 194 |
197 $Description: This function invokes the operation for key sequence | 195 $Description: This function invokes the operation for key sequence |
198 command for getting the IMEI. | 196 command for getting the IMEI. |
199 | 197 |
200 $Returns: | 198 $Returns: |
201 | 199 |
202 $Arguments: | 200 $Arguments: |
203 *******************************************************************************/ | 201 *******************************************************************************/ |
218 #endif | 216 #endif |
219 | 217 |
220 TRACE_FUNCTION ("get_imei()"); | 218 TRACE_FUNCTION ("get_imei()"); |
221 | 219 |
222 #ifdef PCM_2_FFS | 220 #ifdef PCM_2_FFS |
223 /* OMAPS00059546 : If there is no IMEI file, copying the default imei | 221 /* OMAPS00059546 : If there is no IMEI file, copying the default imei |
224 has been added */ | 222 has been added */ |
225 retVal = ffs_file_read((UBYTE *)PSPDF_IMEI_ID, buf, sizeof(T_PSPDF_IMEI) ); | 223 retVal = ffs_file_read((UBYTE *)PSPDF_IMEI_ID, buf, sizeof(T_PSPDF_IMEI) ); |
226 if (retVal != sizeof(T_PSPDF_IMEI)) | 224 if (retVal != sizeof(T_PSPDF_IMEI)) |
227 { | 225 { |
228 TRACE_ERROR("CL FFS read ERROR (IMEI) -> Default values used"); | 226 TRACE_ERROR("CL FFS read ERROR (IMEI) -> Default values used"); |
229 memcpy(buf, C_DEFAULT_IMEISV, sizeof(T_PSPDF_IMEI)); | 227 memcpy(buf, C_DEFAULT_IMEISV, sizeof(T_PSPDF_IMEI)); |
230 } | 228 } |
231 #else | 229 #else |
232 retVal = pcm_ReadFile ((UBYTE *)EF_IMEI_ID, SIZE_EF_IMEI, buf, &version); | 230 retVal = pcm_ReadFile ((UBYTE *)EF_IMEI_ID, SIZE_EF_IMEI, buf, &version); |
233 if( retVal EQ PCM_INVALID_SIZE OR retVal EQ PCM_INVALID_FILE ) | 231 if( retVal EQ PCM_INVALID_SIZE OR retVal EQ PCM_INVALID_FILE ) |
234 return( FALSE ); | 232 return( FALSE ); |
235 #endif | 233 #endif |
236 | 234 |
237 #else | 235 #else |
238 UBYTE buf[CL_IMEI_SIZE]; | 236 UBYTE buf[CL_IMEI_SIZE]; |
239 | 237 |
240 TRACE_FUNCTION ("get_imei()"); | 238 TRACE_FUNCTION ("get_imei()"); |
241 | 239 |
242 cl_get_imeisv(CL_IMEI_SIZE, buf, CL_IMEI_GET_STORED_IMEI); | 240 cl_get_imeisv(CL_IMEI_SIZE, buf, CL_IMEI_GET_STORED_IMEI); |
243 #endif | 241 #endif |
244 | 242 |
245 /* OMAPS00059546 : BCD Conversion for IMEI has been added for NEPTUNE */ | 243 /* OMAPS00059546 : BCD Conversion for IMEI has been added for NEPTUNE */ |
275 imei[9] = ( buf [4] & 0x0F)+0x30; | 273 imei[9] = ( buf [4] & 0x0F)+0x30; |
276 imei[10] = ((buf [5] >> 4) & 0x0F)+0x30; | 274 imei[10] = ((buf [5] >> 4) & 0x0F)+0x30; |
277 imei[11] = ( buf [5] & 0x0F)+0x30; | 275 imei[11] = ( buf [5] & 0x0F)+0x30; |
278 imei[12] = ((buf [6] >> 4) & 0x0F)+0x30; | 276 imei[12] = ((buf [6] >> 4) & 0x0F)+0x30; |
279 imei[13] = ( buf [6] & 0x0F)+0x30; | 277 imei[13] = ( buf [6] & 0x0F)+0x30; |
280 // July 09, 2005 REF : MMI-22565 - a0876501 | 278 // July 09, 2005 REF : MMI-22565 - a0876501 |
281 // For calculating the Cd byte | 279 // For calculating the Cd byte |
282 imei[14] = ((getCdByteFromImei(buf)) & 0x0F)+0x30; | 280 imei[14] = ((getCdByteFromImei(buf)) & 0x0F)+0x30; |
283 imei[15] = (( buf [7] >> 4) & 0x0F)+0x30; | 281 imei[15] = (( buf [7] >> 4) & 0x0F)+0x30; |
284 imei[16] = ( buf [7] & 0x0F)+0x30; | 282 imei[16] = ( buf [7] & 0x0F)+0x30; |
285 imei[17] = 0; | 283 imei[17] = 0; |
286 #endif | 284 #endif |
297 } | 295 } |
298 #endif | 296 #endif |
299 | 297 |
300 char* get_build_user() | 298 char* get_build_user() |
301 { | 299 { |
302 return BUILD_USER; | 300 return BUILD_USER; |
303 } | 301 } |
304 | 302 |
305 char* get_build_date() | 303 char* get_build_date() |
306 { | 304 { |
307 return BUILD_DATE; | 305 return BUILD_DATE; |
308 } | 306 } |
309 | 307 |
310 char* get_build_time() | 308 char* get_build_time() |
311 { | 309 { |
312 return BUILD_TIME; | 310 return BUILD_TIME; |
313 } | 311 } |
314 | 312 |
315 /************************ End of functions *************************************************/ | 313 /************************ End of functions *************************************************/ |
316 | 314 |
317 #ifndef FF_WAP | 315 #ifndef FF_WAP |
318 void rAT_WAP_start_gprs_login(void) | 316 void rAT_WAP_start_gprs_login(void) |
319 { | 317 { |
320 //Dummy function - WAP disabled/not compiled | 318 //Dummy function - WAP disabled/not compiled |
321 } | 319 } |
322 #endif | 320 #endif |
323 /* END OF DUMMY FUNCTIONS */ | 321 /* END OF DUMMY FUNCTIONS */ |