comparison src/aci2/aci/psa_ss.h @ 3:93999a60b835

src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 26 Sep 2016 00:29:36 +0000
parents
children
comparison
equal deleted inserted replaced
2:c41a534f33c6 3:93999a60b835
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GSM-PS (6147)
4 | Modul : PSA_SS
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 : Definitions for the protocol stack adapter
18 +-----------------------------------------------------------------------------
19 */
20
21 #ifndef PSA_SS_H
22 #define PSA_SS_H
23
24 /*==== CONSTANTS ==================================================*/
25 #define DEF_SS_VER (0) /* default SS version */
26
27 #define MAX_SS_NR (4) /* maximum number of calls */
28 #define TEST_STR_LEN (80) /* maximum length of test parameter string */
29
30 #define NO_ENTRY (-1) /* not a valid entry */
31 #define SS_NO_PRM (0xFF) /* parameter not present */
32
33 typedef enum /* service status */
34 {
35 NO_VLD_SSS = 0, /* not a valid service status */
36 SSS_IDL, /* service idle */
37 SSS_ACT, /* service active */
38 SSS_PWD_REQ, /* service password request */
39 SSS_PWD_SND, /* service password sent */
40 SSS_PWD_VRF /* service password verified */
41 } T_SS_CLST;
42
43 typedef enum
44 {
45 NO_VLD_ST = 0, /* not a valid service type */
46 ST_MOS, /* mobile originated service */
47 ST_MTS /* mobile terminated service */
48 } T_SS_SSTP;
49
50 typedef enum
51 {
52 NO_VLD_SSF = 0, /* not a valid SS failure type */
53 SSF_SS_ERR, /* SS error component */
54 SSF_GEN_PRB, /* SS reject comp. general problem */
55 SSF_INV_PRB, /* SS reject comp. invoke problem */
56 SSF_ERR_PRB, /* SS reject comp. return error problem */
57 SSF_RSL_PRB, /* SS reject comp. return result problem */
58 SSF_CCD_DEC, /* CCD decode error */
59 SSF_SS_ENT /* SS entity error */
60 } T_SS_FAIL;
61
62 typedef enum /* PSA notification events */
63 {
64 SS_NTF_NEW_TRN = 0, /* new SS transaction started */
65 SS_NTF_END_TRN, /* existing SS transaction stopped */
66 SS_NTF_CNT_TRN, /* existing transaction continued */
67 SS_NTF_TRN_FAIL, /* SS transaction failed */
68 SS_NTF_TST, /* for test purposes only */
69 SS_NTF_MAX /* maximum SS notification event */
70
71 } T_SS_NTF;
72
73 typedef enum
74 {
75 CT_INV = 0xA1, /* invoke component type */
76 CT_RET_RSLT, /* return result component type */
77 CT_RET_ERR, /* return error component type */
78 CT_RET_REJ, /* reject component type */
79
80 CT_MAX
81
82 } T_CMP_TYPE;
83
84 typedef enum
85 {
86 BS_BEAR_NONE = 0xFF, /* no valid bearer service */
87 BS_BEAR_SRV = 0x82, /* bearer service type */
88 BS_TELE_SRV, /* teleservice type */
89
90 BS_TP_MAX
91
92 } T_BS_TYPE;
93
94
95 /*==== TYPES ======================================================*/
96 typedef struct SSServiceTabl
97 {
98 BOOL ntryUsdFlg; /* flags this entry as used */
99 UBYTE ti; /* transaction identifier */
100 UBYTE iId; /* invoke id */
101 UBYTE srvStat; /* service status */
102 UBYTE srvType; /* type of service */
103 UBYTE SSver; /* supplementary service version */
104 UBYTE orgOPC; /* originated SS operation code */
105 UBYTE opCode; /* SS operation code */
106 UBYTE ssCode; /* SS service code */
107 USHORT ClassType; /* holds class queried by user */
108 UBYTE ussdReqFlg; /* flags USSD request */
109 UBYTE ussd_operation; /* flags an on-going USSD operation */
110 UBYTE failType; /* type of SS failure */
111 USHORT entCs; /* entity failure cause */
112 UBYTE rejPrb; /* reject problem code */
113 UBYTE errCd; /* return error code */
114 UBYTE errPrms; /* Parameters associated with the Error */
115 T_ACI_AT_CMD curCmd; /* current command executing */
116 T_OWN srvOwn; /* owner of service */
117 T_MNSS_BEGIN_REQ *save_prim; /* address where pending trans is memorized */
118 } T_SS_SRV_TBL;
119
120
121 typedef struct SSShrdParm
122 {
123 T_SS_SRV_TBL stb[MAX_SS_NR]; /* service table for max. nr of services */
124 UBYTE iIdNxt; /* next available invoke id */
125 SHORT nrOfMOS; /* number of current MOS's */
126 SHORT nrOfMTS; /* number of current MTS's */
127 UBYTE cmpType; /* component type */
128 UBYTE ussdLen; /* length of ussd string */
129 UBYTE ussdDcs; /* DCS of ussd string */
130 UBYTE ussdBuf[MAX_USSD_STRING]; /* buffers ussd string */
131 USHORT mltyTrnFlg; /* holds id flag of pending transactions */
132 } T_SS_SHRD_PRM;
133
134 /*==== PROTOTYPES =================================================*/
135
136 void psaSS_Init ( void );
137
138 EXTERN SHORT psaSS_NewTrns ( SHORT sId );
139 EXTERN SHORT psaSS_EndTrns ( SHORT sId );
140 EXTERN SHORT psaSS_CntTrns ( SHORT sId );
141
142 EXTERN void psaSS_asmEmptyRslt ( void );
143 EXTERN void psaSS_asmErrorRslt ( SHORT sId, UBYTE err );
144 EXTERN void psaSS_asmInterrogateSS ( UBYTE ssCode, UBYTE bscSrvType,
145 UBYTE bscSrv);
146 EXTERN void psaSS_asmRegisterSS ( UBYTE ssCode, UBYTE bscSrvType,
147 UBYTE bscSrv, UBYTE ton, UBYTE npi,
148 UBYTE *num, UBYTE tos, UBYTE oe,
149 UBYTE *sub, UBYTE time );
150 EXTERN void psaSS_asmEraseSS ( UBYTE ssCode, UBYTE bscSrvType,
151 UBYTE bscSrv );
152 EXTERN void psaSS_asmActivateSS ( UBYTE ssCode, UBYTE bscSrvType,
153 UBYTE bscSrv );
154 EXTERN void psaSS_asmDeactivateSS ( UBYTE ssCode, UBYTE bscSrvType,
155 UBYTE bscSrv );
156 EXTERN void psaSS_asmRegisterPWD ( UBYTE ssCode );
157 EXTERN void psaSS_asmVerifyPWD ( UBYTE *pwd );
158 EXTERN void psaSS_asmProcUSSDReq ( UBYTE dcs, UBYTE *ussd, UBYTE len );
159 EXTERN void psaSS_asmCnfUSSDReq ( UBYTE dcs, UBYTE *ussd, UBYTE len );
160 EXTERN void psaSS_asmCnfUSSDNtfy ( void );
161 EXTERN BOOL psaSS_asmUSSDProt1 ( SHORT sId );
162 #if 0 /* For further study, so not yet used */
163 EXTERN void psaSS_asmActivateCCBS ( void );
164 #endif
165 EXTERN void psaSS_asmDeactivateCCBS( UBYTE idx );
166 EXTERN SHORT psaSS_stbNewEntry ( void );
167 EXTERN SHORT psaSS_stbFindTi ( UBYTE ti2Find );
168 EXTERN SHORT psaSS_stbFindInvId ( UBYTE invId2Find );
169 EXTERN void psaSS_stbDump ( void );
170 EXTERN void psaSS_chngSrvTypCnt ( SHORT sId, SHORT dlt );
171 EXTERN SHORT psaSS_getMOSTi ( SHORT sId );
172 EXTERN void psaSS_retMOSTi ( SHORT sId );
173 EXTERN SHORT psaSS_stbFindUssdReq ( void );
174 EXTERN SHORT psaSS_stbFindActSrv ( SHORT sId );
175 EXTERN void psaSS_InitStbNtry ( SHORT idx );
176 EXTERN void psaSS_DumpFIE ( T_fac_inf *fie );
177 EXTERN void psaSS_dasmInvokeCmp ( SHORT sId,
178 T_inv_comp *invCmp );
179 EXTERN void psaSS_dasmResultCmp ( SHORT sId,
180 T_res_comp *resCmp );
181 EXTERN T_ACI_RETURN psaSS_dasmErrorCmp ( SHORT sId,
182 T_err_comp *errCmp,
183 BOOL is_fac_ussd );
184 EXTERN T_ACI_RETURN psaSS_dasmRejectCmp ( SHORT sId,
185 T_rej_comp *rejCmp,
186 BOOL is_fac_ussd );
187 EXTERN T_ACI_RETURN psaSS_ss_end_ind ( SHORT sId,
188 T_COMPONENT *comp,
189 BOOL is_fac_ussd );
190 EXTERN SHORT psaSS_GetPendingTrn ( void );
191 EXTERN void psaSS_KillAllPendingTrn( void );
192
193
194 /*==== EXPORT =====================================================*/
195
196 #ifdef PSA_SSF_C
197
198 GLOBAL T_SS_SHRD_PRM ssShrdPrm;
199
200 #else
201
202 EXTERN T_SS_SHRD_PRM ssShrdPrm;
203
204 #endif /* PSA_SSF_C */
205
206
207 #endif /* PSA_SS_H */
208
209 /*==== EOF =======================================================*/