annotate src/ui/bmi/mmiGprs.h @ 303:f76436d19a7a default tip

!GPRS config: fix long-standing AT+COPS chance hanging bug There has been a long-standing bug in FreeCalypso going back years: sometimes in the AT command bring-up sequence of an ACI-only MS, the AT+COPS command would produce only a power scan followed by cessation of protocol stack activity (only L1 ADC traces), instead of the expected network search sequence. This behaviour was seen in different FC firmware versions going back to Citrine, and seemed to follow some law of chance, not reliably repeatable. This bug has been tracked down and found to be specific to !GPRS configuration, stemming from our TCS2/TCS3 hybrid and reconstruction of !GPRS support that was bitrotten in TCS3.2/LoCosto version. ACI module psa_mms.c, needed only for !GPRS, was missing in the TCS3 version and had to be pulled from TCS2 - but as it turns out, there is a new field in the MMR_REG_REQ primitive that needs to be set correctly, and that psa_mms.c module is the place where this initialization needed to be added.
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 08 Jun 2023 08:23:37 +0000
parents 056d0a19ed5b
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
110
056d0a19ed5b mmiGprs.h: 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:
110
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
15 $File: MmiGprs.h
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
110
056d0a19ed5b mmiGprs.h: 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:
110
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
24 Header file for 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.h
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
110
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
31 15/05/2003 - SPR#1983 - SH - Updated to latest from 1.6.3 version.
92
c0052fe355d3 src/ui/bmi/*.[ch]: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
32
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 $End
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 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 #ifndef _MMI_GPRS_H_
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 #define _MMI_GPRS_H_
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39
110
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
40 #ifndef WIN32 // EF GPRS testing enabled for windows
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
41 #undef TEST_MMIGPRS /* GPRS testing, gives extra menu functions */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 GLOBAL DEFINITIONS
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 /* GPRS states */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 enum
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 {
110
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
54 GPRS_NOTHING = -1, /* Nothing - no event to send */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
55 GPRS_OFF = 0, /* GPRS is not attached */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
56 GPRS_SEARCHING,
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
57 GPRS_ATTACHED, /* GPRS is attached */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
58 GPRS_CONTEXT_ACTIVATE, /* PDP context is activated */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
59 GPRS_CONTEXT_DEACTIVATE, /* PDP context is deactivated */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
60 GPRS_ERROR /* General GPRS error */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 };
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 #if (BOARD == 61)
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 /* EDGE states */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 enum
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 {
110
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
67 EDGE_NOTHING = -1, /* Nothing - no event to send */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
68 EDGE_OFF = 0, /* EDGE is not attached */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
69 EDGE_SEARCHING,
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
70 EDGE_ATTACHED, /* EDGE is attached */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
71 EDGE_CONTEXT_ACTIVATE, /* PDP context is activated */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
72 EDGE_CONTEXT_DEACTIVATE, /* PDP context is deactivated */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
73 EDGE_ERROR /* General EDGE error */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 };
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 #endif
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 typedef enum
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 {
110
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
79 MMI_GPRS_STATUS_IDLE,
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
80 MMI_GPRS_STATUS_ATTACHING,
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
81 MMI_GPRS_STATUS_DETACHING,
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
82 MMI_GPRS_STATUS_DATA_COUNTER
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 }E_MMI_GPRS_STATUS;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 /* SMS options */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 enum
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 {
110
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
89 SMS_SERVICE_GPRS = 0,
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
90 SMS_SERVICE_CS,
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
91 SMS_SERVICE_GPRS_PREF,
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
92 SMS_SERVICE_CS_PREF,
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
93 SMS_SERVICE_OMITTED = 0xFF
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 };
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 /* Quality of service (QOS) parameters */
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 enum
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 {
110
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
100 QOS_PRECED_HIGH = 1,
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
101 QOS_PRECED_NORMAL,
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
102 QOS_PRECED_LOW
3
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 enum
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 {
110
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
107 QOS_BEST = 1
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 };
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 /* Callback function */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 typedef void (*T_GPRS_CB) (int);// Earlier argument not used
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 void GPRS_Init(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 void GPRS_Exit(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 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
117
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 /* GPRS functionality */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 int GPRS_Status(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 int GPRS_Attach(T_MFW_HND win);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 int GPRS_Detach(T_MFW_HND win);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 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
124 int GPRS_ContextActivate(SHORT cid);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 int GPRS_ContextDeactivate(SHORT cid);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 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
127 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
128 UBYTE GPRS_SmsService(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 UBYTE GPRS_SetSmsService(UBYTE service);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 /* MMI functionality */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 int GPRS_MenuAttach(MfwMnu* m, MfwMnuItem* i);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 int GPRS_MenuDetach(MfwMnu* m, MfwMnuItem* i);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 int GPRS_MenuIncomingDataCount(MfwMnu* m, MfwMnuItem* i);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 int GPRS_MenuOutgoingDataCount(MfwMnu* m, MfwMnuItem* i);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 int GPRS_MenuSelectSms(MfwMnu* menu, MfwMnuItem* item);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 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
139
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 /*******************************************************************************
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 LOCAL DATA TYPES
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146
110
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
147 #define ULONG_SIZE_IN_DECIMAL 10 /* Max no. of decimal digits a ULONG can have */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
148 #define KILOBYTE 1024 /* No of bytes in a kilobyte, used for data counter calculation. */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
149 #define PLEASEWAIT_TIMEOUT 35000 /* Time for "please wait" window to time out */
3
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 /* Counter types */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 typedef enum
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 {
110
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
155 MMI_GPRS_COUNTER_UPLINK,
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
156 MMI_GPRS_COUNTER_DOWNLINK
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 } T_MMI_GPRS_COUNTER;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 /* GPRS data */
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 typedef struct
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 {
110
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
163 T_MFW_HND mfw_gprs; /* Provide a handle to the GPRS information. */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
164 UBYTE cid; /* The context id. Starts at 1 then increments. */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
165 UBYTE reg_status; /* Registration status */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
166 MfwHnd pleasewait_win; /* Handle for the Please Wait window */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
167 MfwHnd edit_win; /* Handle for editor window */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
168 MfwHnd menu_win; /* Handler for menu windows */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
169 char *counterstring; /* String for counter digits */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
170 ULONG uplink_counter; /* Value of uplink counter */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
171 ULONG downlink_counter; /* Value of downlink counter */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
172 USHORT counter_type; /* TRUE if uplink counter has been requested */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
173 UBYTE sms_service; /* Type of SMS service */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
174 BOOL display; /* Whether to display "OK" windows or not */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
175 USHORT status; /* Current status */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
176 T_MFW_HND notify_win; /* Window to which to send notification */
056d0a19ed5b mmiGprs.h: bogotab fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 92
diff changeset
177 T_GPRS_CB callback; /* MMI provided callback function */
3
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 }
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 T_MMI_GPRS_DATA;
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181
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
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 LOCAL FUNCTION PROTOTYPES
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 *******************************************************************************/
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 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
189 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
190 static void GPRS_PleaseWaitDestroy(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 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
192 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
193 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
194 static void GPRS_DestroyCounter(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 static void GPRS_UpdateCounter(void);
67bfe9f274f6 src/ui: import of src/ui3 from Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 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
197 #endif