FreeCalypso > hg > freecalypso-citrine
comparison g23m-aci/ksd/ksd.c @ 0:75a11d740a02
initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 09 Jun 2016 00:02:41 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:75a11d740a02 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : GSM-F&D (8411) | |
4 | Modul : KSD | |
5 +----------------------------------------------------------------------------- | |
6 | Copyright 2002 Texas Instruments Berlin, AG | |
7 | All rights reserved. | |
8 | | |
9 | This file is confidential and a trade secret of Texas | |
10 | Instruments Berlin, AG | |
11 | The receipt of or possession of this file does not convey | |
12 | any rights to reproduce or disclose its contents or to | |
13 | manufacture, use, or sell anything it may describe, in | |
14 | whole, or in part, without the specific written consent of | |
15 | Texas Instruments Berlin, AG. | |
16 +----------------------------------------------------------------------------- | |
17 | Purpose : This module is used for decoding of EMMI key sequences. | |
18 +----------------------------------------------------------------------------- | |
19 */ | |
20 | |
21 #ifndef KSD_C | |
22 #define KSD_C | |
23 #endif | |
24 | |
25 #include "config.h" | |
26 #include "fixedconf.h" | |
27 #include "condat-features.h" | |
28 #include "aci_conf.h" | |
29 | |
30 #include "aci_all.h" | |
31 | |
32 /*==== INCLUDES ===================================================*/ | |
33 #include "aci_cmh.h" | |
34 #include "psa.h" | |
35 #include "cmh.h" | |
36 #include "ksd_utl.h" | |
37 #include "ksd.h" | |
38 #include "psa_mm.h" | |
39 #include "cmh_mm.h" | |
40 | |
41 #ifdef SMI | |
42 #include "cus_smi.h" | |
43 #endif | |
44 //TISH, patch for OMAPS00110151/OMAPS00130693 | |
45 //start | |
46 EXTERN SHORT psaCC_ctbCountActiveCall ( void ); | |
47 //end | |
48 | |
49 /*==== CONSTANTS ==================================================*/ | |
50 | |
51 #define MIN_USSD_LEN 2 /* the minimum length of a USSD */ | |
52 | |
53 #define DATA_CALL '?' /* a phone number terminated with this */ | |
54 /* character leads to setup a data call */ | |
55 #define START_SEQ_1 '*' /* an USSD starts with a '*' or a '#' */ | |
56 #define START_SEQ_2 '#' /* an USSD starts with a '*' or a '#' */ | |
57 #define START_SI '*' /* supplemetary information fields are */ | |
58 /* separated by this character */ | |
59 #define STOP_SEQ '#' /* any keystroke sequence is terminated */ | |
60 /* by this character */ | |
61 #define NULL_TERM '\0' /* string termination */ | |
62 #define DONT_CARE '?' /* either '#' or '*' */ | |
63 #define DIAL_IDX '#' /* indicates reading an index used */ | |
64 /* for abbreviated dialling */ | |
65 | |
66 #define DATA_SPEECH_SEQ "##" /* keystroke sequence to start */ | |
67 /* data followed by speech mode */ | |
68 #define SPEECH_DATA_SEQ "**" /* keystroke sequence to start */ | |
69 /* speech followed by data mode */ | |
70 | |
71 #define MAX_KEYSEQ_SIZE 170 /* must be equal to MAX_KEYSEQ_SIZE */ | |
72 /* of file aca.h in project SMI */ | |
73 | |
74 /*==== TYPES ======================================================*/ | |
75 | |
76 typedef enum /* indicates type of supplementary information */ | |
77 { | |
78 SI_UBYTE, | |
79 SI_USHORT, | |
80 SI_ULONG, | |
81 SI_BYTE, | |
82 SI_SHORT, | |
83 SI_LONG, | |
84 SI_CHAR_STAR | |
85 } | |
86 T_KSD_SI; | |
87 | |
88 typedef union /* decoded supplementary information */ | |
89 { | |
90 UBYTE siUbyte; | |
91 USHORT siUshort; | |
92 ULONG siUlong; | |
93 BYTE siByte; | |
94 SHORT siShort; | |
95 LONG siLong; | |
96 CHAR* siCharStar; | |
97 } | |
98 T_KSD_SIPARAM; | |
99 | |
100 typedef struct /* decoded parameter and predefined parameter type */ | |
101 { | |
102 T_KSD_SIPARAM* param; | |
103 T_KSD_SI type; | |
104 } | |
105 T_KSD_DCD_CPLE; | |
106 | |
107 typedef BOOL T_KSD_SDF (USHORT inIdx, | |
108 CHAR* inSeq, | |
109 T_KSD_SEQGRP* outSeqGrp, | |
110 CHAR** outRestSeq, | |
111 T_KSD_SEQPARAM* outSeqParam); | |
112 | |
113 typedef struct /* structure of key sequence table */ | |
114 { | |
115 CHAR* keySeq; | |
116 T_KSD_SDF* func; | |
117 } | |
118 T_KEY_SEQ_TABLE; | |
119 | |
120 /*==== EXPORT =====================================================*/ | |
121 | |
122 /*==== PROTOTYPES==================================================*/ | |
123 | |
124 LOCAL BOOL ksd_extractSi (CHAR* inSeq, | |
125 USHORT inSiNum, | |
126 USHORT* outCharsNum, | |
127 T_KSD_DCD_CPLE* inOutSi); | |
128 | |
129 LOCAL T_KSD_SDF ksd_seqMsOff; | |
130 LOCAL T_KSD_SDF ksd_seqMsOn; | |
131 | |
132 LOCAL T_KSD_SDF ksd_seqHookOff; | |
133 LOCAL T_KSD_SDF ksd_seqHookOn; | |
134 | |
135 #ifdef SMI | |
136 LOCAL T_KSD_SDF ksd_seqKeypadInd; | |
137 LOCAL T_KSD_SDF ksd_seqStartLcdTest; | |
138 LOCAL T_KSD_SDF ksd_seqSetAbbrDial; | |
139 LOCAL T_KSD_SDF ksd_seqShowCallTable; | |
140 | |
141 LOCAL T_KSD_SDF ksd_seqSmsSend; | |
142 LOCAL T_KSD_SDF ksd_seqSmsSendFromMem; | |
143 LOCAL T_KSD_SDF ksd_seqSmsWrite; | |
144 LOCAL T_KSD_SDF ksd_seqSmsDelete; | |
145 LOCAL T_KSD_SDF ksd_seqSmsRead; | |
146 LOCAL T_KSD_SDF ksd_seqSmsList; | |
147 LOCAL T_KSD_SDF ksd_seqSmsReadSingle; | |
148 | |
149 LOCAL T_KSD_SDF ksd_seqSndCbst; | |
150 LOCAL T_KSD_SDF ksd_seqSndCrlp; | |
151 LOCAL T_KSD_SDF ksd_seqSndDs; | |
152 | |
153 LOCAL T_KSD_SDF ksd_seqSpeechData; | |
154 LOCAL T_KSD_SDF ksd_seqDataSpeech; | |
155 #endif | |
156 | |
157 #ifdef EM_MODE | |
158 LOCAL T_KSD_SDF ksd_em_mode; | |
159 #endif | |
160 | |
161 LOCAL T_KSD_SDF ksd_seqDtmf; | |
162 | |
163 LOCAL T_KSD_SDF ksd_seqStartReg; | |
164 LOCAL T_KSD_SDF ksd_seqAutoReg; | |
165 LOCAL T_KSD_SDF ksd_seqManReg; | |
166 LOCAL T_KSD_SDF ksd_seqAutoManReg; | |
167 LOCAL T_KSD_SDF ksd_seqSetManReg; | |
168 LOCAL T_KSD_SDF ksd_seqSetAutoReg; | |
169 LOCAL T_KSD_SDF ksd_seqStartPLMN; | |
170 | |
171 LOCAL T_KSD_SDF ksd_seqActSimLock; | |
172 LOCAL T_KSD_SDF ksd_seqDeactSimLock; | |
173 LOCAL T_KSD_SDF ksd_seqIntrgtSimLock; | |
174 | |
175 LOCAL T_KSD_SDF ksd_seqDial; | |
176 LOCAL T_KSD_SDF ksd_seqDialIdx; | |
177 LOCAL T_KSD_SDF ksd_seqUssd; | |
178 | |
179 LOCAL T_KSD_SDF ksd_seqActAllCf; | |
180 LOCAL T_KSD_SDF ksd_seqDeactAllCf; | |
181 LOCAL T_KSD_SDF ksd_seqRegAllCf; | |
182 LOCAL T_KSD_SDF ksd_seqEraseAllCf; | |
183 LOCAL T_KSD_SDF ksd_seqIntrgtAllCf; | |
184 | |
185 LOCAL T_KSD_SDF ksd_seqActAllCondCf; | |
186 LOCAL T_KSD_SDF ksd_seqDeactAllCondCf; | |
187 LOCAL T_KSD_SDF ksd_seqRegAllCondCf; | |
188 LOCAL T_KSD_SDF ksd_seqEraseAllCondCf; | |
189 LOCAL T_KSD_SDF ksd_seqIntrgtAllCondCf; | |
190 | |
191 LOCAL T_KSD_SDF ksd_seqActUncondCf; | |
192 LOCAL T_KSD_SDF ksd_seqDeactUncondCf; | |
193 LOCAL T_KSD_SDF ksd_seqRegUncondCf; | |
194 LOCAL T_KSD_SDF ksd_seqEraseUncondCf; | |
195 LOCAL T_KSD_SDF ksd_seqIntrgtUncondCf; | |
196 | |
197 LOCAL T_KSD_SDF ksd_seqActBusyCf; | |
198 LOCAL T_KSD_SDF ksd_seqDeactBusyCf; | |
199 LOCAL T_KSD_SDF ksd_seqRegBusyCf; | |
200 LOCAL T_KSD_SDF ksd_seqEraseBusyCf; | |
201 LOCAL T_KSD_SDF ksd_seqIntrgtBusyCf; | |
202 | |
203 LOCAL T_KSD_SDF ksd_seqActNoRepCf; | |
204 LOCAL T_KSD_SDF ksd_seqDeactNoRepCf; | |
205 LOCAL T_KSD_SDF ksd_seqRegNoRepCf; | |
206 LOCAL T_KSD_SDF ksd_seqEraseNoRepCf; | |
207 LOCAL T_KSD_SDF ksd_seqIntrgtNoRepCf; | |
208 | |
209 LOCAL T_KSD_SDF ksd_seqActNotReachCf; | |
210 LOCAL T_KSD_SDF ksd_seqDeactNotReachCf; | |
211 LOCAL T_KSD_SDF ksd_seqRegNotReachCf; | |
212 LOCAL T_KSD_SDF ksd_seqEraseNotReachCf; | |
213 LOCAL T_KSD_SDF ksd_seqIntrgtNotReachCf; | |
214 | |
215 LOCAL T_KSD_SDF ksd_seqDeactOutBarrServ; | |
216 | |
217 LOCAL T_KSD_SDF ksd_seqActBaoicExcHome; | |
218 LOCAL T_KSD_SDF ksd_seqDeactBaoicExcHome; | |
219 LOCAL T_KSD_SDF ksd_seqIntrgtBaoicExcHome; | |
220 | |
221 LOCAL T_KSD_SDF ksd_seqActBaoic; | |
222 LOCAL T_KSD_SDF ksd_seqDeactBaoic; | |
223 LOCAL T_KSD_SDF ksd_seqIntrgtBaoic; | |
224 | |
225 LOCAL T_KSD_SDF ksd_seqDeactAllBarrServ; | |
226 | |
227 LOCAL T_KSD_SDF ksd_seqActBaoc; | |
228 LOCAL T_KSD_SDF ksd_seqDeactBaoc; | |
229 LOCAL T_KSD_SDF ksd_seqIntrgtBaoc; | |
230 | |
231 LOCAL T_KSD_SDF ksd_seqDeactInBarrServ; | |
232 | |
233 LOCAL T_KSD_SDF ksd_seqActBaicRoam; | |
234 LOCAL T_KSD_SDF ksd_seqDeactBaicRoam; | |
235 LOCAL T_KSD_SDF ksd_seqIntrgtBaicRoam; | |
236 | |
237 LOCAL T_KSD_SDF ksd_seqActBaic; | |
238 LOCAL T_KSD_SDF ksd_seqDeactBaic; | |
239 LOCAL T_KSD_SDF ksd_seqIntrgtBaic; | |
240 | |
241 LOCAL T_KSD_SDF ksd_seqIntrgtClir; | |
242 LOCAL T_KSD_SDF ksd_seqSupClir; | |
243 LOCAL T_KSD_SDF ksd_seqInvClir; | |
244 | |
245 LOCAL T_KSD_SDF ksd_seqIntrgtClip; | |
246 LOCAL T_KSD_SDF ksd_seqSupClip; | |
247 LOCAL T_KSD_SDF ksd_seqInvClip; | |
248 | |
249 LOCAL T_KSD_SDF ksd_seqIntrgtColr; | |
250 LOCAL T_KSD_SDF ksd_seqSupColr; | |
251 LOCAL T_KSD_SDF ksd_seqInvColr; | |
252 | |
253 LOCAL T_KSD_SDF ksd_seqIntrgtColp; | |
254 LOCAL T_KSD_SDF ksd_seqSupColp; | |
255 LOCAL T_KSD_SDF ksd_seqInvColp; | |
256 | |
257 LOCAL T_KSD_SDF ksd_seqSupTTY; | |
258 LOCAL T_KSD_SDF ksd_seqReqTTY; | |
259 | |
260 LOCAL T_KSD_SDF ksd_seqRegPwdAllBarrServ; | |
261 LOCAL T_KSD_SDF ksd_seqRegPwdAllServ; | |
262 | |
263 #if 0 /* For further study, so not yet used */ | |
264 LOCAL T_KSD_SDF ksd_seqActCCBS; | |
265 #endif | |
266 LOCAL T_KSD_SDF ksd_seqDeactCCBS; | |
267 LOCAL T_KSD_SDF ksd_seqIntrgtCCBS; | |
268 LOCAL T_KSD_SDF ksd_seqIntrgtCNAP; | |
269 | |
270 LOCAL T_KSD_SDF ksd_seqChngPin2; | |
271 LOCAL T_KSD_SDF ksd_seqChngPin; | |
272 LOCAL T_KSD_SDF ksd_seqUnblckPin2; | |
273 LOCAL T_KSD_SDF ksd_seqUnblckPin; | |
274 | |
275 LOCAL T_KSD_SDF ksd_seqActWait; | |
276 LOCAL T_KSD_SDF ksd_seqDeactWait; | |
277 LOCAL T_KSD_SDF ksd_seqIntrgtWait; | |
278 | |
279 LOCAL T_KSD_SDF ksd_seqPrsntImei; | |
280 | |
281 LOCAL T_KSD_SDF ksd_seqSndChld0; | |
282 LOCAL T_KSD_SDF ksd_seqSndChld1; | |
283 LOCAL T_KSD_SDF ksd_seqSndChld2; | |
284 LOCAL T_KSD_SDF ksd_seqSndChld3; | |
285 LOCAL T_KSD_SDF ksd_seqSndChld4; | |
286 LOCAL T_KSD_SDF ksd_seqSndChld4Star; | |
287 LOCAL T_KSD_SDF ksd_seqSndChld5; | |
288 | |
289 LOCAL T_KSD_SDF ksd_seqRegPwdOutBarrServ; | |
290 LOCAL T_KSD_SDF ksd_seqRegPwdInBarrServ; | |
291 LOCAL T_KSD_SDF ksd_seqActOutBarrServ; | |
292 LOCAL T_KSD_SDF ksd_seqActInBarrServ; | |
293 LOCAL T_KSD_SDF ksd_seqActAllBarrServ; | |
294 | |
295 LOCAL T_KSD_SDF ksd_seqUnknown; | |
296 | |
297 | |
298 /*LOCAL BOOL ksd_isUSSD (CHAR *keySeq); */ | |
299 | |
300 /*==== VARIABLES ==================================================*/ | |
301 | |
302 /* | |
303 * keystroke sequence table, additionally used while at | |
304 * least one call is in | |
305 * CAL_STAT_Held, CAL_STAT_Active, | |
306 * CAL_STAT_Dial (CCBS), | |
307 * CAL_STAT_Incomming (CD), CAL_STAT_Wait (CD) | |
308 */ | |
309 LOCAL const T_KEY_SEQ_TABLE keyWithinCall[] = | |
310 { | |
311 /* 000 - 0 followed by send */ | |
312 "0", ksd_seqSndChld0, | |
313 /* 001 - 1 followed by send */ | |
314 "1", ksd_seqSndChld1, | |
315 /* 002 - 2 followed by send */ | |
316 "2", ksd_seqSndChld2, | |
317 /* 003 - 3 followed by send */ | |
318 "3", ksd_seqSndChld3, | |
319 /* 004 - 4 followed by star */ | |
320 "4*", ksd_seqSndChld4Star, | |
321 /* 005 - 4 followed by send */ | |
322 "4", ksd_seqSndChld4, | |
323 /* 006 - 5 followed by send */ | |
324 "5", ksd_seqSndChld5, | |
325 | |
326 /* 004 - unknown */ | |
327 NULL, ksd_seqUnknown | |
328 }; | |
329 | |
330 /* keystroke sequence table for sequences including */ | |
331 /* passwords */ | |
332 LOCAL const T_KEY_SEQ_TABLE keyPasswd[] = | |
333 { | |
334 /* 000 - deactivate outgoing barring services */ | |
335 "#333?", ksd_seqDeactOutBarrServ, | |
336 /* 001 - activate BAOIC except home */ | |
337 "*332?", ksd_seqActBaoicExcHome, | |
338 /* 002 - deactivate BAOIC except home */ | |
339 "#332?", ksd_seqDeactBaoicExcHome, | |
340 /* 003 - interrogate BAOIC except home */ | |
341 "*#332?", ksd_seqIntrgtBaoicExcHome, | |
342 /* 004 - interrogate BAOIC */ | |
343 "*#331?", ksd_seqIntrgtBaoic, | |
344 /* 005 - activate BAOIC */ | |
345 "*331?", ksd_seqActBaoic, | |
346 /* 006 - deactivate BAOIC */ | |
347 "#331?", ksd_seqDeactBaoic, | |
348 /* 007 - deactivate all barring services */ | |
349 "#330?", ksd_seqDeactAllBarrServ, | |
350 /* 008 - activate BAOC */ | |
351 "*33?", ksd_seqActBaoc, | |
352 /* 009 - deactivate BAOC */ | |
353 "#33?", ksd_seqDeactBaoc, | |
354 /* 010 - interrogate BAOC */ | |
355 "*#33?", ksd_seqIntrgtBaoc, | |
356 /* 011 - deactivate incoming barring services */ | |
357 "#353?", ksd_seqDeactInBarrServ, | |
358 /* 012 - activate BAIC roaming */ | |
359 "*351?", ksd_seqActBaicRoam, | |
360 /* 013 - deactivate BAIC roaming */ | |
361 "#351?", ksd_seqDeactBaicRoam, | |
362 /* 014 - interrogate BAIC roaming */ | |
363 "*#351?", ksd_seqIntrgtBaicRoam, | |
364 /* 015 - activate BAIC */ | |
365 "*35?", ksd_seqActBaic, | |
366 /* 016 - deactivate BAIC */ | |
367 "#35?", ksd_seqDeactBaic, | |
368 /* 017 - interrogate BAIC */ | |
369 "*#35?", ksd_seqIntrgtBaic, | |
370 | |
371 /* 018 - register password all barring */ | |
372 "*03*330?", ksd_seqRegPwdAllBarrServ, | |
373 /* 019 - register password for all services */ | |
374 "*03*?", ksd_seqRegPwdAllServ, | |
375 | |
376 /* 020 - register password all barring */ | |
377 "**03*330?", ksd_seqRegPwdAllBarrServ, | |
378 /* 021 - register password for all services */ | |
379 "**03*?", ksd_seqRegPwdAllServ, | |
380 | |
381 /* 022 - change PIN2 */ | |
382 "**042?", ksd_seqChngPin2, | |
383 /* 023 - change PIN */ | |
384 "**04?", ksd_seqChngPin, | |
385 /* 024 - unblock PIN2 */ | |
386 "**052?", ksd_seqUnblckPin2, | |
387 /* 025 - unblock PIN */ | |
388 "**05?", ksd_seqUnblckPin, | |
389 | |
390 /* 026 - register passwd for outgoing barring services */ | |
391 "**03*333?", ksd_seqRegPwdOutBarrServ, | |
392 /* 027 - register passwd for incoming barring services */ | |
393 "**03*353?", ksd_seqRegPwdInBarrServ, | |
394 /* 028 - activation for outgoing barring services */ | |
395 "*333?", ksd_seqActOutBarrServ, | |
396 /* 029 - activation for incoming barring services */ | |
397 "*353?", ksd_seqActInBarrServ, | |
398 /* 030 - activation for all barring services */ | |
399 "*330?", ksd_seqActAllBarrServ, | |
400 | |
401 /* 031 - unknown */ | |
402 NULL, ksd_seqUnknown | |
403 }; | |
404 | |
405 /* keystroke sequence table for sequences including */ | |
406 /* passwords */ | |
407 LOCAL const T_KEY_SEQ_TABLE keyPasswdNonGsm[] = | |
408 { | |
409 /* 000 - lock SIM card */ | |
410 "*77742?", ksd_seqActSimLock, | |
411 /* 001 - unlock SIM card */ | |
412 "#77742?", ksd_seqDeactSimLock, | |
413 | |
414 /* 002 - unknown */ | |
415 NULL, ksd_seqUnknown | |
416 }; | |
417 | |
418 /* standard keystroke sequence table */ | |
419 LOCAL const T_KEY_SEQ_TABLE keyNoFDNSeqTable[] = | |
420 { | |
421 /* 001 - present IMEI */ | |
422 "*#06#", ksd_seqPrsntImei, | |
423 /* 002 - change PIN2 */ | |
424 "**042?", ksd_seqChngPin2, | |
425 /* 003 - change PIN */ | |
426 "**04?", ksd_seqChngPin, | |
427 /* 004 - unblock PIN2 */ | |
428 "**052?", ksd_seqUnblckPin2, | |
429 /* 005 - unblock PIN */ | |
430 "**05?", ksd_seqUnblckPin, | |
431 | |
432 /* 006 - unknown */ | |
433 NULL, ksd_seqUnknown | |
434 }; | |
435 | |
436 | |
437 /* | |
438 * defines for CLIR, this is used for | |
439 * separate handling of CC by SAT | |
440 */ | |
441 #define KSD_SUPPRESS_CLIR "*31#" | |
442 #define KSD_INVOKE_CLIR "#31#" | |
443 | |
444 /* standard keystroke sequence table */ | |
445 LOCAL const T_KEY_SEQ_TABLE keySeqTable[] = | |
446 { | |
447 /* 000 - activate all CF */ | |
448 "*002?", ksd_seqActAllCf, | |
449 /* 001 - deactivate all CF */ | |
450 "#002?", ksd_seqDeactAllCf, | |
451 /* 002 - registrate all CF */ | |
452 "**002?", ksd_seqRegAllCf, | |
453 /* 003 - erase all CF */ | |
454 "##002?", ksd_seqEraseAllCf, | |
455 /* 004 - interrogate all CF */ | |
456 "*#002?", ksd_seqIntrgtAllCf, | |
457 | |
458 /* 005 - activate all conditional CF */ | |
459 "*004?", ksd_seqActAllCondCf, | |
460 /* 006 - deactivate all conditional CF */ | |
461 "#004?", ksd_seqDeactAllCondCf, | |
462 /* 007 - registrate all conditional CF */ | |
463 "**004?", ksd_seqRegAllCondCf, | |
464 /* 008 - erase all conditional CF */ | |
465 "##004?", ksd_seqEraseAllCondCf, | |
466 /* 009 - interrogate all conditional CF */ | |
467 "*#004?", ksd_seqIntrgtAllCondCf, | |
468 | |
469 /* 010 - activate unconditional CF */ | |
470 "*21?", ksd_seqActUncondCf, | |
471 /* 011 - deactivate unconditional CF */ | |
472 "#21?", ksd_seqDeactUncondCf, | |
473 /* 012 - registrate unconditional CF */ | |
474 "**21?", ksd_seqRegUncondCf, | |
475 /* 013 - erase unconditional CF */ | |
476 "##21?", ksd_seqEraseUncondCf, | |
477 /* 014 - interrogate unconditional CF */ | |
478 "*#21?", ksd_seqIntrgtUncondCf, | |
479 | |
480 /* 015 - activate busy CF */ | |
481 "*67?", ksd_seqActBusyCf, | |
482 /* 016 - deactivate busy CF */ | |
483 "#67?", ksd_seqDeactBusyCf, | |
484 /* 017 - registrate busy CF */ | |
485 "**67?", ksd_seqRegBusyCf, | |
486 /* 018 - erase busy CF */ | |
487 "##67?", ksd_seqEraseBusyCf, | |
488 /* 019 - interrogate busy CF */ | |
489 "*#67?", ksd_seqIntrgtBusyCf, | |
490 | |
491 /* 020 - activate no reply CF */ | |
492 "*61?", ksd_seqActNoRepCf, | |
493 /* 021 - deactivate no reply CF */ | |
494 "#61?", ksd_seqDeactNoRepCf, | |
495 /* 022 - registrate no reply CF */ | |
496 "**61?", ksd_seqRegNoRepCf, | |
497 /* 023 - erase no reply CF */ | |
498 "##61?", ksd_seqEraseNoRepCf, | |
499 /* 024 - interrogate no reply CF */ | |
500 "*#61?", ksd_seqIntrgtNoRepCf, | |
501 | |
502 /* 025 - activate not reachable CF */ | |
503 "*62?", ksd_seqActNotReachCf, | |
504 /* 026 - deactivate not reachable CF */ | |
505 "#62?", ksd_seqDeactNotReachCf, | |
506 /* 027 - registrate not reachable CF */ | |
507 "**62?", ksd_seqRegNotReachCf, | |
508 /* 028 - erase not reachable CF */ | |
509 "##62?", ksd_seqEraseNotReachCf, | |
510 /* 029 - interrogate not reachable CF */ | |
511 "*#62?", ksd_seqIntrgtNotReachCf, | |
512 | |
513 /* 030 - interrogate CLIR */ | |
514 "*#31#", ksd_seqIntrgtClir, | |
515 /* 031 - suppress CLIR */ | |
516 KSD_SUPPRESS_CLIR, ksd_seqSupClir, | |
517 /* 032 - invoke CLIR */ | |
518 KSD_INVOKE_CLIR, ksd_seqInvClir, | |
519 | |
520 /* 033 - interrogate CLIP */ | |
521 "*#30#", ksd_seqIntrgtClip, | |
522 /* 034 - suppress CLIP */ | |
523 "*30#", ksd_seqSupClip, | |
524 /* 035 - invoke CLIP */ | |
525 "#30#", ksd_seqInvClip, | |
526 | |
527 /* 036 - interrogate COLR */ | |
528 "*#77#", ksd_seqIntrgtColr, | |
529 /* 037 - suppress COLR */ | |
530 "*77#", ksd_seqSupColr, | |
531 /* 038 - invoke COLR */ | |
532 "#77#", ksd_seqInvColr, | |
533 | |
534 /* 039 - interrogate COLP */ | |
535 "*#76#", ksd_seqIntrgtColp, | |
536 /* 040 - suppress COLP */ | |
537 "*76#", ksd_seqSupColp, | |
538 /* 041 - invoke COLP */ | |
539 "#76#", ksd_seqInvColp, | |
540 | |
541 /* 042 - activate wait */ | |
542 "*43?", ksd_seqActWait, | |
543 /* 043 - deactivate wait */ | |
544 "#43?", ksd_seqDeactWait, | |
545 /* 044 - interrogate wait */ | |
546 //TISH, patch for GCF42.3.1.9 | |
547 //start | |
548 #if 0 | |
549 "*#43#", ksd_seqIntrgtWait, | |
550 #else | |
551 "*#43?", ksd_seqIntrgtWait, | |
552 #endif | |
553 //end | |
554 /* 045 - present IMEI */ | |
555 "*#06#", ksd_seqPrsntImei, | |
556 | |
557 #if 0 /* For further study, so not yet used */ | |
558 /* - activate CCBS */ | |
559 "*37#", ksd_seqActCCBS | |
560 #endif | |
561 | |
562 /* 046 - deactivate CCBS */ | |
563 "#37?", ksd_seqDeactCCBS, | |
564 /* 047 - interrogate CCBS */ | |
565 "*#37#", ksd_seqIntrgtCCBS, | |
566 | |
567 /* 048 - request TTY service */ | |
568 "*55#", ksd_seqReqTTY, | |
569 /* 049 - suppress TTY service */ | |
570 "#55#", ksd_seqSupTTY, | |
571 | |
572 /* 300 - CNAP */ | |
573 "*#300#", ksd_seqIntrgtCNAP, | |
574 | |
575 /* 050 - unknown */ | |
576 NULL, ksd_seqUnknown | |
577 }; | |
578 | |
579 /* standard keystroke sequence table */ | |
580 LOCAL const T_KEY_SEQ_TABLE keySeqTableNonGsm[] = | |
581 { | |
582 /* 000 - MS off */ | |
583 "#*91*0#", ksd_seqMsOff, | |
584 /* 001 - MS on */ | |
585 "#*91*1#", ksd_seqMsOn, | |
586 /* 002 - hook off */ | |
587 "#*43*0#", ksd_seqHookOff, | |
588 /* 003 - hook on */ | |
589 "#*43*1#", ksd_seqHookOn, | |
590 /* 004 - DTMF */ | |
591 "#*88*", ksd_seqDtmf, | |
592 #ifdef SMI | |
593 /* 005 - keypad indication */ | |
594 "#*92?", ksd_seqKeypadInd, | |
595 /* 006 - start LCD test */ | |
596 "#*96#", ksd_seqStartLcdTest, | |
597 /* 007 - show call table */ | |
598 "#*93#", ksd_seqShowCallTable, | |
599 /* 008 - set phone number used for abbreviated dialing */ | |
600 "#*95?", ksd_seqSetAbbrDial, | |
601 #endif | |
602 | |
603 /* 009 - restart registration */ | |
604 "*1#", ksd_seqStartReg, | |
605 /* 010 - automatic registration */ | |
606 "*1*0#", ksd_seqAutoReg, | |
607 /* 011 - manual registration */ | |
608 "*1*1#", ksd_seqManReg, | |
609 /* 012 - manual followed by automatic registration */ | |
610 "*1*4#", ksd_seqAutoManReg, | |
611 /* 013 - set manual registration */ | |
612 "MANUAL", ksd_seqSetManReg, | |
613 /* 014 - set automatic registration */ | |
614 "AUTO", ksd_seqSetAutoReg, | |
615 /* 015 - start cell selection for a selected PLMN */ | |
616 "SPLMN", ksd_seqStartPLMN, | |
617 | |
618 #ifdef SMI | |
619 /* 016 - send short message */ | |
620 "#*94*0#", ksd_seqSmsSend, | |
621 /* 017 - send short message from storage */ | |
622 "#*94*1#", ksd_seqSmsSendFromMem, | |
623 /* 018 - write short message to memory */ | |
624 "#*94*2#", ksd_seqSmsWrite, | |
625 /* 019 - delete short message */ | |
626 "#*94*3#", ksd_seqSmsDelete, | |
627 /* 020 - read short message */ | |
628 "#*94*4#", ksd_seqSmsRead, | |
629 /* 021 - list short messages */ | |
630 "#*94*5#", ksd_seqSmsList, | |
631 /* 022 - read a single short message */ | |
632 "#*94*6#", ksd_seqSmsReadSingle, | |
633 #endif | |
634 /* 023 - interrogate lock status of SIM card */ | |
635 "*#77742#",ksd_seqIntrgtSimLock, | |
636 #ifdef SMI | |
637 /* 024 - send AT+CBST, GSM 07.07, chapter 6.7 */ | |
638 "*7767?", ksd_seqSndCbst, | |
639 /* 025 - send AT+CRLP, GSM 07.07, chapter 6.8 */ | |
640 "*7768?", ksd_seqSndCrlp, | |
641 | |
642 /* 026 - send AT+DS, V25ter, chapter 6.6.1 */ | |
643 "*25661?", ksd_seqSndDs, | |
644 #endif | |
645 #ifdef EM_MODE | |
646 /* 027 - engineering mode command */ | |
647 "#*99?", ksd_em_mode, | |
648 #endif | |
649 /* 028 - unknown */ | |
650 NULL, ksd_seqUnknown | |
651 }; | |
652 | |
653 EXTERN UBYTE std; | |
654 EXTERN T_ACI_CUSCFG_PARAMS cuscfgParams; | |
655 | |
656 /*==== FUNCTIONS ==================================================*/ | |
657 /* | |
658 +--------------------------------------------------------------------+ | |
659 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
660 | STATE : code ROUTINE : ksd_strlen | | |
661 +--------------------------------------------------------------------+ | |
662 | |
663 PURPOSE : This function calculates the length of a string. | |
664 If the string ends with a '?' this character will be not | |
665 taken into account. | |
666 | |
667 <string>: the length of this string will be calculated | |
668 | |
669 returns: the number of characters in the string, except | |
670 an ending '?' | |
671 */ | |
672 LOCAL USHORT ksd_strlen (CHAR* string) | |
673 { | |
674 USHORT len = strlen (string); | |
675 | |
676 if (string[len - 1] EQ DONT_CARE) | |
677 len--; | |
678 | |
679 return len; | |
680 } | |
681 | |
682 /* | |
683 +--------------------------------------------------------------------+ | |
684 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
685 | STATE : code ROUTINE : ksd_seqMsOff | | |
686 +--------------------------------------------------------------------+ | |
687 | |
688 PURPOSE : This function sets the output parameter for the | |
689 SEQGRP_MS_OFF key sequence. | |
690 */ | |
691 LOCAL BOOL ksd_seqMsOff (USHORT inIdx, | |
692 CHAR* inSeq, | |
693 T_KSD_SEQGRP* outSeqGrp, | |
694 CHAR** outRestSeq, | |
695 T_KSD_SEQPARAM* outSeqParam) | |
696 { | |
697 TRACE_FUNCTION ("ksd_seqMsOff ()"); | |
698 | |
699 *outSeqGrp = SEQGRP_MS_OFF; | |
700 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
701 | |
702 return TRUE; | |
703 } | |
704 | |
705 /* | |
706 +--------------------------------------------------------------------+ | |
707 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
708 | STATE : code ROUTINE : ksd_seqMsOn | | |
709 +--------------------------------------------------------------------+ | |
710 | |
711 PURPOSE : This function sets the ouput parameter for the | |
712 SEQGRP_MS_ON key sequence. | |
713 */ | |
714 LOCAL BOOL ksd_seqMsOn (USHORT inIdx, | |
715 CHAR* inSeq, | |
716 T_KSD_SEQGRP* outSeqGrp, | |
717 CHAR** outRestSeq, | |
718 T_KSD_SEQPARAM* outSeqParam) | |
719 { | |
720 TRACE_FUNCTION ("ksd_seqMsOn ()"); | |
721 | |
722 *outSeqGrp = SEQGRP_MS_ON; | |
723 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
724 | |
725 return TRUE; | |
726 } | |
727 | |
728 /* | |
729 +--------------------------------------------------------------------+ | |
730 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
731 | STATE : code ROUTINE : ksd_seqHookOff | | |
732 +--------------------------------------------------------------------+ | |
733 | |
734 PURPOSE : This function sets the ouput parameter for the | |
735 SEQGRP_HOOK_OFF key sequence. | |
736 */ | |
737 LOCAL BOOL ksd_seqHookOff (USHORT inIdx, | |
738 CHAR* inSeq, | |
739 T_KSD_SEQGRP* outSeqGrp, | |
740 CHAR** outRestSeq, | |
741 T_KSD_SEQPARAM* outSeqParam) | |
742 { | |
743 TRACE_FUNCTION ("ksd_seqHookOff ()"); | |
744 | |
745 *outSeqGrp = SEQGRP_HOOK_OFF; | |
746 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
747 | |
748 return TRUE; | |
749 } | |
750 | |
751 /* | |
752 +--------------------------------------------------------------------+ | |
753 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
754 | STATE : code ROUTINE : ksd_seqHookOn | | |
755 +--------------------------------------------------------------------+ | |
756 | |
757 PURPOSE : This function sets the ouput parameter for the | |
758 SEQGRP_HOOK_ON key sequence. | |
759 */ | |
760 LOCAL BOOL ksd_seqHookOn (USHORT inIdx, | |
761 CHAR* inSeq, | |
762 T_KSD_SEQGRP* outSeqGrp, | |
763 CHAR** outRestSeq, | |
764 T_KSD_SEQPARAM* outSeqParam) | |
765 { | |
766 TRACE_FUNCTION ("ksd_seqHookOn ()"); | |
767 | |
768 *outSeqGrp = SEQGRP_HOOK_ON; | |
769 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
770 | |
771 return TRUE; | |
772 } | |
773 | |
774 /* | |
775 +--------------------------------------------------------------------+ | |
776 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
777 | STATE : code ROUTINE : ksd_seqDtmf | | |
778 +--------------------------------------------------------------------+ | |
779 | |
780 PURPOSE : This function sets the ouput parameter for the SEQGRP_DTMF | |
781 key sequence. | |
782 */ | |
783 LOCAL BOOL ksd_seqDtmf (USHORT inIdx, | |
784 CHAR* inSeq, | |
785 T_KSD_SEQGRP* outSeqGrp, | |
786 CHAR** outRestSeq, | |
787 T_KSD_SEQPARAM* outSeqParam) | |
788 { | |
789 CHAR* dtmf = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
790 /* points to the DTMF character */ | |
791 BOOL isSuccess; /* holds whether decoding is successfull */ | |
792 | |
793 TRACE_FUNCTION ("ksd_seqDtmf ()"); | |
794 | |
795 *outSeqGrp = SEQGRP_DTMF; | |
796 | |
797 /* | |
798 *----------------------------------------------------------------- | |
799 * the following characters are valid DTMF characters: 0-9,A-D,*,# | |
800 *----------------------------------------------------------------- | |
801 */ | |
802 if ( *dtmf EQ '*' OR | |
803 *dtmf EQ '#' OR | |
804 (*dtmf >= 'A' AND *dtmf <= 'D') OR | |
805 (*dtmf >= 'a' AND *dtmf <= 'd') OR | |
806 (*dtmf >= '0' AND *dtmf <= '9')) | |
807 { | |
808 *outRestSeq = dtmf + 1; | |
809 outSeqParam->dtmf = *dtmf; | |
810 isSuccess = TRUE; | |
811 } | |
812 else | |
813 { | |
814 *outRestSeq = dtmf; | |
815 isSuccess = FALSE; | |
816 } | |
817 | |
818 return isSuccess; | |
819 } | |
820 | |
821 #ifdef SMI | |
822 /* | |
823 +--------------------------------------------------------------------+ | |
824 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
825 | STATE : code ROUTINE : ksd_seqKeypadInd | | |
826 +--------------------------------------------------------------------+ | |
827 | |
828 PURPOSE : This function sets the ouput parameter for the | |
829 SEQGRP_KEYPAD_IND key sequence. | |
830 */ | |
831 LOCAL BOOL ksd_seqKeypadInd (USHORT inIdx, | |
832 CHAR* inSeq, | |
833 T_KSD_SEQGRP* outSeqGrp, | |
834 CHAR** outRestSeq, | |
835 T_KSD_SEQPARAM* outSeqParam) | |
836 { | |
837 static const struct T_KSD_KEYS /* key name / key code mapping */ | |
838 { | |
839 const CHAR* longName; /* long key name */ | |
840 const UBYTE code; /* key code */ | |
841 } | |
842 keys[] = | |
843 { | |
844 "SEND", KP_OFF_HOOK, | |
845 "END", KP_ON_HOOK, | |
846 "UP", KP_UP, | |
847 "DOWN", KP_DOWN, | |
848 "SHIFT", KP_SHIFT, | |
849 "CLEAR", KP_CLEAR, | |
850 "HASH", KP_HASH, | |
851 "STAR", KP_STAR, | |
852 "POWER", KP_POWER, | |
853 NULL, -1 | |
854 }; | |
855 | |
856 USHORT i = 0; | |
857 const USHORT siNum = 1; | |
858 T_KSD_DCD_CPLE dcdCple[1]; | |
859 T_KSD_SIPARAM keyParam; | |
860 USHORT readChars; | |
861 USHORT lenKeySeq = ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
862 BOOL isSuccess = FALSE; | |
863 | |
864 TRACE_FUNCTION ("ksd_seqKeypadInd ()"); | |
865 | |
866 dcdCple[0].type = SI_CHAR_STAR; | |
867 dcdCple[0].param = &keyParam; | |
868 | |
869 *outSeqGrp = SEQGRP_KEYPAD_IND; | |
870 | |
871 if (ksd_extractSi (inSeq + lenKeySeq, siNum, | |
872 &readChars, dcdCple) EQ TRUE) | |
873 { | |
874 CHAR* key = keyParam.siCharStar; | |
875 | |
876 outSeqParam->keypad.keyStat = KEY_STAT_PRS; | |
877 | |
878 /* | |
879 *--------------------------------------------------------------- | |
880 * searching for long key name | |
881 *--------------------------------------------------------------- | |
882 */ | |
883 while (keys[i].longName NEQ NULL AND | |
884 strcmp (keys[i].longName, key) NEQ 0) | |
885 i++; | |
886 | |
887 if (keys[i].longName NEQ NULL) | |
888 { | |
889 /* | |
890 *------------------------------------------------------------- | |
891 * long key name found | |
892 *------------------------------------------------------------- | |
893 */ | |
894 outSeqParam->keypad.keyCode = keys[i].code; | |
895 isSuccess = TRUE; | |
896 } | |
897 else if (strlen (key) EQ 1) | |
898 { | |
899 /* | |
900 *------------------------------------------------------------- | |
901 * only a single character found | |
902 *------------------------------------------------------------- | |
903 */ | |
904 outSeqParam->keypad.keyCode = *key; | |
905 isSuccess = TRUE; | |
906 } | |
907 else | |
908 isSuccess = FALSE; | |
909 } | |
910 | |
911 *outRestSeq = inSeq + lenKeySeq + readChars; | |
912 | |
913 return isSuccess; | |
914 } | |
915 #endif | |
916 | |
917 #ifdef SMI | |
918 /* | |
919 +--------------------------------------------------------------------+ | |
920 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
921 | STATE : code ROUTINE : ksd_seqStartLcdTest | | |
922 +--------------------------------------------------------------------+ | |
923 | |
924 PURPOSE : This function sets the ouput parameter for the | |
925 SEQGRP_LCD_TEST key sequence. | |
926 */ | |
927 LOCAL BOOL ksd_seqStartLcdTest (USHORT inIdx, | |
928 CHAR* inSeq, | |
929 T_KSD_SEQGRP* outSeqGrp, | |
930 CHAR** outRestSeq, | |
931 T_KSD_SEQPARAM* outSeqParam) | |
932 { | |
933 TRACE_FUNCTION ("ksd_seqStartLcdTest ()"); | |
934 | |
935 *outSeqGrp = SEQGRP_LCD_TEST; | |
936 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
937 | |
938 return TRUE; | |
939 } | |
940 #endif | |
941 | |
942 #ifdef SMI | |
943 /* | |
944 +--------------------------------------------------------------------+ | |
945 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
946 | STATE : code ROUTINE : ksd_seqShowCallTable | | |
947 +--------------------------------------------------------------------+ | |
948 | |
949 PURPOSE : This function sets the ouput parameter for the | |
950 SEQGRP_SHOW_CALL_TABLE key sequence. | |
951 */ | |
952 LOCAL BOOL ksd_seqShowCallTable (USHORT inIdx, | |
953 CHAR* inSeq, | |
954 T_KSD_SEQGRP* outSeqGrp, | |
955 CHAR** outRestSeq, | |
956 T_KSD_SEQPARAM* outSeqParam) | |
957 { | |
958 TRACE_FUNCTION ("ksd_seqShowCallTable ()"); | |
959 | |
960 *outSeqGrp = SEQGRP_SHOW_CALL_TABLE; | |
961 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
962 | |
963 return TRUE; | |
964 } | |
965 #endif | |
966 | |
967 /* | |
968 +--------------------------------------------------------------------+ | |
969 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
970 | STATE : code ROUTINE : ksd_seqAutoReg | | |
971 +--------------------------------------------------------------------+ | |
972 | |
973 PURPOSE : This function sets the ouput parameter for the | |
974 SEQGRP_AUTO_REG key sequence. | |
975 */ | |
976 LOCAL BOOL ksd_seqAutoReg (USHORT inIdx, | |
977 CHAR* inSeq, | |
978 T_KSD_SEQGRP* outSeqGrp, | |
979 CHAR** outRestSeq, | |
980 T_KSD_SEQPARAM* outSeqParam) | |
981 { | |
982 TRACE_FUNCTION ("ksd_seqAutoReg ()"); | |
983 | |
984 *outSeqGrp = SEQGRP_CHANGE_REGISTER; | |
985 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
986 | |
987 outSeqParam->cops.mode = COPS_MOD_Auto; | |
988 outSeqParam->cops.frmt = COPS_FRMT_NotPresent; | |
989 outSeqParam->cops.oper = NULL; | |
990 | |
991 return TRUE; | |
992 } | |
993 | |
994 /* | |
995 +--------------------------------------------------------------------+ | |
996 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
997 | STATE : code ROUTINE : ksd_seqManReg | | |
998 +--------------------------------------------------------------------+ | |
999 | |
1000 PURPOSE : This function sets the ouput parameter for the | |
1001 SEQGRP_MAN_REG key sequence. | |
1002 */ | |
1003 LOCAL BOOL ksd_seqManReg (USHORT inIdx, | |
1004 CHAR* inSeq, | |
1005 T_KSD_SEQGRP* outSeqGrp, | |
1006 CHAR** outRestSeq, | |
1007 T_KSD_SEQPARAM* outSeqParam) | |
1008 { | |
1009 TRACE_FUNCTION ("ksd_seqManReg ()"); | |
1010 | |
1011 *outSeqGrp = SEQGRP_CHANGE_REGISTER; | |
1012 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
1013 | |
1014 outSeqParam->cops.mode = COPS_MOD_Man; | |
1015 outSeqParam->cops.frmt = COPS_FRMT_NotPresent; | |
1016 outSeqParam->cops.oper = NULL; | |
1017 | |
1018 return TRUE; | |
1019 } | |
1020 | |
1021 /* | |
1022 +--------------------------------------------------------------------+ | |
1023 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1024 | STATE : code ROUTINE : ksd_seqAutoManReg | | |
1025 +--------------------------------------------------------------------+ | |
1026 | |
1027 PURPOSE : This function sets the ouput parameter for the | |
1028 AUTO_MAN_REG key sequence. | |
1029 */ | |
1030 LOCAL BOOL ksd_seqAutoManReg (USHORT inIdx, | |
1031 CHAR* inSeq, | |
1032 T_KSD_SEQGRP* outSeqGrp, | |
1033 CHAR** outRestSeq, | |
1034 T_KSD_SEQPARAM* outSeqParam) | |
1035 { | |
1036 TRACE_FUNCTION ("ksd_seqAutoManReg ()"); | |
1037 | |
1038 *outSeqGrp = SEQGRP_CHANGE_REGISTER; | |
1039 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
1040 | |
1041 outSeqParam->cops.mode = COPS_MOD_Both; | |
1042 outSeqParam->cops.frmt = COPS_FRMT_NotPresent; | |
1043 outSeqParam->cops.oper = NULL; | |
1044 | |
1045 return TRUE; | |
1046 } | |
1047 | |
1048 /* | |
1049 +--------------------------------------------------------------------+ | |
1050 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1051 | STATE : code ROUTINE : ksd_seqSetManReg | | |
1052 +--------------------------------------------------------------------+ | |
1053 | |
1054 PURPOSE : This function sets the ouput parameter for the | |
1055 SEQGRP_SET_MAN_REG key sequence. | |
1056 */ | |
1057 LOCAL BOOL ksd_seqSetManReg (USHORT inIdx, | |
1058 CHAR* inSeq, | |
1059 T_KSD_SEQGRP* outSeqGrp, | |
1060 CHAR** outRestSeq, | |
1061 T_KSD_SEQPARAM* outSeqParam) | |
1062 { | |
1063 TRACE_FUNCTION ("ksd_seqSetManReg ()"); | |
1064 | |
1065 *outSeqGrp = SEQGRP_SET_REGISTER; | |
1066 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
1067 | |
1068 outSeqParam->cops.mode = COPS_MOD_Man; | |
1069 outSeqParam->cops.frmt = COPS_FRMT_NotPresent; | |
1070 outSeqParam->cops.oper = NULL; | |
1071 | |
1072 return TRUE; | |
1073 } | |
1074 | |
1075 /* | |
1076 +--------------------------------------------------------------------+ | |
1077 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1078 | STATE : code ROUTINE : ksd_seqSetAutoReg | | |
1079 +--------------------------------------------------------------------+ | |
1080 | |
1081 PURPOSE : This function sets the ouput parameter for the | |
1082 SEQGRP_SET_AUTO_REG key sequence. | |
1083 */ | |
1084 LOCAL BOOL ksd_seqSetAutoReg (USHORT inIdx, | |
1085 CHAR* inSeq, | |
1086 T_KSD_SEQGRP* outSeqGrp, | |
1087 CHAR** outRestSeq, | |
1088 T_KSD_SEQPARAM* outSeqParam) | |
1089 { | |
1090 TRACE_FUNCTION ("ksd_seqSetAutoReg ()"); | |
1091 | |
1092 *outSeqGrp = SEQGRP_SET_REGISTER; | |
1093 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
1094 | |
1095 outSeqParam->cops.mode = COPS_MOD_Auto; | |
1096 outSeqParam->cops.frmt = COPS_FRMT_NotPresent; | |
1097 outSeqParam->cops.oper = NULL; | |
1098 | |
1099 return TRUE; | |
1100 } | |
1101 | |
1102 /* | |
1103 +--------------------------------------------------------------------+ | |
1104 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1105 | STATE : code ROUTINE : ksd_seqStartReg | | |
1106 +--------------------------------------------------------------------+ | |
1107 | |
1108 PURPOSE : This function sets the ouput parameter for the | |
1109 SEQGRP_START_REGISTER key sequence. | |
1110 */ | |
1111 LOCAL BOOL ksd_seqStartReg (USHORT inIdx, | |
1112 CHAR* inSeq, | |
1113 T_KSD_SEQGRP* outSeqGrp, | |
1114 CHAR** outRestSeq, | |
1115 T_KSD_SEQPARAM* outSeqParam) | |
1116 { | |
1117 TRACE_FUNCTION ("ksd_seqStartReg ()"); | |
1118 | |
1119 *outSeqGrp = SEQGRP_START_REGISTER; | |
1120 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
1121 | |
1122 outSeqParam->cops.mode = COPS_MOD_NotPresent; | |
1123 outSeqParam->cops.frmt = COPS_FRMT_NotPresent; | |
1124 outSeqParam->cops.oper = NULL; | |
1125 | |
1126 return TRUE; | |
1127 } | |
1128 | |
1129 /* | |
1130 +--------------------------------------------------------------------+ | |
1131 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1132 | STATE : code ROUTINE : ksd_seqStartPLMN | | |
1133 +--------------------------------------------------------------------+ | |
1134 | |
1135 PURPOSE : This function sets the ouput parameter for the | |
1136 SEQGRP_START_PLMN key sequence. | |
1137 */ | |
1138 LOCAL BOOL ksd_seqStartPLMN (USHORT inIdx, | |
1139 CHAR* inSeq, | |
1140 T_KSD_SEQGRP* outSeqGrp, | |
1141 CHAR** outRestSeq, | |
1142 T_KSD_SEQPARAM* outSeqParam) | |
1143 { | |
1144 TRACE_FUNCTION ("ksd_seqStartPLMN ()"); | |
1145 | |
1146 *outSeqGrp = SEQGRP_START_REGISTER; | |
1147 *outRestSeq = inSeq + strlen (inSeq); | |
1148 | |
1149 outSeqParam->cops.mode = COPS_MOD_NotPresent; | |
1150 outSeqParam->cops.frmt = COPS_FRMT_Numeric; | |
1151 outSeqParam->cops.oper = inSeq + | |
1152 ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
1153 | |
1154 return TRUE; | |
1155 } | |
1156 | |
1157 #ifdef SMI | |
1158 /* | |
1159 +--------------------------------------------------------------------+ | |
1160 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1161 | STATE : code ROUTINE : ksd_seqSmsSend | | |
1162 +--------------------------------------------------------------------+ | |
1163 | |
1164 PURPOSE : This function sets the ouput parameter for the | |
1165 SEQGRP_SMS_SEND key sequence. | |
1166 */ | |
1167 LOCAL BOOL ksd_seqSmsSend (USHORT inIdx, | |
1168 CHAR* inSeq, | |
1169 T_KSD_SEQGRP* outSeqGrp, | |
1170 CHAR** outRestSeq, | |
1171 T_KSD_SEQPARAM* outSeqParam) | |
1172 { | |
1173 TRACE_FUNCTION ("ksd_seqSmsSend ()"); | |
1174 | |
1175 *outSeqGrp = SEQGRP_SMS_SEND; | |
1176 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
1177 | |
1178 return TRUE; | |
1179 } | |
1180 #endif | |
1181 | |
1182 #ifdef SMI | |
1183 /* | |
1184 +--------------------------------------------------------------------+ | |
1185 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1186 | STATE : code ROUTINE : ksd_seqSmsSendFromMem | | |
1187 +--------------------------------------------------------------------+ | |
1188 | |
1189 PURPOSE : This function sets the ouput parameter for the | |
1190 SEQGRP_SMS_SEND_FROM_MEM key sequence. | |
1191 */ | |
1192 LOCAL BOOL ksd_seqSmsSendFromMem (USHORT inIdx, | |
1193 CHAR* inSeq, | |
1194 T_KSD_SEQGRP* outSeqGrp, | |
1195 CHAR** outRestSeq, | |
1196 T_KSD_SEQPARAM* outSeqParam) | |
1197 { | |
1198 TRACE_FUNCTION ("ksd_seqSmsSendFromMem ()"); | |
1199 | |
1200 *outSeqGrp = SEQGRP_SMS_SEND_FROM_MEM; | |
1201 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
1202 | |
1203 return TRUE; | |
1204 } | |
1205 #endif | |
1206 | |
1207 #ifdef SMI | |
1208 /* | |
1209 +--------------------------------------------------------------------+ | |
1210 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1211 | STATE : code ROUTINE : ksd_seqSmsWrite | | |
1212 +--------------------------------------------------------------------+ | |
1213 | |
1214 PURPOSE : This function sets the ouput parameter for the | |
1215 SEQGRP_SMS_WRITE key sequence. | |
1216 */ | |
1217 LOCAL BOOL ksd_seqSmsWrite (USHORT inIdx, | |
1218 CHAR* inSeq, | |
1219 T_KSD_SEQGRP* outSeqGrp, | |
1220 CHAR** outRestSeq, | |
1221 T_KSD_SEQPARAM* outSeqParam) | |
1222 { | |
1223 TRACE_FUNCTION ("ksd_seqSmsWrite ()"); | |
1224 | |
1225 *outSeqGrp = SEQGRP_SMS_WRITE; | |
1226 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
1227 | |
1228 return TRUE; | |
1229 } | |
1230 #endif | |
1231 | |
1232 #ifdef EM_MODE | |
1233 /* | |
1234 +--------------------------------------------------------------------+ | |
1235 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1236 | STATE : code ROUTINE : ksd_em_mode | | |
1237 +--------------------------------------------------------------------+ | |
1238 | |
1239 PURPOSE : This function sets the ouput parameter for the | |
1240 SEQGRP_EM_MODE key sequence. | |
1241 */ | |
1242 LOCAL BOOL ksd_em_mode (USHORT inIdx, | |
1243 CHAR* inSeq, | |
1244 T_KSD_SEQGRP* outSeqGrp, | |
1245 CHAR** outRestSeq, | |
1246 T_KSD_SEQPARAM* outSeqParam) | |
1247 { | |
1248 TRACE_FUNCTION ("ksd_em_mode ()"); | |
1249 | |
1250 *outSeqGrp = SEQGRP_EM_MODE; | |
1251 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
1252 | |
1253 return TRUE; | |
1254 } | |
1255 #endif | |
1256 | |
1257 #ifdef SMI | |
1258 /* | |
1259 +--------------------------------------------------------------------+ | |
1260 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1261 | STATE : code ROUTINE : ksd_seqSmsDelete | | |
1262 +--------------------------------------------------------------------+ | |
1263 | |
1264 PURPOSE : This function sets the ouput parameter for the | |
1265 SEQGRP_SMS_DELETE key sequence. | |
1266 */ | |
1267 LOCAL BOOL ksd_seqSmsDelete (USHORT inIdx, | |
1268 CHAR* inSeq, | |
1269 T_KSD_SEQGRP* outSeqGrp, | |
1270 CHAR** outRestSeq, | |
1271 T_KSD_SEQPARAM* outSeqParam) | |
1272 { | |
1273 TRACE_FUNCTION ("ksd_seqSmsDelete ()"); | |
1274 | |
1275 *outSeqGrp = SEQGRP_SMS_DELETE; | |
1276 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
1277 | |
1278 return TRUE; | |
1279 } | |
1280 #endif | |
1281 | |
1282 #ifdef SMI | |
1283 /* | |
1284 +--------------------------------------------------------------------+ | |
1285 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1286 | STATE : code ROUTINE : ksd_seqSmsRead | | |
1287 +--------------------------------------------------------------------+ | |
1288 | |
1289 PURPOSE : This function sets the ouput parameter for the | |
1290 SEQGRP_SMS_READ key sequence. | |
1291 */ | |
1292 LOCAL BOOL ksd_seqSmsRead (USHORT inIdx, | |
1293 CHAR* inSeq, | |
1294 T_KSD_SEQGRP* outSeqGrp, | |
1295 CHAR** outRestSeq, | |
1296 T_KSD_SEQPARAM* outSeqParam) | |
1297 { | |
1298 TRACE_FUNCTION ("ksd_seqSmsRead ()"); | |
1299 | |
1300 *outSeqGrp = SEQGRP_SMS_READ; | |
1301 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
1302 | |
1303 return TRUE; | |
1304 } | |
1305 #endif | |
1306 | |
1307 #ifdef SMI | |
1308 /* | |
1309 +--------------------------------------------------------------------+ | |
1310 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1311 | STATE : code ROUTINE : ksd_seqSmsList | | |
1312 +--------------------------------------------------------------------+ | |
1313 | |
1314 PURPOSE : This function sets the ouput parameter for the | |
1315 SEQGRP_SMS_LIST key sequence. | |
1316 */ | |
1317 LOCAL BOOL ksd_seqSmsList (USHORT inIdx, | |
1318 CHAR* inSeq, | |
1319 T_KSD_SEQGRP* outSeqGrp, | |
1320 CHAR** outRestSeq, | |
1321 T_KSD_SEQPARAM* outSeqParam) | |
1322 { | |
1323 TRACE_FUNCTION ("ksd_seqSmsList ()"); | |
1324 | |
1325 *outSeqGrp = SEQGRP_SMS_LIST; | |
1326 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
1327 | |
1328 return TRUE; | |
1329 } | |
1330 #endif | |
1331 | |
1332 #ifdef SMI | |
1333 /* | |
1334 +--------------------------------------------------------------------+ | |
1335 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1336 | STATE : code ROUTINE : ksd_seqSmsReadSingle | | |
1337 +--------------------------------------------------------------------+ | |
1338 | |
1339 PURPOSE : This function sets the ouput parameter for the | |
1340 SEQGRP_SMS_READ_SINGLE key sequence. | |
1341 */ | |
1342 LOCAL BOOL ksd_seqSmsReadSingle (USHORT inIdx, | |
1343 CHAR* inSeq, | |
1344 T_KSD_SEQGRP* outSeqGrp, | |
1345 CHAR** outRestSeq, | |
1346 T_KSD_SEQPARAM* outSeqParam) | |
1347 { | |
1348 TRACE_FUNCTION ("ksd_seqSmsReadSingle ()"); | |
1349 | |
1350 *outSeqGrp = SEQGRP_SMS_READ_SINGLE; | |
1351 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
1352 | |
1353 return TRUE; | |
1354 } | |
1355 #endif | |
1356 | |
1357 /* | |
1358 +--------------------------------------------------------------------+ | |
1359 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1360 | STATE : code ROUTINE : ksd_seqDial | | |
1361 +--------------------------------------------------------------------+ | |
1362 | |
1363 PURPOSE : This function sets the ouput parameter for the SEQGRP_DIAL | |
1364 key sequence. | |
1365 */ | |
1366 LOCAL BOOL ksd_seqDial (USHORT inIdx, | |
1367 CHAR* inSeq, | |
1368 T_KSD_SEQGRP* outSeqGrp, | |
1369 CHAR** outRestSeq, | |
1370 T_KSD_SEQPARAM* outSeqParam) | |
1371 { | |
1372 USHORT lenWholeNumber = strlen (inSeq); | |
1373 USHORT lenDialNumber = lenWholeNumber; | |
1374 | |
1375 TRACE_FUNCTION ("ksd_seqDial ()"); | |
1376 | |
1377 /* | |
1378 *----------------------------------------------------------------- | |
1379 * process type of call | |
1380 *----------------------------------------------------------------- | |
1381 */ | |
1382 if (inSeq[lenDialNumber - 1] EQ DATA_CALL) | |
1383 { | |
1384 outSeqParam->dial.callType = D_TOC_Data; | |
1385 lenDialNumber--; | |
1386 } | |
1387 else | |
1388 outSeqParam->dial.callType = D_TOC_Voice; | |
1389 | |
1390 outSeqParam->dial.cugCtrl = D_CUG_CTRL_NotPresent; | |
1391 outSeqParam->dial.clirOvrd = D_CLIR_OVRD_Default; | |
1392 outSeqParam->dial.number = inSeq; | |
1393 inSeq[lenDialNumber] = NULL_TERM; | |
1394 | |
1395 *outSeqGrp = SEQGRP_DIAL; | |
1396 *outRestSeq = inSeq + lenWholeNumber; | |
1397 | |
1398 return TRUE; | |
1399 } | |
1400 | |
1401 /* | |
1402 +--------------------------------------------------------------------+ | |
1403 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1404 | STATE : code ROUTINE : ksd_seqDialIdx | | |
1405 +--------------------------------------------------------------------+ | |
1406 | |
1407 PURPOSE : This function sets the ouput parameter for the | |
1408 SEQGRP_DIAL_IDX key sequence. | |
1409 */ | |
1410 LOCAL BOOL ksd_seqDialIdx (USHORT inIdx, | |
1411 CHAR* inSeq, | |
1412 T_KSD_SEQGRP* outSeqGrp, | |
1413 CHAR** outRestSeq, | |
1414 T_KSD_SEQPARAM* outSeqParam) | |
1415 { | |
1416 BOOL isSuccess = FALSE; | |
1417 UBYTE i = 0; | |
1418 SHORT index = 0; | |
1419 | |
1420 TRACE_FUNCTION ("ksd_seqDialIdx ()"); | |
1421 | |
1422 *outSeqGrp = SEQGRP_UNKNOWN; | |
1423 *outRestSeq = inSeq; | |
1424 | |
1425 /* when operating in a US band (1900 or 850), "0" and "00" shall | |
1426 * be transmitted to the network as normal dialing numbers | |
1427 */ | |
1428 if ( ksd_isBCDForUSBand(inSeq) ) | |
1429 { | |
1430 return FALSE; | |
1431 } | |
1432 | |
1433 while ( i < strlen ( inSeq ) AND inSeq[i] NEQ DIAL_IDX ) | |
1434 { | |
1435 if ( inSeq[i] >= '0' AND inSeq[i] <= '9' ) | |
1436 { | |
1437 index *= 10; | |
1438 index += inSeq[i] - '0'; | |
1439 } | |
1440 else | |
1441 { | |
1442 return isSuccess; | |
1443 } | |
1444 | |
1445 i++; | |
1446 } | |
1447 | |
1448 if ( i > 0 AND | |
1449 i < 4 AND | |
1450 inSeq[i+1] EQ NULL_TERM AND | |
1451 inSeq[i] EQ DIAL_IDX ) | |
1452 { | |
1453 *outSeqGrp = SEQGRP_DIAL_IDX; | |
1454 *outRestSeq = &inSeq[i+1]; | |
1455 | |
1456 outSeqParam->dialIdx.str = NULL; | |
1457 outSeqParam->dialIdx.mem = PB_STOR_NotPresent; | |
1458 outSeqParam->dialIdx.index = index; | |
1459 outSeqParam->dialIdx.clirOvrd = D_CLIR_OVRD_Default; | |
1460 outSeqParam->dialIdx.cugCtrl = D_CUG_CTRL_NotPresent; | |
1461 outSeqParam->dialIdx.callType = D_TOC_Voice; | |
1462 | |
1463 isSuccess = TRUE; | |
1464 } | |
1465 | |
1466 return isSuccess; | |
1467 } | |
1468 | |
1469 /* | |
1470 +--------------------------------------------------------------------+ | |
1471 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1472 | STATE : code ROUTINE : ksd_seqUssd | | |
1473 +--------------------------------------------------------------------+ | |
1474 | |
1475 PURPOSE : This function sets the ouput parameter for the | |
1476 SEQGRP_USSD key sequence. | |
1477 */ | |
1478 LOCAL BOOL ksd_seqUssd (USHORT inIdx, | |
1479 CHAR* inSeq, | |
1480 T_KSD_SEQGRP* outSeqGrp, | |
1481 CHAR** outRestSeq, | |
1482 T_KSD_SEQPARAM* outSeqParam) | |
1483 { | |
1484 TRACE_FUNCTION ("ksd_seqUssd ()"); | |
1485 | |
1486 outSeqParam->ussd.ussd = (UBYTE *)inSeq; | |
1487 | |
1488 *outSeqGrp = SEQGRP_USSD; | |
1489 *outRestSeq = inSeq + strlen (inSeq); | |
1490 | |
1491 return TRUE; | |
1492 } | |
1493 | |
1494 #ifdef SMI | |
1495 /* | |
1496 +--------------------------------------------------------------------+ | |
1497 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1498 | STATE : code ROUTINE : ksd_seqSetAbbrDial | | |
1499 +--------------------------------------------------------------------+ | |
1500 | |
1501 PURPOSE : This function sets the ouput parameter for the | |
1502 SEQGRP_SET_ABBR_DIAL key sequence. | |
1503 */ | |
1504 LOCAL BOOL ksd_seqSetAbbrDial (USHORT inIdx, | |
1505 CHAR* inSeq, | |
1506 T_KSD_SEQGRP* outSeqGrp, | |
1507 CHAR** outRestSeq, | |
1508 T_KSD_SEQPARAM* outSeqParam) | |
1509 { | |
1510 const USHORT siNum = 2; | |
1511 T_KSD_DCD_CPLE dcdCple[2]; | |
1512 T_KSD_SIPARAM idxParam; | |
1513 T_KSD_SIPARAM dnParam; | |
1514 USHORT readChars; | |
1515 USHORT lenKeySeq = ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
1516 BOOL isSuccess = FALSE; | |
1517 | |
1518 TRACE_FUNCTION ("ksd_seqSetAbbrDial ()"); | |
1519 | |
1520 dcdCple[0].type = SI_BYTE; | |
1521 dcdCple[0].param = &idxParam; | |
1522 | |
1523 dcdCple[1].type = SI_CHAR_STAR; | |
1524 dcdCple[1].param = &dnParam; | |
1525 | |
1526 *outSeqGrp = SEQGRP_SET_ABBR_DIAL; | |
1527 | |
1528 if (ksd_extractSi (inSeq + lenKeySeq, siNum, | |
1529 &readChars, dcdCple) EQ TRUE) | |
1530 { | |
1531 outSeqParam->abbrDial.index = idxParam.siByte; | |
1532 outSeqParam->abbrDial.number = dnParam.siCharStar; | |
1533 | |
1534 isSuccess = TRUE; | |
1535 } | |
1536 | |
1537 *outRestSeq = inSeq + lenKeySeq + readChars; | |
1538 | |
1539 return isSuccess; | |
1540 } | |
1541 #endif | |
1542 | |
1543 /* | |
1544 +--------------------------------------------------------------------+ | |
1545 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1546 | STATE : code ROUTINE : ksd_getCcfcFromDnBsT | | |
1547 +--------------------------------------------------------------------+ | |
1548 | |
1549 PURPOSE : This function extracts the parameters of the sAT_PlusCCFC | |
1550 function of the ACI out of the supplementary information. | |
1551 | |
1552 <inIdx>: index of key sequence table | |
1553 <inSeq>: key sequence, to be decoded | |
1554 <outRestSeq>: rest key sequence, to be decoded by a | |
1555 further call to this function | |
1556 <outSeqParam>: sequence parameter | |
1557 | |
1558 returns: TRUE if output parameters are valid, | |
1559 otherwise FALSE | |
1560 */ | |
1561 LOCAL BOOL ksd_getCcfcFromDnBsT (USHORT inIdx, | |
1562 CHAR* inSeq, | |
1563 CHAR** outRestSeq, | |
1564 T_KSD_SEQPARAM* outSeqParam) | |
1565 { | |
1566 const USHORT siNum = 3; | |
1567 T_KSD_DCD_CPLE dcdCple[3]; | |
1568 T_KSD_SIPARAM dnParam; | |
1569 T_KSD_SIPARAM bsParam; | |
1570 T_KSD_SIPARAM tParam; | |
1571 USHORT readChars; | |
1572 USHORT lenKeySeq = ksd_strlen (keySeqTable[inIdx].keySeq); | |
1573 USHORT lenSubaddr; | |
1574 BOOL international; | |
1575 BOOL isSuccess = FALSE; | |
1576 | |
1577 TRACE_FUNCTION ("ksd_getCcfcFromDnBsT ()"); | |
1578 | |
1579 dcdCple[0].type = SI_CHAR_STAR; | |
1580 dcdCple[0].param = &dnParam; | |
1581 dnParam.siCharStar = NULL; | |
1582 | |
1583 dcdCple[1].type = SI_UBYTE; | |
1584 dcdCple[1].param = &bsParam; | |
1585 bsParam.siUbyte = KSD_BS_None; | |
1586 | |
1587 dcdCple[2].type = SI_UBYTE; | |
1588 dcdCple[2].param = &tParam; | |
1589 tParam.siUbyte = KSD_TIME_NONE; | |
1590 | |
1591 if (ksd_extractSi (inSeq + lenKeySeq, siNum, | |
1592 &readChars, dcdCple) EQ TRUE) | |
1593 { | |
1594 CHAR* dn = dnParam.siCharStar; | |
1595 UBYTE bs = bsParam.siUbyte; | |
1596 UBYTE t = tParam.siUbyte; | |
1597 | |
1598 /* | |
1599 *--------------------------------------------------------------- | |
1600 * process dial number | |
1601 *--------------------------------------------------------------- | |
1602 */ | |
1603 utl_splitDialnumber ( dn, | |
1604 (CHAR**)&outSeqParam->cf.num, | |
1605 &international, | |
1606 (CHAR**)&outSeqParam->cf.sub, | |
1607 &lenSubaddr); | |
1608 | |
1609 /* | |
1610 *--------------------------------------------------------------- | |
1611 * process main address and type of main address | |
1612 *--------------------------------------------------------------- | |
1613 */ | |
1614 if (outSeqParam->cf.num EQ NULL) | |
1615 { | |
1616 outSeqParam->cf.ton = KSD_TON_Unknown; | |
1617 outSeqParam->cf.npi = KSD_NPI_Unknown; | |
1618 } | |
1619 else | |
1620 { | |
1621 outSeqParam->cf.ton = (international ? KSD_TON_International : | |
1622 KSD_TON_Unknown); | |
1623 outSeqParam->cf.npi = KSD_NPI_IsdnTelephony; | |
1624 } | |
1625 | |
1626 /* | |
1627 *--------------------------------------------------------------- | |
1628 * process subaddress and type of subaddress | |
1629 *--------------------------------------------------------------- | |
1630 */ | |
1631 if (outSeqParam->cf.sub EQ NULL) | |
1632 { | |
1633 outSeqParam->cf.tos = KSD_TOS_Nsap; | |
1634 outSeqParam->cf.oe = KSD_OE_Even; | |
1635 } | |
1636 else | |
1637 { | |
1638 outSeqParam->cf.tos = KSD_TOS_Nsap; | |
1639 outSeqParam->cf.oe = ((lenSubaddr % 2 EQ 0) ? KSD_OE_Even : | |
1640 KSD_OE_Odd); | |
1641 } | |
1642 | |
1643 /* | |
1644 *--------------------------------------------------------------- | |
1645 * process class and time | |
1646 *--------------------------------------------------------------- | |
1647 */ | |
1648 outSeqParam->cf.bsCd = bs; | |
1649 outSeqParam->cf.time = t; | |
1650 | |
1651 isSuccess = TRUE; | |
1652 } | |
1653 | |
1654 *outRestSeq = inSeq + lenKeySeq + readChars; | |
1655 | |
1656 return isSuccess; | |
1657 } | |
1658 | |
1659 /* | |
1660 +--------------------------------------------------------------------+ | |
1661 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1662 | STATE : code ROUTINE : ksd_getCcfcFromDnBs | | |
1663 +--------------------------------------------------------------------+ | |
1664 | |
1665 PURPOSE : This function extracts the parameters of the sAT_PlusCCFC | |
1666 function of the ACI out of the supplementary information. | |
1667 | |
1668 <inIdx>: index of key sequence table | |
1669 <inSeq>: key sequence, to be decoded | |
1670 <outRestSeq>: rest key sequence, to be decoded by a | |
1671 further call to this function | |
1672 <outSeqParam>: sequence parameter | |
1673 | |
1674 returns: TRUE if output parameters are valid, | |
1675 otherwise FALSE | |
1676 */ | |
1677 LOCAL BOOL ksd_getCcfcFromDnBs (USHORT inIdx, | |
1678 CHAR* inSeq, | |
1679 CHAR** outRestSeq, | |
1680 T_KSD_SEQPARAM* outSeqParam) | |
1681 { | |
1682 const USHORT siNum = 2; | |
1683 T_KSD_DCD_CPLE dcdCple[2]; | |
1684 T_KSD_SIPARAM dnParam; | |
1685 T_KSD_SIPARAM bsParam; | |
1686 USHORT readChars; | |
1687 USHORT lenKeySeq = ksd_strlen (keySeqTable[inIdx].keySeq); | |
1688 USHORT lenSubaddr; | |
1689 BOOL international; | |
1690 BOOL isSuccess = FALSE; | |
1691 | |
1692 TRACE_FUNCTION ("ksd_getCcfcFromDnBs ()"); | |
1693 | |
1694 dcdCple[0].type = SI_CHAR_STAR; | |
1695 dcdCple[0].param = &dnParam; | |
1696 dnParam.siCharStar = NULL; | |
1697 | |
1698 dcdCple[1].type = SI_UBYTE; | |
1699 dcdCple[1].param = &bsParam; | |
1700 bsParam.siUbyte = KSD_BS_None; | |
1701 | |
1702 if (ksd_extractSi (inSeq + lenKeySeq, siNum, | |
1703 &readChars, dcdCple) EQ TRUE) | |
1704 { | |
1705 CHAR* dn = dnParam.siCharStar; | |
1706 UBYTE bs = bsParam.siUbyte; | |
1707 | |
1708 /* | |
1709 *--------------------------------------------------------------- | |
1710 * process dial number | |
1711 *--------------------------------------------------------------- | |
1712 */ | |
1713 utl_splitDialnumber ( dn, | |
1714 (CHAR**)&outSeqParam->cf.num, | |
1715 &international, | |
1716 (CHAR**)&outSeqParam->cf.sub, | |
1717 &lenSubaddr); | |
1718 | |
1719 /* | |
1720 *--------------------------------------------------------------- | |
1721 * process main address and type of main address | |
1722 *--------------------------------------------------------------- | |
1723 */ | |
1724 if (outSeqParam->cf.num EQ NULL) | |
1725 { | |
1726 outSeqParam->cf.ton = KSD_TON_Unknown; | |
1727 outSeqParam->cf.npi = KSD_NPI_Unknown; | |
1728 } | |
1729 else | |
1730 { | |
1731 outSeqParam->cf.ton = (international ? KSD_TON_International : | |
1732 KSD_TON_Unknown); | |
1733 outSeqParam->cf.npi = KSD_NPI_IsdnTelephony; | |
1734 } | |
1735 | |
1736 /* | |
1737 *--------------------------------------------------------------- | |
1738 * process subaddress and type of subaddress | |
1739 *--------------------------------------------------------------- | |
1740 */ | |
1741 if (outSeqParam->cf.sub EQ NULL) | |
1742 { | |
1743 outSeqParam->cf.tos = KSD_TOS_Nsap; | |
1744 outSeqParam->cf.oe = KSD_OE_Even; | |
1745 } | |
1746 else | |
1747 { | |
1748 outSeqParam->cf.tos = KSD_TOS_Nsap; | |
1749 outSeqParam->cf.oe = ((lenSubaddr % 2 EQ 0) ? KSD_OE_Even : | |
1750 KSD_OE_Odd); | |
1751 } | |
1752 | |
1753 /* | |
1754 *--------------------------------------------------------------- | |
1755 * process class and time | |
1756 *--------------------------------------------------------------- | |
1757 */ | |
1758 outSeqParam->cf.bsCd = bs; | |
1759 outSeqParam->cf.time = KSD_TIME_NONE; | |
1760 | |
1761 isSuccess = TRUE; | |
1762 } | |
1763 | |
1764 *outRestSeq = inSeq + lenKeySeq + readChars; | |
1765 | |
1766 return isSuccess; | |
1767 } | |
1768 | |
1769 /* | |
1770 +--------------------------------------------------------------------+ | |
1771 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1772 | STATE : code ROUTINE : ksd_seqActAllCf | | |
1773 +--------------------------------------------------------------------+ | |
1774 | |
1775 PURPOSE : This function sets the ouput parameter for the | |
1776 SEQGRP_CF, KSD_OP_ACT, KSD_SS_ALL_FWSS key sequence. | |
1777 */ | |
1778 LOCAL BOOL ksd_seqActAllCf (USHORT inIdx, | |
1779 CHAR* inSeq, | |
1780 T_KSD_SEQGRP* outSeqGrp, | |
1781 CHAR** outRestSeq, | |
1782 T_KSD_SEQPARAM* outSeqParam) | |
1783 { | |
1784 BOOL result; | |
1785 | |
1786 TRACE_FUNCTION ("ksd_seqActAllCf ()"); | |
1787 | |
1788 result = ksd_getCcfcFromDnBsT (inIdx, inSeq, outRestSeq, outSeqParam); | |
1789 | |
1790 if ( outSeqParam->cf.num EQ NULL ) | |
1791 outSeqParam->cf.opCd = KSD_OP_ACT; | |
1792 else | |
1793 outSeqParam->cf.opCd = KSD_OP_REG; | |
1794 | |
1795 outSeqParam->cf.ssCd = KSD_SS_ALL_FWSS; | |
1796 | |
1797 *outSeqGrp = SEQGRP_CF; | |
1798 | |
1799 return result; | |
1800 } | |
1801 | |
1802 /* | |
1803 +--------------------------------------------------------------------+ | |
1804 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1805 | STATE : code ROUTINE : ksd_seqDeactAllCf | | |
1806 +--------------------------------------------------------------------+ | |
1807 | |
1808 PURPOSE : This function sets the ouput parameter for the | |
1809 SEQGRP_CF, KSD_OP_DEACT, KSD_SS_ALL_FWSS key sequence. | |
1810 */ | |
1811 LOCAL BOOL ksd_seqDeactAllCf (USHORT inIdx, | |
1812 CHAR* inSeq, | |
1813 T_KSD_SEQGRP* outSeqGrp, | |
1814 CHAR** outRestSeq, | |
1815 T_KSD_SEQPARAM* outSeqParam) | |
1816 { | |
1817 | |
1818 TRACE_FUNCTION ("ksd_seqDeactAllCf ()"); | |
1819 | |
1820 outSeqParam->cf.opCd = KSD_OP_DEACT; | |
1821 outSeqParam->cf.ssCd = KSD_SS_ALL_FWSS; | |
1822 | |
1823 *outSeqGrp = SEQGRP_CF; | |
1824 | |
1825 return ksd_getCcfcFromDnBsT (inIdx, inSeq, outRestSeq, outSeqParam); | |
1826 } | |
1827 | |
1828 /* | |
1829 +--------------------------------------------------------------------+ | |
1830 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1831 | STATE : code ROUTINE : ksd_seqRegAllCf | | |
1832 +--------------------------------------------------------------------+ | |
1833 | |
1834 PURPOSE : This function sets the ouput parameter for the | |
1835 SEQGRP_CF, KSD_OP_REG, KSD_SS_ALL_FWSS key sequence. | |
1836 */ | |
1837 LOCAL BOOL ksd_seqRegAllCf (USHORT inIdx, | |
1838 CHAR* inSeq, | |
1839 T_KSD_SEQGRP* outSeqGrp, | |
1840 CHAR** outRestSeq, | |
1841 T_KSD_SEQPARAM* outSeqParam) | |
1842 { | |
1843 TRACE_FUNCTION ("ksd_seqRegAllCf ()"); | |
1844 | |
1845 outSeqParam->cf.opCd = KSD_OP_REG; | |
1846 outSeqParam->cf.ssCd = KSD_SS_ALL_FWSS; | |
1847 | |
1848 *outSeqGrp = SEQGRP_CF; | |
1849 | |
1850 return ksd_getCcfcFromDnBsT (inIdx, inSeq, outRestSeq, outSeqParam); | |
1851 } | |
1852 | |
1853 /* | |
1854 +--------------------------------------------------------------------+ | |
1855 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1856 | STATE : code ROUTINE : ksd_seqEraseAllCf | | |
1857 +--------------------------------------------------------------------+ | |
1858 | |
1859 PURPOSE : This function sets the ouput parameter for the | |
1860 SEQGRP_CF, KSD_OP_ERS, KSD_SS_ALL_FWSS key sequence. | |
1861 */ | |
1862 LOCAL BOOL ksd_seqEraseAllCf (USHORT inIdx, | |
1863 CHAR* inSeq, | |
1864 T_KSD_SEQGRP* outSeqGrp, | |
1865 CHAR** outRestSeq, | |
1866 T_KSD_SEQPARAM* outSeqParam) | |
1867 { | |
1868 TRACE_FUNCTION ("ksd_seqEraseAllCf ()"); | |
1869 | |
1870 outSeqParam->cf.opCd = KSD_OP_ERS; | |
1871 outSeqParam->cf.ssCd = KSD_SS_ALL_FWSS; | |
1872 | |
1873 *outSeqGrp = SEQGRP_CF; | |
1874 | |
1875 return ksd_getCcfcFromDnBsT (inIdx, inSeq, outRestSeq, outSeqParam); | |
1876 } | |
1877 | |
1878 /* | |
1879 +--------------------------------------------------------------------+ | |
1880 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1881 | STATE : code ROUTINE : ksd_seqIntrgtAllCf | | |
1882 +--------------------------------------------------------------------+ | |
1883 | |
1884 PURPOSE : This function sets the ouput parameter for the | |
1885 SEQGRP_CF, KSD_OP_IRGT, KSD_SS_ALL_FWSS key sequence. | |
1886 */ | |
1887 LOCAL BOOL ksd_seqIntrgtAllCf (USHORT inIdx, | |
1888 CHAR* inSeq, | |
1889 T_KSD_SEQGRP* outSeqGrp, | |
1890 CHAR** outRestSeq, | |
1891 T_KSD_SEQPARAM* outSeqParam) | |
1892 { | |
1893 TRACE_FUNCTION ("ksd_seqIntrgtAllCf ()"); | |
1894 | |
1895 outSeqParam->cf.opCd = KSD_OP_IRGT; | |
1896 outSeqParam->cf.ssCd = KSD_SS_ALL_FWSS; | |
1897 | |
1898 *outSeqGrp = SEQGRP_CF; | |
1899 | |
1900 return ksd_getCcfcFromDnBsT (inIdx, inSeq, outRestSeq, outSeqParam); | |
1901 } | |
1902 | |
1903 /* | |
1904 +--------------------------------------------------------------------+ | |
1905 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1906 | STATE : code ROUTINE : ksd_seqActAllCondCf | | |
1907 +--------------------------------------------------------------------+ | |
1908 | |
1909 PURPOSE : This function sets the ouput parameter for the | |
1910 SEQGRP_CF, KSD_OP_ACT, KSD_SS_ALL_CFWSS key sequence. | |
1911 */ | |
1912 LOCAL BOOL ksd_seqActAllCondCf (USHORT inIdx, | |
1913 CHAR* inSeq, | |
1914 T_KSD_SEQGRP* outSeqGrp, | |
1915 CHAR** outRestSeq, | |
1916 T_KSD_SEQPARAM* outSeqParam) | |
1917 { | |
1918 BOOL result; | |
1919 | |
1920 TRACE_FUNCTION ("ksd_seqActAllCondCf ()"); | |
1921 | |
1922 result = ksd_getCcfcFromDnBsT (inIdx, inSeq, outRestSeq, outSeqParam); | |
1923 | |
1924 if ( outSeqParam->cf.num EQ NULL ) | |
1925 outSeqParam->cf.opCd = KSD_OP_ACT; | |
1926 else | |
1927 outSeqParam->cf.opCd = KSD_OP_REG; | |
1928 | |
1929 outSeqParam->cf.ssCd = KSD_SS_ALL_CFWSS; | |
1930 | |
1931 *outSeqGrp = SEQGRP_CF; | |
1932 | |
1933 return result; | |
1934 } | |
1935 | |
1936 /* | |
1937 +--------------------------------------------------------------------+ | |
1938 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1939 | STATE : code ROUTINE : ksd_seqDeactAllCondCf | | |
1940 +--------------------------------------------------------------------+ | |
1941 | |
1942 PURPOSE : This function sets the ouput parameter for the | |
1943 SEQGRP_CF, KSD_OP_DEACT, KSD_SS_ALL_CFWSS key sequence. | |
1944 */ | |
1945 LOCAL BOOL ksd_seqDeactAllCondCf (USHORT inIdx, | |
1946 CHAR* inSeq, | |
1947 T_KSD_SEQGRP* outSeqGrp, | |
1948 CHAR** outRestSeq, | |
1949 T_KSD_SEQPARAM* outSeqParam) | |
1950 { | |
1951 TRACE_FUNCTION ("ksd_seqDeactAllCondCf ()"); | |
1952 | |
1953 outSeqParam->cf.opCd = KSD_OP_DEACT; | |
1954 outSeqParam->cf.ssCd = KSD_SS_ALL_CFWSS; | |
1955 | |
1956 *outSeqGrp = SEQGRP_CF; | |
1957 | |
1958 return ksd_getCcfcFromDnBsT (inIdx, inSeq, outRestSeq, outSeqParam); | |
1959 } | |
1960 | |
1961 /* | |
1962 +--------------------------------------------------------------------+ | |
1963 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1964 | STATE : code ROUTINE : ksd_seqRegAllCondCf | | |
1965 +--------------------------------------------------------------------+ | |
1966 | |
1967 PURPOSE : This function sets the ouput parameter for the | |
1968 SEQGRP_CF, KSD_OP_REG, KSD_SS_ALL_CFWSS key sequence. | |
1969 */ | |
1970 LOCAL BOOL ksd_seqRegAllCondCf (USHORT inIdx, | |
1971 CHAR* inSeq, | |
1972 T_KSD_SEQGRP* outSeqGrp, | |
1973 CHAR** outRestSeq, | |
1974 T_KSD_SEQPARAM* outSeqParam) | |
1975 { | |
1976 TRACE_FUNCTION ("ksd_seqRegAllCondCf ()"); | |
1977 | |
1978 outSeqParam->cf.opCd = KSD_OP_REG; | |
1979 outSeqParam->cf.ssCd = KSD_SS_ALL_CFWSS; | |
1980 | |
1981 *outSeqGrp = SEQGRP_CF; | |
1982 | |
1983 return ksd_getCcfcFromDnBsT (inIdx, inSeq, outRestSeq, outSeqParam); | |
1984 } | |
1985 | |
1986 /* | |
1987 +--------------------------------------------------------------------+ | |
1988 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
1989 | STATE : code ROUTINE : ksd_seqEraseAllCondCf | | |
1990 +--------------------------------------------------------------------+ | |
1991 | |
1992 PURPOSE : This function sets the ouput parameter for the | |
1993 SEQGRP_CF, KSD_OP_ERS, KSD_SS_ALL_CFWSS key sequence. | |
1994 */ | |
1995 LOCAL BOOL ksd_seqEraseAllCondCf (USHORT inIdx, | |
1996 CHAR* inSeq, | |
1997 T_KSD_SEQGRP* outSeqGrp, | |
1998 CHAR** outRestSeq, | |
1999 T_KSD_SEQPARAM* outSeqParam) | |
2000 { | |
2001 TRACE_FUNCTION ("ksd_seqEraseAllCondCf ()"); | |
2002 | |
2003 outSeqParam->cf.opCd = KSD_OP_ERS; | |
2004 outSeqParam->cf.ssCd = KSD_SS_ALL_CFWSS; | |
2005 | |
2006 *outSeqGrp = SEQGRP_CF; | |
2007 | |
2008 return ksd_getCcfcFromDnBsT (inIdx, inSeq, outRestSeq, outSeqParam); | |
2009 } | |
2010 | |
2011 /* | |
2012 +--------------------------------------------------------------------+ | |
2013 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2014 | STATE : code ROUTINE : ksd_seqIntrgtAllCondCf | | |
2015 +--------------------------------------------------------------------+ | |
2016 | |
2017 PURPOSE : This function sets the ouput parameter for the | |
2018 SEQGRP_CF, KSD_OP_IRGT, KSD_SS_ALL_CFWSS key sequence. | |
2019 */ | |
2020 LOCAL BOOL ksd_seqIntrgtAllCondCf (USHORT inIdx, | |
2021 CHAR* inSeq, | |
2022 T_KSD_SEQGRP* outSeqGrp, | |
2023 CHAR** outRestSeq, | |
2024 T_KSD_SEQPARAM* outSeqParam) | |
2025 { | |
2026 TRACE_FUNCTION ("ksd_seqIntrgtAllCondCf ()"); | |
2027 | |
2028 outSeqParam->cf.opCd = KSD_OP_IRGT; | |
2029 outSeqParam->cf.ssCd = KSD_SS_ALL_CFWSS; | |
2030 | |
2031 *outSeqGrp = SEQGRP_CF; | |
2032 | |
2033 return ksd_getCcfcFromDnBsT (inIdx, inSeq, outRestSeq, outSeqParam); | |
2034 } | |
2035 | |
2036 /* | |
2037 +--------------------------------------------------------------------+ | |
2038 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2039 | STATE : code ROUTINE : ksd_seqActNoRepCf | | |
2040 +--------------------------------------------------------------------+ | |
2041 | |
2042 PURPOSE : This function sets the ouput parameter for the | |
2043 SEQGRP_CF, KSD_OP_ACT, KSD_SS_CFNRY key sequence. | |
2044 */ | |
2045 LOCAL BOOL ksd_seqActNoRepCf (USHORT inIdx, | |
2046 CHAR* inSeq, | |
2047 T_KSD_SEQGRP* outSeqGrp, | |
2048 CHAR** outRestSeq, | |
2049 T_KSD_SEQPARAM* outSeqParam) | |
2050 { | |
2051 BOOL result; | |
2052 | |
2053 TRACE_FUNCTION ("ksd_seqActNoRepCf ()"); | |
2054 | |
2055 result = ksd_getCcfcFromDnBsT (inIdx, inSeq, outRestSeq, outSeqParam); | |
2056 | |
2057 if ( outSeqParam->cf.num EQ NULL ) | |
2058 outSeqParam->cf.opCd = KSD_OP_ACT; | |
2059 else | |
2060 outSeqParam->cf.opCd = KSD_OP_REG; | |
2061 | |
2062 outSeqParam->cf.ssCd = KSD_SS_CFNRY; | |
2063 | |
2064 *outSeqGrp = SEQGRP_CF; | |
2065 | |
2066 return result; | |
2067 } | |
2068 | |
2069 /* | |
2070 +--------------------------------------------------------------------+ | |
2071 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2072 | STATE : code ROUTINE : ksd_seqDeactNoRepCf | | |
2073 +--------------------------------------------------------------------+ | |
2074 | |
2075 PURPOSE : This function sets the ouput parameter for the | |
2076 SEQGRP_CF, KSD_OP_DEACT, KSD_SS_CFNRY key sequence. | |
2077 */ | |
2078 LOCAL BOOL ksd_seqDeactNoRepCf (USHORT inIdx, | |
2079 CHAR* inSeq, | |
2080 T_KSD_SEQGRP* outSeqGrp, | |
2081 CHAR** outRestSeq, | |
2082 T_KSD_SEQPARAM* outSeqParam) | |
2083 { | |
2084 TRACE_FUNCTION ("ksd_seqDeactNoRepCf ()"); | |
2085 | |
2086 outSeqParam->cf.opCd = KSD_OP_DEACT; | |
2087 outSeqParam->cf.ssCd = KSD_SS_CFNRY; | |
2088 | |
2089 *outSeqGrp = SEQGRP_CF; | |
2090 | |
2091 return ksd_getCcfcFromDnBsT (inIdx, inSeq, outRestSeq, outSeqParam); | |
2092 } | |
2093 | |
2094 /* | |
2095 +--------------------------------------------------------------------+ | |
2096 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2097 | STATE : code ROUTINE : ksd_seqRegNoRepCf | | |
2098 +--------------------------------------------------------------------+ | |
2099 | |
2100 PURPOSE : This function sets the ouput parameter for the | |
2101 SEQGRP_CF, KSD_OP_REG, KSD_SS_CFNRY key sequence. | |
2102 */ | |
2103 LOCAL BOOL ksd_seqRegNoRepCf (USHORT inIdx, | |
2104 CHAR* inSeq, | |
2105 T_KSD_SEQGRP* outSeqGrp, | |
2106 CHAR** outRestSeq, | |
2107 T_KSD_SEQPARAM* outSeqParam) | |
2108 { | |
2109 //TISH, patch for OMAPS00124821 | |
2110 //start | |
2111 #if 0 | |
2112 TRACE_FUNCTION ("ksd_seqRegNoRepCf ()"); | |
2113 | |
2114 outSeqParam->cf.opCd = KSD_OP_REG; | |
2115 outSeqParam->cf.ssCd = KSD_SS_CFNRY; | |
2116 | |
2117 *outSeqGrp = SEQGRP_CF; | |
2118 | |
2119 return ksd_getCcfcFromDnBsT (inIdx, inSeq, outRestSeq, outSeqParam); | |
2120 #else | |
2121 BOOL result; | |
2122 char *tempInSeq; | |
2123 TRACE_FUNCTION ("ksd_seqRegNoRepCf ()"); | |
2124 MALLOC(tempInSeq,strlen(inSeq)+1); | |
2125 strcpy(tempInSeq,inSeq); | |
2126 result=ksd_getCcfcFromDnBsT (inIdx, inSeq, outRestSeq, outSeqParam); | |
2127 if (result==TRUE) | |
2128 { | |
2129 //TISH patch for OMAPS00129224 | |
2130 //start | |
2131 // if (outSeqParam->cf.time>30 || outSeqParam->cf.time<5) | |
2132 if ((outSeqParam->cf.time != KSD_TIME_NONE) && (outSeqParam->cf.time>30 || outSeqParam->cf.time<5)) | |
2133 //end | |
2134 { | |
2135 memset(&(outSeqParam->cf),0,sizeof(T_ACI_KSD_CF_PRM)); | |
2136 strcpy(inSeq,tempInSeq); | |
2137 result = ksd_seqUssd (inIdx, | |
2138 inSeq, | |
2139 outSeqGrp, | |
2140 outRestSeq, | |
2141 outSeqParam); | |
2142 } | |
2143 else | |
2144 { | |
2145 outSeqParam->cf.opCd = KSD_OP_REG; | |
2146 outSeqParam->cf.ssCd = KSD_SS_CFNRY; | |
2147 *outSeqGrp = SEQGRP_CF; | |
2148 } | |
2149 } | |
2150 MFREE(tempInSeq); | |
2151 return result; | |
2152 #endif | |
2153 //end | |
2154 } | |
2155 | |
2156 /* | |
2157 +--------------------------------------------------------------------+ | |
2158 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2159 | STATE : code ROUTINE : ksd_seqEraseNoRepCf | | |
2160 +--------------------------------------------------------------------+ | |
2161 | |
2162 PURPOSE : This function sets the ouput parameter for the | |
2163 SEQGRP_CF, KSD_OP_ERS, KSD_SS_CFNRY key sequence. | |
2164 */ | |
2165 LOCAL BOOL ksd_seqEraseNoRepCf (USHORT inIdx, | |
2166 CHAR* inSeq, | |
2167 T_KSD_SEQGRP* outSeqGrp, | |
2168 CHAR** outRestSeq, | |
2169 T_KSD_SEQPARAM* outSeqParam) | |
2170 { | |
2171 TRACE_FUNCTION ("ksd_seqEraseNoRepCf ()"); | |
2172 | |
2173 outSeqParam->cf.opCd = KSD_OP_ERS; | |
2174 outSeqParam->cf.ssCd = KSD_SS_CFNRY; | |
2175 | |
2176 *outSeqGrp = SEQGRP_CF; | |
2177 | |
2178 return ksd_getCcfcFromDnBsT (inIdx, inSeq, outRestSeq, outSeqParam); | |
2179 } | |
2180 | |
2181 /* | |
2182 +--------------------------------------------------------------------+ | |
2183 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2184 | STATE : code ROUTINE : ksd_seqIntrgtNoRepCf | | |
2185 +--------------------------------------------------------------------+ | |
2186 | |
2187 PURPOSE : This function sets the ouput parameter for the | |
2188 SEQGRP_CF, KSD_OP_IRGT, KSD_SS_CFNRY key sequence. | |
2189 */ | |
2190 LOCAL BOOL ksd_seqIntrgtNoRepCf (USHORT inIdx, | |
2191 CHAR* inSeq, | |
2192 T_KSD_SEQGRP* outSeqGrp, | |
2193 CHAR** outRestSeq, | |
2194 T_KSD_SEQPARAM* outSeqParam) | |
2195 { | |
2196 TRACE_FUNCTION ("ksd_seqIntrgtNoRepCf ()"); | |
2197 | |
2198 outSeqParam->cf.opCd = KSD_OP_IRGT; | |
2199 outSeqParam->cf.ssCd = KSD_SS_CFNRY; | |
2200 | |
2201 *outSeqGrp = SEQGRP_CF; | |
2202 | |
2203 return ksd_getCcfcFromDnBsT (inIdx, inSeq, outRestSeq, outSeqParam); | |
2204 } | |
2205 | |
2206 /* | |
2207 +--------------------------------------------------------------------+ | |
2208 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2209 | STATE : code ROUTINE : ksd_seqActUncondCf | | |
2210 +--------------------------------------------------------------------+ | |
2211 | |
2212 PURPOSE : This function sets the ouput parameter for the | |
2213 SEQGRP_CF, KSD_OP_ACT, KSD_SS_CFU key sequence. | |
2214 */ | |
2215 LOCAL BOOL ksd_seqActUncondCf (USHORT inIdx, | |
2216 CHAR* inSeq, | |
2217 T_KSD_SEQGRP* outSeqGrp, | |
2218 CHAR** outRestSeq, | |
2219 T_KSD_SEQPARAM* outSeqParam) | |
2220 { | |
2221 BOOL result; | |
2222 | |
2223 TRACE_FUNCTION ("ksd_seqActUncondCf ()"); | |
2224 | |
2225 result = ksd_getCcfcFromDnBs (inIdx, inSeq, outRestSeq, outSeqParam); | |
2226 | |
2227 if ( outSeqParam->cf.num EQ NULL ) | |
2228 outSeqParam->cf.opCd = KSD_OP_ACT; | |
2229 else | |
2230 outSeqParam->cf.opCd = KSD_OP_REG; | |
2231 | |
2232 outSeqParam->cf.ssCd = KSD_SS_CFU; | |
2233 | |
2234 *outSeqGrp = SEQGRP_CF; | |
2235 | |
2236 return result; | |
2237 } | |
2238 | |
2239 /* | |
2240 +--------------------------------------------------------------------+ | |
2241 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2242 | STATE : code ROUTINE : ksd_seqDeactUncondCf | | |
2243 +--------------------------------------------------------------------+ | |
2244 | |
2245 PURPOSE : This function sets the ouput parameter for the | |
2246 SEQGRP_CF, KSD_OP_DEACT, KSD_SS_CFU key sequence. | |
2247 */ | |
2248 LOCAL BOOL ksd_seqDeactUncondCf (USHORT inIdx, | |
2249 CHAR* inSeq, | |
2250 T_KSD_SEQGRP* outSeqGrp, | |
2251 CHAR** outRestSeq, | |
2252 T_KSD_SEQPARAM* outSeqParam) | |
2253 { | |
2254 TRACE_FUNCTION ("ksd_seqDeactUncondCf ()"); | |
2255 | |
2256 outSeqParam->cf.opCd = KSD_OP_DEACT; | |
2257 outSeqParam->cf.ssCd = KSD_SS_CFU; | |
2258 | |
2259 *outSeqGrp = SEQGRP_CF; | |
2260 | |
2261 return ksd_getCcfcFromDnBs (inIdx, inSeq, outRestSeq, outSeqParam); | |
2262 } | |
2263 | |
2264 /* | |
2265 +--------------------------------------------------------------------+ | |
2266 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2267 | STATE : code ROUTINE : ksd_seqRegUncondCf | | |
2268 +--------------------------------------------------------------------+ | |
2269 | |
2270 PURPOSE : This function sets the ouput parameter for the | |
2271 SEQGRP_CF, KSD_OP_REG, KSD_SS_CFU key sequence. | |
2272 */ | |
2273 LOCAL BOOL ksd_seqRegUncondCf (USHORT inIdx, | |
2274 CHAR* inSeq, | |
2275 T_KSD_SEQGRP* outSeqGrp, | |
2276 CHAR** outRestSeq, | |
2277 T_KSD_SEQPARAM* outSeqParam) | |
2278 { | |
2279 TRACE_FUNCTION ("ksd_seqRegUncondCf ()"); | |
2280 | |
2281 outSeqParam->cf.opCd = KSD_OP_REG; | |
2282 outSeqParam->cf.ssCd = KSD_SS_CFU; | |
2283 | |
2284 *outSeqGrp = SEQGRP_CF; | |
2285 | |
2286 return ksd_getCcfcFromDnBs (inIdx, inSeq, outRestSeq, outSeqParam); | |
2287 } | |
2288 | |
2289 /* | |
2290 +--------------------------------------------------------------------+ | |
2291 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2292 | STATE : code ROUTINE : ksd_seqEraseUncondCf | | |
2293 +--------------------------------------------------------------------+ | |
2294 | |
2295 PURPOSE : This function sets the ouput parameter for the | |
2296 SEQGRP_CF, KSD_OP_ERS, KSD_SS_CFU key sequence. | |
2297 */ | |
2298 LOCAL BOOL ksd_seqEraseUncondCf (USHORT inIdx, | |
2299 CHAR* inSeq, | |
2300 T_KSD_SEQGRP* outSeqGrp, | |
2301 CHAR** outRestSeq, | |
2302 T_KSD_SEQPARAM* outSeqParam) | |
2303 { | |
2304 TRACE_FUNCTION ("ksd_seqEraseUncondCf ()"); | |
2305 | |
2306 outSeqParam->cf.opCd = KSD_OP_ERS; | |
2307 outSeqParam->cf.ssCd = KSD_SS_CFU; | |
2308 | |
2309 *outSeqGrp = SEQGRP_CF; | |
2310 | |
2311 return ksd_getCcfcFromDnBs (inIdx, inSeq, outRestSeq, outSeqParam); | |
2312 } | |
2313 | |
2314 /* | |
2315 +--------------------------------------------------------------------+ | |
2316 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2317 | STATE : code ROUTINE : ksd_seqIntrgtUncondCf | | |
2318 +--------------------------------------------------------------------+ | |
2319 | |
2320 PURPOSE : This function sets the ouput parameter for the | |
2321 SEQGRP_CF, KSD_OP_IRGT, KSD_SS_CFU key sequence. | |
2322 */ | |
2323 LOCAL BOOL ksd_seqIntrgtUncondCf (USHORT inIdx, | |
2324 CHAR* inSeq, | |
2325 T_KSD_SEQGRP* outSeqGrp, | |
2326 CHAR** outRestSeq, | |
2327 T_KSD_SEQPARAM* outSeqParam) | |
2328 { | |
2329 TRACE_FUNCTION ("ksd_seqIntrgtUncondCf ()"); | |
2330 | |
2331 outSeqParam->cf.opCd = KSD_OP_IRGT; | |
2332 outSeqParam->cf.ssCd = KSD_SS_CFU; | |
2333 | |
2334 *outSeqGrp = SEQGRP_CF; | |
2335 | |
2336 return ksd_getCcfcFromDnBs (inIdx, inSeq, outRestSeq, outSeqParam); | |
2337 } | |
2338 | |
2339 /* | |
2340 +--------------------------------------------------------------------+ | |
2341 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2342 | STATE : code ROUTINE : ksd_seqActBusyCf | | |
2343 +--------------------------------------------------------------------+ | |
2344 | |
2345 PURPOSE : This function sets the ouput parameter for the | |
2346 SEQGRP_CF, KSD_OP_ACT, KSD_SS_CFB key sequence. | |
2347 */ | |
2348 LOCAL BOOL ksd_seqActBusyCf (USHORT inIdx, | |
2349 CHAR* inSeq, | |
2350 T_KSD_SEQGRP* outSeqGrp, | |
2351 CHAR** outRestSeq, | |
2352 T_KSD_SEQPARAM* outSeqParam) | |
2353 { | |
2354 BOOL result; | |
2355 | |
2356 TRACE_FUNCTION ("ksd_seqActBusyCf ()"); | |
2357 | |
2358 result = ksd_getCcfcFromDnBs (inIdx, inSeq, outRestSeq, outSeqParam); | |
2359 | |
2360 if ( outSeqParam->cf.num EQ NULL ) | |
2361 outSeqParam->cf.opCd = KSD_OP_ACT; | |
2362 else | |
2363 outSeqParam->cf.opCd = KSD_OP_REG; | |
2364 | |
2365 outSeqParam->cf.ssCd = KSD_SS_CFB; | |
2366 | |
2367 *outSeqGrp = SEQGRP_CF; | |
2368 | |
2369 return result; | |
2370 } | |
2371 | |
2372 /* | |
2373 +--------------------------------------------------------------------+ | |
2374 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2375 | STATE : code ROUTINE : ksd_seqDeactBusyCf | | |
2376 +--------------------------------------------------------------------+ | |
2377 | |
2378 PURPOSE : This function sets the ouput parameter for the | |
2379 SEQGRP_CF, KSD_OP_DEACT, KSD_SS_CFB key sequence. | |
2380 */ | |
2381 LOCAL BOOL ksd_seqDeactBusyCf (USHORT inIdx, | |
2382 CHAR* inSeq, | |
2383 T_KSD_SEQGRP* outSeqGrp, | |
2384 CHAR** outRestSeq, | |
2385 T_KSD_SEQPARAM* outSeqParam) | |
2386 { | |
2387 TRACE_FUNCTION ("ksd_seqDeactBusyCf ()"); | |
2388 | |
2389 outSeqParam->cf.opCd = KSD_OP_DEACT; | |
2390 outSeqParam->cf.ssCd = KSD_SS_CFB; | |
2391 | |
2392 *outSeqGrp = SEQGRP_CF; | |
2393 | |
2394 return ksd_getCcfcFromDnBs (inIdx, inSeq, outRestSeq, outSeqParam); | |
2395 } | |
2396 | |
2397 /* | |
2398 +--------------------------------------------------------------------+ | |
2399 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2400 | STATE : code ROUTINE : ksd_seqRegBusyCf | | |
2401 +--------------------------------------------------------------------+ | |
2402 | |
2403 PURPOSE : This function sets the ouput parameter for the | |
2404 SEQGRP_CF, KSD_OP_REG, KSD_SS_CFB key sequence. | |
2405 */ | |
2406 LOCAL BOOL ksd_seqRegBusyCf (USHORT inIdx, | |
2407 CHAR* inSeq, | |
2408 T_KSD_SEQGRP* outSeqGrp, | |
2409 CHAR** outRestSeq, | |
2410 T_KSD_SEQPARAM* outSeqParam) | |
2411 { | |
2412 TRACE_FUNCTION ("ksd_seqRegBusyCf ()"); | |
2413 | |
2414 outSeqParam->cf.opCd = KSD_OP_REG; | |
2415 outSeqParam->cf.ssCd = KSD_SS_CFB; | |
2416 | |
2417 *outSeqGrp = SEQGRP_CF; | |
2418 | |
2419 return ksd_getCcfcFromDnBs (inIdx, inSeq, outRestSeq, outSeqParam); | |
2420 } | |
2421 | |
2422 /* | |
2423 +--------------------------------------------------------------------+ | |
2424 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2425 | STATE : code ROUTINE : ksd_seqEraseBusyCf | | |
2426 +--------------------------------------------------------------------+ | |
2427 | |
2428 PURPOSE : This function sets the ouput parameter for the | |
2429 SEQGRP_CF, KSD_OP_ERS, KSD_SS_CFB key sequence. | |
2430 */ | |
2431 LOCAL BOOL ksd_seqEraseBusyCf (USHORT inIdx, | |
2432 CHAR* inSeq, | |
2433 T_KSD_SEQGRP* outSeqGrp, | |
2434 CHAR** outRestSeq, | |
2435 T_KSD_SEQPARAM* outSeqParam) | |
2436 { | |
2437 TRACE_FUNCTION ("ksd_seqEraseBusyCf ()"); | |
2438 | |
2439 outSeqParam->cf.opCd = KSD_OP_ERS; | |
2440 outSeqParam->cf.ssCd = KSD_SS_CFB; | |
2441 | |
2442 *outSeqGrp = SEQGRP_CF; | |
2443 | |
2444 return ksd_getCcfcFromDnBs (inIdx, inSeq, outRestSeq, outSeqParam); | |
2445 } | |
2446 | |
2447 /* | |
2448 +--------------------------------------------------------------------+ | |
2449 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2450 | STATE : code ROUTINE : ksd_seqIntrgtBusyCf | | |
2451 +--------------------------------------------------------------------+ | |
2452 | |
2453 PURPOSE : This function sets the ouput parameter for the | |
2454 SEQGRP_CF, KSD_OP_IRGT, KSD_SS_CFB key sequence. | |
2455 */ | |
2456 LOCAL BOOL ksd_seqIntrgtBusyCf (USHORT inIdx, | |
2457 CHAR* inSeq, | |
2458 T_KSD_SEQGRP* outSeqGrp, | |
2459 CHAR** outRestSeq, | |
2460 T_KSD_SEQPARAM* outSeqParam) | |
2461 { | |
2462 TRACE_FUNCTION ("ksd_seqIntrgtBusyCf ()"); | |
2463 | |
2464 outSeqParam->cf.opCd = KSD_OP_IRGT; | |
2465 outSeqParam->cf.ssCd = KSD_SS_CFB; | |
2466 | |
2467 *outSeqGrp = SEQGRP_CF; | |
2468 | |
2469 return ksd_getCcfcFromDnBs (inIdx, inSeq, outRestSeq, outSeqParam); | |
2470 } | |
2471 | |
2472 /* | |
2473 +--------------------------------------------------------------------+ | |
2474 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2475 | STATE : code ROUTINE : ksd_seqActNotReachCf | | |
2476 +--------------------------------------------------------------------+ | |
2477 | |
2478 PURPOSE : This function sets the ouput parameter for the | |
2479 SEQGRP_CF, KSD_OP_ACT, KSD_SS_CFNRC key sequence. | |
2480 */ | |
2481 LOCAL BOOL ksd_seqActNotReachCf (USHORT inIdx, | |
2482 CHAR* inSeq, | |
2483 T_KSD_SEQGRP* outSeqGrp, | |
2484 CHAR** outRestSeq, | |
2485 T_KSD_SEQPARAM* outSeqParam) | |
2486 { | |
2487 BOOL result; | |
2488 | |
2489 TRACE_FUNCTION ("ksd_seqActNotReachCf ()"); | |
2490 | |
2491 result = ksd_getCcfcFromDnBs (inIdx, inSeq, outRestSeq, outSeqParam); | |
2492 | |
2493 if ( outSeqParam->cf.num EQ NULL ) | |
2494 outSeqParam->cf.opCd = KSD_OP_ACT; | |
2495 else | |
2496 outSeqParam->cf.opCd = KSD_OP_REG; | |
2497 | |
2498 outSeqParam->cf.ssCd = KSD_SS_CFNRC; | |
2499 | |
2500 *outSeqGrp = SEQGRP_CF; | |
2501 | |
2502 return result; | |
2503 } | |
2504 | |
2505 /* | |
2506 +--------------------------------------------------------------------+ | |
2507 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2508 | STATE : code ROUTINE : ksd_seqDeactNotReachCf | | |
2509 +--------------------------------------------------------------------+ | |
2510 | |
2511 PURPOSE : This function sets the ouput parameter for the | |
2512 SEQGRP_CF, KSD_OP_DEACT, KSD_SS_CFNRC key sequence. | |
2513 */ | |
2514 LOCAL BOOL ksd_seqDeactNotReachCf (USHORT inIdx, | |
2515 CHAR* inSeq, | |
2516 T_KSD_SEQGRP* outSeqGrp, | |
2517 CHAR** outRestSeq, | |
2518 T_KSD_SEQPARAM* outSeqParam) | |
2519 { | |
2520 TRACE_FUNCTION ("ksd_seqDeactNotReachCf ()"); | |
2521 | |
2522 outSeqParam->cf.opCd = KSD_OP_DEACT; | |
2523 outSeqParam->cf.ssCd = KSD_SS_CFNRC; | |
2524 | |
2525 *outSeqGrp = SEQGRP_CF; | |
2526 | |
2527 return ksd_getCcfcFromDnBs (inIdx, inSeq, outRestSeq, outSeqParam); | |
2528 } | |
2529 | |
2530 /* | |
2531 +--------------------------------------------------------------------+ | |
2532 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2533 | STATE : code ROUTINE : ksd_seqRegNotReachCf | | |
2534 +--------------------------------------------------------------------+ | |
2535 | |
2536 PURPOSE : This function sets the ouput parameter for the | |
2537 SEQGRP_CF, KSD_OP_REG, KSD_SS_CFNRC key sequence. | |
2538 */ | |
2539 LOCAL BOOL ksd_seqRegNotReachCf (USHORT inIdx, | |
2540 CHAR* inSeq, | |
2541 T_KSD_SEQGRP* outSeqGrp, | |
2542 CHAR** outRestSeq, | |
2543 T_KSD_SEQPARAM* outSeqParam) | |
2544 { | |
2545 TRACE_FUNCTION ("ksd_seqRegNotReachCf ()"); | |
2546 | |
2547 outSeqParam->cf.opCd = KSD_OP_REG; | |
2548 outSeqParam->cf.ssCd = KSD_SS_CFNRC; | |
2549 | |
2550 *outSeqGrp = SEQGRP_CF; | |
2551 | |
2552 return ksd_getCcfcFromDnBs (inIdx, inSeq, outRestSeq, outSeqParam); | |
2553 } | |
2554 | |
2555 /* | |
2556 +--------------------------------------------------------------------+ | |
2557 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2558 | STATE : code ROUTINE : ksd_seqEraseNotReachCf | | |
2559 +--------------------------------------------------------------------+ | |
2560 | |
2561 PURPOSE : This function sets the ouput parameter for the | |
2562 SEQGRP_CF, KSD_OP_ERS, KSD_SS_CFNRC key sequence. | |
2563 */ | |
2564 LOCAL BOOL ksd_seqEraseNotReachCf (USHORT inIdx, | |
2565 CHAR* inSeq, | |
2566 T_KSD_SEQGRP* outSeqGrp, | |
2567 CHAR** outRestSeq, | |
2568 T_KSD_SEQPARAM* outSeqParam) | |
2569 { | |
2570 TRACE_FUNCTION ("ksd_seqEraseNotReachCf ()"); | |
2571 | |
2572 outSeqParam->cf.opCd = KSD_OP_ERS; | |
2573 outSeqParam->cf.ssCd = KSD_SS_CFNRC; | |
2574 | |
2575 *outSeqGrp = SEQGRP_CF; | |
2576 | |
2577 return ksd_getCcfcFromDnBs (inIdx, inSeq, outRestSeq, outSeqParam); | |
2578 } | |
2579 | |
2580 /* | |
2581 +--------------------------------------------------------------------+ | |
2582 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2583 | STATE : code ROUTINE : ksd_seqIntrgtNotReachCf | | |
2584 +--------------------------------------------------------------------+ | |
2585 | |
2586 PURPOSE : This function sets the ouput parameter for the | |
2587 SEQGRP_CF, KSD_OP_IRGT, KSD_SS_CFNRC key sequence. | |
2588 */ | |
2589 LOCAL BOOL ksd_seqIntrgtNotReachCf (USHORT inIdx, | |
2590 CHAR* inSeq, | |
2591 T_KSD_SEQGRP* outSeqGrp, | |
2592 CHAR** outRestSeq, | |
2593 T_KSD_SEQPARAM* outSeqParam) | |
2594 { | |
2595 TRACE_FUNCTION ("ksd_seqIntrgtNotReachCf ()"); | |
2596 | |
2597 outSeqParam->cf.opCd = KSD_OP_IRGT; | |
2598 outSeqParam->cf.ssCd = KSD_SS_CFNRC; | |
2599 | |
2600 *outSeqGrp = SEQGRP_CF; | |
2601 | |
2602 return ksd_getCcfcFromDnBs (inIdx, inSeq, outRestSeq, outSeqParam); | |
2603 } | |
2604 | |
2605 /* | |
2606 +--------------------------------------------------------------------+ | |
2607 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2608 | STATE : code ROUTINE : ksd_getClckFromPwBs | | |
2609 +--------------------------------------------------------------------+ | |
2610 | |
2611 PURPOSE : This function extracts the parameters of the sAT_PlusCLCK | |
2612 function of the ACI out of the supplementary information. | |
2613 | |
2614 <inIdx>: index of key sequence table | |
2615 <inSeq>: key sequence, to be decoded | |
2616 <inGsm>: indicates whether this SSC group is | |
2617 GSM standard | |
2618 <outRestSeq>: rest key sequence, to be decoded by a | |
2619 further call to this function | |
2620 <outSeqParam>: sequence parameter | |
2621 | |
2622 returns: TRUE if output parameters are valid, | |
2623 otherwise FALSE | |
2624 */ | |
2625 LOCAL BOOL ksd_getClckFromPwBs (USHORT inIdx, | |
2626 CHAR* inSeq, | |
2627 BOOL inGsm, | |
2628 CHAR** outRestSeq, | |
2629 T_KSD_SEQPARAM* outSeqParam) | |
2630 { | |
2631 const USHORT siNum = 2; | |
2632 T_KSD_DCD_CPLE dcdCple[2]; | |
2633 T_KSD_SIPARAM pwParam; | |
2634 T_KSD_SIPARAM bsParam; | |
2635 USHORT readChars = 0; | |
2636 USHORT lenKeySeq; | |
2637 BOOL isSuccess = FALSE; | |
2638 | |
2639 TRACE_FUNCTION ("ksd_getClckFromPwBs ()"); | |
2640 | |
2641 lenKeySeq = (inGsm ? ksd_strlen (keyPasswd[inIdx].keySeq) : | |
2642 ksd_strlen (keyPasswdNonGsm[inIdx].keySeq)); | |
2643 | |
2644 dcdCple[0].type = SI_CHAR_STAR; | |
2645 dcdCple[0].param = &pwParam; | |
2646 pwParam.siCharStar = NULL; | |
2647 | |
2648 dcdCple[1].type = SI_UBYTE; | |
2649 dcdCple[1].param = &bsParam; | |
2650 bsParam.siUbyte = KSD_BS_None; | |
2651 | |
2652 if(*(inSeq+lenKeySeq) EQ STOP_SEQ OR | |
2653 *(inSeq+lenKeySeq+1) EQ 0x00) | |
2654 { | |
2655 /* no password given, eg a query, where it is not needed */ | |
2656 TRACE_EVENT("ss code for password but none given"); | |
2657 outSeqParam->cb.pwd = 0x00; | |
2658 outSeqParam->cb.bsCd = bsParam.siUbyte; | |
2659 | |
2660 isSuccess = TRUE; | |
2661 } | |
2662 else if (ksd_extractSi (inSeq + lenKeySeq, siNum, | |
2663 &readChars, dcdCple) EQ TRUE) | |
2664 { | |
2665 outSeqParam->cb.pwd = (UBYTE*)pwParam.siCharStar; | |
2666 outSeqParam->cb.bsCd = bsParam.siUbyte; | |
2667 | |
2668 isSuccess = TRUE; | |
2669 } | |
2670 | |
2671 *outRestSeq = inSeq + lenKeySeq + readChars; | |
2672 | |
2673 return isSuccess; | |
2674 } | |
2675 | |
2676 /* | |
2677 +--------------------------------------------------------------------+ | |
2678 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2679 | STATE : code ROUTINE : ksd_seqActSimLock | | |
2680 +--------------------------------------------------------------------+ | |
2681 | |
2682 PURPOSE : This function sets the ouput parameter for the | |
2683 SEQGRP_ACT_SIM_LOCK key sequence. | |
2684 */ | |
2685 LOCAL BOOL ksd_seqActSimLock (USHORT inIdx, | |
2686 CHAR* inSeq, | |
2687 T_KSD_SEQGRP* outSeqGrp, | |
2688 CHAR** outRestSeq, | |
2689 T_KSD_SEQPARAM* outSeqParam) | |
2690 { | |
2691 TRACE_FUNCTION ("ksd_seqActSimLock ()"); | |
2692 | |
2693 outSeqParam->clck.fac = FAC_Sc; | |
2694 outSeqParam->clck.mode = CLCK_MOD_Lock; | |
2695 | |
2696 *outSeqGrp = SEQGRP_ACT_SIM_LOCK; | |
2697 | |
2698 return ksd_getClckFromPwBs (inIdx, inSeq, FALSE, outRestSeq, outSeqParam); | |
2699 } | |
2700 | |
2701 /* | |
2702 +--------------------------------------------------------------------+ | |
2703 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2704 | STATE : code ROUTINE : ksd_seqDeactSimLock | | |
2705 +--------------------------------------------------------------------+ | |
2706 | |
2707 PURPOSE : This function sets the ouput parameter for the | |
2708 SEQGRP_DEACT_SIM_LOCK key sequence. | |
2709 */ | |
2710 LOCAL BOOL ksd_seqDeactSimLock (USHORT inIdx, | |
2711 CHAR* inSeq, | |
2712 T_KSD_SEQGRP* outSeqGrp, | |
2713 CHAR** outRestSeq, | |
2714 T_KSD_SEQPARAM* outSeqParam) | |
2715 { | |
2716 TRACE_FUNCTION ("ksd_seqDeactSimLock ()"); | |
2717 | |
2718 outSeqParam->clck.fac = FAC_Sc; | |
2719 outSeqParam->clck.mode = CLCK_MOD_Unlock; | |
2720 | |
2721 *outSeqGrp = SEQGRP_DEACT_SIM_LOCK; | |
2722 | |
2723 return ksd_getClckFromPwBs (inIdx, inSeq, FALSE, outRestSeq, outSeqParam); | |
2724 } | |
2725 | |
2726 /* | |
2727 +--------------------------------------------------------------------+ | |
2728 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2729 | STATE : code ROUTINE : ksd_seqIntrgtSimLock | | |
2730 +--------------------------------------------------------------------+ | |
2731 | |
2732 PURPOSE : This function sets the ouput parameter for the | |
2733 SEQGRP_INTRGT_SIM_LOCK key sequence. | |
2734 */ | |
2735 LOCAL BOOL ksd_seqIntrgtSimLock (USHORT inIdx, | |
2736 CHAR* inSeq, | |
2737 T_KSD_SEQGRP* outSeqGrp, | |
2738 CHAR** outRestSeq, | |
2739 T_KSD_SEQPARAM* outSeqParam) | |
2740 { | |
2741 TRACE_FUNCTION ("ksd_seqIntrgtSimLock ()"); | |
2742 | |
2743 *outSeqGrp = SEQGRP_INTRGT_SIM_LOCK; | |
2744 *outRestSeq = inSeq + ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
2745 | |
2746 outSeqParam->clck_query.fac = FAC_Sc; | |
2747 | |
2748 return TRUE; | |
2749 } | |
2750 | |
2751 | |
2752 /* | |
2753 +--------------------------------------------------------------------+ | |
2754 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2755 | STATE : code ROUTINE : ksd_seqDeactOutBarrServ | | |
2756 +--------------------------------------------------------------------+ | |
2757 | |
2758 PURPOSE : This function sets the ouput parameter for the | |
2759 SEQGRP_CB, KSD_OP_DEACT, KSD_SS_BOC key sequence. | |
2760 */ | |
2761 LOCAL BOOL ksd_seqDeactOutBarrServ (USHORT inIdx, | |
2762 CHAR* inSeq, | |
2763 T_KSD_SEQGRP* outSeqGrp, | |
2764 CHAR** outRestSeq, | |
2765 T_KSD_SEQPARAM* outSeqParam) | |
2766 { | |
2767 TRACE_FUNCTION ("ksd_seqDeactOutBarrServ ()"); | |
2768 | |
2769 outSeqParam->cb.opCd = KSD_OP_DEACT; | |
2770 outSeqParam->cb.ssCd = KSD_SS_BOC; | |
2771 | |
2772 *outSeqGrp = SEQGRP_CB; | |
2773 | |
2774 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
2775 } | |
2776 | |
2777 | |
2778 /* | |
2779 +--------------------------------------------------------------------+ | |
2780 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2781 | STATE : code ROUTINE : ksd_seqActBaoicExcHome | | |
2782 +--------------------------------------------------------------------+ | |
2783 | |
2784 PURPOSE : This function sets the ouput parameter for the | |
2785 SEQGRP_CB, KSD_OP_ACT, KSD_SS_BOICXH key sequence. | |
2786 */ | |
2787 LOCAL BOOL ksd_seqActBaoicExcHome (USHORT inIdx, | |
2788 CHAR* inSeq, | |
2789 T_KSD_SEQGRP* outSeqGrp, | |
2790 CHAR** outRestSeq, | |
2791 T_KSD_SEQPARAM* outSeqParam) | |
2792 { | |
2793 TRACE_FUNCTION ("ksd_seqActBaoicExcHome ()"); | |
2794 | |
2795 outSeqParam->cb.opCd = KSD_OP_ACT; | |
2796 outSeqParam->cb.ssCd = KSD_SS_BOICXH; | |
2797 | |
2798 *outSeqGrp = SEQGRP_CB; | |
2799 | |
2800 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
2801 } | |
2802 | |
2803 /* | |
2804 +--------------------------------------------------------------------+ | |
2805 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2806 | STATE : code ROUTINE : ksd_seqDeactBaoicExcHome | | |
2807 +--------------------------------------------------------------------+ | |
2808 | |
2809 PURPOSE : This function sets the ouput parameter for the | |
2810 SEQGRP_CB, KSD_OP_DEACT, KSD_SS_BOICXH key sequence. | |
2811 */ | |
2812 LOCAL BOOL ksd_seqDeactBaoicExcHome (USHORT inIdx, | |
2813 CHAR* inSeq, | |
2814 T_KSD_SEQGRP* outSeqGrp, | |
2815 CHAR** outRestSeq, | |
2816 T_KSD_SEQPARAM* outSeqParam) | |
2817 { | |
2818 TRACE_FUNCTION ("ksd_seqDeactBaoicExcHome ()"); | |
2819 | |
2820 outSeqParam->cb.opCd = KSD_OP_DEACT; | |
2821 outSeqParam->cb.ssCd = KSD_SS_BOICXH; | |
2822 | |
2823 *outSeqGrp = SEQGRP_CB; | |
2824 | |
2825 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
2826 } | |
2827 | |
2828 /* | |
2829 +--------------------------------------------------------------------+ | |
2830 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2831 | STATE : code ROUTINE : ksd_seqIntrgtBaoicExcHome| | |
2832 +--------------------------------------------------------------------+ | |
2833 | |
2834 PURPOSE : This function sets the ouput parameter for the | |
2835 SEQGRP_CB, KSD_OP_IRGT, KSD_SS_BOICXH key sequence. | |
2836 */ | |
2837 LOCAL BOOL ksd_seqIntrgtBaoicExcHome (USHORT inIdx, | |
2838 CHAR* inSeq, | |
2839 T_KSD_SEQGRP* outSeqGrp, | |
2840 CHAR** outRestSeq, | |
2841 T_KSD_SEQPARAM* outSeqParam) | |
2842 { | |
2843 TRACE_FUNCTION ("ksd_seqIntrgtBaoicExcHome ()"); | |
2844 | |
2845 outSeqParam->cb.opCd = KSD_OP_IRGT; | |
2846 outSeqParam->cb.ssCd = KSD_SS_BOICXH; | |
2847 | |
2848 *outSeqGrp = SEQGRP_CB; | |
2849 | |
2850 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
2851 } | |
2852 | |
2853 /* | |
2854 +--------------------------------------------------------------------+ | |
2855 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2856 | STATE : code ROUTINE : ksd_seqActBaoic | | |
2857 +--------------------------------------------------------------------+ | |
2858 | |
2859 PURPOSE : This function sets the ouput parameter for the | |
2860 SEQGRP_CB, KSD_OP_ACT, KSD_SS_BOIC key sequence. | |
2861 */ | |
2862 LOCAL BOOL ksd_seqActBaoic (USHORT inIdx, | |
2863 CHAR* inSeq, | |
2864 T_KSD_SEQGRP* outSeqGrp, | |
2865 CHAR** outRestSeq, | |
2866 T_KSD_SEQPARAM* outSeqParam) | |
2867 { | |
2868 TRACE_FUNCTION ("ksd_seqActBaoic ()"); | |
2869 | |
2870 outSeqParam->cb.opCd = KSD_OP_ACT; | |
2871 outSeqParam->cb.ssCd = KSD_SS_BOIC; | |
2872 | |
2873 *outSeqGrp = SEQGRP_CB; | |
2874 | |
2875 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
2876 } | |
2877 | |
2878 /* | |
2879 +--------------------------------------------------------------------+ | |
2880 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2881 | STATE : code ROUTINE : ksd_seqDeactBaoic | | |
2882 +--------------------------------------------------------------------+ | |
2883 | |
2884 PURPOSE : This function sets the ouput parameter for the | |
2885 SEQGRP_CB, KSD_OP_DEACT, KSD_SS_BOIC key sequence. | |
2886 */ | |
2887 LOCAL BOOL ksd_seqDeactBaoic (USHORT inIdx, | |
2888 CHAR* inSeq, | |
2889 T_KSD_SEQGRP* outSeqGrp, | |
2890 CHAR** outRestSeq, | |
2891 T_KSD_SEQPARAM* outSeqParam) | |
2892 { | |
2893 TRACE_FUNCTION ("ksd_seqDeactBaoic ()"); | |
2894 | |
2895 outSeqParam->cb.opCd = KSD_OP_DEACT; | |
2896 outSeqParam->cb.ssCd = KSD_SS_BOIC; | |
2897 | |
2898 *outSeqGrp = SEQGRP_CB; | |
2899 | |
2900 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
2901 } | |
2902 | |
2903 /* | |
2904 +--------------------------------------------------------------------+ | |
2905 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2906 | STATE : code ROUTINE : ksd_seqIntrgtBaoic | | |
2907 +--------------------------------------------------------------------+ | |
2908 | |
2909 PURPOSE : This function sets the ouput parameter for the | |
2910 SEQGRP_CB, KSD_OP_IRGT, KSD_SS_BOIC key sequence. | |
2911 */ | |
2912 LOCAL BOOL ksd_seqIntrgtBaoic (USHORT inIdx, | |
2913 CHAR* inSeq, | |
2914 T_KSD_SEQGRP* outSeqGrp, | |
2915 CHAR** outRestSeq, | |
2916 T_KSD_SEQPARAM* outSeqParam) | |
2917 { | |
2918 TRACE_FUNCTION ("ksd_seqIntrgtBaoic ()"); | |
2919 | |
2920 outSeqParam->cb.opCd = KSD_OP_IRGT; | |
2921 outSeqParam->cb.ssCd = KSD_SS_BOIC; | |
2922 | |
2923 *outSeqGrp = SEQGRP_CB; | |
2924 | |
2925 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
2926 } | |
2927 | |
2928 | |
2929 /* | |
2930 +--------------------------------------------------------------------+ | |
2931 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2932 | STATE : code ROUTINE : ksd_seqDeactAllBarrServ | | |
2933 +--------------------------------------------------------------------+ | |
2934 | |
2935 PURPOSE : This function sets the ouput parameter for the | |
2936 SEQGRP_CB, KSD_OP_DEACT, KSD_SS_ALL_CBSS key sequence. | |
2937 */ | |
2938 LOCAL BOOL ksd_seqDeactAllBarrServ (USHORT inIdx, | |
2939 CHAR* inSeq, | |
2940 T_KSD_SEQGRP* outSeqGrp, | |
2941 CHAR** outRestSeq, | |
2942 T_KSD_SEQPARAM* outSeqParam) | |
2943 { | |
2944 TRACE_FUNCTION ("ksd_seqDeactAllBarrServ ()"); | |
2945 | |
2946 outSeqParam->cb.opCd = KSD_OP_DEACT; | |
2947 outSeqParam->cb.ssCd = KSD_SS_ALL_CBSS; | |
2948 | |
2949 *outSeqGrp = SEQGRP_CB; | |
2950 | |
2951 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
2952 } | |
2953 | |
2954 /* | |
2955 +--------------------------------------------------------------------+ | |
2956 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2957 | STATE : code ROUTINE : ksd_seqActBaoc | | |
2958 +--------------------------------------------------------------------+ | |
2959 | |
2960 PURPOSE : This function sets the ouput parameter for the | |
2961 SEQGRP_CB, KSD_OP_ACT, KSD_SS_BAOC key sequence. | |
2962 */ | |
2963 LOCAL BOOL ksd_seqActBaoc (USHORT inIdx, | |
2964 CHAR* inSeq, | |
2965 T_KSD_SEQGRP* outSeqGrp, | |
2966 CHAR** outRestSeq, | |
2967 T_KSD_SEQPARAM* outSeqParam) | |
2968 { | |
2969 TRACE_FUNCTION ("ksd_seqActBaoc ()"); | |
2970 | |
2971 outSeqParam->cb.opCd = KSD_OP_ACT; | |
2972 outSeqParam->cb.ssCd = KSD_SS_BAOC; | |
2973 | |
2974 *outSeqGrp = SEQGRP_CB; | |
2975 | |
2976 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
2977 } | |
2978 | |
2979 /* | |
2980 +--------------------------------------------------------------------+ | |
2981 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
2982 | STATE : code ROUTINE : ksd_seqDeactBaoc | | |
2983 +--------------------------------------------------------------------+ | |
2984 | |
2985 PURPOSE : This function sets the ouput parameter for the | |
2986 SEQGRP_CB, KSD_OP_DEACT, KSD_SS_BAOC key sequence. | |
2987 */ | |
2988 LOCAL BOOL ksd_seqDeactBaoc (USHORT inIdx, | |
2989 CHAR* inSeq, | |
2990 T_KSD_SEQGRP* outSeqGrp, | |
2991 CHAR** outRestSeq, | |
2992 T_KSD_SEQPARAM* outSeqParam) | |
2993 { | |
2994 TRACE_FUNCTION ("ksd_seqDeactBaoc ()"); | |
2995 | |
2996 outSeqParam->cb.opCd = KSD_OP_DEACT; | |
2997 outSeqParam->cb.ssCd = KSD_SS_BAOC; | |
2998 | |
2999 *outSeqGrp = SEQGRP_CB; | |
3000 | |
3001 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
3002 } | |
3003 | |
3004 /* | |
3005 +--------------------------------------------------------------------+ | |
3006 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3007 | STATE : code ROUTINE : ksd_seqIntrgtBaoc | | |
3008 +--------------------------------------------------------------------+ | |
3009 | |
3010 PURPOSE : This function sets the ouput parameter for the | |
3011 SEQGRP_CB, KSD_OP_IRGT, KSD_SS_BAOC key sequence. | |
3012 */ | |
3013 LOCAL BOOL ksd_seqIntrgtBaoc (USHORT inIdx, | |
3014 CHAR* inSeq, | |
3015 T_KSD_SEQGRP* outSeqGrp, | |
3016 CHAR** outRestSeq, | |
3017 T_KSD_SEQPARAM* outSeqParam) | |
3018 { | |
3019 TRACE_FUNCTION ("ksd_seqIntrgtBaoc ()"); | |
3020 | |
3021 outSeqParam->cb.opCd = KSD_OP_IRGT; | |
3022 outSeqParam->cb.ssCd = KSD_SS_BAOC; | |
3023 | |
3024 *outSeqGrp = SEQGRP_CB; | |
3025 | |
3026 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
3027 } | |
3028 | |
3029 | |
3030 /* | |
3031 +--------------------------------------------------------------------+ | |
3032 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3033 | STATE : code ROUTINE : ksd_seqDeactInBarrServ | | |
3034 +--------------------------------------------------------------------+ | |
3035 | |
3036 PURPOSE : This function sets the ouput parameter for the | |
3037 SEQGRP_CB, KSD_OP_DEACT, KSD_SS_BIC key sequence. | |
3038 */ | |
3039 LOCAL BOOL ksd_seqDeactInBarrServ (USHORT inIdx, | |
3040 CHAR* inSeq, | |
3041 T_KSD_SEQGRP* outSeqGrp, | |
3042 CHAR** outRestSeq, | |
3043 T_KSD_SEQPARAM* outSeqParam) | |
3044 { | |
3045 TRACE_FUNCTION ("ksd_seqDeactInBarrServ ()"); | |
3046 | |
3047 outSeqParam->cb.opCd = KSD_OP_DEACT; | |
3048 outSeqParam->cb.ssCd = KSD_SS_BIC; | |
3049 | |
3050 *outSeqGrp = SEQGRP_CB; | |
3051 | |
3052 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
3053 } | |
3054 | |
3055 | |
3056 /* | |
3057 +--------------------------------------------------------------------+ | |
3058 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3059 | STATE : code ROUTINE : ksd_seqActBaicRoam | | |
3060 +--------------------------------------------------------------------+ | |
3061 | |
3062 PURPOSE : This function sets the ouput parameter for the | |
3063 SEQGRP_CB, KSD_OP_ACT, KSD_SS_BICRM key sequence. | |
3064 */ | |
3065 LOCAL BOOL ksd_seqActBaicRoam (USHORT inIdx, | |
3066 CHAR* inSeq, | |
3067 T_KSD_SEQGRP* outSeqGrp, | |
3068 CHAR** outRestSeq, | |
3069 T_KSD_SEQPARAM* outSeqParam) | |
3070 { | |
3071 TRACE_FUNCTION ("ksd_seqActBaicRoam ()"); | |
3072 | |
3073 outSeqParam->cb.opCd = KSD_OP_ACT; | |
3074 outSeqParam->cb.ssCd = KSD_SS_BICRM; | |
3075 | |
3076 *outSeqGrp = SEQGRP_CB; | |
3077 | |
3078 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
3079 } | |
3080 | |
3081 /* | |
3082 +--------------------------------------------------------------------+ | |
3083 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3084 | STATE : code ROUTINE : ksd_seqDeactBaicRoam | | |
3085 +--------------------------------------------------------------------+ | |
3086 | |
3087 PURPOSE : This function sets the ouput parameter for the | |
3088 SEQGRP_CB, KSD_OP_DEACT, KSD_SS_BICRM key sequence. | |
3089 */ | |
3090 LOCAL BOOL ksd_seqDeactBaicRoam (USHORT inIdx, | |
3091 CHAR* inSeq, | |
3092 T_KSD_SEQGRP* outSeqGrp, | |
3093 CHAR** outRestSeq, | |
3094 T_KSD_SEQPARAM* outSeqParam) | |
3095 { | |
3096 TRACE_FUNCTION ("ksd_seqDeactBaicRoam ()"); | |
3097 | |
3098 outSeqParam->cb.opCd = KSD_OP_DEACT; | |
3099 outSeqParam->cb.ssCd = KSD_SS_BICRM; | |
3100 | |
3101 *outSeqGrp = SEQGRP_CB; | |
3102 | |
3103 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
3104 } | |
3105 | |
3106 /* | |
3107 +--------------------------------------------------------------------+ | |
3108 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3109 | STATE : code ROUTINE : ksd_seqIntrgtBaicRoam | | |
3110 +--------------------------------------------------------------------+ | |
3111 | |
3112 PURPOSE : This function sets the ouput parameter for the | |
3113 SEQGRP_CB, KSD_OP_IRGT, KSD_SS_BICRM key sequence. | |
3114 */ | |
3115 LOCAL BOOL ksd_seqIntrgtBaicRoam (USHORT inIdx, | |
3116 CHAR* inSeq, | |
3117 T_KSD_SEQGRP* outSeqGrp, | |
3118 CHAR** outRestSeq, | |
3119 T_KSD_SEQPARAM* outSeqParam) | |
3120 { | |
3121 TRACE_FUNCTION ("ksd_seqIntrgtBaicRoam ()"); | |
3122 | |
3123 outSeqParam->cb.opCd = KSD_OP_IRGT; | |
3124 outSeqParam->cb.ssCd = KSD_SS_BICRM; | |
3125 | |
3126 *outSeqGrp = SEQGRP_CB; | |
3127 | |
3128 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
3129 } | |
3130 | |
3131 /* | |
3132 +--------------------------------------------------------------------+ | |
3133 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3134 | STATE : code ROUTINE : ksd_seqActBaic | | |
3135 +--------------------------------------------------------------------+ | |
3136 | |
3137 PURPOSE : This function sets the ouput parameter for the | |
3138 SEQGRP_CB, KSD_OP_ACT, KSD_SS_BAIC key sequence. | |
3139 */ | |
3140 LOCAL BOOL ksd_seqActBaic (USHORT inIdx, | |
3141 CHAR* inSeq, | |
3142 T_KSD_SEQGRP* outSeqGrp, | |
3143 CHAR** outRestSeq, | |
3144 T_KSD_SEQPARAM* outSeqParam) | |
3145 { | |
3146 TRACE_FUNCTION ("ksd_seqActBaic ()"); | |
3147 | |
3148 outSeqParam->cb.opCd = KSD_OP_ACT; | |
3149 outSeqParam->cb.ssCd = KSD_SS_BAIC; | |
3150 | |
3151 *outSeqGrp = SEQGRP_CB; | |
3152 | |
3153 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
3154 } | |
3155 | |
3156 /* | |
3157 +--------------------------------------------------------------------+ | |
3158 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3159 | STATE : code ROUTINE : ksd_seqDeactBaic | | |
3160 +--------------------------------------------------------------------+ | |
3161 | |
3162 PURPOSE : This function sets the ouput parameter for the | |
3163 SEQGRP_CB, KSD_OP_DEACT, KSD_SS_BAIC key sequence. | |
3164 */ | |
3165 LOCAL BOOL ksd_seqDeactBaic (USHORT inIdx, | |
3166 CHAR* inSeq, | |
3167 T_KSD_SEQGRP* outSeqGrp, | |
3168 CHAR** outRestSeq, | |
3169 T_KSD_SEQPARAM* outSeqParam) | |
3170 { | |
3171 TRACE_FUNCTION ("ksd_seqDeactBaic ()"); | |
3172 | |
3173 outSeqParam->cb.opCd = KSD_OP_DEACT; | |
3174 outSeqParam->cb.ssCd = KSD_SS_BAIC; | |
3175 | |
3176 *outSeqGrp = SEQGRP_CB; | |
3177 | |
3178 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
3179 } | |
3180 | |
3181 /* | |
3182 +--------------------------------------------------------------------+ | |
3183 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3184 | STATE : code ROUTINE : ksd_seqIntrgtBaic | | |
3185 +--------------------------------------------------------------------+ | |
3186 | |
3187 PURPOSE : This function sets the ouput parameter for the | |
3188 SEQGRP_CB, KSD_OP_IRGT, KSD_SS_BAIC key sequence. | |
3189 */ | |
3190 LOCAL BOOL ksd_seqIntrgtBaic (USHORT inIdx, | |
3191 CHAR* inSeq, | |
3192 T_KSD_SEQGRP* outSeqGrp, | |
3193 CHAR** outRestSeq, | |
3194 T_KSD_SEQPARAM* outSeqParam) | |
3195 { | |
3196 TRACE_FUNCTION ("ksd_seqIntrgtBaic ()"); | |
3197 | |
3198 outSeqParam->cb.opCd = KSD_OP_IRGT; | |
3199 outSeqParam->cb.ssCd = KSD_SS_BAIC; | |
3200 | |
3201 *outSeqGrp = SEQGRP_CB; | |
3202 | |
3203 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
3204 } | |
3205 | |
3206 /* | |
3207 +--------------------------------------------------------------------+ | |
3208 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3209 | STATE : code ROUTINE : ksd_seqIntrgtClir | | |
3210 +--------------------------------------------------------------------+ | |
3211 | |
3212 PURPOSE : This function sets the ouput parameter for the | |
3213 SEQGRP_CL, KSD_OP_IRGT, KSD_SS_CLIR key sequence. | |
3214 */ | |
3215 LOCAL BOOL ksd_seqIntrgtClir (USHORT inIdx, | |
3216 CHAR* inSeq, | |
3217 T_KSD_SEQGRP* outSeqGrp, | |
3218 CHAR** outRestSeq, | |
3219 T_KSD_SEQPARAM* outSeqParam) | |
3220 { | |
3221 TRACE_FUNCTION ("ksd_seqIntrgtClir ()"); | |
3222 | |
3223 outSeqParam->cb.opCd = KSD_OP_IRGT; | |
3224 outSeqParam->cb.ssCd = KSD_SS_CLIR; | |
3225 | |
3226 *outSeqGrp = SEQGRP_CL; | |
3227 | |
3228 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
3229 | |
3230 return TRUE; | |
3231 } | |
3232 | |
3233 | |
3234 | |
3235 /* | |
3236 +--------------------------------------------------------------------+ | |
3237 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3238 | STATE : code ROUTINE : ksd_seqSupClir | | |
3239 +--------------------------------------------------------------------+ | |
3240 | |
3241 PURPOSE : This function sets the ouput parameter for the | |
3242 SEQGRP_SUP_CLIR key sequence. | |
3243 */ | |
3244 LOCAL BOOL ksd_seqSupClir (USHORT inIdx, | |
3245 CHAR* inSeq, | |
3246 T_KSD_SEQGRP* outSeqGrp, | |
3247 CHAR** outRestSeq, | |
3248 T_KSD_SEQPARAM* outSeqParam) | |
3249 { | |
3250 TRACE_FUNCTION ("ksd_seqSupClir ()"); | |
3251 | |
3252 *outSeqGrp = SEQGRP_SUP_CLIR; | |
3253 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
3254 | |
3255 outSeqParam->Clir.mode = CLIR_MOD_Supp; | |
3256 | |
3257 return TRUE; | |
3258 } | |
3259 | |
3260 /* | |
3261 +--------------------------------------------------------------------+ | |
3262 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3263 | STATE : code ROUTINE : ksd_seqInvClir | | |
3264 +--------------------------------------------------------------------+ | |
3265 | |
3266 PURPOSE : This function sets the ouput parameter for the | |
3267 SEQGRP_INV_CLIR key sequence. | |
3268 */ | |
3269 LOCAL BOOL ksd_seqInvClir (USHORT inIdx, | |
3270 CHAR* inSeq, | |
3271 T_KSD_SEQGRP* outSeqGrp, | |
3272 CHAR** outRestSeq, | |
3273 T_KSD_SEQPARAM* outSeqParam) | |
3274 { | |
3275 TRACE_FUNCTION ("ksd_seqInvClir ()"); | |
3276 | |
3277 *outSeqGrp = SEQGRP_INV_CLIR; | |
3278 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
3279 | |
3280 outSeqParam->Clir.mode = CLIR_MOD_Invoc; | |
3281 | |
3282 return TRUE; | |
3283 } | |
3284 | |
3285 /* | |
3286 +--------------------------------------------------------------------+ | |
3287 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3288 | STATE : code ROUTINE : ksd_seqIntrgtClip | | |
3289 +--------------------------------------------------------------------+ | |
3290 | |
3291 PURPOSE : This function sets the ouput parameter for the | |
3292 SEQGRP_CL, KSD_OP_IRGT, KSD_SS_CLIP key sequence. | |
3293 */ | |
3294 LOCAL BOOL ksd_seqIntrgtClip (USHORT inIdx, | |
3295 CHAR* inSeq, | |
3296 T_KSD_SEQGRP* outSeqGrp, | |
3297 CHAR** outRestSeq, | |
3298 T_KSD_SEQPARAM* outSeqParam) | |
3299 { | |
3300 TRACE_FUNCTION ("ksd_seqIntrgtClip ()"); | |
3301 | |
3302 outSeqParam->cb.opCd = KSD_OP_IRGT; | |
3303 outSeqParam->cb.ssCd = KSD_SS_CLIP; | |
3304 | |
3305 *outSeqGrp = SEQGRP_CL; | |
3306 | |
3307 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
3308 | |
3309 return TRUE; | |
3310 } | |
3311 | |
3312 /* | |
3313 +--------------------------------------------------------------------+ | |
3314 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3315 | STATE : code ROUTINE : ksd_seqSupClip | | |
3316 +--------------------------------------------------------------------+ | |
3317 | |
3318 PURPOSE : This function sets the ouput parameter for the | |
3319 SEQGRP_SUP_CLIP key sequence. | |
3320 */ | |
3321 LOCAL BOOL ksd_seqSupClip (USHORT inIdx, | |
3322 CHAR* inSeq, | |
3323 T_KSD_SEQGRP* outSeqGrp, | |
3324 CHAR** outRestSeq, | |
3325 T_KSD_SEQPARAM* outSeqParam) | |
3326 { | |
3327 TRACE_FUNCTION ("ksd_seqSupClip ()"); | |
3328 | |
3329 *outSeqGrp = SEQGRP_SUP_CLIP; | |
3330 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
3331 | |
3332 outSeqParam->Clip.mode = CLIP_MOD_Disable; | |
3333 | |
3334 return TRUE; | |
3335 } | |
3336 | |
3337 /* | |
3338 +--------------------------------------------------------------------+ | |
3339 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3340 | STATE : code ROUTINE : ksd_seqInvClip | | |
3341 +--------------------------------------------------------------------+ | |
3342 | |
3343 PURPOSE : This function sets the ouput parameter for the | |
3344 SEQGRP_INV_CLIP key sequence. | |
3345 */ | |
3346 LOCAL BOOL ksd_seqInvClip (USHORT inIdx, | |
3347 CHAR* inSeq, | |
3348 T_KSD_SEQGRP* outSeqGrp, | |
3349 CHAR** outRestSeq, | |
3350 T_KSD_SEQPARAM* outSeqParam) | |
3351 { | |
3352 TRACE_FUNCTION ("ksd_seqInvClip ()"); | |
3353 | |
3354 *outSeqGrp = SEQGRP_INV_CLIP; | |
3355 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
3356 | |
3357 outSeqParam->Clip.mode = CLIP_MOD_Enable; | |
3358 | |
3359 return TRUE; | |
3360 } | |
3361 | |
3362 /* | |
3363 +--------------------------------------------------------------------+ | |
3364 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3365 | STATE : code ROUTINE : ksd_seqIntrgtColr | | |
3366 +--------------------------------------------------------------------+ | |
3367 | |
3368 PURPOSE : This function sets the ouput parameter for the | |
3369 SEQGRP_CL, KSD_OP_IRGT, KSD_SS_COLR key sequence. | |
3370 */ | |
3371 LOCAL BOOL ksd_seqIntrgtColr (USHORT inIdx, | |
3372 CHAR* inSeq, | |
3373 T_KSD_SEQGRP* outSeqGrp, | |
3374 CHAR** outRestSeq, | |
3375 T_KSD_SEQPARAM* outSeqParam) | |
3376 { | |
3377 TRACE_FUNCTION ("ksd_seqIntrgtColr ()"); | |
3378 | |
3379 outSeqParam->cb.opCd = KSD_OP_IRGT; | |
3380 outSeqParam->cb.ssCd = KSD_SS_COLR; | |
3381 | |
3382 *outSeqGrp = SEQGRP_CL; | |
3383 | |
3384 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
3385 | |
3386 return TRUE; | |
3387 } | |
3388 | |
3389 /* | |
3390 +--------------------------------------------------------------------+ | |
3391 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3392 | STATE : code ROUTINE : ksd_seqSupColr | | |
3393 +--------------------------------------------------------------------+ | |
3394 | |
3395 PURPOSE : This function sets the ouput parameter for the | |
3396 SEQGRP_SUP_COLR key sequence. | |
3397 */ | |
3398 LOCAL BOOL ksd_seqSupColr (USHORT inIdx, | |
3399 CHAR* inSeq, | |
3400 T_KSD_SEQGRP* outSeqGrp, | |
3401 CHAR** outRestSeq, | |
3402 T_KSD_SEQPARAM* outSeqParam) | |
3403 { | |
3404 TRACE_FUNCTION ("ksd_seqSupColr ()"); | |
3405 | |
3406 *outSeqGrp = SEQGRP_SUP_COLR; | |
3407 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
3408 | |
3409 return TRUE; | |
3410 } | |
3411 | |
3412 /* | |
3413 +--------------------------------------------------------------------+ | |
3414 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3415 | STATE : code ROUTINE : ksd_seqInvColr | | |
3416 +--------------------------------------------------------------------+ | |
3417 | |
3418 PURPOSE : This function sets the ouput parameter for the | |
3419 SEQGRP_INV_COLR key sequence. | |
3420 */ | |
3421 LOCAL BOOL ksd_seqInvColr (USHORT inIdx, | |
3422 CHAR* inSeq, | |
3423 T_KSD_SEQGRP* outSeqGrp, | |
3424 CHAR** outRestSeq, | |
3425 T_KSD_SEQPARAM* outSeqParam) | |
3426 { | |
3427 TRACE_FUNCTION ("ksd_seqInvColr ()"); | |
3428 | |
3429 *outSeqGrp = SEQGRP_INV_COLR; | |
3430 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
3431 | |
3432 return TRUE; | |
3433 } | |
3434 | |
3435 /* | |
3436 +--------------------------------------------------------------------+ | |
3437 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3438 | STATE : code ROUTINE : ksd_seqIntrgtColp | | |
3439 +--------------------------------------------------------------------+ | |
3440 | |
3441 PURPOSE : This function sets the ouput parameter for the | |
3442 SEQGRP_CL, KSD_OP_IRGT, KSD_SS_COLP key sequence. | |
3443 */ | |
3444 LOCAL BOOL ksd_seqIntrgtColp (USHORT inIdx, | |
3445 CHAR* inSeq, | |
3446 T_KSD_SEQGRP* outSeqGrp, | |
3447 CHAR** outRestSeq, | |
3448 T_KSD_SEQPARAM* outSeqParam) | |
3449 { | |
3450 TRACE_FUNCTION ("ksd_seqIntrgtColp ()"); | |
3451 | |
3452 outSeqParam->cb.opCd = KSD_OP_IRGT; | |
3453 outSeqParam->cb.ssCd = KSD_SS_COLP; | |
3454 | |
3455 *outSeqGrp = SEQGRP_CL; | |
3456 | |
3457 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
3458 | |
3459 return TRUE; | |
3460 } | |
3461 | |
3462 /* | |
3463 +--------------------------------------------------------------------+ | |
3464 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3465 | STATE : code ROUTINE : ksd_seqSupColp | | |
3466 +--------------------------------------------------------------------+ | |
3467 | |
3468 PURPOSE : This function sets the ouput parameter for the | |
3469 SEQGRP_SUP_COLP key sequence. | |
3470 */ | |
3471 LOCAL BOOL ksd_seqSupColp (USHORT inIdx, | |
3472 CHAR* inSeq, | |
3473 T_KSD_SEQGRP* outSeqGrp, | |
3474 CHAR** outRestSeq, | |
3475 T_KSD_SEQPARAM* outSeqParam) | |
3476 { | |
3477 TRACE_FUNCTION ("ksd_seqSupColp ()"); | |
3478 | |
3479 *outSeqGrp = SEQGRP_SUP_COLP; | |
3480 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
3481 | |
3482 outSeqParam->Colp.mode = COLP_MOD_Disable; | |
3483 | |
3484 return TRUE; | |
3485 } | |
3486 | |
3487 /* | |
3488 +--------------------------------------------------------------------+ | |
3489 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3490 | STATE : code ROUTINE : ksd_seqInvColp | | |
3491 +--------------------------------------------------------------------+ | |
3492 | |
3493 PURPOSE : This function sets the ouput parameter for the | |
3494 SEQGRP_INV_COLP key sequence. | |
3495 */ | |
3496 LOCAL BOOL ksd_seqInvColp (USHORT inIdx, | |
3497 CHAR* inSeq, | |
3498 T_KSD_SEQGRP* outSeqGrp, | |
3499 CHAR** outRestSeq, | |
3500 T_KSD_SEQPARAM* outSeqParam) | |
3501 { | |
3502 TRACE_FUNCTION ("ksd_seqInvColp ()"); | |
3503 | |
3504 *outSeqGrp = SEQGRP_INV_COLP; | |
3505 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
3506 | |
3507 outSeqParam->Colp.mode = COLP_MOD_Enable; | |
3508 | |
3509 return TRUE; | |
3510 } | |
3511 | |
3512 /* | |
3513 +--------------------------------------------------------------------+ | |
3514 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3515 | STATE : code ROUTINE : ksd_seqSupTTY | | |
3516 +--------------------------------------------------------------------+ | |
3517 | |
3518 PURPOSE : This function sets the ouput parameter for the | |
3519 SEQGRP_TTY_SERV key sequence 'Suppress TTY Service'. | |
3520 */ | |
3521 LOCAL BOOL ksd_seqSupTTY (USHORT inIdx, | |
3522 CHAR* inSeq, | |
3523 T_KSD_SEQGRP* outSeqGrp, | |
3524 CHAR** outRestSeq, | |
3525 T_KSD_SEQPARAM* outSeqParam) | |
3526 { | |
3527 TRACE_FUNCTION ("ksd_seqSupTTY ()"); | |
3528 | |
3529 *outSeqGrp = SEQGRP_TTY_SERV; | |
3530 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
3531 | |
3532 outSeqParam->ctty.req = CTTY_REQ_Off; | |
3533 | |
3534 return TRUE; | |
3535 } | |
3536 | |
3537 /* | |
3538 +--------------------------------------------------------------------+ | |
3539 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3540 | STATE : code ROUTINE : ksd_seqReqTTY | | |
3541 +--------------------------------------------------------------------+ | |
3542 | |
3543 PURPOSE : This function sets the ouput parameter for the | |
3544 SEQGRP_TTY_SERV key sequence 'Request TTY Service'. | |
3545 */ | |
3546 LOCAL BOOL ksd_seqReqTTY (USHORT inIdx, | |
3547 CHAR* inSeq, | |
3548 T_KSD_SEQGRP* outSeqGrp, | |
3549 CHAR** outRestSeq, | |
3550 T_KSD_SEQPARAM* outSeqParam) | |
3551 { | |
3552 TRACE_FUNCTION ("ksd_seqInvTTY ()"); | |
3553 | |
3554 *outSeqGrp = SEQGRP_TTY_SERV; | |
3555 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
3556 | |
3557 outSeqParam->ctty.req = CTTY_REQ_On; | |
3558 | |
3559 return TRUE; | |
3560 } | |
3561 | |
3562 /* | |
3563 +--------------------------------------------------------------------+ | |
3564 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3565 | STATE : code ROUTINE : ksd_getCpwdFromTriplePw | | |
3566 +--------------------------------------------------------------------+ | |
3567 | |
3568 PURPOSE : This function extracts the parameters of the sAT_PlusCPWD | |
3569 function of the ACI out of the supplementary information. | |
3570 | |
3571 <inIdx>: index of key sequence table | |
3572 <inSeq>: key sequence, to be decoded | |
3573 <outRestSeq>: rest key sequence, to be decoded by a | |
3574 further call to this function | |
3575 <outSeqParam>: sequence parameter | |
3576 | |
3577 returns: TRUE if output parameters are valid, | |
3578 otherwise FALSE | |
3579 */ | |
3580 LOCAL BOOL ksd_getCpwdFromTriplePw (USHORT inIdx, | |
3581 CHAR* inSeq, | |
3582 CHAR** outRestSeq, | |
3583 T_KSD_SEQPARAM* outSeqParam) | |
3584 { | |
3585 const USHORT siNum = 3; | |
3586 T_KSD_DCD_CPLE dcdCple[3]; | |
3587 T_KSD_SIPARAM oldPwParam; | |
3588 T_KSD_SIPARAM newPw1Param; | |
3589 T_KSD_SIPARAM newPw2Param; | |
3590 USHORT readChars; | |
3591 USHORT lenKeySeq = ksd_strlen (keyPasswd[inIdx].keySeq); | |
3592 BOOL isSuccess = FALSE; | |
3593 | |
3594 TRACE_FUNCTION ("ksd_getCpwdFromTriplePw ()"); | |
3595 | |
3596 dcdCple[0].type = SI_CHAR_STAR; | |
3597 dcdCple[0].param = &oldPwParam; | |
3598 oldPwParam.siCharStar = NULL; | |
3599 | |
3600 dcdCple[1].type = SI_CHAR_STAR; | |
3601 dcdCple[1].param = &newPw1Param; | |
3602 newPw1Param.siCharStar = NULL; | |
3603 | |
3604 dcdCple[2].type = SI_CHAR_STAR; | |
3605 dcdCple[2].param = &newPw2Param; | |
3606 newPw2Param.siCharStar = NULL; | |
3607 | |
3608 if (ksd_extractSi (inSeq + lenKeySeq, siNum, | |
3609 &readChars, dcdCple) EQ TRUE) | |
3610 { | |
3611 outSeqParam->pwd.oldPwd = (UBYTE*)oldPwParam.siCharStar; | |
3612 outSeqParam->pwd.newPwd = (UBYTE*)newPw1Param.siCharStar; | |
3613 outSeqParam->pwd.newPwd2 = (UBYTE*)newPw2Param.siCharStar; | |
3614 | |
3615 isSuccess = TRUE; | |
3616 } | |
3617 | |
3618 *outRestSeq = inSeq + lenKeySeq + readChars; | |
3619 | |
3620 return isSuccess; | |
3621 } | |
3622 | |
3623 | |
3624 /* | |
3625 +--------------------------------------------------------------------+ | |
3626 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3627 | STATE : code ROUTINE : ksd_seqRegPwdAllBarrServ | | |
3628 +--------------------------------------------------------------------+ | |
3629 | |
3630 PURPOSE : This function sets the ouput parameter for the | |
3631 SEQGRP_PWD, KSD_SS_ALL_CBSS key sequence. | |
3632 */ | |
3633 LOCAL BOOL ksd_seqRegPwdAllBarrServ (USHORT inIdx, | |
3634 CHAR* inSeq, | |
3635 T_KSD_SEQGRP* outSeqGrp, | |
3636 CHAR** outRestSeq, | |
3637 T_KSD_SEQPARAM* outSeqParam) | |
3638 { | |
3639 TRACE_FUNCTION ("ksd_seqRegPwdAllBarrServ ()"); | |
3640 | |
3641 outSeqParam->pwd.ssCd = KSD_SS_ALL_CBSS; | |
3642 | |
3643 *outSeqGrp = SEQGRP_PWD; | |
3644 | |
3645 return ksd_getCpwdFromTriplePw (inIdx, inSeq, outRestSeq, outSeqParam); | |
3646 } | |
3647 | |
3648 | |
3649 /* | |
3650 +--------------------------------------------------------------------+ | |
3651 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3652 | STATE : code ROUTINE : ksd_seqRegPwdAllServ | | |
3653 +--------------------------------------------------------------------+ | |
3654 | |
3655 PURPOSE : This function sets the ouput parameter for the | |
3656 SEQGRP_PWD, KSD_SS_... key sequence. | |
3657 */ | |
3658 LOCAL BOOL ksd_seqRegPwdAllServ (USHORT inIdx, | |
3659 CHAR* inSeq, | |
3660 T_KSD_SEQGRP* outSeqGrp, | |
3661 CHAR** outRestSeq, | |
3662 T_KSD_SEQPARAM* outSeqParam) | |
3663 { | |
3664 TRACE_FUNCTION ("ksd_seqRegPwdAllServ ()"); | |
3665 | |
3666 outSeqParam->pwd.ssCd = KSD_SS_ALL_SERV; | |
3667 | |
3668 *outSeqGrp = SEQGRP_PWD; | |
3669 | |
3670 return ksd_getCpwdFromTriplePw (inIdx, inSeq, outRestSeq, outSeqParam); | |
3671 } | |
3672 | |
3673 /* | |
3674 +--------------------------------------------------------------------+ | |
3675 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3676 | STATE : code ROUTINE : ksd_seqChngPin2 | | |
3677 +--------------------------------------------------------------------+ | |
3678 | |
3679 PURPOSE : This function sets the ouput parameter for the | |
3680 SEQGRP_PWD, KSD_SS_PIN2 key sequence. | |
3681 */ | |
3682 LOCAL BOOL ksd_seqChngPin2 (USHORT inIdx, | |
3683 CHAR* inSeq, | |
3684 T_KSD_SEQGRP* outSeqGrp, | |
3685 CHAR** outRestSeq, | |
3686 T_KSD_SEQPARAM* outSeqParam) | |
3687 { | |
3688 TRACE_FUNCTION ("ksd_seqChngPin2 ()"); | |
3689 | |
3690 outSeqParam->pwd.ssCd = KSD_SS_PIN2; | |
3691 | |
3692 *outSeqGrp = SEQGRP_PWD; | |
3693 | |
3694 return ksd_getCpwdFromTriplePw (inIdx, inSeq, outRestSeq, outSeqParam); | |
3695 } | |
3696 | |
3697 /* | |
3698 +--------------------------------------------------------------------+ | |
3699 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3700 | STATE : code ROUTINE : ksd_seqChngPin | | |
3701 +--------------------------------------------------------------------+ | |
3702 | |
3703 PURPOSE : This function sets the ouput parameter for the | |
3704 SEQGRP_PWD, KSD_SS_PIN1 key sequence. | |
3705 */ | |
3706 LOCAL BOOL ksd_seqChngPin (USHORT inIdx, | |
3707 CHAR* inSeq, | |
3708 T_KSD_SEQGRP* outSeqGrp, | |
3709 CHAR** outRestSeq, | |
3710 T_KSD_SEQPARAM* outSeqParam) | |
3711 { | |
3712 TRACE_FUNCTION ("ksd_seqChngPin ()"); | |
3713 | |
3714 outSeqParam->pwd.ssCd = KSD_SS_PIN1; | |
3715 | |
3716 *outSeqGrp = SEQGRP_PWD; | |
3717 | |
3718 return ksd_getCpwdFromTriplePw (inIdx, inSeq, outRestSeq, outSeqParam); | |
3719 } | |
3720 | |
3721 /* | |
3722 +--------------------------------------------------------------------+ | |
3723 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3724 | STATE : code ROUTINE : ksd_getUblkFromTriplePw | | |
3725 +--------------------------------------------------------------------+ | |
3726 | |
3727 PURPOSE : This function extracts the parameters of the sAT_PlusCPWD | |
3728 function of the ACI out of the supplementary information. | |
3729 | |
3730 <inIdx>: index of key sequence table | |
3731 <inSeq>: key sequence, to be decoded | |
3732 <outRestSeq>: rest key sequence, to be decoded by a | |
3733 further call to this function | |
3734 <outSeqParam>: sequence parameter | |
3735 | |
3736 returns: TRUE if output parameters are valid, | |
3737 otherwise FALSE | |
3738 */ | |
3739 LOCAL BOOL ksd_getUblkFromTriplePw (USHORT inIdx, | |
3740 CHAR* inSeq, | |
3741 CHAR** outRestSeq, | |
3742 T_KSD_SEQPARAM* outSeqParam) | |
3743 { | |
3744 const USHORT siNum = 3; | |
3745 T_KSD_DCD_CPLE dcdCple[3]; | |
3746 T_KSD_SIPARAM oldPwParam; | |
3747 T_KSD_SIPARAM newPw1Param; | |
3748 T_KSD_SIPARAM newPw2Param; | |
3749 USHORT readChars; | |
3750 USHORT lenKeySeq = ksd_strlen (keyPasswd[inIdx].keySeq); | |
3751 BOOL isSuccess = FALSE; | |
3752 | |
3753 TRACE_FUNCTION ("ksd_getUblkFromTriplePw ()"); | |
3754 | |
3755 dcdCple[0].type = SI_CHAR_STAR; | |
3756 dcdCple[0].param = &oldPwParam; | |
3757 oldPwParam.siCharStar = NULL; | |
3758 | |
3759 dcdCple[1].type = SI_CHAR_STAR; | |
3760 dcdCple[1].param = &newPw1Param; | |
3761 newPw1Param.siCharStar = NULL; | |
3762 | |
3763 dcdCple[2].type = SI_CHAR_STAR; | |
3764 dcdCple[2].param = &newPw2Param; | |
3765 newPw2Param.siCharStar = NULL; | |
3766 | |
3767 if (ksd_extractSi (inSeq + lenKeySeq, siNum, | |
3768 &readChars, dcdCple) EQ TRUE) | |
3769 { | |
3770 outSeqParam->ublk.puk = (UBYTE*)oldPwParam.siCharStar; | |
3771 outSeqParam->ublk.pin = (UBYTE*)newPw1Param.siCharStar; | |
3772 | |
3773 /* | |
3774 *--------------------------------------------------------------- | |
3775 * the new password must be given twice | |
3776 *--------------------------------------------------------------- | |
3777 */ | |
3778 if (!strcmp ((CHAR*)outSeqParam->ublk.pin, newPw2Param.siCharStar)) | |
3779 isSuccess = TRUE; | |
3780 else | |
3781 isSuccess = FALSE; | |
3782 } | |
3783 | |
3784 *outRestSeq = inSeq + lenKeySeq + readChars; | |
3785 | |
3786 return isSuccess; | |
3787 } | |
3788 | |
3789 /* | |
3790 +--------------------------------------------------------------------+ | |
3791 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3792 | STATE : code ROUTINE : ksd_seqUnblckPin2 | | |
3793 +--------------------------------------------------------------------+ | |
3794 | |
3795 PURPOSE : This function sets the ouput parameter for the | |
3796 SEQGRP_UBLK, KSD_SS_PIN2 key sequence. | |
3797 */ | |
3798 LOCAL BOOL ksd_seqUnblckPin2 (USHORT inIdx, | |
3799 CHAR* inSeq, | |
3800 T_KSD_SEQGRP* outSeqGrp, | |
3801 CHAR** outRestSeq, | |
3802 T_KSD_SEQPARAM* outSeqParam) | |
3803 { | |
3804 TRACE_FUNCTION ("ksd_seqUnblckPin2 ()"); | |
3805 | |
3806 outSeqParam->pwd.ssCd = KSD_SS_PIN2; | |
3807 | |
3808 *outSeqGrp = SEQGRP_UBLK; | |
3809 | |
3810 return ksd_getUblkFromTriplePw (inIdx, inSeq, outRestSeq, outSeqParam); | |
3811 } | |
3812 | |
3813 /* | |
3814 +--------------------------------------------------------------------+ | |
3815 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3816 | STATE : code ROUTINE : ksd_seqUnblckPin | | |
3817 +--------------------------------------------------------------------+ | |
3818 | |
3819 PURPOSE : This function sets the ouput parameter for the | |
3820 SEQGRP_UBLK, KSD_SS_PIN1 key sequence. | |
3821 */ | |
3822 LOCAL BOOL ksd_seqUnblckPin (USHORT inIdx, | |
3823 CHAR* inSeq, | |
3824 T_KSD_SEQGRP* outSeqGrp, | |
3825 CHAR** outRestSeq, | |
3826 T_KSD_SEQPARAM* outSeqParam) | |
3827 { | |
3828 TRACE_FUNCTION ("ksd_seqUnblckPin ()"); | |
3829 | |
3830 outSeqParam->pwd.ssCd = KSD_SS_PIN1; | |
3831 | |
3832 *outSeqGrp = SEQGRP_UBLK; | |
3833 | |
3834 return ksd_getUblkFromTriplePw (inIdx, inSeq, outRestSeq, outSeqParam); | |
3835 } | |
3836 | |
3837 /* | |
3838 +--------------------------------------------------------------------+ | |
3839 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3840 | STATE : code ROUTINE : ksd_getCcwaFromBs | | |
3841 +--------------------------------------------------------------------+ | |
3842 | |
3843 PURPOSE : This function extracts the parameters of the sAT_PlusCCWA | |
3844 function of the ACI out of the supplementary information. | |
3845 | |
3846 <inIdx>: index of key sequence table | |
3847 <inSeq>: key sequence, to be decoded | |
3848 <outRestSeq>: rest key sequence, to be decoded by a | |
3849 further call to this function | |
3850 <outSeqParam>: sequence parameter | |
3851 | |
3852 returns: TRUE if output parameters are valid, | |
3853 otherwise FALSE | |
3854 */ | |
3855 LOCAL BOOL ksd_getCcwaFromBs (USHORT inIdx, | |
3856 CHAR* inSeq, | |
3857 CHAR** outRestSeq, | |
3858 T_KSD_SEQPARAM* outSeqParam) | |
3859 { | |
3860 const USHORT siNum = 1; | |
3861 T_KSD_DCD_CPLE dcdCple[1]; | |
3862 T_KSD_SIPARAM bsParam; | |
3863 USHORT readChars; | |
3864 USHORT lenKeySeq = ksd_strlen (keySeqTable[inIdx].keySeq); | |
3865 BOOL isSuccess = FALSE; | |
3866 | |
3867 TRACE_FUNCTION ("ksd_getCcwaFromBs ()"); | |
3868 | |
3869 dcdCple[0].type = SI_UBYTE; | |
3870 dcdCple[0].param = &bsParam; | |
3871 bsParam.siUbyte = KSD_BS_None; | |
3872 | |
3873 if (ksd_extractSi (inSeq + lenKeySeq, siNum, | |
3874 &readChars, dcdCple) EQ TRUE) | |
3875 { | |
3876 outSeqParam->cw.bsCd = bsParam.siUbyte; | |
3877 | |
3878 isSuccess = TRUE; | |
3879 } | |
3880 | |
3881 *outRestSeq = inSeq + lenKeySeq + readChars; | |
3882 | |
3883 return isSuccess; | |
3884 } | |
3885 | |
3886 /* | |
3887 +--------------------------------------------------------------------+ | |
3888 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3889 | STATE : code ROUTINE : ksd_seqActWait | | |
3890 +--------------------------------------------------------------------+ | |
3891 | |
3892 PURPOSE : This function sets the ouput parameter for the | |
3893 SEQGRP_CW, KSD_OP_ACT key sequence. | |
3894 */ | |
3895 LOCAL BOOL ksd_seqActWait (USHORT inIdx, | |
3896 CHAR* inSeq, | |
3897 T_KSD_SEQGRP* outSeqGrp, | |
3898 CHAR** outRestSeq, | |
3899 T_KSD_SEQPARAM* outSeqParam) | |
3900 { | |
3901 TRACE_FUNCTION ("ksd_seqActWait ()"); | |
3902 | |
3903 outSeqParam->cw.opCd = KSD_OP_ACT; | |
3904 | |
3905 *outSeqGrp = SEQGRP_CW; | |
3906 | |
3907 return ksd_getCcwaFromBs (inIdx, inSeq, outRestSeq, outSeqParam); | |
3908 } | |
3909 | |
3910 /* | |
3911 +--------------------------------------------------------------------+ | |
3912 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3913 | STATE : code ROUTINE : ksd_seqDeactWait | | |
3914 +--------------------------------------------------------------------+ | |
3915 | |
3916 PURPOSE : This function sets the ouput parameter for the | |
3917 SEQGRP_CW, KSD_OP_DEACT key sequence. | |
3918 */ | |
3919 LOCAL BOOL ksd_seqDeactWait (USHORT inIdx, | |
3920 CHAR* inSeq, | |
3921 T_KSD_SEQGRP* outSeqGrp, | |
3922 CHAR** outRestSeq, | |
3923 T_KSD_SEQPARAM* outSeqParam) | |
3924 { | |
3925 TRACE_FUNCTION ("ksd_seqDeactWait ()"); | |
3926 | |
3927 outSeqParam->cw.opCd = KSD_OP_DEACT; | |
3928 | |
3929 *outSeqGrp = SEQGRP_CW; | |
3930 | |
3931 return ksd_getCcwaFromBs (inIdx, inSeq, outRestSeq, outSeqParam); | |
3932 } | |
3933 | |
3934 /* | |
3935 +--------------------------------------------------------------------+ | |
3936 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3937 | STATE : code ROUTINE : ksd_seqIntrgtWait | | |
3938 +--------------------------------------------------------------------+ | |
3939 | |
3940 PURPOSE : This function sets the ouput parameter for the | |
3941 SEQGRP_CW, KSD_OP_IRGT key sequence. | |
3942 */ | |
3943 LOCAL BOOL ksd_seqIntrgtWait (USHORT inIdx, | |
3944 CHAR* inSeq, | |
3945 T_KSD_SEQGRP* outSeqGrp, | |
3946 CHAR** outRestSeq, | |
3947 T_KSD_SEQPARAM* outSeqParam) | |
3948 { | |
3949 TRACE_FUNCTION ("ksd_seqIntrgtWait ()"); | |
3950 | |
3951 outSeqParam->cw.opCd = KSD_OP_IRGT; | |
3952 //TISH, hot fix for OMAPS00130692 | |
3953 //start | |
3954 #if 0 | |
3955 /* Interrogation of Call Waiting is always without any Basic Service Code, see 4.83 */ | |
3956 outSeqParam->cw.bsCd = KSD_BS_None; | |
3957 | |
3958 *outSeqGrp = SEQGRP_CW; | |
3959 | |
3960 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
3961 | |
3962 return TRUE; | |
3963 #else | |
3964 *outSeqGrp = SEQGRP_CW; | |
3965 return ksd_getCcwaFromBs (inIdx, inSeq, outRestSeq, outSeqParam); | |
3966 #endif | |
3967 //end | |
3968 } | |
3969 | |
3970 /* | |
3971 +--------------------------------------------------------------------+ | |
3972 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3973 | STATE : code ROUTINE : ksd_seqIPrsntImei | | |
3974 +--------------------------------------------------------------------+ | |
3975 | |
3976 PURPOSE : This function sets the ouput parameter for the | |
3977 SEQGRP_PRSNT_IMEI key sequence. | |
3978 */ | |
3979 LOCAL BOOL ksd_seqPrsntImei (USHORT inIdx, | |
3980 CHAR* inSeq, | |
3981 T_KSD_SEQGRP* outSeqGrp, | |
3982 CHAR** outRestSeq, | |
3983 T_KSD_SEQPARAM* outSeqParam) | |
3984 { | |
3985 TRACE_FUNCTION ("ksd_seqPrsntImei ()"); | |
3986 | |
3987 *outSeqGrp = SEQGRP_PRSNT_IMEI; | |
3988 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
3989 | |
3990 return TRUE; | |
3991 } | |
3992 | |
3993 /* | |
3994 +--------------------------------------------------------------------+ | |
3995 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
3996 | STATE : code ROUTINE : ksd_seqIntrgtCCBS | | |
3997 +--------------------------------------------------------------------+ | |
3998 | |
3999 PURPOSE : This function sets the ouput parameter for the | |
4000 SEQGRP_CCBS, KSD_OP_IRGT, KSD_SS_CCBS key sequence. | |
4001 */ | |
4002 LOCAL BOOL ksd_seqIntrgtCCBS (USHORT inIdx, | |
4003 CHAR* inSeq, | |
4004 T_KSD_SEQGRP* outSeqGrp, | |
4005 CHAR** outRestSeq, | |
4006 T_KSD_SEQPARAM* outSeqParam) | |
4007 { | |
4008 TRACE_FUNCTION ("ksd_seqIntrgtCCBS ()"); | |
4009 | |
4010 outSeqParam->ccbs.opCd = KSD_OP_IRGT; | |
4011 outSeqParam->ccbs.idx = KSD_IDX_NONE; | |
4012 | |
4013 *outSeqGrp = SEQGRP_CCBS; | |
4014 | |
4015 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
4016 | |
4017 return TRUE; | |
4018 } | |
4019 | |
4020 /* | |
4021 +--------------------------------------------------------------------+ | |
4022 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4023 | STATE : code ROUTINE : ksd_getCCBSFromN | | |
4024 +--------------------------------------------------------------------+ | |
4025 | |
4026 PURPOSE : This function extracts the parameters of the sAT_PercentCCBS | |
4027 function of the ACI out of the supplementary information. | |
4028 | |
4029 <inIdx>: index of key sequence table | |
4030 <inSeq>: key sequence, to be decoded | |
4031 <outRestSeq>: rest key sequence, to be decoded by a | |
4032 further call to this function | |
4033 <outSeqParam>: sequence parameter | |
4034 | |
4035 returns: TRUE if output parameters are valid, | |
4036 otherwise FALSE | |
4037 */ | |
4038 LOCAL BOOL ksd_getCCBSFromN (USHORT inIdx, | |
4039 CHAR* inSeq, | |
4040 CHAR** outRestSeq, | |
4041 T_KSD_SEQPARAM* outSeqParam) | |
4042 { | |
4043 const USHORT siNum = 1; | |
4044 T_KSD_DCD_CPLE dcdCple[1]; | |
4045 T_KSD_SIPARAM nParam; | |
4046 USHORT readChars; | |
4047 USHORT lenKeySeq = ksd_strlen (keySeqTable[inIdx].keySeq); | |
4048 BOOL isSuccess = FALSE; | |
4049 | |
4050 TRACE_FUNCTION ("ksd_getCCBSFromN ()"); | |
4051 | |
4052 dcdCple[0].type = SI_UBYTE; | |
4053 dcdCple[0].param = &nParam; | |
4054 nParam.siUbyte = KSD_IDX_NONE; | |
4055 | |
4056 if (ksd_extractSi (inSeq + lenKeySeq, siNum, | |
4057 &readChars, dcdCple) EQ TRUE) | |
4058 { | |
4059 outSeqParam->ccbs.idx = nParam.siUbyte; | |
4060 | |
4061 isSuccess = TRUE; | |
4062 } | |
4063 | |
4064 *outRestSeq = inSeq + lenKeySeq + readChars; | |
4065 | |
4066 return isSuccess; | |
4067 } | |
4068 | |
4069 /* | |
4070 +--------------------------------------------------------------------+ | |
4071 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4072 | STATE : code ROUTINE : ksd_seqDeactCCBS | | |
4073 +--------------------------------------------------------------------+ | |
4074 | |
4075 PURPOSE : This function sets the ouput parameter for the | |
4076 SEQGRP_CCBS, KSD_OP_DEACT key sequence. | |
4077 */ | |
4078 LOCAL BOOL ksd_seqDeactCCBS (USHORT inIdx, | |
4079 CHAR* inSeq, | |
4080 T_KSD_SEQGRP* outSeqGrp, | |
4081 CHAR** outRestSeq, | |
4082 T_KSD_SEQPARAM* outSeqParam) | |
4083 { | |
4084 TRACE_FUNCTION ("ksd_seqDeactCCBS ()"); | |
4085 | |
4086 outSeqParam->ccbs.opCd = KSD_OP_DEACT; | |
4087 outSeqParam->ccbs.idx = KSD_IDX_NONE; | |
4088 | |
4089 *outSeqGrp = SEQGRP_CCBS; | |
4090 | |
4091 return ksd_getCCBSFromN (inIdx, inSeq, outRestSeq, outSeqParam); | |
4092 } | |
4093 | |
4094 /* | |
4095 +--------------------------------------------------------------------+ | |
4096 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4097 | STATE : code ROUTINE : ksd_seqIntrgtCNAP | | |
4098 +--------------------------------------------------------------------+ | |
4099 | |
4100 PURPOSE : This function sets the ouput parameter for the | |
4101 SEQGRP_CL, KSD_OP_IRGT, KSD_SS_CNAP key sequence. | |
4102 */ | |
4103 LOCAL BOOL ksd_seqIntrgtCNAP (USHORT inIdx, | |
4104 CHAR* inSeq, | |
4105 T_KSD_SEQGRP* outSeqGrp, | |
4106 CHAR** outRestSeq, | |
4107 T_KSD_SEQPARAM* outSeqParam) | |
4108 { | |
4109 TRACE_FUNCTION ("ksd_seqIntrgtCNAP ()"); | |
4110 | |
4111 outSeqParam->cb.opCd = KSD_OP_IRGT; | |
4112 outSeqParam->cb.ssCd = KSD_SS_CNAP; | |
4113 | |
4114 *outSeqGrp = SEQGRP_CL; | |
4115 | |
4116 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
4117 | |
4118 return TRUE; | |
4119 } | |
4120 | |
4121 #if 0 /* For further study, so not yet used */ | |
4122 +--------------------------------------------------------------------+ | |
4123 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4124 | STATE : code ROUTINE : ksd_seqActCCBS | | |
4125 +--------------------------------------------------------------------+ | |
4126 | |
4127 PURPOSE : This function sets the ouput parameter for the | |
4128 SEQGRP_CCBS, KSD_OP_ACT key sequence. | |
4129 | |
4130 | |
4131 LOCAL BOOL ksd_seqActCCBS (USHORT inIdx, | |
4132 CHAR* inSeq, | |
4133 T_KSD_SEQGRP* outSeqGrp, | |
4134 CHAR** outRestSeq, | |
4135 T_KSD_SEQPARAM* outSeqParam) | |
4136 { | |
4137 TRACE_FUNCTION ("ksd_seqActCCBS ()"); | |
4138 | |
4139 outSeqParam->ccbs.opCd = KSD_OP_ACT; | |
4140 outSeqParam->ccbs.idx = KSD_IDX_NONE; | |
4141 | |
4142 *outSeqGrp = SEQGRP_CCBS; | |
4143 | |
4144 *outRestSeq = inSeq + ksd_strlen (keySeqTable[inIdx].keySeq); | |
4145 | |
4146 return TRUE; | |
4147 } | |
4148 #endif | |
4149 | |
4150 | |
4151 /* | |
4152 +--------------------------------------------------------------------+ | |
4153 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4154 | STATE : code ROUTINE : ksd_seqSndChld0 | | |
4155 +--------------------------------------------------------------------+ | |
4156 | |
4157 PURPOSE : This function sets the ouput parameter for the | |
4158 SEQGRP_CHLD key sequence. | |
4159 */ | |
4160 LOCAL BOOL ksd_seqSndChld0 (USHORT inIdx, | |
4161 CHAR* inSeq, | |
4162 T_KSD_SEQGRP* outSeqGrp, | |
4163 CHAR** outRestSeq, | |
4164 T_KSD_SEQPARAM* outSeqParam) | |
4165 { | |
4166 BOOL isSuccess = FALSE; | |
4167 USHORT lenInSeq = strlen (inSeq); | |
4168 USHORT lenKeySeq = ksd_strlen (keyWithinCall[inIdx].keySeq); | |
4169 | |
4170 TRACE_FUNCTION ("ksd_seqSndChld0 ()"); | |
4171 | |
4172 /* | |
4173 *----------------------------------------------------------------- | |
4174 * entering a single '0' is a valid +CHLD parameter | |
4175 *----------------------------------------------------------------- | |
4176 */ | |
4177 if (lenInSeq EQ lenKeySeq) | |
4178 { | |
4179 *outSeqGrp = SEQGRP_CHLD; | |
4180 *outRestSeq = inSeq + lenInSeq; | |
4181 outSeqParam->chld.mode = CHLD_MOD_RelHldOrUdub; | |
4182 outSeqParam->chld.call = NULL; | |
4183 | |
4184 isSuccess = TRUE; | |
4185 } | |
4186 else | |
4187 { | |
4188 *outSeqGrp = SEQGRP_UNKNOWN; | |
4189 *outRestSeq = inSeq; | |
4190 } | |
4191 | |
4192 return isSuccess; | |
4193 } | |
4194 | |
4195 /* | |
4196 +--------------------------------------------------------------------+ | |
4197 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4198 | STATE : code ROUTINE : ksd_seqSndChld1 | | |
4199 +--------------------------------------------------------------------+ | |
4200 | |
4201 PURPOSE : This function sets the ouput parameter for the | |
4202 SEQGRP_CHLD key sequence. | |
4203 */ | |
4204 LOCAL BOOL ksd_seqSndChld1 (USHORT inIdx, | |
4205 CHAR* inSeq, | |
4206 T_KSD_SEQGRP* outSeqGrp, | |
4207 CHAR** outRestSeq, | |
4208 T_KSD_SEQPARAM* outSeqParam) | |
4209 { | |
4210 BOOL isSuccess = FALSE; | |
4211 USHORT lenInSeq = strlen (inSeq); | |
4212 USHORT lenKeySeq = ksd_strlen (keyWithinCall[inIdx].keySeq); | |
4213 | |
4214 TRACE_FUNCTION ("ksd_seqSndChld1 ()"); | |
4215 | |
4216 if (lenInSeq EQ lenKeySeq) | |
4217 { | |
4218 /* | |
4219 *--------------------------------------------------------------- | |
4220 * entering a single '1' is a valid +CHLD parameter | |
4221 *--------------------------------------------------------------- | |
4222 */ | |
4223 *outSeqGrp = SEQGRP_CHLD; | |
4224 *outRestSeq = inSeq + lenInSeq; | |
4225 outSeqParam->chld.mode = CHLD_MOD_RelActAndAcpt; | |
4226 outSeqParam->chld.call = NULL; | |
4227 | |
4228 isSuccess = TRUE; | |
4229 } | |
4230 else if (lenInSeq EQ lenKeySeq + 1) | |
4231 { | |
4232 if (*(inSeq + lenKeySeq) >= '0' AND | |
4233 *(inSeq + lenKeySeq) <= '9') | |
4234 { | |
4235 /* | |
4236 *--------------------------------------------------------------- | |
4237 * entering a '1X' is a valid +CHLD parameter, while X is a | |
4238 * number between '0' and '9' | |
4239 *--------------------------------------------------------------- | |
4240 */ | |
4241 *outSeqGrp = SEQGRP_CHLD; | |
4242 *outRestSeq = inSeq + lenInSeq; | |
4243 outSeqParam->chld.mode = CHLD_MOD_RelActSpec; | |
4244 outSeqParam->chld.call = inSeq + lenKeySeq; | |
4245 | |
4246 isSuccess = TRUE; | |
4247 } | |
4248 else | |
4249 { | |
4250 *outSeqGrp = SEQGRP_UNKNOWN; | |
4251 *outRestSeq = inSeq; | |
4252 } | |
4253 } | |
4254 else | |
4255 { | |
4256 *outSeqGrp = SEQGRP_UNKNOWN; | |
4257 *outRestSeq = inSeq; | |
4258 } | |
4259 | |
4260 return isSuccess; | |
4261 } | |
4262 | |
4263 /* | |
4264 +--------------------------------------------------------------------+ | |
4265 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4266 | STATE : code ROUTINE : ksd_seqSndChld2 | | |
4267 +--------------------------------------------------------------------+ | |
4268 | |
4269 PURPOSE : This function sets the ouput parameter for the | |
4270 SEQGRP_CHLD key sequence. | |
4271 */ | |
4272 LOCAL BOOL ksd_seqSndChld2 (USHORT inIdx, | |
4273 CHAR* inSeq, | |
4274 T_KSD_SEQGRP* outSeqGrp, | |
4275 CHAR** outRestSeq, | |
4276 T_KSD_SEQPARAM* outSeqParam) | |
4277 { | |
4278 BOOL isSuccess = FALSE; | |
4279 USHORT lenInSeq = strlen (inSeq); | |
4280 USHORT lenKeySeq = ksd_strlen (keyWithinCall[inIdx].keySeq); | |
4281 | |
4282 TRACE_FUNCTION ("ksd_seqSndChld2 ()"); | |
4283 | |
4284 if (lenInSeq EQ lenKeySeq) | |
4285 { | |
4286 /* | |
4287 *--------------------------------------------------------------- | |
4288 * entering a single '2' is a valid +CHLD parameter | |
4289 *--------------------------------------------------------------- | |
4290 */ | |
4291 *outSeqGrp = SEQGRP_CHLD; | |
4292 *outRestSeq = inSeq + lenInSeq; | |
4293 outSeqParam->chld.mode = CHLD_MOD_HldActAndAcpt; | |
4294 outSeqParam->chld.call = NULL; | |
4295 | |
4296 isSuccess = TRUE; | |
4297 } | |
4298 else if (lenInSeq EQ lenKeySeq + 1) | |
4299 { | |
4300 if (*(inSeq + lenKeySeq) >= '0' AND | |
4301 *(inSeq + lenKeySeq) <= '9') | |
4302 { | |
4303 /* | |
4304 *--------------------------------------------------------------- | |
4305 * entering a '2X' is a valid +CHLD parameter, while X is a | |
4306 * number between '0' and '9' | |
4307 *--------------------------------------------------------------- | |
4308 */ | |
4309 *outSeqGrp = SEQGRP_CHLD; | |
4310 *outRestSeq = inSeq + lenInSeq; | |
4311 outSeqParam->chld.mode = CHLD_MOD_HldActExc; | |
4312 outSeqParam->chld.call = inSeq + lenKeySeq; | |
4313 | |
4314 isSuccess = TRUE; | |
4315 } | |
4316 else | |
4317 { | |
4318 *outSeqGrp = SEQGRP_UNKNOWN; | |
4319 *outRestSeq = inSeq; | |
4320 } | |
4321 } | |
4322 else | |
4323 { | |
4324 *outSeqGrp = SEQGRP_UNKNOWN; | |
4325 *outRestSeq = inSeq; | |
4326 } | |
4327 | |
4328 return isSuccess; | |
4329 } | |
4330 | |
4331 /* | |
4332 +--------------------------------------------------------------------+ | |
4333 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4334 | STATE : code ROUTINE : ksd_seqSndChld3 | | |
4335 +--------------------------------------------------------------------+ | |
4336 | |
4337 PURPOSE : This function sets the ouput parameter for the | |
4338 SEQGRP_CHLD key sequence. | |
4339 */ | |
4340 LOCAL BOOL ksd_seqSndChld3 (USHORT inIdx, | |
4341 CHAR* inSeq, | |
4342 T_KSD_SEQGRP* outSeqGrp, | |
4343 CHAR** outRestSeq, | |
4344 T_KSD_SEQPARAM* outSeqParam) | |
4345 { | |
4346 BOOL isSuccess = FALSE; | |
4347 USHORT lenInSeq = strlen (inSeq); | |
4348 USHORT lenKeySeq = ksd_strlen (keyWithinCall[inIdx].keySeq); | |
4349 | |
4350 TRACE_FUNCTION ("ksd_seqSndChld3 ()"); | |
4351 | |
4352 /* | |
4353 *----------------------------------------------------------------- | |
4354 * entering a single '3' is a valid +CHLD parameter | |
4355 *----------------------------------------------------------------- | |
4356 */ | |
4357 if (lenInSeq EQ lenKeySeq) | |
4358 { | |
4359 *outSeqGrp = SEQGRP_CHLD; | |
4360 *outRestSeq = inSeq + lenInSeq; | |
4361 outSeqParam->chld.mode = CHLD_MOD_AddHld; | |
4362 outSeqParam->chld.call = NULL; | |
4363 | |
4364 isSuccess = TRUE; | |
4365 } | |
4366 else | |
4367 { | |
4368 *outSeqGrp = SEQGRP_UNKNOWN; | |
4369 *outRestSeq = inSeq; | |
4370 } | |
4371 | |
4372 return isSuccess; | |
4373 } | |
4374 | |
4375 /* | |
4376 +--------------------------------------------------------------------+ | |
4377 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4378 | STATE : code ROUTINE : ksd_seqSndChld4 | | |
4379 +--------------------------------------------------------------------+ | |
4380 | |
4381 PURPOSE : This function sets the ouput parameter for the | |
4382 SEQGRP_CHLD key sequence. | |
4383 */ | |
4384 LOCAL BOOL ksd_seqSndChld4 (USHORT inIdx, | |
4385 CHAR* inSeq, | |
4386 T_KSD_SEQGRP* outSeqGrp, | |
4387 CHAR** outRestSeq, | |
4388 T_KSD_SEQPARAM* outSeqParam) | |
4389 { | |
4390 BOOL isSuccess = FALSE; | |
4391 USHORT lenInSeq = strlen (inSeq); | |
4392 USHORT lenKeySeq = ksd_strlen (keyWithinCall[inIdx].keySeq); | |
4393 | |
4394 TRACE_FUNCTION ("ksd_seqSndChld4()"); | |
4395 | |
4396 /* | |
4397 *----------------------------------------------------------------- | |
4398 * entering a single '4' is a valid +CHLD parameter | |
4399 *----------------------------------------------------------------- | |
4400 */ | |
4401 if (lenInSeq EQ lenKeySeq) | |
4402 { | |
4403 *outSeqGrp = SEQGRP_CHLD; | |
4404 *outRestSeq = inSeq + lenInSeq; | |
4405 outSeqParam->chld.mode = CHLD_MOD_Ect; | |
4406 outSeqParam->chld.call = NULL; | |
4407 | |
4408 isSuccess = TRUE; | |
4409 } | |
4410 | |
4411 return isSuccess; | |
4412 } | |
4413 | |
4414 /* | |
4415 +--------------------------------------------------------------------+ | |
4416 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4417 | STATE : code ROUTINE : ksd_seqSndChld4Star | | |
4418 +--------------------------------------------------------------------+ | |
4419 | |
4420 PURPOSE : This function sets the ouput parameter for the | |
4421 SEQGRP_CHLD key sequence. | |
4422 */ | |
4423 LOCAL BOOL ksd_seqSndChld4Star (USHORT inIdx, | |
4424 CHAR* inSeq, | |
4425 T_KSD_SEQGRP* outSeqGrp, | |
4426 CHAR** outRestSeq, | |
4427 T_KSD_SEQPARAM* outSeqParam) | |
4428 { | |
4429 USHORT lenInSeq = strlen (inSeq); | |
4430 USHORT lenKeySeq = ksd_strlen (keyWithinCall[inIdx].keySeq); | |
4431 USHORT lenSubaddr; | |
4432 BOOL international; | |
4433 BOOL isSuccess = FALSE; | |
4434 | |
4435 TRACE_FUNCTION ("ksd_seqSndChld4Star()"); | |
4436 | |
4437 /* | |
4438 *----------------------------------------------------------------- | |
4439 * entering a '4' and a '*' is a valid +CTFR parameter | |
4440 *----------------------------------------------------------------- | |
4441 */ | |
4442 *outSeqGrp = SEQGRP_CTFR; | |
4443 *outRestSeq = inSeq + lenKeySeq; | |
4444 | |
4445 /* | |
4446 *----------------------------------------------------------------- | |
4447 * process dial DeflectedToNumber | |
4448 *----------------------------------------------------------------- | |
4449 */ | |
4450 utl_splitDialnumber (*outRestSeq, | |
4451 &outSeqParam->ctfr.number, | |
4452 &international, | |
4453 &outSeqParam->ctfr.subaddr, | |
4454 &lenSubaddr); | |
4455 | |
4456 /* | |
4457 *----------------------------------------------------------------- | |
4458 * process main address and type of main address | |
4459 *----------------------------------------------------------------- | |
4460 */ | |
4461 if (outSeqParam->ctfr.number EQ NULL) | |
4462 { | |
4463 outSeqParam->ctfr.type.ton = TON_Unknown; | |
4464 outSeqParam->ctfr.type.npi = NPI_Unknown; | |
4465 } | |
4466 else | |
4467 { | |
4468 outSeqParam->ctfr.type.ton = (international) ? TON_International : | |
4469 TON_Unknown; | |
4470 outSeqParam->ctfr.type.npi = NPI_IsdnTelephony; | |
4471 isSuccess = TRUE; | |
4472 } | |
4473 | |
4474 /* | |
4475 *--------------------------------------------------------------- | |
4476 * process subaddress and type of subaddress | |
4477 *--------------------------------------------------------------- | |
4478 */ | |
4479 if (outSeqParam->ctfr.subaddr EQ NULL) | |
4480 { | |
4481 outSeqParam->ctfr.satype.tos = TOS_Nsap; | |
4482 outSeqParam->ctfr.satype.oe = OE_Even; | |
4483 } | |
4484 else | |
4485 { | |
4486 outSeqParam->ctfr.satype.tos = TOS_Nsap; | |
4487 outSeqParam->ctfr.satype.oe = ((lenSubaddr & 1) EQ 0) ? OE_Even : | |
4488 OE_Odd; | |
4489 } | |
4490 | |
4491 *outRestSeq = *outRestSeq + strlen (*outRestSeq); | |
4492 | |
4493 return isSuccess; | |
4494 } | |
4495 | |
4496 /* | |
4497 +--------------------------------------------------------------------+ | |
4498 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4499 | STATE : code ROUTINE : ksd_seqSndChld5 | | |
4500 +--------------------------------------------------------------------+ | |
4501 | |
4502 PURPOSE : This function sets the ouput parameter for the | |
4503 SEQGRP_CHLD key sequence. | |
4504 */ | |
4505 LOCAL BOOL ksd_seqSndChld5 (USHORT inIdx, | |
4506 CHAR* inSeq, | |
4507 T_KSD_SEQGRP* outSeqGrp, | |
4508 CHAR** outRestSeq, | |
4509 T_KSD_SEQPARAM* outSeqParam) | |
4510 { | |
4511 BOOL isSuccess = FALSE; | |
4512 USHORT lenInSeq = strlen (inSeq); | |
4513 USHORT lenKeySeq = ksd_strlen (keyWithinCall[inIdx].keySeq); | |
4514 | |
4515 TRACE_FUNCTION ("ksd_seqSndChld5()"); | |
4516 | |
4517 /* | |
4518 *----------------------------------------------------------------- | |
4519 * entering a single '5' is a valid +CHLD parameter | |
4520 *----------------------------------------------------------------- | |
4521 */ | |
4522 if (lenInSeq EQ lenKeySeq) | |
4523 { | |
4524 *outSeqGrp = SEQGRP_CHLD; | |
4525 *outRestSeq = inSeq + lenInSeq; | |
4526 outSeqParam->chld.mode = CHLD_MOD_Ccbs; | |
4527 outSeqParam->chld.call = NULL; | |
4528 | |
4529 isSuccess = TRUE; | |
4530 } | |
4531 | |
4532 return isSuccess; | |
4533 } | |
4534 | |
4535 #ifdef SMI | |
4536 /* | |
4537 +--------------------------------------------------------------------+ | |
4538 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4539 | STATE : code ROUTINE : ksd_seqSndCbst | | |
4540 +--------------------------------------------------------------------+ | |
4541 | |
4542 PURPOSE : This function sets the ouput parameter for the | |
4543 SEQGRP_SND_CBST key sequence. | |
4544 */ | |
4545 LOCAL BOOL ksd_seqSndCbst (USHORT inIdx, | |
4546 CHAR* inSeq, | |
4547 T_KSD_SEQGRP* outSeqGrp, | |
4548 CHAR** outRestSeq, | |
4549 T_KSD_SEQPARAM* outSeqParam) | |
4550 { | |
4551 const USHORT siNum = 3; | |
4552 T_KSD_DCD_CPLE dcdCple[3]; | |
4553 T_KSD_SIPARAM speedParam; | |
4554 T_KSD_SIPARAM nameParam; | |
4555 T_KSD_SIPARAM ceParam; | |
4556 USHORT readChars; | |
4557 USHORT lenKeySeq = ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
4558 BOOL isSuccess = FALSE; | |
4559 | |
4560 TRACE_FUNCTION ("ksd_seqSndCbst ()"); | |
4561 | |
4562 dcdCple[0].type = SI_SHORT; | |
4563 dcdCple[0].param = &speedParam; | |
4564 | |
4565 dcdCple[1].type = SI_SHORT; | |
4566 dcdCple[1].param = &nameParam; | |
4567 | |
4568 dcdCple[2].type = SI_SHORT; | |
4569 dcdCple[2].param = &ceParam; | |
4570 | |
4571 *outSeqGrp = SEQGRP_SND_CBST; | |
4572 | |
4573 if (ksd_extractSi (inSeq + lenKeySeq, siNum, | |
4574 &readChars, dcdCple) EQ TRUE) | |
4575 { | |
4576 outSeqParam->cbst.speed = speedParam.siShort; | |
4577 outSeqParam->cbst.name = nameParam.siShort; | |
4578 outSeqParam->cbst.ce = ceParam.siShort; | |
4579 | |
4580 isSuccess = TRUE; | |
4581 } | |
4582 | |
4583 *outRestSeq = inSeq + lenKeySeq + readChars; | |
4584 | |
4585 return isSuccess; | |
4586 } | |
4587 #endif | |
4588 | |
4589 #ifdef SMI | |
4590 /* | |
4591 +--------------------------------------------------------------------+ | |
4592 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4593 | STATE : code ROUTINE : ksd_seqSndCrlp | | |
4594 +--------------------------------------------------------------------+ | |
4595 | |
4596 PURPOSE : This function sets the ouput parameter for the | |
4597 SEQGRP_SND_CRLP key sequence. | |
4598 */ | |
4599 LOCAL BOOL ksd_seqSndCrlp (USHORT inIdx, | |
4600 CHAR* inSeq, | |
4601 T_KSD_SEQGRP* outSeqGrp, | |
4602 CHAR** outRestSeq, | |
4603 T_KSD_SEQPARAM* outSeqParam) | |
4604 { | |
4605 const USHORT siNum = 4; | |
4606 T_KSD_DCD_CPLE dcdCple[4]; | |
4607 T_KSD_SIPARAM iwsParam; | |
4608 T_KSD_SIPARAM mwsParam; | |
4609 T_KSD_SIPARAM t1Param; | |
4610 T_KSD_SIPARAM n2Param; | |
4611 USHORT readChars; | |
4612 USHORT lenKeySeq = ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
4613 BOOL isSuccess = FALSE; | |
4614 | |
4615 TRACE_FUNCTION ("ksd_seqSndCrlp ()"); | |
4616 | |
4617 dcdCple[0].type = SI_SHORT; | |
4618 dcdCple[0].param = &iwsParam; | |
4619 | |
4620 dcdCple[1].type = SI_SHORT; | |
4621 dcdCple[1].param = &mwsParam; | |
4622 | |
4623 dcdCple[2].type = SI_SHORT; | |
4624 dcdCple[2].param = &t1Param; | |
4625 | |
4626 dcdCple[3].type = SI_SHORT; | |
4627 dcdCple[3].param = &n2Param; | |
4628 | |
4629 *outSeqGrp = SEQGRP_SND_CRLP; | |
4630 | |
4631 if (ksd_extractSi (inSeq + lenKeySeq, siNum, | |
4632 &readChars, dcdCple) EQ TRUE) | |
4633 { | |
4634 outSeqParam->crlp.iws = iwsParam.siShort; | |
4635 outSeqParam->crlp.mws = mwsParam.siShort; | |
4636 outSeqParam->crlp.t1 = t1Param.siShort; | |
4637 outSeqParam->crlp.n2 = n2Param.siShort; | |
4638 | |
4639 isSuccess = TRUE; | |
4640 } | |
4641 | |
4642 *outRestSeq = inSeq + lenKeySeq + readChars; | |
4643 | |
4644 return isSuccess; | |
4645 } | |
4646 #endif | |
4647 | |
4648 #ifdef SMI | |
4649 /* | |
4650 +--------------------------------------------------------------------+ | |
4651 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4652 | STATE : code ROUTINE : ksd_seqSndDs | | |
4653 +--------------------------------------------------------------------+ | |
4654 | |
4655 PURPOSE : This function sets the ouput parameter for the | |
4656 SEQGRP_SND_DS key sequence. | |
4657 */ | |
4658 LOCAL BOOL ksd_seqSndDs (USHORT inIdx, | |
4659 CHAR* inSeq, | |
4660 T_KSD_SEQGRP* outSeqGrp, | |
4661 CHAR** outRestSeq, | |
4662 T_KSD_SEQPARAM* outSeqParam) | |
4663 { | |
4664 const USHORT siNum = 4; | |
4665 T_KSD_DCD_CPLE dcdCple[4]; | |
4666 T_KSD_SIPARAM dirParam; | |
4667 T_KSD_SIPARAM compParam; | |
4668 T_KSD_SIPARAM maxDictParam; | |
4669 T_KSD_SIPARAM maxStrParam; | |
4670 USHORT readChars; | |
4671 USHORT lenKeySeq = ksd_strlen (keySeqTableNonGsm[inIdx].keySeq); | |
4672 BOOL isSuccess = FALSE; | |
4673 | |
4674 TRACE_FUNCTION ("ksd_seqSndDs ()"); | |
4675 | |
4676 dcdCple[0].type = SI_SHORT; | |
4677 dcdCple[0].param = &dirParam; | |
4678 | |
4679 dcdCple[1].type = SI_SHORT; | |
4680 dcdCple[1].param = &compParam; | |
4681 | |
4682 dcdCple[2].type = SI_LONG; | |
4683 dcdCple[2].param = &maxDictParam; | |
4684 | |
4685 dcdCple[3].type = SI_SHORT; | |
4686 dcdCple[3].param = &maxStrParam; | |
4687 | |
4688 *outSeqGrp = SEQGRP_SND_DS; | |
4689 | |
4690 if (ksd_extractSi (inSeq + lenKeySeq, siNum, | |
4691 &readChars, dcdCple) EQ TRUE) | |
4692 { | |
4693 outSeqParam->ds.dir = dirParam.siShort; | |
4694 outSeqParam->ds.comp = compParam.siShort; | |
4695 outSeqParam->ds.maxDict = maxDictParam.siLong; | |
4696 outSeqParam->ds.maxStr = maxStrParam.siShort; | |
4697 | |
4698 isSuccess = TRUE; | |
4699 } | |
4700 | |
4701 *outRestSeq = inSeq + lenKeySeq + readChars; | |
4702 | |
4703 return isSuccess; | |
4704 } | |
4705 #endif | |
4706 | |
4707 #ifdef SMI | |
4708 /* | |
4709 +--------------------------------------------------------------------+ | |
4710 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4711 | STATE : code ROUTINE : ksd_seqSpeechData | | |
4712 +--------------------------------------------------------------------+ | |
4713 | |
4714 PURPOSE : This function sets the ouput parameter for the | |
4715 SEQGRP_SPEECH_DATA key sequence. | |
4716 */ | |
4717 LOCAL BOOL ksd_seqSpeechData (USHORT inIdx, | |
4718 CHAR* inSeq, | |
4719 T_KSD_SEQGRP* outSeqGrp, | |
4720 CHAR** outRestSeq, | |
4721 T_KSD_SEQPARAM* outSeqParam) | |
4722 { | |
4723 TRACE_FUNCTION ("ksd_seqSpeechData ()"); | |
4724 | |
4725 *outSeqGrp = SEQGRP_SPEECH_DATA; | |
4726 *outRestSeq = inSeq + ksd_strlen(SPEECH_DATA_SEQ); | |
4727 | |
4728 return TRUE; | |
4729 } | |
4730 #endif | |
4731 | |
4732 #ifdef SMI | |
4733 /* | |
4734 +--------------------------------------------------------------------+ | |
4735 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4736 | STATE : code ROUTINE : ksd_seqDataSpeech | | |
4737 +--------------------------------------------------------------------+ | |
4738 | |
4739 PURPOSE : This function sets the ouput parameter for the | |
4740 SEQGRP_DATA_SPEECH key sequence. | |
4741 */ | |
4742 LOCAL BOOL ksd_seqDataSpeech (USHORT inIdx, | |
4743 CHAR* inSeq, | |
4744 T_KSD_SEQGRP* outSeqGrp, | |
4745 CHAR** outRestSeq, | |
4746 T_KSD_SEQPARAM* outSeqParam) | |
4747 { | |
4748 TRACE_FUNCTION ("ksd_seqDataSpeech ()"); | |
4749 | |
4750 *outSeqGrp = SEQGRP_DATA_SPEECH; | |
4751 *outRestSeq = inSeq + ksd_strlen(DATA_SPEECH_SEQ); | |
4752 | |
4753 return TRUE; | |
4754 } | |
4755 #endif | |
4756 | |
4757 /* | |
4758 +--------------------------------------------------------------------+ | |
4759 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4760 | STATE : code ROUTINE : ksd_seqUnknown | | |
4761 +--------------------------------------------------------------------+ | |
4762 | |
4763 PURPOSE : This function sets the ouput parameter for the | |
4764 SEQGRP_UNKNOWN key sequence. | |
4765 */ | |
4766 LOCAL BOOL ksd_seqUnknown (USHORT inIdx, | |
4767 CHAR* inSeq, | |
4768 T_KSD_SEQGRP* outSeqGrp, | |
4769 CHAR** outRestSeq, | |
4770 T_KSD_SEQPARAM* outSeqParam) | |
4771 { | |
4772 TRACE_FUNCTION ("ksd_seqUnknown ()"); | |
4773 | |
4774 *outSeqGrp = SEQGRP_UNKNOWN; | |
4775 *outRestSeq = inSeq; | |
4776 | |
4777 return TRUE; | |
4778 } | |
4779 | |
4780 /* | |
4781 +--------------------------------------------------------------------+ | |
4782 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4783 | STATE : code ROUTINE : ksd_isUSSD | | |
4784 +--------------------------------------------------------------------+ | |
4785 | |
4786 PURPOSE : This function checks whether key sequence is an | |
4787 unstructured SS command. | |
4788 | |
4789 <keySeq>: buffer containing the key sequence | |
4790 */ | |
4791 GLOBAL BOOL ksd_isUSSD (CHAR *keySeq) | |
4792 { | |
4793 USHORT i=0, lenKeySeq = strlen (keySeq); /* length of incoming */ | |
4794 /* sequence */ | |
4795 BOOL ussdStr=TRUE; | |
4796 | |
4797 TRACE_FUNCTION("ksd_isUSSD"); | |
4798 | |
4799 /* when operating in a US band (1900 or 850), "0" and "00" shall | |
4800 * be transmitted to the network as normal dialing numbers | |
4801 */ | |
4802 if ( ksd_isBCDForUSBand( keySeq ) ) | |
4803 { | |
4804 return FALSE; | |
4805 } | |
4806 | |
4807 /* If the last key sequence character is equal to STOP_SEQ, then check whether key | |
4808 * sequence contains dtmf separator('p','P','w','W'). If dtmf separator is present then | |
4809 * setup a call instead of sending the string as USSD to n/w. | |
4810 */ | |
4811 if (keySeq[lenKeySeq - 1] EQ STOP_SEQ) | |
4812 { | |
4813 for (; i<lenKeySeq AND (ussdStr EQ TRUE); i++) | |
4814 { | |
4815 switch(keySeq[i]) | |
4816 { | |
4817 case 'p': | |
4818 case 'P': | |
4819 case 'w': | |
4820 case 'W': | |
4821 ussdStr = FALSE; | |
4822 break; | |
4823 #ifdef FF_CPHS_REL4 | |
4824 /* If the suscriber wants to initiate a MO call using a profile( on a per | |
4825 call basis) other than the registered profile,then setup a call instead | |
4826 of sending the string as USSD to n/w | |
4827 */ | |
4828 case '*': | |
4829 if(i NEQ 0 AND keySeq[i+1] EQ '5' AND keySeq[i+2] EQ '9') | |
4830 { | |
4831 ussdStr = FALSE; | |
4832 } | |
4833 break; | |
4834 #endif | |
4835 } | |
4836 } | |
4837 } | |
4838 if (cuscfgParams.USSD_As_MO_Call EQ CUSCFG_MOD_Enable) | |
4839 { | |
4840 ussdStr = FALSE; | |
4841 } | |
4842 | |
4843 /* | |
4844 *----------------------------------------------------------------- | |
4845 * USSD starts with '*' or '#' and end with '#' | |
4846 *----------------------------------------------------------------- | |
4847 */ | |
4848 if (lenKeySeq >= MIN_USSD_LEN AND | |
4849 keySeq[lenKeySeq - 1] EQ STOP_SEQ AND | |
4850 ussdStr EQ TRUE) | |
4851 /* | |
4852 * As according to 2.30 : | |
4853 * "Entry of any characters defined in the GSM 03.38 [15] Default Alphabet | |
4854 * (up to the maximum defined in GSM 04.80 [17]), followed by #SEND". | |
4855 * is to be treated as USSD the startcheck is removed | |
4856 AND | |
4857 (keySeq[0] EQ START_SEQ_1 OR keySeq[0] EQ START_SEQ_2)) | |
4858 */ | |
4859 { | |
4860 return TRUE; | |
4861 } | |
4862 else | |
4863 { | |
4864 return FALSE; | |
4865 } | |
4866 } | |
4867 | |
4868 /* | |
4869 +--------------------------------------------------------------------+ | |
4870 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4871 | STATE : code ROUTINE : ksd_searchChr | | |
4872 +--------------------------------------------------------------------+ | |
4873 | |
4874 PURPOSE : This function is used to search for the next appearance | |
4875 of a character in a given buffer. | |
4876 | |
4877 <from>: start searching from this address | |
4878 <to>: stop searching when reaching this address | |
4879 <c>: the character to be searched | |
4880 <inclFirstChar>: | |
4881 searching starts at address <from> when TRUE, | |
4882 at address <from + 1> when FALSE | |
4883 | |
4884 returns: a pointer pointing to the found character | |
4885 */ | |
4886 LOCAL CHAR* ksd_searchChr (CHAR* from, | |
4887 CHAR* to, | |
4888 int c, | |
4889 BOOL inclFirstChar) | |
4890 { | |
4891 CHAR* result; /* pointer to the found character */ | |
4892 | |
4893 /* | |
4894 *----------------------------------------------------------------- | |
4895 * valid starting point is needed | |
4896 *----------------------------------------------------------------- | |
4897 */ | |
4898 if (from EQ NULL) | |
4899 return NULL; | |
4900 | |
4901 /* | |
4902 *----------------------------------------------------------------- | |
4903 * leave out the first character | |
4904 *----------------------------------------------------------------- | |
4905 */ | |
4906 if (!inclFirstChar) | |
4907 from++; | |
4908 | |
4909 if ((result = strchr (from, c)) EQ NULL) | |
4910 return NULL; | |
4911 | |
4912 /* | |
4913 *----------------------------------------------------------------- | |
4914 * found characters after the given end point are not considered | |
4915 *----------------------------------------------------------------- | |
4916 */ | |
4917 if (to NEQ NULL AND result >= to) | |
4918 result = NULL; | |
4919 | |
4920 return result; | |
4921 } | |
4922 | |
4923 /* | |
4924 +--------------------------------------------------------------------+ | |
4925 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4926 | STATE : code ROUTINE : ksd_scanSi | | |
4927 +--------------------------------------------------------------------+ | |
4928 | |
4929 PURPOSE : This function scans a buffer whether it contains a valid | |
4930 SI parameter. | |
4931 | |
4932 <inSeq>: buffer containing the SI parameter | |
4933 <inLen>: number of characters to be taken into account | |
4934 <inSiInd>: indicates the data type of the SI parameter | |
4935 <outSi>: the scanned parameter | |
4936 | |
4937 returns: TRUE if the scanning was successful, | |
4938 otherwise false. | |
4939 */ | |
4940 LOCAL BOOL ksd_scanSi (CHAR* inSeq, | |
4941 USHORT inLen, | |
4942 T_KSD_SI inSiInd, | |
4943 T_KSD_SIPARAM* outSi) | |
4944 { | |
4945 BOOL ret = FALSE; /* indicates the success of scanning */ | |
4946 | |
4947 TRACE_FUNCTION ("ksd_scanSi ()"); | |
4948 | |
4949 switch (inSiInd) | |
4950 { | |
4951 case (SI_UBYTE): | |
4952 ret = utl_string2UByte (inSeq, inLen, &outSi->siUbyte); | |
4953 break; | |
4954 | |
4955 case (SI_USHORT): | |
4956 break; | |
4957 | |
4958 case (SI_ULONG): | |
4959 break; | |
4960 | |
4961 case (SI_BYTE): | |
4962 ret = utl_string2Byte (inSeq, inLen, &outSi->siByte); | |
4963 break; | |
4964 | |
4965 case (SI_SHORT): | |
4966 ret = utl_string2Short (inSeq, inLen, &outSi->siShort); | |
4967 break; | |
4968 | |
4969 case (SI_LONG): | |
4970 ret = utl_string2Long (inSeq, inLen, &outSi->siLong); | |
4971 break; | |
4972 | |
4973 case (SI_CHAR_STAR): | |
4974 if (*inSeq NEQ START_SI AND *inSeq NEQ STOP_SEQ) | |
4975 outSi->siCharStar = inSeq; | |
4976 | |
4977 ret = TRUE; | |
4978 break; | |
4979 | |
4980 default: | |
4981 break; | |
4982 } | |
4983 | |
4984 return ret; | |
4985 } | |
4986 | |
4987 /* | |
4988 +--------------------------------------------------------------------+ | |
4989 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
4990 | STATE : code ROUTINE : ksd_extractSi | | |
4991 +--------------------------------------------------------------------+ | |
4992 | |
4993 PURPOSE : This function extracts the SIs from the key sequence. | |
4994 | |
4995 <inSeq>: key sequence to be decoded | |
4996 <inSiNum>: number of SI to be decoded | |
4997 <outCharsNum>: number of characters read | |
4998 <inOutSi>: decoded SI and predefined type of SI | |
4999 | |
5000 returns: TRUE if SI are extracted successfully, | |
5001 otherwise FALSE | |
5002 */ | |
5003 LOCAL BOOL ksd_extractSi (CHAR* inSeq, | |
5004 USHORT inSiNum, | |
5005 USHORT* outCharsNum, | |
5006 T_KSD_DCD_CPLE* inOutSi) | |
5007 { | |
5008 USHORT readChars = 0; /* number of characters read */ | |
5009 CHAR* siEnd; /* points to the end of key sequence*/ | |
5010 /* ('#' character is searched) */ | |
5011 CHAR* siNextStart; /* points to the start of the next */ | |
5012 /* SI field */ | |
5013 CHAR* siNextStop; /* points to the end of the next SI */ | |
5014 /* field */ | |
5015 BOOL scanSuccess = TRUE; /* indicates whether scanning is */ | |
5016 /* successfull */ | |
5017 BOOL siEndReached = FALSE; /* indicates whether the last SI */ | |
5018 /* field is reached */ | |
5019 USHORT i; /* used for counting */ | |
5020 BOOL isSuccess = FALSE; /* indicates whether the extraction */ | |
5021 /* process is successfull */ | |
5022 | |
5023 TRACE_FUNCTION ("ksd_extractSi ()"); | |
5024 | |
5025 if ((siEnd = ksd_searchChr (inSeq, NULL, STOP_SEQ, TRUE)) NEQ NULL) | |
5026 { | |
5027 /* | |
5028 *--------------------------------------------------------------- | |
5029 * a supplementary information delimiter closing the key | |
5030 * sequence was found | |
5031 *--------------------------------------------------------------- | |
5032 */ | |
5033 readChars++; | |
5034 | |
5035 if (siEnd NEQ inSeq) | |
5036 { | |
5037 /* | |
5038 *------------------------------------------------------------- | |
5039 * searching for the next supplementary information delimiter | |
5040 * but not for those closing the key sequence | |
5041 *------------------------------------------------------------- | |
5042 */ | |
5043 siNextStart = ksd_searchChr (inSeq, siEnd, START_SI, TRUE); | |
5044 | |
5045 if (siNextStart NEQ inSeq) | |
5046 /* | |
5047 *----------------------------------------------------------- | |
5048 * the next supplementary information delimiter must be the | |
5049 * first character in string, otherwise a failure occured | |
5050 *----------------------------------------------------------- | |
5051 */ | |
5052 readChars = 0; | |
5053 else | |
5054 { | |
5055 /* | |
5056 *----------------------------------------------------------- | |
5057 * searching for the next supplementary information delimiter | |
5058 * but not for those closing the key sequence | |
5059 *----------------------------------------------------------- | |
5060 */ | |
5061 siNextStop = ksd_searchChr (siNextStart, | |
5062 siEnd, | |
5063 START_SI, | |
5064 FALSE); | |
5065 | |
5066 i = 0; | |
5067 | |
5068 /* | |
5069 *----------------------------------------------------------- | |
5070 * successive decoding of the supplementary information | |
5071 *----------------------------------------------------------- | |
5072 */ | |
5073 while (scanSuccess AND i < inSiNum AND !siEndReached) | |
5074 { | |
5075 if (siNextStop NEQ NULL) | |
5076 { | |
5077 /* | |
5078 *------------------------------------------------------- | |
5079 * scan the next supplementary information | |
5080 *------------------------------------------------------- | |
5081 */ | |
5082 scanSuccess = ksd_scanSi (siNextStart + 1, | |
5083 (USHORT)( siNextStop | |
5084 - siNextStart | |
5085 - 1), | |
5086 inOutSi[i].type, | |
5087 inOutSi[i].param); | |
5088 readChars += siNextStop - siNextStart; | |
5089 *siNextStop = NULL_TERM; | |
5090 siNextStart = siNextStop; | |
5091 siNextStop = ksd_searchChr (siNextStart, | |
5092 siEnd, | |
5093 START_SI, | |
5094 FALSE); | |
5095 | |
5096 } | |
5097 else | |
5098 { | |
5099 /* | |
5100 *------------------------------------------------------- | |
5101 * scan the last supplementary information | |
5102 *------------------------------------------------------- | |
5103 */ | |
5104 scanSuccess = ksd_scanSi (siNextStart + 1, | |
5105 (USHORT)( siEnd | |
5106 - siNextStart | |
5107 - 1), | |
5108 inOutSi[i].type, | |
5109 inOutSi[i].param); | |
5110 readChars += siEnd - siNextStart; | |
5111 *siEnd = NULL_TERM; | |
5112 | |
5113 siEndReached = TRUE; | |
5114 } | |
5115 | |
5116 i++; | |
5117 } | |
5118 | |
5119 if (!scanSuccess OR (i EQ inSiNum AND !siEndReached)) | |
5120 isSuccess = FALSE; | |
5121 else | |
5122 isSuccess = TRUE; | |
5123 } | |
5124 } | |
5125 else | |
5126 { | |
5127 isSuccess = TRUE; | |
5128 } | |
5129 } | |
5130 | |
5131 *outCharsNum = readChars; | |
5132 | |
5133 return isSuccess; | |
5134 } | |
5135 | |
5136 /* | |
5137 +--------------------------------------------------------------------+ | |
5138 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
5139 | STATE : code ROUTINE : ksd_decode | | |
5140 +--------------------------------------------------------------------+ | |
5141 | |
5142 PURPOSE : This function decodes the incoming keystroke sequence. | |
5143 | |
5144 <inSeq>: key sequence, to be decoded | |
5145 <inCall>: TRUE if MMI is within a call, otherwise | |
5146 FALSE | |
5147 <outSeqGrp>: sequence group | |
5148 <outRestSeq>: rest key sequence, to be decoded by a | |
5149 further call to this function | |
5150 <outSeqParam>: sequence parameter | |
5151 | |
5152 returns: TRUE if decoding was successfull, | |
5153 otherwise FALSE | |
5154 */ | |
5155 GLOBAL BOOL ksd_decode (CHAR* inSeq, | |
5156 BOOL inCall, | |
5157 T_KSD_SEQGRP* outSeqGrp, | |
5158 CHAR** outRestSeq, | |
5159 T_KSD_SEQPARAM* outSeqParam) | |
5160 { | |
5161 USHORT lastIdx; /* index of the last character in key */ | |
5162 /* sequence stored in sequence table */ | |
5163 BOOL isEqual = FALSE; /* indicates whether incoming sequence */ | |
5164 /* matches key sequence in sequence */ | |
5165 /* table */ | |
5166 USHORT i; /* used for counting */ | |
5167 USHORT j; /* counts the number of key sequence */ | |
5168 /* tables already searched through */ | |
5169 BOOL isSuccess = FALSE; /* indicates whether decoding was */ | |
5170 /* successfull */ | |
5171 const T_KEY_SEQ_TABLE* table; /* actual key sequence table */ | |
5172 | |
5173 TRACE_FUNCTION ("ksd_decode ()"); | |
5174 | |
5175 *outSeqGrp = SEQGRP_UNKNOWN; | |
5176 *outRestSeq = inSeq; | |
5177 | |
5178 if (inSeq EQ NULL OR strlen (inSeq) EQ 0) | |
5179 { | |
5180 return TRUE; | |
5181 } | |
5182 | |
5183 /* | |
5184 *----------------------------------------------------------------- | |
5185 * determining whether incoming sequence starts with a well known | |
5186 * key sequence | |
5187 *----------------------------------------------------------------- | |
5188 * the four tables 'keySeqTable', 'keySeqTableNonGsm', 'keyPasswd' | |
5189 * and 'keyPasswdNonGsm' are searched through | |
5190 *----------------------------------------------------------------- | |
5191 */ | |
5192 j = 0; | |
5193 table = &keySeqTable[0]; | |
5194 | |
5195 while (j < 4 AND !isEqual) | |
5196 { | |
5197 i = 0; | |
5198 | |
5199 while (table[i].keySeq NEQ NULL AND !isEqual) | |
5200 { | |
5201 lastIdx = strlen (table[i].keySeq) - 1; | |
5202 | |
5203 if (!strncmp (inSeq, table[i].keySeq, ksd_strlen (table[i].keySeq)) | |
5204 AND ( inSeq[lastIdx] EQ START_SI | |
5205 OR inSeq[lastIdx] EQ STOP_SEQ | |
5206 OR table[i].keySeq[lastIdx] NEQ DONT_CARE) ) | |
5207 { | |
5208 isEqual = TRUE; | |
5209 } | |
5210 else | |
5211 { | |
5212 i++; | |
5213 } | |
5214 } | |
5215 | |
5216 if (!isEqual) | |
5217 { | |
5218 switch (j) | |
5219 { | |
5220 case (0): table = &keySeqTableNonGsm[0]; break; | |
5221 case (1): table = &keyPasswd[0]; break; | |
5222 case (2): table = &keyPasswdNonGsm[0]; break; | |
5223 default : break; | |
5224 } | |
5225 } | |
5226 | |
5227 j++; | |
5228 } | |
5229 | |
5230 if (isEqual) | |
5231 isSuccess = table[i].func (i, | |
5232 inSeq, | |
5233 outSeqGrp, | |
5234 outRestSeq, | |
5235 outSeqParam); | |
5236 else | |
5237 { | |
5238 if (ksd_isUSSD (inSeq)) | |
5239 /* | |
5240 *------------------------------------------------------------- | |
5241 * incoming sequence is handled like an unstructured | |
5242 * SS command | |
5243 *------------------------------------------------------------- | |
5244 */ | |
5245 isSuccess = ksd_seqUssd (i, | |
5246 inSeq, | |
5247 outSeqGrp, | |
5248 outRestSeq, | |
5249 outSeqParam); | |
5250 else | |
5251 { | |
5252 /* | |
5253 *------------------------------------------------------------- | |
5254 * the handlings of the sequences for changing the call | |
5255 * mode are separated from the normal handling to avoid | |
5256 * an incorrect interpretation | |
5257 *------------------------------------------------------------- | |
5258 */ | |
5259 #ifdef SMI | |
5260 if (strncmp (inSeq, DATA_SPEECH_SEQ, | |
5261 ksd_strlen(DATA_SPEECH_SEQ)) EQ 0) | |
5262 isSuccess = ksd_seqDataSpeech (i, | |
5263 inSeq, | |
5264 outSeqGrp, | |
5265 outRestSeq, | |
5266 outSeqParam); | |
5267 else if (strncmp (inSeq, SPEECH_DATA_SEQ, | |
5268 ksd_strlen(SPEECH_DATA_SEQ)) EQ 0) | |
5269 isSuccess = ksd_seqSpeechData (i, | |
5270 inSeq, | |
5271 outSeqGrp, | |
5272 outRestSeq, | |
5273 outSeqParam); | |
5274 else | |
5275 #endif | |
5276 { | |
5277 /* | |
5278 *------------------------------------------------------------- | |
5279 * determining whether incoming sequence starts with a | |
5280 * well known key sequence specific for in call mode | |
5281 *------------------------------------------------------------- | |
5282 */ | |
5283 //TISH, patch for OMAPS00110151/OMAPS00130693 | |
5284 //start | |
5285 // if (inCall) | |
5286 // if (inCall AND (strlen(inSeq) EQ 1)) //disabled by Jinshu Wang, 2007-05-05 | |
5287 if (inCall AND !((psaCC_ctbCountActiveCall() EQ 1) AND (strlen(inSeq) EQ 2) AND (inSeq[0] EQ '1'))) | |
5288 //end | |
5289 { | |
5290 i = 0; | |
5291 table = &keyWithinCall[0]; | |
5292 | |
5293 while (table[i].keySeq NEQ NULL AND | |
5294 strncmp (inSeq, | |
5295 table[i].keySeq, | |
5296 ksd_strlen (table[i].keySeq)) NEQ 0) | |
5297 i++; | |
5298 | |
5299 if (table[i].keySeq NEQ NULL) | |
5300 isSuccess = table[i].func (i, | |
5301 inSeq, | |
5302 outSeqGrp, | |
5303 outRestSeq, | |
5304 outSeqParam); | |
5305 } | |
5306 | |
5307 if (!isSuccess) | |
5308 isSuccess = ksd_seqDialIdx (i, | |
5309 inSeq, | |
5310 outSeqGrp, | |
5311 outRestSeq, | |
5312 outSeqParam); | |
5313 | |
5314 if (!isSuccess) | |
5315 isSuccess = ksd_seqDial (i, | |
5316 inSeq, | |
5317 outSeqGrp, | |
5318 outRestSeq, | |
5319 outSeqParam); | |
5320 } | |
5321 } | |
5322 } | |
5323 | |
5324 return isSuccess; | |
5325 } | |
5326 | |
5327 /* | |
5328 +--------------------------------------------------------------------+ | |
5329 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
5330 | STATE : code ROUTINE : ksd_getPwdHidden | | |
5331 +--------------------------------------------------------------------+ | |
5332 | |
5333 PURPOSE : This function is used to hide passwords which are being | |
5334 entered during input of a keystroke sequence. | |
5335 | |
5336 <inSeq>: key sequence to be manipulated | |
5337 <replace>: character which is used for replacing of | |
5338 passwords | |
5339 */ | |
5340 GLOBAL void ksd_getPwdHidden (CHAR* inSeq, | |
5341 CHAR replace) | |
5342 { | |
5343 USHORT lastIdx; /* index of the last character in key */ | |
5344 BOOL isEqual = FALSE; /* indicates whether incoming sequence */ | |
5345 /* matches key sequence in sequence */ | |
5346 /* table */ | |
5347 USHORT i; /* used for counting */ | |
5348 USHORT j; /* counts the number of key sequence */ | |
5349 /* tables already searched through */ | |
5350 CHAR bufSeq[MAX_KEYSEQ_SIZE]; /* local copy of incoming */ | |
5351 /* sequence */ | |
5352 const T_KEY_SEQ_TABLE* table; /* actual key sequence table */ | |
5353 | |
5354 CHAR* restSeq; /* rest sequence */ | |
5355 T_KSD_SEQGRP seqGrp; /* seqeunce group */ | |
5356 T_KSD_SEQPARAM seqParam; /* sequence parameter */ | |
5357 | |
5358 TRACE_FUNCTION ("ksd_getPwdHidden ()"); | |
5359 | |
5360 if (inSeq EQ NULL) | |
5361 return; | |
5362 else if (strlen (inSeq) EQ 0) | |
5363 return; | |
5364 | |
5365 /* | |
5366 *----------------------------------------------------------------- | |
5367 * make a local copy of the incoming sequence | |
5368 *----------------------------------------------------------------- | |
5369 * decoding process used for identify the sequence group might | |
5370 * change content of string | |
5371 *----------------------------------------------------------------- | |
5372 */ | |
5373 strncpy (bufSeq, inSeq, MAX_KEYSEQ_SIZE-1); | |
5374 bufSeq[MAX_KEYSEQ_SIZE-1] = NULL_TERM; | |
5375 | |
5376 /* | |
5377 *----------------------------------------------------------------- | |
5378 * determining whether incoming sequence starts with a well known | |
5379 * key sequence which contains passwords | |
5380 *----------------------------------------------------------------- | |
5381 * the two tables 'keyPasswd' and 'keyPasswdNonGsm' are searched | |
5382 * through | |
5383 *----------------------------------------------------------------- | |
5384 */ | |
5385 j = 0; | |
5386 table = &keyPasswd[0]; | |
5387 | |
5388 while (j < 2 AND !isEqual) | |
5389 { | |
5390 i = 0; | |
5391 | |
5392 while (table[i].keySeq NEQ NULL AND !isEqual) | |
5393 { | |
5394 lastIdx = strlen (table[i].keySeq) - 1; | |
5395 | |
5396 if (!strncmp (inSeq, table[i].keySeq, ksd_strlen (table[i].keySeq)) | |
5397 AND ( inSeq[lastIdx] EQ START_SI | |
5398 OR inSeq[lastIdx] EQ STOP_SEQ | |
5399 OR table[i].keySeq[lastIdx] NEQ DONT_CARE) ) | |
5400 { | |
5401 isEqual = TRUE; | |
5402 } | |
5403 else | |
5404 { | |
5405 i++; | |
5406 } | |
5407 } | |
5408 | |
5409 if (!isEqual) | |
5410 { | |
5411 table = &keyPasswdNonGsm[0]; | |
5412 } | |
5413 | |
5414 j++; | |
5415 } | |
5416 | |
5417 if (isEqual) | |
5418 { | |
5419 CHAR* token = inSeq + ksd_strlen(table[i].keySeq); | |
5420 CHAR* endToken = inSeq + strlen (inSeq) - 1; | |
5421 | |
5422 (void)table[i].func (i, | |
5423 bufSeq, | |
5424 &seqGrp, | |
5425 &restSeq, | |
5426 &seqParam); | |
5427 | |
5428 switch (seqGrp) | |
5429 { | |
5430 case (SEQGRP_ACT_SIM_LOCK): | |
5431 case (SEQGRP_DEACT_SIM_LOCK): | |
5432 case (SEQGRP_CB): | |
5433 { | |
5434 /* | |
5435 *--------------------------------------------------------- | |
5436 * replace only the characters of the first supplementary | |
5437 * information field | |
5438 *--------------------------------------------------------- | |
5439 */ | |
5440 if (*token EQ START_SI) | |
5441 { | |
5442 token++; | |
5443 | |
5444 while (token <= endToken AND | |
5445 *token NEQ STOP_SEQ AND | |
5446 *token NEQ START_SI ) | |
5447 { | |
5448 *token = replace; | |
5449 token++; | |
5450 } | |
5451 } | |
5452 } | |
5453 break; | |
5454 | |
5455 case (SEQGRP_PWD): | |
5456 case (SEQGRP_UBLK): | |
5457 { | |
5458 j = 0; | |
5459 | |
5460 /* | |
5461 *--------------------------------------------------------- | |
5462 * replace the characters of the first three supplementary | |
5463 * information fields | |
5464 *--------------------------------------------------------- | |
5465 */ | |
5466 while (j < 3) | |
5467 { | |
5468 if (*token EQ START_SI) | |
5469 { | |
5470 token++; | |
5471 | |
5472 while (token <= endToken AND | |
5473 *token NEQ STOP_SEQ AND | |
5474 *token NEQ START_SI ) | |
5475 { | |
5476 *token = replace; | |
5477 token++; | |
5478 } | |
5479 } | |
5480 | |
5481 j++; | |
5482 } | |
5483 } | |
5484 break; | |
5485 | |
5486 default: | |
5487 break; | |
5488 } | |
5489 } | |
5490 } | |
5491 | |
5492 /* | |
5493 +--------------------------------------------------------------------+ | |
5494 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
5495 | STATE : code ROUTINE : ksd_isSATSscs | | |
5496 +--------------------------------------------------------------------+ | |
5497 | |
5498 PURPOSE : This function return whether the given string is a | |
5499 supplementary service control string for SAT. | |
5500 | |
5501 <inSeq>: key sequence | |
5502 | |
5503 returns: TRUE if string is a supplementary service | |
5504 control string, otherwise FALSE | |
5505 */ | |
5506 GLOBAL BOOL ksd_isSATSscs ( CHAR* inSeq ) | |
5507 { | |
5508 char *clirSeq; | |
5509 | |
5510 if ( !ksd_isSscs ( inSeq ) ) | |
5511 { | |
5512 return ( FALSE ); | |
5513 } | |
5514 | |
5515 if ( (clirSeq = strstr ( inSeq, KSD_SUPPRESS_CLIR )) NEQ NULL ) | |
5516 { | |
5517 clirSeq += strlen ( KSD_SUPPRESS_CLIR ); | |
5518 } | |
5519 else if ( (clirSeq = strstr ( inSeq, KSD_INVOKE_CLIR )) NEQ NULL ) | |
5520 { | |
5521 clirSeq += strlen ( KSD_INVOKE_CLIR ); | |
5522 } | |
5523 else | |
5524 { | |
5525 return ( TRUE ); /* no CLIR override found */ | |
5526 } | |
5527 | |
5528 if ( *clirSeq NEQ '\0' ) | |
5529 { | |
5530 /* number is provided */ | |
5531 return ( FALSE ); | |
5532 } | |
5533 return ( TRUE ); | |
5534 } | |
5535 | |
5536 /* | |
5537 +--------------------------------------------------------------------+ | |
5538 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
5539 | STATE : code ROUTINE : ksd_isSscs | | |
5540 +--------------------------------------------------------------------+ | |
5541 | |
5542 PURPOSE : This function return whether the given string is a !known! | |
5543 supplementary service control string. (ussd return FALSE !!) | |
5544 | |
5545 <inSeq>: key sequence | |
5546 | |
5547 returns: TRUE if string is a supplementary service | |
5548 control string, otherwise FALSE | |
5549 */ | |
5550 GLOBAL BOOL ksd_isSscs (CHAR* inSeq) | |
5551 { | |
5552 USHORT lastIdx; /* index of the last character in key */ | |
5553 /* sequence stored in sequence table */ | |
5554 BOOL isEqual = FALSE; /* indicates whether incoming sequence */ | |
5555 /* matches key sequence in sequence */ | |
5556 /* table */ | |
5557 USHORT i; /* used for counting */ | |
5558 USHORT j; /* counts the number of key sequence */ | |
5559 /* tables already searched through */ | |
5560 BOOL isSscs = FALSE; /* indicates whether decoding was */ | |
5561 /* successfull */ | |
5562 const T_KEY_SEQ_TABLE* table; /* actual key sequence table */ | |
5563 | |
5564 TRACE_FUNCTION ("ksd_isSscs ()"); | |
5565 | |
5566 if (inSeq EQ NULL OR strlen (inSeq) EQ 0) | |
5567 { | |
5568 return isSscs; | |
5569 } | |
5570 | |
5571 /* | |
5572 *----------------------------------------------------------------- | |
5573 * determining whether incoming sequence starts with a well known | |
5574 * key sequence | |
5575 *----------------------------------------------------------------- | |
5576 * the two tables 'keySeqTable' and 'keyPasswd' are searched | |
5577 * through | |
5578 *----------------------------------------------------------------- | |
5579 */ | |
5580 j = 0; | |
5581 table = &keySeqTable[0]; | |
5582 | |
5583 while (j < 2 AND !isEqual) | |
5584 { | |
5585 i = 0; | |
5586 | |
5587 while (table[i].keySeq NEQ NULL AND !isEqual) | |
5588 { | |
5589 lastIdx = strlen (table[i].keySeq) - 1; | |
5590 | |
5591 if (!strncmp (inSeq, table[i].keySeq, ksd_strlen (table[i].keySeq)) | |
5592 AND ( inSeq[lastIdx] EQ START_SI | |
5593 OR inSeq[lastIdx] EQ STOP_SEQ | |
5594 OR table[i].keySeq[lastIdx] NEQ DONT_CARE) ) | |
5595 { | |
5596 isEqual = TRUE; | |
5597 } | |
5598 else | |
5599 { | |
5600 i++; | |
5601 } | |
5602 } | |
5603 | |
5604 if (!isEqual) | |
5605 { | |
5606 table = &keyPasswd[0]; | |
5607 } | |
5608 | |
5609 j++; | |
5610 } | |
5611 | |
5612 if (isEqual /*OR ksd_isUSSD (inSeq)*/) /* changed from clb 05/12/00 for SAT */ | |
5613 { | |
5614 isSscs = TRUE; | |
5615 } | |
5616 | |
5617 return isSscs; | |
5618 } | |
5619 | |
5620 /* | |
5621 +--------------------------------------------------------------------+ | |
5622 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
5623 | STATE : code ROUTINE : ksd_isFDNCheckSeq | | |
5624 +--------------------------------------------------------------------+ | |
5625 | |
5626 PURPOSE : This function return whether the given string must check | |
5627 in FDN phonebook | |
5628 | |
5629 <inSeq>: key sequence | |
5630 | |
5631 returns: TRUE if string must check, | |
5632 otherwise FALSE | |
5633 */ | |
5634 | |
5635 GLOBAL BOOL ksd_isFDNCheckSeq (CHAR* inSeq) | |
5636 { | |
5637 USHORT lastIdx; /* index of the last character in key */ | |
5638 /* sequence stored in sequence table */ | |
5639 USHORT i=0; /* used for counting */ | |
5640 | |
5641 TRACE_FUNCTION ("ksd_isFDNCheckSeq ()"); | |
5642 | |
5643 if ( ( inSeq EQ NULL ) OR ( *inSeq EQ '\0' ) ) | |
5644 { | |
5645 return ( FALSE ); /* no check */ | |
5646 } | |
5647 /* check if the inSeq a key sequence */ | |
5648 if ( ( *inSeq NEQ START_SEQ_1 ) AND ( *inSeq NEQ START_SEQ_2 ) ) | |
5649 { | |
5650 /* normal number must check in FDN */ | |
5651 return ( TRUE ); /* check */ | |
5652 } | |
5653 | |
5654 /* | |
5655 *----------------------------------------------------------------- | |
5656 * determining whether incoming sequence starts with a well known | |
5657 * key sequence | |
5658 */ | |
5659 while ( keyNoFDNSeqTable[i].keySeq NEQ NULL ) | |
5660 { | |
5661 lastIdx = strlen (keyNoFDNSeqTable[i].keySeq) - 1; | |
5662 | |
5663 if ( strncmp ( inSeq, | |
5664 keyNoFDNSeqTable[i].keySeq, | |
5665 ksd_strlen ( keyNoFDNSeqTable[i].keySeq ) ) EQ 0 ) | |
5666 { | |
5667 if ( keyNoFDNSeqTable[i].keySeq[lastIdx] EQ DONT_CARE ) | |
5668 { | |
5669 if ( inSeq[lastIdx] EQ START_SI OR inSeq[lastIdx] EQ STOP_SEQ ) | |
5670 { | |
5671 return ( FALSE ); /* no check */ | |
5672 } | |
5673 } | |
5674 else | |
5675 { | |
5676 return ( FALSE ); /* no check */ | |
5677 } | |
5678 } | |
5679 i++; | |
5680 } | |
5681 | |
5682 return ( TRUE ); /* check */ | |
5683 } | |
5684 | |
5685 | |
5686 /* | |
5687 +--------------------------------------------------------------------+ | |
5688 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
5689 | STATE : code ROUTINE : ksd_isBCDForUSBand | | |
5690 +--------------------------------------------------------------------+ | |
5691 | |
5692 PURPOSE : This function checks if US band is used and key sequence | |
5693 is "0" or "00", because these key sequences shall be send | |
5694 to network as normal dialing numbers when using US band. | |
5695 | |
5696 <inSeq>: key sequence | |
5697 | |
5698 returns: TRUE if US band is used and key sequence | |
5699 is "0" or "00", | |
5700 otherwise FALSE | |
5701 */ | |
5702 GLOBAL BOOL ksd_isBCDForUSBand (CHAR* inSeq) | |
5703 { | |
5704 SHORT mcc,mnc; | |
5705 | |
5706 TRACE_FUNCTION("ksd_isBCDForUSBand()"); | |
5707 | |
5708 /* | |
5709 * Get the current MCC (and MNC, although we are not interested | |
5710 * in that) in SHORT form. | |
5711 */ | |
5712 cmhMM_CnvrtPLMN2INT(mmShrdPrm.usedPLMN.mcc,mmShrdPrm.usedPLMN.mnc,&mcc,&mnc); | |
5713 | |
5714 /* | |
5715 * Check if band is US band, based on whether the current MCC is | |
5716 * a US MCC. | |
5717 */ | |
5718 if ((mcc>=0x310) AND (mcc<=0x316)) | |
5719 { | |
5720 /* US band is used, check key sequence */ | |
5721 if ( !strcmp(inSeq, "0") OR !strcmp(inSeq, "00") ) | |
5722 { | |
5723 TRACE_EVENT("US band detected, %s are normal dialing numbers"); | |
5724 return TRUE; | |
5725 } | |
5726 } | |
5727 | |
5728 return FALSE; | |
5729 } | |
5730 | |
5731 /* | |
5732 +--------------------------------------------------------------------+ | |
5733 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
5734 | STATE : code ROUTINE : ksd_check_write_to_LDN | | |
5735 +--------------------------------------------------------------------+ | |
5736 | |
5737 PURPOSE : This function is used to decide if the keystroke sequence needs to | |
5738 be stored in the LDN or not. | |
5739 | |
5740 <inSeq>: key sequence | |
5741 | |
5742 returns: TRUE if the keystroke sequence doesn't contain password | |
5743 or it is not a local string | |
5744 otherwise FALSE | |
5745 */ | |
5746 GLOBAL BOOL ksd_isLDNWriteCheckSeq (CHAR* inSeq) | |
5747 { | |
5748 | |
5749 USHORT lastIdx; /* index of the last character in key */ | |
5750 /* sequence stored in sequence table */ | |
5751 USHORT i; /* used for counting */ | |
5752 USHORT j; /* counts the number of key sequence */ | |
5753 /* tables already searched through */ | |
5754 const T_KEY_SEQ_TABLE* table; /* actual key sequence table */ | |
5755 | |
5756 TRACE_FUNCTION("ksd_isLDNWriteCheckSeq()"); | |
5757 | |
5758 if (inSeq EQ NULL OR strlen (inSeq) EQ 0) | |
5759 { | |
5760 return TRUE; | |
5761 } | |
5762 | |
5763 j = 0; | |
5764 table = &keySeqTableNonGsm[0]; | |
5765 | |
5766 while (j < 4) | |
5767 { | |
5768 i = 0; | |
5769 | |
5770 while (table[i].keySeq NEQ NULL) | |
5771 { | |
5772 lastIdx = strlen (table[i].keySeq) - 1; | |
5773 | |
5774 if (!strncmp (inSeq, table[i].keySeq, ksd_strlen (table[i].keySeq)) | |
5775 AND ( inSeq[lastIdx] EQ START_SI | |
5776 OR inSeq[lastIdx] EQ STOP_SEQ | |
5777 OR table[i].keySeq[lastIdx] NEQ DONT_CARE) ) | |
5778 { | |
5779 return FALSE; | |
5780 } | |
5781 else | |
5782 { | |
5783 i++; | |
5784 } | |
5785 } | |
5786 | |
5787 switch (j) | |
5788 { | |
5789 case (0): table = &keyPasswd[0]; break; | |
5790 case (1): table = &keyPasswdNonGsm[0]; break; | |
5791 case (2): table = &keyNoFDNSeqTable[0]; break; | |
5792 default : break; | |
5793 } | |
5794 | |
5795 j++; | |
5796 } | |
5797 return TRUE; | |
5798 } | |
5799 | |
5800 /* | |
5801 +--------------------------------------------------------------------+ | |
5802 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
5803 | STATE : code ROUTINE : ksd_seqRegPwdOutBarrServ | | |
5804 +--------------------------------------------------------------------+ | |
5805 | |
5806 PURPOSE : This function sets the ouput parameter for the | |
5807 SEQGRP_PWD, key sequence. | |
5808 */ | |
5809 LOCAL BOOL ksd_seqRegPwdOutBarrServ (USHORT inIdx, | |
5810 CHAR* inSeq, | |
5811 T_KSD_SEQGRP* outSeqGrp, | |
5812 CHAR** outRestSeq, | |
5813 T_KSD_SEQPARAM* outSeqParam) | |
5814 { | |
5815 TRACE_FUNCTION ("ksd_seqRegPwdOutBarrServ ()"); | |
5816 | |
5817 outSeqParam->pwd.ssCd = KSD_SS_BOC; | |
5818 | |
5819 *outSeqGrp = SEQGRP_PWD; | |
5820 | |
5821 return ksd_getCpwdFromTriplePw (inIdx, inSeq, outRestSeq, outSeqParam); | |
5822 } | |
5823 | |
5824 /* | |
5825 +--------------------------------------------------------------------+ | |
5826 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
5827 | STATE : code ROUTINE : ksd_seqRegPwdInBarrServ | | |
5828 +--------------------------------------------------------------------+ | |
5829 | |
5830 PURPOSE : This function sets the ouput parameter for the | |
5831 SEQGRP_PWD, key sequence. | |
5832 */ | |
5833 LOCAL BOOL ksd_seqRegPwdInBarrServ (USHORT inIdx, | |
5834 CHAR* inSeq, | |
5835 T_KSD_SEQGRP* outSeqGrp, | |
5836 CHAR** outRestSeq, | |
5837 T_KSD_SEQPARAM* outSeqParam) | |
5838 { | |
5839 TRACE_FUNCTION ("ksd_seqRegPwdInBarrServ ()"); | |
5840 | |
5841 outSeqParam->pwd.ssCd = KSD_SS_BIC; | |
5842 | |
5843 *outSeqGrp = SEQGRP_PWD; | |
5844 | |
5845 return ksd_getCpwdFromTriplePw (inIdx, inSeq, outRestSeq, outSeqParam); | |
5846 } | |
5847 | |
5848 /* | |
5849 +--------------------------------------------------------------------+ | |
5850 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
5851 | STATE : code ROUTINE : ksd_seqActOutBarrServ | | |
5852 +--------------------------------------------------------------------+ | |
5853 | |
5854 PURPOSE : This function sets the ouput parameter for the | |
5855 SEQGRP_CB, KSD_OP_ACT, KSD_SS_BOC key sequence. | |
5856 */ | |
5857 LOCAL BOOL ksd_seqActOutBarrServ (USHORT inIdx, | |
5858 CHAR* inSeq, | |
5859 T_KSD_SEQGRP* outSeqGrp, | |
5860 CHAR** outRestSeq, | |
5861 T_KSD_SEQPARAM* outSeqParam) | |
5862 { | |
5863 TRACE_FUNCTION ("ksd_seqActOutBarrServ ()"); | |
5864 | |
5865 outSeqParam->cb.opCd = KSD_OP_ACT; | |
5866 outSeqParam->cb.ssCd = KSD_SS_BOC; | |
5867 | |
5868 *outSeqGrp = SEQGRP_CB; | |
5869 | |
5870 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
5871 } | |
5872 | |
5873 /* | |
5874 +--------------------------------------------------------------------+ | |
5875 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
5876 | STATE : code ROUTINE : ksd_seqActInBarrServ | | |
5877 +--------------------------------------------------------------------+ | |
5878 | |
5879 PURPOSE : This function sets the ouput parameter for the | |
5880 SEQGRP_CB, KSD_OP_ACT, KSD_SS_BIC key sequence. | |
5881 */ | |
5882 LOCAL BOOL ksd_seqActInBarrServ (USHORT inIdx, | |
5883 CHAR* inSeq, | |
5884 T_KSD_SEQGRP* outSeqGrp, | |
5885 CHAR** outRestSeq, | |
5886 T_KSD_SEQPARAM* outSeqParam) | |
5887 { | |
5888 TRACE_FUNCTION ("ksd_seqActInBarrServ ()"); | |
5889 | |
5890 outSeqParam->cb.opCd = KSD_OP_ACT; | |
5891 outSeqParam->cb.ssCd = KSD_SS_BIC; | |
5892 | |
5893 *outSeqGrp = SEQGRP_CB; | |
5894 | |
5895 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
5896 } | |
5897 | |
5898 | |
5899 /* | |
5900 +--------------------------------------------------------------------+ | |
5901 | PROJECT : GSM-PS (6147) MODULE : KSD | | |
5902 | STATE : code ROUTINE : ksd_seqActAllBarrServ | | |
5903 +--------------------------------------------------------------------+ | |
5904 | |
5905 PURPOSE : This function sets the ouput parameter for the | |
5906 SEQGRP_CB, KSD_OP_ACT, KSD_SS_ALL_CBSS key sequence. | |
5907 */ | |
5908 LOCAL BOOL ksd_seqActAllBarrServ (USHORT inIdx, | |
5909 CHAR* inSeq, | |
5910 T_KSD_SEQGRP* outSeqGrp, | |
5911 CHAR** outRestSeq, | |
5912 T_KSD_SEQPARAM* outSeqParam) | |
5913 { | |
5914 TRACE_FUNCTION ("ksd_seqActAllBarrServ ()"); | |
5915 | |
5916 outSeqParam->cb.opCd = KSD_OP_ACT; | |
5917 outSeqParam->cb.ssCd = KSD_SS_ALL_CBSS; | |
5918 | |
5919 *outSeqGrp = SEQGRP_CB; | |
5920 | |
5921 return ksd_getClckFromPwBs (inIdx, inSeq, TRUE, outRestSeq, outSeqParam); | |
5922 } |