FreeCalypso > hg > tcs211-l1-reconst
comparison g23m/condat/ms/src/mfw/mfw_cphs.h @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
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 Oct 04, 2004 REF: CRR 25519 Deepa M.D | |
11 Bug:Re-align structure members in MFW | |
12 Fix:Structure elements have been realigned to avoid the structure padding | |
13 */ | |
14 | |
15 #ifndef DEF_MFW_CPHS | |
16 #define DEF_MFW_CPHS | |
17 #include <string.h> | |
18 | |
19 #if defined (NEW_FRAME) | |
20 | |
21 #include "typedefs.h" | |
22 #include "vsi.h" | |
23 #include "pei.h" | |
24 #include "custom.h" | |
25 #include "gsm.h" | |
26 | |
27 #else | |
28 | |
29 #include "STDDEFS.H" | |
30 #include "custom.h" | |
31 #include "gsm.h" | |
32 #include "vsi.h" | |
33 | |
34 #endif | |
35 | |
36 #include "mfw_mfw.h" | |
37 #include "mfw_nm.h" | |
38 #include "mfw_sim.h" | |
39 #include "mfw_simi.h" | |
40 #include "mfw_sima.h" | |
41 #include "mfw_nmi.h" | |
42 #include "mfw_phb.h" | |
43 #include "mfw_phbi.h" | |
44 #include "mfw_cm.h" | |
45 #include "mfw_cmi.h" | |
46 #include "mfw_sms.h" | |
47 #include "mfw_smsi.h" | |
48 | |
49 #include "drv_key.h" | |
50 | |
51 | |
52 #include "ksd.h" | |
53 | |
54 #if defined (FAX_AND_DATA) | |
55 #include "aci_fd.h" | |
56 #endif | |
57 | |
58 | |
59 #include "phb.h" | |
60 | |
61 | |
62 #include "mfw_ss.h" | |
63 #include "mfw_ssi.h" | |
64 | |
65 | |
66 #include "mfw_sys.h" | |
67 | |
68 | |
69 | |
70 /* Constants define */ | |
71 #define MFW_INVALID_SIM_DATA 0xFF | |
72 #define MAX_CPHS_ENTRY 4 | |
73 #define MAX_PCM_MAILBOX_LEN 10 | |
74 | |
75 typedef enum /* CPHS status */ | |
76 { | |
77 CPHS_NotPresent = 10, | |
78 CPHS_ERR, | |
79 CPHS_OK | |
80 } T_MFW_CPHS_STATUS; | |
81 | |
82 typedef enum /* SIM operation status */ | |
83 { | |
84 MFW_SIMOP_UNKNOWN = 20, | |
85 MFW_SIMOP_WRITE_ERR, | |
86 MFW_SIMOP_WRITE_OK, | |
87 MFW_SIMOP_READ_ERR, | |
88 MFW_SIMOP_READ_OK | |
89 } T_MFW_SIMOP_STATUS; | |
90 | |
91 typedef enum /* CPHS service */ | |
92 { | |
93 MFW_CPHS_CSP = 1, /* customer service profile */ | |
94 MFW_CPHS_SST, /* service string table */ | |
95 MFW_CPHS_MB_NUMBER, /* mailbox numbers */ | |
96 MFW_CHPS_NAME_SHORT, /* operator name shortform */ | |
97 MFW_CHPS_INFO_NUMBERS /* information numbers */ | |
98 } T_MFW_CPHS_SERVICE; | |
99 | |
100 typedef enum /* index of mailbox-number/alternate-line service */ | |
101 { | |
102 MFW_SERV_NotPresent = -1, | |
103 MFW_SERV_LINE1 = 0, | |
104 MFW_SERV_LINE2, | |
105 MFW_SERV_DATA, | |
106 MFW_SERV_FAX | |
107 } T_MFW_LINE_INDEX; | |
108 | |
109 typedef enum /* status of alternate line service */ | |
110 { | |
111 MFW_LINE_UNLOCKED = 0, | |
112 MFW_LINE_LOCKED | |
113 } T_MFW_LINE_STATUS; | |
114 | |
115 typedef enum /* voice message waiting flag and | |
116 call forwarding flags */ | |
117 { | |
118 MFW_CFLAG_NotPresent = 0, | |
119 MFW_CFLAG_SET = 0x0A, | |
120 MFW_CFLAG_NOTSet = 0x05 | |
121 } T_MFW_CFLAG_STATUS; | |
122 | |
123 /* events are organised as bitmaps */ | |
124 #define E_CPHS_IND 0x0001 | |
125 #define E_CPHS_OP_NAME 0x0002 | |
126 #define E_CPHS_GET_VC_NUM 0x0004 | |
127 #define E_CPHS_SET_VC_NUM 0x0008 | |
128 #define E_CPHS_GET_VC_STAT 0x0010 | |
129 #define E_CPHS_SET_VC_STAT 0x0020 | |
130 #define E_CPHS_GET_DV_STAT 0x0040 | |
131 #define E_CPHS_SET_DV_STAT 0x0080 | |
132 #define E_CPHS_GET_ALS_STATUS 0x0100 | |
133 #define E_CPHS_SET_LINE 0x0200 | |
134 #define E_CPHS_SET_ALS_STATUS 0x0400 | |
135 #define E_CPHS_GET_CSP 0x0800 | |
136 #define E_CPHS_GET_INFO_NUM 0x1000 | |
137 #define E_CPHS_GET_INFO_LIST 0x2000 | |
138 #define E_CPHS_GET_SIM_FIELD 0x4000 //MC for generic sim reads | |
139 #define E_CPHS_SET_SIM_FIELD 0x8000 //sbh for generic sim writes | |
140 | |
141 typedef struct /* Character */ | |
142 { | |
143 UBYTE len; /* length of string data */ | |
144 UBYTE data[PHB_MAX_LEN]; /* string data */ | |
145 } T_MFW_STRING; | |
146 | |
147 typedef struct /* Information numbers */ | |
148 { | |
149 UBYTE index; | |
150 UBYTE entryStat; /* entry status */ | |
151 T_MFW_PHB_TEXT alpha; /* alpha identifier */ | |
152 } T_MFW_CPHS_INFO_NUMBER; | |
153 | |
154 typedef struct /* List of information numbers */ | |
155 { | |
156 UBYTE count; /* number of read entries */ | |
157 UBYTE level; | |
158 T_MFW_CPHS_INFO_NUMBER entry[MAX_CPHS_ENTRY]; /* entries */ | |
159 } T_MFW_CPHS_INFONUM_LIST; | |
160 | |
161 typedef struct /* CPHS information */ | |
162 { | |
163 UBYTE phase; | |
164 UBYTE opNS; /* operator name shortform */ | |
165 UBYTE mbNum; /* mailbox numbers */ | |
166 UBYTE sst; /* service string table */ | |
167 UBYTE csp; /* customer service profile */ | |
168 UBYTE iNum; /* information numbers */ | |
169 } T_MFW_CPHS_INFO; | |
170 | |
171 typedef struct /* Operator name */ | |
172 { | |
173 T_MFW_LNAME longName; /* operator name string */ | |
174 T_MFW_SNAME shortName; /* operator name shortform */ | |
175 } T_MFW_CPHS_OP_NAME; | |
176 | |
177 typedef struct /* Mailbox number */ | |
178 { | |
179 UBYTE index; /* index in phonebook table */ | |
180 T_MFW_PHB_TEXT alpha; /* alpha identifier */ | |
181 UBYTE number[PHB_MAX_LEN]; /* telephone number */ | |
182 UBYTE ton; /* type of number */ | |
183 UBYTE npi; /* numbering plan identifier */ | |
184 UBYTE service; /* indicates the line or fax/data */ | |
185 } T_MFW_CPHS_ENTRY; | |
186 | |
187 typedef struct /* List of mailbox numbers */ | |
188 { | |
189 UBYTE count; /* numbers of the list */ | |
190 T_MFW_CPHS_ENTRY entries[MAX_CPHS_ENTRY]; | |
191 } T_MFW_CPHS_VC_NUM; | |
192 | |
193 typedef struct /* Voice message waiting information */ | |
194 { | |
195 UBYTE result; /* read error/no error */ | |
196 T_MFW_CFLAG_STATUS line1; /* waiting status of line 1 */ | |
197 T_MFW_CFLAG_STATUS line2; /* waiting status of line 2 */ | |
198 T_MFW_CFLAG_STATUS fax; /* waiting status of fax */ | |
199 T_MFW_CFLAG_STATUS data; /* waiting status of data */ | |
200 } T_MFW_CPHS_VC_STAT; | |
201 | |
202 typedef struct /* Status of diverted call indicators */ | |
203 { | |
204 UBYTE result; /* read error/no error */ | |
205 T_MFW_CFLAG_STATUS line1; /* call forwarding unconditional status of line 1 */ | |
206 T_MFW_CFLAG_STATUS line2; /* call forwarding unconditional status of line 2 */ | |
207 T_MFW_CFLAG_STATUS fax; /* call forwarding unconditional status of fax */ | |
208 T_MFW_CFLAG_STATUS data; /* call forwarding unconditional status of data */ | |
209 } T_MFW_CPHS_DV_STAT; | |
210 | |
211 typedef struct /* Information about alternate line service */ | |
212 { | |
213 T_MFW_LINE_INDEX selectedLine; | |
214 T_MFW_LINE_STATUS status; /* ALS is locked or unlocked */ | |
215 } T_MFW_CPHS_ALS_STATUS; | |
216 | |
217 | |
218 //Code 15: | |
219 typedef struct /* Customer service profile */ | |
220 { | |
221 UBYTE result; /* read error/no error */ | |
222 UBYTE csp[20]; /* size of MFW_CPHS_CSP_SIZE */ | |
223 } T_MFW_CPHS_CSP; | |
224 //Code 15 END | |
225 | |
226 | |
227 | |
228 typedef struct /* Information number entry */ | |
229 { | |
230 UBYTE result; /* read error/no error (only used for read information number) */ | |
231 UBYTE index; | |
232 UBYTE entryStat; | |
233 T_MFW_PHB_TEXT alpha; /* alpha identifier */ | |
234 UBYTE number[4]; | |
235 UBYTE ton; | |
236 UBYTE npi; | |
237 } T_MFW_CPHS_INFONUM_ENTRY; | |
238 | |
239 /***************************Go-lite Optimization changes Start***********************/ | |
240 //Oct 04, 2004 REF: CRR 25519 Deepa M.D | |
241 //Structure elements (T_MFW_CPHS_READ_SIM_ENTRY)are realigned to avoid the structure padding | |
242 typedef struct /* SIM read data */ | |
243 { | |
244 | |
245 UBYTE* exchange_data; | |
246 USHORT sim_result; /* read error/no error (only used for read information number) */ | |
247 USHORT requested_field; | |
248 UBYTE data_len; | |
249 UBYTE record; /* sh */ | |
250 } T_MFW_CPHS_READ_SIM_ENTRY; | |
251 /***************************Go-lite Optimization changes end***********************/ | |
252 | |
253 /* CPHS Parameter */ | |
254 typedef union | |
255 { | |
256 T_MFW_CPHS_STATUS stat; | |
257 T_MFW_CPHS_OP_NAME oper_name; | |
258 T_MFW_CPHS_VC_NUM vc_entry; | |
259 UBYTE result; | |
260 T_MFW_CPHS_VC_STAT vc_status; | |
261 T_MFW_CPHS_DV_STAT dv_status; | |
262 T_MFW_CPHS_ALS_STATUS als_status; | |
263 T_MFW_CPHS_CSP csp; | |
264 T_MFW_CPHS_INFONUM_LIST num_list; | |
265 T_MFW_CPHS_INFONUM_ENTRY info_entry; | |
266 T_MFW_CPHS_READ_SIM_ENTRY read_sim_entry; | |
267 } T_MFW_CPHS_PARA; | |
268 | |
269 /* prototypes define */ | |
270 void cphs_init (void); | |
271 void cphs_exit (void); | |
272 MfwHnd cphs_create (MfwHnd hWin, MfwEvt event, MfwCb cbfunc); | |
273 MfwRes cphs_delete (MfwHnd h); | |
274 T_MFW cphs_config (T_MFW_CPHS_INFO *cphs_info); | |
275 T_MFW cphs_operator_name (void); | |
276 void cphs_get_mailbox (void); | |
277 T_MFW cphs_set_mailbox (T_MFW_CPHS_ENTRY *entry); | |
278 T_MFW cphs_get_mailbox_status (void); | |
279 T_MFW cphs_set_mailbox_status (T_MFW_CFLAG_STATUS line1, | |
280 T_MFW_CFLAG_STATUS line2, | |
281 T_MFW_CFLAG_STATUS fax, | |
282 T_MFW_CFLAG_STATUS data); | |
283 T_MFW cphs_get_divert_status (void); | |
284 T_MFW cphs_set_divert_status (T_MFW_CFLAG_STATUS line1, | |
285 T_MFW_CFLAG_STATUS line2, | |
286 T_MFW_CFLAG_STATUS fax, | |
287 T_MFW_CFLAG_STATUS data); | |
288 void cphs_get_als_info (T_MFW_CPHS_ALS_STATUS *info); | |
289 void cphs_select_line (T_MFW_LINE_INDEX line); | |
290 T_MFW cphs_set_als_status (T_MFW_LINE_STATUS status); | |
291 T_MFW cphs_get_csp (void); | |
292 T_MFW cphs_get_info_num (UBYTE level, UBYTE startIndex); | |
293 T_MFW cphs_select_info_num (UBYTE index); | |
294 BOOL Read_Sim (USHORT dat_id, USHORT offset, UBYTE max_len, UBYTE *exDat); | |
295 BOOL Read_Sim_Record (USHORT dat_id, USHORT record, UBYTE max_len, UBYTE *exDat); | |
296 BOOL Write_Sim (USHORT dat_id, UBYTE len, UBYTE *exDat); | |
297 BOOL Write_Sim_Record (USHORT dat_id, USHORT record, UBYTE len, UBYTE *exDat); | |
298 | |
299 #endif | |
300 | |
301 | |
302 |