FreeCalypso > hg > fc-tourmaline
annotate src/ui/bmi/mmiAoc.c @ 211:96c7a4eed1df
.../power/board/power.c: rm trailing white space
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 22 Apr 2021 20:33:27 +0000 |
parents | db101b57af2d |
children |
rev | line source |
---|---|
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
3 CONDAT (UK) |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 ******************************************************************************** |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 This software product is the property of Condat (UK) Ltd and may not be |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 disclosed to any third party without the express permission of the owner. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 ******************************************************************************** |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
12 $Project name: Basic MMI |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
13 $Project code: BMI (6349) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
14 $Module: Advice of Charge |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
15 $File: MmiVoiceMemo.c |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
16 $Revision: 1.0 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
18 $Author: Condat(UK) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
19 $Date: 09/04/01 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 ******************************************************************************** |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 Description: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 This provides the start code for the MMI |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 ******************************************************************************** |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 $History: MmiAoc.c |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
29 May 26, 2006 ER: OMAPS00079607 x0012849 :Jagannatha M |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
30 Description: CPHS: Display 'charge/Timers' menu based on AOC ( Advice of charge ) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
31 Solution:Made the following changes |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
32 1. Based on the value of Aoc_flag it will be decided to disply 'charge/Timers' menu or not. |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
33 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
34 June 16, 2005 REF: CRR 31267 x0021334 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
35 Description: Handset ignore the initializtion of the PIN1/PIN2 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
36 Fix: Cheking is done to ascertain if PIN1/PIN2 are initialised. If not, appropriate |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
37 message is displayed to the user. |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
38 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
39 09/04/01 Original Condat(UK) BMI version. |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
40 May 25, 2004 REF: CRR MMI-SPR-17588 NISHIKANT KULKARNI |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
41 Issue description: On the SIM EF(ACMMax) is defined as 0xFFFFFF, so it should be possible to |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
42 enter 16777215, but only 999999 is accepted. |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
43 Solution: MAX_ENTER_LIMIT changed from 7 to 9. A check is done to verify that the entered |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
44 ACMmax value is less that 0xFFFFFF. Otherwise "Not Allowed" message is displayed. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 $End |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 Include files |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 #define ENTITY_MFW |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 /* includes */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 #include <string.h> |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 #include <stdio.h> |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 #include <stdlib.h> |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 #if defined (NEW_FRAME) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 #include "typedefs.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 #include "vsi.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 #include "pei.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 #include "custom.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 #include "gsm.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 #else |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 #include "STDDEFS.H" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 #include "custom.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 #include "gsm.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 #include "vsi.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 #include "mfw_sys.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 #include "cus_aci.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 #include "mfw_mfw.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 #include "mfw_win.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 #include "mfw_kbd.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 /* SPR#1428 - SH - New Editor changes */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 #ifndef NEW_EDITOR |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 #include "mfw_edt.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 #include "mfw_lng.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 #include "mfw_tim.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 #include "mfw_icn.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 #include "mfw_mnu.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 #include "mfw_phb.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 #include "mfw_cm.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 #include "mfw_sim.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 #include "mfw_nm.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 #include "mfw_sat.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 #include "mfw_ss.h" /*for convert*/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 #include "mfw_phb.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 #include "ksd.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 #include "psa.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 #include "mfw_sms.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 #include "mfw_cphs.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 #include "mfw_sat.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 #include "dspl.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 #include "MmiMmi.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 #include "MmiDummy.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 #include "MmiDialogs.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 /* SPR#1428 - SH - New Editor changes */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 #ifdef NEW_EDITOR |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 #include "ATBCommon.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 #include "ATBDisplay.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 #include "ATBEditor.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 #include "AUIEditor.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 #else /* NEW_EDITOR */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 #include "MmiEditor.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 #endif /* NEW_EDITOR */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 #include "MmiLists.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 #include "MmiIdle.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 #include "MmiSoftKeys.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 #include "Mmiicons.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 #include "MmiMenu.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 #include "MmiMain.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 #include "MmiStart.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 #include "MmiPins.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 #include "mmiColours.h" |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 // June 16, 2005 REF: CRR 31267 x0021334 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 // Added this BOOL variable to keep track of PIN2 requests. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 BOOL pin2Flag = FALSE; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 /******************************************************************************* |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
141 Local Data |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 *******************************************************************************/ |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
144 #define PIN_REQUEST_FOR_RATE 700 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
145 #define SERVICES_ENTER_CURRENCY 701 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
146 #define SERVICES_ONE_UNIT 702 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
147 #define SERVICES_RATE_CHANGED 703 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
148 #define SERVICES_CREDIT_REMAINING 704 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
149 #define PIN_REQUEST_FOR_LIMIT_CHANGE 705 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
150 #define PIN_REQUEST_FOR_LIMIT_CANCEL 706 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
151 #define SERVICES_LIMIT_VIEW 707 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
152 #define SERVICES_LIMIT_CHANGE 708 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
153 #define SERVICES_LIMIT_CANCEL 709 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
154 #define SERVICES_LIMIT_CHANGED 710 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
155 #define SERVICES_LAST_CHARGE 711 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
156 #define SERVICES_TOTAL_CHARGE 712 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
157 #define SERVICES_RESET_CHARGE 713 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
158 #define SERVICES_CHARGE_CHANGED 714 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
159 #define SERVICES_OUT_OF_RANGE 715 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
160 #define SERVICES_AOC_NOT_SUPPORTED 716 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
161 #define PIN_REQUEST_FOR_RESET_CHARGE 717 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
163 /* May 25, 2004 REF: CRR MMI-SPR-17588 NISHIKANT KULKARNI |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
164 MAX_ENTER_LIMIT changed from 7 to 9 to accept "Limit" values till 16777215 (0xFFFFFF) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
165 Previously, with MAX_ENTER_LIMIT set to 7, maximum 999999 could be entered as limit. |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
166 Effectively, the limit is MAX_ENTER_LIMIT - 1. The last character used for string termination. |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
167 Also, the maximum value that can be entered (0xFFFFFF) is # defined to MAX_ENTER_VALUE |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 /* Max. Enter of Character */ |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
170 #define MAX_ENTER_LIMIT 9 // xnkulkar SPR-17588 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 #define MAX_ENTER_CURRENCY 4 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 #define MAX_ENTER_UNIT 6 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
173 #define MAX_ENTER_VALUE 0xFFFFFF // xnkulkar SPR-17588 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 /* */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 typedef struct |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 { |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
179 T_MMI_CONTROL mmi_control; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
180 T_MFW_HND service_win; /* MFW win handler */ |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
181 T_MFW_CM_AOC_INFO aocInfo; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
182 USHORT Identifier; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
183 char edt_Buf[30]; /* Editor buffer */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 } T_SERVICES; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 LONG acm_last_call = 0; //accumulated call meter from the last call |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 //later the value should save and read again from PCM |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 #ifdef FF_CPHS |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 static UBYTE Aoc_flag = FALSE; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 /******************************************************************************* |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
196 Local prototypes |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 *******************************************************************************/ |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
199 T_MFW_HND service_Init (T_MFW_HND parent_window); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
200 void service_Exit (T_MFW_HND own_window); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
201 T_MFW_HND service_create (T_MFW_HND parent_window); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
202 void service_destroy (T_MFW_HND own_window); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
203 static int service_win_cb (T_MFW_EVENT event, T_MFW_WIN * win); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
204 void service_dialog_cb (T_MFW_HND win, USHORT identifier, UBYTE reason); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
205 void service (T_MFW_HND win, USHORT event, SHORT value, void * parameter); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 /* SPR#1428 - SH - New Editor changes */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
207 #ifdef NEW_EDITOR |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
208 void service_loadEditDefault (T_AUI_EDITOR_DATA *editor_data); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
209 #else /* NEW_EDITOR */ |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
210 void service_loadEditDefault (T_EDITOR_DATA *editor_data); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
211 #endif /* NEW_EDITOR */ |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
212 void service_calc_balance (T_MFW_HND win,char* line); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
213 void service_calculate (T_MFW_HND win, char* line, long value); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
214 USHORT service_check_pin_for_aoc (void); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
215 //ADDED BY RAVI-29-11-2005 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
216 extern T_MFW_HND AUI_calc_Start(T_MFW_HND parent, T_AUI_EDITOR_DATA *editor_data); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
217 // END RAVI |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
218 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
219 /******************************************************************************* |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
220 Functions |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
221 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
222 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
223 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
224 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
225 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
226 $Function: aoc_credit_remaining |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
227 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
228 $Description: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
229 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
230 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
231 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
232 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
233 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
234 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
235 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
236 int aoc_credit_remaining (MfwMnu* m, MfwMnuItem* i) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
237 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
238 T_MFW_HND win = mfw_parent(mfw_header()); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
239 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
240 TRACE_FUNCTION("aoc_credit_remaining"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
241 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
242 // create new dynamic dialog for the AOC |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
243 SEND_EVENT (service_Init (win), SERVICES_CREDIT_REMAINING, 0, 0); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
244 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
245 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
246 return 0; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
247 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
248 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
249 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
250 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
251 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
252 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
253 $Function: aoc_charge_rate |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
254 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
255 $Description: A security code editing screen is opened and Pin 2 requested. |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
256 Once entered successfully, an alpha. editor is opened with the |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
257 title "Enter currency".Once entered, an numeric editor is opened |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
258 with the title "Enter price p. unit". When the user has finished |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
259 entry the information screen " Rate changed" is displayed for |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
260 3 second and the phone returns to the previous sub-menu |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
261 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
262 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
263 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
264 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
265 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
266 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
267 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
268 int aoc_charge_rate (MfwMnu* m, MfwMnuItem* i) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
269 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
270 T_MFW_HND win = mfw_parent(mfw_header()); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
271 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
272 TRACE_FUNCTION("aoc_charge_rate"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
273 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
274 switch (service_check_pin_for_aoc ()) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
275 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
276 case MFW_SIM_PIN2_REQ: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
277 // June 16, 2005 REF: CRR 31267 x0021334 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
278 pin2Flag = TRUE; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
279 // create new dynamic dialog for the AOC |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
280 SEND_EVENT (service_Init (win), PIN_REQUEST_FOR_RATE, 0, 0); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
281 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
282 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
283 case MFW_SIM_PIN_REQ: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
284 case MFW_SIM_NO_PIN: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
285 //pin 1 or no pin required, open now the editor for entering the currency |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
286 SEND_EVENT (service_Init (win), SERVICES_ENTER_CURRENCY, 0, 0); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
287 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
288 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
289 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
290 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
291 return 0; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
292 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
293 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
294 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
295 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
296 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
297 $Function: aoc_view_limit |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
298 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
299 $Description: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
300 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
301 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
302 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
303 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
304 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
305 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
306 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
307 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
308 int aoc_view_limit (MfwMnu* m, MfwMnuItem* i) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
309 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
310 T_MFW_HND win = mfw_parent(mfw_header()); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
311 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
312 TRACE_FUNCTION("aoc_view_limit");/*SPR2500*/ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
313 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
314 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
315 // create new dynamic dialog for the AOC |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
316 SEND_EVENT (service_Init (win), SERVICES_LIMIT_VIEW, 0, 0); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
317 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
318 return 0; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
319 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
320 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
321 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
322 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
323 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
324 $Function: aoc_change_limit |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
325 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
326 $Description: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
327 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
328 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
329 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
330 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
331 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
332 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
333 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
334 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
335 int aoc_change_limit (MfwMnu* m, MfwMnuItem* i) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
336 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
337 T_MFW_HND win = mfw_parent(mfw_header()); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
338 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
339 TRACE_FUNCTION("aoc_change_limit"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
340 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
341 /*SPR#1904 - DS - Added call to service_check_pin_for_aoc() to check if |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
342 *PIN2 entry is required. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
343 */ |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
344 switch (service_check_pin_for_aoc ()) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
345 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
346 case MFW_SIM_PIN2_REQ: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
347 // June 16, 2005 REF: CRR 31267 x0021334 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
348 pin2Flag = TRUE; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
349 // create new dynamic dialog for the AOC |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
350 SEND_EVENT (service_Init (win), PIN_REQUEST_FOR_LIMIT_CHANGE, 0, 0); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
351 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
352 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
353 case MFW_SIM_PIN_REQ: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
354 case MFW_SIM_NO_PIN: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
355 //pin 1 or no pin required, open now the editor for entering the currency |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
356 SEND_EVENT (service_Init (win), SERVICES_LIMIT_CHANGE, 0, 0); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
357 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
358 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
359 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
360 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
361 return 0; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
362 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
363 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
364 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
365 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
366 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
367 $Function: aoc_cancel_limit |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
368 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
369 $Description: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
370 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
371 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
372 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
373 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
374 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
375 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
376 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
377 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
378 int aoc_cancel_limit (MfwMnu* m, MfwMnuItem* i) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
379 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
380 T_MFW_HND win = mfw_parent(mfw_header()); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
381 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
382 TRACE_FUNCTION("aoc_charge_rate"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
383 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
384 /*SPR#1904 - DS - Added call to service_check_pin_for_aoc() to check if |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
385 *PIN2 entry is required. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
386 */ |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
387 switch (service_check_pin_for_aoc ()) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
388 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
389 case MFW_SIM_PIN2_REQ: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
390 // June 16, 2005 REF: CRR 31267 x0021334 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
391 pin2Flag = TRUE; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
392 // create new dynamic dialog for the AOC |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
393 SEND_EVENT (service_Init (win), PIN_REQUEST_FOR_LIMIT_CANCEL, 0, 0); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
394 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
395 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
396 case MFW_SIM_PIN_REQ: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
397 case MFW_SIM_NO_PIN: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
398 //pin 1 or no pin required, open now the editor for entering the currency |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
399 SEND_EVENT (service_Init (win), SERVICES_LIMIT_CANCEL, 0, 0); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
400 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
401 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
402 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
403 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
404 return 0; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
405 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
406 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
407 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
408 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
409 $Function: aoc_last_charge |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
410 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
411 $Description: Dispays the charge for the last call in the currency or in units |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
412 if no currency information has been entered |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
413 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
414 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
415 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
416 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
417 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
418 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
419 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
420 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
421 int aoc_last_charge (MfwMnu* m, MfwMnuItem* i) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
422 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
423 T_MFW_HND win = mfw_parent(mfw_header()); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
424 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
425 TRACE_FUNCTION("aoc_last_charge"); /*SPR2500*/ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
426 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
427 // create new dynamic dialog for the AOC |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
428 SEND_EVENT (service_Init (win), SERVICES_LAST_CHARGE, 0, 0); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
429 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
430 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
431 return 0; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
432 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
433 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
434 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
435 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
436 $Function: aoc_total_charge |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
437 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
438 $Description: Displays the charge for all calls since the chage counter was last reset |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
439 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
440 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
441 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
442 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
443 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
444 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
445 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
446 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
447 int aoc_total_charge (MfwMnu* m, MfwMnuItem* i) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
448 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
449 T_MFW_HND win = mfw_parent(mfw_header()); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
450 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
451 TRACE_FUNCTION("aoc_total_charge");/*SPR2500*/ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
452 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
453 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
454 // create new dynamic dialog for the AOC |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
455 SEND_EVENT (service_Init (win), SERVICES_TOTAL_CHARGE, 0, 0); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
456 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
457 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
458 return 0; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
459 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
460 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
461 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
462 $Function: aoc_reset_charge |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
463 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
464 $Description: Resets the charge counter for all calls |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
465 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
466 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
467 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
468 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
469 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
470 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
471 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
472 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
473 int aoc_reset_charge (MfwMnu* m, MfwMnuItem* i) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
474 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
475 T_MFW_HND win = mfw_parent(mfw_header()); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
476 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
477 TRACE_FUNCTION("aoc_reset_charge");/*SPR2500*/ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
478 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
479 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
480 switch (service_check_pin_for_aoc ()) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
481 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
482 case MFW_SIM_PIN2_REQ: |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
483 // June 16, 2005 REF: CRR 31267 x0021334 |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
484 pin2Flag = TRUE; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
485 // create new dynamic dialog for the AOC |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
486 SEND_EVENT (service_Init (win), PIN_REQUEST_FOR_RESET_CHARGE, 0, 0); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
487 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
488 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
489 case MFW_SIM_PIN_REQ: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
490 case MFW_SIM_NO_PIN: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
491 //pin 1 or no pin required, open now the editor for entering the currency |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
492 SEND_EVENT (service_Init (win), SERVICES_RESET_CHARGE, 0, 0); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
493 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
494 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
495 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
496 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
497 return 0; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
498 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
499 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
500 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
501 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
502 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
503 $Function: service_Init |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
504 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
505 $Description: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
506 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
507 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
508 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
509 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
510 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
511 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
512 T_MFW_HND service_Init (T_MFW_HND parent_window) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
513 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
514 return (service_create (parent_window)); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
515 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
516 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
517 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
518 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
519 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
520 $Function: service_Exit |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
521 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
522 $Description: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
523 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
524 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
525 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
526 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
527 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
528 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
529 void service_Exit (T_MFW_HND own_window) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
530 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
531 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
532 T_MFW_WIN * win_data = ((T_MFW_HDR *)own_window)->data; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
533 T_SERVICES * data = (T_SERVICES *)win_data->user; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
534 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
535 TRACE_FUNCTION("service_Exit"); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
536 /*SPR 2500, check valid window pointer before destruction*/ |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
537 if ((own_window) && |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
538 (win_data) && |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
539 (data) && |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
540 (data->service_win)) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
541 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
542 service_destroy (data->service_win); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
543 } |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
544 else |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
545 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
546 TRACE_ERROR("service_Exit : Invalid Pointer passed"); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
547 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
548 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
549 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
550 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
551 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
552 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
553 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
554 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
555 $Function: service_create |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
556 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
557 $Description: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
558 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
559 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
560 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
561 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
562 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
563 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
564 T_MFW_HND service_create (T_MFW_HND parent_window) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
565 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
566 T_SERVICES * data = (T_SERVICES *)ALLOC_MEMORY (sizeof (T_SERVICES)); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
567 T_MFW_WIN * win; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
568 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
569 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
570 TRACE_FUNCTION ("service_create()"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
571 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
572 data->service_win = win_create (parent_window, 0, 0, (T_MFW_CB)service_win_cb); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
573 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
574 if (data->service_win EQ 0) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
575 return 0; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
576 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
577 /* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
578 * Create window handler |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
579 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
580 data->mmi_control.dialog = (T_DIALOG_FUNC)service; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
581 data->mmi_control.data = data; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
582 win = ((T_MFW_HDR *)data->service_win)->data; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
583 win->user = (void *) data; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
584 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
585 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
586 winShow(data->service_win); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
587 /* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
588 * return window handle |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
589 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
590 return data->service_win; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
591 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
592 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
593 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
594 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
595 $Function: service_destroy |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
596 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
597 $Description: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
598 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
599 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
600 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
601 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
602 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
603 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
604 void service_destroy (T_MFW_HND own_window) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
605 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
606 T_MFW_WIN * win; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
607 T_SERVICES * data; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
608 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
609 TRACE_FUNCTION ("service_destroy()"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
610 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
611 if (own_window) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
612 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
613 win = ((T_MFW_HDR *)own_window)->data; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
614 data = (T_SERVICES *)win->user; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
615 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
616 if (data) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
617 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
618 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
619 /* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
620 * Delete WIN handler |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
621 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
622 win_delete (data->service_win); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
623 data->service_win = 0; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
624 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
625 FREE_MEMORY ((void *)data, sizeof (T_SERVICES)); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
626 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
627 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
628 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
629 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
630 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
631 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
632 $Function: service_win_cb |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
633 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
634 $Description: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
635 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
636 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
637 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
638 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
639 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
640 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
641 static int service_win_cb (T_MFW_EVENT event, T_MFW_WIN * win) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
642 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
643 /* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
644 * Top Window has no output |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
645 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
646 return 1; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
647 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
648 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
649 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
650 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
651 $Function: service_dialog_cb |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
652 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
653 $Description: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
654 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
655 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
656 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
657 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
658 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
659 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
660 void service_dialog_cb(T_MFW_HND win, USHORT identifier, UBYTE reason) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
661 { |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
662 TRACE_FUNCTION ("service_dialog_cb()"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
663 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
664 switch (reason) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
665 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
666 case INFO_KCD_LEFT: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
667 /* no break; */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
668 case INFO_TIMEOUT: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
669 /* no break; */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
670 case INFO_KCD_HUP: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
671 /* no break; */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
672 case INFO_KCD_RIGHT: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
673 /* no break; */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
674 case INFO_KCD_CLEAR: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
675 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
676 TRACE_EVENT_P1("identifier: %d", identifier); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
677 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
678 if (identifier EQ SERVICES_OUT_OF_RANGE) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
679 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
680 TRACE_EVENT ("SERVICES_OUT_OF_RANGE"); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
681 SEND_EVENT (win, SERVICES_ONE_UNIT, 0, 0); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
682 } |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
683 else |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
684 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
685 TRACE_EVENT (" destroy "); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
686 service_Exit(win); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
687 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
688 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
689 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
690 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
691 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
692 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
693 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
694 $Function: service_editor_cb |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
695 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
696 $Description: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
697 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
698 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
699 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
700 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
701 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
702 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
703 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
704 static void service_editor_cb (T_MFW_HND win, USHORT Identifier, SHORT reason) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
705 { |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
706 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
707 T_SERVICES * data = (T_SERVICES *)win_data->user; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
708 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
709 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
710 UBYTE PWD[16], i; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
711 int result; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
712 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
713 TRACE_FUNCTION ("service_editor_cb()"); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
714 /*SPR 2500, check pointers valid*/ |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
715 if ((!win) || |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
716 (!win_data) || |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
717 (!data)) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
718 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
719 TRACE_ERROR("service_editor_cb : Invalid Pointer passed"); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
720 return; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
721 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
722 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
723 if ((!win) || |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
724 (!win_data) || |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
725 (!data)) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
726 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
727 TRACE_ERROR("service_editor_cb : Invalid Pointer passed"); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
728 return; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
729 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
730 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
731 memset(PWD, 0x00, 16); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
732 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
733 switch (reason) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
734 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
735 case INFO_KCD_LEFT: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
736 switch (Identifier) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
737 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
738 case SERVICES_ENTER_CURRENCY: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
739 TRACE_EVENT ("SERVICES_ENTER_CURRENCY"); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
740 TRACE_EVENT ("pressed left"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
741 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
742 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
743 // clear old current currency before overwrite it |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
744 memset(data->aocInfo.cur, 0x80, sizeof(data->aocInfo.cur)); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
745 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
746 if(strlen(data->edt_Buf) NEQ 0) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
747 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
748 memcpy(data->aocInfo.cur, data->edt_Buf, MAX_ENTER_CURRENCY); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
749 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
750 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
751 //termination from ASCII to GSM default |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
752 for (i=0; i< MAX_ENTER_CURRENCY-1; i++) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
753 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
754 if (data->aocInfo.cur[i] EQ '\0') |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
755 data->aocInfo.cur[i] = 0x80; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
756 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
757 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
758 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
759 // open the next editor for entering the price per unit |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
760 SEND_EVENT (win, SERVICES_ONE_UNIT, 0, 0); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
761 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
762 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
763 case SERVICES_ONE_UNIT: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
764 TRACE_EVENT ("SERVICES_ONE_UNIT"); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
765 TRACE_EVENT ("pressed left"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
766 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
767 // clear old current ppu before overwrite it |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
768 memset(data->aocInfo.ppu, '\0', sizeof(data->aocInfo.ppu)); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
769 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
770 if(strlen(data->edt_Buf) NEQ 0) |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
771 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
772 memcpy(data->aocInfo.ppu, data->edt_Buf, strlen(data->edt_Buf)); |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
773 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
774 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
775 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
776 // Password not necessary, Pin2 scenario done |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
777 memset(PWD, 0x00, 16); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
778 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
779 // write cur and ppu in AOC |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
780 result = cm_set_aoc_value(CM_AOC_PUCT, &data->aocInfo, PWD); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
781 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
782 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
783 TRACE_EVENT_P1("PPU : %s", data->aocInfo.ppu); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
784 TRACE_EVENT_P1("CUR : %s", data->aocInfo.cur); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
785 TRACE_EVENT_P1("result : %d", result); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
786 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
787 if(result EQ CM_OK) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
788 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
789 SEND_EVENT (win, SERVICES_RATE_CHANGED, 0, 0); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
790 } |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
791 else |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
792 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
793 SEND_EVENT (win, SERVICES_OUT_OF_RANGE, 0, 0); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
794 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
795 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
796 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
797 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
798 case SERVICES_LIMIT_CHANGE: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
799 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
800 // string => long |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
801 data->aocInfo.acm_max = atol(data->edt_Buf); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
802 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
803 // Password not necessary, Pin2 scenario done |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
804 memset(PWD, 0x00, 16); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
805 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
806 // May 25, 2004 REF: CRR MMI-SPR-17588 NISHIKANT KULKARNI |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
807 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
808 // If the ACMmax value entered by the user is more than 16777215 (0xFFFFFF), |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
809 // display a "Not Allowed" message. |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
810 if(data->aocInfo.acm_max > MAX_ENTER_VALUE) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
811 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
812 // Send event to display a "Not Allowed" message. |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
813 SEND_EVENT (win, SERVICES_AOC_NOT_SUPPORTED, 0, 0); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
814 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
815 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
816 // Else set the ACMmax value in AoC. |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
817 else |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
818 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
819 result = cm_set_aoc_value(CM_AOC_ACMMAX, &data->aocInfo, PWD); /* save ACMmax in AOC */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
820 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
821 TRACE_EVENT_P1("%ld", data->aocInfo.acm_max); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
822 TRACE_EVENT_P1("result of set aoc %d", result); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
823 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
824 // Send event to display a "Limit Changed" message. |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
825 SEND_EVENT (win, SERVICES_LIMIT_CHANGED, 0, 0); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
826 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
827 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
828 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
829 case SERVICES_RESET_CHARGE: |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
830 /* MC 12/04/02: Changed ACMMAX to ACM (should fix "broken" SIM problem)*/ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
831 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
832 result = cm_set_aoc_value(CM_AOC_ACM, &data->aocInfo, PWD); /* save ACMmax in AOC */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
833 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
834 } |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
835 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
836 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
837 case INFO_KCD_RIGHT: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
838 case INFO_KCD_CLEAR: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
839 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
840 TRACE_EVENT ("INFO_KCD_RIGHT pressed"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
841 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
842 switch (Identifier) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
843 { |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
844 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
845 case SERVICES_LIMIT_CHANGE: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
846 case SERVICES_ENTER_CURRENCY: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
847 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
848 //go back to the previous screen |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
849 service_Exit (win); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
850 break; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
851 case SERVICES_ONE_UNIT: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
852 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
853 //go back to the previous screen |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
854 SEND_EVENT (win, SERVICES_ENTER_CURRENCY, 0, 0); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
855 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
856 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
857 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
858 default: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
859 break; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
860 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
861 default: |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
862 break; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
863 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
864 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
865 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
866 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
867 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
868 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
869 $Function: createAOCDialog |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
870 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
871 $Description: Creates a dialog from 4 input parameters |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
872 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
873 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
874 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
875 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
876 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
877 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
878 static void createAOCDialog( T_MFW_HND win, USHORT txtId1, USHORT txtId2, char *str2, USHORT event ) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
879 { |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
880 T_DISPLAY_DATA display_info; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
881 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
882 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, txtId1, txtId2, COLOUR_AOC); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
883 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)service_dialog_cb, THREE_SECS, KEY_CLEAR | KEY_RIGHT | KEY_LEFT ); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
884 display_info.Identifier = event; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
885 display_info.TextString2 = str2; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
886 info_dialog (win, &display_info); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
887 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
888 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
889 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
890 $Function: service |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
891 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
892 $Description: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
893 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
894 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
895 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
896 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
897 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
898 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
899 void service (T_MFW_HND win, USHORT event, SHORT value, void * parameter) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
900 { |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
901 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
902 T_SERVICES * data = (T_SERVICES *)win_data->user; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
903 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
904 /* CQ13428 - NDH - Use dynamically allocated memory to prevent MMI Stack Overflow */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
905 #ifdef NEW_EDITOR |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
906 /* SPR#1428 - SH - New Editor data */ |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
907 T_AUI_EDITOR_DATA *editor_data = (T_AUI_EDITOR_DATA *)ALLOC_MEMORY (sizeof (T_AUI_EDITOR_DATA)); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
908 #else |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
909 T_EDITOR_DATA *editor_data = (T_EDITOR_DATA *)ALLOC_MEMORY (sizeof (T_EDITOR_DATA)); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
910 #endif |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
911 // T_MFW_SIM_PIN_STATUS status; // RAVI |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
912 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
913 UBYTE i, result; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
914 UBYTE PWD[16]; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
915 static char line[MAX_LINE]; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
916 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
917 TRACE_FUNCTION("service()"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
918 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
919 if (!editor_data) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
920 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
921 TRACE_ERROR("service : Failed to allocate memory for the Editor Data"); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
922 return; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
923 } |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
924 if ((!win) || |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
925 (!win_data) || |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
926 (!data)) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
927 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
928 TRACE_ERROR("service : Invalid Pointer passed"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
929 /* CQ13428 - NDH - Use dynamically allocated memory to prevent MMI Stack Overflow */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
930 #ifdef NEW_EDITOR |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
931 FREE_MEMORY((void *)editor_data, sizeof (T_AUI_EDITOR_DATA)); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
932 #else |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
933 FREE_MEMORY((void *)editor_data, sizeof (T_EDITOR_DATA)); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
934 #endif |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
935 return; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
936 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
937 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
938 memset(PWD, 0x00, 16); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
939 switch (event) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
940 { |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
941 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
942 case SERVICES_CREDIT_REMAINING: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
943 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
944 memset(line,'\0',sizeof(line)); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
945 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
946 //Get the ACM MAX |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
947 cm_get_aoc_value(CM_AOC_ACMMAX,&data->aocInfo); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
948 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
949 //Get ACM |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
950 cm_get_aoc_value(CM_AOC_ACM,&data->aocInfo); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
951 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
952 //Get currency and price per unit |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
953 cm_get_aoc_value(CM_AOC_PUCT,&data->aocInfo); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
954 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
955 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
956 TRACE_EVENT_P1("ACMMAX: %ld", data->aocInfo.acm_max); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
957 TRACE_EVENT_P1("ACM: %ld", data->aocInfo.acm); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
958 TRACE_EVENT_P1("PPU:%s", data->aocInfo.ppu); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
959 TRACE_EVENT_P1("CUR:%s", data->aocInfo.cur); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
960 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
961 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
962 if ((data->aocInfo.acm_max NEQ '\0') && (data->aocInfo.acm NEQ '\0')) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
963 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
964 /* special case: It is not possible to have ACM > ACMMAX */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
965 /* this case the mobile has to disconnect */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
966 if(data->aocInfo.acm > data->aocInfo.acm_max) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
967 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
968 strcpy(line, "????"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
969 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
970 else |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
971 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
972 /* calculate the credit with ACMAX and PPU */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
973 TRACE_EVENT ("CREDIT :ACMMAX !=0 and PPU !=0"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
974 service_calc_balance (win,(char*)line); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
975 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
976 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
977 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
978 if ((data->aocInfo.acm_max EQ '\0') && (data->aocInfo.acm NEQ '\0')) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
979 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
980 /* calculate the cost with ACM and PPU */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
981 TRACE_EVENT ("CREDIT :ACMMAX ==0 and PPU !=0"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
982 service_calculate (win, (char*)line, data->aocInfo.acm); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
983 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
984 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
985 if ((data->aocInfo.acm_max EQ '\0') && (data->aocInfo.acm NEQ '\0') ) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
986 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
987 /* show only ACM */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
988 TRACE_EVENT ("CREDIT :ACMMAX ==0 and PPU ==0"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
989 sprintf(line, "%ld", data->aocInfo.acm); /* */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
990 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
991 if ((data->aocInfo.acm_max NEQ '\0') && (data->aocInfo.acm NEQ '\0')) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
992 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
993 /* show only ACMAX */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
994 TRACE_EVENT ("CREDIT :ACMMAX !=0 and PPU ==0"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
995 sprintf(line, "%ld", data->aocInfo.acm_max - data->aocInfo.acm); /* */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
996 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
997 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
998 if (data->aocInfo.acm EQ '\0') |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
999 strcpy ((char *)line, "0"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1000 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1001 //from ASCII to GSM default |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1002 for (i=0; i< MAX_LINE; i++) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1003 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1004 if (line[i] EQ (char)0x80 OR line[i] EQ (char)0xFF ) /* x0039928 - Lint warning fix */ |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1005 line[i] = '\0'; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1006 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1007 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1008 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1009 if (data->aocInfo.acm_max EQ 0) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1010 { |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1011 createAOCDialog( win, TxtCost, TxtNull, line, event); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1012 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1013 else |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1014 { |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1015 createAOCDialog( win, TxtBalance, TxtNull, line, event); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1016 } |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1017 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1018 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1019 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1020 case PIN_REQUEST_FOR_RATE: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1021 //save the status |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1022 data->Identifier = SERVICES_ENTER_CURRENCY; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1023 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1024 //PIN2 is requested to change the Rate |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1025 pin2_check (data->service_win); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1026 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1027 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1028 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1029 case PIN_REQUEST_FOR_LIMIT_CHANGE: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1030 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1031 //PIN2 is requested to change the Rate |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1032 pin2_check (data->service_win); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1033 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1034 //save the status |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1035 data->Identifier = SERVICES_LIMIT_CHANGE; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1036 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1037 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1038 case PIN_REQUEST_FOR_LIMIT_CANCEL: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1039 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1040 //PIN2 is requested to change the Rate |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1041 pin2_check (data->service_win); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1042 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1043 //save the status |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1044 data->Identifier = SERVICES_LIMIT_CANCEL; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1045 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1046 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1047 case PIN_REQUEST_FOR_RESET_CHARGE: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1048 //save the status |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1049 data->Identifier = SERVICES_RESET_CHARGE; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1050 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1051 //PIN2 is requested to change the Rate |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1052 pin2_check (data->service_win); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1053 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1054 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1055 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1056 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1057 //it calls from MMI PINS |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1058 case PIN2_OK: |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1059 TRACE_EVENT("PIN2_OK"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1060 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1061 switch (data->Identifier) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1062 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1063 case SERVICES_ENTER_CURRENCY: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1064 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1065 //pin was ok, open now the editor for entering the currency |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1066 SEND_EVENT (win, data->Identifier, 0, 0); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1067 break; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1068 case SERVICES_LIMIT_CHANGE: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1069 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1070 //pin was ok, open now the editor for entering the currency |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1071 SEND_EVENT (win, data->Identifier, 0, 0); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1072 break; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1073 case SERVICES_LIMIT_CANCEL: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1074 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1075 //pin was ok, open now the editor for entering the currency |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1076 SEND_EVENT (win, data->Identifier, 0, 0); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1077 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1078 case SERVICES_RESET_CHARGE: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1079 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1080 //pin was ok, open now the editor for entering the currency |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1081 SEND_EVENT (win, data->Identifier, 0, 0); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1082 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1083 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1084 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1085 } |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1086 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1087 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1088 case PIN2_ABORT: |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1089 createAOCDialog( win, TxtFailed, TxtNull, line, event ); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1090 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1091 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1092 case SERVICES_ENTER_CURRENCY: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1093 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1094 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1095 //save the status |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1096 data->Identifier = SERVICES_ENTER_CURRENCY; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1097 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1098 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1099 //PUCT (currency and price per unit) is requested |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1100 result = cm_get_aoc_value(CM_AOC_PUCT, &data->aocInfo); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1101 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1102 TRACE_EVENT_P1("result %d", result); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1103 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1104 //fill up editor-sttribut with default |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1105 service_loadEditDefault (editor_data); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1106 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1107 //clear the editor-buffer |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1108 memset(data->edt_Buf,'\0',sizeof(data->edt_Buf)); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1109 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1110 // let to show the current currency, before the user change it */ |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1111 memcpy(data->edt_Buf, data->aocInfo.cur, MAX_ENTER_CURRENCY); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1112 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1113 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1114 for (i=0; i< MAX_ENTER_CURRENCY-1; i++) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1115 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1116 if (data->edt_Buf[i] EQ (char)0x80 OR data->edt_Buf[i] EQ (char)0xFF ) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1117 data->edt_Buf[i] = '\0'; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1118 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1119 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1120 /* SPR#1428 - SH - New Editor changes */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1121 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1122 #ifdef NEW_EDITOR |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1123 AUI_edit_SetBuffer(editor_data, ATB_DCS_ASCII, (UBYTE *)data->edt_Buf, MAX_ENTER_CURRENCY); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1124 AUI_edit_SetTextStr(editor_data, TxtSoftOK, TxtDelete, TxtEnterCurrency, NULL); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1125 AUI_edit_SetEvents(editor_data, data->Identifier, TRUE, FOREVER, (T_AUI_EDIT_CB)service_editor_cb); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1126 AUI_edit_SetMode(editor_data, ED_MODE_ALPHA, ED_CURSOR_BAR); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1127 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1128 AUI_edit_Start(data->service_win, editor_data); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1129 #else /* NEW_EDITOR */ |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1130 editor_data->editor_attr.text = data->edt_Buf; /* buffer to be edited */ |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1131 editor_data->editor_attr.size = MAX_ENTER_CURRENCY;/* limit to 3 letters */ |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1132 editor_data->LeftSoftKey = TxtSoftOK; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1133 editor_data->RightSoftKey = TxtDelete; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1134 editor_data->TextId = TxtEnterCurrency; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1135 editor_data->Identifier = data->Identifier; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1136 editor_data->mode = ALPHA_MODE; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1137 editor_data->AlternateLeftSoftKey = TxtNull; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1138 editor_data->min_enter = 1; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1139 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1140 /* create the dialog handler */ |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1141 editor_start(data->service_win, editor_data); /* start the editor */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1142 #endif /* NEW_EDITOR */ |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1143 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1144 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1145 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1146 case SERVICES_ONE_UNIT: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1147 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1148 //save the status |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1149 data->Identifier = SERVICES_ONE_UNIT; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1150 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1151 //fill up editor-sttribut with default |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1152 service_loadEditDefault (editor_data); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1153 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1154 //clear the editor-buffer |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1155 memset(data->edt_Buf,'\0',sizeof(data->edt_Buf)); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1156 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1157 /* let to show the current price per unit, before the user change it */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1158 memcpy(data->edt_Buf, data->aocInfo.ppu, sizeof(data->aocInfo.ppu)); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1159 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1160 for (i=0; i< MAX_ENTER_UNIT-1; i++) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1161 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1162 if (data->edt_Buf[i] EQ (char)0x80 OR data->edt_Buf[i] EQ (char)0xFF ) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1163 data->edt_Buf[i] = '\0'; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1164 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1165 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1166 /* SPR#1428 - SH - New Editor changes */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1167 #ifdef NEW_EDITOR |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1168 AUI_edit_SetBuffer(editor_data, ATB_DCS_ASCII, (UBYTE *)data->edt_Buf, MAX_ENTER_UNIT); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1169 AUI_edit_SetTextStr(editor_data, TxtSoftOK, TxtDelete, Txt1Unit, NULL); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1170 AUI_edit_SetEvents(editor_data, data->Identifier, TRUE, FOREVER, (T_AUI_EDIT_CB)service_editor_cb); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1171 AUI_edit_SetMode(editor_data, 0, ED_CURSOR_BAR); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1172 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1173 AUI_calc_Start(data->service_win, editor_data); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1174 #else /* NEW_EDITOR */ |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1175 editor_data->editor_attr.text = data->edt_Buf; /* buffer to be edited */ |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1176 editor_data->editor_attr.size = MAX_ENTER_UNIT;/* limit to 5 numerics */ |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1177 editor_data->LeftSoftKey = TxtSoftOK; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1178 editor_data->RightSoftKey = TxtDelete; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1179 editor_data->TextId = Txt1Unit; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1180 editor_data->Identifier = data->Identifier; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1181 editor_data->mode = CALC_MODE; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1182 editor_data->AlternateLeftSoftKey = TxtNull; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1183 editor_data->min_enter = 1; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1184 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1185 /* create the dialog handler */ |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1186 editor_start(data->service_win, editor_data); /* start the editor */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1187 #endif /* NEW_EDITOR */ |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1188 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1189 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1190 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1191 case SERVICES_RATE_CHANGED: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1192 createAOCDialog( win, TxtRate, TxtChanged, NULL, event); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1193 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1194 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1195 case SERVICES_LIMIT_VIEW: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1196 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1197 memset(line,'\0',sizeof(line)); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1198 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1199 cm_get_aoc_value(CM_AOC_ACMMAX,&data->aocInfo); /* Get the ACM MAX */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1200 cm_get_aoc_value(CM_AOC_PUCT,&data->aocInfo); /* Get currency and price per unit */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1201 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1202 TRACE_EVENT_P1("ACMMAX: %ld", data->aocInfo.acm_max); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1203 TRACE_EVENT_P1("ACM: %ld", data->aocInfo.acm); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1204 TRACE_EVENT_P1("PPU:%s", data->aocInfo.ppu); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1205 TRACE_EVENT_P1("CUR:%s", data->aocInfo.cur); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1206 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1207 if((strlen((char*)data->aocInfo.ppu) EQ 0) && data->aocInfo.acm_max NEQ '\0') |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1208 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1209 sprintf(line, "%ld", data->aocInfo.acm_max); /* Show only ACMmax */ |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1210 TRACE_EVENT ("get only :ACMMAX ; PPU ==0 and ACMMAX!=0"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1211 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1212 if((strlen((char*)data->aocInfo.ppu) NEQ 0) && data->aocInfo.acm_max NEQ '\0') |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1213 { |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1214 service_calculate (win, (char*)line, data->aocInfo.acm_max); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1215 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1216 TRACE_EVENT ("calculate ACMMAX * PPU; PPU !=0 and ACMMAX!=0"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1217 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1218 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1219 for (i=0; i< MAX_LINE; i++) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1220 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1221 if (line[i] EQ (char)0x80 OR line[i] EQ (char)0xFF ) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1222 line[i] = '\0'; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1223 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1224 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1225 if(data->aocInfo.acm_max NEQ '\0') |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1226 { |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1227 createAOCDialog( win, TxtLimitEq, TxtNull, line, event); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1228 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1229 else |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1230 { |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1231 createAOCDialog( win, TxtNo, TxtLimit, NULL, event); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1232 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1233 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1234 /* |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1235 * Call Info Screen |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1236 */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1237 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1238 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1239 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1240 case SERVICES_LIMIT_CHANGE: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1241 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1242 //fill up editor-sttribut with default |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1243 service_loadEditDefault (editor_data); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1244 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1245 //clear the editor-buffer |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1246 memset(data->edt_Buf,'\0',sizeof(data->edt_Buf)); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1247 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1248 data->Identifier = SERVICES_LIMIT_CHANGE; /*SPR 2500*/ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1249 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1250 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1251 data->Identifier = SERVICES_LIMIT_CHANGE; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1252 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1253 /* SPR#1428 - SH - New Editor changes */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1254 #ifdef NEW_EDITOR |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1255 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1256 AUI_edit_SetBuffer(editor_data, ATB_DCS_ASCII, (UBYTE *)data->edt_Buf, MAX_ENTER_LIMIT); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1257 AUI_edit_SetTextStr(editor_data, TxtSoftOK, TxtDelete, TxtEnterLimit, NULL); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1258 AUI_edit_SetEvents(editor_data, data->Identifier, TRUE, FOREVER, (T_AUI_EDIT_CB)service_editor_cb); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1259 AUI_edit_SetMode(editor_data, 0, ED_CURSOR_BAR); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1260 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1261 AUI_calc_Start(data->service_win, editor_data); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1262 #else /* NEW_EDITOR */ |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1263 editor_data->editor_attr.text = data->edt_Buf; /* buffer to be edited */ |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1264 editor_data->editor_attr.size = MAX_ENTER_LIMIT; /* limit to 6 terms of units */ |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1265 editor_data->LeftSoftKey = TxtSoftOK; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1266 editor_data->RightSoftKey = TxtDelete; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1267 editor_data->TextId = TxtEnterLimit; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1268 editor_data->Identifier = data->Identifier; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1269 editor_data->mode = CALC_MODE; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1270 editor_data->AlternateLeftSoftKey = TxtNull; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1271 editor_data->min_enter = 1; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1272 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1273 /* create the dialog handler */ |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1274 editor_start(data->service_win, editor_data); /* start the editor */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1275 #endif /* NEW_EDITOR */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1276 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1277 break; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1278 case SERVICES_LIMIT_CANCEL: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1279 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1280 // clear the limit |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1281 data->aocInfo.acm_max = 0; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1282 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1283 // Password not necessary, Pin2 scenario done |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1284 memset(PWD, 0x00, 16); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1285 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1286 cm_set_aoc_value(CM_AOC_ACMMAX, &data->aocInfo, PWD); /* save ACMmax in AOC */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1287 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1288 TRACE_EVENT_P1("%ld", data->aocInfo.acm_max); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1289 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1290 SEND_EVENT (win, SERVICES_LIMIT_CHANGED, 0, 0); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1291 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1292 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1293 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1294 case SERVICES_LIMIT_CHANGED: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1295 createAOCDialog( win, TxtLimit, TxtChanged, NULL, event); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1296 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1297 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1298 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1299 case SERVICES_LAST_CHARGE: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1300 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1301 cm_get_aoc_value(CM_AOC_PUCT,&data->aocInfo); /* Get currency and price per unit */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1302 cm_get_aoc_value(CM_AOC_PUCT,&data->aocInfo); /* Get currency and price per unit */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1303 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1304 if ( strlen((char*)data->aocInfo.ppu) EQ 0 ) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1305 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1306 TRACE_EVENT ("get only :ACM ; PPU ==0 and ACM!=0"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1307 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1308 /* show only the units ACM from last call */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1309 sprintf(line, "%ld", acm_last_call); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1310 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1311 else |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1312 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1313 TRACE_EVENT ("get only :ACM ; PPU !=0 and ACM!=0"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1314 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1315 /* add currency */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1316 sprintf(line, "%ld %s", acm_last_call, data->aocInfo.cur); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1317 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1318 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1319 if (acm_last_call EQ '\0') |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1320 strcpy ((char *)line, "0"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1321 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1322 createAOCDialog( win, TxtLastCharge, TxtNull, line, event); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1323 break; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1324 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1325 case SERVICES_TOTAL_CHARGE: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1326 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1327 memset(line,'\0',sizeof(line)); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1328 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1329 cm_get_aoc_value(CM_AOC_ACM,&data->aocInfo); /* Get the ACM */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1330 cm_get_aoc_value(CM_AOC_PUCT,&data->aocInfo); /* Get currency and price per unit */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1331 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1332 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1333 /* nm test only set the default */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1334 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1335 TRACE_EVENT_P1("ACM: %ld", data->aocInfo.acm); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1336 TRACE_EVENT_P1("PPU:%s", data->aocInfo.ppu); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1337 TRACE_EVENT_P1("CUR:%s", data->aocInfo.cur); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1338 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1339 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1340 if((strlen((char*)data->aocInfo.ppu) EQ 0) && data->aocInfo.acm NEQ '\0') |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1341 { |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1342 //show only the units ACM |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1343 sprintf(line, "%ld", data->aocInfo.acm); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1344 TRACE_EVENT ("get only :ACM ; PPU ==0 and ACM!=0"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1345 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1346 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1347 if((strlen((char*)data->aocInfo.ppu) NEQ 0) && data->aocInfo.acm NEQ '\0') |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1348 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1349 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1350 /* Ref bug omaps00076109 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1351 #ifdef NEPTUNE_BOARD |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1352 sprintf(line, "%ld %s", data->aocInfo.acm, data->aocInfo.cur); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1353 #else |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1354 service_calculate (win, (char*)line, data->aocInfo.acm); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1355 #endif |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1356 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1357 TRACE_EVENT ("calculate ACM * PPU; PPU !=0 and ACM!=0"); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1358 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1359 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1360 if (data->aocInfo.acm EQ '\0') |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1361 strcpy ((char *)line, "0"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1362 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1363 createAOCDialog( win, TxtTotalCharge, TxtNull, line, event); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1364 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1365 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1366 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1367 case SERVICES_RESET_CHARGE: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1368 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1369 // clear the charge counter for all calls |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1370 data->aocInfo.acm = 0; |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1371 acm_last_call = 0; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1372 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1373 (void)cm_set_aoc_value(CM_AOC_ACM, &data->aocInfo, PWD); /* save ACM in AOC */ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1374 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1375 TRACE_EVENT_P1("%ld", data->aocInfo.acm); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1376 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1377 SEND_EVENT (win, SERVICES_CHARGE_CHANGED, 0, 0); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1378 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1379 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1380 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1381 case SERVICES_CHARGE_CHANGED: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1382 createAOCDialog( win, TxtResetCharge, TxtNull, NULL, event); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1383 break; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1384 case SERVICES_OUT_OF_RANGE: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1385 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1386 TRACE_EVENT("SERVICES_OUT_OF_RANGE"); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1387 createAOCDialog( win, TxtOutofRange, TxtNull, NULL, event); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1388 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1389 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1390 case SERVICES_AOC_NOT_SUPPORTED: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1391 TRACE_EVENT("SERVICES_NOT_ALLOWED"); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1392 createAOCDialog( win, TxtNotAllowed, TxtNull, NULL, event); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1393 break; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1394 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1395 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1396 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1397 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1398 /* CQ13428 - NDH - Use dynamically allocated memory to prevent MMI Stack Overflow */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1399 #ifdef NEW_EDITOR |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1400 FREE_MEMORY((void *)editor_data, sizeof (T_AUI_EDITOR_DATA)); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1401 #else |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1402 FREE_MEMORY((void *)editor_data, sizeof (T_EDITOR_DATA)); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1403 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1404 return; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1405 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1406 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1407 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1408 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1409 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1410 $Function: service_loadEditDefault |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1411 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1412 $Description: fill up editor-sttribut with default |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1413 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1414 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1415 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1416 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1417 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1418 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1419 #ifdef NEW_EDITOR |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1420 /* SPR#1428 - SH - New Editor changes */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1421 void service_loadEditDefault (T_AUI_EDITOR_DATA *editor_data) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1422 { |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1423 TRACE_FUNCTION ("service_loadEditDefault()"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1424 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1425 AUI_edit_SetDefault(editor_data); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1426 AUI_edit_SetDisplay(editor_data, ZONE_FULL_SK_TITLE, COLOUR_EDITOR, EDITOR_FONT); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1427 AUI_edit_SetEvents(editor_data, 0, TRUE, FOREVER, (T_AUI_EDIT_CB)service_editor_cb); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1428 AUI_edit_SetTextStr(editor_data, TxtSoftSelect, TxtSoftBack, TxtNull, NULL); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1429 AUI_edit_SetMode(editor_data, 0, ED_CURSOR_UNDERLINE); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1430 AUI_edit_SetAltTextStr(editor_data, 1, TxtNull, FALSE, TxtNull); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1431 return; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1432 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1433 #else /* NEW_EDITOR */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1434 void service_loadEditDefault (T_EDITOR_DATA *editor_data) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1435 { |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1436 TRACE_FUNCTION ("service_loadEditDefault()"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1437 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1438 editor_attr_init(&editor_data->editor_attr, ZONE_SMALL_EDITOR, edtCurBar1, NULL, NULL, 0, COLOUR_EDITOR); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1439 editor_data->editor_attr.font = 0; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1440 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1441 editor_data_init( editor_data, (T_EDIT_CB)service_editor_cb, TxtSoftSelect, TxtSoftBack, TxtNull, 1, DIGITS_MODE, FOREVER); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1442 editor_data->hide = FALSE; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1443 editor_data->destroyEditor = TRUE; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1444 editor_data->AlternateLeftSoftKey = TxtNull; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1445 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1446 #endif /* NEW_EDITOR */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1447 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1448 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1449 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1450 $Function: service_calc_balance |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1451 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1452 $Description: Calculate the Credit remaining |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1453 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1454 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1455 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1456 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1457 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1458 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1459 void service_calc_balance (T_MFW_HND win,char* line) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1460 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1461 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1462 T_SERVICES * data = (T_SERVICES *)win_data->user; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1463 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1464 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1465 char line2[MAX_LINE]; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1466 char *pdest,*src,*dst,*POINT; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1467 LONG result; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1468 int ch = '.'; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1469 UBYTE counter=0; |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1470 if ((!win) || |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1471 (!win_data) || |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1472 (!data)) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1473 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1474 TRACE_ERROR("service_calc_balance : Invalid Pointer passed"); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1475 return; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1476 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1477 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1478 /*SPR 2500, chack validity of pointers before continuing*/ |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1479 if ((!win) || |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1480 (!win_data) || |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1481 (!data)) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1482 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1483 TRACE_ERROR("service_calc_balance : Invalid Pointer passed"); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1484 return; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1485 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1486 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1487 memset(line2,'\0',sizeof(line2)); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1488 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1489 cm_get_aoc_value(CM_AOC_ACMMAX,&data->aocInfo); /* Get the ACM MAX */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1490 cm_get_aoc_value(CM_AOC_ACM,&data->aocInfo); /* Get ACM */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1491 cm_get_aoc_value(CM_AOC_PUCT,&data->aocInfo); /* Get currency and price per unit */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1492 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1493 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1494 /* Search for '.' */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1495 pdest =(char *) strchr((char*) data->aocInfo.ppu, ch ); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1496 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1497 if( pdest EQ NULL ) /* '.' not founded */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1498 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1499 result = atol((char*)data->aocInfo.ppu ); /* STRING => LONG */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1500 result= result *(data->aocInfo.acm_max - data->aocInfo.acm); /* (ACMmax-ACM) * PPU */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1501 sprintf(line, "%ld %s", result,data->aocInfo.cur); /* LONG => STRING */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1502 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1503 else /* '.' found */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1504 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1505 /* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1506 * '.' found, *pdest EQ '.' |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1507 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1508 counter = strlen(pdest + 1); /* store the decimal place */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1509 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1510 src = (char*)data->aocInfo.ppu; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1511 dst = line; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1512 do /* remove the '.' */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1513 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1514 if (*src NEQ '.') |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1515 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1516 *dst++ = *src; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1517 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1518 } while (*src++ NEQ '\0'); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1519 /* STRING => LONG */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1520 result= (atol(line))*(data->aocInfo.acm_max - data->aocInfo.acm); /* (ACMmax - ACM) * PPU */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1521 sprintf(line, "%ld", result); /* LONG => STRING */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1522 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1523 if(strlen(line) < counter) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1524 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1525 src = line; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1526 dst = line2; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1527 *dst++ = '0'; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1528 *dst++ = '.'; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1529 counter = counter - strlen(line); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1530 do /* fill up with '0' */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1531 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1532 *dst++ = '0'; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1533 } while (--counter NEQ 0); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1534 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1535 memcpy (dst,src,sizeof(src)); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1536 sprintf(line, "%s %s", line2,data->aocInfo.cur); /* add the currency */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1537 return; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1538 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1539 src = line; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1540 dst = line2; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1541 POINT= src + strlen(src) - counter; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1542 do /* set the '.' */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1543 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1544 if (src EQ POINT) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1545 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1546 *dst++ = '.'; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1547 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1548 *dst++ = *src++; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1549 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1550 } while (*src NEQ '\0'); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1551 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1552 if (line2[0] EQ '.') |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1553 sprintf(line, "0%s %s", line2,data->aocInfo.cur); /* add the currency */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1554 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1555 if (line2[0] NEQ '.') |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1556 sprintf(line, "%s %s", line2,data->aocInfo.cur); /* add the currency */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1557 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1558 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1559 return; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1560 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1561 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1562 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1563 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1564 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1565 $Function: service_calculate |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1566 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1567 $Description: Calculate the value with price per unit and currency. |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1568 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1569 "value * PPU" @ currency |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1570 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1571 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1572 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1573 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1574 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1575 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1576 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1577 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1578 void service_calculate (T_MFW_HND win, char* line, long value) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1579 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1580 T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1581 T_SERVICES * data = (T_SERVICES *)win_data->user; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1582 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1583 char line2[MAX_LINE]; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1584 char *pdest,*src,*dst,*POINT; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1585 LONG result; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1586 int ch = '.'; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1587 UBYTE counter=0; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1588 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1589 /*SPR2500, check validity of pinters before continuing*/ |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1590 if ((!win) || |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1591 (!win_data) || |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1592 (!data)) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1593 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1594 TRACE_ERROR("service_calculate : Invalid Pointer passed"); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1595 return; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1596 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1597 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1598 memset(line2,'\0',sizeof(line2)); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1599 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1600 cm_get_aoc_value(CM_AOC_ACM,&data->aocInfo); /* Get ACM */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1601 cm_get_aoc_value(CM_AOC_PUCT,&data->aocInfo); /* Get currency and price per unit */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1602 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1603 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1604 /* Search for '.' */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1605 pdest =(char *) strchr((char*) data->aocInfo.ppu, ch ); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1606 if( pdest EQ NULL ) /* '.' not founded */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1607 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1608 result = atol((char*)data->aocInfo.ppu ); /* STRING => LONG */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1609 result= result * value; /* value * PPU */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1610 sprintf(line, "%ld %s", result,data->aocInfo.cur); /* LONG => STRING */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1611 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1612 else /* '.' found */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1613 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1614 /* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1615 * '.' found, *pdest EQ '.' |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1616 */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1617 counter = strlen(pdest + 1); /* store the decimal place */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1618 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1619 src = (char*)data->aocInfo.ppu; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1620 dst = line; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1621 do /* remove the '.' */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1622 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1623 if (*src NEQ '.') |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1624 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1625 *dst++ = *src; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1626 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1627 } while (*src++ NEQ '\0'); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1628 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1629 /* STRING => LONG */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1630 result= atol(line) * value; /* value * PPU */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1631 sprintf(line, "%ld", result); /* LONG => STRING */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1632 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1633 if(strlen(line) < counter) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1634 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1635 src = line; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1636 dst = line2; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1637 *dst++ = '0'; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1638 *dst++ = '.'; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1639 counter = counter - strlen(line); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1640 do /* fill up with '0' */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1641 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1642 *dst++ = '0'; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1643 } while (--counter NEQ 0); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1644 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1645 memcpy (dst,src,sizeof(src)); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1646 sprintf(line, "%s %s", line2,data->aocInfo.cur); /* add the currency */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1647 return; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1648 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1649 src = line; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1650 dst = line2; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1651 POINT= src + strlen(src) - counter; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1652 do /* set the '.' */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1653 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1654 if (src EQ POINT) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1655 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1656 *dst++ = '.'; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1657 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1658 *dst++ = *src++; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1659 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1660 } while (*src NEQ '\0'); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1661 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1662 if (line2[0] EQ '.') |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1663 sprintf(line, "0%s %s", line2,data->aocInfo.cur); /* add the currency */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1664 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1665 if (line2[0] NEQ '.') |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1666 sprintf(line, "%s %s", line2,data->aocInfo.cur); /* add the currency */ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1667 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1668 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1669 return; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1670 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1671 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1672 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1673 #ifdef FF_CPHS |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1674 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1675 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1676 $Function: setAOCflag |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1677 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1678 $Description: set the value to Aoc_flag variable |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1679 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1680 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1681 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1682 $Arguments: TRUE or FALSE |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1683 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1684 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1685 void setAOCflag(UBYTE aocValue) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1686 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1687 Aoc_flag = aocValue; |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1688 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1689 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1690 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1691 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1692 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1693 $Function: getAOCflag |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1694 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1695 $Description: Rturns the value of variable Aoc_flag. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1696 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1697 $Returns: value of Aoc_flag. |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1698 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1699 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1700 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1701 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1702 UBYTE getAOCflag(void) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1703 { |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1704 return Aoc_flag; |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1705 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1706 #endif |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1707 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1708 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1709 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1710 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1711 $Function: service_check_pin_for_aoc |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1712 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1713 $Description: this function check the PIN 2 requirement & availability of AOC |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1714 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1715 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1716 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1717 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1718 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1719 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1720 USHORT service_check_pin_for_aoc (void) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1721 { |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1722 T_MFW_AOC_ACCESS access; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1723 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1724 /* check PIN 2 requirement & availability of AOC */ |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1725 sim_configuration (NULL, NULL, NULL, NULL, NULL, &access); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1726 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1727 TRACE_EVENT_P3("acm:%d acmmax:%d,puct:%d", access.access_acm,access.access_acmmax,access.access_puct); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1728 #ifdef FF_CPHS |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1729 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1730 //The 'Charge/Timers' menu should be displayed if CPHS is not supported. |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1731 if (CphsPresent() != TRUE) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1732 { |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1733 TRACE_EVENT("CPHS is not present in this SIM"); |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1734 setAOCflag(TRUE); |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1735 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1736 TRACE_EVENT_P1("Values: Aoc_flag = %d - 1 Indicates AOC is set in the CSP", getAOCflag()); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1737 TRACE_EVENT_P1("status : cphs_status = %d ", CphsPresent()); |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1738 #endif |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1739 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1740 if (access.access_acm EQ MFW_SIM_PIN2 && |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1741 access.access_acmmax EQ MFW_SIM_PIN2 && |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1742 access.access_puct EQ MFW_SIM_PIN2) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1743 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1744 TRACE_EVENT("PIN 2 required"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1745 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1746 #ifdef FF_CPHS |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1747 if (getAOCflag()) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1748 return MFW_SIM_PIN2_REQ; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1749 else |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1750 return MFW_SIM_NO_AOC; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1751 #else |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1752 return MFW_SIM_PIN2_REQ; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1753 #endif |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1754 } |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1755 else if (access.access_acm EQ MFW_SIM_PIN1 && |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1756 access.access_acmmax EQ MFW_SIM_PIN1 && |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1757 access.access_puct EQ MFW_SIM_PIN1) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1758 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1759 TRACE_EVENT("PIN 1 required"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1760 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1761 #ifdef FF_CPHS |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1762 if (getAOCflag()) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1763 return MFW_SIM_PIN_REQ; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1764 else |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1765 return MFW_SIM_NO_AOC; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1766 #else |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1767 return MFW_SIM_PIN_REQ; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1768 #endif |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1769 } |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1770 else if (access.access_acm EQ MFW_SIM_NO_PIN && |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1771 access.access_acmmax EQ MFW_SIM_NO_PIN && |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1772 access.access_puct EQ MFW_SIM_NO_PIN) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1773 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1774 TRACE_EVENT("No PIN required"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1775 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1776 #ifdef FF_CPHS |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1777 if (getAOCflag()) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1778 return MFW_SIM_NO_PIN; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1779 else |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1780 return MFW_SIM_NO_AOC; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1781 #else |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1782 return MFW_SIM_NO_PIN; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1783 #endif |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1784 } |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1785 else if (access.access_acm EQ MFW_SIM_UNKNOWN && |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1786 access.access_acmmax EQ MFW_SIM_UNKNOWN && |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1787 access.access_puct EQ MFW_SIM_UNKNOWN) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1788 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1789 TRACE_EVENT("AOC not supported"); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1790 return MFW_SIM_FAILURE; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1791 } |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1792 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1793 #ifdef FF_CPHS |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1794 else |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1795 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1796 TRACE_EVENT("AOC Else part"); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1797 if (getAOCflag()) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1798 return MFW_SIM_NO_PIN; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1799 else |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1800 return MFW_SIM_NO_AOC; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1801 } |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1802 #endif |
92
c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
1803 |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1804 } |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1805 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1806 /******************************************************************************* |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1807 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1808 $Function: service_check_aoc |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1809 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1810 $Description: If there is no support for AOC on SIM card |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1811 the item "Charge Timers" will not Appear on the menulist |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1812 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1813 $Returns: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1814 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1815 $Arguments: |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1816 |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1817 *******************************************************************************/ |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1818 USHORT service_check_aoc (struct MfwMnuTag *m, struct MfwMnuAttrTag *ma, struct MfwMnuItemTag *mi) |
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1819 { |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1820 TRACE_FUNCTION("service_check_aoc"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1821 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1822 switch (service_check_pin_for_aoc ()) |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1823 { |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1824 case MFW_SIM_PIN2_REQ: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1825 case MFW_SIM_PIN_REQ: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1826 case MFW_SIM_NO_PIN: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1827 TRACE_EVENT("AOC item visible"); |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1828 return 0; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1829 /*break;*/ |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1830 |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1831 case MFW_SIM_FAILURE: |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1832 //x0012849: Jagannatha 26 May, 2006 ER: OMAPS00079607 -Support AOC in CPHS |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1833 #ifdef FF_CPHS |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1834 case MFW_SIM_NO_AOC: |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1835 TRACE_EVENT("service_check_aoc - AOC item not visible"); |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1836 #endif |
136
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1837 return 1; |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1838 /*break;*/ |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1839 } |
db101b57af2d
mmiAoc.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
92
diff
changeset
|
1840 return 1; |
3
67bfe9f274f6
src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1841 } |