FreeCalypso > hg > fc-magnetite
comparison src/aci2/mfw/mfw_gprs.h @ 3:93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 26 Sep 2016 00:29:36 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2:c41a534f33c6 | 3:93999a60b835 |
---|---|
1 /* | |
2 +--------------------------------------------------------------------+ | |
3 | PROJECT: MMI-Framework (8417) $Workfile:: mfw_gprs.h $| | |
4 | $Author: KGT $Revision:: 1 $| | |
5 | CREATED: 13.02.2001 $Modtime:: 13.02.2001 $| | |
6 | STATE : code | | |
7 +--------------------------------------------------------------------+ | |
8 | |
9 MODULE : MFW_GPRS | |
10 | |
11 PURPOSE : This modul contains definition needed for the GPRS | |
12 management in MFW. | |
13 | |
14 $History: Mfw_gprs.h | |
15 | |
16 Feb 24, 2006 REF:DR OMAPS00068976 x0035544 | |
17 Description: GPRS attach icon - MMI follow up issue of OMAPS00051034 | |
18 solution: Added the structure variable p_reg_State to the union and named it | |
19 as Reg_state. This structure stores the network registration status information | |
20 given by qAT_percentCREG(). | |
21 | |
22 15/05/2003 - SPR#1983 - SH - Updated to latest from 1.6.3 version. | |
23 | |
24 $End | |
25 */ | |
26 | |
27 #ifndef DEF_MFW_GPRS_HEADER | |
28 #define DEF_MFW_GPRS_HEADER | |
29 | |
30 | |
31 /* GPRS events -----------------------------------------------------*/ | |
32 #define E_MFW_GPRS_S_CNTXT 0x00000001 | |
33 #define E_MFW_GPRS_S_ATT 0x00000002 | |
34 #define E_MFW_GPRS_S_ACT 0x00000004 | |
35 #define E_MFW_GPRS_R_ACT 0x00000008 | |
36 #define E_MFW_GPRS_S_DATA 0x00000010 | |
37 #define E_MFW_GPRS_R_DATA 0x00000020 | |
38 #define E_MFW_GPRS_S_QOS 0x00000040 | |
39 #define E_MFW_GPRS_R_QOS 0x00000080 | |
40 #define E_MFW_GPRS_S_QOS_MIN 0x00000100 | |
41 #define E_MFW_GPRS_S_CLASS 0x00000200 | |
42 #define E_MFW_GPRS_S_PDPADDR 0x00000400 | |
43 #define E_MFW_GPRS_S_AUTORESP 0x00000800 | |
44 #define E_MFW_GPRS_S_ANS 0x00001000 | |
45 #define E_MFW_GPRS_R_ANS 0x00002000 | |
46 #define E_MFW_GPRS_S_EREP 0x00004000 | |
47 #define E_MFW_GPRS_R_EREP_RJ 0x00008000 | |
48 #define E_MFW_GPRS_R_EREP_ATT 0x00010000 | |
49 #define E_MFW_GPRS_R_EREP_ACT 0x00020000 | |
50 #define E_MFW_GPRS_R_EREP_DEACT 0x00040000 | |
51 #define E_MFW_GPRS_R_EREP_CLASS 0x00080000 | |
52 #define E_MFW_GPRS_R_REG 0x00200000 | |
53 #define E_MFW_GPRS_S_SMSSERV 0x00400000 | |
54 #define E_MFW_GPRS_OK 0x00800000 | |
55 #define E_MFW_GPRS_ERROR 0x01000000 | |
56 #define E_MFW_GPRS_CONNECT 0x02000000 | |
57 #define E_MFW_GPRS_ERR_CONNECT 0x04000000 | |
58 #define E_MFW_GPRS_COUNTER 0x08000000 | |
59 | |
60 #define E_MFW_GPRS_ALL_EVENTS 0x0FFFFFFF | |
61 | |
62 | |
63 /* GPRS Parameter --------------------------------------------------*/ | |
64 | |
65 /* Data Counter */ | |
66 typedef struct | |
67 { | |
68 UBYTE c_id; | |
69 ULONG octets_uplink; /* No. of bytes transferred in uplink */ | |
70 ULONG octets_downlink; /* No. of bytes transferred in downlink */ | |
71 ULONG packets_uplink; /* No. of packets transferred in uplink */ | |
72 ULONG packets_downlink; /* No. of packets transferred in uplink */ | |
73 } T_MFW_GPRS_COUNTER; | |
74 | |
75 /* Structure to store cell reselection information. */ | |
76 typedef struct | |
77 { | |
78 T_CGREG_STAT stat; | |
79 USHORT lac; | |
80 USHORT ci; | |
81 } T_MFW_GPRS_CELL_STRUCT; | |
82 | |
83 typedef struct | |
84 { | |
85 T_P_CGREG_STAT stat; | |
86 USHORT lac; | |
87 USHORT ci; | |
88 } T_MFW_GPRS_CELL_STRUCT_P; | |
89 | |
90 typedef struct | |
91 { | |
92 #ifdef FF_2TO1_PS | |
93 U8 id; /* context id */ | |
94 T_PDP_CONTEXT_INTERNAL data; /* context data */ | |
95 #else | |
96 USHORT id; /* context id */ | |
97 T_GPRS_CONT_REC data; /* context data */ | |
98 #endif | |
99 BOOL activated; /* context mode */ | |
100 char *L2P; /* layer 2 protocol */ | |
101 } T_MFW_GPRS_CONTEXT; | |
102 | |
103 typedef struct | |
104 { | |
105 USHORT *ids; /* context ids */ | |
106 BOOL state; /* activation state */ | |
107 } T_MFW_GPRS_CNTXT_ACT; | |
108 | |
109 typedef struct | |
110 { | |
111 USHORT *ids; /* context ids */ | |
112 char *L2P; /* layer 2 protocol */ | |
113 } T_MFW_GPRS_CNTXT_L2P; | |
114 | |
115 typedef struct | |
116 { | |
117 T_CGEREP_MODE mode; /* event reporting mode */ | |
118 T_CGEREP_BFR bfr; /* effect control on buffered events */ | |
119 } T_MFW_GPRS_EVENTREP; | |
120 | |
121 typedef struct | |
122 { | |
123 T_MFW_GPRS_CONTEXT *contexts; /* list of defined contexts */ | |
124 USHORT numContexts; /* number of defined contexts */ | |
125 T_CGATT_STATE attached; /* Now T_CGATT_STATE instead of BOOL*/ | |
126 BOOL autoResponse; /* auto response mode */ | |
127 T_MFW_GPRS_EVENTREP eventRep; /* event reporting */ | |
128 T_CGCLASS_CLASS tclass; /* GPRS class mode */ | |
129 //x0035544 Feb 23, 2006 DR:OMAPS00068976 | |
130 union | |
131 { | |
132 T_CGREG_STAT regState; /* network registration state */ | |
133 T_P_CGREG_STAT p_reg_State;/* present network registration state */ | |
134 }Reg_state; | |
135 T_CGSMS_SERVICE SMSService; /* service to use for SMS */ | |
136 USHORT link_id; /* link identifier for data transfer */ | |
137 T_MFW_GPRS_COUNTER counter; /* Data uplink/downlink counter */ | |
138 USHORT lac; /* Location area code */ | |
139 USHORT ci; /* Cell id */ | |
140 } T_MFW_GPRS_DATA; | |
141 | |
142 typedef union | |
143 { | |
144 SHORT cID; | |
145 T_MFW_GPRS_CONTEXT context; | |
146 T_MFW_GPRS_CNTXT_ACT contextAct; | |
147 T_MFW_GPRS_CNTXT_L2P contextL2P; | |
148 BOOL mode; | |
149 T_CGATT_STATE attached; /* Now T_CGATT_STATE instead of BOOL*/ | |
150 T_CGCLASS_CLASS tclass; | |
151 T_MFW_GPRS_EVENTREP eventRep; | |
152 T_EVENT_REJECT erepReject; | |
153 T_EVENT_ACT erepAct; | |
154 T_MFW_GPRS_CELL_STRUCT cell; /* Cell reselection data */ | |
155 T_CGSMS_SERVICE service; | |
156 USHORT link_id; | |
157 T_ACI_AT_CMD cmdId; | |
158 T_MFW_GPRS_COUNTER counter; /* Data uplink/downlink counter */ | |
159 } T_MFW_GPRS_PARA; | |
160 | |
161 | |
162 /* MFW Control Block for GPRS --------------------------------------*/ | |
163 typedef struct | |
164 { | |
165 T_MFW_EVENT emask; /* events of interest */ | |
166 T_MFW_EVENT event; /* current event */ | |
167 T_MFW_CB handler; /* callback handler */ | |
168 T_MFW_GPRS_DATA data; /* GPRS data */ | |
169 } T_MFW_GPRS; | |
170 | |
171 | |
172 | |
173 /* MFW internal functions ------------------------------------------*/ | |
174 | |
175 void gprs_init ( void ); | |
176 | |
177 void gprs_exit ( void ); | |
178 | |
179 T_MFW_HND gprs_create ( T_MFW_HND hWin, | |
180 T_MFW_EVENT event, | |
181 T_MFW_CB cbfunc ); | |
182 | |
183 T_MFW_RES gprs_delete ( T_MFW_HND h ); | |
184 | |
185 int gprsCommand ( U32 cmd, | |
186 void *h ); | |
187 | |
188 void gprs_signal ( T_MFW_EVENT event, | |
189 void *para ); | |
190 | |
191 void gprs_ok(T_ACI_AT_CMD cmdId); | |
192 void gprs_error(T_ACI_AT_CMD cmdId, T_ACI_CME_ERR err); | |
193 void gprs_connect(SHORT cId); | |
194 void gprs_err_connect(SHORT cId); | |
195 | |
196 /* MMI-MFW Interface Functions -------------------------------------*/ | |
197 | |
198 #ifndef FF_2TO1_PS | |
199 T_MFW_RES gprs_definePDPContext ( SHORT cid, | |
200 T_GPRS_CONT_REC *inputCtxt ); | |
201 | |
202 T_MFW_RES gprs_setQOS ( SHORT cid , | |
203 T_QOS *inputQos ); | |
204 | |
205 T_MFW_RES gprs_setQOSMin ( SHORT cid , | |
206 T_QOS *inputQos); | |
207 | |
208 T_MFW_RES gprs_attach ( T_CGATT_STATE state); | |
209 /* SPR#1983 - SH - Added function to cancel CGATT command */ | |
210 T_MFW_RES gprs_attach_abort(void); | |
211 | |
212 T_MFW_RES gprs_contextActivation( T_CGACT_STATE state, | |
213 SHORT *cids); | |
214 | |
215 T_MFW_RES gprs_setData ( char *L2P, | |
216 SHORT *cids); | |
217 | |
218 T_MFW_RES gprs_showPDPAddress ( SHORT *cids, | |
219 T_PDP_ADDRESS *pdp_address); | |
220 #else | |
221 T_MFW_RES gprs_definePDPContext ( SHORT cid, | |
222 T_PDP_CONTEXT *inputCtxt ); | |
223 | |
224 T_MFW_RES gprs_setQOS ( SHORT cid , | |
225 T_PS_qos *inputQos ); | |
226 | |
227 T_MFW_RES gprs_setQOSMin ( SHORT cid , | |
228 T_PS_qos *inputQos); | |
229 | |
230 T_MFW_RES gprs_attach ( T_CGATT_STATE state); | |
231 /* SPR#1983 - SH - Added function to cancel CGATT command */ | |
232 T_MFW_RES gprs_attach_abort(void); | |
233 | |
234 T_MFW_RES gprs_contextActivation( T_CGACT_STATE state, | |
235 SHORT *cids); | |
236 | |
237 T_MFW_RES gprs_setData ( char *L2P, | |
238 SHORT *cids); | |
239 | |
240 T_MFW_RES gprs_showPDPAddress ( SHORT *cids, | |
241 T_NAS_ip *pdp_address); | |
242 #endif | |
243 | |
244 T_MFW_RES gprs_setAutoResponse ( T_CGAUTO_N mode); | |
245 | |
246 T_MFW_RES gprs_ManualResponse ( USHORT response, | |
247 char *l2p, | |
248 SHORT cid); | |
249 | |
250 T_MFW_RES gprs_setClass ( T_CGCLASS_CLASS m_class); | |
251 | |
252 T_MFW_RES gprs_setEventReporting( T_CGEREP_MODE mode, | |
253 T_CGEREP_BFR bfr); | |
254 | |
255 T_MFW_RES gprs_setServiceSMS ( T_CGSMS_SERVICE service); | |
256 | |
257 T_CGSMS_SERVICE gprs_getServiceSMS(void); | |
258 | |
259 /* Interface for SNCNT command */ | |
260 T_MFW_RES gprs_counter(BOOL reset_counter); | |
261 | |
262 /* SPR#1983 - SH - Added function to cancel SNCNT command */ | |
263 T_MFW_RES gprs_counter_abort(void); | |
264 | |
265 T_CGREG_STAT gprs_status(void); | |
266 //x0035544 Feb 23, 2006 DR:OMAPS00068976 | |
267 /* Added function to querry and update the gprs status */ | |
268 T_P_CGREG_STAT p_gprs_status(void); | |
269 | |
270 /* ACI callback functions ------------------------------------------*/ | |
271 | |
272 void rAT_PlusCGACT ( SHORT link_id ); | |
273 /* link_id: Link identifier */ | |
274 | |
275 void rAT_PlusCGDATA ( SHORT link_id ); | |
276 /* link_id: Link identifier */ | |
277 | |
278 void rAT_PlusCGANS ( SHORT link_id ); | |
279 /* link_id: Link identifier */ | |
280 | |
281 void rAT_PlusCGEREP ( T_CGEREP_EVENT event, | |
282 T_CGEREP_EVENT_REP_PARAM *param ); | |
283 /* event : GPRS event | |
284 param : event parameter */ | |
285 void rAT_PercentCGEV ( T_CGEREP_EVENT event, | |
286 T_CGEREP_EVENT_REP_PARAM *param ); | |
287 /* event : GPRS event | |
288 param : event parameter */ | |
289 | |
290 void rAT_PlusCGREG ( T_CGREG_STAT stat, | |
291 USHORT lac, | |
292 USHORT ci ); | |
293 /* stat : indicates the current registration | |
294 lac : two byte location area code | |
295 ci : two byte cell ID */ | |
296 | |
297 // ADDED BY RAVI - ACI CHANGES - 5-10-2005 | |
298 void rAT_PercentCGREG ( T_P_CGREG_STAT stat, | |
299 USHORT lac, | |
300 USHORT ci, | |
301 BOOL bActiveContext ); | |
302 // BOOL bActiveContext ); | |
303 /* stat : indicates the current registration | |
304 lac : two byte location area code | |
305 ci : two byte cell ID | |
306 bActiveContext : boolean: shows wether a PDP context is | |
307 established or not*/ | |
308 | |
309 #ifdef FF_2TO1_PS | |
310 void rAT_changedQOS ( U8 cid, | |
311 T_PS_qos *qos ); | |
312 /* cid : context id | |
313 *qos : quality of service profile */ | |
314 #else | |
315 void rAT_changedQOS ( SHORT cid, | |
316 T_QOS *qos ); | |
317 /* cid : context id | |
318 *qos : quality of service profile */ | |
319 | |
320 #endif | |
321 | |
322 // END ADDITION BY RAVI - 5-10-2005 | |
323 GLOBAL void rAT_PercentSNCNT ( UBYTE c_id, | |
324 ULONG octets_uplink, | |
325 ULONG octets_downlink, | |
326 ULONG packets_uplink, | |
327 ULONG packets_downlink ); | |
328 | |
329 #endif |