comparison src/aci2/aci/cmh_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 : CMH_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 command handler of the
18 | Subscriber Identity Module ( SIM )
19 +-----------------------------------------------------------------------------
20 */
21
22 #ifndef CMH_SS_H
23 #define CMH_SS_H
24
25 /*==== CONSTANTS ==================================================*/
26 #define MAX_CF_FEAT_NR (5) /* maximum number of forwarding feature
27 list entries */
28 #define MAX_CB_INFO_NR (5) /* maximum number of barring info list
29 entries */
30 #define MAX_CW_BSG_NR (5) /* maximum number of basic service group
31 entries */
32 #define MAX_CC_FEAT_NR (5) /* maximum number of call completion feature
33 entries */
34 #define CCFC_TIME_MAX (30)/* +CCFC parameter <time> */
35 #define CCFC_TIME_MIN (5)
36
37
38 /*==== TYPES ======================================================*/
39
40 /* Structure for Index to String mapping, i.e. to each number in "idx" field corresponds "cod" string*/
41 typedef struct
42 {
43 BYTE idx;
44 char* cod;
45 } T_IDX_TO_STR_MAP;
46
47 /* Structure for Index to Digits mapping, i.e. to each number in "idx" field corresponds "cod" number*/
48 typedef struct
49 {
50 SHORT idx;
51 SHORT cod;
52 } T_IDX_TO_DIG_MAP;
53
54 typedef enum
55 {
56 CUSDR_EXT_USSD_RES_Not_Pending = 0,
57 CUSDR_EXT_USSD_RES_Request,
58 CUSDR_EXT_USSD_RES_Notify
59 }
60 T_CUSDR_EXT_USSD_RES;
61
62
63 /*==== PROTOTYPES =================================================*/
64
65 EXTERN T_ACI_RETURN checkSSforFDN(char *cSSString);
66 EXTERN T_ACI_RETURN checkFDNSendSS(T_ACI_CMD_SRC srcId, CHAR *pSSString);
67
68 EXTERN char *mapIdxToString(const T_IDX_TO_STR_MAP *table, BYTE index);
69 EXTERN BYTE mapIdxToDigit(const T_IDX_TO_DIG_MAP *table, BYTE index, BYTE * result);
70
71 #ifdef SIM_TOOLKIT
72 EXTERN T_ACI_RETURN cmhSS_SendToSAT(T_ACI_CMD_SRC srcId, CHAR *pSSString);
73 #endif /* SIM_TOOLKIT */
74
75 EXTERN T_ACI_RETURN cmhSS_CF_SAT_Handle(T_ACI_CMD_SRC srcId,
76 T_ACI_CCFC_RSN reason,
77 T_ACI_CCFC_MOD mode,
78 CHAR* number,
79 T_ACI_TOA* type,
80 T_ACI_CLASS class_type,
81 CHAR* subaddr,
82 T_ACI_TOS* satype,
83 SHORT time);
84 EXTERN T_ACI_RETURN cmhSS_CW_SAT_Handle(T_ACI_CMD_SRC srcId,
85 T_ACI_CCFC_MOD mode,
86 T_ACI_CLASS class_type);
87
88 T_ACI_RETURN cmhSS_CLIP_SAT_Handle(T_ACI_CMD_SRC srcId);
89 T_ACI_RETURN cmhSS_CLIR_SAT_Handle(T_ACI_CMD_SRC srcId);
90 T_ACI_RETURN cmhSS_COLP_SAT_Handle(T_ACI_CMD_SRC srcId);
91 T_ACI_RETURN cmhSS_COLR_SAT_Handle(T_ACI_CMD_SRC srcId);
92 T_ACI_RETURN cmhSS_CCBS_SAT_Handle(T_ACI_CMD_SRC srcId, T_ACI_CCBS_MOD mode, SHORT idx);
93 T_ACI_RETURN cmhSS_CNAP_SAT_Handle(T_ACI_CMD_SRC srcId);
94 T_ACI_RETURN cmhSS_Call_Barr_SAT_Handle(T_ACI_CMD_SRC srcId,
95 T_ACI_CLCK_MOD mode,
96 T_ACI_CLCK_FAC fac,
97 CHAR *passwd,
98 T_ACI_CLASS class_type);
99
100
101 EXTERN SHORT cmhSS_TransFail ( SHORT sId );
102
103 EXTERN T_ACI_CLASS cmhSS_GetClass ( T_basicService * bs );
104 EXTERN T_ACI_CLASS cmhSS_GetClassType ( UBYTE bsTp, UBYTE bsCd );
105 EXTERN T_ACI_CLASS cmhSS_GetCbClassType ( UBYTE bsTp, UBYTE bsCd );
106 EXTERN T_ACI_CLASS cmhSS_GetClassLst ( T_basicServiceGroupList * bs );
107 EXTERN BOOL cmhSS_CheckClass ( T_ACI_CLASS class_type,
108 UBYTE *bs1, UBYTE *bst1,
109 UBYTE *bs2, UBYTE *bst2,
110 BOOL *mltyTrnFlg );
111 EXTERN BOOL cmhSS_CheckCbClass ( T_ACI_CLASS class_type,
112 UBYTE *bs1, UBYTE *bst1,
113 UBYTE *bs2, UBYTE *bst2,
114 BOOL *mltyTrnFlg );
115 EXTERN BOOL cmhSS_CheckClassInterr ( T_ACI_CLASS class_type);
116 EXTERN BOOL cmhSS_CheckCbClassInterr ( T_ACI_CLASS class_type);
117 EXTERN void cmhSS_GetBscSrv ( T_basicService * p,
118 UBYTE * bs,
119 UBYTE * bst );
120 EXTERN BOOL cmhSS_CheckBscSrv ( UBYTE bsCd,
121 UBYTE *bs, UBYTE *bst, T_ACI_CLASS *class_type );
122 EXTERN void cmhSS_flagTrn ( SHORT sId, USHORT * flags );
123 EXTERN BOOL cmhSS_tstAndUnflagTrn ( SHORT sId, USHORT * flags );
124 EXTERN void cmhSS_SSResultFailure ( SHORT sId );
125 EXTERN void cmhSS_SSInterrogated ( SHORT sId,
126 T_INTERROGATE_SS_RES *irgtSS );
127 EXTERN void cmhSS_SSRegistrated ( SHORT sId,
128 T_REGISTER_SS_RES *regSS );
129 EXTERN void cmhSS_SSErased ( SHORT sId,
130 T_ERASE_SS_RES *ersSS );
131 EXTERN void cmhSS_SSActivated ( SHORT sId,
132 T_ACTIVATE_SS_RES *actSS );
133 EXTERN void cmhSS_SSDeactivated ( SHORT sId,
134 T_DEACTIVATE_SS_RES *deactSS );
135 EXTERN void cmhSS_getPassword ( SHORT sId,
136 T_GET_PWD_INV *getPWD );
137 EXTERN void cmhSS_SSPWDRegistrated( SHORT sId,
138 T_REGISTER_PWD_RES *regPWD );
139 EXTERN void cmhSS_CCNtryErased ( SHORT sId,
140 T_ERASE_CC_ENTRY_RES *ersCCNtry );
141 EXTERN void cmhSS_USSDRequest ( SHORT sId,
142 T_USSD_REQ_INV *ussdReq );
143 EXTERN void cmhSS_USSDNotify ( SHORT sId,
144 T_USSD_NOTIFY_INV *ussdNtfy );
145 EXTERN void cmhSS_USSDReqProcessed( SHORT sId,
146 T_PROCESS_USSD_REQ_RES *prcUSSDReq );
147 EXTERN void cmhSS_USSDDatProcessed( SHORT sId,
148 T_PROCESS_USSD_RES *prcUSSDdat );
149 EXTERN void cmhSS_FwdChckSS ( SHORT sId );
150
151 #ifdef KSD_H
152 EXTERN T_ACI_RETURN cmhSS_ksdCL ( T_ACI_CMD_SRC srcId,
153 T_ACI_KSD_CL_PRM * clPrm );
154 EXTERN T_ACI_RETURN cmhSS_ksdCW ( T_ACI_CMD_SRC srcId,
155 T_ACI_KSD_CW_PRM * cwPrm );
156 EXTERN T_ACI_RETURN cmhSS_ksdUBLK ( T_ACI_CMD_SRC srcId,
157 T_ACI_KSD_UBLK_PRM * ublkPrm );
158 EXTERN T_ACI_RETURN cmhSS_ksdPW ( T_ACI_CMD_SRC srcId,
159 T_ACI_KSD_PWD_PRM * pwPrm );
160 EXTERN T_ACI_RETURN cmhSS_ksdCB ( T_ACI_CMD_SRC srcId,
161 T_ACI_KSD_CB_PRM * cbPrm );
162 EXTERN T_ACI_RETURN cmhSS_ksdCF ( T_ACI_CMD_SRC srcId,
163 T_ACI_KSD_CF_PRM * cfPrm );
164 EXTERN T_ACI_RETURN cmhSS_ksdUSSD ( T_ACI_CMD_SRC srcId,
165 T_ACI_KSD_USSD_PRM * ussdPrm );
166 EXTERN T_ACI_RETURN cmhSS_ksdCCBS ( T_ACI_CMD_SRC srcId,
167 T_ACI_KSD_CCBS_PRM * ccbsPrm );
168 EXTERN T_ACI_RETURN cmhSS_ksdIMEI ( T_ACI_CMD_SRC srcId );
169 #endif /* KSD_H */
170
171 EXTERN UBYTE cmhSS_ksdGetOpCd ( UBYTE opcSS );
172 EXTERN void cmhSS_ksdBuildErrRslt( SHORT sId, T_ACI_KSIR * ksStat, UBYTE err );
173 EXTERN UBYTE cmhSS_ksdFillFwdFeatList( T_forwardingFeatureList * ffSS,
174 T_CF_FEAT * cfFeat );
175 EXTERN UBYTE cmhSS_ksdFillCbFeatList( T_callBarringFeatureList * bfSS,
176 T_CB_INFO * cbInfo );
177 EXTERN UBYTE cmhSS_ksdFillBSGList ( T_basicServiceGroupList * bsgSS,
178 T_Cx_BSG * cxBSG );
179 EXTERN void cmhSS_ksdFillFwdRes ( T_forwardingInfo * fiSS,
180 T_ACI_KSIR *ksStat,
181 T_CF_FEAT * cfFeat );
182 EXTERN void cmhSS_ksdFillCbRes ( T_callBarringInfo * biSS,
183 T_ACI_KSIR *ksStat,
184 T_CB_INFO * cbInfo );
185 EXTERN void cmhSS_ksdFillCwRes ( T_ssData *datSS,
186 T_ACI_KSIR *ksStat,
187 T_Cx_BSG *cwBSG );
188 EXTERN UBYTE cmhSS_ksdFillCCBSFeatList( T_ccbsFeatureList * ccbsfSS,
189 T_CC_FEAT * ccFeat );
190
191 EXTERN T_ACI_RETURN cmhSS_sendFie ( T_ACI_FAC_DIR tDirection,
192 T_ACI_FAC_TRANS_TYPE tType,
193 T_fac_inf *fie );
194
195 EXTERN UBYTE cmhSS_getCdFromImei ( T_ACI_IMEI* imei );
196
197
198
199 /*==== EXPORT =====================================================*/
200 #endif /* CMH_SS_H */
201
202 /*==== EOF =======================================================*/