annotate src/ui/bmi/mmiGprs.c @ 228:93af50ca61f9

rvm_priorities.h, rvm_ext_priorities.h: readability fixes
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 30 Apr 2021 22:31:31 +0000
parents abaee5bdfdc9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
150
abaee5bdfdc9 mmiGprs.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
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
5 ********************************************************************************
3
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
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
8 disclosed to any third party without the express permission of the owner.
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
9
3
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
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
12 $Project name:
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
13 $Project code:
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
14 $Module:
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
15 $File: MmiGprs.c
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
16 $Revision:
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
17
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
18 $Author: Condat(UK)
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
19 $Date:
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
20
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 ********************************************************************************
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
22
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 Description:
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
24 GPRS handling for MMI.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
25
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
26
3
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 $History: MmiGprs.c
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 Oct 18,2006 REF:DR OMAPS00099409 x0047075
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 Description:TC2.1.5(BMI/MFW) - GPRS - GPRS Detach error
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 Solution : The response P_CGREG_STAT_NOT_REG from the lower layer is now translated as GPRS_OFF by BMI.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 May 29,2006 REF: DR OMAPS00078997 x0043641
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 Description: GPRS - DETACH (ERROR)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 Solution: A condition is added when not regeistered, no searching the gprs status
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 is updated as not attached.
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
40 Feb 24, 2006 REF:DR OMAPS00068976 x0035544
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
41 Description: GPRS attach icon - MMI follow up issue of OMAPS00051034
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
42 solution: a Check is added for the idle mode display and querry the GPRS status of
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
43 network registration and update the GPRS state and attach icon display accordingly.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
44
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
45 15/05/2003 - SPR#1983 - SH - Updated to latest from 1.6.3 version.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
46
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
47 Dec 02, 2005 REF: DR OMAPS00048551 x0039928
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
48 Description: MMI Cloud displays ""GPRS Detached"" in place
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
49 of ""GPRS Not Attached"" when unable to attach..
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
50 Solution: A condition is added to check if the request is for attach and then display
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
51 "GPRS Not Attached" in case it fails.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
52
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
53 Dec 01, 2005 REF: DR OMAPS00048530 x0039928
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
54 Description: After the GPRS detach the MMI shows it is attached.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
55 Solution: A check is made to display "GPRS Attached" only when an GPRS attach is
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
56 requested but not when GPRS detach is request.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
57
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
58 Jun 14, 2005 REF: MMI-FIX-30439 x0018858
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
59 Description: The homezone/cityzone tags were not being displayed properly.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
60 Solution: Modified to save the tags properly in caches and also made the
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
61 appropriate modifications to update the same properly during mobility.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
62
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 $End
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 *******************************************************************************/
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 #define ENTITY_MFW
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 /* Switch for tracing*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 #define TRACE_MMIGPRS
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 #ifdef TRACE_MMIGPRS
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
73 #define trace(x) TRACE_EVENT(x)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
74 #define tracefunction(x) TRACE_FUNCTION(x)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
75 #define trace_P1(x,a) TRACE_EVENT_P1(x,a)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
76 #define trace_P2(x,a,b) TRACE_EVENT_P2(x,a,b)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
77 #define trace_P3(x,a,b,c) TRACE_EVENT_P3(x,a,b,c)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
78 #define trace_P4(x,a,b,c,d) TRACE_EVENT_P4(x,a,b,c,d)
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 #define trace_P5(x,a,b,c,d,e) TRACE_EVENT_P5(x,a,b,c,d,e)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 #define trace_P6(x,a,b,c,d,e,f) TRACE_EVENT_P6(x,a,b,c,d,e,f)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 #else
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
82 #define trace(x) /* */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
83 #define tracefunction(x) /* */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
84 #define trace_P1(x,a) /* */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
85 #define trace_P2(x,a,b) /* */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
86 #define trace_P3(x,a,b,c) /* */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
87 #define trace_P4(x,a,b,c,d) /* */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 #define trace_P5(x,a,b,c,d,e) /* */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 #define trace_P6(x,a,b,c,d,e,f) /* */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 #include <string.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 #include <stdio.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 #include <stdlib.h>
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 #if defined (NEW_FRAME)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 #include "typedefs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 #include "vsi.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 #include "pei.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 #include "custom.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 #include "gsm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 #include "STDDEFS.H"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 #include "custom.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 #include "gsm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 #include "vsi.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 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 #include "mfw_sys.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 #include "cus_aci.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 #include "mfw_mfw.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 #include "mfw_win.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 #include "mfw_kbd.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 /* New Editor changes */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 #ifndef NEW_EDITOR
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 #include "mfw_edt.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 #include "mfw_lng.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 #include "mfw_tim.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 #include "mfw_icn.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 #include "mfw_mnu.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 #include "mfw_phb.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 #include "mfw_cm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 #include "mfw_sim.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 #include "mfw_nm.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 #include "mfw_sat.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 #include "mfw_ss.h" /*for convert*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 #include "mfw_phb.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 #include "ksd.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 #include "psa.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 #include "mfw_sms.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 #include "mfw_cphs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 #include "mfw_sat.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 #include "message.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 #include "prim.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 #include "aci_all.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 #include "aci_cmh.h" /* include types declared in ACI */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 #include "ati_cmd.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 #include "aci_cmd.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 #include "aci.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 #include "dti_conn_mng.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 #include "dti_cntrl_mng.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 #include "gaci.h" /* include types declared in GACI */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 #include "gaci_cmh.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 #ifdef FF_2TO1_PS
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 #include "aci_all.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 #include "ati_cmd.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 #include "aci_cmd.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 #include "aci.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 #include "dti_conn_mng.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 #include "dti_cntrl_mng.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 #include "gaci.h" /* include types declared in GACI */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 #include "mfw_ss.h" /*for convert*/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 #include "mfw_cphs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 #include "mfw_sat.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 #include "mfw_gprs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 #include "dspl.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 #include "MmiGprs.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 #include "MmiBookShared.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
169 #include "Mmiicons.h" /* Including this header allows us to access the global icon status, for the GPRS icon.*/
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 #include "mmiSmsBroadcast.h" /* Including this to get the info_screen function */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 /* New Editor changes. Need editor for counter display */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 #ifdef NEW_EDITOR
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 #include "ATBCommon.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 #include "ATBDisplay.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 #include "ATBEditor.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 #include "AUIEditor.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 #include "MmiEditor.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 #include "MmiBookUtils.h"
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
181 #include "MmiBookMenuWindow.h" /* So we can use bookMenuStart() to create our own menus */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 #include "mmiColours.h"
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 #ifdef NEPTUNE_BOARD
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 #define GPRS_ICON_SET 1
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 #define EDGE_ICON_SET 2
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 #endif
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 static T_MMI_GPRS_DATA *gprs_data=NULL;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
194 $Function: GPRS_Data
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
195
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
196 $Description: Initialise GPRS
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
197
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
198 $Returns: Handler for MFW GPRS events.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
199
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
200 $Arguments: None.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 T_MMI_GPRS_DATA *GPRS_Data(void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
206 if (gprs_data==NULL)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
207 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
208 TRACE_EVENT("***ERROR*** MMI GPRS not initialised properly");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
209 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
210
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
211 return gprs_data;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
216 $Function: GPRS_Init
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
217
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
218 $Description: Initialise GPRS
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
219
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
220 $Returns: Handler for MFW GPRS events.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
221
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
222 $Arguments: None.
3
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 void GPRS_Init(void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
228 T_MMI_GPRS_DATA *data;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
229
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
230 tracefunction("GPRS_Init()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
231
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
232 gprs_init();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
233
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
234 /* Allocate memory for mmi data */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
235 data = (T_MMI_GPRS_DATA *)ALLOC_MEMORY(sizeof(T_MMI_GPRS_DATA));
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
236 gprs_data = data;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
237 memset(data, 0, sizeof(T_MMI_GPRS_DATA));
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
238
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
239 data->mfw_gprs = gprs_create(0, E_MFW_GPRS_ALL_EVENTS, (MfwCb)GPRS_MfwCb);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
240 data->cid = GPRS_CID_OMITTED;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
241 data->uplink_counter = 0;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
242 data->downlink_counter = 0;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
243 data->sms_service = SMS_SERVICE_OMITTED;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
244 data->display = FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
245 data->notify_win = NULL;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
246 data->callback = NULL;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
247 data->reg_status = GPRS_OFF;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
248
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
249 return;
3
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
253 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
254
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
255 $Function: GPRS_SetCallback
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
256
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
257 $Description: Specify a callback function, where GPRS connection information will
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
258 be sent, or NULL to switch off notification.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
259
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
260 $Returns: None.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
261
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
262 $Arguments: win - window handler, or NULL
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
263 callback - callback function, or NULL
3
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 void GPRS_SetCallback(T_MFW_HND win, T_GPRS_CB callback)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
268 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
269 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
270
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
271 tracefunction("GPRS_SetCallback()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
272
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
273 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
274 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
275 return;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
276 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
277
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
278 data->notify_win = win;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
279 data->callback = callback;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
280
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
281 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
282 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
283
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
284
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
287 $Function: GPRS_Exit
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
288
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
289 $Description: Exit GPRS
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
290
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
291 $Returns: None.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
292
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
293 $Arguments: None.
3
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
297 void GPRS_Exit(void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
298 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
299 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
300
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
301 tracefunction("GPRS_Exit()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
302
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
303 if (data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
304 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
305 /* Delete any remaining please wait window (just in case!)*/
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
306 GPRS_PleaseWaitDestroy();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
307
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
308 /* Delete the MFW module */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
309 if (data->mfw_gprs)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
310 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
311 gprs_delete(data->mfw_gprs);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
312 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
313
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
314 /* Delete MMI data */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
315 FREE_MEMORY((void *)data, sizeof(T_MMI_GPRS_DATA));
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
316 gprs_data = NULL;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
317 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
318
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
319 gprs_exit();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
320 return;
3
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
324 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
325
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
326 $Function: GPRS_Status
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
327
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
328 $Description: Return status of GPRS.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
329
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
330 $Returns: GPRS_OFF, GPRS_NOT_ATTACHED, GPRS_ATTACHED
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
331
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
332 $Arguments: None.
3
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
336 int GPRS_Status(void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
337 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
338 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
339 T_MFW_GPRS *gprs;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
340 int result;
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
341
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342 #ifdef NEPTUNE_BOARD
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
343 int iStatus = 0;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
344 int iDisplayIcn = 0;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
345 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
346
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
347 tracefunction("GPRS_Status()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
348
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
349 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
350 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
351 return GPRS_OFF;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
352 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
353
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
354 /* Keeps track of last status value, so we only need to call callback when a change occurs.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
355 * Default state is GPRS OFF */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
356
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
357 iconsDeleteState(iconIdGPRSOn);
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
358
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
359 #ifdef NEPTUNE_BOARD
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
360 /* OMAPS00074454 - For Edge Icon Display */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
361 iconsDeleteState(iconIdEdgeOn);
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
362 /* END */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
363 #endif
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
364 result = GPRS_OFF;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
365
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
366 /* Check if searching or attached */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
367
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
368 if (data->mfw_gprs)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
369 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
370 gprs = ((T_MFW_HDR *)data->mfw_gprs)->data;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
371 //x0035544 Feb 23, 2006 DR:OMAPS00068976
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
372 /* Check for the idle mode and querry the status of network registration
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
373 *and update the GPRS state and attach icon display accordingly */
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
374 if (gprs && (idleIsFocussed() ||data->menu_win == NULL) )
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
375 {
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
376 #ifdef NEPTUNE_BOARD
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
377 iDisplayIcn = mfw_gprs_edge_status (&iStatus);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
378
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
379 /* Status is obtained from AT command and assigned. */
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
380 gprs->data.Reg_state.p_reg_State = (T_P_CGREG_STAT) iStatus;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
381
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
382 if ((gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_SEARCHING) &&
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
383 (iDisplayIcn == GPRS_ICON_SET))
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
384 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
385 result = GPRS_SEARCHING;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
386 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
387
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
388 else if((gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_SEARCHING) &&
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
389 (iDisplayIcn == EDGE_ICON_SET))
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
390 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
391 result = EDGE_SEARCHING;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
392 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
393
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
394 /* Check regState and iDisplayIcn For display of GPRS*/
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
395 else if ((gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_HOME ||
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
396 gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_ROAM ) &&
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
397 (iDisplayIcn == GPRS_ICON_SET))
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
398 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
399 iconsSetState(iconIdGPRSOn);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
400 result = GPRS_ATTACHED;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
401 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
402
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
403 /* Check regState and iDisplayIcn For display of EDGE*/
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
404 else if ((gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_HOME ||
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
405 gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_ROAM ) &&
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
406 (iDisplayIcn == EDGE_ICON_SET))
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
407 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
408 iconsSetState(iconIdEdgeOn);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
409 result = EDGE_ATTACHED;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
410 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
411 else if ((gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_NO_CELL ||
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
412 gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_LIMITED ||
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
413 gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_UNKN ||
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
414 gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_DEN ) &&
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
415 (iDisplayIcn == EDGE_ICON_SET))
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
416 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
417 iconsDeleteState(iconIdGPRSOn );
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
418 result = GPRS_ERROR;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
419 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
420 else if ((gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_NO_CELL ||
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
421 gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_LIMITED ||
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
422 gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_UNKN ||
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
423 gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_DEN ) &&
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
424 (iDisplayIcn == EDGE_ICON_SET))
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
425 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
426 iconsDeleteState(iconIdEdgeOn );
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
427 result = EDGE_ERROR;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
428 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
429 /* May 29, 2006 Ref bug OMAPS00078997 */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
430 else if (gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_NOT_REG )
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
431 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
432 iconsDeleteState(iconIdGPRSOn );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
433 iconsDeleteState(iconIdEdgeOn );
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
434 result = GPRS_OFF;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
435 }
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
436 else
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
437 {
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
438 iconsDeleteState(iconIdGPRSOn);
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
439 iconsDeleteState(iconIdEdgeOn);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
440 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
441
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
442 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
443
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
444 gprs->data.Reg_state.p_reg_State = p_gprs_status();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
445
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
446 trace_P1("GPRS_Status: p_regState = %d", gprs->data.Reg_state.p_reg_State);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
447
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
448 if (gprs->data.Reg_state.p_reg_State ==P_CGREG_STAT_SEARCHING)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
449 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
450 result = GPRS_SEARCHING;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
451 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
452
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
453 /* Check regState rather than attached to find GPRS status */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
454
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
455 else if (gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_HOME ||
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
456 gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_ROAM )
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
457 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
458 iconsSetState(iconIdGPRSOn);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
459 result = GPRS_ATTACHED;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
460 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
461 else if(gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_NO_CELL ||
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
462 gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_LIMITED ||
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
463 gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_UNKN ||
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
464 gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_REG_DEN)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
465
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
466 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
467 iconsDeleteState(iconIdGPRSOn );
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
468 result = GPRS_ERROR;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
469 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
470 //Oct 18,2006 REF:DR OMAPS00099409 x0047075
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
471 // Description:TC2.1.5(BMI/MFW) - GPRS - GPRS Detach error
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
472 //Solution : The response P_CGREG_STAT_NOT_REG from the lower layer is now translated as GPRS_OFF by BMI.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
473 else if (gprs->data.Reg_state.p_reg_State == P_CGREG_STAT_NOT_REG )
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
474 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
475 iconsDeleteState(iconIdGPRSOn );
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
476 result = GPRS_OFF;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
477 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
478 #endif
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
479
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
480 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
481 else if (gprs )
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
482 {
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
483
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
484 #ifdef NEPTUNE_BOARD
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
485 iDisplayIcn = mfw_gprs_edge_status (&iStatus);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
486
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
487 /* Status is obtained from AT command and assigned. */
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
488 /* x0045876, 14-Aug-2006 (WR - enumerated type mixed with another type) */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
489 /* gprs->data.Reg_state.regState = iStatus; */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
490 gprs->data.Reg_state.regState = (T_CGREG_STAT) iStatus;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
491
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
492 if ((gprs->data.Reg_state.regState==CGREG_STAT_SEARCHING) &&
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
493 (iDisplayIcn == GPRS_ICON_SET))
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
494 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
495 result = GPRS_SEARCHING;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
496 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
497
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
498 else if((gprs->data.Reg_state.regState==CGREG_STAT_SEARCHING) &&
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
499 (iDisplayIcn == EDGE_ICON_SET))
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
500 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
501 result = EDGE_SEARCHING;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
502 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
503
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
504 /* Check regState and iDisplayIcn For display of GPRS*/
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
505 else if ((gprs->data.Reg_state.regState==CGREG_STAT_REG_HOME ||
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
506 gprs->data.Reg_state.regState==CGREG_STAT_REG_ROAM) &&
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
507 (iDisplayIcn == GPRS_ICON_SET))
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
508 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
509 iconsSetState(iconIdGPRSOn);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
510 result = GPRS_ATTACHED;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
511 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
512
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
513 /* Check regState and iDisplayIcn For display of EDGE*/
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
514 else if ((gprs->data.Reg_state.regState==CGREG_STAT_REG_HOME ||
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
515 gprs->data.Reg_state.regState==CGREG_STAT_REG_ROAM) &&
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
516 (iDisplayIcn == EDGE_ICON_SET))
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
517 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
518 iconsSetState(iconIdEdgeOn);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
519 result = EDGE_ATTACHED;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
520 }
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
521 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
522
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
523 //x0035544 Feb 23, 2006 DR:OMAPS00068976
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
524 gprs->data.Reg_state.regState = gprs_status();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
525
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
526 trace_P1("GPRS_Status: regState = %d", gprs->data.Reg_state.regState);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
527 //x0035544 Feb 23, 2006 DR:OMAPS00068976
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
528 if (gprs->data.Reg_state.regState==CGREG_STAT_SEARCHING)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
529 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
530 result = GPRS_SEARCHING;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
531 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
532
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
533 /* Check regState rather than attached to find GPRS status */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
534 //x0035544 Feb 23, 2006 DR:OMAPS00068976
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
535 else if (gprs->data.Reg_state.regState==CGREG_STAT_REG_HOME ||
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
536 gprs->data.Reg_state.regState ==CGREG_STAT_REG_ROAM)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
537 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
538 iconsSetState(iconIdGPRSOn);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
539 result = GPRS_ATTACHED;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
540 }
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
541 #endif
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
542 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
543 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
544
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
545 /* If status has changed, notify */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
546 if (data->callback!=NULL && result!=data->reg_status)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
547 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
548 data->callback(result);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
549 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
550
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
551 data->reg_status = result;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
552
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
553 return result;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
554 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
555
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
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
558 $Function: GPRS_ResultScreen
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
559
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
560 $Description: Displays a result and returns GPRS to idle status
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
561
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
562 $Returns: None.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
563
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
564 $Arguments: parent_win - the parent window
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
565 TextId1 - the first text string to be shown
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
566 TextId2 - the second text string to be shown
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
567
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
568 [afo 03/10/03] Moved function to an earlier location in the file and changed
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
569 the return type to void. We were taking liberties with C which we
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
570 got away with using the TI compiler but which Visual C flagged as
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
571 an error.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
572
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
573 We seem to be a bit slack on function scope and return values in
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
574 some cases in this file.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
575
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 static void GPRS_ResultScreen(T_MFW_HND parent_win, USHORT TextId1, USHORT TextId2)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
579 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
580 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
581
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
582 tracefunction("GPRS_ResultScreen()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
583
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
584 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
585 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
586 return;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
587 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
588
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
589 GPRS_PleaseWaitDestroy();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
590
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
591 info_screen(parent_win, TextId1, TextId2, NULL);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
592
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
593 data->display = FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
594
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
595 return;
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
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
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
600 $Function: GPRS_Attach
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
601
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
602 $Description: Attempts an attach to the GPRS network.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
603
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
604 $Returns: MMI_GPRS_STATUS_ATTACHING or MMI_GPRS_STATUS_IDLE
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
605
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
606 $Arguments: win - Parent window - if this is provided, status dialogues will be shown
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
607
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
610 int GPRS_Attach(T_MFW_HND win)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
611 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
612 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
613
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
614 tracefunction("GPRS_Attach()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
615
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
616 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
617 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
618 /* x0045876, 14-Aug-2006 (WR - non-void function "GPRS_Attach" should return a value) */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
619 /* return; */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
620 return 0;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
621 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
622
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
623 data->status = MMI_GPRS_STATUS_ATTACHING;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
624
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
625 if (win)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
626 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
627 GPRS_PleaseWait(win, TxtPleaseWait, NULL);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
628 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
629
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
630 /* Perform the attach */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
631
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
632 if (gprs_attach(CGATT_STATE_ATTACHED)==MFW_RES_OK)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
633 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
634 trace("GPRSAttach executing, awaiting confirmation.");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
635 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
636 else
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
637 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
638 /* Show result */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
639 if (win)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
640 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
641 GPRS_ResultScreen(win, TxtFailed, TxtNull);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
642 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
643 data->status = MMI_GPRS_STATUS_IDLE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
644 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
645
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
646 return data->status;
3
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 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
651
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
652 $Function: GPRS_Detach
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
653
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
654 $Description: Detach from the GPRS network.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
655
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
656 $Returns: MMI_GPRS_STATUS_DETACHING or MMI_GPRS_STATUS_IDLE
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
657
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
658 $Arguments: None
3
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 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
661
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
662 int GPRS_Detach(T_MFW_HND win)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
663 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
664 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
665
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
666 tracefunction("GPRS_Detach()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
667
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
668 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
669 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
670 /* x0045876, 14-Aug-2006 (WR - non-void function "GPRS_Detach" should return a value) */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
671 /* return; */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
672 return 0;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
673 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
674
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
675 data->status = MMI_GPRS_STATUS_DETACHING;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
676
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
677 if (win)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
678 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
679 GPRS_PleaseWait(win, TxtPleaseWait, NULL);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
680 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
681
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
682 if (gprs_attach(CGATT_STATE_DETACHED)==MFW_RES_OK)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
683 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
684 trace("GPRSDetach executing, awaiting confirmation.");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
685 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
686 else
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
687 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
688 if (win)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
689 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
690 GPRS_ResultScreen(win, TxtFailed, TxtNull);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
691 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
692 data->status = MMI_GPRS_STATUS_IDLE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
693 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
694
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
695 return data->status;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
696 }
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
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
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
701 $Function: GPRS_ContextDefine
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
702
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
703 $Description: Define a PDP context
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
704
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
705 $Returns: TRUE if successful, FALSE otherwise
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
706
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
707 $Arguments: cid - Context ID
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
708 IPAddress - IP address of context
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
709 APN - Access Point Name of context
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
710
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
711 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
712 #ifdef FF_2TO1_PS
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
713 int GPRS_ContextDefine(SHORT cid, char *IPAddress, char *APN)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
714 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
715 static T_PDP_CONTEXT context;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
716
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
717 strcpy(context.pdp_apn, APN);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
718 strcpy(context.pdp_type, "IP");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
719 strcpy((char*)context.pdp_addr.ip_address.ipv4_addr.a4, (char*)IPAddress);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
720
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
721 context.pdp_addr.ctrl_ip_address = NAS_is_ipv4;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
722
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
723 /* x0045876, 14-Aug-2006 (WR - integer conversion resulted in a change of sign) */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
724 /*
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
725 context.d_comp = CGDCONT_D_COMP_OMITTED;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
726 context.h_comp = CGDCONT_H_COMP_OMITTED;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
727 */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
728 context.d_comp = (U8) CGDCONT_D_COMP_OMITTED;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
729 context.h_comp = (U8) CGDCONT_H_COMP_OMITTED;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
730
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
731 // memset(&context.qos,0,sizeof(T_PS_qos));
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
732 // memset(&context.min_qos,0,sizeof(T_PS_qos));
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
733
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
734 if (gprs_definePDPContext(cid, &context)!=MFW_RES_OK)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
735 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
736 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
737 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
738
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
739 return TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
740 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
741 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
742 int GPRS_ContextDefine(SHORT cid, char *IPAddress, char *APN)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
743 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
744 static T_PDP_CONTEXT context;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
745
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
746 strcpy(context.pdp_apn, APN);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
747 strcpy(context.pdp_type, "IP");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
748 strcpy((char*)context.pdp_addr.ip_address.ipv4_addr.a4, (char*)IPAddress);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
749 context.pdp_addr.ctrl_ip_address = NAS_is_ipv4;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
750 context.d_comp = (U8)CGDCONT_D_COMP_OMITTED;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
751 context.h_comp = (U8)CGDCONT_H_COMP_OMITTED;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
752 // memset(&context.qos,0,sizeof(T_QOS));
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
753 // memset(&context.min_qos,0,sizeof(T_QOS));
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
754
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
755 if (gprs_definePDPContext(cid, &context)!=MFW_RES_OK)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
756 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
757 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
758 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
759
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
760 return TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
761 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
762 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
763
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
764
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
765 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
766
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
767 $Function: GPRS_ContextActivate
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
768
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
769 $Description: Activates a PDP context
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
770
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
771 $Returns: TRUE if successful, FALSE otherwise
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
772
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
773 $Arguments: cid - Context ID
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
777 int GPRS_ContextActivate(SHORT cid)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
778 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
779 SHORT cids[2];
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
780
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
781 tracefunction("GPRS_ContextActivate()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
782
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
783 cids[0] = cid;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
784 cids[1] = 0;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
785
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
786 if (gprs_contextActivation(CGACT_STATE_ACTIVATED, cids)==MFW_RES_OK)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
787 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
788 trace("GPRS_ContextActivate: Failed.");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
789 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
790 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
791
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
792 trace("GPRS_ContextActivate: Executing, awaiting confirmation.");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
793 return TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
794 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
795
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
796
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
797 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
798
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
799 $Function: GPRS_ContextDeactivate
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
800
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
801 $Description: Dectivates a PDP context
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
802
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
803 $Returns: TRUE if successful, FALSE otherwise
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
804
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
805 $Arguments: cid - Context ID
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
806
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
807 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
808
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
809 int GPRS_ContextDeactivate(SHORT cid)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
810 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
811 SHORT cids[2];
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
812
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
813 tracefunction("GPRS_ContextDeactivate()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
814
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
815 cids[0] = cid;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
816 cids[1] = 0;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
817
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
818 if (gprs_contextActivation(CGACT_STATE_DEACTIVATED, cids)==MFW_RES_OK)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
819 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
820 trace("GPRS_ContextDeactivate: Failed.");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
821 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
822 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
823
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
824 trace("GPRS_ContextDeactivate: Executing, awaiting confirmation.");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
825 return TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
826 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
827
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
828
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
829 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
830
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
831 $Function: GPRS_SetQOS
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
832
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
833 $Description: Set quality of service
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
834
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
835 $Returns: TRUE if succeeded, FALSE if failed
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
836
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
837 $Arguments: cid - context ID
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
838 preced...etc. - quality of service parameters
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
839
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
840 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
841
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
842 #ifdef FF_2TO1_PS
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
843 int GPRS_SetQOS(SHORT cid, UBYTE preced, UBYTE delay, UBYTE relclass, UBYTE peak, UBYTE mean)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
844 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
845 T_PS_qos QOS;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
846
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
847 tracefunction("GPRS_SetQOS()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
848
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
849 QOS.qos_r97.preced = preced;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
850 QOS.qos_r97.delay = delay;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
851 QOS.qos_r97.relclass = relclass;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
852 QOS.qos_r97.peak = peak;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
853 QOS.qos_r97.mean = mean;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
854
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
855 if (gprs_setQOS(cid, &QOS)!=MFW_RES_OK)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
856 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
857 trace("GPRS_MenuSetQOS: Failed");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
858 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
859 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
860
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
861 trace("GPRS_MenuSetQOS: OK");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
862
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
863 return TRUE;
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 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
866 int GPRS_SetQOS(SHORT cid, UBYTE preced, UBYTE delay, UBYTE relclass, UBYTE peak, UBYTE mean)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
867 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
868 T_PS_qos QOS;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
869
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
870 tracefunction("GPRS_SetQOS()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
871
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
872 QOS.qos_r97.preced = preced;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
873 QOS.qos_r97.delay = delay;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
874 QOS.qos_r97.relclass = relclass;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
875 QOS.qos_r97.peak = peak;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
876 QOS.qos_r97.mean = mean;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
877
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
878
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
879 if (gprs_setQOS(cid, &QOS)!=MFW_RES_OK)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
880 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
881 trace("GPRS_MenuSetQOS: Failed");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
882 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
883 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
884
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
885 trace("GPRS_MenuSetQOS: OK");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
886
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
887 return TRUE;
3
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 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
890
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
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
893 $Function: GPRS_SetMinQOS
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
894
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
895 $Description: Set minimum quality of service
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
896
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
897 $Returns: TRUE if succeeded, FALSE if failed
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
898
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
899 $Arguments: cid - context ID
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
900 preced...etc. - quality of service parameters
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
901
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
902 *******************************************************************************/
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 #ifdef FF_2TO1_PS
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
905 int GPRS_SetMinQOS(SHORT cid, UBYTE preced, UBYTE delay, UBYTE relclass, UBYTE peak, UBYTE mean)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
906 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
907 T_PS_qos QOS;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
908
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
909 tracefunction("GPRS_SetMinQOS()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
910
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
911 QOS.qos_r97.preced = preced;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
912 QOS.qos_r97.delay = delay;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
913 QOS.qos_r97.relclass = relclass;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
914 QOS.qos_r97.peak = peak;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
915 QOS.qos_r97.mean = mean;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
916
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
917 if (gprs_setQOSMin(cid, &QOS)!=MFW_RES_OK)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
918 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
919 trace("GPRS_MenuSetMinQOS: Failed");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
920 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
921 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
922
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
923 trace("GPRS_MenuSetMinQOS: OK");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
924
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
925 return TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
926 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
927 #else
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
928 int GPRS_SetMinQOS(SHORT cid, UBYTE preced, UBYTE delay, UBYTE relclass, UBYTE peak, UBYTE mean)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
929 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
930 T_PS_qos QOS;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
931
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
932 tracefunction("GPRS_SetMinQOS()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
933
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
934 QOS.qos_r97.preced = preced;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
935 QOS.qos_r97.delay = delay;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
936 QOS.qos_r97.relclass = relclass;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
937 QOS.qos_r97.peak = peak;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
938 QOS.qos_r97.mean = mean;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
939
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
940 if (gprs_setQOSMin(cid, &QOS)!=MFW_RES_OK)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
941 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
942 trace("GPRS_MenuSetMinQOS: Failed");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
943 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
944 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
945
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
946 trace("GPRS_MenuSetMinQOS: OK");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
947
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
948 return TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
949 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
950 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
951
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
952 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
953
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
954 $Function: GPRS_SmsService
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
955
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
956 $Description: Return SMS Service type
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
957
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
958 $Returns: SMS_SERVICE_xxx
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
959
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
960 $Arguments: None.
3
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 *******************************************************************************/
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 UBYTE GPRS_SmsService(void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
965 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
966 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
967
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
968 tracefunction("GPRS_SmsService");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
969
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
970 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
971 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
972 return SMS_SERVICE_OMITTED;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
973 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
974
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
975 return data->sms_service;
3
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
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
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
981 $Function: GPRS_SetSmsService
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
982
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
983 $Description: Set SMS Service type
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
984
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
985 $Returns: TRUE if set proceeded OK
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
986
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
987 $Arguments: None.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
988
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
989 *******************************************************************************/
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 UBYTE GPRS_SetSmsService(UBYTE service)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
992 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
993 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
994 T_CGSMS_SERVICE ACISmsService;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
995 UBYTE old_service = 0; /* Warning Correction - 29-11-2005 */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
996 tracefunction("GPRS_SetSmsService");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
997 trace_P1("Service: %d", service);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
998
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
999 switch(service)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1000 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1001 case SMS_SERVICE_GPRS:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1002 ACISmsService = CGSMS_SERVICE_GPRS;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1003 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1004 case SMS_SERVICE_CS:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1005 ACISmsService = CGSMS_SERVICE_CS;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1006 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1007 case SMS_SERVICE_GPRS_PREF:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1008 ACISmsService = CGSMS_SERVICE_GPRS_PREFERRED;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1009 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1010 case SMS_SERVICE_CS_PREF:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1011 ACISmsService = CGSMS_SERVICE_CS_PREFERRED;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1012 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1013 default:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1014 ACISmsService = CGSMS_SERVICE_CS;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1015 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1016 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1017
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1018 if (data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1019 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1020 old_service = data->sms_service;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1021 data->sms_service = service;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1022 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1023
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1024 if (gprs_setServiceSMS(ACISmsService) != MFW_RES_OK)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1025 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1026 trace("gprs_setServiceSMS failed");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1027 /* Failed - set service back to old value */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1028 if (data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1029 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1030 data->sms_service = old_service;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1031 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1032 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1033 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1034
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1035 return TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1036 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1037
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1038
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1039 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1040
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1041 $Function: GPRS_MfwCb
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1042
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1043 $Description: Callback function for MFW GPRS events.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1044
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1045 $Returns:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1046
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1047 $Arguments: Event number and generic parameter.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1048
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1049 *******************************************************************************/
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 static int GPRS_MfwCb(T_MFW_EVENT event, void* para)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1052 {
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1053
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1054 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1055 T_MFW_HND win = mfwParent( mfw_header());
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1056 T_MFW_GPRS_DATA *gprs_data = (T_MFW_GPRS_DATA *)para; // Structure that stores data from mfw
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1057 USHORT textId;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1058 int result;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1059
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1060 tracefunction("GPRS_MfwCb()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1061
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1062 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1063 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1064 return FALSE; /* Warning Correction - provide return value */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1065 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1066
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1067 /* Result of GPRS_NOTHING will not be sent */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1068
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1069 result = GPRS_NOTHING;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1070
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1071 /* Find GPRS status */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1072
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1073 if (idleIsFocussed())
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1074 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1075 /* Update idle screen icons to show any change in GPRS status */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1076 iconsShow();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1077 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1078 else
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1079 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1080 /* iconsShow calls GPRS_Status; if we don't call that, call this on its own */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1081 GPRS_Status();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1082 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1083
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1084 switch(event)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1085 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1086 case E_MFW_GPRS_S_CNTXT:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1087 trace("GPRS_MfwCb: E_MFW_GPRS_S_CNTXT");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1088 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1089
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1090 case E_MFW_GPRS_S_ATT:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1091 trace("GPRS_MfwCb: E_MFW_GPRS_S_ATT");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1092
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1093 // Dec 01, 2005 REF: DR OMAPS00048530 x0039928
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1094 // Fix : Set the current status to attaching or detaching depending on the request.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1095 if (data->reg_status!= GPRS_ATTACHED)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1096 data->status = MMI_GPRS_STATUS_ATTACHING;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1097 else
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1098 data->status = MMI_GPRS_STATUS_DETACHING;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1099
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1100 if (data->display)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1101 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1102 if (data->reg_status!= GPRS_ATTACHED)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1103 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1104 /* Previous please wait will be destroyed and this new message shown */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1105 GPRS_PleaseWait(win, TxtGPRS, TxtAttaching);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1106 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1107 else
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1108 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1109 /* MZ cq10952 Info string */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1110 GPRS_PleaseWait(win, TxtGPRS, TxtDetaching);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1111 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1112 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1113 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1114
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1115 case E_MFW_GPRS_S_ACT:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1116 trace("GPRS_MfwCb: E_MFW_GPRS_S_ACT");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1117
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1118 /* Notify of context activation */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1119 result = GPRS_CONTEXT_ACTIVATE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1120 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1121
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1122 case E_MFW_GPRS_R_ACT:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1123 trace("GPRS_MfwCb: E_MFW_GPRS_R_ACT");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1124
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1125 /* Notify of context activation */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1126 result = GPRS_CONTEXT_ACTIVATE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1127 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1128
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1129 case E_MFW_GPRS_S_DATA:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1130 trace("GPRS_MfwCb: E_MFW_GPRS_S_DATA");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1131 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1132
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1133 case E_MFW_GPRS_R_DATA:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1134 trace("GPRS_MfwCb: E_MFW_GPRS_R_DATA");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1135 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1136
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1137 case E_MFW_GPRS_S_QOS:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1138 trace("GPRS_MfwCb: E_MFW_GPRS_S_QOS");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1139 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1140
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1141 case E_MFW_GPRS_R_QOS:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1142 trace("GPRS_MfwCb: E_MFW_GPRS_R_QOS");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1143 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1144
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1145 case E_MFW_GPRS_S_QOS_MIN:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1146 trace("GPRS_MfwCb: E_MFW_GPRS_S_QOS_MIN");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1147 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1148
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1149 case E_MFW_GPRS_S_CLASS:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1150 trace("GPRS_MfwCb: E_MFW_GPRS_S_CLASS");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1151 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1152
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1153 case E_MFW_GPRS_S_PDPADDR:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1154 trace("GPRS_MfwCb: E_MFW_GPRS_S_PDPADDR");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1155 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1156
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1157 case E_MFW_GPRS_S_AUTORESP:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1158 trace("GPRS_MfwCb: E_MFW_GPRS_S_AUTORESP");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1159 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1160
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1161 case E_MFW_GPRS_S_ANS:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1162 trace("GPRS_MfwCb: E_MFW_GPRS_S_ANS");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1163 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1164
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1165 case E_MFW_GPRS_R_ANS:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1166 trace("GPRS_MfwCb: E_MFW_GPRS_R_ANS");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1167 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1168
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1169 case E_MFW_GPRS_S_EREP:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1170 trace("GPRS_MfwCb: E_MFW_GPRS_S_EREPG");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1171 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1172
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1173 case E_MFW_GPRS_R_EREP_RJ:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1174 trace("GPRS_MfwCb: E_MFW_GPRS_R_EREP_RJ");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1175
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1176 /* Notify of context deactivation */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1177
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1178 result = GPRS_CONTEXT_DEACTIVATE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1179 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1180
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1181 case E_MFW_GPRS_R_EREP_ATT:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1182 trace("GPRS_MfwCb: E_MFW_GPRS_R_EREP_ATT");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1183
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1184 /* Attach status has changed, display message as appropriate */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1185
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1186 if (data->display)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1187 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1188 if (data->reg_status==GPRS_ATTACHED)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1189 textId = TxtAttached;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1190 else
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1191 textId = TxtNotAttached;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1192
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1193 /* Show result */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1194 GPRS_ResultScreen(win, TxtGPRS, textId);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1195 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1196 data->status = MMI_GPRS_STATUS_IDLE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1197
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1198 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1199
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1200 case E_MFW_GPRS_R_EREP_ACT:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1201 trace("GPRS_MfwCb: E_MFW_GPRS_R_EREP_ACT");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1202
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1203 /* Notify of context activation */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1204 result = GPRS_CONTEXT_ACTIVATE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1205 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1206
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1207 case E_MFW_GPRS_R_EREP_DEACT:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1208 trace("GPRS_MfwCb: E_MFW_GPRS_R_EREP_DEACT");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1209
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1210 /* Notify of context deactivation */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1211 result = GPRS_CONTEXT_DEACTIVATE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1212 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1213
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1214 case E_MFW_GPRS_R_EREP_CLASS:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1215 trace("GPRS_MfwCb: E_MFW_GPRS_R_EREP_CLASS");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1216 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1217
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1218 case E_MFW_GPRS_R_REG:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1219 trace("GPRS_MfwCb: E_MFW_GPRS_R_REG");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1220 //x0035544 Feb 23, 2006 DR:OMAPS00068976
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1221 trace_P1("regState: %d", gprs_data->Reg_state.p_reg_State);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1222
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1223 switch (data->reg_status)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1224 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1225 case GPRS_ATTACHED:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1226 #ifdef MMI_HOMEZONE_ENABLED
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1227 //Jun 14, 2005 REF: MMI-FIX-30439 x0018858
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1228 //begin 30439
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1229 /* Cell reselection for homezone */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1230 homezoneUpdate(gprs_data->lac, gprs_data->ci, 0);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1231 //end 30439
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1232 #endif
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1233 // Dec 01, 2005 REF: DR OMAPS00048530 x0039928
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1234 // Fix : Display GPRS attached only if the request is for attaching.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1235 if(data->status == MMI_GPRS_STATUS_ATTACHING)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1236 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1237 /* Show result */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1238 if (data->display)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1239 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1240 GPRS_ResultScreen(win, TxtGPRS, TxtAttached);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1241 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1242 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1243 data->status = MMI_GPRS_STATUS_IDLE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1244 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1245
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1246 case GPRS_OFF:
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1247 #ifdef MMI_HOMEZONE_ENABLED
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1248 //Jun 14, 2005 REF: MMI-FIX-30439 x0018858
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1249 //begin 30439
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1250 /* Cell reselection for homezone */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1251 homezoneUpdate(0,0,0);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1252 //end 30439
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1253 #endif
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1254 // Dec 02, 2005 REF: DR OMAPS00048551 x0039928
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1255 // Fix : Display GPRS not attached if gprs attach fails
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1256 // and the current status is attaching.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1257 if(data->status == MMI_GPRS_STATUS_ATTACHING)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1258 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1259 /* Show result */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1260 if (data->display)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1261 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1262 GPRS_ResultScreen(win, TxtGPRS, TxtNotAttached);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1263 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1264 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1265 else
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1266 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1267 /* Show result */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1268 if (data->display)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1269 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1270 GPRS_ResultScreen(win, TxtGPRS, TxtDetached);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1271 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1272 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1273 data->status = MMI_GPRS_STATUS_IDLE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1274 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1275
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1276 case GPRS_SEARCHING: /* not registered, searching */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1277 #ifdef MMI_HOMEZONE_ENABLED
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1278 //Jun 14, 2005 REF: MMI-FIX-30439 x0018858
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1279 //begin 30439
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1280 /* Cell reselection for homezone */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1281 homezoneUpdate(0, 0, 0);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1282 //end 30439
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1283 #endif
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1284 data->status = MMI_GPRS_STATUS_ATTACHING;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1285 if (data->display)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1286 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1287 GPRS_PleaseWait(win, TxtGPRS, TxtSearching); /* SPR#1986 */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1288 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1289 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1290
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1291 default:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1292 data->status = MMI_GPRS_STATUS_IDLE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1293 /* Show result */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1294 if (data->display)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1295 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1296 GPRS_ResultScreen(win, TxtGPRS, TxtError);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1297 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1298 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1299 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1300
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1301 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1302
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1303 case E_MFW_GPRS_S_SMSSERV:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1304 trace("GPRS_MfwCb: E_MFW_GPRS_S_SMSSERV");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1305 trace_P1("Service: %d", data->sms_service);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1306
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1307 data->status = MMI_GPRS_STATUS_IDLE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1308
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1309 /* Display "Using <service>" */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1310
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1311 if (data->display)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1312 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1313 USHORT TxtId2, TxtId1 = TxtUsing;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1314 switch(data->sms_service)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1315 {
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1316 case SMS_SERVICE_GPRS: /* GPRS */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1317 TxtId2 = TxtGPRS;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1318 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1319 case SMS_SERVICE_CS: /* circuit switched */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1320 TxtId2 = TxtCSD;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1321 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1322 case SMS_SERVICE_GPRS_PREF: /* GPRS preferred */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1323 TxtId2 = TxtGPRSPreferred;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1324 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1325 case SMS_SERVICE_CS_PREF: /* circuit switched preferred */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1326 TxtId2 = TxtCSDPreferred;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1327 break;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1328 default: /* Shouldn't happen, but... */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1329 TxtId1 = TxtFailed;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1330 TxtId2 = TxtNull;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1331 break;
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1332 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1333
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1334 /* Show result */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1335 GPRS_ResultScreen(win, TxtId1, TxtId2);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1336 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1337 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1338
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1339 case E_MFW_GPRS_OK:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1340 trace("GPRS_MfwCb: E_MFW_GPRS_OK");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1341 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1342
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1343 case E_MFW_GPRS_ERROR:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1344 trace("GPRS_MfwCb: E_MFW_GPRS_ERROR");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1345
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1346 data->status = MMI_GPRS_STATUS_IDLE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1347
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1348 /* Display "GPRS Error" */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1349
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1350 if (data->display)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1351 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1352 /* Delete please wait window */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1353 GPRS_PleaseWaitDestroy();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1354
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1355 /* Show result */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1356 GPRS_ResultScreen(win, TxtGPRS, TxtFailed);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1357 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1358
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1359 /* Notify of error */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1360 result = GPRS_ERROR;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1361 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1362
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1363 case E_MFW_GPRS_CONNECT:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1364 trace("GPRS_MfwCb: E_MFW_GPRS_CONNECT");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1365
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1366 data->status = MMI_GPRS_STATUS_IDLE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1367
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1368 if (data->display)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1369 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1370 /* Delete please wait window */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1371 GPRS_PleaseWaitDestroy();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1372
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1373 /* Display "CONNECTED" window */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1374 info_screen(win, TxtGPRS, TxtConnected, NULL);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1375 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1376 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1377
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1378 case E_MFW_GPRS_ERR_CONNECT:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1379 trace("GPRS_MfwCb: E_MFW_GPRS_ERR_CONNECT");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1380
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1381 data->status = MMI_GPRS_STATUS_IDLE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1382
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1383 /* Display "GPRS No Answer" */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1384 if (data->display)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1385 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1386 /* Show result */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1387 GPRS_ResultScreen(win, TxtGPRS, TxtNoAnswer);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1388 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1389 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1390
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1391 case E_MFW_GPRS_COUNTER:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1392 trace("GPRS_MfwCb: E_MFW_GPRS_COUNTER");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1393
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1394 /* Add values returned from ACI
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1395 * to total counter */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1396
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1397 data->uplink_counter += (ULONG)(gprs_data->counter.octets_uplink);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1398 data->downlink_counter += (ULONG)(gprs_data->counter.octets_downlink);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1399
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1400 /* Only display counter if user has requested it */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1401
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1402 if (data->display)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1403 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1404 data->display = FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1405 /* Delete please wait window */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1406 GPRS_PleaseWaitDestroy();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1407
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1408 GPRS_ShowCounter(win);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1409 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1410 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1411
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1412 default:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1413 trace_P1("GPRS_MfwCb: event = %d", event);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1414 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1415 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1416
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1417 /* Send a notification if appropriate */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1418
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1419 if (data->callback!=NULL && result!=GPRS_NOTHING)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1420 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1421 data->callback(result);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1422 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1423
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1424 return TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1425 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1426
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1427
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1428 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1429
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1430 $Function: GPRS_MenuAttach
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1431
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1432 $Description: Attempts an attach to the GPRS network.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1433
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1434 $Returns: TRUE if proceeding, FALSE if failed
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1435
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1436 $Arguments: Standard menu option parameters
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1437
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1438 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1439
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1440 int GPRS_MenuAttach(MfwMnu* m, MfwMnuItem* i)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1441 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1442 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1443 T_MFW_HND win = mfw_parent(mfw_header());
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1444 /* int gprsStatus; */ /* Warning Correction */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1445
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1446 tracefunction("GPRS_MenuAttach()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1447
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1448 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1449 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1450 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1451 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1452
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1453 if (!data->mfw_gprs)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1454 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1455 data->mfw_gprs = gprs_create(0, E_MFW_GPRS_ALL_EVENTS, (MfwCb)GPRS_MfwCb);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1456 /* Set CID to 0; on increment will become 1. */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1457 data->cid = GPRS_CID_OMITTED;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1458 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1459
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1460 if (data->reg_status==(int)GPRS_ATTACHED)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1461 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1462 /* Show result */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1463 GPRS_ResultScreen(win, TxtAlreadyAttached, TxtAttached);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1464 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1465 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1466
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1467 GPRS_Attach(win);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1468
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1469 return TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1470 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1471
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1472
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1473 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1474
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1475 $Function: GPRS_MenuDetach
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1476
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1477 $Description: Attempts a detach from the GPRS network.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1478
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1479 $Returns: TRUE if proceeding, FALSE if failed
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1480
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1481 $Arguments: Standard menu option parameters
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1482
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1483 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1484
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1485 int GPRS_MenuDetach(MfwMnu* m, MfwMnuItem* i)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1486 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1487 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1488 T_MFW_HND win = mfw_parent(mfw_header());
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1489 /* int gprsStatus; */ /* Warning Correction */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1490
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1491 tracefunction("GPRS_MenuDetach()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1492
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1493 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1494 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1495 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1496 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1497
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1498 /* Check to make sure gprs handle exists */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1499
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1500 if (!data->mfw_gprs)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1501 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1502 /* Show result */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1503 GPRS_ResultScreen(win, TxtNotAttached, TxtNull);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1504 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1505 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1506
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1507 if (data->reg_status==(int)GPRS_OFF)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1508 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1509 GPRS_ResultScreen(win, TxtNotAttached, TxtNull);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1510 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1511 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1512
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1513 if (data->reg_status==(int)GPRS_SEARCHING)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1514 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1515 GPRS_ResultScreen(win, TxtGPRS, TxtNotAvailable);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1516 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1517 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1518
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1519 /* Try to detach */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1520
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1521 GPRS_Detach(win);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1522
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1523 return TRUE;
3
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1526
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1527 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1528
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1529 $Function: GPRS_MenuIncomingDataCount
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1530
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1531 $Description: Show data counter for last incoming call
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1532
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1533 $Returns: TRUE if proceeding, FALSE if failed
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1534
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1535 $Arguments: Standard menu option parameters
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1536
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1537 *******************************************************************************/
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 int GPRS_MenuIncomingDataCount(MfwMnu* m, MfwMnuItem* i)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1540 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1541 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1542 T_MFW_HND win = mfw_parent(mfw_header());
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1543 T_MFW_RES result;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1544
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1545 tracefunction("GPRS_MenuIncomingDataCount()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1546
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1547 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1548 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1549 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1550 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1551
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1552 data->counter_type = MMI_GPRS_COUNTER_DOWNLINK; /* SPR#1875 - SH - Now DOWNLINK */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1553 data->display = TRUE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1554 data->status = MMI_GPRS_STATUS_DATA_COUNTER;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1555 GPRS_PleaseWait(win, TxtPleaseWait, NULL); /* SPR#1986 */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1556
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1557 /* If a data call is in progress, counter is now reset every
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1558 * time we check it - MMI keeps track of total.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1559 * If a data call is not in progress, display current total from MMI */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1560
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1561 result = gprs_counter(TRUE);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1562
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1563 switch(result)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1564 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1565 /* Waiting for rAT_PercentSNCNT callback, don't update display yet */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1566
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1567 case MFW_RES_OK:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1568 trace("gprs_counter executing, awaiting confirmation.");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1569 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1570
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1571 /* We're not connected - display current total */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1572
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1573 case MfwResDone:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1574 GPRS_PleaseWaitDestroy();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1575 data->display = FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1576 GPRS_ShowCounter(win);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1577 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1578
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1579 /* Error has occurred */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1580
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1581 default:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1582 GPRS_PleaseWaitDestroy();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1583 data->display = FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1584 info_screen(win, TxtGPRS,TxtError, NULL);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1585 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1586 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1587
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1588 return TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1589 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1590
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1591
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1592 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1593
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1594 $Function: GPRS_MenuOutgoingDataCount
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1595
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1596 $Description: Show data counter for last incoming call
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1597
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1598 $Returns: TRUE if proceeding, FALSE if failed
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1599
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1600 $Arguments: Standard menu option parameters
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1601
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 int GPRS_MenuOutgoingDataCount(MfwMnu* m, MfwMnuItem* i)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1605 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1606 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1607 T_MFW_HND win = mfw_parent(mfw_header());
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1608 T_MFW_RES result;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1609
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1610 tracefunction("GPRS_MenuOutgoingDataCount()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1611
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1612 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1613 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1614 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1615 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1616
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1617 data->counter_type = MMI_GPRS_COUNTER_UPLINK; /* SPR#1875 - SH - Now UPLINK */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1618 data->display = TRUE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1619 data->status = MMI_GPRS_STATUS_DATA_COUNTER;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1620 GPRS_PleaseWait(win, TxtPleaseWait, NULL); /* SPR#1986 */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1621
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1622 /* If a data call is in progress, counter is now reset every
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1623 * time we check it - MMI keeps track of total.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1624 * If a data call is not in progress, display current total from MMI */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1625
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1626 result = gprs_counter(TRUE);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1627
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1628 switch(result)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1629 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1630 /* Waiting for rAT_PercentSNCNT callback, don't update display yet */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1631
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1632 case MFW_RES_OK:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1633 trace("gprs_counter executing, awaiting confirmation.");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1634 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1635
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1636 /* We're not connected - display current total */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1637
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1638 case MfwResDone:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1639 GPRS_PleaseWaitDestroy();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1640 data->display = FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1641 GPRS_ShowCounter(win);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1642 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1643
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1644 /* Error has occurred */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1645
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1646 default:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1647 GPRS_PleaseWaitDestroy();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1648 data->display = FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1649 info_screen(win, TxtGPRS,TxtError, NULL);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1650 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1651 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1652
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1653 return TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1654 }
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
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 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1659
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1660 $Function: GPRS_MenuSelectSms
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1661
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1662 $Description: Sets cursor position for this menu based on the current settings
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1663
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1664 $Returns: TRUE if proceeding, FALSE if failed
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1665
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1666 $Arguments: menu - pointer to the current menu
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1667 item - pointer to the current menu item
3
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 *******************************************************************************/
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 int GPRS_MenuSelectSms(MfwMnu* menu, MfwMnuItem* item)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1672 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1673 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1674 T_MFW_HND win = mfwParent( mfw_header()); /* GPRS menu window */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1675 /* T_MFW_GPRS *gprs; */ /* Warning Correction */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1676
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1677 tracefunction("GPRS_MenuSelectSms()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1678
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1679 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1680 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1681 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1682 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1683
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1684 data->menu_win = bookMenuStart(win, SMSServiceAttributes(), 0);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1685
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1686 SEND_EVENT(data->menu_win, DEFAULT_OPTION, NULL, &data->sms_service); // Add our own callback
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1687
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1688 return TRUE;
3
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 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1693
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1694 $Function: GPRS_MenuSelectSms_set
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1695
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1696 $Description: Send SMS by GPRS/CSD
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1697
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1698 $Returns: TRUE if proceeding, FALSE if failed
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1699
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1700 $Arguments: menu - pointer to the current menu
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1701 item - pointer to the current menu item
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1702
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1705 int GPRS_MenuSelectSms_set(MfwMnu* menu, MfwMnuItem* item)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1706 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1707 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1708 T_MFW_HND win = mfwParent( mfw_header()); /* GPRS menu window */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1709
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1710 tracefunction("GPRS_MenuSelectSms_set()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1711 trace_P1("Menu level: %d", menu->lCursor[menu->level]);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1712
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1713 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1714 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1715 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1716 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1717
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1718 if (!data->mfw_gprs)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1719 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1720 TRACE_EVENT("** No MFW gprs **");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1721 return FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1722 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1723
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1724 data->display = TRUE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1725
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1726 if(!GPRS_SetSmsService(menu->lCursor[menu->level]))
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1727 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1728 info_screen(win, TxtFailed, NULL, NULL);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1729 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1730
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1731 return TRUE;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1732 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1733
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1734
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1735 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1736
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1737 $Function: GPRS_PleaseWait
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1738
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1739 $Description: Creates a "Please Wait" message that will hang around until an "OK" or
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1740 "Error" message is received by GPRS_MfwCb
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1741
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1742 $Returns: Pointer to the created window
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1743
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1744 $Arguments: parent_win - the parent window
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1745 TextId1 - the first text string to be shown
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1746 TextId2 - the second text string to be shown
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1747
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1748 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1749
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1750 static T_MFW_HND GPRS_PleaseWait(T_MFW_HND parent_win, USHORT TextId1, USHORT TextId2)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1751 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1752 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1753 T_DISPLAY_DATA display_info;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1754
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1755 tracefunction("GPRS_PleaseWait()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1756
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1757 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1758 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1759 return NULL;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1760 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1761
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1762 /* Delete any previous window */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1763 GPRS_PleaseWaitDestroy();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1764
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1765 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtCancel, TextId1, TextId2, COLOUR_STATUS);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1766 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)GPRS_PleaseWaitCb, PLEASEWAIT_TIMEOUT, KEY_HUP | KEY_RIGHT );
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1767
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1768 data->display = TRUE; /* Allow OK and Fail messages to appear. */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1769 data->menu_win = parent_win; /* Store parent window */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1770
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1771 /* Show information screen, storing window pointer */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1772 data->pleasewait_win = info_dialog(parent_win,&display_info);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1773
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1774 return data->pleasewait_win;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1775 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1776
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1777
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1778 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1779
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1780 $Function: GPRS_PleaseWaitCb
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1781
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1782 $Description: Please wait window callback function.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1783
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1784 $Returns: None
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1785
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1786 $Arguments: win - the parent window
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1787 identifier - not used
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1788 reason - the reason for the callback
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1789
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1790 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1791
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1792 static void GPRS_PleaseWaitCb(T_MFW_HND win, UBYTE identifier, UBYTE reason)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1793 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1794 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1795
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1796 tracefunction("GPRS_PleaseWaitCb()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1797
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1798 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1799 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1800 return;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1801 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1802
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1803 /* Dialog already destroyed by this point */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1804
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1805 data->pleasewait_win = NULL;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1806
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1807 switch(reason)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1808 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1809 case INFO_TIMEOUT:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1810
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1811 /* Delete window */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1812
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1813 info_screen(data->menu_win, TxtTimedOut, NULL, NULL);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1814 data->status = MMI_GPRS_STATUS_IDLE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1815 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1816
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1817 case INFO_KCD_HUP:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1818 case INFO_KCD_RIGHT:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1819
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1820 /*Cancel current operation */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1821
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1822 switch(data->status)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1823 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1824 case MMI_GPRS_STATUS_ATTACHING:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1825 case MMI_GPRS_STATUS_DETACHING:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1826 gprs_attach_abort();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1827 data->status = MMI_GPRS_STATUS_IDLE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1828 data->display = FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1829 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1830 case MMI_GPRS_STATUS_DATA_COUNTER:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1831 gprs_counter_abort();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1832 data->status = MMI_GPRS_STATUS_IDLE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1833 data->display = FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1834 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1835 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1836 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1837 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1838
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1839 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1840 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1841
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1842
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1843 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1844
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1845 $Function: GPRS_PleaseWaitDestroy
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1846
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1847 $Description: Check to see if the "Please Wait" window is present, and destroys it
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1848 if so.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1849
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1850 $Returns: None.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1851
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1852 $Arguments: None.
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1853
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1854 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1855
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1856 static void GPRS_PleaseWaitDestroy(void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1857 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1858 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1859
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1860 tracefunction("GPRS_PleaseWaitDestroy()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1861
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1862 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1863 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1864 return;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1865 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1866
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1867 if (data->pleasewait_win)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1868 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1869 SEND_EVENT(data->pleasewait_win, DIALOG_DESTROY, NULL, NULL);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1870 data->pleasewait_win = NULL;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1871 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1872
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1873 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1874 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1875
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1876
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1877 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1878
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1879 $Function: GPRS_ShowCounter
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1880
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1881 $Description: Generic counter displaying function
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1882
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1883 $Returns:
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1884
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1885 $Arguments: Standard menu option parameters
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1886
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1887 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1888
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1889 static void GPRS_ShowCounter(T_MFW_HND win)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1890 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1891 T_MMI_GPRS_DATA *data = GPRS_Data();
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1892 #ifdef NEW_EDITOR
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1893 T_AUI_EDITOR_DATA editor_data;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1894 #else
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1895 T_EDITOR_DATA editor_data;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1896 #endif
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1897 /* T_MFW_GPRS *gprs; */ /* Warning Correction */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1898 USHORT titleId;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1899
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1900 tracefunction("GPRS_ShowCounter()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1901
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1902 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1903 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1904 return;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1905 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1906
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1907 /* Destroy old editor if it exists */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1908
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1909 if (data->edit_win)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1910 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1911 GPRS_DestroyCounter();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1912 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1913
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1914 /* Set appropriate title string (corrected) */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1915
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1916 switch(data->counter_type)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1917 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1918 case MMI_GPRS_COUNTER_DOWNLINK:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1919 titleId = TxtIncomingData;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1920 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1921
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1922 case MMI_GPRS_COUNTER_UPLINK:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1923 titleId = TxtOutgoingData;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1924 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1925
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1926 default:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1927 titleId = TxtNull;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1928 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1929 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1930
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1931 data->counterstring = (char *)ALLOC_MEMORY(ULONG_SIZE_IN_DECIMAL);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1932 GPRS_UpdateCounter();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1933
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1934 /* New Editor */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1935 #ifdef NEW_EDITOR
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1936 AUI_edit_SetDefault(&editor_data);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1937 AUI_edit_SetDisplay(&editor_data, ZONE_FULL_SK_TITLE, COLOUR_EDITOR_XX, EDITOR_FONT);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1938 AUI_edit_SetEvents(&editor_data, data->counter_type, FALSE, FOREVER, (T_AUI_EDIT_CB)GPRS_ShowCounterCb);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1939 AUI_edit_SetTextStr(&editor_data, TxtReset, TxtSoftBack, titleId, NULL);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1940 AUI_edit_SetMode(&editor_data, ED_MODE_READONLY, ED_CURSOR_NONE);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1941 AUI_edit_SetBuffer(&editor_data, ATB_DCS_ASCII, (UBYTE *)data->counterstring, ULONG_SIZE_IN_DECIMAL);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1942
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1943 data->edit_win = AUI_edit_Start(win, &editor_data);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1944 #else /* NEW_EDITOR */
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1945 editor_data.TextString = NULL;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1946 editor_data.LeftSoftKey = TxtSoftOK;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1947 editor_data.RightSoftKey = TxtReset;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1948 editor_data.AlternateLeftSoftKey = NULL;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1949 editor_data.Callback = (T_EDIT_CB)GPRS_ShowCounterCb;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1950 editor_data.Identifier = data->counter_type;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1951 editor_data.hide = FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1952 editor_data.mode = READ_ONLY_MODE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1953 editor_data.timeout = FOREVER;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1954 editor_data.min_enter = 0;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1955 editor_data.destroyEditor = FALSE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1956 editor_data.editor_attr.win.px = 0;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1957 editor_data.editor_attr.win.py = Mmi_layout_line(1)+4;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1958 editor_data.editor_attr.win.sx = SCREEN_SIZE_X;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1959 editor_data.editor_attr.win.sy = Mmi_layout_line(2)+4;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1960 editor_data.editor_attr.edtCol = COLOUR_EDITOR_XX;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1961 editor_data.editor_attr.font = 0;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1962 editor_data.editor_attr.mode = edtCurNone;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1963 editor_data.editor_attr.controls = 0;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1964 editor_data.editor_attr.size = ULONG_SIZE_IN_DECIMAL;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1965 editor_data.TextId = titleId;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1966
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1967 editor_data.editor_attr.text = data->counterstring;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1968
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1969 /* Create the dialog handler */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1970
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1971 data->edit_win = editor_start(win, &editor_data); /* start the editor */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1972 #endif /* NEW_EDITOR */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1973
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1974 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1975 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1976
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1977
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1978 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1979
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1980 $Function: GPRS_ShowCounterCb
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1981
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1982 $Description: Change text string for the counter we've just changed
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1983
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1984 $Returns: nothing.
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1985
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1986 $Arguments: win - the editor window
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1987 identifier - the type of counter we're updating
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1988 reason - the event that caused the callback
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1989
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1990 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1991
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1992 static void GPRS_ShowCounterCb(T_MFW_HND win, USHORT identifier, USHORT reason)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1993 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1994 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1995 T_DISPLAY_DATA display_info;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1996
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1997 tracefunction("GPRS_ShowCounterCb()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1998
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
1999 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2000 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2001 return;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2002 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2003
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2004 switch(reason)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2005 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2006 /* Prompt whether to reset */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2007
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2008 case INFO_KCD_LEFT:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2009 dlg_initDisplayData_TextId(&display_info, TxtCancel, TxtReset, TxtDataCounterReset, TxtNull, COLOUR_STATUS);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2010 dlg_initDisplayData_events(&display_info, (T_VOID_FUNC) GPRS_ResetCounter, TEN_SECS, KEY_HUP|KEY_CLEAR|KEY_LEFT|KEY_RIGHT );
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2011
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2012 info_dialog(win, &display_info);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2013 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2014
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2015 /* Press hangup key or select OK
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2016 * Calls GPRS_DestroyCounter to destroy window */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2017 case INFO_KCD_RIGHT:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2018 case INFO_KCD_HUP:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2019 GPRS_DestroyCounter();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2020 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2021 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2022
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2023 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2024 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2025
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2026
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2027 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2028
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2029 $Function: GPRS_ResetCounter
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2030
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2031 $Description: Callback from dialogue prompting whether to reset the data counter
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2032
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2033 $Returns: None
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2034
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2035 $Arguments: Standard callback parameters
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2036
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2037 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2038
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2039 static void GPRS_ResetCounter(T_MFW_HND win, UBYTE identifier, UBYTE reason)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2040 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2041 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2042
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2043 tracefunction("GPRS_ResetCounter()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2044
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2045 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2046 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2047 return;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2048 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2049
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2050 switch(reason)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2051 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2052 /* RSK - Reset counter */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2053
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2054 case INFO_KCD_RIGHT:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2055 if (data->counter_type==MMI_GPRS_COUNTER_UPLINK)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2056 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2057 data->uplink_counter = 0;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2058 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2059 else
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2060 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2061 data->downlink_counter = 0;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2062 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2063
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2064 GPRS_ShowCounter(win);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2065 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2066
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2067 /* LSK or HUP - cancel without resetting */
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2068
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2069 case INFO_KCD_LEFT:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2070 case INFO_KCD_HUP:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2071 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2072 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2073
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2074 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2075 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2076
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2077
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2078 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2079
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2080 $Function: GPRS_DestroyCounter
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2081
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2082 $Description: Destroy counter display
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2083
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2084 $Returns: None
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2085
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2086 $Arguments: None
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2087
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2088 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2089
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2090 static void GPRS_DestroyCounter()
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2091 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2092 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2093
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2094 tracefunction("GPRS_DestroyCounter()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2095
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2096 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2097 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2098 return;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2099 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2100
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2101 if (data->edit_win)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2102 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2103
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2104 /* New Editor */
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
2105
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2106 #ifdef NEW_EDITOR
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2107 AUI_edit_Destroy(data->edit_win);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2108 #else
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2109 editor_destroy(data->edit_win);
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2110 #endif
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2111 FREE_MEMORY((void *)data->counterstring, ULONG_SIZE_IN_DECIMAL);
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2112 data->counterstring = NULL;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2113 data->edit_win = NULL;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2114 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2115
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2116 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2117 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2118
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2119 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2120
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2121 $Function: GPRS_UpdateCounter
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2122
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2123 $Description: Change text string for the counter we've just changed
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2124
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2125 $Returns: None
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2126
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2127 $Arguments: None
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2128
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2129 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2130
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2131 static void GPRS_UpdateCounter(void)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2132 {
150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2133 T_MMI_GPRS_DATA *data = GPRS_Data();
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2134 ULONG counter;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2135
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2136 tracefunction("GPRS_UpdateCounter()");
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2137
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2138 if (!data)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2139 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2140 return;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2141 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2142
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2143 counter = 0;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2144
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2145 switch(data->counter_type)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2146 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2147 case MMI_GPRS_COUNTER_UPLINK:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2148 counter = data->uplink_counter;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2149 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2150
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2151 case MMI_GPRS_COUNTER_DOWNLINK:
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2152 counter = data->downlink_counter;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2153 break;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2154 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2155
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2156 if (counter<1024)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2157 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2158 sprintf(data->counterstring, "%d bytes",counter); // Counter is <1K, display bytes
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2159 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2160 else
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2161 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2162 counter = counter/KILOBYTE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2163 if (counter<1024)
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2164 sprintf(data->counterstring, "%dKB",counter); // Counter is <1M, display Kbytes
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2165 else
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2166 {
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2167 counter = counter/KILOBYTE;
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2168 sprintf(data->counterstring, "%dMB",counter); // Display Mbytes
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2169 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2170 }
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2171
abaee5bdfdc9 mmiGprs.c: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
2172 return;
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2173 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2174