FreeCalypso > hg > fc-magnetite
comparison src/ui3/bmi/mmiServices.c @ 421:6a4d9f47793e
src/ui3/bmi: file renames to make the case consistent
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 21 Jan 2018 03:28:53 +0000 |
parents | src/ui3/bmi/MmiServices.c@e8ddbb0837ed |
children |
comparison
equal
deleted
inserted
replaced
420:e8ddbb0837ed | 421:6a4d9f47793e |
---|---|
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: Supplementary services | |
15 $File: MmiServices.c | |
16 $Revision: 1.0 | |
17 | |
18 $Author: Condat(UK) | |
19 $Date: 25/10/00 | |
20 | |
21 ******************************************************************************** | |
22 | |
23 Description | |
24 | |
25 This module provides the supplementary services functionality | |
26 | |
27 | |
28 ******************************************************************************** | |
29 $History: MmiServices.c | |
30 | |
31 May 03, 2007 DR: OMAPS00129383 x0pleela | |
32 Description:[ACI] MTC related call forwarded SS notification not differentiable on BAT/ATI level | |
33 Solution: Replaced BASIC_SERVICE_CODE with TELETELE_BEARER_SERVICE_CODE to activate | |
34 and de-activate both Tele and Bearere services | |
35 | |
36 Feb 27, 2007 ER: OMAPS00113891 x0pleela | |
37 Description:[ACI] MTC related call forwarded SS notification not differentiable on BAT/ATI level | |
38 Solution: Did the following changes: | |
39 - Externed call_data variable | |
40 - In function showssNotify(), | |
41 >> handling the case MFW_SS_MT_FORWARDED: where | |
42 incoming call dialog will be displayed with proper string for TTY/normal forwarded | |
43 incoming call. | |
44 >>New case MFW_SS_MT_CALL_FORWARDED is added to display a dialog "Incoming | |
45 call forwarde" to the subscriber who has forwarded his all incoming calls | |
46 | |
47 Nov 27, 2006 OMAPS00098359 a0393213(R.Prabakar) | |
48 Description: CPHS 4.2 : Call Divert doesn't work properly for Line 2 | |
49 | |
50 Aug 28, 2006 DR: OMAPS00083503 x0pleela | |
51 Description: Result of ss_check_ss_string may be ignored | |
52 Solution: Dynamically changing the dcs value in editor settings in functions showUSSDInfo() and showUSSDCNF() | |
53 | |
54 Aug 28, 2006 DR: OMAPS00083503 x0pleela | |
55 Description: Result of ss_check_ss_string may be ignored | |
56 Solution: Defined new enumeration T_SS_APLHA for DCS | |
57 services(): Checking for dcs and if UCS2 character then display a dialog | |
58 saying font not supported. Else proceed with the transaction | |
59 showUSSDError():This function displays a dialog saying USSD message received, | |
60 Font not supported for UCS2 characters | |
61 | |
62 | |
63 Aug 23, 2006 DR: OMAPS00090419 x0pleela | |
64 Descroption:FT Nice/France, Orange (wk32/06) - Call Barring - misleading message: | |
65 Solution:Commented the code (function getCBService()) which appends the ss string with *11 | |
66 or *89 as it is not a valid SS string for checking status, activation and deactivation of | |
67 call barring feature in functions servicesCallBarringCheck, servicesCallBarringDeactivate, | |
68 servicesCallBarringActivate | |
69 | |
70 May 30, 2006 REF:OMAPS00079650 a0393213 (R.Prabakar) | |
71 Description : CPHS Call Forwarding feature implementation | |
72 Solution : As part of implementation, in this file, call to cphs_set_divert_status is called whenever necessary. | |
73 The current code is put under the else part of #ifdef FF_CPHS. Some clean-up of existing code is also done. | |
74 | |
75 May 30, 2006 DR: OMAPS00070657 x0pleela | |
76 Description: CPHS feature on Locosto-Lite | |
77 Solution: For ALS feature, | |
78 a) Defined new enumeration "SERVICE_CB_SERVICE" for SS similar to Line 1 and Line 2 | |
79 b) Defined new function "getCBService()" to update psstring based on the current | |
80 line activated while processing SS | |
81 | |
82 Apr 10, 2006 REF: OMAPS00052691 x0039928 | |
83 Description: FT USA [Cingular(WK42)] - T 8.6 Call Waiting Accept - | |
84 ATD *43# returns "Unknown status" | |
85 Solution: Proper Text is displyed when network returns status STAT_NONE( 0 ) for | |
86 call waiting activation. | |
87 | |
88 Dec 07, 2005 REF: OMAPS00050087 x0039928 | |
89 Description: Deactivated is displayed while activate Hide Id option is selected | |
90 Solution: String "Not Activated" is displayed if the Hide Id activation fails. | |
91 | |
92 July 09, 2005 REF : MMI-22565 - a0876501 | |
93 Description: IMEI CD byte calculation added | |
94 Solution: Increased the IMEI_LEN from 15 to 17 for displaying the Cd byte. | |
95 | |
96 Jun 16, 2005 REF: CRR 31543 x0021334 | |
97 Issue: SATK: cannot get TR for send ussd command | |
98 Solution: When the user presses "Hang up" key when the SAT USSD session is in progress, | |
99 a call is made to function 'sAT_end_ussd()' to end the USSD session. | |
100 | |
101 May 12, 2005 REF: CRR 30892 x0021334 | |
102 Bug: MMI doesn't handle 2nd Interogation of "CW for basic services" using USSD *#43#. | |
103 Fix: Set ss_data.info_win to NULL to pass the check in services_ss_cb() for notification | |
104 | |
105 May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg | |
106 Description: IMEI retreival by posting a call to ACI sAT_xx API | |
107 Solution: The direct call to cl_get_imeisv() is replaced with the | |
108 call to the mmi_imei_store() which inturn calls sAT_Dn() and | |
109 retrieves the IMEI info and stores it onto the global | |
110 variable "imei" | |
111 | |
112 Feb 17, 2005 REF : CRR 17657 x0012850 Divya.P.V | |
113 Bug : Unable to compose a one or two digit number | |
114 Fix : This bug is reproducible when a very long message is sent by the service provider when an invalid one or two digit number is dialled. | |
115 The read only editor with the service provider message that comes up when a one or two digit is dialled | |
116 was not handled properly. So altered the editor handling to cater for the long message. | |
117 | |
118 Oct 20, 2004 REF: CRR 25772 Deepa M.D | |
119 Bug: Not displaying proper RSK name in call divert edit screens | |
120 Fix: The RSK name will be changed based on whether the editor content is empty or not. | |
121 | |
122 Jul 23, 2004 REF: CRR 16107 xvilliva | |
123 Bug: (Call Barring) - MMI response overlayes partially background images. | |
124 Fix: Alert being displayed is altered. | |
125 | |
126 Jun 21,2004 CRR:13650 xpradipg - SASKEN | |
127 | |
128 Jul 16, 2004 REF: CRR 18409 xvilliva | |
129 Bug: CHW : message "Deactivated" when it should be "Activated". | |
130 Fix: The alert displayed depends on the status code received. If we | |
131 receive the status as zero or 0xFF, we now show an alert saying | |
132 "unknown status" instead of "Deactivated". | |
133 | |
134 | |
135 Jun 21,2004 CRR:13650 xpradipg - SASKEN | |
136 | |
137 Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) | |
138 Solution: The CF state is maintained in flash. During bootup the CF icon in the idle screen | |
139 is displayed depending upon its state in the ffs | |
140 | |
141 Jun 10, 2004 REF: CRR MMI-SPR-13614 Rashmi C N(Sasken) | |
142 Solution: The condition for which Call Forward is activated/deactivated or its staus is checked, | |
143 is displayed in the message along with the activation/deactivation message | |
144 | |
145 Jun 21,2004 CRR:13650 xpradipg - SASKEN | |
146 Description: CBA : no basic service sent when using the menu | |
147 Fix: Basic service code 10(All teleservices) is sent for activation and deactivation thru menus | |
148 | |
149 | |
150 | |
151 Jun 04,2004 CRR:13601 xpradipg - SASKEN | |
152 Description: CFO interrogation display : Timer to long | |
153 Fix: Timer is enabled for the information dialog. It times out after 5 seconds from the last key | |
154 press. | |
155 | |
156 Jun 03, 2004 CRR:13649 - xpradipg-SASKEN | |
157 subject: CBA : Management of password | |
158 solution: password is promted on selecting activation/deactivation option as against the previous | |
159 case where it was shown up on selecting CallBarring option in the Network Services | |
160 | |
161 | |
162 Issue Number : SPR#12882 on 29/03/04 by VadiRaj | |
163 | |
164 25/10/00 Original Condat(UK) BMI version. | |
165 | |
166 $End | |
167 | |
168 *******************************************************************************/ | |
169 | |
170 | |
171 /****************************************************************************** | |
172 | |
173 Include Files | |
174 | |
175 *******************************************************************************/ | |
176 | |
177 #define BUGS 0 | |
178 | |
179 #define ENTITY_MFW | |
180 | |
181 /* includes */ | |
182 #include <string.h> | |
183 #include <stdio.h> | |
184 #include <stdlib.h> | |
185 | |
186 #if defined (NEW_FRAME) | |
187 | |
188 #include "typedefs.h" | |
189 #include "vsi.h" | |
190 #include "pei.h" | |
191 #include "custom.h" | |
192 #include "gsm.h" | |
193 | |
194 #else | |
195 | |
196 #include "STDDEFS.H" | |
197 #include "custom.h" | |
198 #include "gsm.h" | |
199 #include "vsi.h" | |
200 | |
201 #endif | |
202 #include "prim.h" | |
203 | |
204 | |
205 #include "mfw_sys.h" | |
206 #include "mfw_mfw.h" | |
207 #include "mfw_win.h" | |
208 #include "mfw_kbd.h" | |
209 /* SPR#1428 - SH - New Editor changes */ | |
210 #ifndef NEW_EDITOR | |
211 #include "mfw_edt.h" | |
212 #endif /* NEW_EDITOR */ | |
213 #include "mfw_lng.h" | |
214 #include "mfw_icn.h" | |
215 #include "mfw_tim.h" | |
216 #include "mfw_mnu.h" | |
217 #include "mfw_phb.h" | |
218 #include "mfw_sat.h" | |
219 #include "mfw_ffs.h" | |
220 #include "ksd.h" | |
221 #include "psa.h" | |
222 #include "mfw_sms.h" | |
223 #include "mfw_sim.h" | |
224 #include "mfw_nm.h" | |
225 #include "mfw_cm.h" | |
226 #include "mfw_ss.h" | |
227 #include "dspl.h" | |
228 #include "MmiMmi.h" | |
229 #include "MmiDummy.h" | |
230 #include "MmiDialogs.h" | |
231 #include "MmiLists.h" | |
232 #include "MmiMain.h" | |
233 #include "MmiStart.h" | |
234 #include "MmiPins.h" | |
235 #include "MmiIdle.h" | |
236 #include "MmiMenu.h" | |
237 #include "MmiSoftKeys.h" | |
238 #include "Mmiicons.h" | |
239 #include "mmiCall.h" | |
240 #include "MmiServices.h" | |
241 /* SPR#1428 - SH - New Editor changes */ | |
242 #ifdef NEW_EDITOR | |
243 #include "ATBCommon.h" | |
244 #include "ATBDisplay.h" | |
245 #include "ATBEditor.h" | |
246 #include "AUIEditor.h" | |
247 #include "AUITextEntry.h" | |
248 #else /* NEW_EDITOR */ | |
249 #include "MmiEditor.h" | |
250 #endif /* NEW_EDITOR */ | |
251 | |
252 #include "MmiCPHS.h" | |
253 | |
254 | |
255 #include "MmiBookUtils.h" | |
256 #include "MmiBookShared.h " // MZ 26/02/01 | |
257 #include "cus_aci.h" | |
258 | |
259 #include "prim.h" | |
260 #ifndef PCM_2_FFS | |
261 #include "pcm.h" | |
262 #endif | |
263 | |
264 | |
265 #include "mmiColours.h" | |
266 #include "aci_cmh.h" // Marcus: Issue 1494: 18/12/2002: for MAX_USSD_LEN | |
267 | |
268 //gprads CQ-16432 | |
269 #include "AUIEditor_i.h" | |
270 extern void msgsGetVoiceAddress(CHAR *Buffer); | |
271 extern void InfoDialogTimRestart(T_MFW_HND win); | |
272 | |
273 /* x0039928 - Lint warning removal | |
274 static void (*show) (void); */ | |
275 | |
276 static void showWait (T_MFW_HND win); | |
277 static void showOk (T_MFW_HND win); | |
278 static void showFailed (T_MFW_HND win); | |
279 static void showError (T_MFW_HND win, T_MFW_SS_ERROR ss_error); | |
280 static void showCLIStatus (T_MFW_HND win, T_MFW_SS_PARA * ss_cnf ); | |
281 static void showSSNotify (T_MFW_HND win, T_MFW_SS_NOTIFY * ss_notify); | |
282 | |
283 | |
284 | |
285 static void showIMEI2 (T_MFW_HND win, T_MFW_SS_PARA * ss_cnf); | |
286 static void showUSSDREQ (T_MFW_HND win, T_MFW_SS_PARA * ss_cnf); | |
287 static void showUSSDCNF (T_MFW_HND win, T_MFW_SS_PARA * ss_cnf); | |
288 static void showUSSDEnter (void); | |
289 static void showUSSDFull (T_MFW_HND win); | |
290 static void sendUSSD (T_MFW_SS_PARA *ussd_senddata); | |
291 static int servicesSendCallDivert(char * divert_number); | |
292 int servicesUSSDEdit(struct MfwMnuTag* m, struct MfwMnuItemTag* i); | |
293 int servicesUSSDDelete(struct MfwMnuTag* m, struct MfwMnuItemTag* i); | |
294 static void servicesShowUSSDMenu(void); | |
295 static void servicesStoreUSSD(void); | |
296 | |
297 static void ServicesGetOtherNumber(T_MFW_HND win); | |
298 static void servicesStoreVoiceMailNumber( void ); | |
299 #ifdef NEW_EDITOR | |
300 static void services_get_voice_number_cb(T_MFW_HND win, USHORT identifier, SHORT reason); | |
301 #else /* NEW_EDITOR */ | |
302 static void services_get_voice_number_cb(T_MFW_HND win, USHORT reason); | |
303 #endif /* NEW_EDITOR */ | |
304 | |
305 //x0pleela 25 May, 2006 DR: OMAPS00070657 | |
306 #ifdef FF_CPHS | |
307 static void getCBService(char * pSSstring); | |
308 #endif | |
309 | |
310 //x0pleela 24 Aug, 2006 DR: OMAPS00083503 | |
311 //Function to display a dialog saying font not suported for UCS2 characters | |
312 #ifdef MMI_LITE | |
313 static void showUSSDError (T_MFW_HND win); | |
314 #endif | |
315 | |
316 #ifdef FF_CPHS_REL4 | |
317 extern BOOL interrogate; | |
318 #endif | |
319 | |
320 //x0pleela 27 eb, 2007 ER: OAMPS00113891 | |
321 //get the call_data structure | |
322 extern T_call call_data; | |
323 | |
324 typedef struct | |
325 { | |
326 T_MMI_CONTROL mmi_control; | |
327 T_MFW_HND parent_win; | |
328 T_MFW_HND info_win; | |
329 T_MFW_HND info_tim; | |
330 T_MFW_HND info_kbd; | |
331 T_MFW_HND info_kbd_long; | |
332 USHORT LeftSoftKey; /* used for Ok */ | |
333 USHORT RightSoftKey; /* Used for Back */ | |
334 ULONG Time; | |
335 T_MFW_EVENT KeyEvents; | |
336 USHORT TextId1; /* Line 1 */ | |
337 USHORT TextId2; /* Line 2 */ | |
338 char * TextString4; | |
339 USHORT Identifier; | |
340 T_VOID_FUNC Callback; | |
341 } T_dialog_ext_info; | |
342 | |
343 //x0pleela 24 Aug, 2006 DR: OMAPS00083503 | |
344 | |
345 typedef enum /* see DCS in Rec. GSM 03.38 */ | |
346 { | |
347 SS_ALPHA_7_Bit = 0, | |
348 SS_ALPHA_8_Bit = 1, | |
349 SS_ALPHA_16_Bit = 2, | |
350 SS_ALPHA_Reserved = 3 | |
351 } | |
352 T_SS_ALPHA; | |
353 | |
354 | |
355 T_MFW_HND dialog_ext_info_dialog (T_MFW_HND parent_win, | |
356 T_dialog_ext_info * display_info); | |
357 | |
358 static MfwHnd lastFocus; /* store old focus */ | |
359 static MfwHnd win; /* our window */ | |
360 /*x0039928- Lint warning removal */ | |
361 /* static MfwHnd kbd; // our keyboard handler */ | |
362 static MfwHnd times; /* timeout */ | |
363 | |
364 /* x0039928 - Lint warning removal | |
365 static MmiState nextState; // next state when finished */ | |
366 static int servicesState; /* current state of module */ | |
367 | |
368 | |
369 static T_MFW_SS_PARA *ss_cnf; /* union container for all SS confirmations */ | |
370 | |
371 /* decode service type - tele/bearer */ | |
372 static unsigned int serviceGetServiceType( UBYTE ss_telecom_type, UBYTE ss_telecom_service); | |
373 static unsigned int serviceGetCategory( T_MFW_SS_CATEGORY cat ); | |
374 static unsigned int serviceGetType( T_MFW_SS_CODES type ); | |
375 static unsigned int ServiceGetStatus( UBYTE pStatus); | |
376 static unsigned int serviceGetError( T_MFW_SS_ERROR ss_error); | |
377 | |
378 | |
379 | |
380 #define SS_STAT_NONE 0 //xvilliva 18409, not registered, not active, | |
381 //not provisioned,not quiescent | |
382 | |
383 //x0pleela 03 May, 2007 DR: OMAPS00129383 | |
384 //defined new service code for both Teleservices and Bearer services | |
385 #define TELE_BEARER_SERVICE_CODE "09" | |
386 | |
387 //June 17, 2004 - CRR:13650 - CBA : no basic service sent when using the menu | |
388 //basic service code for "all teleservices" | |
389 #define BASIC_SERVICE_CODE "10" | |
390 int ss_Code; | |
391 // Jun 10, 2004 REF: CRR MMI-SPR-13614 Rashmi C N(Sasken) | |
392 // ss_Code-- This holds the current CF code for which the activation/deactivation or the staus is being checked | |
393 // This would be used while displaying the status or activation/deactivation message | |
394 | |
395 | |
396 typedef enum | |
397 { | |
398 CFBusy = 0, | |
399 CFNoReach, | |
400 CFNoReply, | |
401 CFAllConditional, | |
402 CFUnconditional, | |
403 CFAllCalls | |
404 } SERVICE_CF_TYPE; | |
405 | |
406 typedef enum | |
407 { | |
408 CBAllOutgoing = 0, | |
409 CBInternational, | |
410 CBInternationalHome, | |
411 CBAllIncoming, | |
412 CBIncomingRoaming | |
413 } SERVICE_CB_TYPE; | |
414 | |
415 | |
416 | |
417 typedef enum | |
418 { | |
419 CFVoice = 0, | |
420 CFAuxVoice, /*MC, ALS line 2*/ | |
421 CFFax, | |
422 CFData, | |
423 CFAll | |
424 } SERVICE_CF_SERVICE; | |
425 | |
426 //x0pleela 25 May, 2006 DR: OMAPS00070657 | |
427 #ifdef FF_CPHS | |
428 typedef enum | |
429 { | |
430 CBVoice = 0, | |
431 CBAuxVoice /*MC, ALS line 2*/ | |
432 | |
433 }SERVICE_CB_SERVICE; | |
434 #endif | |
435 | |
436 typedef enum | |
437 { | |
438 CFActivate = 0, | |
439 CFDeactivate, | |
440 CFCheck | |
441 } SERVICE_CF_ACTION; | |
442 | |
443 typedef enum | |
444 { | |
445 CBActivate = 0, | |
446 CBDeactivate, | |
447 CBCheck, | |
448 CBCheckPassword, | |
449 CBNewPassword, | |
450 CBConfirmNewPassword, | |
451 //Jun 02, 2004 CRR:13649 - xpradipg-SASKEN | |
452 //added for holding the state for callbarring service | |
453 //CQ-13649:start | |
454 CBCancelAll, | |
455 CBActionNone, | |
456 //CQ-13649:end | |
457 //CQ-16432 start | |
458 CBEnterSatPassword | |
459 //CQ-16432 end | |
460 } SERVICE_CB_ACTION; | |
461 | |
462 | |
463 | |
464 /* NOTE that these are needed in new architecture */ | |
465 static SERVICE_CF_TYPE CFType; /* Type of Call Forwarding */ | |
466 static SERVICE_CF_SERVICE CFService; /* basic service for Call Forwarding */ | |
467 //x0pleela 25 May, 2006 DR: OMAPS00070657 | |
468 /* x0039928 - Lint warning removal | |
469 #ifdef FF_CPHS | |
470 static SERVICE_CB_SERVICE CBService; // basic service for Call Barring | |
471 #endif | |
472 */ | |
473 static SERVICE_CF_ACTION CFAction; /* action for Call Forwarding */ | |
474 static SERVICE_CB_TYPE CBType; /* Type of Call Barring */ | |
475 static SERVICE_CB_ACTION CBAction; /* action for Call Barring */ | |
476 //Jun 02, 2004 CRR:13649 - xpradipg-SASKEN | |
477 //new enum added to indicate the action to be taken in the callback function for password | |
478 static SERVICE_CB_ACTION CBFlag; /*to indicate the action after retriving the password*/ | |
479 //CRR:13649 | |
480 /* x0039928 - Lint warning removal | |
481 static char CFNumber[MAX_LEN]; number to forward calls to */ | |
482 | |
483 | |
484 | |
485 /* end of bits for USSD */ | |
486 | |
487 | |
488 | |
489 #define CF_ACTIVE_STATUS 1 | |
490 #define CF_INACTIVE_STATUS 2 | |
491 /* Marcus: Issue 1652: 03/02/2003 */ | |
492 #define CF_PROVISIONED_STATUS 3 | |
493 #define CF_UNKNOWN_STATUS 4 | |
494 | |
495 | |
496 /* 30th May,2006 OMAPS00079650 a0393213 (R.Prabakar) | |
497 Description : CPHS Call Forwarding feature implementation | |
498 Solution : As part of this implementation, some #defines and struct definitions are moved to MmiServices.h*/ | |
499 | |
500 #define MFW_CFU_VOICE_ACTIVE 0x01 | |
501 #define MFW_CFU_FAX_ACTIVE 0x02 | |
502 #define MFW_CFU_DATA_ACTIVE 0x04 | |
503 #define MFW_CFU_SMS_ACTIVE 0x08 | |
504 | |
505 #define MFW_CFU_ALL_SERVICES_ACTIVE (MFW_CFU_VOICE_ACTIVE | MFW_CFU_FAX_ACTIVE | MFW_CFU_DATA_ACTIVE | MFW_CFU_SMS_ACTIVE) | |
506 #define MFW_CFU_ALL_BASIC_SERVICES_ACTIVE (MFW_CFU_VOICE_ACTIVE | MFW_CFU_FAX_ACTIVE | MFW_CFU_DATA_ACTIVE) | |
507 | |
508 T_ss ss_data = {0}; | |
509 char satPassword[10]={0};//CQ-16432 | |
510 | |
511 | |
512 static void srv_empty_list_result (UBYTE ss_category, USHORT event, UBYTE ss_status, UBYTE ss_code); /* Marcus: Issue 1652: 03/02/2002 */ | |
513 static void showCFStatus (T_MFW_HND win , T_ss * data ); | |
514 static UBYTE srv_copy_feature_list_cf (T_ss_feature_cf * out_list, T_MFW_SS_CF_CNF * in_list); | |
515 static void srv_get_forwarded_to_number ( char * textString, | |
516 char * forwarded_to_number, | |
517 UBYTE max_chars); | |
518 static UBYTE srv_get_service_type ( USHORT * textId, | |
519 UBYTE ss_telecom_type, UBYTE ss_telecom_service); | |
520 static void srv_get_status (USHORT *textId, UBYTE pStatus); | |
521 static UBYTE srv_check_CF_telephony_status (T_MFW_SS_CF_CNF * in_list); | |
522 | |
523 static void showCWStatus (T_MFW_HND win, T_ss * data ); | |
524 static UBYTE srv_copy_feature_list_cw (T_ss_feature_cw * out_list, T_MFW_SS_CW_CNF * in_list); | |
525 | |
526 static void showCBStatus (T_MFW_HND win, T_ss * data ); | |
527 static UBYTE srv_copy_feature_list_cb (T_ss_feature_cb * out_list, T_MFW_SS_CB_CNF * in_list); | |
528 | |
529 | |
530 static int services_win_cb(T_MFW_EVENT e, T_MFW_SS_PARA * para); | |
531 static int services_ss_cb(T_MFW_EVENT e, T_MFW_HND para); | |
532 | |
533 static int services_info_cb(T_MFW_HND win, USHORT identifier, UBYTE reason); | |
534 | |
535 | |
536 static void srv_display_status (UBYTE ss_status); | |
537 | |
538 | |
539 | |
540 typedef struct | |
541 { | |
542 int text; | |
543 #ifdef NEW_EDITOR /* SPR#1428 - SH - New Editor changes */ | |
544 T_ED_ATTR *editor_attr_input; | |
545 #else /* NEW_EDITOR */ | |
546 MfwEdtAttr* edt_attr_input; | |
547 #endif /* NEW_EDITOR */ | |
548 int left_soft_key; | |
549 int right_soft_key; | |
550 short abc; /* numeric or alpha? */ | |
551 #ifdef NEW_EDITOR /* SPR#1428 - SH - New Editor changes */ | |
552 T_AUI_EDIT_CB callback; | |
553 #else /* NEW_EDITOR */ | |
554 void (* callback)(T_MFW_HND win,USHORT reason); | |
555 #endif /* NEW_EDITOR */ | |
556 } T_input_properties; | |
557 | |
558 | |
559 | |
560 | |
561 typedef struct | |
562 { | |
563 T_MMI_CONTROL mmi_control; | |
564 T_MFW_HND parent_win; | |
565 T_MFW_HND win; | |
566 T_MFW_HND kbd; | |
567 T_MFW_HND kbd_long; | |
568 #ifdef NEW_EDITOR /* SPR#1428 - SH - New Editor changes */ | |
569 T_MFW_HND edit_win; | |
570 #else /* NEW_EDITOR */ | |
571 T_MFW_HND edt_input; | |
572 #endif /* NEW_EDITOR */ | |
573 T_input_properties properties; | |
574 } T_services_input; | |
575 | |
576 /* SPR#1428 - SH - New Editor changes - no longer required*/ | |
577 #ifndef NEW_EDITOR | |
578 void services_number_input_cb(T_MFW_HND win, UBYTE identifier, USHORT reason); | |
579 #endif | |
580 | |
581 | |
582 | |
583 static T_MFW_HND services_input_create (MfwHnd parent); | |
584 static void services_input_destroy (MfwHnd window); | |
585 static MfwHnd services_input_start(MfwHnd parent,T_input_properties *properties); | |
586 void services_input (T_MFW_HND win, USHORT event, SHORT value, void * parameter); | |
587 static int services_input_win_cb(MfwEvt e, MfwWin *w); | |
588 | |
589 /* SPR#1428 - SH - New Editor changes - no longer required*/ | |
590 #ifndef NEW_EDITOR | |
591 static int services_input_kbd_cb(MfwEvt e, MfwKbd *k); | |
592 static int services_input_kbd_long_cb(MfwEvt e, MfwKbd *k); | |
593 #endif | |
594 | |
595 | |
596 | |
597 /* editor */ | |
598 //GW Moved editor definitions to MmiResources.h | |
599 #define SAT_EDITOR_COLOR 0 | |
600 #define SAT_EDITOR_FONT 0 | |
601 #define SAT_EDITOR_CONTROLS 0 | |
602 #define SAT_EDITOR_BUFFER_SIZE 32 | |
603 /* */ | |
604 | |
605 // May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg | |
606 #ifdef FF_MMI_ATC_MIGRATION | |
607 #define IMEI_LEN 17 /*a0393213 warnings removal - changed 15 to 17*/ | |
608 #endif | |
609 | |
610 #ifdef FF_CPHS_REL4 | |
611 extern UBYTE msp_reg_profid; | |
612 extern BOOL msp_register; | |
613 #endif | |
614 | |
615 | |
616 /******************************************************************************* | |
617 | |
618 $Function: servicesInit | |
619 | |
620 $Description: | |
621 | |
622 $Returns: | |
623 | |
624 $Arguments: | |
625 | |
626 *******************************************************************************/ | |
627 | |
628 | |
629 | |
630 T_MFW_HND servicesInit (T_MFW_HND parent) | |
631 { | |
632 | |
633 TRACE_FUNCTION("servicesInit function"); | |
634 | |
635 /* | |
636 * Initialise MFW | |
637 */ | |
638 ss_mfw_init(); | |
639 /* | |
640 * Create any other handler | |
641 */ | |
642 //16432 | |
643 //Changed ss_create(0,0xFFFF,....) | |
644 ss_data.ss_handle = ss_create (0, | |
645 0xFFFF, | |
646 (T_MFW_CB)services_ss_cb); | |
647 | |
648 ss_data.win = 0; | |
649 return (services_create (0)); | |
650 | |
651 | |
652 } | |
653 | |
654 | |
655 /******************************************************************************* | |
656 | |
657 $Function: servicesExit | |
658 | |
659 $Description: exit services handling | |
660 | |
661 $Returns: | |
662 | |
663 $Arguments: | |
664 | |
665 *******************************************************************************/ | |
666 | |
667 | |
668 | |
669 void servicesExit (void) | |
670 { | |
671 TRACE_FUNCTION("servicesExit"); | |
672 | |
673 ss_delete(ss_data.win); | |
674 ss_exit(); | |
675 } | |
676 | |
677 | |
678 /******************************************************************************* | |
679 | |
680 $Function: services_create | |
681 | |
682 $Description: Creation of an instance for the Services dialog. | |
683 | |
684 $Returns: | |
685 | |
686 $Arguments: | |
687 | |
688 *******************************************************************************/ | |
689 | |
690 | |
691 T_MFW_HND services_create (T_MFW_HND parent_window) | |
692 { | |
693 T_ss * data = &ss_data; | |
694 T_MFW_WIN * win; | |
695 | |
696 TRACE_FUNCTION("services_create"); | |
697 | |
698 data->win = win_create (parent_window, 0, E_WIN_VISIBLE, (T_MFW_CB)services_win_cb); | |
699 | |
700 if (data->win EQ 0) | |
701 return 0; | |
702 | |
703 /* | |
704 * Create window handler | |
705 */ | |
706 data->mmi_control.dialog = (T_DIALOG_FUNC)services; | |
707 data->mmi_control.data = data; | |
708 win = ((T_MFW_HDR *)data->win)->data; | |
709 win->user = (void *) data; | |
710 | |
711 /* | |
712 * Create any other handler | |
713 */ | |
714 data->info_win = 0; | |
715 data->info_wait = 0; | |
716 data->cb_menu_win = 0; | |
717 | |
718 /* SPR#1428 - SH - New Editor changes - this editor never used */ | |
719 #if 0 | |
720 data->ussd_num_win = 0; | |
721 data->ussd_name_win = 0; | |
722 #endif | |
723 | |
724 data->input_number_win = 0; | |
725 memset(data->edt_buf_name,'\0',sizeof(data->edt_buf_name)); | |
726 memset(data->edt_buf_number,'\0',sizeof(data->edt_buf_number)); | |
727 memset(data->edt_buf_cb_password,'\0',sizeof(data->edt_buf_cb_password)); /* x0039928 - Lint warning fix */ | |
728 /* SPR#1428 - SH - New Editor changes - no longer required*/ | |
729 #ifndef NEW_EDITOR | |
730 bookSetEditAttributes(SERVICE_CREATE_EDITOR,COLOUR_EDITOR_XX,0,edtCurBar1,0,(char*)data->edt_buf_name,PHB_MAX_LEN,&data->edt_attr_name); | |
731 bookSetEditAttributes(SERVICE_CREATE_EDITOR,COLOUR_EDITOR_XX,0,edtCurBar1,0,(char*)data->edt_buf_number,PHB_MAX_LEN,&data->edt_attr_number); | |
732 #endif /* ifndef NEW_EDITOR */ | |
733 | |
734 /* NDH : 28/08/2003 : Intialise cfu_services to "ALL Inactive" */ | |
735 data->cfu_services = 0; | |
736 | |
737 winShow (data->win); | |
738 | |
739 /* | |
740 * return window handle | |
741 */ | |
742 return data->win; | |
743 } | |
744 | |
745 | |
746 /******************************************************************************* | |
747 | |
748 $Function: services_destroy | |
749 | |
750 $Description: | |
751 | |
752 $Returns: | |
753 | |
754 $Arguments: | |
755 | |
756 *******************************************************************************/ | |
757 | |
758 | |
759 void services_destroy (T_MFW_HND own_window) | |
760 { | |
761 // T_MFW_WIN * win; // RAVI | |
762 T_ss * data = &ss_data; | |
763 | |
764 TRACE_FUNCTION("=== services_destroy"); | |
765 | |
766 if (data) | |
767 { | |
768 /* | |
769 * Delete WIN Handler | |
770 */ | |
771 | |
772 if (data->info_win) | |
773 { | |
774 SEND_EVENT(data->info_win, DIALOG_DESTROY, 0, 0); | |
775 data->info_win=0; | |
776 } | |
777 if (ss_data.info_wait) | |
778 { | |
779 TRACE_FUNCTION("destroying the wait screen b"); | |
780 SEND_EVENT(ss_data.info_wait, DIALOG_DESTROY, 0, 0); | |
781 ss_data.info_wait = 0; | |
782 } | |
783 | |
784 | |
785 if (data->input_number_win) | |
786 { | |
787 TRACE_FUNCTION("killing input number win"); | |
788 services_input_destroy( data->input_number_win ); | |
789 data->input_number_win=0; | |
790 } | |
791 } | |
792 } | |
793 | |
794 /******************************************************************************* | |
795 | |
796 $Function: services_win_cb | |
797 | |
798 $Description: | |
799 | |
800 $Returns: | |
801 | |
802 $Arguments: | |
803 | |
804 *******************************************************************************/ | |
805 | |
806 static int services_win_cb(T_MFW_EVENT e, T_MFW_SS_PARA * para) | |
807 { | |
808 /* | |
809 * Top Window has no output | |
810 */ | |
811 TRACE_FUNCTION ("services_win_cb()"); | |
812 switch (e) | |
813 { | |
814 case MfwWinVisible: | |
815 break; | |
816 default: | |
817 return 0; | |
818 } | |
819 return 1; | |
820 | |
821 } | |
822 | |
823 /******************************************************************************* | |
824 | |
825 $Function: destroyInfoWindow | |
826 | |
827 $Description: | |
828 | |
829 $Returns: | |
830 | |
831 $Arguments: | |
832 | |
833 *******************************************************************************/ | |
834 | |
835 static void destroyInfoWindow( void) | |
836 { | |
837 TRACE_FUNCTION("destroyInfoWindow"); | |
838 | |
839 /* kill info win if there */ | |
840 if (ss_data.info_wait) | |
841 { | |
842 TRACE_FUNCTION("destroying the wait screen a"); | |
843 SEND_EVENT(ss_data.info_wait, DIALOG_DESTROY, 0, 0); | |
844 ss_data.info_wait = 0; | |
845 } | |
846 if (ss_data.input_number_win) | |
847 { | |
848 TRACE_FUNCTION("destroying input window!!!"); | |
849 SEND_EVENT(ss_data.input_number_win, SERVICES_INPUT_DESTROY, 0, 0); | |
850 ss_data.input_number_win = 0; | |
851 } | |
852 | |
853 } | |
854 | |
855 /* | |
856 +--------------------------------------------------------------------+ | |
857 | PROJECT: MMI-Framework (8417) MODULE: MFW_DMY | | |
858 | STATE : code ROUTINE: ss_getAlphabetCb | | |
859 +--------------------------------------------------------------------+ | |
860 | |
861 PURPOSE : This function is used to extract the used alphabet out | |
862 of the data coding scheme. | |
863 */ | |
864 UBYTE ss_getAlphabetCb ( UBYTE dcs ) | |
865 { | |
866 UBYTE alphabet = 0; /* means 7 bit default alphabet */ | |
867 | |
868 switch (dcs & 0xF0) | |
869 { | |
870 case( 0x10 ): | |
871 if (dcs EQ 0x11) | |
872 alphabet = 2; | |
873 break; | |
874 | |
875 case( 0x70 ): | |
876 case( 0x60 ): | |
877 case( 0x50 ): | |
878 case( 0x40 ): | |
879 alphabet = (dcs & 0x0C) >> 2; | |
880 /* According to 03.38, "Any reserved codings shall be assumed | |
881 * to be the GSM 7 bit default alphabet by a receiving entity". | |
882 */ | |
883 if (alphabet EQ 3) | |
884 alphabet = 0; | |
885 break; | |
886 | |
887 case( 0xF0 ): | |
888 alphabet = (dcs & 0x04) >> 2; | |
889 break; | |
890 } | |
891 | |
892 return alphabet; | |
893 } | |
894 /******************************************************************************* | |
895 | |
896 $Function: services_ss_cb | |
897 | |
898 $Description: | |
899 | |
900 $Returns: | |
901 | |
902 $Arguments: | |
903 | |
904 *******************************************************************************/ | |
905 | |
906 | |
907 static int services_ss_cb(T_MFW_EVENT e, T_MFW_HND para) | |
908 { | |
909 | |
910 TRACE_FUNCTION ("services_ss_cb()"); | |
911 | |
912 { | |
913 // T_MFW_WIN * win; // RAVI | |
914 // win = (T_MFW_WIN *) ((T_MFW_HDR *)ss_data.win)->data; // RAVI | |
915 } | |
916 | |
917 switch (e) | |
918 { | |
919 case E_SS_RES: | |
920 if (!ss_data.info_wait) | |
921 { | |
922 TRACE_FUNCTION ("show the wait screen"); | |
923 #ifdef FF_CPHS_REL4 | |
924 if(interrogate != 1) | |
925 { | |
926 #endif | |
927 showWait( ss_data.win ); | |
928 #ifdef FF_CPHS_REL4 | |
929 } | |
930 #endif | |
931 } | |
932 /* | |
933 * ignore the event | |
934 */ | |
935 break; | |
936 | |
937 case E_SS_NOTIFY: | |
938 if(!ss_data.info_win) | |
939 SEND_EVENT(ss_data.win,E_SS_NOTIFY,0, para); | |
940 | |
941 destroyInfoWindow(); | |
942 break; | |
943 | |
944 case E_SS_CF_CNF: | |
945 | |
946 if(!ss_data.info_win) | |
947 SEND_EVENT(ss_data.win,E_SS_CF_CNF,0, para); | |
948 | |
949 destroyInfoWindow(); | |
950 break; | |
951 | |
952 case E_SS_CF_ICN_UPD: | |
953 | |
954 if(!ss_data.info_win) | |
955 SEND_EVENT(ss_data.win,E_SS_CF_ICN_UPD,0, para); | |
956 | |
957 destroyInfoWindow(); | |
958 break; | |
959 | |
960 case E_SS_CW_CNF: | |
961 if(!ss_data.info_win) | |
962 SEND_EVENT(ss_data.win,E_SS_CW_CNF,0, para); | |
963 | |
964 destroyInfoWindow(); | |
965 break; | |
966 | |
967 case E_SS_CLI_CNF: | |
968 if(!ss_data.info_win) | |
969 SEND_EVENT(ss_data.win,E_SS_CLI_CNF,0, para); | |
970 | |
971 destroyInfoWindow(); | |
972 break; | |
973 | |
974 case E_SS_CB_CNF: | |
975 if(!ss_data.info_win) | |
976 SEND_EVENT(ss_data.win,E_SS_CB_CNF,0, para); | |
977 | |
978 destroyInfoWindow(); | |
979 break; | |
980 | |
981 /* we must display the ussd info and then edit and send a user ussd */ | |
982 case E_SS_USSD_REQ: | |
983 if(!ss_data.info_win) | |
984 SEND_EVENT(ss_data.win,E_SS_USSD_REQ,0, para); | |
985 | |
986 destroyInfoWindow(); | |
987 break; | |
988 | |
989 /* just display the ussd info */ | |
990 case E_SS_USSD_CNF: | |
991 if(!ss_data.info_win) | |
992 SEND_EVENT(ss_data.win,E_SS_USSD_CNF,0, para); | |
993 | |
994 destroyInfoWindow(); | |
995 break; | |
996 | |
997 case E_SS_IMEI: | |
998 | |
999 if(!ss_data.info_win) | |
1000 SEND_EVENT(ss_data.win,E_SS_IMEI,0, para); | |
1001 | |
1002 destroyInfoWindow(); | |
1003 break; | |
1004 | |
1005 | |
1006 case E_SS_GET_PW: | |
1007 | |
1008 if(!ss_data.info_win) | |
1009 SEND_EVENT(ss_data.win,E_SS_GET_PW,0, para); | |
1010 | |
1011 destroyInfoWindow(); | |
1012 break; | |
1013 //CQ-16432 - start | |
1014 case E_SS_SAT_CPWD: | |
1015 TRACE_EVENT("Received event E_SS_SAT_CPWD in BMI"); | |
1016 if(!ss_data.info_win) | |
1017 SEND_EVENT(ss_data.win,E_SS_SAT_CPWD,0, para); | |
1018 destroyInfoWindow(); | |
1019 break; | |
1020 //CQ-16432 - end | |
1021 default: | |
1022 break; | |
1023 } | |
1024 | |
1025 return 1; /* consumed */ | |
1026 } | |
1027 | |
1028 | |
1029 /******************************************************************************* | |
1030 | |
1031 $Function: services | |
1032 | |
1033 $Description: | |
1034 | |
1035 $Returns: | |
1036 | |
1037 $Arguments: | |
1038 | |
1039 *******************************************************************************/ | |
1040 | |
1041 void services (T_MFW_HND win, USHORT event, SHORT value, void * parameter) | |
1042 { | |
1043 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; | |
1044 T_ss * data = (T_ss *)win_data->user; | |
1045 | |
1046 T_MFW_SS_PARA * ss_cnf = (T_MFW_SS_PARA *)parameter; | |
1047 | |
1048 // unsigned int i = 0; // RAVI | |
1049 | |
1050 // char line[MAX_LINE]; // RAVI | |
1051 | |
1052 TRACE_FUNCTION ("services()"); | |
1053 | |
1054 switch (event) | |
1055 { | |
1056 | |
1057 | |
1058 case ServicesError: | |
1059 TRACE_FUNCTION ("ServicesError"); | |
1060 showError(win, ss_cnf->cb_cnf.ss_error); | |
1061 break; | |
1062 | |
1063 case ServicesFailed: | |
1064 TRACE_FUNCTION ("ServicesFailed"); | |
1065 showFailed(win); | |
1066 break; | |
1067 | |
1068 case ServicesOtherNumber: | |
1069 TRACE_FUNCTION("ServicesOtherNumber"); | |
1070 ServicesGetOtherNumber(win); | |
1071 break; | |
1072 | |
1073 case ServicesOk: | |
1074 TRACE_FUNCTION ("ServicesOk"); | |
1075 showOk(win); | |
1076 break; | |
1077 | |
1078 case ServicesUSSDEnter: | |
1079 { | |
1080 #ifdef NEW_EDITOR | |
1081 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ | |
1082 #else | |
1083 T_EDITOR_DATA editor_data; | |
1084 #endif /* NEW_EDITOR */ | |
1085 | |
1086 TRACE_FUNCTION("ServicesUSSDEnter"); | |
1087 | |
1088 memset(ss_data.edt_buf_number,'\0',PHB_MAX_LEN); | |
1089 | |
1090 /* SPR#1428 - SH - New Editor changes */ | |
1091 #ifdef NEW_EDITOR /* NEW_EDITOR */ | |
1092 AUI_edit_SetDefault(&editor_data); | |
1093 AUI_edit_SetDisplay(&editor_data, ZONE_FULL_SK_TITLE, COLOUR_EDITOR_XX, EDITOR_FONT); | |
1094 AUI_edit_SetMode(&editor_data, 0, ED_CURSOR_UNDERLINE); | |
1095 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)ss_data.edt_buf_number, MAX_USSD_LEN); | |
1096 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtSoftBack, TxtEntAnw, NULL); | |
1097 AUI_edit_SetAltTextStr(&editor_data, 1, TxtNull, FALSE, TxtNull); | |
1098 AUI_edit_SetEvents(&editor_data, ServicesUSSDEnter, TRUE, FOREVER, (T_AUI_EDIT_CB)services_info_cb); | |
1099 | |
1100 AUI_edit_Start(ss_data.win, &editor_data); /* start the editor */ | |
1101 #else /* NEW_EDITOR */ | |
1102 editor_data.editor_attr.win.px = 6; | |
1103 editor_data.editor_attr.win.py = 12; | |
1104 editor_data.editor_attr.win.sx = 80; | |
1105 editor_data.editor_attr.win.sy = 20; | |
1106 editor_data.editor_attr.edtCol = COLOUR_EDITOR_XX, | |
1107 editor_data.editor_attr.font = 0; | |
1108 editor_data.editor_attr.mode = edtCurBar1; | |
1109 editor_data.editor_attr.controls = 0; | |
1110 editor_data.hide = FALSE; | |
1111 | |
1112 editor_data.editor_attr.text = (char*)ss_data.edt_buf_number; | |
1113 | |
1114 editor_data.editor_attr.size = sizeof(ss_data.edt_buf_number); | |
1115 editor_data.LeftSoftKey = TxtSoftOK; | |
1116 editor_data.RightSoftKey = TxtSoftBack; | |
1117 editor_data.AlternateLeftSoftKey = TxtNull; | |
1118 editor_data.TextString = '\0'; | |
1119 editor_data.TextId = TxtEntAnw; | |
1120 editor_data.Identifier = ServicesUSSDEnter; | |
1121 editor_data.mode = DIGITS_MODE; | |
1122 editor_data.timeout = FOREVER; | |
1123 editor_data.min_enter = 1; | |
1124 editor_data.Callback = (T_EDIT_CB)services_info_cb; | |
1125 editor_data.destroyEditor = TRUE; | |
1126 | |
1127 | |
1128 /* create the dialog handler */ | |
1129 editor_start(ss_data.win, &editor_data); /* start the editor */ | |
1130 #endif /* NEW_EDITOR */ | |
1131 } | |
1132 break; | |
1133 | |
1134 case SERVICES_DO_CALL_VOICE_DIVERT: | |
1135 servicesStoreVoiceMailNumber(); | |
1136 servicesSendCallDivert(0); | |
1137 break; | |
1138 case ServicesDoCallDivert: | |
1139 servicesSendCallDivert(0); | |
1140 break; | |
1141 | |
1142 case E_SS_RES: | |
1143 /* | |
1144 * event is ignored | |
1145 */ | |
1146 break; | |
1147 case E_SS_NOTIFY: | |
1148 TRACE_EVENT(" E_SS_NOTIFY"); | |
1149 showSSNotify( win, (T_MFW_SS_NOTIFY*) parameter ); /* all short ss-related notfications */ | |
1150 break; | |
1151 | |
1152 case E_SS_CF_ICN_UPD: | |
1153 TRACE_FUNCTION("E_SS_CF_ICN_UPD"); | |
1154 | |
1155 if ((ss_cnf->cf_cnf.ss_code == SS_CF_CFU) || | |
1156 (ss_cnf->cf_cnf.ss_code == SS_CF_ALL)) | |
1157 { | |
1158 /* | |
1159 * Update icons for idle screen if CFU and telephony | |
1160 */ | |
1161 switch (srv_check_CF_telephony_status ( &ss_cnf->cf_cnf )) | |
1162 { | |
1163 case CF_ACTIVE_STATUS: | |
1164 iconsSetState(iconIdCallFor); | |
1165 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) | |
1166 // Setting the Current state of CF in Flash | |
1167 FFS_flashData.CFState=TRUE; | |
1168 break; | |
1169 | |
1170 case CF_INACTIVE_STATUS: | |
1171 iconsDeleteState(iconIdCallFor); | |
1172 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) | |
1173 // Setting the Current state of CF in Flash | |
1174 FFS_flashData.CFState=FALSE; | |
1175 break; | |
1176 } | |
1177 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) | |
1178 // Writng the Current state of CF into ffs | |
1179 flash_write(); | |
1180 idleEvent(IdleUpdate); | |
1181 } | |
1182 break; | |
1183 /* | |
1184 * modified handling for results taking lists in account | |
1185 */ | |
1186 case E_SS_CF_CNF: | |
1187 /* | |
1188 * check whether we received data what was requested / consistent | |
1189 */ | |
1190 | |
1191 switch(ss_cnf->cf_cnf.ss_code) | |
1192 { | |
1193 case SS_CODES_UNKNOWN: | |
1194 /* Marcus: Issue 1652: 03/02/2003: Start */ | |
1195 TRACE_EVENT("SS_CODES_UNKNOWN"); | |
1196 { | |
1197 T_DISPLAY_DATA display_info; | |
1198 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull, TxtNull, TxtExecuted, COLOUR_STATUS); | |
1199 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, FOREVER, KEY_CLEAR | KEY_LEFT ); | |
1200 display_info.Identifier = E_SS_CF_CNF; // can be used also for CF and CW | |
1201 | |
1202 /* | |
1203 * Call Info Screen | |
1204 */ | |
1205 | |
1206 ss_data.info_win = info_dialog (ss_data.win, &display_info); | |
1207 } | |
1208 /* Marcus: Issue 1652: 03/02/2003: End */ | |
1209 break; | |
1210 case SS_CF_CFU: | |
1211 case SS_CF_ALL: | |
1212 | |
1213 /* | |
1214 * Update icons for idle screen if CFU and telephony | |
1215 */ | |
1216 | |
1217 /* 30th May,2006 OMAPS00079650 a0393213 (R.Prabakar) | |
1218 Description : CPHS Call Forwarding feature implementation | |
1219 Solution : As part of the implemention, cphs_set_divert_status() is called whenever the divert status | |
1220 is changed*/ | |
1221 | |
1222 TRACE_EVENT("services():E_SS_CF_CNF SS_CF_CFU"); | |
1223 switch (srv_check_CF_telephony_status ( &ss_cnf->cf_cnf )) | |
1224 { | |
1225 case CF_ACTIVE_STATUS: | |
1226 #ifdef FF_CPHS | |
1227 switch (CFService) | |
1228 { | |
1229 case (CFVoice): | |
1230 /*MC SPR 742, handle line 2, auxiliary telephony*/ | |
1231 #ifdef FF_CPHS_REL4 | |
1232 if(isCFISFilePresent() ) | |
1233 { /*call_forwarding_status_rel4.voice updated*/ | |
1234 if(call_forwarding_status_rel4.voice != MFW_CFLAG_SET || | |
1235 memcmp(call_forwarding_status_rel4.voice_dialling_number,ss_data.edt_buf_number,PHB_MAX_LEN)!=0) | |
1236 { | |
1237 call_forwarding_status_rel4.voice=MFW_CFLAG_SET; | |
1238 memcpy(call_forwarding_status_rel4.voice_dialling_number,ss_data.edt_buf_number,PHB_MAX_LEN); | |
1239 cphs_rel4_set_divert_status( call_forwarding_status_rel4.voice, | |
1240 call_forwarding_status_rel4.fax, | |
1241 call_forwarding_status_rel4.data, | |
1242 call_forwarding_status_rel4.voice_dialling_number); | |
1243 } | |
1244 break; | |
1245 } | |
1246 | |
1247 #endif | |
1248 | |
1249 case CFAuxVoice: | |
1250 | |
1251 if (GetAlsLine() == MFW_SERV_LINE2) | |
1252 { | |
1253 TRACE_EVENT("services():call forward activation successful for line2"); | |
1254 /*30th May,2006 OMAPS00079650 a0393213 (R.Prabakar) | |
1255 check to find whether we are doing unnecessary sim write*/ | |
1256 if(GetCphsDivertStatus(MFW_SERV_LINE2)!=MFW_CFLAG_SET) | |
1257 cphs_set_divert_status(MFW_CFLAG_NotPresent, MFW_CFLAG_SET, MFW_CFLAG_NotPresent, MFW_CFLAG_NotPresent); | |
1258 } | |
1259 | |
1260 else | |
1261 { | |
1262 TRACE_EVENT("services():call forward activation successful for line1"); | |
1263 if(GetCphsDivertStatus(MFW_SERV_LINE1)!=MFW_CFLAG_SET) | |
1264 cphs_set_divert_status(MFW_CFLAG_SET, MFW_CFLAG_NotPresent, MFW_CFLAG_NotPresent, MFW_CFLAG_NotPresent); | |
1265 } | |
1266 break; | |
1267 case (CFData): | |
1268 /*a0393213 cphs rel4*/ | |
1269 #ifdef FF_CPHS_REL4 | |
1270 if(!isCFISFilePresent()) | |
1271 { | |
1272 #endif | |
1273 if(GetCphsDivertStatus(MFW_SERV_DATA)!=MFW_CFLAG_SET) | |
1274 cphs_set_divert_status(MFW_CFLAG_NotPresent,MFW_CFLAG_NotPresent,MFW_CFLAG_NotPresent,MFW_CFLAG_SET); | |
1275 #ifdef FF_CPHS_REL4 | |
1276 } | |
1277 else | |
1278 { | |
1279 if(call_forwarding_status_rel4.data!= MFW_CFLAG_SET) | |
1280 { | |
1281 call_forwarding_status_rel4.data=MFW_CFLAG_SET; | |
1282 cphs_rel4_set_divert_status( call_forwarding_status_rel4.voice, | |
1283 call_forwarding_status_rel4.fax, | |
1284 call_forwarding_status_rel4.data, | |
1285 call_forwarding_status_rel4.voice_dialling_number); | |
1286 } | |
1287 } | |
1288 #endif | |
1289 break; | |
1290 case (CFFax): | |
1291 /*a0393213 cphs rel4*/ | |
1292 #ifdef FF_CPHS_REL4 | |
1293 if(!isCFISFilePresent() ) | |
1294 { | |
1295 #endif | |
1296 if(GetCphsDivertStatus(MFW_SERV_FAX)!=MFW_CFLAG_SET) | |
1297 cphs_set_divert_status(MFW_CFLAG_NotPresent,MFW_CFLAG_NotPresent,MFW_CFLAG_SET,MFW_CFLAG_NotPresent); | |
1298 #ifdef FF_CPHS_REL4 | |
1299 } | |
1300 else | |
1301 { | |
1302 if(call_forwarding_status_rel4.fax!= MFW_CFLAG_SET) | |
1303 { | |
1304 call_forwarding_status_rel4.fax=MFW_CFLAG_SET; | |
1305 cphs_rel4_set_divert_status( call_forwarding_status_rel4.voice, | |
1306 call_forwarding_status_rel4.fax, | |
1307 call_forwarding_status_rel4.data, | |
1308 call_forwarding_status_rel4.voice_dialling_number); | |
1309 } | |
1310 } | |
1311 #endif | |
1312 | |
1313 break; | |
1314 case (CFAll): | |
1315 /*a0393213 cphs rel4*/ | |
1316 #ifdef FF_CPHS_REL4 | |
1317 if(!isCFISFilePresent() ) | |
1318 { | |
1319 #endif | |
1320 if (GetAlsLine() == MFW_SERV_LINE2) | |
1321 { | |
1322 TRACE_EVENT("services():call forward activation successful for all"); | |
1323 if(GetCphsDivertStatus(MFW_SERV_LINE2)!=MFW_CFLAG_SET || | |
1324 GetCphsDivertStatus(MFW_SERV_DATA)!=MFW_CFLAG_SET || | |
1325 GetCphsDivertStatus(MFW_SERV_FAX)!=MFW_CFLAG_SET) | |
1326 cphs_set_divert_status(MFW_CFLAG_NotPresent,MFW_CFLAG_SET,MFW_CFLAG_SET,MFW_CFLAG_SET); | |
1327 } | |
1328 else | |
1329 { | |
1330 TRACE_EVENT("services():call forward activation successful for all"); | |
1331 if(GetCphsDivertStatus(MFW_SERV_LINE1)!=MFW_CFLAG_SET || | |
1332 GetCphsDivertStatus(MFW_SERV_DATA)!=MFW_CFLAG_SET || | |
1333 GetCphsDivertStatus(MFW_SERV_FAX)!=MFW_CFLAG_SET) | |
1334 cphs_set_divert_status(MFW_CFLAG_SET,MFW_CFLAG_NotPresent,MFW_CFLAG_SET,MFW_CFLAG_SET); | |
1335 } | |
1336 #ifdef FF_CPHS_REL4 | |
1337 } | |
1338 else | |
1339 { | |
1340 if(call_forwarding_status_rel4.voice!= MFW_CFLAG_SET || | |
1341 call_forwarding_status_rel4.fax!= MFW_CFLAG_SET || | |
1342 call_forwarding_status_rel4.data!= MFW_CFLAG_SET || | |
1343 memcmp(call_forwarding_status_rel4.voice_dialling_number,ss_data.edt_buf_number,PHB_MAX_LEN)!=0 ) | |
1344 { | |
1345 call_forwarding_status_rel4.voice= MFW_CFLAG_SET; | |
1346 call_forwarding_status_rel4.fax= MFW_CFLAG_SET; | |
1347 call_forwarding_status_rel4.data= MFW_CFLAG_SET; | |
1348 memcpy(call_forwarding_status_rel4.voice_dialling_number,ss_data.edt_buf_number,PHB_MAX_LEN); | |
1349 | |
1350 cphs_rel4_set_divert_status( call_forwarding_status_rel4.voice, | |
1351 call_forwarding_status_rel4.fax, | |
1352 call_forwarding_status_rel4.data, | |
1353 call_forwarding_status_rel4.voice_dialling_number); | |
1354 } | |
1355 } | |
1356 #endif | |
1357 break; | |
1358 } | |
1359 #else | |
1360 iconsSetState(iconIdCallFor); | |
1361 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) | |
1362 // Setting the Current state of CF in Flash | |
1363 FFS_flashData.CFState=TRUE; | |
1364 flash_write(); | |
1365 #endif | |
1366 break; | |
1367 | |
1368 case CF_INACTIVE_STATUS: | |
1369 #ifdef FF_CPHS | |
1370 switch (CFService) | |
1371 { | |
1372 case (CFVoice): | |
1373 /*a0393213 cphs rel4*/ | |
1374 #ifdef FF_CPHS_REL4 | |
1375 if(isCFISFilePresent() ) | |
1376 { /*call_forwarding_status_rel4.voice updated*/ | |
1377 if(call_forwarding_status_rel4.voice != MFW_CFLAG_NOTSet) | |
1378 { | |
1379 call_forwarding_status_rel4.voice=MFW_CFLAG_NOTSet; | |
1380 cphs_rel4_set_divert_status( call_forwarding_status_rel4.voice, | |
1381 call_forwarding_status_rel4.fax, | |
1382 call_forwarding_status_rel4.data, | |
1383 call_forwarding_status_rel4.voice_dialling_number); | |
1384 } | |
1385 break; | |
1386 } | |
1387 | |
1388 #endif | |
1389 /*MC SPR 742, handle line 2, auxiliary telephony*/ | |
1390 case CFAuxVoice: | |
1391 | |
1392 if (GetAlsLine() == MFW_SERV_LINE2) | |
1393 { | |
1394 TRACE_EVENT("services():call forward deactivation successful for line2"); | |
1395 /*30th May,2006 OMAPS00079650 a0393213 (R.Prabakar) | |
1396 check to find whether we are doing unnecessary sim write*/ | |
1397 if(GetCphsDivertStatus(MFW_SERV_LINE2)!=MFW_CFLAG_NOTSet) | |
1398 cphs_set_divert_status(MFW_CFLAG_NotPresent, MFW_CFLAG_NOTSet, MFW_CFLAG_NotPresent, MFW_CFLAG_NotPresent); | |
1399 } | |
1400 | |
1401 else | |
1402 { | |
1403 TRACE_EVENT("services():call forward deactivation successful for line1"); | |
1404 if(GetCphsDivertStatus(MFW_SERV_LINE1)!=MFW_CFLAG_NOTSet) | |
1405 cphs_set_divert_status(MFW_CFLAG_NOTSet, MFW_CFLAG_NotPresent, MFW_CFLAG_NotPresent, MFW_CFLAG_NotPresent); | |
1406 } | |
1407 break; | |
1408 case (CFData): | |
1409 /*a0393213 cphs rel4*/ | |
1410 #ifdef FF_CPHS_REL4 | |
1411 if(!isCFISFilePresent() ) | |
1412 { | |
1413 #endif | |
1414 if(GetCphsDivertStatus(MFW_SERV_DATA)!=MFW_CFLAG_NOTSet) | |
1415 cphs_set_divert_status(MFW_CFLAG_NotPresent,MFW_CFLAG_NotPresent,MFW_CFLAG_NotPresent,MFW_CFLAG_NOTSet); | |
1416 #ifdef FF_CPHS_REL4 | |
1417 } | |
1418 else | |
1419 { | |
1420 if(call_forwarding_status_rel4.data!= MFW_CFLAG_NOTSet) | |
1421 { | |
1422 call_forwarding_status_rel4.data=MFW_CFLAG_NOTSet; | |
1423 cphs_rel4_set_divert_status( call_forwarding_status_rel4.voice, | |
1424 call_forwarding_status_rel4.fax, | |
1425 call_forwarding_status_rel4.data, | |
1426 call_forwarding_status_rel4.voice_dialling_number); | |
1427 } | |
1428 } | |
1429 #endif | |
1430 break; | |
1431 case (CFFax): | |
1432 #ifdef FF_CPHS_REL4 | |
1433 if(!isCFISFilePresent() ) | |
1434 { | |
1435 #endif | |
1436 if(GetCphsDivertStatus(MFW_SERV_FAX)!=MFW_CFLAG_NOTSet) | |
1437 cphs_set_divert_status(MFW_CFLAG_NotPresent,MFW_CFLAG_NotPresent,MFW_CFLAG_NOTSet,MFW_CFLAG_NotPresent); | |
1438 #ifdef FF_CPHS_REL4 | |
1439 } | |
1440 else | |
1441 { | |
1442 if(call_forwarding_status_rel4.fax!= MFW_CFLAG_NOTSet) | |
1443 { | |
1444 call_forwarding_status_rel4.fax=MFW_CFLAG_NOTSet; | |
1445 cphs_rel4_set_divert_status( call_forwarding_status_rel4.voice, | |
1446 call_forwarding_status_rel4.fax, | |
1447 call_forwarding_status_rel4.data, | |
1448 call_forwarding_status_rel4.voice_dialling_number); | |
1449 } | |
1450 } | |
1451 #endif | |
1452 break; | |
1453 case (CFAll): | |
1454 /*a0393213 cphs rel4*/ | |
1455 #ifdef FF_CPHS_REL4 | |
1456 if(!isCFISFilePresent() ) | |
1457 { | |
1458 #endif | |
1459 if (GetAlsLine() == MFW_SERV_LINE2) | |
1460 { | |
1461 TRACE_EVENT("services():call forward deactivation successful for all"); | |
1462 if(GetCphsDivertStatus(MFW_SERV_LINE2)!=MFW_CFLAG_NOTSet || | |
1463 GetCphsDivertStatus(MFW_SERV_DATA)!=MFW_CFLAG_NOTSet || | |
1464 GetCphsDivertStatus(MFW_SERV_FAX)!=MFW_CFLAG_NOTSet) | |
1465 cphs_set_divert_status(MFW_CFLAG_NotPresent, MFW_CFLAG_NOTSet, MFW_CFLAG_NOTSet, MFW_CFLAG_NOTSet); | |
1466 } | |
1467 else | |
1468 { | |
1469 TRACE_EVENT("services():call forward deactivation successful for all"); | |
1470 if(GetCphsDivertStatus(MFW_SERV_LINE1)!=MFW_CFLAG_NOTSet || | |
1471 GetCphsDivertStatus(MFW_SERV_DATA)!=MFW_CFLAG_NOTSet || | |
1472 GetCphsDivertStatus(MFW_SERV_FAX)!=MFW_CFLAG_NOTSet) | |
1473 cphs_set_divert_status(MFW_CFLAG_NOTSet, MFW_CFLAG_NotPresent, MFW_CFLAG_NOTSet, MFW_CFLAG_NOTSet); | |
1474 } | |
1475 #ifdef FF_CPHS_REL4 | |
1476 } | |
1477 else | |
1478 { | |
1479 if(call_forwarding_status_rel4.voice!= MFW_CFLAG_NOTSet || | |
1480 call_forwarding_status_rel4.fax!= MFW_CFLAG_NOTSet || | |
1481 call_forwarding_status_rel4.data!= MFW_CFLAG_NOTSet ) | |
1482 { | |
1483 call_forwarding_status_rel4.voice= MFW_CFLAG_NOTSet; | |
1484 call_forwarding_status_rel4.fax= MFW_CFLAG_NOTSet; | |
1485 call_forwarding_status_rel4.data= MFW_CFLAG_NOTSet; | |
1486 | |
1487 cphs_rel4_set_divert_status( call_forwarding_status_rel4.voice, | |
1488 call_forwarding_status_rel4.fax, | |
1489 call_forwarding_status_rel4.data, | |
1490 call_forwarding_status_rel4.voice_dialling_number); | |
1491 } | |
1492 } | |
1493 #endif | |
1494 break; | |
1495 } | |
1496 #else | |
1497 iconsDeleteState(iconIdCallFor); | |
1498 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) | |
1499 // Setting the Current state of CF in Flash | |
1500 FFS_flashData.CFState=FALSE; | |
1501 flash_write(); | |
1502 #endif | |
1503 break; | |
1504 } | |
1505 /* | |
1506 * no break | |
1507 */ | |
1508 case SS_CLIR: | |
1509 case SS_CF_ALL_COND: | |
1510 case SS_CF_CFNRy: | |
1511 case SS_CF_CFNR: | |
1512 case SS_CF_CFB: | |
1513 switch(ss_cnf->cf_cnf.ss_error) | |
1514 { | |
1515 case MFW_SS_NO_ERROR: | |
1516 /* | |
1517 * now store the MFW data under the SS window | |
1518 */ | |
1519 TRACE_EVENT("services():no ss error"); | |
1520 data->mfw_ss_cf = (T_ss_feature_cf *)ALLOC_MEMORY (sizeof (T_ss_feature_cf)); | |
1521 | |
1522 /* | |
1523 * copy all interesting feature entries | |
1524 */ | |
1525 data->max_feature = srv_copy_feature_list_cf (data->mfw_ss_cf, &ss_cnf->cf_cnf); | |
1526 data->current_feature = /*CFService*/0; | |
1527 | |
1528 | |
1529 if (data->max_feature EQ 0) | |
1530 { | |
1531 /* Marcus: Issue 1652: 03/02/2003: Start */ | |
1532 if (ss_cnf->cf_cnf.ss_feature_count) | |
1533 { | |
1534 T_MFW_FEATURE *temp = ss_cnf->cf_cnf.ss_feature_list; | |
1535 srv_empty_list_result (ss_cnf->cf_cnf.ss_category, event, temp->ss_status, ss_cnf->cf_cnf.ss_code); | |
1536 } | |
1537 else | |
1538 { | |
1539 srv_empty_list_result (ss_cnf->cf_cnf.ss_category, event, 0, ss_cnf->cf_cnf.ss_code); | |
1540 } | |
1541 /* Marcus: Issue 1651: 03/02/2003: End */ | |
1542 FREE_MEMORY ((void *)data->mfw_ss_cf, sizeof (T_ss_feature_cf)); | |
1543 data->mfw_ss_cf = NULL; | |
1544 } | |
1545 else | |
1546 { | |
1547 /* | |
1548 * now display status | |
1549 */ | |
1550 // Jun 10, 2004 REF: CRR MMI-SPR-13614 Rashmi C N(Sasken) | |
1551 // ss_Code-- This holds the current CF code for which the activation/deactivation or the staus is being checked | |
1552 // This would be used while displaying the status or activation/deactivation message | |
1553 ss_Code=ss_cnf->cf_cnf.ss_code; | |
1554 showCFStatus(win, data); | |
1555 } | |
1556 break; | |
1557 | |
1558 default: | |
1559 TRACE_EVENT_P1("services():ss error %d", ss_cnf->cf_cnf.ss_error); | |
1560 TRACE_FUNCTION("ERROR in CFU,INTERROGATION"); | |
1561 showError(win, ss_cnf->cf_cnf.ss_error); | |
1562 break; | |
1563 } | |
1564 break; | |
1565 | |
1566 default: | |
1567 break; | |
1568 } /* end switch(ss_cnf->cf_cnf.ss_code) */ | |
1569 break; | |
1570 | |
1571 | |
1572 case E_SS_CW_CNF: | |
1573 if (ss_cnf->cw_cnf.ss_error == MFW_SS_NO_ERROR) | |
1574 { | |
1575 /* | |
1576 * now store the MFW data under the SS window | |
1577 */ | |
1578 data->mfw_ss_cw = (T_ss_feature_cw *)ALLOC_MEMORY (sizeof (T_ss_feature_cw)); | |
1579 | |
1580 /* | |
1581 * copy all interesting feature entries | |
1582 */ | |
1583 data->max_feature = srv_copy_feature_list_cw (data->mfw_ss_cw, &ss_cnf->cw_cnf); | |
1584 data->current_feature = 0; | |
1585 | |
1586 if (data->max_feature EQ 0) | |
1587 { | |
1588 | |
1589 | |
1590 if (ss_cnf->cw_cnf.ss_status NEQ 0xFF AND ss_cnf->cw_cnf.ss_status NEQ 0x00) | |
1591 srv_display_status (ss_cnf->cw_cnf.ss_status); | |
1592 else | |
1593 srv_empty_list_result (ss_cnf->cw_cnf.ss_category, event, ss_cnf->cw_cnf.ss_status, ss_cnf->cf_cnf.ss_code); /* Marcus: Issue 1588: 23/01/2003 */ | |
1594 FREE_MEMORY ((void *)data->mfw_ss_cw, sizeof (T_ss_feature_cw)); | |
1595 data->mfw_ss_cw = NULL; | |
1596 } | |
1597 else | |
1598 { | |
1599 /* | |
1600 * now display status | |
1601 */ | |
1602 if (ss_cnf->cw_cnf.ss_status EQ SS_STAT_UNKNOWN) | |
1603 { | |
1604 //SPR18409 xvilliva, If we receive the status as 0xFF, | |
1605 //we show an alert saying "unknown status". | |
1606 info_screen(win, TxtUnknown, TxtStatus, NULL); | |
1607 } | |
1608 else | |
1609 { | |
1610 // Apr 10, 2006 REF: OMAPS00052691 x0039928 | |
1611 // Fix: Proper text id is assigned for display if network returns | |
1612 // status STAT_NONE for call waiting activation. | |
1613 if (ss_cnf->cw_cnf.ss_status EQ SS_STAT_NONE) | |
1614 { | |
1615 if ((ss_cnf->cw_cnf.ss_category EQ SS_REGISTRATION) OR | |
1616 (ss_cnf->cw_cnf.ss_category EQ SS_ACTIVATION)) | |
1617 data->mfw_ss_cw->status = TxtActivated; | |
1618 } | |
1619 showCWStatus(win, data); | |
1620 } | |
1621 } | |
1622 } | |
1623 else | |
1624 { | |
1625 showError(win, ss_cnf->cw_cnf.ss_error); | |
1626 } | |
1627 break; | |
1628 | |
1629 case E_SS_CLI_CNF: | |
1630 TRACE_FUNCTION(" E_SS_CLI_CNF"); | |
1631 | |
1632 if (ss_cnf->cli_cnf.ss_error == MFW_SS_NO_ERROR) | |
1633 { | |
1634 showCLIStatus(win, ss_cnf); | |
1635 } | |
1636 else | |
1637 { | |
1638 showError(win, ss_cnf->cli_cnf.ss_error); | |
1639 } | |
1640 break; | |
1641 | |
1642 | |
1643 case E_SS_CB_CNF: | |
1644 switch(ss_cnf->cb_cnf.ss_error) | |
1645 { | |
1646 case MFW_SS_NO_ERROR: | |
1647 /* | |
1648 * now store the MFW data under the SS window | |
1649 */ | |
1650 data->mfw_ss_cb = (T_ss_feature_cb *)ALLOC_MEMORY (sizeof (T_ss_feature_cb)); | |
1651 | |
1652 /* | |
1653 * copy all interesting feature entries | |
1654 */ | |
1655 data->max_feature = srv_copy_feature_list_cb (data->mfw_ss_cb, &ss_cnf->cb_cnf); | |
1656 data->current_feature = 0; | |
1657 | |
1658 if (data->max_feature EQ 0) | |
1659 { | |
1660 srv_empty_list_result (ss_cnf->cb_cnf.ss_category, event, 0, ss_cnf->cf_cnf.ss_code); /* Marcus: Issue 1588: 23/01/2003 */ | |
1661 FREE_MEMORY ((void *)data->mfw_ss_cb, sizeof (T_ss_feature_cb)); | |
1662 data->mfw_ss_cb = NULL; | |
1663 } | |
1664 else | |
1665 { | |
1666 /* | |
1667 * now display status | |
1668 */ | |
1669 showCBStatus(win, data); | |
1670 } | |
1671 break; | |
1672 | |
1673 default: | |
1674 showError(win, ss_cnf->cb_cnf.ss_error); | |
1675 break; | |
1676 } | |
1677 break; | |
1678 | |
1679 case E_SS_IMEI: /* present IMEI */ | |
1680 /* T_MFW_IMEI imei_cnf;*/ | |
1681 TRACE_FUNCTION(" E_SS_IMEI"); | |
1682 | |
1683 switch(ss_cnf->imei_info.error) | |
1684 { | |
1685 case MFW_SS_NO_ERROR: | |
1686 TRACE_FUNCTION( "Handling IMEI no error" ); | |
1687 // May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg | |
1688 // copy the IMEI onto the global variable and display the information | |
1689 #ifdef FF_MMI_ATC_MIGRATION | |
1690 memset(imei,0x00,IMEI_LEN+1); | |
1691 memcpy(imei, ss_cnf->imei_info.imei_number, IMEI_LEN); | |
1692 showIMEI(win,(char*)imei); | |
1693 #else | |
1694 showIMEI2(win, ss_cnf); | |
1695 #endif | |
1696 break; | |
1697 | |
1698 default: | |
1699 TRACE_FUNCTION("ERROR in IMEI"); | |
1700 showError(win, (T_MFW_SS_ERROR)ss_cnf->imei_info.error); | |
1701 break; | |
1702 } | |
1703 break; | |
1704 | |
1705 /* we must display the ussd info and then edit and send a user ussd */ | |
1706 case E_SS_USSD_REQ: | |
1707 { | |
1708 | |
1709 //x0pleela 24 Aug, 2006 DR: OMAPS00083503 | |
1710 //Checking dcs | |
1711 #ifdef MMI_LITE | |
1712 UBYTE alphabet; | |
1713 alphabet = ss_getAlphabetCb ((UBYTE) ss_cnf->ussd_info.dcs ); | |
1714 | |
1715 //if it is UCS2 character then display a message for the user | |
1716 if( alphabet EQ SS_ALPHA_16_Bit) | |
1717 { | |
1718 showUSSDError(win); | |
1719 } | |
1720 else | |
1721 { | |
1722 | |
1723 #endif | |
1724 switch(ss_cnf->ussd_info.error) | |
1725 { | |
1726 case MFW_SS_NO_ERROR: | |
1727 TRACE_FUNCTION( "Handling USSD_REQ no error" ); | |
1728 showUSSDREQ(win, ss_cnf ); | |
1729 break; | |
1730 | |
1731 default: | |
1732 TRACE_FUNCTION( "Handling USSD_REQ no error" ); | |
1733 showError(win, (T_MFW_SS_ERROR)ss_cnf->ussd_info.error); | |
1734 break; | |
1735 } | |
1736 #ifdef MMI_LITE | |
1737 } | |
1738 #endif | |
1739 } | |
1740 break; | |
1741 | |
1742 | |
1743 /* just display the ussd info */ | |
1744 case E_SS_USSD_CNF: | |
1745 TRACE_FUNCTION(" E_SS_USSD_CNF"); | |
1746 switch(ss_cnf->ussd_info.error) | |
1747 { | |
1748 | |
1749 case MFW_SS_NO_ERROR: | |
1750 TRACE_FUNCTION( "Handling USSD_CNF no error" ); | |
1751 | |
1752 #ifdef FF_CPHS_REL4 | |
1753 if(interrogate) | |
1754 { | |
1755 // mfw_cphs_set_default_profile(); | |
1756 // mfw_cphs_set_reg_profile(); | |
1757 interrogate = 0; | |
1758 TRACE_EVENT_P1("ussd string %s", ss_cnf->ussd_info.ussd); | |
1759 mmi_msp_interrogate_done(); | |
1760 } | |
1761 else | |
1762 if(msp_register) | |
1763 { | |
1764 msp_register = FALSE; | |
1765 TRACE_EVENT_P1("msp profile id registered %d", msp_reg_profid); | |
1766 mfw_cphs_set_reg_profile(msp_reg_profid); | |
1767 info_screen(win, TxtActivated, NULL, NULL); | |
1768 mmi_msp_interrogate_done(); | |
1769 } | |
1770 else | |
1771 { | |
1772 #endif | |
1773 showUSSDCNF(win, ss_cnf ); | |
1774 #ifdef FF_CPHS_REL4 | |
1775 } | |
1776 #endif | |
1777 break; | |
1778 | |
1779 default: | |
1780 TRACE_FUNCTION("ERROR in USSD_CNF"); | |
1781 #ifdef FF_CPHS_REL4 | |
1782 if(interrogate) | |
1783 { | |
1784 mfw_cphs_set_default_profile(1); | |
1785 mfw_cphs_set_reg_profile(1); | |
1786 interrogate = 0; | |
1787 TRACE_EVENT_P1("ussd string %s", ss_cnf->ussd_info.ussd); | |
1788 mmi_msp_interrogate_done(); | |
1789 } | |
1790 if(msp_register) | |
1791 { | |
1792 msp_register = FALSE; | |
1793 TRACE_EVENT("msp profile id registeration failed"); | |
1794 } | |
1795 #endif | |
1796 showError(win, (T_MFW_SS_ERROR)ss_cnf->ussd_info.error); | |
1797 break; | |
1798 } | |
1799 break; | |
1800 case E_SS_GET_PW: | |
1801 if (ss_cnf->pw_cnf.ss_error == MFW_SS_NO_ERROR) | |
1802 { | |
1803 showOk(win); | |
1804 strncpy((char*)ss_data.edt_buf_cb_password, | |
1805 (char*)ss_cnf->pw_cnf.ss_new_pwd,CB_PSW_LEN); | |
1806 } | |
1807 else | |
1808 { | |
1809 showError(win, ss_cnf->pw_cnf.ss_error); | |
1810 } | |
1811 break; | |
1812 //CQ-16432 start | |
1813 case E_SS_SAT_CPWD: | |
1814 TRACE_EVENT("E_SS_SAT_CPWD"); | |
1815 requestSatCBPassword(); | |
1816 break; | |
1817 //CQ-16432 end | |
1818 default: | |
1819 return; | |
1820 } | |
1821 | |
1822 } | |
1823 | |
1824 | |
1825 /******************************************************************************* | |
1826 | |
1827 $Function: srv_check_CF_telephony_status | |
1828 | |
1829 $Description: | |
1830 | |
1831 $Returns: | |
1832 | |
1833 $Arguments: | |
1834 | |
1835 *******************************************************************************/ | |
1836 | |
1837 /* | |
1838 ** NDH : 28/08/2003 : I am modifying the functionality of this routine so that will simply return | |
1839 ** CF_ACTIVE_STATUS if there is an active Call Forwarding Service and CF_INACTIVE_STATUS | |
1840 ** otherwise. This function is currently used in only one place and this change would be in line | |
1841 ** with the required functionality at that point. | |
1842 */ | |
1843 | |
1844 static UBYTE srv_check_CF_telephony_status (T_MFW_SS_CF_CNF * in_list) | |
1845 { | |
1846 UBYTE i; | |
1847 UBYTE retStat = CF_INACTIVE_STATUS; | |
1848 | |
1849 TRACE_EVENT("srv_check_CF_telephony_status"); | |
1850 | |
1851 if (in_list->ss_error == MFW_SS_NO_ERROR) | |
1852 { | |
1853 if (in_list->ss_feature_count) | |
1854 { | |
1855 for (i=0;i<in_list->ss_feature_count;i++) | |
1856 { | |
1857 T_MFW_FEATURE * pFeature = &in_list->ss_feature_list[i]; | |
1858 | |
1859 if (pFeature->ss_telecom_type == MFW_BST_TELE) | |
1860 { | |
1861 switch(pFeature->ss_telecom_service) | |
1862 { | |
1863 case MFW_TS_ALL_SPCH: | |
1864 case MFW_TS_TLPHNY: | |
1865 case MFW_TS_EMRGNCY: | |
1866 | |
1867 TRACE_EVENT("Speech Tele Service"); | |
1868 | |
1869 if (pFeature->ss_status & SS_STAT_ACTIVE) | |
1870 ss_data.cfu_services |= MFW_CFU_VOICE_ACTIVE; | |
1871 else | |
1872 ss_data.cfu_services &= (MFW_CFU_ALL_SERVICES_ACTIVE - MFW_CFU_VOICE_ACTIVE); | |
1873 break; | |
1874 | |
1875 case MFW_TS_ALL_FAX: | |
1876 case MFW_TS_FAX3_ALT_SPCH: | |
1877 case MFW_TS_FAX3_AUTO: | |
1878 case MFW_TS_FAX4: | |
1879 | |
1880 TRACE_EVENT("Fax Tele Service"); | |
1881 | |
1882 if (pFeature->ss_status & SS_STAT_ACTIVE) | |
1883 ss_data.cfu_services |= MFW_CFU_FAX_ACTIVE; | |
1884 else | |
1885 ss_data.cfu_services &= (MFW_CFU_ALL_SERVICES_ACTIVE - MFW_CFU_FAX_ACTIVE); | |
1886 break; | |
1887 | |
1888 case MFW_TS_ALL_DATA: | |
1889 | |
1890 TRACE_EVENT("Data Tele Service"); | |
1891 | |
1892 if (pFeature->ss_status & SS_STAT_ACTIVE) | |
1893 ss_data.cfu_services |= MFW_CFU_DATA_ACTIVE; | |
1894 else | |
1895 ss_data.cfu_services &= (MFW_CFU_ALL_SERVICES_ACTIVE - MFW_CFU_DATA_ACTIVE); | |
1896 break; | |
1897 | |
1898 case MFW_TS_ALL_SMS: | |
1899 case MFW_TS_SMS_MO: | |
1900 case MFW_TS_SMS_MT: | |
1901 | |
1902 TRACE_EVENT("SMS Tele Service"); | |
1903 | |
1904 if (pFeature->ss_status & SS_STAT_ACTIVE) | |
1905 ss_data.cfu_services |= MFW_CFU_SMS_ACTIVE; | |
1906 else | |
1907 ss_data.cfu_services &= (MFW_CFU_ALL_SERVICES_ACTIVE - MFW_CFU_SMS_ACTIVE); | |
1908 break; | |
1909 | |
1910 case MFW_TS_ALL_XCPT_SMS: | |
1911 | |
1912 TRACE_EVENT("All Except SMS Tele Service"); | |
1913 | |
1914 if (pFeature->ss_status & SS_STAT_ACTIVE) | |
1915 ss_data.cfu_services |= (MFW_CFU_VOICE_ACTIVE | | |
1916 MFW_CFU_FAX_ACTIVE | | |
1917 MFW_CFU_DATA_ACTIVE); | |
1918 else | |
1919 ss_data.cfu_services &= (MFW_CFU_ALL_SERVICES_ACTIVE - | |
1920 (MFW_CFU_VOICE_ACTIVE | | |
1921 MFW_CFU_FAX_ACTIVE | | |
1922 MFW_CFU_DATA_ACTIVE)); | |
1923 break; | |
1924 | |
1925 case MFW_TS_ALL_TS: | |
1926 | |
1927 TRACE_EVENT("All Tele Services"); | |
1928 | |
1929 if (pFeature->ss_status & SS_STAT_ACTIVE) | |
1930 ss_data.cfu_services |= MFW_CFU_ALL_SERVICES_ACTIVE; | |
1931 else | |
1932 ss_data.cfu_services = 0; | |
1933 break; | |
1934 | |
1935 default: | |
1936 break; | |
1937 } | |
1938 } | |
1939 else if (pFeature->ss_telecom_type == MFW_BST_BEARER) | |
1940 { | |
1941 | |
1942 TRACE_EVENT("Bearer Service Type"); | |
1943 | |
1944 if (pFeature->ss_status & SS_STAT_ACTIVE) | |
1945 ss_data.cfu_services |= MFW_CFU_DATA_ACTIVE; | |
1946 else | |
1947 ss_data.cfu_services &= (MFW_CFU_ALL_SERVICES_ACTIVE - MFW_CFU_DATA_ACTIVE); | |
1948 break; | |
1949 } | |
1950 else | |
1951 { | |
1952 /* MFW_BST_UNKNOWN */ | |
1953 | |
1954 TRACE_EVENT("Unknown Service Type"); | |
1955 | |
1956 if (pFeature->ss_status & SS_STAT_ACTIVE) | |
1957 ss_data.cfu_services |= MFW_CFU_ALL_BASIC_SERVICES_ACTIVE; | |
1958 else | |
1959 ss_data.cfu_services = 0; | |
1960 break; | |
1961 } | |
1962 | |
1963 } | |
1964 } | |
1965 else if ((in_list->ss_category == SS_REGISTRATION) || | |
1966 (in_list->ss_category == SS_ACTIVATION)) | |
1967 { | |
1968 ss_data.cfu_services |= MFW_CFU_ALL_BASIC_SERVICES_ACTIVE; | |
1969 } | |
1970 else if ((in_list->ss_category == SS_ERASURE) || | |
1971 (in_list->ss_category == SS_DEACTIVATION)) | |
1972 { | |
1973 ss_data.cfu_services &= (MFW_CFU_ALL_SERVICES_ACTIVE - MFW_CFU_ALL_BASIC_SERVICES_ACTIVE); | |
1974 } | |
1975 } | |
1976 | |
1977 TRACE_EVENT_P1("cfu_services flag is : %8lx", ss_data.cfu_services); | |
1978 | |
1979 if (ss_data.cfu_services) | |
1980 retStat = CF_ACTIVE_STATUS; | |
1981 | |
1982 return retStat; | |
1983 } | |
1984 | |
1985 | |
1986 /******************************************************************************* | |
1987 | |
1988 $Function: srv_check_CF_telephony_status | |
1989 | |
1990 $Description: copies only the interesting parts of the call forwarding | |
1991 feature list. | |
1992 | |
1993 $Returns: | |
1994 | |
1995 $Arguments: | |
1996 | |
1997 *******************************************************************************/ | |
1998 | |
1999 static UBYTE srv_copy_feature_list_cf (T_ss_feature_cf * out_list, T_MFW_SS_CF_CNF * in_list) | |
2000 { | |
2001 UBYTE found_entries = 0; | |
2002 UBYTE i, j; | |
2003 | |
2004 TRACE_EVENT_P1("ss_feature_count %d",in_list->ss_feature_count); | |
2005 | |
2006 if (in_list->ss_feature_count == 0) | |
2007 out_list->ss[0].service = TxtCallDivert; | |
2008 | |
2009 for (i=0;i<in_list->ss_feature_count;i++) | |
2010 { //MC got rid of pointer arithmetic | |
2011 | |
2012 T_MFW_FEATURE * pFeature = &in_list->ss_feature_list[i]; //SPR#1081 - DS - Removed mem allocation. Uses assignment instead. | |
2013 T_ss_feature_cf_data * cf_data = &out_list->ss[found_entries]; | |
2014 UBYTE srvFound; | |
2015 | |
2016 TRACE_EVENT_P2("Telecom type:%d, service: %d ",pFeature->ss_telecom_type, pFeature->ss_telecom_service); | |
2017 /* | |
2018 * first check teleservice | |
2019 */ | |
2020 if (srv_get_service_type (&cf_data->service, pFeature->ss_telecom_type/*CFService*/, | |
2021 pFeature->ss_telecom_service)) | |
2022 { | |
2023 | |
2024 if (cf_data->service == TxtNull) | |
2025 cf_data->service = TxtCallDivert; | |
2026 | |
2027 /* | |
2028 ** If there is more than one entry of a given type, ensure that an information | |
2029 ** screen is displayed only once | |
2030 */ | |
2031 srvFound = FALSE; | |
2032 | |
2033 for (j=0; j<found_entries && !srvFound; j++) | |
2034 { | |
2035 if (cf_data->service == out_list->ss[j].service) | |
2036 srvFound = TRUE; | |
2037 } | |
2038 | |
2039 if (!srvFound) | |
2040 { | |
2041 /* | |
2042 * second set status | |
2043 */ | |
2044 srv_get_status (&cf_data->status, pFeature->ss_status); | |
2045 | |
2046 if ((ss_cnf->cf_cnf.ss_code==SS_CF_CFU)||(ss_cnf->cf_cnf.ss_code==SS_CF_ALL)){ | |
2047 if (pFeature->ss_status & SS_STAT_ACTIVE) | |
2048 { | |
2049 iconsSetState(iconIdCallFor); | |
2050 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) | |
2051 // Setting the Current state of CF in Flash | |
2052 FFS_flashData.CFState=TRUE; | |
2053 } | |
2054 /* Marcus: Issue 1652: 03/02/2003: Start */ | |
2055 else if (pFeature->ss_status & SS_STAT_PROVISIONED) | |
2056 { | |
2057 iconsSetState(iconIdCallFor); | |
2058 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) | |
2059 // Setting the Current state of CF in Flash | |
2060 FFS_flashData.CFState=TRUE; | |
2061 } | |
2062 /* Marcus: Issue 1652: 03/02/2003: End */ | |
2063 else | |
2064 { | |
2065 iconsDeleteState(iconIdCallFor); | |
2066 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) | |
2067 // Setting the Current state of CF in Flash | |
2068 FFS_flashData.CFState=FALSE; | |
2069 } | |
2070 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) | |
2071 // Writng the Current state of CF into ffs | |
2072 flash_write(); | |
2073 | |
2074 } | |
2075 | |
2076 /* | |
2077 * third set forwarded to number | |
2078 * If the TON is International, add a '+' to the beginning of the number | |
2079 */ | |
2080 if ((pFeature->ss_numbering_type == TON_International) && | |
2081 (pFeature->ss_forwarded_to_number[0] != '+')) | |
2082 { | |
2083 cf_data->forwarded_to_number[0] = '+'; | |
2084 srv_get_forwarded_to_number (&cf_data->forwarded_to_number[1], | |
2085 (char *)pFeature->ss_forwarded_to_number, | |
2086 MAX_SS_CF_NUM_LEN-1); | |
2087 } | |
2088 else | |
2089 { | |
2090 srv_get_forwarded_to_number ((char *)cf_data->forwarded_to_number, | |
2091 (char *)pFeature->ss_forwarded_to_number, | |
2092 MAX_SS_CF_NUM_LEN); | |
2093 } | |
2094 | |
2095 TRACE_EVENT_P1("ss_forwarded_to_number %s", (CHAR *)pFeature->ss_forwarded_to_number); | |
2096 found_entries++; | |
2097 } | |
2098 } | |
2099 | |
2100 } | |
2101 | |
2102 /* | |
2103 * return the number of interesting entries | |
2104 */ | |
2105 return found_entries; | |
2106 } | |
2107 | |
2108 | |
2109 /******************************************************************************* | |
2110 | |
2111 $Function: srv_get_forwarded_to_number | |
2112 | |
2113 $Description: sets the forwarded to number if available. | |
2114 | |
2115 $Returns: | |
2116 | |
2117 $Arguments: | |
2118 | |
2119 *******************************************************************************/ | |
2120 | |
2121 | |
2122 | |
2123 static void srv_get_forwarded_to_number ( char * textString, | |
2124 char * forwarded_to_number, | |
2125 UBYTE max_chars) | |
2126 { | |
2127 TRACE_FUNCTION("srv_get_forwarded_to_number"); | |
2128 | |
2129 memset (textString, 0, max_chars); | |
2130 strncpy (textString, forwarded_to_number, max_chars-1); | |
2131 } | |
2132 | |
2133 | |
2134 /******************************************************************************* | |
2135 | |
2136 $Function: srv_get_service_type | |
2137 | |
2138 $Description: checks if the service is interesting or not. | |
2139 | |
2140 $Returns: | |
2141 | |
2142 $Arguments: | |
2143 | |
2144 $History: | |
2145 | |
2146 //SPR#0776 - DS - Added default value for textId. Changed references from TxtNotImplemented | |
2147 to TxtNull. | |
2148 | |
2149 *******************************************************************************/ | |
2150 | |
2151 | |
2152 static UBYTE srv_get_service_type ( USHORT * textId, | |
2153 UBYTE ss_telecom_type, UBYTE ss_telecom_service) | |
2154 { | |
2155 TRACE_FUNCTION("srv_get_service_type"); | |
2156 | |
2157 TRACE_EVENT_P1("ss_telecom_type: %x", ss_telecom_type); | |
2158 TRACE_EVENT_P1("ss_telecom_service: %x", ss_telecom_service); | |
2159 | |
2160 *textId = TxtNull; //Set to TxtNull in case no match found below. | |
2161 | |
2162 switch ( ss_telecom_type ) | |
2163 { | |
2164 case MFW_BST_UNKNOWN: | |
2165 break; | |
2166 | |
2167 case MFW_BST_TELE: | |
2168 switch ( ss_telecom_service ) | |
2169 { | |
2170 case MFW_TS_ALL_TS: | |
2171 *textId = TxtAllCalls; | |
2172 return TRUE; | |
2173 | |
2174 case MFW_TS_ALL_SPCH: /* All speech transmission services */ | |
2175 case MFW_TS_TLPHNY: /* telephony */ | |
2176 case MFW_TS_PLMN1: /*MC, this is returned for auxiliary telephony status, 742*/ | |
2177 *textId = TxtVoice; | |
2178 return TRUE; | |
2179 | |
2180 case MFW_TS_ALL_SMS: | |
2181 case MFW_TS_SMS_MO: | |
2182 case MFW_TS_SMS_MT: | |
2183 *textId = TxtSMS; | |
2184 return TRUE; | |
2185 | |
2186 case MFW_TS_EMRGNCY: | |
2187 case MFW_TS_ALL_XCPT_SMS: | |
2188 case MFW_TS_ALL_PSSS: /* all PLMN specific TS */ | |
2189 case MFW_TS_PLMN2: /* PLMN specific TS 2 */ | |
2190 case MFW_TS_PLMN3: /* PLMN specific TS 3 */ | |
2191 case MFW_TS_PLMN4: /* PLMN specific TS 4 */ | |
2192 case MFW_TS_PLMN5: /* PLMN specific TS 5 */ | |
2193 case MFW_TS_PLMN6: /* PLMN specific TS 6 */ | |
2194 case MFW_TS_PLMN7: /* PLMN specific TS 7 */ | |
2195 case MFW_TS_PLMN8: /* PLMN specific TS 8 */ | |
2196 case MFW_TS_PLMN9: /* PLMN specific TS 9 */ | |
2197 case MFW_TS_PLMNA: /* PLMN specific TS A */ | |
2198 case MFW_TS_PLMNB: /* PLMN specific TS B */ | |
2199 case MFW_TS_PLMNC: /* PLMN specific TS C */ | |
2200 case MFW_TS_PLMND: /* PLMN specific TS D */ | |
2201 case MFW_TS_PLMNE: /* PLMN specific TS E */ | |
2202 case MFW_TS_PLMNF: /* PLMN specific TS F */ | |
2203 *textId = TxtNull; | |
2204 return TRUE; | |
2205 | |
2206 case MFW_TS_ALL_DATA: | |
2207 *textId = TxtData; | |
2208 return TRUE; | |
2209 | |
2210 case MFW_TS_ALL_FAX: | |
2211 case MFW_TS_FAX3_ALT_SPCH: | |
2212 case MFW_TS_FAX3_AUTO: | |
2213 case MFW_TS_FAX4: | |
2214 *textId = TxtFax; | |
2215 return TRUE; | |
2216 } | |
2217 | |
2218 break; | |
2219 | |
2220 case MFW_BST_BEARER: | |
2221 switch ( ss_telecom_service ) | |
2222 { | |
2223 case MFW_BS_ALL_BS: | |
2224 *textId = TxtData; //SPR#933 - DS - Changed TxtNull to TxtData. | |
2225 return TRUE; | |
2226 | |
2227 case MFW_BS_ALL_DATA_CDA: //SPR#933 - DS - Added so MMI displays correct info to user. | |
2228 *textId = TxtData; | |
2229 return TRUE; | |
2230 | |
2231 default: | |
2232 break; | |
2233 } | |
2234 break; | |
2235 } | |
2236 | |
2237 return FALSE; | |
2238 } | |
2239 | |
2240 /******************************************************************************* | |
2241 | |
2242 $Function: srv_get_status | |
2243 | |
2244 $Description: | |
2245 | |
2246 $Returns: | |
2247 | |
2248 $Arguments: | |
2249 | |
2250 *******************************************************************************/ | |
2251 | |
2252 | |
2253 static void srv_get_status (USHORT *textId, UBYTE pStatus) | |
2254 { | |
2255 TRACE_FUNCTION("srv_get_status"); | |
2256 TRACE_EVENT_P1("Call Forwarding status: %d", pStatus); | |
2257 | |
2258 if (pStatus & SS_STAT_ACTIVE) // handles also the case of invalid status | |
2259 *textId = TxtActivated; | |
2260 /* Marcus: Issue 1652: 03/02/2003: Removed NDH 10/06/03 */ | |
2261 else | |
2262 *textId = TxtDeActivated; | |
2263 } | |
2264 | |
2265 | |
2266 /******************************************************************************* | |
2267 | |
2268 $Function: srv_copy_feature_list_cw | |
2269 | |
2270 $Description: copies only the interesting parts of the call waiting | |
2271 service list. | |
2272 | |
2273 $Returns: | |
2274 | |
2275 $Arguments: | |
2276 | |
2277 *******************************************************************************/ | |
2278 | |
2279 static UBYTE srv_copy_feature_list_cw (T_ss_feature_cw * out_list, T_MFW_SS_CW_CNF * in_list) | |
2280 { | |
2281 UBYTE found_entries = 0; | |
2282 UBYTE i, j; | |
2283 | |
2284 if (in_list->ss_service_count == 0) | |
2285 out_list->ss[0].service = TxtCallWaiting; | |
2286 | |
2287 for (i=0;i<in_list->ss_service_count;i++) | |
2288 { | |
2289 T_MFW_SRV_GROUP * pFeature = &in_list->ss_service_list[i]; | |
2290 T_ss_feature_cw_data * cw_data = &out_list->ss[found_entries]; | |
2291 UBYTE srvFound; | |
2292 /* | |
2293 * first check teleservice | |
2294 */ | |
2295 if (srv_get_service_type (&cw_data->service, pFeature->ss_telecom_type, | |
2296 pFeature->ss_telecom_service)) | |
2297 { | |
2298 | |
2299 if (cw_data->service == TxtNull) | |
2300 cw_data->service = TxtCallWaiting; | |
2301 | |
2302 /* | |
2303 ** If there is more than one entry of a given type, ensure that an information | |
2304 ** screen is displayed only once | |
2305 */ | |
2306 srvFound = FALSE; | |
2307 | |
2308 for (j=0; j<found_entries && !srvFound; j++) | |
2309 { | |
2310 if (cw_data->service == out_list->ss[j].service) | |
2311 srvFound = TRUE; | |
2312 } | |
2313 | |
2314 if (!srvFound) | |
2315 { | |
2316 /* | |
2317 * second set status | |
2318 */ | |
2319 srv_get_status (&out_list->status, in_list->ss_status); | |
2320 found_entries++; | |
2321 } | |
2322 } | |
2323 } | |
2324 | |
2325 /* | |
2326 * return the number of interesting entries | |
2327 */ | |
2328 return found_entries; | |
2329 } | |
2330 | |
2331 /******************************************************************************* | |
2332 | |
2333 $Function: srv_copy_feature_list_cb | |
2334 | |
2335 $Description: | |
2336 | |
2337 $Returns: | |
2338 | |
2339 $Arguments: | |
2340 | |
2341 *******************************************************************************/ | |
2342 | |
2343 static UBYTE srv_copy_feature_list_cb (T_ss_feature_cb * out_list, T_MFW_SS_CB_CNF * in_list) | |
2344 { | |
2345 UBYTE found_entries = 0; | |
2346 UBYTE i, j; | |
2347 | |
2348 USHORT textId = 0; // RAVI | |
2349 | |
2350 /* | |
2351 * SPR #1878 NDH - Determine which text is to be displayed depending on what request | |
2352 * was initially sent. | |
2353 */ | |
2354 switch(in_list->ss_category) | |
2355 { | |
2356 case SS_REGISTRATION: | |
2357 case SS_ACTIVATION: | |
2358 case SS_INTERROGATION: | |
2359 /* | |
2360 * Interrogation returns only those services which are active | |
2361 */ | |
2362 textId = TxtActivated; | |
2363 break; | |
2364 | |
2365 case SS_ERASURE: | |
2366 case SS_DEACTIVATION: | |
2367 textId = TxtDeActivated; | |
2368 break; | |
2369 } | |
2370 | |
2371 if (in_list->ss_telecom_count == 0) | |
2372 out_list->ss[0].service = TxtCallBarringAll; | |
2373 | |
2374 for (i=0;i<in_list->ss_telecom_count;i++) | |
2375 { | |
2376 T_MFW_TELECOM * pFeature = &in_list->ss_telecom_list[i]; | |
2377 T_ss_feature_cb_data * cb_data = &out_list->ss[found_entries]; | |
2378 UBYTE srvFound; | |
2379 /* | |
2380 * first check teleservice | |
2381 */ | |
2382 if (srv_get_service_type (&cb_data->service, pFeature->ss_telecom_type, | |
2383 pFeature->ss_telecom_service)) | |
2384 { | |
2385 if (cb_data->service == TxtNull) | |
2386 cb_data->service = TxtCallBarringAll; | |
2387 | |
2388 cb_data->status = textId; | |
2389 | |
2390 /* | |
2391 ** If there is more than one entry of a given type, ensure that an information | |
2392 ** screen is displayed only once | |
2393 */ | |
2394 srvFound = FALSE; | |
2395 | |
2396 for (j=0; j<found_entries && !srvFound; j++) | |
2397 { | |
2398 if (cb_data->service == out_list->ss[j].service) | |
2399 srvFound = TRUE; | |
2400 } | |
2401 | |
2402 if (!srvFound) | |
2403 found_entries++; | |
2404 } | |
2405 } | |
2406 | |
2407 /* | |
2408 * return the number of interesting entries | |
2409 */ | |
2410 return found_entries; | |
2411 } | |
2412 | |
2413 | |
2414 | |
2415 /******************************************************************************* | |
2416 | |
2417 $Function: services_info_cb | |
2418 | |
2419 $Description: Callback function from information dialog. | |
2420 | |
2421 $Returns: | |
2422 | |
2423 $Arguments: | |
2424 | |
2425 *******************************************************************************/ | |
2426 | |
2427 | |
2428 | |
2429 static int services_info_cb(T_MFW_HND win, USHORT identifier, UBYTE reason) | |
2430 { | |
2431 | |
2432 T_DISPLAY_DATA display_info; // Jun 16, 2005 REF: CRR 31543 x0021334 | |
2433 // UBYTE PWD; // RAVI | |
2434 T_MFW_SS_RETURN sat_result_hangup; // Jun 16, 2005 REF: CRR 31543 x0021334 | |
2435 | |
2436 //Feb 17, 2005 REF : CRR 17657 x0012850 Divya.P.V | |
2437 //Bug : Unable to compose a one or two digit number | |
2438 //Fix : This bug is reproducible when a very long message is sent by the service provider when an invalid one or two digit number is dialled. | |
2439 //The read only editor with the service provider message that comes up when a one or two digit is dialled | |
2440 //was not handled properly. So altered the editor handling to cater for the long message. | |
2441 T_MFW_WIN *win_data; | |
2442 T_ss *data = NULL; // RAVI - Assigned NULL. | |
2443 | |
2444 TRACE_EVENT_P1("Service Info CB %d", win); | |
2445 | |
2446 ss_data.info_wait = 0; | |
2447 | |
2448 //Feb 17, 2005 REF : CRR 17657 x0012850 Divya.P.V | |
2449 //Bug : Unable to compose a one or two digit number | |
2450 //Fix : This bug is reproducible when a very long message is sent by the service provider when an invalid one or two digit number is dialled. | |
2451 //The read only editor with the service provider message that comes up when a one or two digit is dialled | |
2452 //was not handled properly. So altered the editor handling to cater for the long message. | |
2453 if(win) | |
2454 { | |
2455 win_data = ((T_MFW_HDR *)win)->data; | |
2456 if(win_data) | |
2457 data = (T_ss * )win_data->user; | |
2458 } | |
2459 | |
2460 /* | |
2461 * Who has initiated the information screen | |
2462 */ | |
2463 switch (identifier) | |
2464 { | |
2465 case SS_WAIT: | |
2466 | |
2467 break; | |
2468 case E_SS_IMEI:/* present IMEI */ | |
2469 case ServicesOk: | |
2470 case ServicesFailed: | |
2471 case ServicesCheckCLI_OK: | |
2472 case ServicesCheckCW_OK: | |
2473 case ServicesIMEI_OK: | |
2474 case ServicesError: | |
2475 case ServicesUSSD_CNF_OK: | |
2476 #if 0 | |
2477 case ServicesUSSDAlreadyFull: /* already full message screen */ | |
2478 #endif | |
2479 case ServicesCFU_OK: | |
2480 case ServicesCB_OK: | |
2481 | |
2482 case E_SS_NOTIFY: | |
2483 case E_SS_CLI_CNF: | |
2484 case E_SS_USSD_CNF: | |
2485 switch (reason) | |
2486 { | |
2487 case INFO_TIMEOUT: | |
2488 /* info dialog timed out, where to now? */ | |
2489 /* no break; */ | |
2490 case INFO_KCD_HUP: | |
2491 /* clear key in info dialog, where to now? */ | |
2492 /* no break;*/ | |
2493 case INFO_KCD_LEFT: | |
2494 /* left soft key in info dialog, where to now? */ | |
2495 /* no break;*/ | |
2496 case INFO_KCD_RIGHT: | |
2497 /* right soft key in info dialog, where to now? */ | |
2498 //Feb 17, 2005 REF : CRR 17657 x0012850 Divya.P.V | |
2499 //Bug : Unable to compose a one or two digit number | |
2500 //Fix : This bug is reproducible when a very long message is sent by the service provider when an invalid one or two digit number is dialled. | |
2501 //The read only editor with the service provider message that comes up when a one or two digit is dialled | |
2502 //was not handled properly. So altered the editor handling to cater for the long message. | |
2503 if(data) | |
2504 { | |
2505 if(data->info_win) | |
2506 { | |
2507 AUI_edit_Destroy(data->info_win); | |
2508 data->info_win=NULL; | |
2509 } | |
2510 } | |
2511 services_destroy(win); | |
2512 break; | |
2513 } | |
2514 // May 12, 2005 REF: CRR 30892 x0021334 | |
2515 // Set ss_data.info_win to NULL to pass the check in services_ss_cb() for notification | |
2516 ss_data.info_win = NULL; | |
2517 break; | |
2518 | |
2519 case E_SS_CB_CNF: | |
2520 { | |
2521 T_MFW_WIN * win_data; | |
2522 T_ss * data; | |
2523 | |
2524 if(win != NULL) /* x0039928 - Lint warning removal */ | |
2525 { | |
2526 win_data = ((T_MFW_HDR *)win)->data; | |
2527 data = (T_ss *)win_data->user; | |
2528 | |
2529 | |
2530 switch (reason) | |
2531 { | |
2532 case INFO_TIMEOUT: | |
2533 //Jun 04,2004 CRR:13601 xpradipg - SASKEN | |
2534 //Timer is introduced for the information dialog, we are handling the time_out event | |
2535 case INFO_KCD_HUP: | |
2536 case INFO_KCD_LEFT: | |
2537 /* | |
2538 * stop the display of the results | |
2539 */ | |
2540 if (data->mfw_ss_cb) | |
2541 { | |
2542 FREE_MEMORY ((void *)data->mfw_ss_cb, sizeof (T_ss_feature_cb)); | |
2543 data->mfw_ss_cb = NULL; | |
2544 data->current_feature = 0; | |
2545 | |
2546 TRACE_EVENT_P2("SS_data.win %d %d",ss_data.win, data); | |
2547 } | |
2548 break; | |
2549 | |
2550 case INFO_KCD_RIGHT: | |
2551 if ((data->mfw_ss_cb) && (data->max_feature > 1)) | |
2552 { | |
2553 if (data->max_feature > data->current_feature + 1) | |
2554 data->current_feature++; | |
2555 else | |
2556 data->current_feature = 0; | |
2557 | |
2558 showCBStatus (win, data); | |
2559 //Jun 04,2004 CRR:13601 xpradipg - SASKEN | |
2560 //Restart the timer if the key was pressed. We handle only right key since left key destroys | |
2561 //the information dialog | |
2562 InfoDialogTimRestart(win); | |
2563 } | |
2564 | |
2565 break; | |
2566 | |
2567 default: | |
2568 break; | |
2569 } | |
2570 // May 12, 2005 REF: CRR 30892 x0021334 | |
2571 // Set ss_data.info_win to NULL to pass the check in services_ss_cb() for notification | |
2572 ss_data.info_win = NULL; | |
2573 } | |
2574 } | |
2575 break; | |
2576 | |
2577 case E_SS_CW_CNF: | |
2578 { | |
2579 T_MFW_WIN * win_data; | |
2580 T_ss * data; | |
2581 | |
2582 if(win != NULL) /* x0039928 - Lint warning removal */ | |
2583 { | |
2584 win_data = ((T_MFW_HDR *)win)->data; | |
2585 data = (T_ss *)win_data->user; | |
2586 | |
2587 | |
2588 switch (reason) | |
2589 { | |
2590 case INFO_TIMEOUT: | |
2591 //Jun 04,2004 CRR:13601 xpradipg - SASKEN | |
2592 //Timer is introduced for the information dialog, we are handling the time_out event | |
2593 case INFO_KCD_HUP: | |
2594 case INFO_KCD_LEFT: | |
2595 /* | |
2596 * stop the display of the results | |
2597 */ | |
2598 if (data->mfw_ss_cw) | |
2599 { | |
2600 FREE_MEMORY ((void *)data->mfw_ss_cw, sizeof (T_ss_feature_cw)); | |
2601 data->mfw_ss_cw = NULL; | |
2602 data->current_feature = 0; | |
2603 } | |
2604 break; | |
2605 | |
2606 case INFO_KCD_RIGHT: | |
2607 if ((data->mfw_ss_cw) && (data->max_feature > 1)) | |
2608 { | |
2609 if (data->max_feature > data->current_feature + 1) | |
2610 data->current_feature++; | |
2611 else | |
2612 data->current_feature = 0; | |
2613 | |
2614 showCWStatus (win, data); | |
2615 //Jun 04,2004 CRR:13601 xpradipg - SASKEN | |
2616 //Restart the timer if the key was pressed. We handle only right key since left key destroys | |
2617 //the information dialog | |
2618 InfoDialogTimRestart(win); | |
2619 | |
2620 } | |
2621 break; | |
2622 | |
2623 default: | |
2624 break; | |
2625 } | |
2626 // May 12, 2005 REF: CRR 30892 x0021334 | |
2627 // Set ss_data.info_win to NULL to pass the check in services_ss_cb() for notification | |
2628 ss_data.info_win = NULL; | |
2629 } | |
2630 } | |
2631 break; | |
2632 case E_SS_CF_CNF: | |
2633 { | |
2634 T_MFW_WIN * win_data; | |
2635 T_ss * data; | |
2636 | |
2637 if(win != NULL) | |
2638 { | |
2639 win_data = ((T_MFW_HDR *)win)->data; | |
2640 data = (T_ss *)win_data->user; | |
2641 | |
2642 | |
2643 switch (reason) | |
2644 { | |
2645 case INFO_TIMEOUT: | |
2646 //Jun 04,2004 CRR:13601 xpradipg - SASKEN | |
2647 //Timer is introduced for the information dialog, we are handling the time_out event | |
2648 case INFO_KCD_HUP: | |
2649 case INFO_KCD_LEFT: | |
2650 /* | |
2651 * stop the display of the results | |
2652 */ | |
2653 if (data->mfw_ss_cf) | |
2654 { | |
2655 FREE_MEMORY ((void *)data->mfw_ss_cf, sizeof (T_ss_feature_cf)); | |
2656 data->mfw_ss_cf = NULL; | |
2657 data->current_feature = 0; | |
2658 } | |
2659 break; | |
2660 | |
2661 case INFO_KCD_RIGHT: | |
2662 if ((data->mfw_ss_cf) && (data->max_feature > 1)) | |
2663 { | |
2664 if (data->max_feature > data->current_feature + 1) | |
2665 data->current_feature++; | |
2666 else | |
2667 data->current_feature = 0; | |
2668 | |
2669 showCFStatus (win, data); | |
2670 //Jun 04,2004 CRR:13601 xpradipg - SASKEN | |
2671 //Restart the timer if the key was pressed. We handle only right key since left key destroys | |
2672 //the information dialog | |
2673 InfoDialogTimRestart(win); | |
2674 } | |
2675 break; | |
2676 | |
2677 default: | |
2678 break; | |
2679 } | |
2680 // May 12, 2005 REF: CRR 30892 x0021334 | |
2681 // Set ss_data.info_win to NULL to pass the check in services_ss_cb() for notification | |
2682 ss_data.info_win = NULL; | |
2683 } | |
2684 break; | |
2685 } | |
2686 case ServicesUSSD_REQ_OK: | |
2687 switch (reason) | |
2688 { | |
2689 case INFO_KCD_HUP: | |
2690 // Jun 16, 2005 REF: CRR 31543 x0021334 | |
2691 // Hangup key is pressed. End the USSD session. | |
2692 sat_result_hangup = satHangup (CMD_SRC_LCL); | |
2693 if (sat_result_hangup == MFW_SS_OK) | |
2694 { | |
2695 dlg_initDisplayData_TextId(&display_info, NULL, NULL, TxtCancelled, TxtNull, COLOUR_STATUS); | |
2696 dlg_initDisplayData_events(&display_info, (T_VOID_FUNC)NULL, THREE_SECS, KEY_LEFT | KEY_RIGHT); | |
2697 info_dialog (NULL, &display_info); | |
2698 } | |
2699 else | |
2700 { | |
2701 TRACE_ERROR("Error in SAT USSD abort"); | |
2702 } | |
2703 // no break; | |
2704 case INFO_TIMEOUT: | |
2705 /* info dialog timed out, where to now? */ | |
2706 // no break; | |
2707 case INFO_KCD_RIGHT: | |
2708 /* right soft key in info dialog, where to now? | |
2709 all above mean cancelled so go back to whatever was before (idle?)*/ | |
2710 services_destroy(win); | |
2711 break; | |
2712 | |
2713 case INFO_KCD_LEFT: | |
2714 /* left soft key in info dialog, where to now? | |
2715 This means confirm, so now go to USSD entry screen */ | |
2716 SEND_EVENT(ss_data.win,ServicesUSSDEnter,0,0); | |
2717 break; | |
2718 default: | |
2719 break; | |
2720 } | |
2721 // May 12, 2005 REF: CRR 30892 x0021334 | |
2722 // Set ss_data.info_win to NULL to pass the check in services_ss_cb() for notification | |
2723 ss_data.info_win = NULL; | |
2724 break; | |
2725 | |
2726 case ServicesUSSDEnter: | |
2727 { | |
2728 T_MFW_SS_PARA ussd_data; | |
2729 | |
2730 ussd_data.ussd_info.len = strlen((char*)ss_data.edt_buf_number); | |
2731 ussd_data.ussd_info.dcs = (T_MFW_DCS)ss_data.dcs; /* x0020906 - 24-08-2006 */ | |
2732 ussd_data.ussd_info.error = MFW_SS_NO_ERROR; | |
2733 | |
2734 memcpy(ussd_data.ussd_info.ussd, ss_data.edt_buf_number, ussd_data.ussd_info.len); | |
2735 sendUSSD (&ussd_data); | |
2736 } | |
2737 break; | |
2738 | |
2739 } | |
2740 return 1; | |
2741 } | |
2742 | |
2743 | |
2744 /******************************************************************************* | |
2745 | |
2746 $Function: servicesNumbers | |
2747 | |
2748 $Description: | |
2749 | |
2750 $Returns: | |
2751 | |
2752 $Arguments: | |
2753 | |
2754 *******************************************************************************/ | |
2755 | |
2756 | |
2757 int servicesNumbers(MfwMnu* m, MfwMnuItem* i){ | |
2758 CFAction = CFActivate; | |
2759 servicesDoOtherNumber(); | |
2760 | |
2761 // ADDED BY RAVI - 28-11-2005 | |
2762 return 1; | |
2763 //END RAVI - 28-11-2005 | |
2764 } | |
2765 | |
2766 | |
2767 /******************************************************************************* | |
2768 | |
2769 $Function: servicesInfraRed | |
2770 | |
2771 $Description: | |
2772 | |
2773 $Returns: | |
2774 | |
2775 $Arguments: | |
2776 | |
2777 *******************************************************************************/ | |
2778 | |
2779 | |
2780 int servicesInfraRed(void){return 11;} | |
2781 | |
2782 | |
2783 /******************************************************************************* | |
2784 | |
2785 $Function: servicesExec | |
2786 | |
2787 $Description: | |
2788 | |
2789 $Returns: | |
2790 | |
2791 $Arguments: | |
2792 | |
2793 *******************************************************************************/ | |
2794 | |
2795 void servicesExec (int reason, MmiState next) | |
2796 { | |
2797 // UBYTE PWD; // RAVI | |
2798 T_MFW_HND win = mfw_parent(mfw_header()); | |
2799 // T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; // RAVI | |
2800 | |
2801 | |
2802 /* nextState = next; x0039928 - Lint warning removal */ | |
2803 | |
2804 | |
2805 if (!winIsFocussed(win)) | |
2806 lastFocus = winFocus(win); | |
2807 | |
2808 servicesState = reason; /* save reason now !! */ | |
2809 | |
2810 switch (reason) | |
2811 { | |
2812 case ServicesIdle: /* giving back control to last module*/ | |
2813 winFocus(lastFocus); | |
2814 winShow(lastFocus); | |
2815 lastFocus = 0; | |
2816 return; /* return from module */ | |
2817 | |
2818 case ServicesOk: | |
2819 TRACE_FUNCTION("Service OK"); | |
2820 winShow(win); | |
2821 timStart(times); /* start timer to go back in the submenu */ | |
2822 break; | |
2823 | |
2824 case ServicesFailed: | |
2825 TRACE_FUNCTION("Service Failed"); | |
2826 winShow(win); | |
2827 timStart(times); /* start timer to go back in the submenu */ | |
2828 break; | |
2829 | |
2830 case ServicesError: | |
2831 TRACE_FUNCTION("Service Error"); | |
2832 winShow(win); | |
2833 timStart(times); /* start timer to go back in the submenu */ | |
2834 break; | |
2835 | |
2836 case ServicesExecCF: /* all Call forwarding from menu */ | |
2837 case ServicesActCF: /* show "Please Wait" screen/animation */ | |
2838 case ServicesDeactCF: | |
2839 case ServicesCheckCF: | |
2840 case ServicesActCW: | |
2841 case ServicesDeactCW: | |
2842 case ServicesCheckCW: | |
2843 case ServicesActCLIR: | |
2844 case ServicesDeactCLIR: | |
2845 case ServicesCheckCLIR: | |
2846 winShow(win); | |
2847 timStart(times); /* start timer to go back in the submenu */ | |
2848 break; | |
2849 | |
2850 case ServicesCheckCW_OK: | |
2851 TRACE_FUNCTION(" ServicesCheckCW_OK"); | |
2852 winShow(win); | |
2853 timStart(times); /* start timer to go back in the submenu */ | |
2854 break; | |
2855 | |
2856 case ServicesCheckCLI_OK: | |
2857 TRACE_FUNCTION("ServicesCheckCLI_OK"); | |
2858 winShow(win); | |
2859 timStart(times); | |
2860 break; | |
2861 | |
2862 case ServicesIMEI_OK: | |
2863 TRACE_FUNCTION("ServicesIMEI_OK"); | |
2864 winShow(win); | |
2865 timStart(times); | |
2866 break; | |
2867 case ServicesResShow: | |
2868 TRACE_FUNCTION("ServicesResShow"); | |
2869 winShow(win); | |
2870 timStart(times); | |
2871 break; | |
2872 | |
2873 case ServicesCB_OK: | |
2874 TRACE_FUNCTION("ServicesCB_OK"); | |
2875 lastFocus = winFocus(win); | |
2876 winShow(win); | |
2877 timStart(times); | |
2878 break; | |
2879 | |
2880 case ServicesCFU_OK: | |
2881 TRACE_FUNCTION("ServicesCFUShow"); | |
2882 lastFocus = winFocus(win); | |
2883 winShow(win); | |
2884 timStart(times); | |
2885 break; | |
2886 | |
2887 case ServicesDoCallDivert: | |
2888 servicesSendCallDivert(0); | |
2889 break; | |
2890 | |
2891 case PIN2_ABORT: | |
2892 TRACE_FUNCTION("ServicesPin2_Abort"); | |
2893 break; | |
2894 default: | |
2895 break; | |
2896 } | |
2897 } | |
2898 | |
2899 #ifdef MMI_LITE | |
2900 /******************************************************************************* | |
2901 | |
2902 $Function: showUSSDError | |
2903 | |
2904 $Description: This function displays a dialog saying USSD message received, Font not supported | |
2905 for UCS2 characters | |
2906 | |
2907 $Returns: | |
2908 | |
2909 $Arguments: | |
2910 | |
2911 *******************************************************************************/ | |
2912 | |
2913 //x0pleela 24 Aug, 2004 DR: OMAPS00083503 | |
2914 | |
2915 static void showUSSDError (T_MFW_HND win) | |
2916 { | |
2917 | |
2918 T_DISPLAY_DATA display_info; | |
2919 | |
2920 TRACE_FUNCTION("showUSSDError"); | |
2921 | |
2922 | |
2923 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull, TxtUSSDMsgRxd, TxtFontNotSupported, COLOUR_STATUS); | |
2924 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, FOREVER, KEY_HUP| KEY_LEFT ); | |
2925 display_info.Identifier = ServicesError; | |
2926 | |
2927 /* | |
2928 * Call Info Screen | |
2929 */ | |
2930 | |
2931 ss_data.info_win = info_dialog (ss_data.win, &display_info); | |
2932 | |
2933 } | |
2934 #endif | |
2935 | |
2936 /******************************************************************************* | |
2937 | |
2938 $Function: showWait | |
2939 | |
2940 $Description: | |
2941 | |
2942 $Returns: | |
2943 | |
2944 $Arguments: | |
2945 | |
2946 *******************************************************************************/ | |
2947 | |
2948 static void showWait (T_MFW_HND win) | |
2949 { | |
2950 | |
2951 T_DISPLAY_DATA display_info; | |
2952 | |
2953 TRACE_FUNCTION("showWait"); | |
2954 | |
2955 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtRequesting, TxtNull, COLOUR_STATUS); | |
2956 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, FOREVER, KEY_HUP| KEY_LEFT ); | |
2957 display_info.Identifier = SS_WAIT; | |
2958 | |
2959 /* | |
2960 * Call Info Screen | |
2961 */ | |
2962 | |
2963 ss_data.info_wait = info_dialog (win, &display_info); | |
2964 } | |
2965 | |
2966 | |
2967 /******************************************************************************* | |
2968 | |
2969 $Function: showOk | |
2970 | |
2971 $Description: | |
2972 | |
2973 $Returns: | |
2974 | |
2975 $Arguments: | |
2976 | |
2977 *******************************************************************************/ | |
2978 | |
2979 static void showOk (T_MFW_HND win) | |
2980 { | |
2981 | |
2982 T_DISPLAY_DATA display_info; | |
2983 | |
2984 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull, TxtDone, TxtNull, COLOUR_STATUS); | |
2985 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, FOREVER, KEY_HUP| KEY_LEFT ); | |
2986 display_info.Identifier = ServicesOk; | |
2987 | |
2988 /* | |
2989 * Call Info Screen | |
2990 */ | |
2991 | |
2992 ss_data.info_win = info_dialog (ss_data.win, &display_info); | |
2993 | |
2994 } | |
2995 | |
2996 /******************************************************************************* | |
2997 | |
2998 $Function: showFailed | |
2999 | |
3000 $Description: | |
3001 | |
3002 $Returns: | |
3003 | |
3004 $Arguments: | |
3005 | |
3006 *******************************************************************************/ | |
3007 | |
3008 static void showFailed (T_MFW_HND win) | |
3009 { | |
3010 | |
3011 T_DISPLAY_DATA display_info; | |
3012 | |
3013 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull, TxtFailed, TxtNull, COLOUR_STATUS); | |
3014 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, FOREVER, KEY_HUP| KEY_LEFT ); | |
3015 display_info.Identifier = ServicesFailed; | |
3016 | |
3017 /* | |
3018 * Call Info Screen | |
3019 */ | |
3020 ss_data.info_win = info_dialog (ss_data.win, &display_info); | |
3021 } | |
3022 | |
3023 /******************************************************************************* | |
3024 | |
3025 $Function: showError | |
3026 | |
3027 $Description: | |
3028 | |
3029 $Returns: | |
3030 | |
3031 $Arguments: | |
3032 | |
3033 *******************************************************************************/ | |
3034 | |
3035 static void showError (T_MFW_HND win, T_MFW_SS_ERROR ss_error) | |
3036 { | |
3037 | |
3038 T_DISPLAY_DATA display_info; | |
3039 | |
3040 TRACE_FUNCTION("showError"); | |
3041 | |
3042 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull, TxtFailed, serviceGetError(ss_error), COLOUR_STATUS); | |
3043 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, FOREVER, KEY_HUP| KEY_LEFT ); | |
3044 display_info.Identifier = ServicesError; | |
3045 | |
3046 /* | |
3047 * Call Info Screen | |
3048 */ | |
3049 | |
3050 ss_data.info_win = info_dialog (ss_data.win, &display_info); | |
3051 | |
3052 } | |
3053 | |
3054 | |
3055 /******************************************************************************* | |
3056 | |
3057 $Function: showSSNotify | |
3058 | |
3059 $Description: Show result from E_SS_NOTIFY being returned. Short ss-related | |
3060 notification window. | |
3061 | |
3062 $Returns: | |
3063 | |
3064 $Arguments: | |
3065 | |
3066 *******************************************************************************/ | |
3067 | |
3068 static void showSSNotify (T_MFW_HND win, T_MFW_SS_NOTIFY * ss_notify) | |
3069 { | |
3070 | |
3071 T_DISPLAY_DATA display_info; | |
3072 USHORT TxtId1,TxtId2; | |
3073 | |
3074 TRACE_FUNCTION("++ showSSNotify"); | |
3075 | |
3076 TxtId1 = TxtNull; | |
3077 TxtId2 = TxtNull; | |
3078 | |
3079 switch (ss_notify->code) | |
3080 { | |
3081 case MFW_SS_MO_unconFORWARD: /* CFU activated */ | |
3082 { | |
3083 TRACE_EVENT("showSSNotify() MFW_SS_MO_unconFORWARD"); | |
3084 | |
3085 /* 30th May,2006 OMAPS00079650 a0393213 (R.Prabakar) | |
3086 Description : CPHS Call Forwarding feature implementation | |
3087 Solution : As part of the implemention, cphs_set_divert_status() is called whenever the network notifies | |
3088 about unconditional forward*/ | |
3089 | |
3090 #ifdef FF_CPHS | |
3091 switch (CFService) | |
3092 { | |
3093 case (CFVoice): | |
3094 /*MC SPR 742, handle line 2, auxiliary telephony*/ | |
3095 /*MC SPR 742, handle line 2, auxiliary telephony*/ | |
3096 #ifdef FF_CPHS_REL4 | |
3097 if(isCFISFilePresent() ) | |
3098 { /*call_forwarding_status_rel4.voice updated*/ | |
3099 if(call_forwarding_status_rel4.voice != MFW_CFLAG_SET || | |
3100 memcmp(call_forwarding_status_rel4.voice_dialling_number,ss_data.edt_buf_number,PHB_MAX_LEN)!=0) | |
3101 { | |
3102 call_forwarding_status_rel4.voice=MFW_CFLAG_SET; | |
3103 memcpy(call_forwarding_status_rel4.voice_dialling_number,ss_data.edt_buf_number,PHB_MAX_LEN); | |
3104 cphs_rel4_set_divert_status( call_forwarding_status_rel4.voice, | |
3105 call_forwarding_status_rel4.fax, | |
3106 call_forwarding_status_rel4.data, | |
3107 call_forwarding_status_rel4.voice_dialling_number); | |
3108 } | |
3109 break; | |
3110 } | |
3111 | |
3112 #endif | |
3113 case CFAuxVoice: | |
3114 | |
3115 if (GetAlsLine() == MFW_SERV_LINE2) | |
3116 { | |
3117 /*30th May,2006 OMAPS00079650 a0393213 (R.Prabakar) | |
3118 check to find whether we are doing unnecessary sim write*/ | |
3119 if(GetCphsDivertStatus(MFW_SERV_LINE2)!=MFW_CFLAG_SET) | |
3120 cphs_set_divert_status(MFW_CFLAG_NotPresent, MFW_CFLAG_SET, MFW_CFLAG_NotPresent, MFW_CFLAG_NotPresent); | |
3121 } | |
3122 | |
3123 else | |
3124 { | |
3125 if(GetCphsDivertStatus(MFW_SERV_LINE1)!=MFW_CFLAG_SET) | |
3126 cphs_set_divert_status(MFW_CFLAG_SET, MFW_CFLAG_NotPresent, MFW_CFLAG_NotPresent, MFW_CFLAG_NotPresent); | |
3127 } | |
3128 break; | |
3129 case (CFData): | |
3130 /*a0393213 cphs rel4*/ | |
3131 #ifdef FF_CPHS_REL4 | |
3132 if(!isCFISFilePresent() ) | |
3133 { | |
3134 #endif | |
3135 if(GetCphsDivertStatus(MFW_SERV_DATA)!=MFW_CFLAG_SET) | |
3136 cphs_set_divert_status(MFW_CFLAG_NotPresent,MFW_CFLAG_NotPresent,MFW_CFLAG_NotPresent,MFW_CFLAG_SET); | |
3137 /*a0393213 cphs rel4*/ | |
3138 #ifdef FF_CPHS_REL4 | |
3139 } | |
3140 else | |
3141 { | |
3142 if(call_forwarding_status_rel4.data!= MFW_CFLAG_SET) | |
3143 { | |
3144 call_forwarding_status_rel4.data=MFW_CFLAG_SET; | |
3145 cphs_rel4_set_divert_status( call_forwarding_status_rel4.voice, | |
3146 call_forwarding_status_rel4.fax, | |
3147 call_forwarding_status_rel4.data, | |
3148 call_forwarding_status_rel4.voice_dialling_number); | |
3149 } | |
3150 } | |
3151 #endif | |
3152 break; | |
3153 case (CFFax): | |
3154 #ifdef FF_CPHS_REL4 | |
3155 if(!isCFISFilePresent() ) | |
3156 { | |
3157 #endif | |
3158 if(GetCphsDivertStatus(MFW_SERV_FAX)!=MFW_CFLAG_SET) | |
3159 cphs_set_divert_status(MFW_CFLAG_NotPresent,MFW_CFLAG_NotPresent,MFW_CFLAG_SET,MFW_CFLAG_NotPresent); | |
3160 /*a0393213 cphs rel4*/ | |
3161 #ifdef FF_CPHS_REL4 | |
3162 } | |
3163 else | |
3164 { | |
3165 if(call_forwarding_status_rel4.fax!= MFW_CFLAG_SET) | |
3166 { | |
3167 call_forwarding_status_rel4.fax=MFW_CFLAG_SET; | |
3168 cphs_rel4_set_divert_status( call_forwarding_status_rel4.voice, | |
3169 call_forwarding_status_rel4.fax, | |
3170 call_forwarding_status_rel4.data, | |
3171 call_forwarding_status_rel4.voice_dialling_number); | |
3172 } | |
3173 } | |
3174 #endif | |
3175 break; | |
3176 case (CFAll): | |
3177 /*a0393213 cphs rel4*/ | |
3178 #ifdef FF_CPHS_REL4 | |
3179 if(!isCFISFilePresent() ) | |
3180 { | |
3181 #endif | |
3182 if (GetAlsLine() == MFW_SERV_LINE2) | |
3183 { | |
3184 if(GetCphsDivertStatus(MFW_SERV_LINE2)!=MFW_CFLAG_SET || | |
3185 GetCphsDivertStatus(MFW_SERV_DATA)!=MFW_CFLAG_SET || | |
3186 GetCphsDivertStatus(MFW_SERV_FAX)!=MFW_CFLAG_SET) | |
3187 cphs_set_divert_status(MFW_CFLAG_NotPresent,MFW_CFLAG_SET,MFW_CFLAG_SET,MFW_CFLAG_SET); | |
3188 } | |
3189 else | |
3190 { | |
3191 if(GetCphsDivertStatus(MFW_SERV_LINE1)!=MFW_CFLAG_SET || | |
3192 GetCphsDivertStatus(MFW_SERV_DATA)!=MFW_CFLAG_SET || | |
3193 GetCphsDivertStatus(MFW_SERV_FAX)!=MFW_CFLAG_SET) | |
3194 cphs_set_divert_status(MFW_CFLAG_SET,MFW_CFLAG_NotPresent,MFW_CFLAG_SET,MFW_CFLAG_SET); | |
3195 } | |
3196 /*a0393213 cphs rel4*/ | |
3197 #ifdef FF_CPHS_REL4 | |
3198 } | |
3199 else | |
3200 { | |
3201 if(call_forwarding_status_rel4.voice!= MFW_CFLAG_SET || | |
3202 call_forwarding_status_rel4.fax!= MFW_CFLAG_SET || | |
3203 call_forwarding_status_rel4.data!= MFW_CFLAG_SET || | |
3204 memcmp(call_forwarding_status_rel4.voice_dialling_number,ss_data.edt_buf_number,PHB_MAX_LEN)!=0) | |
3205 { | |
3206 call_forwarding_status_rel4.voice= MFW_CFLAG_SET; | |
3207 call_forwarding_status_rel4.fax= MFW_CFLAG_SET; | |
3208 call_forwarding_status_rel4.data= MFW_CFLAG_SET; | |
3209 memcpy(call_forwarding_status_rel4.voice_dialling_number,ss_data.edt_buf_number,PHB_MAX_LEN); | |
3210 | |
3211 cphs_rel4_set_divert_status( call_forwarding_status_rel4.voice, | |
3212 call_forwarding_status_rel4.fax, | |
3213 call_forwarding_status_rel4.data, | |
3214 call_forwarding_status_rel4.voice_dialling_number); | |
3215 } | |
3216 } | |
3217 #endif | |
3218 break; | |
3219 } | |
3220 | |
3221 #else | |
3222 iconsSetState(iconIdCallFor); | |
3223 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) | |
3224 // Storing the Current state of CF in Flash | |
3225 FFS_flashData.CFState=TRUE; | |
3226 flash_write(); | |
3227 #endif | |
3228 } | |
3229 | |
3230 /* Activate the CFU icon */ | |
3231 /* break; */ /***** NO BREAK ******/ | |
3232 case MFW_SS_MO_conFORWARD: /* Conditional CF active */ | |
3233 TxtId1 = TxtForward; | |
3234 TxtId2 = TxtActivated; | |
3235 break; | |
3236 | |
3237 case MFW_SS_MT_FORWARDED: /* incoming call fowarded */ | |
3238 //x0pleela 27 Feb, 2007 ER: OMAPS00113891 | |
3239 TRACE_EVENT("showSSNotify: MFW_SS_MT_FORWARDED"); | |
3240 | |
3241 //set TextId of call data accordingly | |
3242 #ifdef MMI_TTY_ENABLED | |
3243 if (call_tty_get()) | |
3244 call_data.inc_call_data.TextId = TxtFwdIncomingTTYCall; | |
3245 else | |
3246 call_data.inc_call_data.TextId = TxtFwdIncomingCall; | |
3247 #else /* MMI_TTY_ENABLED */ | |
3248 call_data.inc_call_data.TextId = TxtFwdIncomingCall; | |
3249 #endif /* MMI_TTY_ENABLED */ | |
3250 | |
3251 //if incoming call window is not NULL, then destroy the same | |
3252 if( call_data.win_incoming != NULL ) | |
3253 dialog_info_destroy(call_data.win_incoming); | |
3254 | |
3255 //call the incoming call dialog with new strings based on call forward condition | |
3256 call_data.win_incoming = info_dialog (call_data.win, &call_data.inc_call_data); | |
3257 | |
3258 break; | |
3259 | |
3260 //x0pleela 22 Feb, 2007 ER: OMAPS00113891 | |
3261 //Message displayed to the subscriber who has forwarded the call | |
3262 case MFW_SS_MT_CALL_FORWARDED: /* incoming call fowarded */ | |
3263 TxtId1 = TxtIncomingCall; | |
3264 TxtId2 = TxtForwarded; | |
3265 break; | |
3266 | |
3267 case MFW_SS_MO_FORWARDED: /* our call is being forwarded */ | |
3268 TxtId1 = TxtSoftCall; | |
3269 TxtId2 = TxtForwarded; | |
3270 | |
3271 break; | |
3272 | |
3273 case MFW_SS_MO_WAITING: /* outgoing call is waiting signal received */ | |
3274 TxtId1 = TxtSoftCall; | |
3275 TxtId2 = TxtWaiting; | |
3276 break; | |
3277 | |
3278 case MFW_SS_MO_moBARRED: /* outgoing calls barred */ | |
3279 TxtId1 = TxtOutgoingCalls; | |
3280 TxtId2 = TxtBarred; | |
3281 break; | |
3282 | |
3283 case MFW_SS_MO_mtBARRED: /* incoming calls barred */ | |
3284 TxtId1 = TxtIncomingCall; | |
3285 TxtId2 = TxtBarred; | |
3286 break; | |
3287 | |
3288 case MFW_SS_MO_DEFLECTED: /* incoming call diverted */ | |
3289 TxtId1 = TxtIncomingCall; | |
3290 TxtId2 = TxtCallDivert; | |
3291 break; | |
3292 | |
3293 default: | |
3294 break; | |
3295 } | |
3296 | |
3297 if (TxtId1 != TxtNull ) | |
3298 { | |
3299 | |
3300 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull, TxtId1, TxtId2, COLOUR_STATUS); | |
3301 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, THREE_SECS, KEY_CLEAR| KEY_LEFT ); | |
3302 display_info.Identifier = E_SS_NOTIFY; | |
3303 | |
3304 /* | |
3305 * Call Info Screen | |
3306 */ | |
3307 | |
3308 ss_data.info_win = info_dialog (ss_data.win, &display_info); | |
3309 } | |
3310 } | |
3311 | |
3312 /******************************************************************************* | |
3313 | |
3314 $Function: srv_display_status | |
3315 | |
3316 $Description: Indicate a sensefull response to the user if only the . | |
3317 | |
3318 $Returns: | |
3319 | |
3320 $Arguments: | |
3321 | |
3322 *******************************************************************************/ | |
3323 | |
3324 | |
3325 static void srv_display_status (UBYTE ss_status) | |
3326 { | |
3327 T_DISPLAY_DATA display_info; | |
3328 USHORT TxtId2; | |
3329 TRACE_FUNCTION("srv_display_status()"); | |
3330 | |
3331 | |
3332 //GW Swapped text strings over | |
3333 if (ss_status & SS_STAT_ACTIVE) | |
3334 TxtId2 = TxtActivated; | |
3335 /* Marcus: Issue 1652: 03/02/2003: Removed NDH 10/06/03 */ | |
3336 else | |
3337 TxtId2 = TxtDeActivated; | |
3338 | |
3339 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull, TxtNull, TxtId2, COLOUR_STATUS); | |
3340 //Jun 04,2004 CRR:13601 xpradipg - SASKEN | |
3341 //Timer value changed from FOREVER to FIVE_SECS | |
3342 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, FIVE_SECS, KEY_CLEAR| KEY_LEFT ); | |
3343 display_info.Identifier = E_SS_CB_CNF; // can be used also for CF and CW | |
3344 | |
3345 /* | |
3346 * Call Info Screen | |
3347 */ | |
3348 | |
3349 ss_data.info_win = info_dialog (ss_data.win, &display_info); | |
3350 } | |
3351 | |
3352 /******************************************************************************* | |
3353 | |
3354 $Function: ysrv_empty_list_result | |
3355 | |
3356 $Description: Indicate a sensefull response to the user if an | |
3357 activation / deactivation or interrogation leads to an | |
3358 empty list. | |
3359 | |
3360 $Returns: | |
3361 | |
3362 $Arguments: | |
3363 | |
3364 *******************************************************************************/ | |
3365 | |
3366 | |
3367 static void srv_empty_list_result (UBYTE ss_category, USHORT event, UBYTE ss_status, UBYTE ss_code) /* Marcus: Issue 1652: 03/02/2002 */ | |
3368 { | |
3369 T_DISPLAY_DATA display_info; | |
3370 USHORT TxtId1; | |
3371 USHORT TxtId2 = TxtNull; | |
3372 TRACE_FUNCTION("srv_empty_list_result"); | |
3373 | |
3374 switch (event) | |
3375 { | |
3376 case E_SS_CB_CNF: | |
3377 TxtId1 = TxtCallBarringAll; | |
3378 break; | |
3379 | |
3380 case E_SS_CW_CNF: | |
3381 TxtId1 = TxtCallWaiting; | |
3382 break; | |
3383 | |
3384 case E_SS_CF_CNF: | |
3385 TxtId1 = TxtCallDivert; | |
3386 break; | |
3387 | |
3388 default: | |
3389 TxtId1 = TxtNull; | |
3390 } | |
3391 | |
3392 /* Marcus: Issue 1652: 03/02/2002: Start */ | |
3393 TRACE_EVENT_P3("ss_category %d, event %d, ss_status %d", ss_category, event, ss_status); | |
3394 switch (ss_category) | |
3395 { | |
3396 case SS_ACTIVATION: | |
3397 case SS_REGISTRATION: | |
3398 TRACE_FUNCTION ("ACTIVATED !"); | |
3399 TxtId2 = TxtActivated; | |
3400 break; | |
3401 /* Marcus: Issue 1588: 23/01/2003: Start */ | |
3402 case SS_INTERROGATION: | |
3403 if ((event == E_SS_CW_CNF) || (event == E_SS_CF_CNF)) | |
3404 { | |
3405 if (ss_status & SS_STAT_ACTIVE) | |
3406 { | |
3407 TRACE_EVENT ("INTERROGATION:ACTIVATED !"); | |
3408 TxtId2 = TxtActivated; | |
3409 } | |
3410 else /* Marcus: Issue 1651: 30/01/2003: Removed NDH 10/06/03 */ | |
3411 { | |
3412 TRACE_EVENT ("INTERROGATION:DEACTIVATED !"); | |
3413 TxtId2 = TxtDeActivated; | |
3414 } | |
3415 } | |
3416 else | |
3417 { | |
3418 TRACE_EVENT ("DEACTIVATED !"); | |
3419 TxtId2 = TxtDeActivated; | |
3420 } | |
3421 break; | |
3422 | |
3423 case SS_ERASURE: | |
3424 case SS_DEACTIVATION: | |
3425 TRACE_FUNCTION ("DEACTIVATED !"); | |
3426 TxtId2 = TxtDeActivated; | |
3427 break; | |
3428 default: | |
3429 TxtId2 = TxtNull; | |
3430 break; | |
3431 } | |
3432 /* Marcus: Issue 1652: 03/02/2002: End */ | |
3433 | |
3434 if (TxtId2 != TxtNull ) | |
3435 { | |
3436 /*CQ10690 - API - 23/06/03 - Set the icon state to show on this return */ | |
3437 if ( (TxtId2 == TxtActivated) && | |
3438 ( (ss_code == SS_CF_CFU) || (ss_code == SS_CF_ALL) ) ) | |
3439 { | |
3440 iconsSetState(iconIdCallFor); | |
3441 // Jun 23, 2004 REF: CRR MMI-SPR-13599 Rashmi C N(Sasken) | |
3442 // Storing the Current state of CF in Flash | |
3443 FFS_flashData.CFState=TRUE; | |
3444 flash_write(); | |
3445 } | |
3446 /*CQ10690 - END*/ | |
3447 if(event==E_SS_CF_CNF) | |
3448 { | |
3449 // Jun 10, 2004 REF: CRR MMI-SPR-13614 Rashmi C N(Sasken) | |
3450 // We are now passing the type of CF as the first stringID for the dialog info screen | |
3451 // serviceGetType(ss_Code) this function would return the string id for the ss_code being passed | |
3452 | |
3453 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull, serviceGetType((T_MFW_SS_CODES)ss_code), TxtId2, COLOUR_STATUS); | |
3454 } | |
3455 else | |
3456 { | |
3457 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull, TxtId1, TxtId2, COLOUR_STATUS); | |
3458 } | |
3459 //Jun 04,2004 CRR:13601 xpradipg - SASKEN | |
3460 //Timer value changed from FOREVER to FIVE_SECS | |
3461 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, FIVE_SECS, KEY_CLEAR| KEY_LEFT ); | |
3462 display_info.Identifier = E_SS_CB_CNF; // can be used also for CF and CW | |
3463 | |
3464 /* | |
3465 * Call Info Screen | |
3466 */ | |
3467 | |
3468 ss_data.info_win = info_dialog (ss_data.win, &display_info); | |
3469 } | |
3470 } | |
3471 | |
3472 | |
3473 /******************************************************************************* | |
3474 | |
3475 $Function: showCWState | |
3476 | |
3477 $Description: display CW state | |
3478 | |
3479 $Returns: | |
3480 | |
3481 $Arguments: | |
3482 | |
3483 *******************************************************************************/ | |
3484 | |
3485 | |
3486 static void showCWStatus (T_MFW_HND win , T_ss * data) | |
3487 | |
3488 { | |
3489 T_DISPLAY_DATA display_info; | |
3490 T_ss_feature_cw_data * pFeature; | |
3491 | |
3492 TRACE_FUNCTION("showCWStatus"); | |
3493 | |
3494 //MC got rid of dodgy pointer arithmetic | |
3495 pFeature = &data->mfw_ss_cw->ss[data->current_feature]; | |
3496 | |
3497 if (data->max_feature == 1) | |
3498 { | |
3499 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull, pFeature->service, data->mfw_ss_cw->status, COLOUR_STATUS); | |
3500 //Jun 04,2004 CRR:13601 xpradipg - SASKEN | |
3501 //Timer value changed from FOREVER to FIVE_SECS | |
3502 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, FIVE_SECS, KEY_CLEAR| KEY_LEFT); | |
3503 } | |
3504 else | |
3505 { | |
3506 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtSoftNext, pFeature->service, data->mfw_ss_cw->status, COLOUR_STATUS); | |
3507 //Jun 04,2004 CRR:13601 xpradipg - SASKEN | |
3508 //Timer value changed from FOREVER to FIVE_SECS | |
3509 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, FIVE_SECS, KEY_CLEAR| KEY_LEFT | KEY_RIGHT ); | |
3510 } | |
3511 | |
3512 display_info.Identifier = E_SS_CW_CNF; | |
3513 | |
3514 /* | |
3515 * Call Info Screen | |
3516 */ | |
3517 | |
3518 ss_data.info_win = info_dialog (ss_data.win, &display_info); | |
3519 | |
3520 if (ss_data.info_win EQ NULL) | |
3521 { | |
3522 TRACE_FUNCTION("NOT ENOUGH RESOURCES TO CREATE EXT INFO DIALOG"); | |
3523 } | |
3524 } | |
3525 | |
3526 /******************************************************************************* | |
3527 | |
3528 $Function: showCLIStatus | |
3529 | |
3530 $Description: | |
3531 | |
3532 $Returns: | |
3533 | |
3534 $Arguments: | |
3535 | |
3536 *******************************************************************************/ | |
3537 | |
3538 | |
3539 static void showCLIStatus(T_MFW_HND win, T_MFW_SS_PARA * ss_cnf) | |
3540 { | |
3541 | |
3542 T_DISPLAY_DATA display_info; | |
3543 | |
3544 TRACE_FUNCTION("showCLIStatus()"); | |
3545 | |
3546 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull, serviceGetType(ss_cnf->cli_cnf.ss_code), TxtNull , COLOUR_STATUS); | |
3547 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, FOREVER, KEY_CLEAR | KEY_LEFT ); | |
3548 display_info.Identifier = ServicesCheckCLI_OK; | |
3549 | |
3550 if (ss_cnf->cli_cnf.ss_status == SS_STAT_UNKNOWN) | |
3551 { | |
3552 // Unknown status. By defaut say that the id is sent | |
3553 display_info.TextId2 = TxtActivated; | |
3554 } | |
3555 else if (ss_cnf->cli_cnf.ss_status & SS_STAT_ACTIVE) | |
3556 { | |
3557 switch (ss_cnf->cli_cnf.ss_clir_option) | |
3558 { | |
3559 // By defaut the caller id is not sent | |
3560 case MFW_CL_TEMP_DEF_REST: | |
3561 switch (CFAction) | |
3562 { | |
3563 // ActivateCLIR, so deactivate the sending of caller id | |
3564 case CFActivate: | |
3565 // By defaut the caller id is not sent | |
3566 display_info.TextId2 = TxtActivated; | |
3567 // No CLIR suppress or invoke | |
3568 cm_mo_prefix(0x04); | |
3569 // Apr 22, 2004 REF: CRR MMI-SPR-16873 Rashmi C N(Sasken) | |
3570 // Maintaing the CLIR status in the flash. | |
3571 FFS_flashData.CLIR=TRUE; | |
3572 flash_write(); | |
3573 break; | |
3574 // Deactivate CLIR, so activate the sending of caller id | |
3575 case CFDeactivate: | |
3576 // By defaut the caller id is not sent | |
3577 display_info.TextId2 = TxtDeActivated; | |
3578 // CLIR suppress needed | |
3579 cm_mo_prefix(0x08); | |
3580 // Apr 22, 2004 REF: CRR MMI-SPR-16873 Rashmi C N(Sasken) | |
3581 // Maintaing the CLIR status in the flash. | |
3582 FFS_flashData.CLIR=FALSE; | |
3583 flash_write(); | |
3584 break; | |
3585 case CFCheck: | |
3586 default: | |
3587 /* // Check if CLIR suppress is activated: caller id sent | |
3588 if ((cm_mo_prefix(0) & 0x0c) == 0x08) | |
3589 display_info.TextId2 = TxtDeActivated; | |
3590 // By defaut the caller id is not sent | |
3591 else | |
3592 display_info.TextId2 = TxtActivated;*/ | |
3593 // Check if CLIR suppress is activated: caller id sent | |
3594 // Apr 22, 2004 REF: CRR MMI-SPR-16873 Rashmi C N(Sasken) | |
3595 // Using the CLIR status maintained in the flash, when the status is checked | |
3596 if (!FFS_flashData.CLIR) | |
3597 { | |
3598 display_info.TextId2 = TxtDeActivated; | |
3599 } | |
3600 // By defaut the caller id is not sent | |
3601 else | |
3602 { | |
3603 display_info.TextId2 = TxtActivated; | |
3604 } | |
3605 | |
3606 break; | |
3607 } | |
3608 break; | |
3609 // By defaut the caller id is sent | |
3610 case MFW_CL_TEMP_DEF_ALLOWED: | |
3611 switch (CFAction) | |
3612 { | |
3613 // ActivateCLIR, so deactivate the sending of caller id | |
3614 case CFActivate: | |
3615 // By defaut the caller id is sent | |
3616 display_info.TextId2 =TxtActivated; | |
3617 // CLIR invoke needed | |
3618 cm_mo_prefix(0x0c); | |
3619 // Apr 22, 2004 REF: CRR MMI-SPR-16873 Rashmi C N(Sasken) | |
3620 // Maintaing the CLIR status in the flash. | |
3621 FFS_flashData.CLIR=TRUE; | |
3622 flash_write(); | |
3623 break; | |
3624 // Deactivate CLIR, so activate the sending of caller id | |
3625 case CFDeactivate: | |
3626 // By defaut the caller id is sent | |
3627 display_info.TextId2 = TxtDeActivated; | |
3628 // No CLIR suppress or invoke | |
3629 cm_mo_prefix(0x04); | |
3630 // Apr 22, 2004 REF: CRR MMI-SPR-16873 Rashmi C N(Sasken) | |
3631 // Maintaing the CLIR status in the flash. | |
3632 FFS_flashData.CLIR=FALSE; | |
3633 flash_write(); | |
3634 break; | |
3635 case CFCheck: | |
3636 default: | |
3637 /* // Check if CLIR invoke is activated: caller id not sent | |
3638 if ((cm_mo_prefix(0) & 0x0c) == 0x0c) | |
3639 display_info.TextId2 = TxtActivated; | |
3640 // By defaut the caller id is sent | |
3641 else | |
3642 display_info.TextId2 = TxtDeActivated;*/ | |
3643 // Check if CLIR invoke is activated: caller id not sent | |
3644 // Apr 22, 2004 REF: CRR MMI-SPR-16873 Rashmi C N(Sasken) | |
3645 // Using the CLIR status maintained in the flash, when the status is checked | |
3646 if (FFS_flashData.CLIR) | |
3647 { | |
3648 display_info.TextId2 = TxtActivated; | |
3649 } | |
3650 // By defaut the caller id is sent | |
3651 else | |
3652 { | |
3653 display_info.TextId2 = TxtDeActivated; | |
3654 } | |
3655 | |
3656 } | |
3657 break; | |
3658 case MFW_CL_PERM: | |
3659 // No CLIR suppress or invoke | |
3660 cm_mo_prefix(0x04); | |
3661 // No break | |
3662 case MFW_CL_UNKNOWN: | |
3663 default: | |
3664 // The CLIR is active and permanent the caller id is not sent | |
3665 // Apr 22, 2004 REF: CRR MMI-SPR-16873 Rashmi C N(Sasken) | |
3666 // Maintaing the CLIR status in the flash. | |
3667 FFS_flashData.CLIR=TRUE; | |
3668 flash_write(); | |
3669 display_info.TextId2 = TxtActivated; | |
3670 break; | |
3671 } | |
3672 } | |
3673 // CLIR service is not activated: The caller id is sent | |
3674 else | |
3675 { | |
3676 // Dec 07, 2005 REF: OMAPS00050087 x0039928 | |
3677 // Fix: String "Not Activated" is displayed if the network doesn't permit CLIR | |
3678 switch(CFAction) | |
3679 { | |
3680 case CFActivate: | |
3681 display_info.TextId2 = TxtNotActivated; | |
3682 break; | |
3683 case CFDeactivate: | |
3684 case CFCheck: | |
3685 default: | |
3686 display_info.TextId2 = TxtDeActivated; | |
3687 break; | |
3688 } | |
3689 // No CLIR suppress or invoke | |
3690 // Apr 22, 2004 REF: CRR MMI-SPR-16873 Rashmi C N(Sasken) | |
3691 // Maintaing the CLIR status in the flash. | |
3692 FFS_flashData.CLIR=FALSE; | |
3693 flash_write(); | |
3694 cm_mo_prefix(0x04); | |
3695 } | |
3696 | |
3697 // Call Info Screen | |
3698 ss_data.info_win = info_dialog (ss_data.win, &display_info); | |
3699 | |
3700 } | |
3701 | |
3702 | |
3703 #ifndef FF_MMI_ATC_MIGRATION /* x0039928 -Lint warning fix */ | |
3704 /******************************************************************************* | |
3705 | |
3706 $Function: showIMEI2 | |
3707 | |
3708 $Description: | |
3709 | |
3710 $Returns: | |
3711 | |
3712 $Arguments: | |
3713 | |
3714 *******************************************************************************/ | |
3715 | |
3716 static void showIMEI2 (T_MFW_HND win, T_MFW_SS_PARA * ss_cnf) | |
3717 { | |
3718 T_DISPLAY_DATA display_info; | |
3719 // July 09, 2005 REF : MMI-22565 - a0876501 | |
3720 // Increased the IMEI_LEN from 15 to 17 for displaying the Cd byte & SW version. | |
3721 #ifndef FF_MMI_ATC_MIGRATION | |
3722 #define IMEI_LEN 17 /* IMEI + check digit = 15, IMEI + SW version = 16, IMEI + check digit + SW version = 17*/ | |
3723 #endif | |
3724 static char imei_array[IMEI_LEN+1]; | |
3725 //GW IMEI number is 26 chars long! | |
3726 memset(imei_array,0x00,IMEI_LEN+1); | |
3727 memcpy(imei_array, ss_cnf->imei_info.imei_number, IMEI_LEN); | |
3728 | |
3729 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull,TxtIMEI, TxtNull , COLOUR_STATUS); | |
3730 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, FOREVER, KEY_CLEAR | KEY_LEFT ); | |
3731 display_info.TextString2 = imei_array; | |
3732 /* | |
3733 * Call Info Screen | |
3734 */ | |
3735 ss_data.info_win = info_dialog (ss_data.win, &display_info); | |
3736 | |
3737 } | |
3738 #endif | |
3739 | |
3740 /******************************************************************************* | |
3741 | |
3742 $Function: showUSSDInfo | |
3743 | |
3744 $Description: this is used for both USSD types (confirm and request). | |
3745 The USSD request is keep going after "showUSSDInfo" | |
3746 function and open the editor to enter the string. | |
3747 | |
3748 $Returns: | |
3749 | |
3750 $Arguments: | |
3751 | |
3752 *******************************************************************************/ | |
3753 | |
3754 | |
3755 | |
3756 static void showUSSDInfo (T_MFW_HND win, USHORT ident, T_MFW_SS_PARA * ss_cnf, USHORT sk1, USHORT sk2) | |
3757 { | |
3758 #ifdef NEW_EDITOR | |
3759 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ | |
3760 #else | |
3761 T_EDITOR_DATA editor_data; | |
3762 #endif | |
3763 | |
3764 TRACE_FUNCTION("showUSSDInfo"); | |
3765 | |
3766 /* keep the dcs; need it later for sending */ | |
3767 ss_data.dcs = ss_cnf->ussd_info.dcs; | |
3768 | |
3769 /* SPR#1428 - SH - New Editor changes */ | |
3770 | |
3771 #ifdef NEW_EDITOR | |
3772 AUI_edit_SetDefault(&editor_data); | |
3773 AUI_edit_SetDisplay(&editor_data, ZONE_FULL_SK_TITLE, COLOUR_EDITOR_XX, EDITOR_FONT); | |
3774 AUI_edit_SetMode(&editor_data, ED_MODE_READONLY, ED_CURSOR_NONE); | |
3775 | |
3776 //x0pleela 29 Aug, 2006 DR: OMAPS00083503 | |
3777 //Dynamically changing the dcs value in editor settings | |
3778 if( ss_getAlphabetCb ( ss_data.dcs EQ SS_ALPHA_16_Bit) ) | |
3779 AUI_edit_SetBuffer(&editor_data, ATB_DCS_UNICODE, (UBYTE *)ss_cnf->ussd_info.ussd, MAX_USSD_LEN); | |
3780 else | |
3781 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)ss_cnf->ussd_info.ussd, MAX_USSD_LEN); | |
3782 if (ident EQ ServicesUSSD_REQ_OK) | |
3783 { | |
3784 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtSoftBack, TxtSsMsg, NULL); | |
3785 } | |
3786 else | |
3787 { | |
3788 AUI_edit_SetTextStr(&editor_data, TxtNull, TxtSoftBack, TxtSsMsg, NULL); | |
3789 } | |
3790 AUI_edit_SetEvents(&editor_data, ident, TRUE, FOREVER, (T_AUI_EDIT_CB)services_info_cb); | |
3791 | |
3792 AUI_edit_Start(ss_data.win, &editor_data); /* start the editor */ | |
3793 #else /* NEW_EDITOR */ | |
3794 editor_data.editor_attr.win.px = 6; | |
3795 editor_data.editor_attr.win.py = 12; | |
3796 editor_data.editor_attr.win.sx = 80; | |
3797 editor_data.editor_attr.win.sy = 20; | |
3798 editor_data.editor_attr.edtCol = COLOUR_EDITOR_XX, | |
3799 editor_data.editor_attr.font = 0; | |
3800 editor_data.editor_attr.mode = edtCurNone; | |
3801 editor_data.editor_attr.controls = 0; | |
3802 | |
3803 editor_data.hide = FALSE; | |
3804 editor_data.editor_attr.text = (char*)ss_cnf->ussd_info.ussd; | |
3805 editor_data.editor_attr.size = sizeof(ss_cnf->ussd_info.ussd); | |
3806 | |
3807 if (ident EQ ServicesUSSD_REQ_OK) | |
3808 { | |
3809 editor_data.LeftSoftKey = TxtSoftOK; | |
3810 editor_data.RightSoftKey = TxtSoftBack; | |
3811 } | |
3812 else | |
3813 { | |
3814 editor_data.LeftSoftKey = TxtNull; | |
3815 editor_data.RightSoftKey = TxtSoftBack; | |
3816 } | |
3817 | |
3818 editor_data.AlternateLeftSoftKey = TxtNull; | |
3819 editor_data.TextString = TxtNull; | |
3820 editor_data.TextId = TxtSsMsg; | |
3821 editor_data.Identifier = ident; | |
3822 editor_data.mode = READ_ONLY_MODE; | |
3823 editor_data.timeout = FOREVER; | |
3824 editor_data.min_enter = 1; | |
3825 editor_data.Callback = (T_EDIT_CB)services_info_cb; | |
3826 editor_data.destroyEditor = TRUE; | |
3827 | |
3828 /* create the dialog handler */ | |
3829 editor_start(ss_data.win, &editor_data); /* start the editor */ | |
3830 #endif /* NEW_EDITOR */ | |
3831 | |
3832 } | |
3833 | |
3834 | |
3835 /******************************************************************************* | |
3836 | |
3837 $Function: showUSSDREQ | |
3838 | |
3839 $Description: show USSD info from Request, and then allow user to enter a response. | |
3840 | |
3841 $Returns: | |
3842 | |
3843 $Arguments: | |
3844 | |
3845 *******************************************************************************/ | |
3846 | |
3847 | |
3848 static void showUSSDREQ (T_MFW_HND win, T_MFW_SS_PARA * ss_cnf) | |
3849 { | |
3850 TRACE_FUNCTION("showUSSDREQ"); | |
3851 showUSSDInfo(win, ServicesUSSD_REQ_OK, ss_cnf, TxtSoftOK, TxtSoftBack); | |
3852 | |
3853 } | |
3854 | |
3855 | |
3856 | |
3857 /******************************************************************************* | |
3858 | |
3859 $Function: showUSSDCNF | |
3860 | |
3861 $Description: display USSD message | |
3862 | |
3863 $Returns: | |
3864 | |
3865 $Arguments: | |
3866 | |
3867 *******************************************************************************/ | |
3868 | |
3869 | |
3870 static void showUSSDCNF (T_MFW_HND win, T_MFW_SS_PARA * ss_cnf) | |
3871 { | |
3872 | |
3873 T_DISPLAY_DATA display_info; | |
3874 int nPixels = 0; | |
3875 int nchar = 0; | |
3876 | |
3877 //Feb 17, 2005 REF : CRR 17657 x0012850 Divya.P.V | |
3878 //Bug : Unable to compose a one or two digit number | |
3879 //Fix : This bug is reproducible when a very long message is sent by the service provider when an invalid one or two digit number is dialled. | |
3880 //The read only editor with the service provider message that comes up when a one or two digit is dialled | |
3881 //was not handled properly. So altered the editor handling to cater for the long message. | |
3882 T_MFW_WIN *win_data; | |
3883 T_ss *data = NULL; | |
3884 T_AUI_EDITOR_DATA display_editor_info; | |
3885 | |
3886 TRACE_FUNCTION("showUSSDCNF"); | |
3887 /* API - 09-07-03 - CQ10728 - Add this check to use either the editor or the bubble depending | |
3888 on the size of the returned string */ | |
3889 /* API - 27-08-03 - CQ10728 - Update, calculate the length of the string in number of pixels */ | |
3890 | |
3891 //Feb 17, 2005 REF : CRR 17657 x0012850 Divya.P.V | |
3892 //Bug : Unable to compose a one or two digit number | |
3893 //Fix : This bug is reproducible when a very long message is sent by the service provider when an invalid one or two digit number is dialled. | |
3894 //The read only editor with the service provider message that comes up when a one or two digit is dialled | |
3895 //was not handled properly. So altered the editor handling to cater for the long message. | |
3896 if(win) | |
3897 { | |
3898 win_data = ((T_MFW_HDR *)win)->data; | |
3899 if(win_data) | |
3900 data = (T_ss * )win_data->user; | |
3901 } | |
3902 | |
3903 nchar = strlen((char *)ss_cnf->ussd_info.ussd); | |
3904 nPixels = dspl_GetTextExtent( (char *)ss_cnf->ussd_info.ussd, nchar); | |
3905 /* API - 27-08-03 - CQ10728 - END */ | |
3906 | |
3907 if (nPixels >= SCREEN_SIZE_X && (data != NULL)) /* x0039928 - Lint warning removal */ | |
3908 { | |
3909 //Feb 17, 2005 REF : CRR 17657 x0012850 Divya.P.V | |
3910 //Bug : Unable to compose a one or two digit number | |
3911 //Fix : This bug is reproducible when a very long message is sent by the service provider when an invalid one or two digit number is dialled. | |
3912 //The read only editor with the service provider message that comes up when a one or two digit is dialled | |
3913 //was not handled properly. So altered the editor handling to cater for the long message. | |
3914 AUI_edit_SetDefault(&display_editor_info); | |
3915 AUI_edit_SetMode(&display_editor_info, ED_MODE_READONLY, ED_CURSOR_UNDERLINE); | |
3916 | |
3917 //x0pleela 29 Aug, 2006 DR: OMAPS00083503 | |
3918 //Dynamically changing the dcs value in editor settings | |
3919 if( ss_getAlphabetCb ( (UBYTE)ss_cnf->ussd_info.dcs EQ SS_ALPHA_16_Bit)) | |
3920 AUI_edit_SetBuffer(&display_editor_info, ATB_DCS_UNICODE, (UBYTE*)ss_cnf->ussd_info.ussd, (USHORT)ss_cnf->ussd_info.len); | |
3921 else | |
3922 AUI_edit_SetBuffer(&display_editor_info, ATB_DCS_ASCII, (UBYTE*)ss_cnf->ussd_info.ussd, (USHORT)ss_cnf->ussd_info.len); | |
3923 | |
3924 AUI_edit_SetTextStr(&display_editor_info, TxtNull, TxtSoftBack,TxtNull,NULL); | |
3925 AUI_edit_SetEvents(&display_editor_info, 0, FALSE, FOREVER, (T_AUI_EDIT_CB)services_info_cb); | |
3926 display_editor_info.Identifier = ServicesUSSD_CNF_OK; | |
3927 data->info_win = AUI_edit_Start(data->win, &display_editor_info); | |
3928 } | |
3929 else | |
3930 { | |
3931 if (strlen((char *)ss_cnf->ussd_info.ussd) == 0) | |
3932 { | |
3933 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull, TxtCommand, TxtCompleted, COLOUR_STATUS); | |
3934 } | |
3935 else | |
3936 { | |
3937 dlg_initDisplayData_TextStr(&display_info, TxtSoftOK, TxtNull, (char *)ss_cnf->ussd_info.ussd, NULL, COLOUR_STATUS); | |
3938 } | |
3939 | |
3940 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, FOREVER, KEY_HUP| KEY_LEFT); | |
3941 display_info.Identifier = ServicesUSSD_CNF_OK; | |
3942 | |
3943 /* | |
3944 * Display Dialog Info Screen | |
3945 */ | |
3946 | |
3947 ss_data.info_win = info_dialog (ss_data.win, &display_info); | |
3948 } | |
3949 /*API - 09-07-03 CQ10728- END*/ | |
3950 } | |
3951 | |
3952 | |
3953 /******************************************************************************* | |
3954 | |
3955 $Function: sendUSSD | |
3956 | |
3957 $Description: Send USSD message | |
3958 | |
3959 $Returns: | |
3960 | |
3961 $Arguments: | |
3962 | |
3963 *******************************************************************************/ | |
3964 | |
3965 static void sendUSSD (T_MFW_SS_PARA *ussd_senddata) | |
3966 { | |
3967 | |
3968 // unsigned int tLen = ussd_senddata->ussd_info.len; // RAVI | |
3969 | |
3970 ss_cnf = ussd_senddata; | |
3971 | |
3972 if (ss_send_ussd( (T_MFW_SS_USSD *) ss_cnf ) == MFW_SS_FAIL) | |
3973 { | |
3974 /* ussd data is wrong */ | |
3975 showFailed( ss_data.win ); | |
3976 } | |
3977 else | |
3978 if (servicesState == ServicesUSSDSendEdit) | |
3979 { | |
3980 servicesExec(ServicesUSSDSendEdit_Ok, 0); | |
3981 } | |
3982 else | |
3983 { | |
3984 servicesExec(ServicesUSSDEnter_Send, 0); | |
3985 } | |
3986 } | |
3987 | |
3988 | |
3989 /******************************************************************************* | |
3990 | |
3991 $Function: showCFStatus | |
3992 | |
3993 $Description: display CFU state | |
3994 | |
3995 $Returns: | |
3996 | |
3997 $Arguments: | |
3998 | |
3999 *******************************************************************************/ | |
4000 | |
4001 | |
4002 static void showCFStatus (T_MFW_HND win , T_ss * data) | |
4003 { | |
4004 T_DISPLAY_DATA display_info; | |
4005 T_ss_feature_cf_data * pFeature; | |
4006 static char str[50]; | |
4007 | |
4008 | |
4009 TRACE_FUNCTION("showCFStatus"); | |
4010 | |
4011 //MC got rid of dodgy pointer arithmetic | |
4012 pFeature = &data->mfw_ss_cf->ss[data->current_feature]; | |
4013 | |
4014 if (data->max_feature == 1) | |
4015 { | |
4016 // Jun 10, 2004 REF: CRR MMI-SPR-13614 Rashmi C N(Sasken) | |
4017 // We are now passing the type of CF as the first stringID for the dialog info screen | |
4018 // serviceGetType(ss_Code) this function would return the string id for the ss_code being passed | |
4019 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull, serviceGetType((T_MFW_SS_CODES)ss_Code), TxtNull, COLOUR_STATUS); | |
4020 | |
4021 // Jun 04,2004 CRR:13601 xpradipg - SASKEN | |
4022 //the time parameter is changed from FOREVER to FIVE_SECS | |
4023 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, FIVE_SECS, KEY_CLEAR| KEY_LEFT); | |
4024 } | |
4025 else | |
4026 { | |
4027 // Jun 10, 2004 REF: CRR MMI-SPR-13614 Rashmi C N(Sasken) | |
4028 // We are now passing the type of CF as the first stringID for the dialog info screen | |
4029 // serviceGetType(ss_Code) this function would return the string id for the ss_code being passed | |
4030 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtSoftNext, serviceGetType((T_MFW_SS_CODES)ss_Code), TxtNull, COLOUR_STATUS); | |
4031 //Jun 04,2004 CRR:13601 xpradipg - SASKEN | |
4032 //the time parameter is changed from FOREVER to FIVE_SECS | |
4033 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, FIVE_SECS, KEY_CLEAR| KEY_LEFT | KEY_RIGHT ); | |
4034 } | |
4035 | |
4036 display_info.Identifier = E_SS_CF_CNF; | |
4037 memset(str, 0, 50); | |
4038 //Only show the number when activating call diverts | |
4039 if (pFeature->status == TxtActivated) | |
4040 { | |
4041 // Jun 10, 2004 REF: CRR MMI-SPR-13614 Rashmi C N(Sasken) | |
4042 // When call forward is activated, the service(i.e voice, fax or data) and the number to which it is forwarded | |
4043 // is passed as the second string for the dialog display. Only two strings or string IDs can be given for a | |
4044 //dialog info screen. Hence, we are adding the service and the number into one string. | |
4045 strcat(str,(char*)MmiRsrcGetText(pFeature->service)); | |
4046 strcat(str," "); | |
4047 strcat(str,pFeature->forwarded_to_number); | |
4048 display_info.TextString2=str; | |
4049 } | |
4050 else /* SPR#2252 - DS - Show status */ | |
4051 { | |
4052 display_info.TextId2 = pFeature->status; | |
4053 } | |
4054 | |
4055 /* | |
4056 * Call Info Screen | |
4057 */ | |
4058 | |
4059 ss_data.info_win = info_dialog (ss_data.win, &display_info); | |
4060 | |
4061 if (ss_data.info_win EQ NULL) | |
4062 { | |
4063 TRACE_FUNCTION("NOT ENOUGH RESOURCES TO CREATE EXT INFO DIALOG"); | |
4064 } | |
4065 } | |
4066 | |
4067 | |
4068 /******************************************************************************* | |
4069 | |
4070 $Function: showCBStatus | |
4071 | |
4072 $Description: display CB state | |
4073 | |
4074 $Returns: | |
4075 | |
4076 $Arguments: | |
4077 | |
4078 *******************************************************************************/ | |
4079 | |
4080 | |
4081 | |
4082 static void showCBStatus (T_MFW_HND win , T_ss * data) | |
4083 { | |
4084 T_DISPLAY_DATA display_info; | |
4085 T_ss_feature_cb_data * pFeature; | |
4086 | |
4087 TRACE_FUNCTION("showCBStatus"); | |
4088 | |
4089 //MC got rid of dodgy pointer arithmetic | |
4090 pFeature = &data->mfw_ss_cb->ss[data->current_feature]; | |
4091 | |
4092 if (data->max_feature == 1) | |
4093 { | |
4094 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull, pFeature->service, pFeature->status, COLOUR_STATUS); | |
4095 //Jun 04,2004 CRR:13601 xpradipg - SASKEN | |
4096 //Timer value changed from FOREVER to FIVE_SECS | |
4097 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, FIVE_SECS, KEY_CLEAR| KEY_LEFT); | |
4098 } | |
4099 else | |
4100 { | |
4101 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtSoftNext, pFeature->service, pFeature->status, COLOUR_STATUS); | |
4102 //Jun 04,2004 CRR:13601 xpradipg - SASKEN | |
4103 //Timer value changed from FOREVER to FIVE_SECS | |
4104 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, FIVE_SECS, KEY_CLEAR| KEY_LEFT | KEY_RIGHT ); | |
4105 } | |
4106 display_info.Identifier = E_SS_CB_CNF; // can be used also for CF and CW | |
4107 | |
4108 /* | |
4109 * Call Info Screen | |
4110 */ | |
4111 | |
4112 ss_data.info_win = info_dialog (ss_data.win, &display_info); | |
4113 | |
4114 if (ss_data.info_win EQ NULL) | |
4115 { | |
4116 TRACE_FUNCTION("NOT ENOUGH RESOURCES TO CREATE EXT INFO DIALOG"); | |
4117 } | |
4118 } | |
4119 | |
4120 /******************************************************************************* | |
4121 | |
4122 $Function: getCFAction | |
4123 | |
4124 $Description: To return a string corresponding to call forwarding action. | |
4125 | |
4126 $Returns: | |
4127 | |
4128 $Arguments: | |
4129 | |
4130 *******************************************************************************/ | |
4131 | |
4132 | |
4133 static void getCFAction(char * pSSstring) | |
4134 { | |
4135 switch (CFAction) | |
4136 { | |
4137 case CFActivate: | |
4138 strcpy(pSSstring, "**"); | |
4139 break; | |
4140 case CFDeactivate: | |
4141 strcpy(pSSstring, "##"); | |
4142 break; | |
4143 case CFCheck: | |
4144 strcpy(pSSstring, "*#"); | |
4145 break; | |
4146 default: | |
4147 break; | |
4148 } | |
4149 | |
4150 } | |
4151 | |
4152 | |
4153 /******************************************************************************* | |
4154 | |
4155 $Function: getCFType | |
4156 | |
4157 $Description: To return a string corresponding to call forwarding type: | |
4158 CFU, CFNRy, CFU, etc. | |
4159 | |
4160 $Returns: | |
4161 | |
4162 $Arguments: | |
4163 | |
4164 *******************************************************************************/ | |
4165 | |
4166 | |
4167 static void getCFType(char* pSSstring) | |
4168 { | |
4169 switch (CFType) | |
4170 { | |
4171 case CFBusy: | |
4172 strcat(pSSstring, "67*"); | |
4173 break; | |
4174 case CFNoReply: | |
4175 strcat(pSSstring, "61*"); | |
4176 break; | |
4177 case CFNoReach: | |
4178 strcat(pSSstring, "62*"); | |
4179 break; | |
4180 case CFUnconditional: | |
4181 strcat(pSSstring, "21*"); | |
4182 break; | |
4183 case CFAllConditional: | |
4184 strcat(pSSstring, "004*"); | |
4185 break; | |
4186 case CFAllCalls: | |
4187 strcat(pSSstring, "002*"); | |
4188 break; | |
4189 default: | |
4190 break; | |
4191 } | |
4192 } | |
4193 | |
4194 | |
4195 | |
4196 | |
4197 /******************************************************************************* | |
4198 | |
4199 $Function: getCFNumber | |
4200 | |
4201 $Description: | |
4202 | |
4203 $Returns: | |
4204 | |
4205 $Arguments: | |
4206 | |
4207 *******************************************************************************/ | |
4208 | |
4209 static void getCFNumber(char * pSSstring) | |
4210 { | |
4211 | |
4212 strcat(pSSstring, ss_data.edt_buf_number); | |
4213 } | |
4214 | |
4215 | |
4216 | |
4217 /******************************************************************************* | |
4218 | |
4219 $Function: getCFService | |
4220 | |
4221 $Description: | |
4222 | |
4223 $Returns: | |
4224 | |
4225 $Arguments: | |
4226 | |
4227 *******************************************************************************/ | |
4228 | |
4229 | |
4230 static void getCFService(char * pSSstring) | |
4231 { | |
4232 | |
4233 switch (CFService) | |
4234 { | |
4235 case CFVoice: | |
4236 strcat(pSSstring, "*11"); //SPR#0776 - DS -changed from 10 to 11 | |
4237 break; | |
4238 /*MC SPR 742, handle line 2, auxiliary telephony*/ | |
4239 case CFAuxVoice: | |
4240 strcat(pSSstring, "*89"); | |
4241 break; | |
4242 case CFFax: | |
4243 strcat(pSSstring, "*13"); | |
4244 break; | |
4245 case CFData: | |
4246 strcat(pSSstring, "*12"); /*a0393213 cphs rel4 - changed service code from 20 to 12 as per 51.011 spec*/ | |
4247 break; | |
4248 default: | |
4249 break; | |
4250 } | |
4251 } | |
4252 | |
4253 | |
4254 | |
4255 /******************************************************************************* | |
4256 | |
4257 $Function: servicesSendCallDivert | |
4258 | |
4259 $Description: Send out Call Divert String to MFW according to static variables. | |
4260 | |
4261 $Returns: | |
4262 | |
4263 $Arguments: | |
4264 | |
4265 *******************************************************************************/ | |
4266 | |
4267 | |
4268 | |
4269 static int servicesSendCallDivert( char * divert_number) | |
4270 { | |
4271 char SS_string[60] = {'\0'}; | |
4272 | |
4273 /* build up SS string according to menu selections */ | |
4274 getCFAction(SS_string); | |
4275 getCFType(SS_string); | |
4276 if (divert_number) | |
4277 strcat(SS_string, divert_number); | |
4278 else | |
4279 getCFNumber(SS_string); | |
4280 getCFService(SS_string); | |
4281 strcat(SS_string, "#"); | |
4282 | |
4283 /* 30th May,2006 OMAPS00079650 a0393213 (R.Prabakar) | |
4284 Description : CPHS Call Forwarding feature implementation | |
4285 Solution : previous code is deleted because it was setting CF flag in flash before getting network confirmation*/ | |
4286 | |
4287 | |
4288 TRACE_FUNCTION(SS_string); | |
4289 | |
4290 if (ss_execute_transaction((UBYTE*)SS_string, 0) == MFW_SS_FAIL) | |
4291 { | |
4292 showFailed( ss_data.win ); | |
4293 } | |
4294 return 0; | |
4295 } | |
4296 | |
4297 | |
4298 | |
4299 /******************************************************************************* | |
4300 | |
4301 $Function: servicesActivateCLIR | |
4302 | |
4303 $Description: activate CLIR | |
4304 | |
4305 $Returns: | |
4306 | |
4307 $Arguments: | |
4308 | |
4309 *******************************************************************************/ | |
4310 | |
4311 int servicesActivateCLIR(MfwMnu* m, MfwMnuItem* i) { | |
4312 char actstr[8]; | |
4313 | |
4314 CFAction = CFActivate; | |
4315 strcpy(actstr, "#31#"); | |
4316 | |
4317 if (ss_execute_transaction((UBYTE*)actstr, 0) == MFW_SS_FAIL) | |
4318 showFailed( ss_data.win ); | |
4319 else | |
4320 { | |
4321 strcpy(actstr, "*#31#"); | |
4322 | |
4323 if (ss_execute_transaction((UBYTE*)actstr, 0) == MFW_SS_FAIL) | |
4324 showFailed( ss_data.win ); | |
4325 } | |
4326 | |
4327 | |
4328 return 0; | |
4329 } | |
4330 | |
4331 | |
4332 /******************************************************************************* | |
4333 | |
4334 $Function: servicesSuppressCLIR | |
4335 | |
4336 $Description: suppress CLIR | |
4337 | |
4338 $Returns: | |
4339 | |
4340 $Arguments: | |
4341 | |
4342 *******************************************************************************/ | |
4343 | |
4344 | |
4345 int servicesDeactivateCLIR(MfwMnu* m, MfwMnuItem* i) { | |
4346 char actstr[8]; | |
4347 | |
4348 CFAction = CFDeactivate; | |
4349 strcpy(actstr, "*31#"); | |
4350 | |
4351 if (ss_execute_transaction((UBYTE*)actstr, 0) == MFW_SS_FAIL) | |
4352 showFailed( ss_data.win ); | |
4353 else | |
4354 { | |
4355 strcpy(actstr, "*#31#"); | |
4356 | |
4357 if (ss_execute_transaction((UBYTE*)actstr, 0) == MFW_SS_FAIL) | |
4358 showFailed( ss_data.win ); | |
4359 } | |
4360 | |
4361 return 0; | |
4362 } | |
4363 | |
4364 /******************************************************************************* | |
4365 | |
4366 $Function: servicesCheckCLIR | |
4367 | |
4368 $Description: | |
4369 | |
4370 $Returns: | |
4371 | |
4372 $Arguments: | |
4373 | |
4374 *******************************************************************************/ | |
4375 | |
4376 | |
4377 | |
4378 int servicesCheckCLIR(MfwMnu* m, MfwMnuItem* i) { | |
4379 char actstr[8]; | |
4380 | |
4381 CFAction = CFCheck; | |
4382 | |
4383 strcpy(actstr, "*#31#"); | |
4384 | |
4385 if (ss_execute_transaction((UBYTE*)actstr, 0) == MFW_SS_FAIL) | |
4386 showFailed( ss_data.win ); | |
4387 | |
4388 return 0; | |
4389 } | |
4390 | |
4391 | |
4392 /******************************************************************************* | |
4393 | |
4394 $Function: servicesCheckCWaiting | |
4395 | |
4396 $Description: | |
4397 | |
4398 $Returns: | |
4399 | |
4400 $Arguments: | |
4401 | |
4402 *******************************************************************************/ | |
4403 | |
4404 int servicesCheckCWaiting(MfwMnu* m, MfwMnuItem* i) { | |
4405 char actstr[8]; | |
4406 | |
4407 strcpy(actstr, "*#43#"); | |
4408 | |
4409 if (ss_execute_transaction((UBYTE*)actstr, 0) == MFW_SS_FAIL) | |
4410 showFailed( ss_data.win ); | |
4411 | |
4412 return 0; | |
4413 } | |
4414 | |
4415 | |
4416 /******************************************************************************* | |
4417 | |
4418 $Function: servicesActivateCWaiting | |
4419 | |
4420 $Description: activate CallWaiting functionality | |
4421 | |
4422 $Returns: | |
4423 | |
4424 $Arguments: | |
4425 | |
4426 *******************************************************************************/ | |
4427 | |
4428 | |
4429 int servicesActivateCWaiting(MfwMnu* m, MfwMnuItem* i) { | |
4430 char actstr[8]; | |
4431 | |
4432 | |
4433 /* JVJ #1586 Changed *43*10# to *43*# */ | |
4434 strcpy(actstr, "*43*#"); | |
4435 | |
4436 if (ss_execute_transaction((UBYTE*)actstr, 0) == MFW_SS_FAIL) | |
4437 showFailed( ss_data.win ); | |
4438 | |
4439 return MFW_EVENT_CONSUMED; | |
4440 } | |
4441 | |
4442 | |
4443 /******************************************************************************* | |
4444 | |
4445 $Function: servicesDeactivateCWaiting | |
4446 | |
4447 $Description: deactivate CallWaiting functionality | |
4448 | |
4449 $Returns: | |
4450 | |
4451 $Arguments: | |
4452 | |
4453 *******************************************************************************/ | |
4454 | |
4455 | |
4456 | |
4457 int servicesDeactivateCWaiting(MfwMnu* m, MfwMnuItem* i) { | |
4458 char actstr[8]; | |
4459 | |
4460 /* JVJ #1586 Changed #43*10# to #43# */ | |
4461 strcpy(actstr, "#43#"); | |
4462 | |
4463 if (ss_execute_transaction((UBYTE*)actstr, 0) == MFW_SS_FAIL) | |
4464 showFailed( ss_data.win ); | |
4465 | |
4466 return MFW_EVENT_CONSUMED; | |
4467 } | |
4468 | |
4469 | |
4470 | |
4471 | |
4472 /******************************************************************************* | |
4473 | |
4474 $Function: servicesInterCFU | |
4475 | |
4476 $Description: Interrogate the CFU functionality | |
4477 | |
4478 $Returns: | |
4479 | |
4480 $Arguments: | |
4481 | |
4482 *******************************************************************************/ | |
4483 | |
4484 | |
4485 | |
4486 | |
4487 int servicesInterCFU(void) | |
4488 { | |
4489 char actstr[8]; | |
4490 | |
4491 strcpy(actstr, "*#21#"); | |
4492 | |
4493 ss_execute_transaction((UBYTE*)actstr, 0); | |
4494 | |
4495 return 0; | |
4496 } | |
4497 | |
4498 | |
4499 | |
4500 | |
4501 | |
4502 | |
4503 | |
4504 | |
4505 | |
4506 #if(0) /* x0039928 - Lint warning removal */ | |
4507 /******************************************************************************* | |
4508 | |
4509 $Function: ServiceGetStatus | |
4510 | |
4511 $Description: return the code for the MMI text string for the service status. | |
4512 | |
4513 $Returns: | |
4514 | |
4515 $Arguments: | |
4516 | |
4517 *******************************************************************************/ | |
4518 | |
4519 | |
4520 unsigned int ServiceGetStatus( UBYTE pStatus) | |
4521 { | |
4522 unsigned int strStatusCode = 0; | |
4523 | |
4524 TRACE_FUNCTION("++ ServiceGetStatus"); | |
4525 | |
4526 if (pStatus & SS_STAT_ACTIVE) | |
4527 strStatusCode = TxtActivated; | |
4528 /* Marcus: Issue 1652: 03/02/2003: Removed NDH 10/06/03 */ | |
4529 else | |
4530 strStatusCode = TxtDeActivated; | |
4531 return strStatusCode; | |
4532 } | |
4533 | |
4534 | |
4535 /******************************************************************************* | |
4536 | |
4537 $Function: serviceGetServiceType | |
4538 | |
4539 $Description: return the code for the MMI text string for the service type. | |
4540 | |
4541 $Returns: | |
4542 | |
4543 $Arguments: | |
4544 | |
4545 *******************************************************************************/ | |
4546 | |
4547 | |
4548 unsigned int serviceGetServiceType( UBYTE ss_telecom_type, UBYTE ss_telecom_service) | |
4549 { | |
4550 unsigned int strServCode = 0; | |
4551 | |
4552 TRACE_FUNCTION("++ serviceGetServiceType"); | |
4553 switch ( ss_telecom_type ) | |
4554 { | |
4555 case MFW_BST_UNKNOWN: | |
4556 break; | |
4557 | |
4558 case MFW_BST_TELE: | |
4559 switch ( ss_telecom_service ) | |
4560 { | |
4561 case MFW_TS_ALL_TS: strServCode = TxtAllCalls; break;/* all teleservices */ | |
4562 case MFW_TS_ALL_SPCH: /* All speech transmission services */ | |
4563 case MFW_TS_TLPHNY: /* telephony */ | |
4564 case MFW_TS_EMRGNCY: /* emergency calls */ | |
4565 strServCode = TxtVoice; | |
4566 break; | |
4567 case MFW_TS_ALL_SMS: /* all SMS services */ | |
4568 case MFW_TS_SMS_MT: /* SMS MT PP */ | |
4569 case MFW_TS_SMS_MO: /* SMS MO PP */ | |
4570 /*strServCode = TxtSMS;*/ | |
4571 break; | |
4572 case MFW_TS_ALL_FAX: /* all FAX transmission services */ | |
4573 case MFW_TS_FAX3_ALT_SPCH: /* FAX group 3 alter. speech */ | |
4574 case MFW_TS_FAX3_AUTO: /* FAX group 3 automatic */ | |
4575 case MFW_TS_FAX4: /* FAX group 4 */ | |
4576 strServCode = TxtFax; | |
4577 break; | |
4578 case MFW_TS_ALL_DATA: strServCode = TxtData; break;/* all FAX and SMS services */ | |
4579 case MFW_TS_ALL_XCPT_SMS: strServCode = TxtNotImplemented; | |
4580 TRACE_FUNCTION("all x SMS"); break;/* all FAX and speech services */ | |
4581 case MFW_TS_ALL_PSSS: strServCode = 0; break;/* all PLMN specific TS */ | |
4582 case MFW_TS_PLMN1: /* PLMN specific TS 1 */ | |
4583 case MFW_TS_PLMN2: /* PLMN specific TS 2 */ | |
4584 case MFW_TS_PLMN3: /* PLMN specific TS 3 */ | |
4585 case MFW_TS_PLMN4: /* PLMN specific TS 4 */ | |
4586 case MFW_TS_PLMN5: /* PLMN specific TS 5 */ | |
4587 case MFW_TS_PLMN6: /* PLMN specific TS 6 */ | |
4588 case MFW_TS_PLMN7: /* PLMN specific TS 7 */ | |
4589 case MFW_TS_PLMN8: /* PLMN specific TS 8 */ | |
4590 case MFW_TS_PLMN9: /* PLMN specific TS 9 */ | |
4591 case MFW_TS_PLMNA: /* PLMN specific TS A */ | |
4592 case MFW_TS_PLMNB: /* PLMN specific TS B */ | |
4593 case MFW_TS_PLMNC: /* PLMN specific TS C */ | |
4594 case MFW_TS_PLMND: /* PLMN specific TS D */ | |
4595 case MFW_TS_PLMNE: /* PLMN specific TS E */ | |
4596 case MFW_TS_PLMNF: /* PLMN specific TS F */ | |
4597 strServCode = 0; | |
4598 break; | |
4599 | |
4600 default: break; | |
4601 | |
4602 } | |
4603 break; | |
4604 | |
4605 /* NOTE that we are returning "Data" for all Bearer services until otherwise spec'ed */ | |
4606 case MFW_BST_BEARER: | |
4607 switch ( ss_telecom_service ) | |
4608 { | |
4609 case MFW_BS_ALL_BS : strServCode = TxtNotImplemented; /* strServCode = TxtAllServices; */ break; /* all bearer services */ | |
4610 case MFW_BS_ALL_DATA_CDA : /* all data CDA services */ | |
4611 case MFW_BS_CDA_300 : /* data CDA 300 bps */ | |
4612 case MFW_BS_CDA_1200 : /* data CDA 1200 bps */ | |
4613 case MFW_BS_CDA_1200_75 : /* data CDA 1200/75 bps */ | |
4614 case MFW_BS_CDA_2400 : /* data CDA 2400 bps */ | |
4615 case MFW_BS_CDA_4800 : /* data CDA 4800 bps */ | |
4616 case MFW_BS_CDA_9600 : /* data CDA 9600 bps */ | |
4617 case MFW_BS_ALL_DATA_CDS : /* all data CDS services */ | |
4618 case MFW_BS_CDS_1200 : /* data CDS 1200 bps */ | |
4619 case MFW_BS_CDS_2400 : /* data CDS 2400 bps */ | |
4620 case MFW_BS_CDS_4800 : /* data CDS 4800 bps */ | |
4621 case MFW_BS_CDS_9600 : /* data CDS 9600 bps */ | |
4622 case MFW_BS_ALL_DATA_PAD : /* all data PAD services */ | |
4623 case MFW_BS_PAD_300 : /* data PAD 300 bps */ | |
4624 case MFW_BS_PAD_1200 : /* data PAD 1200 bps */ | |
4625 case MFW_BS_PAD_1200_75 : /* data PAD 1200/75 bps */ | |
4626 case MFW_BS_PAD_2400 : /* data PAD 2400 bps */ | |
4627 case MFW_BS_PAD_4800 : /* data PAD 4800 bps */ | |
4628 case MFW_BS_PAD_9600 : /* data PAD 9600 bps */ | |
4629 case MFW_BS_ALL_DATA_PDS : /* all data PDS services */ | |
4630 case MFW_BS_PDS_2400 : /* data PDS 2400 bps */ | |
4631 case MFW_BS_PDS_4800 : /* data PDS 4800 bps */ | |
4632 case MFW_BS_PDS_9600 : /* data PDS 9600 bps */ | |
4633 case MFW_BS_SPCH_ALT_CDA : /* all data CDA alter. speech */ | |
4634 case MFW_BS_SPCH_ALT_CDS : /* all data CDS alter. speech */ | |
4635 case MFW_BS_SPCH_FLD_CDA : /* all data speech followed CDA */ | |
4636 case MFW_BS_SPCH_FLD_CDS : /* all data speech followed CDA */ | |
4637 case MFW_BS_ALL_DC_ASYN : /* all data circuit asynchronous */ | |
4638 case MFW_BS_ALL_ASYN : /* all asynchronous services */ | |
4639 case MFW_BS_ALL_DC_SYN : /* all data circuit synchronous */ | |
4640 case MFW_BS_ALL_SYN : /* all synchronous services */ | |
4641 case MFW_BS_ALL_PSSS : /* all PLMN specific BS */ | |
4642 case MFW_BS_PLMN1 : /* PLMN specific 1 */ | |
4643 case MFW_BS_PLMN2 : /* PLMN specific 2 */ | |
4644 case MFW_BS_PLMN3 : /* PLMN specific 3 */ | |
4645 case MFW_BS_PLMN4 : /* PLMN specific 4 */ | |
4646 case MFW_BS_PLMN5 : /* PLMN specific 5 */ | |
4647 case MFW_BS_PLMN6 : /* PLMN specific 6 */ | |
4648 case MFW_BS_PLMN7 : /* PLMN specific 7 */ | |
4649 case MFW_BS_PLMN8 : /* PLMN specific 8 */ | |
4650 case MFW_BS_PLMN9 : /* PLMN specific 9 */ | |
4651 case MFW_BS_PLMNA : /* PLMN specific A */ | |
4652 case MFW_BS_PLMNB : /* PLMN specific B */ | |
4653 case MFW_BS_PLMNC : /* PLMN specific C */ | |
4654 case MFW_BS_PLMND : /* PLMN specific D */ | |
4655 case MFW_BS_PLMNE : /* PLMN specific E */ | |
4656 case MFW_BS_PLMNF : /* PLMN specific F */ | |
4657 strServCode = 0; break; | |
4658 | |
4659 default: break; | |
4660 | |
4661 } | |
4662 break; | |
4663 | |
4664 default: | |
4665 break; | |
4666 } | |
4667 return strServCode; | |
4668 } | |
4669 | |
4670 #endif | |
4671 /******************************************************************************* | |
4672 | |
4673 $Function: serviceGetError | |
4674 | |
4675 $Description: | |
4676 | |
4677 $Returns: | |
4678 | |
4679 $Arguments: | |
4680 | |
4681 *******************************************************************************/ | |
4682 | |
4683 | |
4684 | |
4685 static unsigned int serviceGetError( T_MFW_SS_ERROR ss_error ) | |
4686 { | |
4687 unsigned int errStrCode = TxtNotAvailable; | |
4688 TRACE_FUNCTION("serviceGetError"); | |
4689 | |
4690 switch (ss_error) | |
4691 { | |
4692 case MFW_SS_ERR_UNKNOWN: | |
4693 errStrCode=TxtErrUnknown; | |
4694 break; | |
4695 case MFW_SS_ERROR: | |
4696 errStrCode=TxtSSErr; | |
4697 break; | |
4698 case MFW_SS_ERR_UNKNOWN_SUBSCRIBER: | |
4699 errStrCode=TxtUnknownSub; | |
4700 break; | |
4701 case MFW_SS_ERR_ILLEGAL_SUBSCRIBER: | |
4702 errStrCode=TxtIllSub; | |
4703 break; | |
4704 case MFW_SS_ERR_BEARER_SVC_NOT_PROV: | |
4705 case MFW_SS_ERR_TELE_SVC_NOT_PROV: | |
4706 errStrCode = TxtNotSubscribed; | |
4707 break; | |
4708 case MFW_SS_ERR_ILLEGAL_EQUIPMENT: | |
4709 errStrCode = TxtIllEqip; | |
4710 break; | |
4711 case MFW_SS_ERR_CALL_BARRED: | |
4712 errStrCode = TxtBarred; | |
4713 break; | |
4714 case MFW_SS_ERR_ILLEGAL_SS_OPERATION: | |
4715 errStrCode = TxtIllOp; | |
4716 break; | |
4717 case MFW_SS_ERR_SS_ERR_STATUS: | |
4718 errStrCode = TxtCheckStatus; | |
4719 break; | |
4720 case MFW_SS_ERR_SS_NOT_AVAIL: | |
4721 errStrCode = TxtNotAvailable; | |
4722 break; | |
4723 case MFW_SS_ERR_SS_SUBS_VIOLATION: | |
4724 errStrCode = TxtSubVil; | |
4725 break; | |
4726 case MFW_SS_ERR_SS_INCOMP: | |
4727 errStrCode = TxtInComp; | |
4728 break; | |
4729 case MFW_SS_ERR_FAC_NOT_SUPPORTED: | |
4730 errStrCode = TxtFacNoSup; | |
4731 break; | |
4732 case MFW_SS_ERR_ABSENT_SUBS: | |
4733 errStrCode = TxtAbsSub; | |
4734 break; | |
4735 case MFW_SS_ERR_SYSTEM_FAIL: | |
4736 errStrCode = TxtSysFail; | |
4737 break; | |
4738 case MFW_SS_ERR_DATA_MISSING: | |
4739 errStrCode = TxtMissDta; | |
4740 break; | |
4741 case MFW_SS_ERR_UNEXPECT_DATA: | |
4742 case MFW_SS_ERR_PROB_UNEXP_ERR: | |
4743 case MFW_SS_RES_PROB_RET_RES_UNEXP: | |
4744 case MFW_SS_ERR_PROB_RET_ERR_UNEXP: | |
4745 case MFW_SS_INV_PROB_LNK_RES_UNEXP: | |
4746 case MFW_SS_INV_PROB_UNEXP_LNK_OP: | |
4747 errStrCode = TxtUnexDta; | |
4748 break; | |
4749 case MFW_SS_ERR_PWD_REG_FAIL: | |
4750 errStrCode = TxtPwdErr; | |
4751 break; | |
4752 case MFW_SS_ERR_NEG_PWD_CHECK: | |
4753 errStrCode = TxtCodeInc; | |
4754 break; | |
4755 case MFW_SS_ERR_NUM_PWD_VIOLATION: | |
4756 errStrCode = TxtBlckPerm; | |
4757 break; | |
4758 case MFW_SS_ERR_UNKNOWN_ALPHA: | |
4759 errStrCode = TxtUnkAlph; | |
4760 break; | |
4761 case MFW_SS_ERR_USSD_BUSY: | |
4762 errStrCode = TxtNetworkBusy; | |
4763 break; | |
4764 case MFW_SS_ERR_MAX_NUM_MPTY_EXCEED: | |
4765 errStrCode = TxtMaxMpty; | |
4766 break; | |
4767 case MFW_SS_ERR_RESOURCE_NOT_AVAIL: | |
4768 errStrCode = TxtOperationNotAvail; | |
4769 break; | |
4770 case MFW_SS_RES_PROB_UNRECOG_INV_ID: | |
4771 case MFW_SS_INV_PROB_UNRECOG_LNK_ID: | |
4772 case MFW_SS_ERR_PROB_UNRECOG_INV_ID: | |
4773 case MFW_SS_GEN_PROB_UNRECOG_CMP: | |
4774 case MFW_SS_INV_PROB_UNRECOG_OP: | |
4775 case MFW_SS_ERR_PROB_UNRECOG_ERR: | |
4776 errStrCode = TxtUnRec; | |
4777 break; | |
4778 case MFW_SS_RES_PROB_MISTYPED_PAR: | |
4779 case MFW_SS_GEN_PROB_MISTYPED_CMP: | |
4780 case MFW_SS_INV_PROB_MISTYPED_PAR: | |
4781 case MFW_SS_ERR_PROB_MISTYPED_PAR: | |
4782 errStrCode = TxtMisTyp; | |
4783 break; | |
4784 case MFW_SS_GEN_PROB_BAD_STRUCT_CMP: | |
4785 errStrCode = TxtBadStruct; | |
4786 break; | |
4787 case MFW_SS_INV_PROB_DUPL_INV_ID: | |
4788 errStrCode = TxtDupInv; | |
4789 break; | |
4790 case MFW_SS_INV_PROB_RESOURCE_LIM: | |
4791 errStrCode = TxtResLim; | |
4792 break; | |
4793 case MFW_SS_INV_PROB_INIT_RELEASE: | |
4794 errStrCode = TxtIniRel; | |
4795 break; | |
4796 case MFW_SS_ERR_FATAL_INV_RESULT: | |
4797 case MFW_SS_ERR_FATAL_CCD_DEC: | |
4798 case MFW_SS_ERR_FATAL_SS_ENT: | |
4799 errStrCode = TxtFatRes; | |
4800 break; | |
4801 default: | |
4802 break; | |
4803 } | |
4804 return errStrCode; | |
4805 } | |
4806 | |
4807 /******************************************************************************* | |
4808 | |
4809 $Function: serviceGetType | |
4810 | |
4811 $Description: Return code of text string that indicates the SS Type | |
4812 CW, CF, CFU, etc | |
4813 | |
4814 $Returns: | |
4815 | |
4816 $Arguments: | |
4817 | |
4818 *******************************************************************************/ | |
4819 | |
4820 | |
4821 unsigned int serviceGetType( T_MFW_SS_CODES type ) | |
4822 { | |
4823 unsigned int strTypeCode = 0; | |
4824 | |
4825 TRACE_FUNCTION("++ serviceGetType"); | |
4826 | |
4827 switch (type) | |
4828 { | |
4829 case SS_CODES_UNKNOWN: | |
4830 /* Marcus: Issue 1652: 03/02/2003: Start */ | |
4831 TRACE_EVENT("SS_CODES_UNKNOWN"); | |
4832 strTypeCode = TxtUnknown; | |
4833 /* Marcus: Issue 1652: 03/02/2003: End */ | |
4834 break; | |
4835 | |
4836 case SS_CF_ALL: | |
4837 strTypeCode = TxtAllDivert; | |
4838 break; | |
4839 | |
4840 case SS_CF_ALL_COND: | |
4841 strTypeCode = TxtCondDivert; | |
4842 break; | |
4843 | |
4844 case SS_CF_CFU: | |
4845 strTypeCode = TxtAllCallsDivert; | |
4846 break; | |
4847 | |
4848 case SS_CF_CFNRy: | |
4849 strTypeCode = TxtNoAnsDivert ; | |
4850 break; | |
4851 | |
4852 case SS_CF_CFNR: | |
4853 strTypeCode = TxtNoReachDivert; | |
4854 break; | |
4855 | |
4856 case SS_CF_CFB: | |
4857 strTypeCode = TxtBusyDivert; | |
4858 break; | |
4859 | |
4860 case SS_CB_BAOC: | |
4861 strTypeCode = TxtCallBAOC; | |
4862 break; | |
4863 case SS_CB_BAOIC: | |
4864 strTypeCode = TxtCallBAOIC; | |
4865 break; | |
4866 case SS_CB_BAOICexH: | |
4867 strTypeCode = TxtCallBAOICexH; | |
4868 break; | |
4869 case SS_CB_BAIC: | |
4870 strTypeCode = TxtCallBAIC; | |
4871 break; | |
4872 case SS_CB_BAICroam: | |
4873 strTypeCode = TxtCallBAICroam; | |
4874 break; | |
4875 case SS_CB_ALL: | |
4876 strTypeCode = TxtCallBarringAll; | |
4877 break; | |
4878 case SS_CB_ALL_BAOC: | |
4879 strTypeCode = TxtCallBAOCAll; | |
4880 break; | |
4881 case SS_CB_ALL_BAIC: | |
4882 strTypeCode = TxtCallBAICAll; | |
4883 break; | |
4884 | |
4885 case SS_CW: | |
4886 strTypeCode = TxtCallWaiting; | |
4887 break; | |
4888 | |
4889 case SS_CCBS: | |
4890 break; | |
4891 | |
4892 case SS_CLIP: | |
4893 strTypeCode = TxtCLIP; | |
4894 break; | |
4895 case SS_CLIR: | |
4896 strTypeCode = TxtSendID; | |
4897 break; | |
4898 | |
4899 case SS_COLP: | |
4900 strTypeCode = TxtCOLP; | |
4901 break; | |
4902 case SS_COLR: | |
4903 strTypeCode = TxtCOLR; | |
4904 break; | |
4905 | |
4906 case SS_PIN1: | |
4907 case SS_PIN2: | |
4908 break; | |
4909 | |
4910 default: | |
4911 break; | |
4912 } | |
4913 return strTypeCode; | |
4914 } | |
4915 | |
4916 #if(0) /* x0039928 -Lint warning removal */ | |
4917 /******************************************************************************* | |
4918 | |
4919 $Function: serviceGetCategory | |
4920 | |
4921 $Description: return the code for the MMI text string for the service category. | |
4922 | |
4923 $Returns: | |
4924 | |
4925 $Arguments: | |
4926 | |
4927 *******************************************************************************/ | |
4928 | |
4929 unsigned int serviceGetCategory( T_MFW_SS_CATEGORY cat ) | |
4930 { | |
4931 unsigned int strCatCode = 0; | |
4932 | |
4933 TRACE_FUNCTION("++ serviceGetCategory"); | |
4934 | |
4935 switch ( cat ) | |
4936 { | |
4937 case SS_CTG_UNKNOWN: | |
4938 break; | |
4939 | |
4940 case SS_REGISTRATION: | |
4941 case SS_ACTIVATION: | |
4942 strCatCode = TxtActivated; | |
4943 break; | |
4944 | |
4945 case SS_ERASURE: | |
4946 case SS_DEACTIVATION: | |
4947 strCatCode = TxtDeActivated; | |
4948 break; | |
4949 | |
4950 case SS_INTERROGATION: | |
4951 TRACE_FUNCTION("SS Interrogation"); | |
4952 break; | |
4953 | |
4954 default: | |
4955 break; | |
4956 } | |
4957 return strCatCode; | |
4958 } | |
4959 #endif | |
4960 | |
4961 /******************************************************************************* | |
4962 | |
4963 $Function: servicesDivertActivate | |
4964 | |
4965 $Description: | |
4966 | |
4967 $Returns: | |
4968 | |
4969 $Arguments: | |
4970 | |
4971 *******************************************************************************/ | |
4972 | |
4973 | |
4974 | |
4975 void servicesDivertActivate(void) | |
4976 { | |
4977 TRACE_FUNCTION("servicesDivertActivate"); | |
4978 CFAction = CFActivate; | |
4979 } | |
4980 | |
4981 /******************************************************************************* | |
4982 | |
4983 $Function: servicesDivertCheck | |
4984 | |
4985 $Description: | |
4986 | |
4987 $Returns: | |
4988 | |
4989 $Arguments: | |
4990 | |
4991 $History: | |
4992 | |
4993 //SPR#0776 - DS -Now takes service type into account by calling getCFServiceCheck. | |
4994 | |
4995 *******************************************************************************/ | |
4996 | |
4997 | |
4998 void servicesDivertCheck(void) | |
4999 { | |
5000 char SS_string[60] = {'\0'}; | |
5001 /* | |
5002 * Interrogate Call Divert | |
5003 */ | |
5004 TRACE_FUNCTION("servicesDivertCheck"); | |
5005 | |
5006 CFAction = CFCheck; | |
5007 | |
5008 getCFAction(SS_string); | |
5009 getCFType(SS_string); | |
5010 getCFService(SS_string); //SPR#929 - DS - Changed from getCFServiceCheck. | |
5011 strcat(SS_string, "#"); | |
5012 | |
5013 TRACE_FUNCTION(SS_string); | |
5014 | |
5015 if (ss_execute_transaction((UBYTE*)SS_string, 0) == MFW_SS_FAIL) | |
5016 showFailed( ss_data.win ); | |
5017 | |
5018 } | |
5019 | |
5020 /******************************************************************************* | |
5021 | |
5022 $Function: servicesDivertDeactivate | |
5023 | |
5024 $Description: | |
5025 | |
5026 $Returns: | |
5027 | |
5028 $Arguments: | |
5029 | |
5030 $History | |
5031 | |
5032 //SPR#0776 - DS -Now takes service type into account by calling getCFServiceCheck. | |
5033 | |
5034 *******************************************************************************/ | |
5035 | |
5036 | |
5037 | |
5038 void servicesDivertDeactivate(void) | |
5039 { | |
5040 char SS_string[60] = {'\0'}; | |
5041 /* | |
5042 * Deactivate Call Divert | |
5043 */ | |
5044 TRACE_FUNCTION("servicesDivertDeactivate"); | |
5045 | |
5046 CFAction = CFDeactivate; | |
5047 | |
5048 getCFAction(SS_string); | |
5049 getCFType(SS_string); | |
5050 getCFService(SS_string); //SPR#929 - DS - Changed from getCFServiceCheck. | |
5051 SS_string[strlen(SS_string)] = '#'; | |
5052 | |
5053 TRACE_FUNCTION(SS_string); | |
5054 /* 30th May,2006 OMAPS00079650 a0393213 (R.Prabakar) | |
5055 Description : CPHS Call Forwarding feature implementation | |
5056 Solution : previous code is deleted because it was setting CF flag in flash before getting network confirmation*/ | |
5057 if (ss_execute_transaction((UBYTE*)SS_string, 0) == MFW_SS_FAIL) | |
5058 showFailed( ss_data.win ); | |
5059 | |
5060 } | |
5061 | |
5062 /******************************************************************************* | |
5063 | |
5064 $Function: servicesDivertVoice | |
5065 | |
5066 $Description: | |
5067 | |
5068 $Returns: | |
5069 | |
5070 $Arguments: | |
5071 | |
5072 *******************************************************************************/ | |
5073 | |
5074 | |
5075 | |
5076 void servicesDivertVoice(void) | |
5077 { | |
5078 TRACE_FUNCTION("servicesDivertVoice"); | |
5079 /*mc SPR 742 check if line2 is the current line*/ | |
5080 if (!ALSPresent(NULL, NULL, NULL) && GetAlsLine() == MFW_SERV_LINE2/*FFS_flashData.als_selLine == MFW_SERV_LINE2*/) | |
5081 CFService = CFAuxVoice; | |
5082 else /*mc end*/ | |
5083 CFService = CFVoice; | |
5084 } | |
5085 | |
5086 /******************************************************************************* | |
5087 | |
5088 $Function: servicesDivertFax | |
5089 | |
5090 $Description: | |
5091 | |
5092 $Returns: | |
5093 | |
5094 $Arguments: | |
5095 | |
5096 *******************************************************************************/ | |
5097 | |
5098 | |
5099 | |
5100 void servicesDivertFax(void) | |
5101 { | |
5102 TRACE_FUNCTION("servicesDivertFax"); | |
5103 CFService = CFFax; | |
5104 } | |
5105 | |
5106 | |
5107 /******************************************************************************* | |
5108 | |
5109 $Function: servicesDivertData | |
5110 | |
5111 $Description: | |
5112 | |
5113 $Returns: | |
5114 | |
5115 $Arguments: | |
5116 | |
5117 *******************************************************************************/ | |
5118 | |
5119 | |
5120 void servicesDivertData(void) | |
5121 { | |
5122 TRACE_FUNCTION("servicesDivertData"); | |
5123 CFService = CFData; | |
5124 } | |
5125 | |
5126 /******************************************************************************* | |
5127 | |
5128 $Function: servicesDivertActionAll | |
5129 | |
5130 $Description: | |
5131 | |
5132 $Returns: | |
5133 | |
5134 $Arguments: | |
5135 | |
5136 *******************************************************************************/ | |
5137 | |
5138 | |
5139 | |
5140 void servicesDivertActionAll(void) | |
5141 { | |
5142 TRACE_FUNCTION("servicesDivertActionAll"); | |
5143 CFService = CFAll; | |
5144 } | |
5145 | |
5146 | |
5147 /******************************************************************************* | |
5148 | |
5149 $Function: servicesDivertBusy | |
5150 | |
5151 $Description: | |
5152 | |
5153 $Returns: | |
5154 | |
5155 $Arguments: | |
5156 | |
5157 *******************************************************************************/ | |
5158 | |
5159 | |
5160 void servicesDivertBusy(void) | |
5161 { | |
5162 TRACE_FUNCTION("servicesDivertBusy"); | |
5163 CFType = CFBusy; | |
5164 } | |
5165 | |
5166 /******************************************************************************* | |
5167 | |
5168 $Function: servicesDivertNoAnswer | |
5169 | |
5170 $Description: | |
5171 | |
5172 $Returns: | |
5173 | |
5174 $Arguments: | |
5175 | |
5176 *******************************************************************************/ | |
5177 | |
5178 | |
5179 void servicesDivertNoAnswer(void) | |
5180 { | |
5181 TRACE_FUNCTION("servicesDivertNoAnswer"); | |
5182 CFType = CFNoReply; | |
5183 } | |
5184 | |
5185 /******************************************************************************* | |
5186 | |
5187 $Function: servicesDivertNotReachable | |
5188 | |
5189 $Description: | |
5190 | |
5191 $Returns: | |
5192 | |
5193 $Arguments: | |
5194 | |
5195 *******************************************************************************/ | |
5196 | |
5197 | |
5198 void servicesDivertNotReachable(void) | |
5199 { | |
5200 TRACE_FUNCTION("servicesDivertNotReachable"); | |
5201 CFType = CFAllConditional; | |
5202 } | |
5203 | |
5204 /******************************************************************************* | |
5205 | |
5206 $Function: servicesDivertNoService | |
5207 | |
5208 $Description: | |
5209 | |
5210 $Returns: | |
5211 | |
5212 $Arguments: | |
5213 | |
5214 *******************************************************************************/ | |
5215 | |
5216 | |
5217 void servicesDivertNoService(void) | |
5218 { | |
5219 TRACE_FUNCTION("servicesDivertNoService"); | |
5220 CFType = CFNoReach; | |
5221 } | |
5222 | |
5223 | |
5224 /******************************************************************************* | |
5225 | |
5226 $Function: servicesDivertAllCalls | |
5227 | |
5228 $Description: | |
5229 | |
5230 $Returns: | |
5231 | |
5232 $Arguments: | |
5233 | |
5234 *******************************************************************************/ | |
5235 | |
5236 | |
5237 void servicesDivertAllCalls(void) | |
5238 { | |
5239 TRACE_FUNCTION("servicesDivertAllCalls"); | |
5240 CFType = CFUnconditional; | |
5241 } | |
5242 | |
5243 /******************************************************************************* | |
5244 | |
5245 $Function: servicesDivertCancelAll | |
5246 | |
5247 $Description: | |
5248 | |
5249 $Returns: | |
5250 | |
5251 $Arguments: | |
5252 | |
5253 *******************************************************************************/ | |
5254 | |
5255 | |
5256 void servicesDivertCancelAll(void) | |
5257 { | |
5258 TRACE_FUNCTION("servicesDivertCancelAll"); | |
5259 CFType = CFAllCalls; | |
5260 CFAction = CFDeactivate; | |
5261 CFService = CFAll; | |
5262 servicesSendCallDivert(0); | |
5263 } | |
5264 | |
5265 /******************************************************************************* | |
5266 | |
5267 $Function: servicesBarringAllOutgoing | |
5268 | |
5269 $Description: | |
5270 | |
5271 $Returns: | |
5272 | |
5273 $Arguments: | |
5274 | |
5275 *******************************************************************************/ | |
5276 | |
5277 | |
5278 void servicesBarringAllOutgoing(void) | |
5279 { | |
5280 TRACE_FUNCTION("servicesBarringAllOutgoing"); | |
5281 CBType = CBAllOutgoing; | |
5282 } | |
5283 | |
5284 /******************************************************************************* | |
5285 | |
5286 $Function: servicesBarringInternational | |
5287 | |
5288 $Description: | |
5289 | |
5290 $Returns: | |
5291 | |
5292 $Arguments: | |
5293 | |
5294 *******************************************************************************/ | |
5295 | |
5296 | |
5297 | |
5298 void servicesBarringInternational(void) | |
5299 { | |
5300 TRACE_FUNCTION("servicesBarringInternational"); | |
5301 CBType = CBInternational; | |
5302 } | |
5303 | |
5304 /******************************************************************************* | |
5305 | |
5306 $Function: servicesBarringInternationalHome | |
5307 | |
5308 $Description: | |
5309 | |
5310 $Returns: | |
5311 | |
5312 $Arguments: | |
5313 | |
5314 *******************************************************************************/ | |
5315 | |
5316 | |
5317 void servicesBarringInternationalHome(void) | |
5318 { | |
5319 TRACE_FUNCTION("servicesBarringInternationalHome"); | |
5320 CBType = CBInternationalHome; | |
5321 } | |
5322 | |
5323 | |
5324 /******************************************************************************* | |
5325 | |
5326 $Function: servicesBarringAllIncoming | |
5327 | |
5328 $Description: | |
5329 | |
5330 $Returns: | |
5331 | |
5332 $Arguments: | |
5333 | |
5334 *******************************************************************************/ | |
5335 | |
5336 | |
5337 | |
5338 void servicesBarringAllIncoming(void) | |
5339 { | |
5340 TRACE_FUNCTION("servicesBarringAllIncoming"); | |
5341 CBType = CBAllIncoming; | |
5342 } | |
5343 | |
5344 /******************************************************************************* | |
5345 | |
5346 $Function: servicesBarringIncomingRoaming | |
5347 | |
5348 $Description: | |
5349 | |
5350 $Returns: | |
5351 | |
5352 $Arguments: | |
5353 | |
5354 *******************************************************************************/ | |
5355 | |
5356 | |
5357 void servicesBarringIncomingRoaming(void) | |
5358 { | |
5359 TRACE_FUNCTION("servicesBarringIncomingRoaming"); | |
5360 CBType = CBIncomingRoaming; | |
5361 } | |
5362 | |
5363 | |
5364 /******************************************************************************* | |
5365 | |
5366 $Function: services_get_voice_number_cb | |
5367 | |
5368 $Description: callback function for the enter voicemail number window | |
5369 | |
5370 $Returns: | |
5371 | |
5372 $Arguments: | |
5373 | |
5374 *******************************************************************************/ | |
5375 | |
5376 | |
5377 #ifdef NEW_EDITOR | |
5378 static void services_get_voice_number_cb(T_MFW_HND win, USHORT identifier, SHORT reason) | |
5379 { | |
5380 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; | |
5381 T_services_input * data = (T_services_input *)win_data->user; | |
5382 | |
5383 TRACE_FUNCTION("services_get_voice_number_cb"); | |
5384 | |
5385 switch (reason) | |
5386 { | |
5387 case INFO_KCD_LEFT: | |
5388 TRACE_FUNCTION("SERVICES_INPUT_LEFT"); | |
5389 services_input_destroy(ss_data.input_number_win); | |
5390 /* send number if one has been entered */ | |
5391 if (strlen(ss_data.edt_buf_number) > 0 ) | |
5392 SEND_EVENT(data->parent_win, SERVICES_DO_CALL_VOICE_DIVERT, 0, 0); | |
5393 break; | |
5394 | |
5395 case INFO_KCD_ALTERNATELEFT: | |
5396 TRACE_FUNCTION("SERVICES_INPUT_ALTERNATELEFT"); | |
5397 /* Go to phone book */ | |
5398 if (bookPhoneBookLoading()==BOOK_SUCCESS) | |
5399 { | |
5400 // T_MFW_HND phbk_win; // RAVI | |
5401 bookPhonebookStart(win,PhbkFromDivert); // RAVI - Removed Assignment phbk_win = . | |
5402 } | |
5403 | |
5404 break; | |
5405 | |
5406 case INFO_KCD_HUP: | |
5407 case INFO_KCD_RIGHT: | |
5408 TRACE_FUNCTION("SERVICES_INPUT_RIGHT/HUP"); | |
5409 services_input_destroy(ss_data.input_number_win); | |
5410 break; | |
5411 default: | |
5412 break; | |
5413 } | |
5414 } | |
5415 | |
5416 #else /* NEW_EDITOR */ | |
5417 static void services_get_voice_number_cb(T_MFW_HND win, USHORT reason) | |
5418 { | |
5419 TRACE_FUNCTION("services_get_voice_number_cb"); | |
5420 | |
5421 switch (reason){ | |
5422 case SERVICES_INPUT_LEFT: | |
5423 TRACE_FUNCTION("SERVICES_INPUT_LEFT"); | |
5424 /* send number if one has been entered */ | |
5425 if (strlen(ss_data.edt_buf_number) > 0 ) | |
5426 SEND_EVENT(win, SERVICES_DO_CALL_VOICE_DIVERT, 0, 0); | |
5427 break; | |
5428 default: | |
5429 break; | |
5430 } | |
5431 } | |
5432 #endif /* NEW_EDITOR */ | |
5433 | |
5434 | |
5435 /******************************************************************************* | |
5436 | |
5437 $Function: servicesDoVoiceMailNumber | |
5438 | |
5439 $Description: this function should access voicemail number if it is already | |
5440 entered, otherwise allow access to voicemail editing window | |
5441 | |
5442 $Returns: | |
5443 | |
5444 $Arguments: | |
5445 | |
5446 *******************************************************************************/ | |
5447 | |
5448 | |
5449 | |
5450 | |
5451 void servicesDoVoiceMailNumber(void) | |
5452 { | |
5453 char voiceNum[30] = {'\0'}; | |
5454 | |
5455 TRACE_FUNCTION("servicesDoVoiceMailNumber"); | |
5456 | |
5457 //JVJEmsgsGetVoiceAddress(voiceNum); | |
5458 | |
5459 /* instead of the above we should use something like: */ | |
5460 if ( strlen(voiceNum) > 0) | |
5461 { | |
5462 servicesSendCallDivert(voiceNum); | |
5463 } | |
5464 else | |
5465 { | |
5466 T_ss * data = &ss_data; | |
5467 T_input_properties input; | |
5468 | |
5469 memset(data->edt_buf_number,'\0',PHB_MAX_LEN); | |
5470 input.abc = FALSE; | |
5471 input.text = TxtEnterNumber; | |
5472 /* SPR#1428 - SH - New Editor changes - no longer required */ | |
5473 #ifndef NEW_EDITOR | |
5474 input.edt_attr_input = &data->edt_attr_number; | |
5475 #endif /* ifndef NEW_EDITOR */ | |
5476 input.left_soft_key = TxtSoftOK; | |
5477 input.right_soft_key = TxtSoftBack; | |
5478 input.callback = services_get_voice_number_cb; | |
5479 data->input_number_win = services_input_start(data->win,&input); | |
5480 | |
5481 } | |
5482 | |
5483 } | |
5484 | |
5485 | |
5486 /******************************************************************************* | |
5487 | |
5488 $Function: services_get_number_cb | |
5489 | |
5490 $Description: callback function for the enter other number window | |
5491 | |
5492 $Returns: | |
5493 | |
5494 $Arguments: | |
5495 | |
5496 *******************************************************************************/ | |
5497 | |
5498 #ifdef NEW_EDITOR | |
5499 static void services_get_number_cb(T_MFW_HND win, USHORT identifier, SHORT reason) | |
5500 { | |
5501 // T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; // RAVI | |
5502 // T_services_input * data = (T_services_input *)win_data->user; // RAVI | |
5503 | |
5504 TRACE_FUNCTION("services_get_voice_number_cb"); | |
5505 | |
5506 switch (reason) | |
5507 { | |
5508 case INFO_KCD_LEFT: | |
5509 TRACE_FUNCTION("SERVICES_INPUT_LEFT"); | |
5510 /* send number if one has been entered */ | |
5511 SEND_EVENT(ss_data.win, ServicesDoCallDivert, 0, 0); | |
5512 services_input_destroy(ss_data.input_number_win); | |
5513 ss_data.input_number_win = NULL; | |
5514 break; | |
5515 | |
5516 case INFO_KCD_ALTERNATELEFT: | |
5517 TRACE_FUNCTION("SERVICES_INPUT_ALTERNATELEFT"); | |
5518 /* Go to phone book */ | |
5519 if (bookPhoneBookLoading()==BOOK_SUCCESS) | |
5520 { | |
5521 //T_MFW_HND phbk_win; // RAVI | |
5522 bookPhonebookStart(win,PhbkFromDivert); // RAVI - Removed assignment phbk_win = | |
5523 } | |
5524 | |
5525 break; | |
5526 | |
5527 case INFO_KCD_HUP: | |
5528 case INFO_KCD_RIGHT: | |
5529 TRACE_FUNCTION("SERVICES_INPUT_RIGHT/HUP"); | |
5530 services_input_destroy(ss_data.input_number_win); | |
5531 ss_data.input_number_win = NULL; | |
5532 break; | |
5533 default: | |
5534 break; | |
5535 } | |
5536 } | |
5537 | |
5538 #else /* NEW_EDITOR */ | |
5539 static void services_get_number_cb(T_MFW_HND win,USHORT reason) | |
5540 { | |
5541 TRACE_FUNCTION("services_get_number_cb"); | |
5542 | |
5543 switch (reason){ | |
5544 case SERVICES_INPUT_LEFT: | |
5545 TRACE_FUNCTION("SERVICES_INPUT_LEFT"); | |
5546 SEND_EVENT(win, ServicesDoCallDivert, 0, 0); | |
5547 break; | |
5548 case SERVICES_INPUT_RIGHT: | |
5549 TRACE_FUNCTION("SERVICES_INPUT_RIGHT"); | |
5550 SEND_EVENT(win, ServicesDoCallDivert, 0, 0); | |
5551 break; | |
5552 default: | |
5553 break; | |
5554 } | |
5555 } | |
5556 #endif /* NEW_EDITOR */ | |
5557 | |
5558 /******************************************************************************* | |
5559 | |
5560 $Function: servicesGetOtherNumber | |
5561 | |
5562 $Description: Sets up an editor for entering another number. | |
5563 | |
5564 $Returns: | |
5565 | |
5566 $Arguments: | |
5567 | |
5568 *******************************************************************************/ | |
5569 | |
5570 | |
5571 | |
5572 | |
5573 static void ServicesGetOtherNumber(T_MFW_HND win) | |
5574 { | |
5575 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; | |
5576 T_ss * data = (T_ss *)win_data->user; | |
5577 | |
5578 T_input_properties input; | |
5579 | |
5580 TRACE_EVENT("ServicesGetOtherNumber"); | |
5581 | |
5582 memset(data->edt_buf_number,'\0',PHB_MAX_LEN); | |
5583 input.abc = FALSE; | |
5584 input.text = TxtEnterNumber; | |
5585 /* SPR#1428 - SH - New Editor changes - no longer required */ | |
5586 #ifndef NEW_EDITOR | |
5587 input.edt_attr_input = &data->edt_attr_number; | |
5588 #endif /* ifndef NEW_EDITOR */ | |
5589 input.left_soft_key = TxtSoftOK; | |
5590 //Oct 20, 2004 REF: CRR 25772 Deepa M.D | |
5591 //The RSK name has been set to Delete. | |
5592 input.right_soft_key = TxtDelete; | |
5593 input.callback = services_get_number_cb; | |
5594 data->input_number_win = services_input_start(win,&input); | |
5595 } | |
5596 | |
5597 /******************************************************************************* | |
5598 | |
5599 $Function: servicesDoOtherNumber | |
5600 | |
5601 $Description: | |
5602 | |
5603 $Returns: | |
5604 | |
5605 $Arguments: | |
5606 | |
5607 *******************************************************************************/ | |
5608 | |
5609 | |
5610 void servicesDoOtherNumber(void) | |
5611 { | |
5612 | |
5613 TRACE_FUNCTION("servicesDoOtherNumber"); | |
5614 | |
5615 SEND_EVENT(ss_data.win, ServicesOtherNumber, 0, 0); | |
5616 | |
5617 | |
5618 /* this is function called from menu, it will also send a signal to start | |
5619 window being displayed for editing or calling phonebook */ | |
5620 /* set up and show edit field */ | |
5621 } | |
5622 | |
5623 | |
5624 /******************************************************************************* | |
5625 | |
5626 $Function: servicesStoreVoiceMailNumber | |
5627 | |
5628 $Description: Store number to Voicemail number (currently in SMS, should be in PCM?) | |
5629 | |
5630 $Returns: | |
5631 | |
5632 $Arguments: | |
5633 | |
5634 *******************************************************************************/ | |
5635 | |
5636 static void servicesStoreVoiceMailNumber( void ) | |
5637 { | |
5638 char voiceNum[30] = {'\0'}; | |
5639 TRACE_FUNCTION("servicesStoreVoiceMailNumber"); | |
5640 | |
5641 getCFNumber(voiceNum); | |
5642 | |
5643 } | |
5644 | |
5645 | |
5646 #if(0) /* x0039928 -Lint warning removal */ | |
5647 /******************************************************************************* | |
5648 | |
5649 $Function: servicesStoreUSSD | |
5650 | |
5651 $Description: Store selected USSD to NVM. | |
5652 | |
5653 $Returns: | |
5654 | |
5655 $Arguments: | |
5656 | |
5657 *******************************************************************************/ | |
5658 | |
5659 | |
5660 | |
5661 static void servicesStoreUSSD(void) | |
5662 { | |
5663 TRACE_FUNCTION("servicesStoreUSSD"); | |
5664 } | |
5665 #endif | |
5666 | |
5667 /******************************************************************************* | |
5668 | |
5669 $Function: servicesActivateIRDA | |
5670 | |
5671 $Description: | |
5672 | |
5673 $Returns: | |
5674 | |
5675 $Arguments: | |
5676 | |
5677 *******************************************************************************/ | |
5678 | |
5679 | |
5680 int servicesActivateIRDA(MfwMnu* m, MfwMnuItem* i) | |
5681 { | |
5682 // ADDED BY RAVI - 28-11-2005 | |
5683 return 1; | |
5684 // END RAVI - 28-11-2005 | |
5685 } | |
5686 | |
5687 /******************************************************************************* | |
5688 | |
5689 $Function: servicesDeactivateIRDA | |
5690 | |
5691 $Description: | |
5692 | |
5693 $Returns: | |
5694 | |
5695 $Arguments: | |
5696 | |
5697 *******************************************************************************/ | |
5698 | |
5699 | |
5700 int servicesDeactivateIRDA(MfwMnu* m, MfwMnuItem* i) | |
5701 { | |
5702 // ADDED BY RAVI - 28-11-2005 | |
5703 return 1; | |
5704 // END RAVI - 28-11-2005 | |
5705 } | |
5706 | |
5707 | |
5708 static T_MFW_HND dialog_ext_info_create (T_MFW_HND parent_win); | |
5709 static void dialog_ext_info_destroy (T_MFW_HND own_window); | |
5710 void dialog_ext_info (T_MFW_HND win, | |
5711 USHORT event, SHORT value, void * parameter); | |
5712 static int dialog_ext_info_win_cb (T_MFW_EVENT event, T_MFW_WIN * win); | |
5713 static T_MFW_CB dialog_ext_info_tim_cb (T_MFW_EVENT event, T_MFW_TIM * tc); | |
5714 static int dialog_ext_info_kbd_cb (T_MFW_EVENT event, T_MFW_KBD * keyboard); | |
5715 static int dialog_ext_info_kbd_long_cb (T_MFW_EVENT e, T_MFW_KBD *k); | |
5716 | |
5717 | |
5718 /******************************************************************************* | |
5719 | |
5720 $Function: dialog_ext_info_dialog | |
5721 | |
5722 $Description: | |
5723 | |
5724 $Returns: | |
5725 | |
5726 $Arguments: | |
5727 | |
5728 *******************************************************************************/ | |
5729 | |
5730 | |
5731 T_MFW_HND dialog_ext_info_dialog (T_MFW_HND parent_win, | |
5732 T_dialog_ext_info * display_info) | |
5733 { | |
5734 T_MFW_HND win; | |
5735 | |
5736 win = dialog_ext_info_create (parent_win); | |
5737 | |
5738 if (win NEQ NULL) | |
5739 { | |
5740 SEND_EVENT (win, DIALOG_INIT, 0, display_info); | |
5741 } | |
5742 return win; | |
5743 } | |
5744 | |
5745 | |
5746 /******************************************************************************* | |
5747 | |
5748 $Function: dialog_ext_info_create | |
5749 | |
5750 $Description: | |
5751 | |
5752 $Returns: | |
5753 | |
5754 $Arguments: | |
5755 | |
5756 *******************************************************************************/ | |
5757 | |
5758 | |
5759 static T_MFW_HND dialog_ext_info_create (T_MFW_HND parent_win) | |
5760 { | |
5761 T_MFW_WIN * win_data; | |
5762 T_dialog_ext_info * data = (T_dialog_ext_info *)ALLOC_MEMORY (sizeof (T_dialog_ext_info)); | |
5763 | |
5764 TRACE_FUNCTION ("dialog_ext_info_create()"); | |
5765 | |
5766 if (data EQ 0) | |
5767 { | |
5768 TRACE_FUNCTION("NOT ENOUGH RESOURCES FOR DATA"); | |
5769 return 0; | |
5770 } | |
5771 data->info_win = win_create (parent_win, 0, E_WIN_VISIBLE, (T_MFW_CB)dialog_ext_info_win_cb); | |
5772 | |
5773 if (data->info_win EQ 0) | |
5774 { | |
5775 TRACE_FUNCTION("NOT ENOUGH RESOURCES FOR 4 line INFO WIN"); | |
5776 return 0; | |
5777 } | |
5778 | |
5779 /* | |
5780 * Create window handler | |
5781 */ | |
5782 data->mmi_control.dialog = (T_DIALOG_FUNC)dialog_ext_info; | |
5783 data->mmi_control.data = data; | |
5784 data->parent_win = parent_win; | |
5785 win_data = ((T_MFW_HDR *)data->info_win)->data; | |
5786 win_data->user = (void *)data; | |
5787 | |
5788 | |
5789 win_show(data->info_win); | |
5790 /* | |
5791 * return window handle | |
5792 */ | |
5793 return data->info_win; | |
5794 } | |
5795 | |
5796 /******************************************************************************* | |
5797 | |
5798 $Function: dialog_ext_info_destroy | |
5799 | |
5800 $Description: | |
5801 | |
5802 $Returns: | |
5803 | |
5804 $Arguments: | |
5805 | |
5806 *******************************************************************************/ | |
5807 | |
5808 | |
5809 static void dialog_ext_info_destroy (T_MFW_HND own_window) | |
5810 { | |
5811 T_MFW_WIN * win = ((T_MFW_HDR *)own_window)->data; | |
5812 T_dialog_ext_info * data = (T_dialog_ext_info *)win->user; | |
5813 | |
5814 TRACE_FUNCTION ("dialog_ext_info_destroy()"); | |
5815 | |
5816 if (own_window == NULL) | |
5817 { | |
5818 TRACE_EVENT ("Error : Called with NULL Pointer"); | |
5819 return; | |
5820 } | |
5821 | |
5822 if (data) | |
5823 { | |
5824 /* | |
5825 * Exit TIMER & KEYBOARD Handle | |
5826 */ | |
5827 kbd_delete (data->info_kbd); | |
5828 kbd_delete (data->info_kbd_long); | |
5829 tim_delete (data->info_tim); | |
5830 | |
5831 /* | |
5832 * Delete WIN Handler | |
5833 */ | |
5834 win_delete (data->info_win); | |
5835 /* | |
5836 * Free Memory | |
5837 */ | |
5838 FREE_MEMORY ((void *)data, sizeof (T_dialog_ext_info)); | |
5839 } | |
5840 } | |
5841 | |
5842 /******************************************************************************* | |
5843 | |
5844 $Function: dialog_ext_info | |
5845 | |
5846 $Description: | |
5847 | |
5848 $Returns: | |
5849 | |
5850 $Arguments: | |
5851 | |
5852 *******************************************************************************/ | |
5853 | |
5854 void dialog_ext_info (T_MFW_HND win, USHORT event, SHORT value, void * parameter) | |
5855 { | |
5856 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; | |
5857 T_dialog_ext_info * data = (T_dialog_ext_info *)win_data->user; | |
5858 T_dialog_ext_info * display_info = (T_dialog_ext_info *)parameter; | |
5859 | |
5860 TRACE_FUNCTION ("dialog_ext_info()"); | |
5861 | |
5862 switch (event) | |
5863 { | |
5864 case DIALOG_INIT: | |
5865 /* | |
5866 * Initialize dialog | |
5867 */ | |
5868 /* | |
5869 * Store any other data | |
5870 */ | |
5871 data->LeftSoftKey = display_info->LeftSoftKey; | |
5872 data->RightSoftKey = display_info->RightSoftKey; | |
5873 data->Time = display_info->Time; | |
5874 data->KeyEvents = display_info->KeyEvents; | |
5875 data->TextId1 = display_info->TextId1; | |
5876 data->TextId2 = display_info->TextId2; | |
5877 data->TextString4 = display_info->TextString4; | |
5878 data->Identifier = display_info->Identifier; | |
5879 data->Callback = display_info->Callback; | |
5880 /* | |
5881 * Create timer and keyboard handler | |
5882 */ | |
5883 data->info_tim = tim_create (win, display_info->Time, (T_MFW_CB)dialog_ext_info_tim_cb); | |
5884 data->info_kbd = kbd_create (win, KEY_ALL, (T_MFW_CB)dialog_ext_info_kbd_cb); | |
5885 data->info_kbd_long = kbd_create (win, KEY_ALL|KEY_LONG, (T_MFW_CB)dialog_ext_info_kbd_long_cb); | |
5886 | |
5887 if (display_info->Time NEQ FOREVER) | |
5888 tim_start (data->info_tim); | |
5889 win_show(win); | |
5890 break; | |
5891 | |
5892 case DIALOG_DESTROY: | |
5893 dialog_ext_info_destroy(win); | |
5894 break; | |
5895 } | |
5896 } | |
5897 | |
5898 /******************************************************************************* | |
5899 | |
5900 $Function: dialog_ext_info_win_cb | |
5901 | |
5902 $Description: | |
5903 | |
5904 $Returns: | |
5905 | |
5906 $Arguments: | |
5907 | |
5908 *******************************************************************************/ | |
5909 | |
5910 | |
5911 | |
5912 static int dialog_ext_info_win_cb (T_MFW_EVENT event, T_MFW_WIN * win) | |
5913 { | |
5914 T_dialog_ext_info * data = (T_dialog_ext_info *)win->user; | |
5915 | |
5916 TRACE_FUNCTION ("dialog_ext_info_win_cb()"); | |
5917 | |
5918 if (data EQ 0) | |
5919 return 1; | |
5920 | |
5921 switch (event) | |
5922 { | |
5923 case E_WIN_VISIBLE: | |
5924 /* | |
5925 * Print the information dialog | |
5926 */ | |
5927 | |
5928 /* | |
5929 * Clear Screen | |
5930 */ | |
5931 dspl_ClearAll(); | |
5932 /* | |
5933 * Print softkeys | |
5934 */ | |
5935 displaySoftKeys(data->LeftSoftKey, data->RightSoftKey); | |
5936 /* | |
5937 * Print information | |
5938 */ | |
5939 if (data->TextId1 NEQ 0) | |
5940 { | |
5941 displayAlignedText(CENTER, Mmi_layout_line(1), 0, GET_TEXT(data->TextId1)); | |
5942 } | |
5943 | |
5944 if (data->TextId2 NEQ 0) | |
5945 { | |
5946 displayAlignedText(CENTER, Mmi_layout_line(2), 0, GET_TEXT(data->TextId2)); | |
5947 } | |
5948 | |
5949 if (data->TextString4) | |
5950 { | |
5951 displayAlignedText(CENTER, Mmi_layout_line(3), 0, data->TextString4); | |
5952 } | |
5953 break; | |
5954 | |
5955 default: | |
5956 return 0; | |
5957 } | |
5958 return 1; | |
5959 } | |
5960 | |
5961 | |
5962 /******************************************************************************* | |
5963 | |
5964 $Function: dialog_ext_info_tim_cb | |
5965 | |
5966 $Description: | |
5967 | |
5968 $Returns: | |
5969 | |
5970 $Arguments: | |
5971 | |
5972 *******************************************************************************/ | |
5973 | |
5974 | |
5975 static T_MFW_CB dialog_ext_info_tim_cb (T_MFW_EVENT event, T_MFW_TIM *tc) | |
5976 { | |
5977 T_MFW_HND win = mfw_parent (mfw_header()); | |
5978 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; | |
5979 T_dialog_ext_info * data = (T_dialog_ext_info *)win_data->user; | |
5980 | |
5981 T_MFW_HND parent_win = data->parent_win; | |
5982 USHORT Identifier = data->Identifier; | |
5983 void (* Callback)() = data->Callback; | |
5984 | |
5985 dialog_ext_info_destroy (win); | |
5986 | |
5987 if (Callback) | |
5988 (Callback) (parent_win, Identifier, INFO_TIMEOUT); | |
5989 | |
5990 return 0; | |
5991 } | |
5992 | |
5993 /******************************************************************************* | |
5994 | |
5995 $Function: dialog_ext_info_kbd_cb | |
5996 | |
5997 $Description: | |
5998 | |
5999 $Returns: | |
6000 | |
6001 $Arguments: | |
6002 | |
6003 *******************************************************************************/ | |
6004 | |
6005 static int dialog_ext_info_kbd_cb (T_MFW_EVENT event, T_MFW_KBD *keyboard) | |
6006 { | |
6007 T_MFW_HND win = mfw_parent (mfw_header()); | |
6008 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; | |
6009 T_dialog_ext_info * data = (T_dialog_ext_info *)win_data->user; | |
6010 T_MFW_HND parent_win = data->parent_win; | |
6011 USHORT Identifier = data->Identifier; | |
6012 void (* Callback)() = data->Callback; | |
6013 | |
6014 TRACE_FUNCTION("dialog_ext_info_kbd_cb"); | |
6015 | |
6016 switch (keyboard->code) | |
6017 { | |
6018 case KCD_LEFT: | |
6019 if (data->KeyEvents & KEY_LEFT) | |
6020 { | |
6021 dialog_ext_info_destroy (win); | |
6022 if (Callback) | |
6023 (Callback) (parent_win, Identifier, INFO_KCD_LEFT); | |
6024 } | |
6025 break; | |
6026 | |
6027 case KCD_RIGHT: | |
6028 if (data->KeyEvents & KEY_RIGHT) | |
6029 { | |
6030 dialog_ext_info_destroy (win); | |
6031 if (Callback) | |
6032 (Callback) (parent_win, Identifier, INFO_KCD_RIGHT); | |
6033 } | |
6034 break; | |
6035 | |
6036 case KCD_HUP: | |
6037 if (data->KeyEvents & KEY_CLEAR) | |
6038 { | |
6039 dialog_ext_info_destroy (win); | |
6040 if (Callback) | |
6041 (Callback) (parent_win, Identifier, INFO_KCD_HUP); | |
6042 } | |
6043 break; | |
6044 /* dialog_ext_info_destroy (win); */ /* Unreachable Code - x0020906 - 24-08-2006 */ | |
6045 | |
6046 case KCD_MNUUP: | |
6047 dialog_ext_info_destroy (win); | |
6048 if (Callback) | |
6049 (Callback) (parent_win, Identifier, INFO_KCD_UP); | |
6050 break; | |
6051 | |
6052 case KCD_MNUDOWN: | |
6053 dialog_ext_info_destroy (win); | |
6054 if (Callback) | |
6055 (Callback) (parent_win, Identifier, INFO_KCD_DOWN); | |
6056 break; | |
6057 | |
6058 default: | |
6059 return MFW_EVENT_PASSED; | |
6060 } | |
6061 return MFW_EVENT_CONSUMED; | |
6062 } | |
6063 | |
6064 /******************************************************************************* | |
6065 | |
6066 $Function: dialog_ext_info_kbd_long_cb | |
6067 | |
6068 $Description: | |
6069 | |
6070 $Returns: | |
6071 | |
6072 $Arguments: | |
6073 | |
6074 *******************************************************************************/ | |
6075 | |
6076 | |
6077 | |
6078 | |
6079 | |
6080 | |
6081 static int dialog_ext_info_kbd_long_cb (T_MFW_EVENT e, T_MFW_KBD *k) | |
6082 { | |
6083 T_MFW_HND win = mfw_parent (mfw_header()); | |
6084 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; | |
6085 T_dialog_ext_info * data = (T_dialog_ext_info *)win_data->user; | |
6086 T_MFW_HND parent_win = data->parent_win; | |
6087 USHORT Identifier = data->Identifier; | |
6088 void (* Callback)() = data->Callback; | |
6089 | |
6090 TRACE_FUNCTION("dialog_ext_info_kbd_long_cb"); | |
6091 | |
6092 switch (k->code) | |
6093 { | |
6094 case KCD_MNUUP: | |
6095 dialog_ext_info_destroy (win); | |
6096 if (Callback) | |
6097 (Callback) (parent_win, Identifier, INFO_KCD_UP); | |
6098 break; | |
6099 | |
6100 case KCD_MNUDOWN: | |
6101 dialog_ext_info_destroy (win); | |
6102 if (Callback) | |
6103 (Callback) (parent_win, Identifier, INFO_KCD_DOWN); | |
6104 break; | |
6105 } | |
6106 /* | |
6107 * Consume all long key presses | |
6108 */ | |
6109 return MFW_EVENT_CONSUMED; | |
6110 | |
6111 } | |
6112 | |
6113 /******************************************************************************* | |
6114 | |
6115 $Function: services_input_create | |
6116 | |
6117 $Description: | |
6118 | |
6119 $Returns: | |
6120 | |
6121 $Arguments: | |
6122 | |
6123 *******************************************************************************/ | |
6124 | |
6125 | |
6126 | |
6127 | |
6128 static T_MFW_HND services_input_create(MfwHnd parent){ | |
6129 | |
6130 | |
6131 T_MFW_WIN * win_data; | |
6132 T_services_input * data = (T_services_input *)ALLOC_MEMORY (sizeof (T_services_input)); | |
6133 | |
6134 | |
6135 | |
6136 TRACE_FUNCTION ("services_input_create()"); | |
6137 | |
6138 data->win = win_create (parent, 0, E_WIN_VISIBLE, (T_MFW_CB)services_input_win_cb); | |
6139 | |
6140 if (data->win EQ 0) | |
6141 return 0; | |
6142 | |
6143 /* | |
6144 * Create window handler | |
6145 */ | |
6146 data->mmi_control.dialog = (T_DIALOG_FUNC)services_input; | |
6147 data->mmi_control.data = data; | |
6148 win_data = ((T_MFW_HDR *)data->win)->data; | |
6149 win_data->user = (void *)data; | |
6150 | |
6151 /* | |
6152 * return window handle | |
6153 */ | |
6154 | |
6155 /* SPR#1428 - SH - New Editor changes - no longer required */ | |
6156 #ifndef NEW_EDITOR | |
6157 data->kbd = kbdCreate(data->win,KEY_ALL,(MfwCb)services_input_kbd_cb); | |
6158 data->kbd_long = kbdCreate(data->win,KEY_ALL|KEY_LONG,(MfwCb)services_input_kbd_long_cb); | |
6159 #endif /* ifndef NEW_EDITOR */ | |
6160 | |
6161 data->parent_win = parent; | |
6162 | |
6163 return data->win; | |
6164 | |
6165 } | |
6166 | |
6167 | |
6168 /******************************************************************************* | |
6169 | |
6170 $Function: services_input_destroy | |
6171 | |
6172 $Description: | |
6173 | |
6174 $Returns: | |
6175 | |
6176 $Arguments: | |
6177 | |
6178 *******************************************************************************/ | |
6179 | |
6180 | |
6181 | |
6182 | |
6183 | |
6184 static void services_input_destroy(MfwHnd window){ | |
6185 T_MFW_WIN * win = ((T_MFW_HDR *)window)->data; | |
6186 T_services_input * data = (T_services_input *)win->user; | |
6187 | |
6188 TRACE_FUNCTION ("services_input_destroy()"); | |
6189 | |
6190 if (window == NULL) | |
6191 { | |
6192 TRACE_EVENT ("Error : Called with NULL Pointer"); | |
6193 return; | |
6194 } | |
6195 | |
6196 if (data) | |
6197 { | |
6198 /* SPR#1428 - SH - Destroy new editor */ | |
6199 #ifdef NEW_EDITOR | |
6200 AUI_edit_Destroy(data->edit_win); | |
6201 #else /* NEW_EDITOR */ | |
6202 editDeactivate(); | |
6203 #endif /* NEW_EDITOR */ | |
6204 | |
6205 winDelete (data->win); | |
6206 /* * Free Memory | |
6207 */ | |
6208 FREE_MEMORY ((void *)data, sizeof (T_services_input)); | |
6209 } | |
6210 } | |
6211 | |
6212 | |
6213 /******************************************************************************* | |
6214 | |
6215 $Function: services_input_start | |
6216 | |
6217 $Description: | |
6218 | |
6219 $Returns: | |
6220 | |
6221 $Arguments: | |
6222 | |
6223 *******************************************************************************/ | |
6224 | |
6225 | |
6226 static MfwHnd services_input_start(MfwHnd parent,T_input_properties *properties) | |
6227 { | |
6228 | |
6229 T_MFW_HND win; | |
6230 TRACE_FUNCTION ("services_input_start()"); | |
6231 | |
6232 win = services_input_create (parent); | |
6233 | |
6234 if (win NEQ NULL) | |
6235 { | |
6236 SEND_EVENT (win, SERVICES_INPUT_INIT, 0, properties); | |
6237 } | |
6238 return win; | |
6239 } | |
6240 | |
6241 | |
6242 /******************************************************************************* | |
6243 | |
6244 $Function: services_input | |
6245 | |
6246 $Description: | |
6247 | |
6248 $Returns: | |
6249 | |
6250 $Arguments: | |
6251 | |
6252 *******************************************************************************/ | |
6253 | |
6254 | |
6255 void services_input (T_MFW_HND win, USHORT event, SHORT value, void * parameter) | |
6256 { | |
6257 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; | |
6258 T_services_input * data = (T_services_input *)win_data->user; | |
6259 | |
6260 T_input_properties* properties = (T_input_properties*) parameter; | |
6261 #ifdef NEW_EDITOR | |
6262 T_AUI_EDITOR_DATA editor_data; | |
6263 #endif /* NEW_EDITOR */ | |
6264 | |
6265 TRACE_FUNCTION ("T_services_input()"); | |
6266 | |
6267 switch (event) | |
6268 { | |
6269 case SERVICES_INPUT_INIT: | |
6270 /* SPR#1428 - SH - New Editor changes - replace old custom editor | |
6271 * with a standard AUI Editor */ | |
6272 #ifdef NEW_EDITOR | |
6273 AUI_edit_SetDefault(&editor_data); | |
6274 AUI_edit_SetTextStr(&editor_data, properties->left_soft_key, properties->right_soft_key, properties->text, NULL); | |
6275 AUI_edit_SetEvents(&editor_data, 0, FALSE, FOREVER, properties->callback); | |
6276 //Oct 20, 2004 REF: CRR 25772 Deepa M.D | |
6277 //The alternate text string when the editor content is empty is set and | |
6278 //the change_rsk_on_empty flag is set to true. | |
6279 AUI_edit_SetAltTextStr(&editor_data, 1, TxtNames, TRUE, TxtSoftBack); | |
6280 AUI_edit_SetDisplay(&editor_data, SERVICE_CREATE_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); | |
6281 | |
6282 if (properties->abc) | |
6283 { | |
6284 AUI_edit_SetMode(&editor_data, ED_MODE_ALPHA, ED_CURSOR_BAR); | |
6285 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)ss_data.edt_buf_name, sizeof(ss_data.edt_buf_name)); | |
6286 } | |
6287 else | |
6288 { | |
6289 AUI_edit_SetMode(&editor_data, 0, ED_CURSOR_UNDERLINE); | |
6290 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)ss_data.edt_buf_number, sizeof(ss_data.edt_buf_number)); | |
6291 | |
6292 } | |
6293 TRACE_EVENT("SERVICES_INPUT_INIT"); | |
6294 | |
6295 data->edit_win = AUI_edit_Start(data->win, &editor_data); | |
6296 | |
6297 #else /*NEW_EDITOR*/ | |
6298 | |
6299 data->properties.abc = properties->abc; | |
6300 data->properties.text = properties->text; | |
6301 data->properties.edt_attr_input = properties->edt_attr_input; | |
6302 data->properties.left_soft_key = properties->left_soft_key; | |
6303 data->properties.right_soft_key = properties->right_soft_key; | |
6304 data->properties.callback = properties->callback; | |
6305 data->edt_input = edtCreate(data->win,data->properties.edt_attr_input,0,0); | |
6306 editDeactivate(); | |
6307 editActivate (data->edt_input,properties->abc); | |
6308 edtUnhide(data->edt_input); | |
6309 winShow(data->win); | |
6310 #endif /* NEW_EDITOR */ | |
6311 break; | |
6312 | |
6313 case SERVICES_INPUT_DESTROY: | |
6314 TRACE_FUNCTION("SERVICES_INPUT_DESTROY"); | |
6315 services_input_destroy(data->win); | |
6316 break; | |
6317 | |
6318 case DIVERT_PHBK_NUMBER: | |
6319 /* SPR#1428 - SH - New Editor changes - buffer changed, send event to | |
6320 * update editors */ | |
6321 #ifdef NEW_EDITOR | |
6322 { | |
6323 T_ATB_TEXT text; | |
6324 text.dcs = ATB_DCS_ASCII; | |
6325 text.data = (UBYTE *)parameter; | |
6326 text.len = ATB_string_Length(&text); | |
6327 SEND_EVENT(data->edit_win, E_ED_INSERT, 0, (void *)&text); | |
6328 } | |
6329 #else /* NEW_EDITOR */ | |
6330 strncpy(ss_data.edt_buf_number, (char *)parameter, strlen((char *)parameter)+1); | |
6331 #endif /* NEW_EDITOR */ | |
6332 break; | |
6333 default: | |
6334 return; | |
6335 } | |
6336 | |
6337 } | |
6338 | |
6339 | |
6340 /******************************************************************************* | |
6341 | |
6342 $Function: services_input_win_cb | |
6343 | |
6344 $Description: | |
6345 | |
6346 $Returns: | |
6347 | |
6348 $Arguments: | |
6349 | |
6350 *******************************************************************************/ | |
6351 | |
6352 static int services_input_win_cb (MfwEvt e, MfwWin *w){ | |
6353 /* Warning Removal - x0020906 - 24-08-2006 */ | |
6354 #ifndef NEW_EDITOR | |
6355 T_services_input * data = (T_services_input *)w->user; | |
6356 #endif | |
6357 | |
6358 //int i =0; // RAVI | |
6359 | |
6360 TRACE_FUNCTION ("services_input_win_cb()"); | |
6361 | |
6362 /* SPR#1428 - SH - New Editor changes - this window is now | |
6363 * invisible, AUI editor sits on top*/ | |
6364 #ifdef NEW_EDITOR | |
6365 return 0; | |
6366 #else /* NEW_EDITOR */ | |
6367 switch (e) | |
6368 { | |
6369 case MfwWinVisible: | |
6370 edtShow(data->edt_input); | |
6371 PROMPT(menuArea.px,menuArea.py,0,data->properties.text); | |
6372 displaySoftKeys(data->properties.left_soft_key,data->properties.right_soft_key); | |
6373 break; | |
6374 default: | |
6375 return 0; | |
6376 } | |
6377 #endif /* NEW_EDITOR */ | |
6378 | |
6379 /* return 1; */ /* Unreachable Code - x0020906 - 24-08-2006 */ | |
6380 | |
6381 } | |
6382 | |
6383 | |
6384 /* SPR#1428 - SH - New Editor changes - no longer required*/ | |
6385 #ifndef NEW_EDITOR | |
6386 /******************************************************************************* | |
6387 | |
6388 $Function: services_input_kbd_cb | |
6389 | |
6390 $Description: | |
6391 | |
6392 $Returns: | |
6393 | |
6394 $Arguments: | |
6395 | |
6396 *******************************************************************************/ | |
6397 | |
6398 static int services_input_kbd_cb (MfwEvt e, MfwKbd *k){ | |
6399 | |
6400 | |
6401 T_MFW_HND win = mfwParent(mfw_header()); | |
6402 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; | |
6403 T_services_input * data = (T_services_input *)win_data->user; | |
6404 | |
6405 TRACE_FUNCTION ("services_input_kbd_cb()"); | |
6406 | |
6407 if (activeEditor() NEQ data->edt_input) | |
6408 editActivate(data->edt_input,data->properties.abc); | |
6409 | |
6410 switch (k->code) | |
6411 { | |
6412 case KCD_MNUUP: | |
6413 edtChar(data->edt_input,ecRight); | |
6414 break; | |
6415 | |
6416 case KCD_MNUDOWN: | |
6417 edtChar(data->edt_input,ecLeft); | |
6418 break; | |
6419 | |
6420 case KCD_LEFT: | |
6421 TRACE_FUNCTION("left key pressed"); | |
6422 data->properties.callback(data->parent_win,SERVICES_INPUT_LEFT); | |
6423 break; | |
6424 | |
6425 case KCD_HUP: | |
6426 /* if edit field is empty then exit, else delete one char */ | |
6427 data->properties.callback(data->parent_win,SERVICES_INPUT_CLEAR); | |
6428 | |
6429 if (strlen(data->properties.edt_attr_input->text) > 0) | |
6430 { | |
6431 edtChar(data->edt_input,ecBack); | |
6432 if(strlen(data->properties.edt_attr_input->text) == 0) | |
6433 data->properties.right_soft_key=TxtContacts; | |
6434 else | |
6435 data->properties.right_soft_key=TxtDelete; | |
6436 winShow(data->win); | |
6437 } | |
6438 else | |
6439 services_input_destroy(data->win); | |
6440 break; | |
6441 | |
6442 case KCD_RIGHT: | |
6443 // Check if there is a digit in the edit buffer softkey should be delete. | |
6444 if (strlen(data->properties.edt_attr_input->text) > 0) | |
6445 { | |
6446 edtChar(data->edt_input,ecBack); | |
6447 if(strlen(data->properties.edt_attr_input->text) == 0) | |
6448 { | |
6449 data->properties.right_soft_key=TxtContacts; | |
6450 winShow(data->win); | |
6451 } | |
6452 } | |
6453 else | |
6454 { | |
6455 // MZ 26/02/01 services_input_destroy(data->win); | |
6456 // Activate phone book . | |
6457 if (bookPhoneBookLoading()==BOOK_SUCCESS) | |
6458 { | |
6459 T_MFW_HND phbk_win; | |
6460 phbk_win = bookPhonebookStart(data->win,PhbkFromDivert); | |
6461 } | |
6462 | |
6463 } | |
6464 | |
6465 break; | |
6466 default: | |
6467 editEventKey (e,k); | |
6468 if(strlen(data->properties.edt_attr_input->text) > 0) | |
6469 data->properties.right_soft_key=TxtDelete; | |
6470 else | |
6471 data->properties.right_soft_key=TxtContacts; | |
6472 winShow(data->win); | |
6473 | |
6474 break; | |
6475 } | |
6476 return MFW_EVENT_CONSUMED; | |
6477 } | |
6478 | |
6479 | |
6480 /******************************************************************************* | |
6481 | |
6482 $Function: services_input_kbd_long_cb | |
6483 | |
6484 $Description: | |
6485 | |
6486 $Returns: | |
6487 | |
6488 $Arguments: | |
6489 | |
6490 *******************************************************************************/ | |
6491 | |
6492 | |
6493 | |
6494 | |
6495 static int services_input_kbd_long_cb (MfwEvt e, MfwKbd *k){ | |
6496 | |
6497 T_MFW_HND win = mfwParent(mfw_header()); | |
6498 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; | |
6499 T_services_input * data = (T_services_input *)win_data->user; | |
6500 | |
6501 | |
6502 if ((e & KEY_CLEAR) && (e & KEY_LONG)) | |
6503 { | |
6504 edtClear(data->edt_input); | |
6505 services_input_destroy(data->win); | |
6506 return MFW_EVENT_CONSUMED; | |
6507 } | |
6508 return MFW_EVENT_CONSUMED; | |
6509 } | |
6510 | |
6511 | |
6512 /******************************************************************************* | |
6513 | |
6514 $Function: services_number_input_cb | |
6515 | |
6516 $Description: | |
6517 | |
6518 $Returns: | |
6519 | |
6520 $Arguments: | |
6521 | |
6522 *******************************************************************************/ | |
6523 | |
6524 void services_number_input_cb(T_MFW_HND win, UBYTE identifier, USHORT reason){ | |
6525 | |
6526 switch(reason){ | |
6527 | |
6528 case SERVICES_INPUT_LEFT: | |
6529 break; | |
6530 case SERVICES_INPUT_RIGHT: | |
6531 break; | |
6532 case SERVICES_INPUT_CLEAR: | |
6533 break; | |
6534 default: | |
6535 return; | |
6536 } | |
6537 } | |
6538 | |
6539 #endif /* ifndef NEW_EDITOR */ | |
6540 | |
6541 | |
6542 /******************************************************************************* | |
6543 | |
6544 $Function: servicesCallBarringCheck | |
6545 | |
6546 $Description: | |
6547 | |
6548 $Returns: | |
6549 | |
6550 $Arguments: | |
6551 | |
6552 *******************************************************************************/ | |
6553 | |
6554 | |
6555 void servicesCallBarringCheck(void) | |
6556 { | |
6557 char SS_string[60] = {'\0'}; | |
6558 | |
6559 TRACE_FUNCTION("servicesCallBarringCheck"); | |
6560 | |
6561 CBAction = CBCheck; | |
6562 | |
6563 getCBAction(SS_string); | |
6564 getCBType(SS_string); | |
6565 | |
6566 //x0pleela 23 Aug, 2006 DR: OMAPS00090419 | |
6567 //Removing the below code as it doesn't result in a valid SS. | |
6568 //x0pleela 25 May, 2006 DR: OMAPS00070657 | |
6569 //#ifdef FF_CPHS | |
6570 // getCBService(SS_string); | |
6571 //#endif | |
6572 SS_string[strlen(SS_string)-1] = '#'; | |
6573 | |
6574 TRACE_FUNCTION(SS_string); | |
6575 | |
6576 if (ss_execute_transaction((UBYTE*)SS_string, 0) == MFW_SS_FAIL) | |
6577 showFailed( ss_data.win ); | |
6578 | |
6579 } | |
6580 | |
6581 /******************************************************************************* | |
6582 | |
6583 $Function: servicesCallBarringDeactivate | |
6584 | |
6585 $Description: | |
6586 | |
6587 $Returns: | |
6588 | |
6589 $Arguments: | |
6590 | |
6591 *******************************************************************************/ | |
6592 | |
6593 | |
6594 | |
6595 void servicesCallBarringDeactivate(void) | |
6596 { | |
6597 char SS_string[60] = {'\0'}; | |
6598 | |
6599 TRACE_FUNCTION("servicesCallBarringDeactivate"); | |
6600 | |
6601 CBAction = CBDeactivate; | |
6602 | |
6603 getCBAction(SS_string); | |
6604 getCBType(SS_string); | |
6605 getCBPassword(SS_string); | |
6606 | |
6607 //x0pleela 23 Aug, 2006 DR: OMAPS00090419 | |
6608 //Removing the below code as it doesn't result in a valid SS. | |
6609 //x0pleela 25 May, 2006 DR: OMAPS00070657 | |
6610 //#ifdef FF_CPHS | |
6611 // getCBService(SS_string); | |
6612 //#endif | |
6613 | |
6614 //x0pleela 03 May, 2007 DR: OMAPs00129383 | |
6615 //Replaced BASIC_SERVICE_CODE with TELETELE_BEARER_SERVICE_CODE | |
6616 //to deactivate both Tele and Bearere services | |
6617 | |
6618 //June 21, 2004 - CRR:13650 - CBA : no basic service sent when using the menu | |
6619 //Adding the basic service code 10(all teleservices) to the SS string during deactivation | |
6620 strcat(SS_string,TELE_BEARER_SERVICE_CODE); | |
6621 SS_string[strlen(SS_string)] = '#'; | |
6622 | |
6623 TRACE_FUNCTION(SS_string); | |
6624 | |
6625 if (ss_execute_transaction((UBYTE*)SS_string, 0) == MFW_SS_FAIL) | |
6626 showFailed( ss_data.win ); | |
6627 | |
6628 | |
6629 } | |
6630 | |
6631 //Jun 02,2004 CRR:13649 xpradipg-SASKEN | |
6632 /******************************************************************************* | |
6633 | |
6634 $Function: servicesCallBarringDeactivatePassword | |
6635 | |
6636 $Description: Sets the flag for deactivating the selected barring service and prompts for the password | |
6637 | |
6638 $Returns: | |
6639 | |
6640 $Arguments: | |
6641 | |
6642 *******************************************************************************/ | |
6643 | |
6644 void servicesCallBarringDeactivatePassword(void) | |
6645 { | |
6646 | |
6647 CBFlag=CBDeactivate; | |
6648 requestCBPassword(); | |
6649 } | |
6650 | |
6651 /******************************************************************************* | |
6652 | |
6653 $Function: servicesCallBarringActivate | |
6654 | |
6655 $Description: | |
6656 | |
6657 $Returns: | |
6658 | |
6659 $Arguments: | |
6660 | |
6661 *******************************************************************************/ | |
6662 | |
6663 | |
6664 void servicesCallBarringActivate(void) | |
6665 { | |
6666 char SS_string[60] = {'\0'}; | |
6667 | |
6668 TRACE_FUNCTION("servicesCallBarringActivate"); //SPR#1038 - DS - Changed from DeActivate to Activate. | |
6669 | |
6670 CBAction = CBActivate; | |
6671 | |
6672 getCBAction(SS_string); | |
6673 getCBType(SS_string); | |
6674 getCBPassword(SS_string); | |
6675 //x0pleela 23 Aug, 2006 DR: OMAPS00090419 | |
6676 //Removing the below code as it doesn't result in a valid SS. | |
6677 //x0pleela 25 May, 2006 DR: OMAPS00070657 | |
6678 //#ifdef FF_CPHS | |
6679 // getCBService(SS_string); | |
6680 //#endif | |
6681 | |
6682 //x0pleela 03 May, 2007 DR: OMAPs00129383 | |
6683 //Replaced BASIC_SERVICE_CODE with TELETELE_BEARER_SERVICE_CODE | |
6684 //to activate both Tele and Bearere services | |
6685 | |
6686 //June 21, 2004 - CRR:13650 - CBA : no basic service sent when using the menu | |
6687 //Adding the basic service code 10(all teleservices) to the SS string during activation | |
6688 strcat(SS_string,TELE_BEARER_SERVICE_CODE); | |
6689 SS_string[strlen(SS_string)] = '#'; | |
6690 | |
6691 TRACE_FUNCTION(SS_string); | |
6692 | |
6693 if (ss_execute_transaction((UBYTE*)SS_string, 0) == MFW_SS_FAIL) | |
6694 showFailed( ss_data.win ); | |
6695 | |
6696 } | |
6697 | |
6698 //Jun 02,2004 CRR:13649 xpradipg-SASKEN | |
6699 /******************************************************************************* | |
6700 | |
6701 $Function: servicesCallBarringActivatePassword | |
6702 | |
6703 $Description: Sets the flag for activating the selected barring service and prompts for the password | |
6704 | |
6705 $Returns: | |
6706 | |
6707 $Arguments: | |
6708 | |
6709 *******************************************************************************/ | |
6710 | |
6711 void servicesCallBarringActivatePassword(void) | |
6712 { | |
6713 | |
6714 CBFlag=CBActivate; | |
6715 requestCBPassword(); | |
6716 } | |
6717 | |
6718 | |
6719 /******************************************************************************* | |
6720 | |
6721 $Function: servicesCallBarringCancelAll | |
6722 | |
6723 $Description: | |
6724 | |
6725 $Returns: | |
6726 | |
6727 $Arguments: | |
6728 | |
6729 *******************************************************************************/ | |
6730 | |
6731 | |
6732 void servicesCallBarringCancelAll(void) | |
6733 { | |
6734 char SS_string[60] = {'\0'}; | |
6735 | |
6736 TRACE_FUNCTION("servicesCallBarringCancelAll"); | |
6737 | |
6738 | |
6739 strcat(SS_string, "#330*"); | |
6740 getCBPassword(SS_string); | |
6741 SS_string[strlen(SS_string)-1] = '#'; | |
6742 | |
6743 TRACE_FUNCTION(SS_string); | |
6744 | |
6745 if (ss_execute_transaction((UBYTE*)SS_string, 0) == MFW_SS_FAIL) | |
6746 showFailed( ss_data.win ); | |
6747 | |
6748 } | |
6749 | |
6750 //Jun 02,2004 CRR:13649 xpradipg-SASKEN | |
6751 /******************************************************************************* | |
6752 | |
6753 $Function: servicesCallBarringCancelAllPassword | |
6754 | |
6755 $Description: Sets the flag for cancelling all barring service and prompts for the password | |
6756 | |
6757 $Returns: | |
6758 | |
6759 $Arguments: | |
6760 | |
6761 *******************************************************************************/ | |
6762 void servicesCallBarringCancelAllPassword(void) | |
6763 { | |
6764 CBFlag=CBCancelAll; | |
6765 requestCBPassword(); | |
6766 } | |
6767 | |
6768 | |
6769 /******************************************************************************* | |
6770 | |
6771 $Function: getCBAction | |
6772 | |
6773 $Description: | |
6774 | |
6775 $Returns: | |
6776 | |
6777 $Arguments: | |
6778 | |
6779 *******************************************************************************/ | |
6780 | |
6781 | |
6782 static void getCBAction(char * pSSstring) | |
6783 { | |
6784 switch (CBAction) | |
6785 { | |
6786 case CBActivate: | |
6787 strcpy(pSSstring, "*"); | |
6788 break; | |
6789 case CBDeactivate: | |
6790 strcpy(pSSstring, "#"); | |
6791 break; | |
6792 case CBCheck: | |
6793 strcpy(pSSstring, "*#"); | |
6794 break; | |
6795 default: | |
6796 break; | |
6797 } | |
6798 } | |
6799 | |
6800 /******************************************************************************* | |
6801 | |
6802 $Function: getCBType | |
6803 | |
6804 $Description: | |
6805 | |
6806 $Returns: | |
6807 | |
6808 $Arguments: | |
6809 | |
6810 *******************************************************************************/ | |
6811 | |
6812 | |
6813 static void getCBType(char* pSSstring) | |
6814 { | |
6815 | |
6816 | |
6817 switch (CBType) | |
6818 { | |
6819 case CBAllOutgoing: | |
6820 strcat(pSSstring, "33*"); | |
6821 break; | |
6822 case CBInternational: | |
6823 strcat(pSSstring, "331*"); | |
6824 break; | |
6825 case CBAllIncoming: | |
6826 strcat(pSSstring, "35*"); | |
6827 break; | |
6828 case CBInternationalHome: | |
6829 strcat(pSSstring, "332*"); | |
6830 break; | |
6831 case CBIncomingRoaming: | |
6832 strcat(pSSstring, "351*"); | |
6833 break; | |
6834 default: | |
6835 break; | |
6836 } | |
6837 } | |
6838 | |
6839 /******************************************************************************* | |
6840 | |
6841 $Function: getCBPassword | |
6842 | |
6843 $Description: | |
6844 | |
6845 $Returns: | |
6846 | |
6847 $Arguments: | |
6848 | |
6849 *******************************************************************************/ | |
6850 | |
6851 | |
6852 static void getCBPassword(char* pSSstring) | |
6853 { | |
6854 TRACE_FUNCTION("getCBPassword"); | |
6855 strcat(pSSstring, (char*)ss_data.edt_buf_cb_password); | |
6856 strcat(pSSstring, "*"); | |
6857 } | |
6858 | |
6859 #if(0) /* x0039928 - Lint warning removal */ | |
6860 /******************************************************************************* | |
6861 | |
6862 $Function: getCBService | |
6863 | |
6864 $Description: | |
6865 | |
6866 $Returns: | |
6867 | |
6868 $Arguments: | |
6869 | |
6870 *******************************************************************************/ | |
6871 //x0pleela 25 May, 2006 DR: OMAPS00070657 | |
6872 #ifdef FF_CPHS | |
6873 static void getCBService(char * pSSstring) | |
6874 { | |
6875 int nservice; | |
6876 nservice =GetAlsLine(); | |
6877 switch (nservice) | |
6878 { | |
6879 case CBVoice: | |
6880 strcat(pSSstring, "*11"); //SPR#0776 - DS -changed from 10 to 11 | |
6881 break; | |
6882 /*MC SPR 742, handle line 2, auxiliary telephony*/ | |
6883 case CBAuxVoice: | |
6884 strcat(pSSstring, "*89"); | |
6885 break; | |
6886 default: | |
6887 break; | |
6888 } | |
6889 } | |
6890 #endif | |
6891 #endif | |
6892 | |
6893 //CQ-16432 start | |
6894 /******************************************************************************* | |
6895 | |
6896 $Function: requestSatCBPassword | |
6897 | |
6898 $Description: | |
6899 | |
6900 $Returns: | |
6901 | |
6902 $Arguments: | |
6903 | |
6904 *******************************************************************************/ | |
6905 | |
6906 | |
6907 | |
6908 void requestSatCBPassword(void) | |
6909 { | |
6910 | |
6911 | |
6912 #ifdef NEW_EDITOR | |
6913 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor changes */ | |
6914 #else /* NEW_EDITOR */ | |
6915 T_EDITOR_DATA editor_data; | |
6916 #endif /* NEW_EDITOR */ | |
6917 T_MFW_HND win = mfw_parent(mfw_header()); | |
6918 /* T_MFW_HND satPswdWin; */ /* Not Used - warning removal */ /*x0020906 - 24-08-2006 */ | |
6919 TRACE_FUNCTION("requestSatCBPassword"); | |
6920 //SPR#1014 - DS - Reset editor data | |
6921 memset(&editor_data, '\0', sizeof(editor_data)); | |
6922 | |
6923 /* | |
6924 * Setup an editor to display a string | |
6925 */ | |
6926 | |
6927 memset(satPassword,'\0',sizeof(satPassword)); | |
6928 | |
6929 /* SPR#1428 - SH - New Editor changes */ | |
6930 #ifdef NEW_EDITOR | |
6931 TRACE_FUNCTION("New editor is defined"); | |
6932 AUI_edit_SetDefault(&editor_data); | |
6933 AUI_edit_SetDisplay(&editor_data, RPWD_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); | |
6934 AUI_edit_SetMode(&editor_data, ED_MODE_HIDDEN, ED_CURSOR_UNDERLINE); | |
6935 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)satPassword, CB_PSW_LEN+1); | |
6936 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtSoftBack, TxtPassword, NULL); | |
6937 AUI_edit_SetAltTextStr(&editor_data, CB_PSW_LEN, TxtNull, FALSE, TxtNull); | |
6938 AUI_edit_SetEvents(&editor_data, CBEnterSatPassword, TRUE, FOREVER, (T_AUI_EDIT_CB)CB_password_cb); | |
6939 /* satPswdWin = AUI_edit_Start(win, &editor_data); */ /* start the editor */ /* Warning Removal - x0020906 - 24-08-2006*/ | |
6940 AUI_edit_Start(win, &editor_data); /* start the editor */ | |
6941 TRACE_EVENT_P1("satPassword contents: %s",satPassword); | |
6942 #else /* NEW_EDITOR */ | |
6943 TRACE_FUNCTION("New editor is not defined"); | |
6944 bookSetEditAttributes( RPWD_EDITOR, COLOUR_EDITOR_XX, 0, edtCurBar1, 0, | |
6945 (char*)ss_data.edt_buf_cb_password,CB_PSW_LEN+1, &editor_data.editor_attr ); | |
6946 editor_data.LeftSoftKey = TxtSoftOK; | |
6947 editor_data.AlternateLeftSoftKey = TxtNull; | |
6948 editor_data.RightSoftKey = TxtSoftBack; | |
6949 editor_data.hide = TRUE; | |
6950 editor_data.mode = DIGITS_MODE; | |
6951 editor_data.timeout = FOREVER; | |
6952 editor_data.Identifier = CBCheckPassword; | |
6953 editor_data.destroyEditor = TRUE; | |
6954 editor_data.Callback = (T_EDIT_CB)CB_password_cb; | |
6955 editor_data.TextId = TxtPassword; | |
6956 editor_data.TextString = NULL; | |
6957 editor_data.min_enter = CB_PSW_LEN; | |
6958 editor_data.destroyEditor = TRUE; | |
6959 ss_data.info_win = editor_start(ss_data.win, &editor_data); | |
6960 #endif /* NEW_EDITOR */ | |
6961 | |
6962 } | |
6963 //CQ-16432 end | |
6964 | |
6965 /******************************************************************************* | |
6966 | |
6967 $Function: requestCBPassword | |
6968 | |
6969 $Description: | |
6970 | |
6971 $Returns: | |
6972 | |
6973 $Arguments: | |
6974 | |
6975 *******************************************************************************/ | |
6976 | |
6977 | |
6978 | |
6979 void requestCBPassword(void) | |
6980 { | |
6981 #ifdef NEW_EDITOR | |
6982 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor changes */ | |
6983 #else /* NEW_EDITOR */ | |
6984 T_EDITOR_DATA editor_data; | |
6985 #endif /* NEW_EDITOR */ | |
6986 TRACE_FUNCTION("requestCBPassword"); | |
6987 //SPR#1014 - DS - Reset editor data | |
6988 memset(&editor_data, '\0', sizeof(editor_data)); | |
6989 | |
6990 /* | |
6991 * Setup an editor to display a string | |
6992 */ | |
6993 | |
6994 memset(ss_data.edt_buf_cb_password,'\0',sizeof(ss_data.edt_buf_cb_password)); | |
6995 | |
6996 /* SPR#1428 - SH - New Editor changes */ | |
6997 #ifdef NEW_EDITOR | |
6998 TRACE_FUNCTION("NEW_EDITOR"); | |
6999 AUI_edit_SetDefault(&editor_data); | |
7000 AUI_edit_SetDisplay(&editor_data, RPWD_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); | |
7001 AUI_edit_SetMode(&editor_data, ED_MODE_HIDDEN, ED_CURSOR_UNDERLINE); | |
7002 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)ss_data.edt_buf_cb_password, CB_PSW_LEN+1); | |
7003 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtSoftBack, TxtPassword, NULL); | |
7004 AUI_edit_SetAltTextStr(&editor_data, CB_PSW_LEN, TxtNull, FALSE, TxtNull); | |
7005 AUI_edit_SetEvents(&editor_data, CBCheckPassword, TRUE, FOREVER, (T_AUI_EDIT_CB)CB_password_cb); | |
7006 | |
7007 ss_data.info_win = AUI_edit_Start(ss_data.win, &editor_data); /* start the editor */ | |
7008 #else /* NEW_EDITOR */ | |
7009 TRACE_FUNCTION("Old_editor"); | |
7010 bookSetEditAttributes( RPWD_EDITOR, COLOUR_EDITOR_XX, 0, edtCurBar1, 0, | |
7011 (char*)ss_data.edt_buf_cb_password,CB_PSW_LEN+1, &editor_data.editor_attr ); | |
7012 editor_data.LeftSoftKey = TxtSoftOK; | |
7013 editor_data.AlternateLeftSoftKey = TxtNull; | |
7014 editor_data.RightSoftKey = TxtSoftBack; | |
7015 editor_data.hide = TRUE; | |
7016 editor_data.mode = DIGITS_MODE; | |
7017 editor_data.timeout = FOREVER; | |
7018 editor_data.Identifier = CBCheckPassword; | |
7019 editor_data.destroyEditor = TRUE; | |
7020 editor_data.Callback = (T_EDIT_CB)CB_password_cb; | |
7021 editor_data.TextId = TxtPassword; | |
7022 editor_data.TextString = NULL; | |
7023 editor_data.min_enter = CB_PSW_LEN; | |
7024 editor_data.destroyEditor = TRUE; | |
7025 ss_data.info_win = editor_start(ss_data.win, &editor_data); | |
7026 #endif /* NEW_EDITOR */ | |
7027 } | |
7028 | |
7029 /******************************************************************************* | |
7030 | |
7031 $Function: CB_password_cb | |
7032 | |
7033 $Description: | |
7034 | |
7035 $Returns: | |
7036 | |
7037 $Arguments: | |
7038 | |
7039 *******************************************************************************/ | |
7040 | |
7041 | |
7042 | |
7043 static void CB_password_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason) | |
7044 { | |
7045 //16432 | |
7046 TRACE_FUNCTION("CB_password_cb"); | |
7047 switch (identifier) | |
7048 { | |
7049 case CBCheckPassword: | |
7050 //Jun 02,2004 CRR:13649 xpradipg-SASKEN | |
7051 //keyevents right and hangup are handled initially | |
7052 switch (reason) | |
7053 { | |
7054 case INFO_KCD_HUP: | |
7055 // Change by Sasken ( VadiRaj) on March 29th 2004 | |
7056 // Issue Number : MMI-SPR-12882 | |
7057 // Subject: No functionality for the right softkey. | |
7058 // Bug : No functionality for the right softkey | |
7059 // Solution : Added functionality for the right "BACK" softeky | |
7060 case INFO_KCD_RIGHT: | |
7061 ss_data.info_win = 0; | |
7062 CBFlag=CBActionNone;; | |
7063 break; | |
7064 default: | |
7065 break; | |
7066 } | |
7067 //Jun 02,2004 CRR:13649 xpradipg-SASKEN | |
7068 //depending on the action selected by the user the respective functions are invoked | |
7069 switch(CBFlag) | |
7070 { | |
7071 case CBDeactivate: | |
7072 CBFlag=CBActionNone; //reset the flag | |
7073 servicesCallBarringDeactivate(); //initiates the callbarring deactivation for the selected service | |
7074 break; | |
7075 case CBActivate: | |
7076 CBFlag=CBActionNone; //reset the flag | |
7077 servicesCallBarringActivate(); //initiates the callbarring activation for the selected service | |
7078 break; | |
7079 case CBCancelAll: | |
7080 CBFlag=CBActionNone; //reset the flag | |
7081 servicesCallBarringCancelAll(); //initiates the cancelling of all barring services | |
7082 break; | |
7083 case CBNewPassword: | |
7084 CBFlag=CBActionNone; //reset the flag | |
7085 enterNewCBPassword(); //prompt for the new password | |
7086 break; | |
7087 default: | |
7088 CBFlag=CBActionNone;; | |
7089 break; | |
7090 } | |
7091 ss_data.info_win = 0; | |
7092 break; | |
7093 case CBNewPassword: | |
7094 ss_data.info_win = 0; | |
7095 switch (reason) | |
7096 { | |
7097 case INFO_KCD_LEFT: | |
7098 confirmNewCBPassword(); | |
7099 break; | |
7100 default: | |
7101 break; | |
7102 } | |
7103 break; | |
7104 case CBConfirmNewPassword: | |
7105 ss_data.info_win = 0; | |
7106 switch (reason) | |
7107 { | |
7108 case INFO_KCD_LEFT: | |
7109 changeCBPassword(); | |
7110 break; | |
7111 default: | |
7112 break; | |
7113 } | |
7114 break; | |
7115 //CQ-16432 start | |
7116 case CBEnterSatPassword: | |
7117 /*a0393213 warnings removal- CLCK_FAC_Ox changed to FAC_Ox as a result of ACI interface change*/ | |
7118 ss_set_clck(FAC_Ox, CLCK_MOD_NotPresent, satPassword, CLASS_NotPresent, MFW_MODUL_UNKNOWN); | |
7119 //CQ-16432 end | |
7120 break; | |
7121 default: | |
7122 break; | |
7123 } | |
7124 } | |
7125 | |
7126 //Jun 02,2004 CRR:13649 xpradipg-SASKEN | |
7127 /******************************************************************************* | |
7128 $Function: enterOldCBPassword | |
7129 | |
7130 $Description: sets flag for changing the barring password and prompts to enter the current | |
7131 barring password | |
7132 $Returns: | |
7133 | |
7134 $Arguments: | |
7135 | |
7136 *******************************************************************************/ | |
7137 | |
7138 void enterOldCBPassword(void) | |
7139 { | |
7140 CBFlag=CBNewPassword; | |
7141 requestCBPassword(); | |
7142 } | |
7143 | |
7144 /******************************************************************************* | |
7145 | |
7146 $Function: enterNewCBPassword | |
7147 | |
7148 $Description: | |
7149 | |
7150 $Returns: | |
7151 | |
7152 $Arguments: | |
7153 | |
7154 *******************************************************************************/ | |
7155 | |
7156 | |
7157 void enterNewCBPassword(void) | |
7158 { | |
7159 #ifdef NEW_EDITOR | |
7160 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ | |
7161 #else | |
7162 T_EDITOR_DATA editor_data; | |
7163 #endif | |
7164 | |
7165 //SPR#1014 - DS - Reset editor data | |
7166 memset(&editor_data, '\0', sizeof(editor_data)); | |
7167 memset(ss_data.edt_buf_cb_new_password,'\0',sizeof(ss_data.edt_buf_cb_new_password)); | |
7168 | |
7169 /* SPR#1428 - SH - New Editor changes */ | |
7170 #ifdef NEW_EDITOR | |
7171 AUI_edit_SetDefault(&editor_data); | |
7172 AUI_edit_SetDisplay(&editor_data, RPWD_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); | |
7173 AUI_edit_SetMode(&editor_data, ED_MODE_HIDDEN, ED_CURSOR_UNDERLINE); | |
7174 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)ss_data.edt_buf_cb_new_password, CB_PSW_LEN+1); | |
7175 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtSoftBack, TxtNewPassword, NULL); | |
7176 AUI_edit_SetAltTextStr(&editor_data, CB_PSW_LEN, TxtNull, FALSE, TxtNull); | |
7177 AUI_edit_SetEvents(&editor_data, CBNewPassword, TRUE, FOREVER, (T_AUI_EDIT_CB)CB_password_cb); | |
7178 | |
7179 ss_data.info_win = AUI_edit_Start(ss_data.win, &editor_data); /* start the editor */ | |
7180 #else /* NEW_EDITOR */ | |
7181 bookSetEditAttributes( RPWD_EDITOR, 0, 0, edtCurBar1, 0, | |
7182 (char*)ss_data.edt_buf_cb_new_password,CB_PSW_LEN+1, &editor_data.editor_attr ); | |
7183 editor_data.LeftSoftKey = TxtSoftOK; | |
7184 editor_data.AlternateLeftSoftKey = TxtNull; | |
7185 editor_data.RightSoftKey = TxtDelete; | |
7186 editor_data.hide = TRUE; | |
7187 editor_data.mode = DIGITS_MODE; | |
7188 editor_data.timeout = FOREVER; | |
7189 editor_data.Identifier = CBNewPassword; | |
7190 editor_data.destroyEditor = TRUE; | |
7191 editor_data.Callback = (T_EDIT_CB)CB_password_cb; | |
7192 editor_data.TextId = TxtNewPassword; | |
7193 editor_data.TextString = NULL; | |
7194 editor_data.min_enter = CB_PSW_LEN; | |
7195 editor_data.destroyEditor = TRUE; | |
7196 ss_data.info_win = editor_start(ss_data.win, &editor_data); | |
7197 #endif /* NEW_EDITOR */ | |
7198 } | |
7199 | |
7200 /******************************************************************************* | |
7201 | |
7202 $Function: confirmNewCBPassword | |
7203 | |
7204 $Description: | |
7205 | |
7206 $Returns: | |
7207 | |
7208 $Arguments: | |
7209 | |
7210 *******************************************************************************/ | |
7211 | |
7212 | |
7213 void confirmNewCBPassword(void) | |
7214 { | |
7215 #ifdef NEW_EDITOR | |
7216 T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ | |
7217 #else | |
7218 T_EDITOR_DATA editor_data; | |
7219 #endif | |
7220 | |
7221 //SPR#1014 - DS - Reset editor data. | |
7222 memset(&editor_data, '\0', sizeof(editor_data)); | |
7223 | |
7224 memset(ss_data.edt_buf_cb_conf_new_password,'\0',sizeof(ss_data.edt_buf_cb_conf_new_password)); | |
7225 | |
7226 /* SPR#1428 - SH - New Editor changes */ | |
7227 #ifdef NEW_EDITOR | |
7228 AUI_edit_SetDefault(&editor_data); | |
7229 AUI_edit_SetDisplay(&editor_data, RPWD_EDITOR, COLOUR_EDITOR_XX, EDITOR_FONT); | |
7230 AUI_edit_SetMode(&editor_data, ED_MODE_HIDDEN, ED_CURSOR_UNDERLINE); | |
7231 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)ss_data.edt_buf_cb_conf_new_password, CB_PSW_LEN+1); | |
7232 AUI_edit_SetTextStr(&editor_data, TxtSoftOK, TxtSoftBack, TxtConfirmPassword, NULL); | |
7233 AUI_edit_SetAltTextStr(&editor_data, CB_PSW_LEN, TxtNull, FALSE, TxtNull); | |
7234 AUI_edit_SetEvents(&editor_data, CBConfirmNewPassword, TRUE, FOREVER, (T_AUI_EDIT_CB)CB_password_cb); | |
7235 | |
7236 ss_data.info_win = AUI_edit_Start(ss_data.win, &editor_data); /* start the editor */ | |
7237 #else /* NEW_EDITOR */ | |
7238 bookSetEditAttributes( RPWD_EDITOR, 0, 0, edtCurBar1, 0, | |
7239 (char*)ss_data.edt_buf_cb_conf_new_password,CB_PSW_LEN+1, &editor_data.editor_attr ); | |
7240 editor_data.LeftSoftKey = TxtSoftOK; | |
7241 editor_data.AlternateLeftSoftKey = TxtNull; | |
7242 editor_data.RightSoftKey = TxtDelete; | |
7243 editor_data.hide = TRUE; | |
7244 editor_data.mode = DIGITS_MODE; | |
7245 editor_data.timeout = FOREVER; | |
7246 editor_data.Identifier = CBConfirmNewPassword; | |
7247 editor_data.destroyEditor = TRUE; | |
7248 editor_data.Callback = (T_EDIT_CB)CB_password_cb; | |
7249 editor_data.TextId = TxtConfirmPassword; | |
7250 editor_data.TextString = NULL; | |
7251 editor_data.min_enter = CB_PSW_LEN; | |
7252 editor_data.destroyEditor = TRUE; | |
7253 ss_data.info_win = editor_start(ss_data.win, &editor_data); | |
7254 #endif /* NEW_EDITOR */ | |
7255 | |
7256 } | |
7257 | |
7258 /******************************************************************************* | |
7259 | |
7260 $Function: changeCBPassword | |
7261 | |
7262 $Description: | |
7263 | |
7264 $Returns: | |
7265 | |
7266 $Arguments: | |
7267 | |
7268 *******************************************************************************/ | |
7269 | |
7270 | |
7271 void changeCBPassword(void){ | |
7272 | |
7273 char SS_string[60] = {'\0'}; | |
7274 T_DISPLAY_DATA display_info; | |
7275 | |
7276 TRACE_FUNCTION("changeCBPassword"); | |
7277 | |
7278 if (strcmp((char*)ss_data.edt_buf_cb_new_password, (char*)ss_data.edt_buf_cb_conf_new_password)) | |
7279 { | |
7280 /* | |
7281 ** The New and Confirm Passwords do not match, restart the process and display a dialog to | |
7282 ** explain. (The dialog is done second so that it will display on top of the new prompt) | |
7283 */ | |
7284 enterNewCBPassword(); | |
7285 | |
7286 // Jul 23, 2004 REF: CRR 16107 xvilliva | |
7287 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtPasswords, TxtMismatch, COLOUR_STATUS); | |
7288 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)services_info_cb, THREE_SECS, 0); | |
7289 display_info.Identifier = ServicesFailed; | |
7290 | |
7291 /* | |
7292 * Call Info Screen | |
7293 */ | |
7294 ss_data.info_win = info_dialog (ss_data.win, &display_info); | |
7295 } | |
7296 else | |
7297 { | |
7298 strcat(SS_string, "**03*330*"); | |
7299 strcat(SS_string,(char*)ss_data.edt_buf_cb_password); | |
7300 strcat(SS_string,"*"); | |
7301 strcat(SS_string,(char*)ss_data.edt_buf_cb_new_password); | |
7302 strcat(SS_string,"*"); | |
7303 strcat(SS_string,(char*)ss_data.edt_buf_cb_conf_new_password); | |
7304 strcat(SS_string,"#"); | |
7305 | |
7306 TRACE_FUNCTION(SS_string); | |
7307 | |
7308 if (ss_execute_transaction((UBYTE*)SS_string, 0) == MFW_SS_FAIL) | |
7309 showFailed( ss_data.win ); | |
7310 } | |
7311 | |
7312 | |
7313 } | |
7314 | |
7315 | |
7316 /******************************************************************************* | |
7317 | |
7318 $Function: featurePlaceholder | |
7319 | |
7320 $Description: Display screen dialog for not-yet-implemented features | |
7321 | |
7322 $Returns: None | |
7323 | |
7324 $Arguments: None | |
7325 | |
7326 //SPR#1113 - DS - Created function. | |
7327 | |
7328 *******************************************************************************/ | |
7329 | |
7330 void featurePlaceholder(void){ | |
7331 | |
7332 T_DISPLAY_DATA display_info ; | |
7333 | |
7334 TRACE_FUNCTION("featurePlaceholder"); | |
7335 | |
7336 display_info.LeftSoftKey = TxtSoftOK; | |
7337 display_info.RightSoftKey = 0; | |
7338 display_info.TextId = 0; | |
7339 display_info.TextId2 = 0; | |
7340 display_info.TextString = "Feature"; | |
7341 display_info.TextString2 = "Not Available"; | |
7342 display_info.Time = THREE_SECS; | |
7343 display_info.Identifier = 0; | |
7344 display_info.Callback = NULL; | |
7345 display_info.KeyEvents = KEY_CLEAR | KEY_LEFT | KEY_MNUUP | KEY_MNUDOWN; | |
7346 | |
7347 /* | |
7348 * Call Info Screen | |
7349 */ | |
7350 | |
7351 info_dialog(win, &display_info); | |
7352 | |
7353 } |