FreeCalypso > hg > fc-magnetite
comparison src/ui3/mfw/mfw_nm.h @ 420:e8ddbb0837ed
src/ui3: initial import of TCS3/LoCosto BMI & MFW code
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 21 Jan 2018 03:09:00 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
419:59143cd42ec7 | 420:e8ddbb0837ed |
---|---|
1 /* | |
2 +--------------------------------------------------------------------+ | |
3 | PROJECT: MMI-Framework (8417) $Workfile:: mfw_nm.h $| | |
4 | $Author:: Es $Revision:: 1 $| | |
5 | CREATED: 07.10.98 $Modtime:: 20.01.00 18:48 $| | |
6 | STATE : code | | |
7 +--------------------------------------------------------------------+ | |
8 | |
9 PURPOSE: Type definitions for network management | |
10 | |
11 HISTORY: | |
12 | |
13 May 31, 2007 DR: OMAPS00133201 x0pleela | |
14 Description: MS keeps searching networks and doesn't list available PLMNs after | |
15 performing manual selection | |
16 Solution : Added new event E_NM_ABORT_NETWORK whihc wil be sent to BMI to | |
17 destroy the n/w searching dialog | |
18 | |
19 Sep 18,2006 DRT: OMAPS0090268 x0061088(Prachi) | |
20 Description : To check for Forbidden network (for deneid services),it takes long time. | |
21 Solution : Function rAT_PercentCREG() has now be implemented to handle CREG_STAT_Denied, | |
22 which sends nm_signal(NETWORK_FORBIDDEN_NETWORK) to Bmi . | |
23 | |
24 Jun 23, 2006 DR: OMAPS00082374 x0pleela | |
25 Description: EONS Failures - unexpected output from the MMI: 2 carriers; on the top always T-Mobile | |
26 Solution: a) Removed the function prototypes of set_opn_sel_done and get_opn_sel_done | |
27 | |
28 June 02, 2006 DR: OMAPS00078005 x0021334 | |
29 Descripton: Test for NITZ (Network Identity and Timezone) support - No New time was displayed | |
30 Solution: New Time/Date received from network is sent to MFW by lower layer by invoking 'rAT_PercentCTZV' | |
31 function. This function has now been implemented to pass on the received values to MMI | |
32 for user confirmation and RTC updation. | |
33 | |
34 Feb 15, 2006 ER: OMAPS00065203 x0pleela | |
35 Description: Cingular Operator Name Prioritization implementation required | |
36 Solution: Incorporated review comments | |
37 - Implemented prototypes of 2 new functions set_opn_sel_done() and | |
38 get_opn_sel_done() to set and get the current status of the operator selection | |
39 - Added T_MFW_NM_OPN opn_read_from as part of T_MFW_NETWORK_STRUCT | |
40 structure to avoid use of global variable as per review comments | |
41 | |
42 Feb 09, 2006 ER: OMAPS00065203 x0pleela | |
43 Description: Cingular Operator Name Prioritization implementation required | |
44 Solution: Added new enumeration T_MFW_NM_OPN | |
45 Added new event E_NM_OPN | |
46 Added prototype of newly incorporated functions | |
47 | |
48 July 14, 2005 REF: CRR 31916 x0021334 | |
49 Description: rCI_PercentCOPS() and rAT_PercentCOPS() is not implemented | |
50 Solution: rAT_PercentCOPS() is implemented. | |
51 */ | |
52 | |
53 #ifndef DEF_MFW_NM | |
54 #define DEF_MFW_NM | |
55 | |
56 | |
57 | |
58 /* #include "phb.h" RSA 20/12/01 - Removed */ | |
59 #include"mfw_phb.h" //RSA 20/12/01 - Added | |
60 #ifdef FF_2TO1_PS | |
61 #include "prim.h" | |
62 #else | |
63 #include "p_mmreg.val" | |
64 #endif | |
65 /* | |
66 * global constants | |
67 */ | |
68 #define NM_AUTOMATIC 0 /* automatic mode set */ | |
69 #define NM_MANUAL 1 /* manual mode is set */ | |
70 | |
71 | |
72 /* permit maximal value */ | |
73 | |
74 #define MAX_PLMN 12 /* maximal PLMN number */ | |
75 | |
76 #define LONG_NAME 26 | |
77 #define SHORT_NAME 10 | |
78 #define SP_NAME 17 | |
79 #define NUMERIC_LENGTH 7 /* 3 digits MCC + 3 digits MNC + '\0' */ | |
80 | |
81 #define MFW_PLMN_AVAILABLE 0 /* a permitted PLMN */ | |
82 #define MFW_PLMN_FORBIDDEN 1 /* a forbidden PLMN */ | |
83 | |
84 #define MFW_FULL_SERVICE 1 /* definition for services */ | |
85 #define MFW_LIMITED_SERVICE 2 | |
86 #define MFW_SEARCH_NETWORK 3 | |
87 #define MFW_NO_SERVICE 0 | |
88 | |
89 typedef enum | |
90 { | |
91 NEW_PREF_PLMN = 1, /* Add a new entry to the end of the list */ | |
92 CHANGE_PREF_PLMN, /* Change the place of two entries */ | |
93 INSERT_PREF_PLMN, /* Add a new entry to the list at a given index */ | |
94 REPLACE_PREF_PLMN, /* Overwrite an existing entry at a given index */ | |
95 DELETE_PREF_PLMN /* Delete an entry from the list */ | |
96 } T_MFW_PPLMN_MODE; | |
97 | |
98 typedef enum | |
99 { | |
100 NM_ERR, | |
101 NM_OK | |
102 } T_MFW_NM_RETURN; | |
103 | |
104 //x0pleela 08 Feb, 2006 ER: OMAPS00065203 | |
105 typedef enum | |
106 { | |
107 NM_ROM, /* operator name read from ROM */ | |
108 NM_EONS, /* operator name read from EONS */ | |
109 NM_CPHS, /* operator name read from ONS */ | |
110 NM_NITZ, /* operator name read from NITZ */ | |
111 NM_NONE = 255 /* no operator name */ | |
112 }T_MFW_NM_OPN; | |
113 | |
114 //x0pleel 8 Feb, 2006 ER: OMAPS00065203 | |
115 #define E_NM_OPN 0x4000 /* Event sent by MFW when operator name is obtained */ | |
116 | |
117 /* | |
118 * events are organised as bitmaps | |
119 */ | |
120 #define E_NM_FULL_SERVICE 0x0001 | |
121 #define E_NM_NO_SERVICE 0x0002 | |
122 #define E_NM_LIMITED_SERVICE 0x0004 | |
123 #define E_NM_SEARCH_NETWORK 0x0008 | |
124 #define E_NM_PLMN_LIST 0x0010 | |
125 #define E_NM_NO_NETWORK 0x0020 | |
126 #define E_NM_DEREGISTRATION 0x0040 | |
127 #define E_NM_PREF_PLMN_LIST 0x0080 | |
128 #define E_NM_CHANGE_PPLMN_OK 0x0100 | |
129 #define E_NM_CHANGE_PPLMN_ERR 0x0200 | |
130 #define E_NM_PPLMN_MEM 0x0400 | |
131 #define E_MFW_NET_IND 0x0800 | |
132 #define E_MFW_TIME_IND 0x1000 | |
133 #define E_NM_CELL_SELECT 0x1001 | |
134 #define E_NM_BAND 0x2000 /*SPR919 - SH - added */ | |
135 | |
136 //x0pleela 30 May, 2007 DR: OMAPS00133201 | |
137 #define E_NM_ABORT_NETWORK 0x3000 //Aborted by network during manual PLMN search | |
138 #define E_NM_FORBIDDEN_NETWORK 0x9000 //Sep 18,2006 DRT: OMAPS0090268 x0061088(Prachi) | |
139 #define E_NM_ALL_SERVICES /*0x0FFF*/ 0xFFFF /* SPR919 - SH - changed */ | |
140 //Geetha OMAPS00137726 | |
141 #define E_NM_PLMN_LIST_BOOTUP 0x8000 | |
142 /* Structures */ | |
143 | |
144 /* Cell Reselection Structure API 16-04-02 */ | |
145 typedef struct | |
146 { | |
147 USHORT ci; /* cell identification */ | |
148 USHORT lid; /* location identification */ | |
149 }T_MFW_CELL_STRUCT; | |
150 | |
151 typedef struct /* LONG NAME */ | |
152 { | |
153 UBYTE dcs; | |
154 UBYTE len; /* length of string data */ | |
155 UBYTE data[LONG_NAME]; /* string data */ | |
156 } T_MFW_LNAME; | |
157 | |
158 typedef struct /* SHORT NAME */ | |
159 { | |
160 UBYTE dcs; | |
161 UBYTE len; /* length of string data */ | |
162 UBYTE data[SHORT_NAME]; /* string data */ | |
163 } T_MFW_SNAME; | |
164 | |
165 typedef struct /* SERVICE PROVIDER NAME */ | |
166 { | |
167 UBYTE dcs; | |
168 UBYTE len; /* length of string data */ | |
169 UBYTE data[SP_NAME]; /* string data */ | |
170 UBYTE dummy; | |
171 } T_MFW_SP_NAME; | |
172 | |
173 typedef struct | |
174 { | |
175 SHORT index; | |
176 #ifdef NO_ASCIIZ | |
177 T_MFW_SP_NAME service_provider; /* service provider name */ | |
178 T_MFW_LNAME network_long; /* operator name in long format */ | |
179 T_MFW_SNAME network_short; /* operator name in short format */ | |
180 #else | |
181 UBYTE service_provider[LONG_NAME]; /* service provider name */ | |
182 UBYTE network_long [LONG_NAME]; /* operator name in long format */ | |
183 UBYTE network_short[SHORT_NAME]; /* operator name in short format */ | |
184 #endif | |
185 UBYTE network_numeric[NUMERIC_LENGTH]; /* operator name in numeric format */ | |
186 UBYTE display_condition; | |
187 UBYTE roaming_indicator; /* PLMN in HPLMN or not */ | |
188 UBYTE forbidden_indicator; /* PLMN is member of the forbidden PLMN list */ | |
189 UBYTE *fieldstrength; /* fieldstrength of PLMN */ | |
190 //x0pleela 15 Feb, 2006 ER: OMAPS00065203 | |
191 //Added as part of this structure to avoid use of global variable as per review comments | |
192 T_MFW_NM_OPN opn_read_from; /* Holds the source id from where operator name was read */ | |
193 } T_MFW_NETWORK_STRUCT; | |
194 | |
195 typedef struct { | |
196 UBYTE count; /* number of entries in perferred PLMN list */ | |
197 T_MFW_NETWORK_STRUCT *plmn; /* plmn identifications */ | |
198 } T_MFW_PREF_PLMN_LIST; /* prefered PLMN list*/ | |
199 | |
200 typedef struct | |
201 { | |
202 UBYTE count; /* number of available PLMNs */ | |
203 T_MFW_NETWORK_STRUCT plmn[MAX_PLMN]; /* plmn identifications */ | |
204 } T_MFW_PLMN_LIST; | |
205 | |
206 typedef struct | |
207 { | |
208 UBYTE maxRcd; /* maximum preferred PLMN records in SIM card */ | |
209 UBYTE usedRcd; /* used preferred PLMN records in SIM card */ | |
210 } T_MFW_PPLMN_MEM; | |
211 | |
212 typedef struct /* data for network name */ | |
213 { | |
214 UBYTE dcs; | |
215 UBYTE add_ci; | |
216 UBYTE num_spare; | |
217 UBYTE len; | |
218 #ifdef FF_2TO1_PS | |
219 UBYTE data[MMREG_MAX_TEXT_LEN]; | |
220 #else | |
221 UBYTE data[MMR_MAX_TEXT_LEN]; | |
222 #endif | |
223 } T_MFW_NET_NAME; | |
224 | |
225 typedef struct /* data buffer for network name */ | |
226 { | |
227 #ifdef FF_2TO1_PS | |
228 UBYTE mcc[PS_SIZE_MCC]; /* mobile country code */ | |
229 UBYTE mnc[PS_SIZE_MNC_MAX]; /* mobile network code */ | |
230 #else | |
231 UBYTE mcc[SIZE_MCC]; /* mobile country code */ | |
232 UBYTE mnc[SIZE_MNC]; /* mobile network code */ | |
233 #endif | |
234 T_MFW_NET_NAME long_name; /* Network name, long format */ | |
235 T_MFW_NET_NAME short_name; /* Network name, short format */ | |
236 } T_MFW_NET_IND; | |
237 | |
238 typedef struct /* data for timer zone */ | |
239 { | |
240 UBYTE year; | |
241 UBYTE month; | |
242 UBYTE day; | |
243 UBYTE hour; | |
244 UBYTE minute; | |
245 UBYTE second; | |
246 UBYTE timezone; | |
247 } T_MFW_TIME_IND; | |
248 | |
249 /* | |
250 * Network Parameter | |
251 */ | |
252 typedef union | |
253 { | |
254 T_MFW_NETWORK_STRUCT ident; | |
255 T_MFW_PLMN_LIST plmns; | |
256 T_MFW_PREF_PLMN_LIST pplmns; | |
257 T_MFW_PPLMN_MEM pplmn_mem; | |
258 T_MFW_NET_IND net_info; | |
259 T_MFW_TIME_IND tim_info; | |
260 T_MFW_CELL_STRUCT cell_info; /* sbh 29-04-02 - Cell reselection */ | |
261 } T_MFW_NM_PARA; | |
262 | |
263 | |
264 | |
265 /* | |
266 * Prototypes | |
267 */ | |
268 | |
269 int nm_init (void); | |
270 MfwHnd nm_create (MfwHnd hWin, MfwEvt event, MfwCb cbfunc); | |
271 MfwRes nm_delete (MfwHnd hWin); | |
272 void nm_set_mode (U8 mode); | |
273 T_MFW nm_get_mode (void); | |
274 T_MFW nm_reg_status (void); | |
275 void nm_select_plmn (U8 *network); | |
276 void nm_avail_plmn_list (void); | |
277 void nm_home_plmn (T_MFW_NETWORK_STRUCT *hplmn); | |
278 int nm_plnm_list(T_MFW_NETWORK_STRUCT *plmn_list, int start, int count); | |
279 | |
280 int nm_plnm_list_longnames(char**plmn_ln_list, int start, int count); /*SPR 2635.*/ | |
281 | |
282 void nm_pref_plmn_list(T_MFW_NETWORK_STRUCT *pplmn, UBYTE count, SHORT start); | |
283 T_MFW_NM_RETURN nm_change_pref_plmn(T_MFW_PPLMN_MODE mode, | |
284 SHORT index, SHORT index2, | |
285 UBYTE *network_numeric); | |
286 | |
287 T_MFW_NM_RETURN nm_change_pref_plmn_longname(T_MFW_PPLMN_MODE mode,/*SPR 2635.*/ | |
288 SHORT index, SHORT index2, | |
289 char* network_long); | |
290 | |
291 T_MFW nm_registration (U8 mode, U8 freq_bands, U8 limited); | |
292 void nm_deregistration (void); | |
293 void nm_abort_avail_plmn(void); | |
294 void nm_exit (void); | |
295 T_MFW_NM_RETURN nm_pplmn_mem_req(void); | |
296 | |
297 //x0pleela 09 Feb, 2006 ER: OMAPS00065203 | |
298 //Conversion from ACI souce Id type to MFW souceid type | |
299 #ifndef NEPTUNE_BOARD | |
300 int nm_decodeSourceId( UBYTE sourceId); | |
301 #endif | |
302 //To update plmn data after querying COPN | |
303 void nm_update_plmn_data( T_MFW_NETWORK_STRUCT *plmn_ident, | |
304 T_ACI_OPER_NTRY oper_ntry); | |
305 //To query COPN | |
306 void nm_get_COPN( T_MFW_NETWORK_STRUCT *plmn_ident ); | |
307 //Get operator name from other sources (CPHS or NITZ or ROM) | |
308 void nm_get_opername(T_MFW_NETWORK_STRUCT * plmn_ident); | |
309 //gets operator name from network | |
310 void nm_get_network_data(T_MFW_NETWORK_STRUCT *plmn_netw_data); | |
311 // June 02, 2006 DR: OMAPS00078005 x0021334 | |
312 // Function to put the PCTZV mode on | |
313 #ifdef FF_TIMEZONE | |
314 void nm_get_network_time(void); | |
315 | |
316 // June 02, 2006 DR: OMAPS00078005 x0021334 | |
317 // Function to set network time | |
318 void nm_set_network_time(T_MFW_TIME_IND *currclock); | |
319 #endif | |
320 | |
321 #ifdef NO_ASCIIZ | |
322 void nm_get_spn (T_MFW_SP_NAME *spn); | |
323 #else | |
324 /* PATCH PMC 000804 */ | |
325 void nm_get_spn (char *); | |
326 /* END PATCH PMC */ | |
327 #endif | |
328 void nm_abort_registraion(void); | |
329 | |
330 // July 14, 2005 REF: CRR 31916 x0021334 | |
331 // Prototype for new common function 'nm_Plus_Percent_COPS()' | |
332 void nm_Plus_Percent_COPS (S16 last_ind, T_ACI_COPS_OPDESC *operLst); | |
333 /* Added to remove warning */ | |
334 EXTERN UBYTE dspl_Enable (UBYTE in_Enable); | |
335 | |
336 #endif | |
337 /* Aug 07, 2007 DR:OMAPS00137726 x0066814(Geetha)*/ | |
338 void nm_get_plmn_list_during_bootup(void); | |
339 |