comparison src/ui3/mfw/mfw_cphs.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: GSM-MFW (8417) $Workfile:: mfw_cphs.h $|
4 | $Author:: Vo $Revision:: 1 $|
5 | CREATED: 14.7.00 $Modtime:: $|
6 | STATE : code |
7 +--------------------------------------------------------------------+
8
9 PURPOSE : Types defination for CPHS management
10
11 May 30, 2006 DR: OMAPS00070657 x0pleela
12 Description: CPHS feature on Locosto-Lite
13 Solution: For ALS feature,
14 a)Added function prototype "mfw_cphs_get_als_info()" which returns
15 the current active line
16
17 Oct 04, 2004 REF: CRR 25519 Deepa M.D
18 Bug:Re-align structure members in MFW
19 Fix:Structure elements have been realigned to avoid the structure padding
20 */
21
22 #ifndef DEF_MFW_CPHS
23 #define DEF_MFW_CPHS
24 #include <string.h>
25
26 #if defined (NEW_FRAME)
27
28 #include "typedefs.h"
29 #include "vsi.h"
30 #include "pei.h"
31 #include "custom.h"
32 #include "gsm.h"
33
34 #else
35
36 #include "STDDEFS.H"
37 #include "custom.h"
38 #include "gsm.h"
39 #include "vsi.h"
40
41 #endif
42
43 #include "mfw_mfw.h"
44 #include "mfw_nm.h"
45 #include "mfw_sim.h"
46 #include "mfw_simi.h"
47 #include "mfw_sima.h"
48 #include "mfw_nmi.h"
49 #include "mfw_phb.h"
50 #include "mfw_phbi.h"
51 #include "mfw_cm.h"
52 #include "mfw_cmi.h"
53 #include "mfw_sms.h"
54 #include "mfw_smsi.h"
55
56 #include "drv_key.h"
57
58
59 #include "ksd.h"
60
61 #if defined (FAX_AND_DATA)
62 #include "aci_fd.h"
63 #endif
64
65
66 #include "phb.h"
67
68
69 #include "mfw_ss.h"
70 #include "mfw_ssi.h"
71
72
73 #include "mfw_sys.h"
74
75 #ifdef NEPTUNE_BOARD
76 #include "Ffs.h"
77 #endif
78
79
80 /* Constants define */
81 #define MFW_INVALID_SIM_DATA 0xFF
82 #define MAX_CPHS_ENTRY 4
83 #define MAX_PCM_MAILBOX_LEN 10
84
85 typedef enum /* CPHS status */
86 {
87 CPHS_NotPresent = 10,
88 CPHS_ERR,
89 //x0pleela 11 June, 2006 DR:OMAPS00079692
90 //changed from CPHS_OK to MFW_CPHS_OK
91 MFW_CPHS_OK
92 } T_MFW_CPHS_STATUS;
93
94 typedef enum /* SIM operation status */
95 {
96 MFW_SIMOP_UNKNOWN = 20,
97 MFW_SIMOP_WRITE_ERR,
98 MFW_SIMOP_WRITE_OK,
99 MFW_SIMOP_READ_ERR,
100 MFW_SIMOP_READ_OK
101 } T_MFW_SIMOP_STATUS;
102
103 typedef enum /* CPHS service */
104 {
105 MFW_CPHS_CSP = 1, /* customer service profile */
106 MFW_CPHS_SST, /* service string table */
107 MFW_CPHS_MB_NUMBER, /* mailbox numbers */
108 MFW_CHPS_NAME_SHORT, /* operator name shortform */
109 MFW_CHPS_INFO_NUMBERS /* information numbers */
110 } T_MFW_CPHS_SERVICE;
111
112 typedef enum /* index of mailbox-number/alternate-line service */
113 {
114 MFW_SERV_NotPresent = -1,
115 MFW_SERV_LINE1 = 0,
116 MFW_SERV_LINE2,
117 MFW_SERV_DATA,
118 MFW_SERV_FAX
119 } T_MFW_LINE_INDEX;
120
121 typedef enum /* status of alternate line service */
122 {
123 MFW_LINE_UNLOCKED = 0,
124 MFW_LINE_LOCKED
125 } T_MFW_LINE_STATUS;
126
127 typedef enum /* voice message waiting flag and
128 call forwarding flags */
129 {
130 MFW_CFLAG_NotPresent = 0,
131 MFW_CFLAG_SET = 0x0A,
132 MFW_CFLAG_NOTSet = 0x05
133 } T_MFW_CFLAG_STATUS;
134
135 /* events are organised as bitmaps */
136 #define E_CPHS_IND 0x0001
137 #define E_CPHS_OP_NAME 0x0002
138 #define E_CPHS_GET_VC_NUM 0x0004
139 #define E_CPHS_SET_VC_NUM 0x0008
140 #define E_CPHS_GET_VC_STAT 0x0010
141 #define E_CPHS_SET_VC_STAT 0x0020
142 #define E_CPHS_GET_DV_STAT 0x0040
143 #define E_CPHS_SET_DV_STAT 0x0080
144 #define E_CPHS_GET_ALS_STATUS 0x0100
145 #define E_CPHS_SET_LINE 0x0200
146 #define E_CPHS_SET_ALS_STATUS 0x0400
147 #define E_CPHS_GET_CSP 0x0800
148 #define E_CPHS_GET_INFO_NUM 0x1000
149 #define E_CPHS_GET_INFO_LIST 0x2000
150 #define E_CPHS_GET_SIM_FIELD 0x4000 //MC for generic sim reads
151 #define E_CPHS_SET_SIM_FIELD 0x8000 //sbh for generic sim writes
152 #define E_CPHS_MSP_IND 0x10000
153 #ifdef FF_CPHS_REL4
154 #define E_CPHS_REL4_GET_MBI 0x20000
155 #define E_CPHS_REL4_GET_MBDN 0x40000
156 #endif
157
158 typedef struct /* Character */
159 {
160 UBYTE len; /* length of string data */
161 UBYTE data[PHB_MAX_LEN]; /* string data */
162 } T_MFW_STRING;
163
164 typedef struct /* Information numbers */
165 {
166 UBYTE index;
167 UBYTE entryStat; /* entry status */
168 T_MFW_PHB_TEXT alpha; /* alpha identifier */
169 } T_MFW_CPHS_INFO_NUMBER;
170
171 typedef struct /* List of information numbers */
172 {
173 UBYTE count; /* number of read entries */
174 UBYTE level;
175 T_MFW_CPHS_INFO_NUMBER entry[MAX_CPHS_ENTRY]; /* entries */
176 } T_MFW_CPHS_INFONUM_LIST;
177
178 typedef struct /* CPHS information */
179 {
180 UBYTE phase;
181 UBYTE opNS; /* operator name shortform */
182 UBYTE mbNum; /* mailbox numbers */
183 UBYTE sst; /* service string table */
184 UBYTE csp; /* customer service profile */
185 UBYTE iNum; /* information numbers */
186 } T_MFW_CPHS_INFO;
187
188 typedef struct /* Operator name */
189 {
190 T_MFW_LNAME longName; /* operator name string */
191 T_MFW_SNAME shortName; /* operator name shortform */
192 } T_MFW_CPHS_OP_NAME;
193
194 #define MFW_CPHS_VM_NUMBER_MAXLEN ( PHB_MAX_LEN + 20 )
195
196 typedef struct /* Mailbox number */
197 {
198 UBYTE index; /* index in phonebook table */
199 T_MFW_PHB_TEXT alpha; /* alpha identifier */
200 UBYTE number[MFW_CPHS_VM_NUMBER_MAXLEN]; /* telephone number */
201 UBYTE ton; /* type of number */
202 UBYTE npi; /* numbering plan identifier */
203 UBYTE service; /* indicates the line or fax/data */
204 UBYTE ext_rec_number; /* Number of EXT Records */
205 UBYTE ext_rec_idx[4];
206 UBYTE datalen;
207 UBYTE list_index; /* Index / Position in the List */
208 } T_MFW_CPHS_ENTRY;
209
210 typedef struct /* List of mailbox numbers */
211 {
212 UBYTE count; /* numbers of the list */
213 T_MFW_CPHS_ENTRY entries[MAX_CPHS_ENTRY];
214 } T_MFW_CPHS_VC_NUM;
215
216 /*Data structure to store MBI of registered profile*/
217 #ifdef FF_CPHS_REL4
218 typedef struct
219 {
220 UBYTE voice; /*stores record id of voice*/
221 UBYTE fax; /*stores record id of fax*/
222 UBYTE electronic; /*stores record id of electronic*/
223 UBYTE other; /*stores record id of other*/
224 UBYTE valid; /*1 - the info stored is valid
225 0 - the info stored is invalid*/
226 } T_MFW_CPHS_REL4_MBI;
227
228 typedef struct
229 {
230 CHAR alpha[MAX_ALPHA_LEN];
231 CHAR number[MAX_MB_NUM_LEN];
232 T_ACI_TOA type;
233 } T_MFW_MBDN;
234
235 typedef struct
236 {
237 T_MFW_MBDN mailbox_numbers[4];/*mailbox numbers of voice,fax,electronic and other*/
238 UBYTE valid; /* 1st bit-voicemail, 2nd bit-fax,3rd bit-electronic,4th bit-other. bit set if valid, bit unset if invalid*/
239 } T_MFW_CPHS_REL4_MBDN;
240
241 typedef enum
242 {
243 T_MFW_CPHS_REL4_MAILBOX_VOICE=0,
244 T_MFW_CPHS_REL4_MAILBOX_FAX,
245 T_MFW_CPHS_REL4_MAILBOX_ELECTRONIC,
246 T_MFW_CPHS_REL4_MAILBOX_OTHER
247 } T_MFW_CPHS_REL4_MAILBOX_TYPE;
248
249 #endif
250
251 typedef struct /* Voice message waiting information */
252 {
253 UBYTE result; /* read error/no error */
254 T_MFW_CFLAG_STATUS line1; /* waiting status of line 1 */
255 T_MFW_CFLAG_STATUS line2; /* waiting status of line 2 */
256 T_MFW_CFLAG_STATUS fax; /* waiting status of fax */
257 T_MFW_CFLAG_STATUS data; /* waiting status of data */
258 } T_MFW_CPHS_VC_STAT;
259
260 /*Data structure to store MWIS of a profile*/
261 #ifdef FF_CPHS_REL4
262 typedef struct
263 {
264 UBYTE mwisStat;
265 UBYTE voicemail;
266 UBYTE fax;
267 UBYTE electronic;
268 UBYTE other;
269 } T_MFW_CPHS_REL4_MWIS;
270 #endif
271
272 typedef struct /* Status of diverted call indicators */
273 {
274 UBYTE result; /* read error/no error */
275 T_MFW_CFLAG_STATUS line1; /* call forwarding unconditional status of line 1 */
276 T_MFW_CFLAG_STATUS line2; /* call forwarding unconditional status of line 2 */
277 T_MFW_CFLAG_STATUS fax; /* call forwarding unconditional status of fax */
278 T_MFW_CFLAG_STATUS data; /* call forwarding unconditional status of data */
279 } T_MFW_CPHS_DV_STAT;
280
281 /*a0393213 cphs rel4 - added a structure for divert status*/
282 #ifdef FF_CPHS_REL4
283 typedef struct /* Status of diverted call indicators */
284 {
285 T_MFW_CFLAG_STATUS voice; /* call forwarding unconditional status of voice */
286 T_MFW_CFLAG_STATUS fax; /* call forwarding unconditional status of fax */
287 T_MFW_CFLAG_STATUS data; /* call forwarding unconditional status of data */
288 char voice_dialling_number[PHB_MAX_LEN]; /*number to which voice has been forwarded*/
289 } T_MFW_CPHS_REL4_DV_STAT;
290 #endif
291
292 typedef struct /* Information about alternate line service */
293 {
294 T_MFW_LINE_INDEX selectedLine;
295 T_MFW_LINE_STATUS status; /* ALS is locked or unlocked */
296 } T_MFW_CPHS_ALS_STATUS;
297
298
299 //Code 15:
300 typedef struct /* Customer service profile */
301 {
302 UBYTE result; /* read error/no error */
303 UBYTE csp[20]; /* size of MFW_CPHS_CSP_SIZE */
304 } T_MFW_CPHS_CSP;
305 //Code 15 END
306
307
308
309 typedef struct /* Information number entry */
310 {
311 UBYTE result; /* read error/no error (only used for read information number) */
312 UBYTE index;
313 UBYTE entryStat;
314 T_MFW_PHB_TEXT alpha; /* alpha identifier */
315 UBYTE number[4];
316 UBYTE ton;
317 UBYTE npi;
318 } T_MFW_CPHS_INFONUM_ENTRY;
319
320 #ifdef FF_CPHS_REL4
321 typedef struct
322 {
323 char alpha[MAX_ALPHA_LEN];
324 char number[MAX_PHB_NUM_LEN];
325 T_ACI_TOA type;
326 T_ACI_BS_SPEED speed;
327 T_ACI_CNUM_SERV service;
328 T_ACI_CNUM_ITC itc;
329 }T_MFW_CPHS_MSP_REC;
330
331 typedef struct
332 {
333 UBYTE count;
334 T_MFW_CPHS_MSP_REC profile[4];
335 UBYTE default_profile;
336 UBYTE registered_profile;
337 }T_MFW_CPHS_MSP_INFO;
338 #endif
339
340 /***************************Go-lite Optimization changes Start***********************/
341 //Oct 04, 2004 REF: CRR 25519 Deepa M.D
342 //Structure elements (T_MFW_CPHS_READ_SIM_ENTRY)are realigned to avoid the structure padding
343 typedef struct /* SIM read data */
344 {
345
346 UBYTE* exchange_data;
347 USHORT sim_result; /* read error/no error (only used for read information number) */
348 USHORT requested_field;
349 UBYTE data_len;
350 UBYTE record; /* sh */
351 } T_MFW_CPHS_READ_SIM_ENTRY;
352 /***************************Go-lite Optimization changes end***********************/
353
354 /* CPHS Parameter */
355 typedef union
356 {
357 T_MFW_CPHS_STATUS stat;
358 T_MFW_CPHS_OP_NAME oper_name;
359 T_MFW_CPHS_VC_NUM vc_entry;
360 UBYTE result;
361 T_MFW_CPHS_VC_STAT vc_status;
362 T_MFW_CPHS_DV_STAT dv_status;
363 T_MFW_CPHS_ALS_STATUS als_status;
364 T_MFW_CPHS_CSP csp;
365 T_MFW_CPHS_INFONUM_LIST num_list;
366 T_MFW_CPHS_INFONUM_ENTRY info_entry;
367 T_MFW_CPHS_READ_SIM_ENTRY read_sim_entry;
368 } T_MFW_CPHS_PARA;
369
370 /* prototypes define */
371 void cphs_init (void);
372 void cphs_exit (void);
373 MfwHnd cphs_create (MfwHnd hWin, MfwEvt event, MfwCb cbfunc);
374 MfwRes cphs_delete (MfwHnd h);
375 T_MFW cphs_config (T_MFW_CPHS_INFO *cphs_info);
376 T_MFW cphs_operator_name (void);
377 void cphs_get_mailbox (void);
378 T_MFW cphs_set_mailbox (T_MFW_CPHS_ENTRY *entry);
379 T_MFW cphs_get_mailbox_status (void);
380 T_MFW cphs_set_mailbox_status (T_MFW_CFLAG_STATUS line1,
381 T_MFW_CFLAG_STATUS line2,
382 T_MFW_CFLAG_STATUS fax,
383 T_MFW_CFLAG_STATUS data);
384 T_MFW cphs_get_divert_status (void);
385 T_MFW cphs_set_divert_status (T_MFW_CFLAG_STATUS line1,
386 T_MFW_CFLAG_STATUS line2,
387 T_MFW_CFLAG_STATUS fax,
388 T_MFW_CFLAG_STATUS data);
389 /*a0393213 cphs rel4*/
390 #ifdef FF_CPHS_REL4
391 T_MFW cphs_rel4_set_divert_status(T_MFW_CFLAG_STATUS voice, T_MFW_CFLAG_STATUS fax,
392 T_MFW_CFLAG_STATUS data, char number[PHB_MAX_LEN]);
393 void sendCPHSSignal(UBYTE evt, void* para);
394 T_MFW_CPHS_MSP_INFO* mfw_cphs_get_msp(void);
395 T_MFW_CPHS_REL4_MWIS* get_mwis_stat(int);
396 #endif
397 void cphs_get_als_info (T_MFW_CPHS_ALS_STATUS *info);
398 void cphs_select_line (T_MFW_LINE_INDEX line);
399 T_MFW cphs_set_als_status (T_MFW_LINE_STATUS status);
400 T_MFW cphs_get_csp (void);
401 T_MFW cphs_get_info_num (UBYTE level, UBYTE startIndex);
402 T_MFW cphs_select_info_num (UBYTE index);
403 BOOL Read_Sim (USHORT dat_id, USHORT offset, UBYTE max_len, UBYTE *exDat);
404 BOOL Read_Sim_Record (USHORT dat_id, USHORT record, UBYTE max_len, UBYTE *exDat);
405 BOOL Write_Sim (USHORT dat_id, UBYTE len, UBYTE *exDat);
406 BOOL Write_Sim_Record (USHORT dat_id, USHORT record, UBYTE len, UBYTE *exDat);
407
408 //x0pleela 25 May2006 DR: OMAPS00070657
409 #ifdef FF_CPHS
410 T_MFW mfw_cphs_get_als_info(void);
411 #endif
412
413 /* Added to remove warning Aug - 11 */
414 EXTERN UBYTE dspl_Enable (UBYTE in_Enable);
415 #ifdef PCM_2_FFS
416 EXTERN T_FFS_SIZE ffs_ReadRecord(const char *name, void * addr, int size, int index, int recsize);
417 #endif /* PCM_2_FFS */
418 /* End - remove warning Aug - 11 */
419
420 /*a0393213 cphs rel4*/
421 #ifdef FF_CPHS_REL4
422 UBYTE mfw_cphs_get_reg_profile(void);
423 #endif
424
425 #endif
426
427
428