FreeCalypso > hg > fc-tourmaline
comparison src/g23m-aci/aci/psa_sms.h @ 1:fa8dc04885d8
src/g23m-*: import from Magnetite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 16 Oct 2020 06:25:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:4e78acac3d88 | 1:fa8dc04885d8 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : GSM-PS (6147) | |
4 | Modul : PSA_SMS | |
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 | Short Message Service ( SMS ) | |
19 +----------------------------------------------------------------------------- | |
20 */ | |
21 | |
22 #ifndef PSA_SMS_H | |
23 #define PSA_SMS_H | |
24 | |
25 #include "psa.h" | |
26 | |
27 #define TRACING | |
28 | |
29 /*==== CONSTANTS ==================================================*/ | |
30 | |
31 #define MAX_SIM_ME_ENTRIES 256 | |
32 | |
33 #define TP_VP_RELATIVE_DEFAULT 0xA7 | |
34 | |
35 #define BM0 0 /* CBM indication routing type 0 */ | |
36 #define BM1 1 /* CBM indication routing type 1 */ | |
37 #define BM2 2 /* CBM indication routing type 2 */ | |
38 #define BM3 3 /* CBM indication routing type 3 */ | |
39 | |
40 #define DEF_DCS_RANGE 0xFF /* DCS range default value */ | |
41 #define DEF_MID_RANGE 0xFFFF /* MID range default value */ | |
42 | |
43 #ifdef SIM_TOOLKIT | |
44 #define SMS_READ_SIM_SMSP 4 | |
45 #define SMS_READ_SIM_CBMIR 3 | |
46 #define SMS_READ_SIM_CBMI 2 | |
47 #define SMS_READ_SIM_CBMID 1 | |
48 #define SMS_READ_SIM_CMPL 0 | |
49 | |
50 #else | |
51 #define SMS_READ_SIM_SMSP 3 | |
52 #define SMS_READ_SIM_CBMIR 2 | |
53 #define SMS_READ_SIM_CBMI 1 | |
54 #define SMS_READ_SIM_CMPL 0 | |
55 #endif /* of SIM_TOOLKIT */ | |
56 | |
57 #define TEST_STR_LEN (80) /* max. length of test parameter string */ | |
58 | |
59 /*==== TYPES ======================================================*/ | |
60 | |
61 | |
62 | |
63 typedef enum /* service status */ | |
64 { | |
65 NO_VLD_SMS = 0, /* not a valid SMS status */ | |
66 SMS_IDL, /* SMS idle */ | |
67 SMS_RD_REQ, /* SMS read request */ | |
68 SMS_STR_REQ, /* SMS store request */ | |
69 SMS_DEL_REQ, /* SMS delete request */ | |
70 SMS_CMD_REQ, /* SMS command request */ | |
71 SMS_SND_REQ /* SMS send request */ | |
72 } T_SMS_SMSST; | |
73 | |
74 typedef struct entStatus2 /* entity status */ | |
75 { | |
76 T_ACI_CMD_SRC entOwn; /* entity owner */ | |
77 T_ACI_AT_CMD curCmd; /* current command processing */ | |
78 } T_ENT_STAT2; | |
79 | |
80 typedef struct SMSSetParm | |
81 { | |
82 UBYTE prflId; /* profile ID equals recNr (starts from 1)*/ | |
83 UBYTE isCopy; /* copy of parameter set */ | |
84 UBYTE numOfRefs; /* number of sources which refer this */ | |
85 UBYTE record; /* record used for actual operation */ | |
86 T_rp_addr sca; /* service center address */ | |
87 UBYTE msgType; /* type of message */ | |
88 UBYTE vpRel; /* relative validity period */ | |
89 T_tp_vp_abs vpAbs; /* absolute validity period */ | |
90 T_tp_vp_enh vpEnh; /* enhanced validity period */ | |
91 UBYTE pid; /* protocol identifier */ | |
92 UBYTE dcs; /* data coding scheme */ | |
93 | |
94 T_ACI_CMGF_MOD CMGFmode; | |
95 | |
96 } T_SMS_SET_PRM; | |
97 | |
98 | |
99 typedef struct SMSParameter | |
100 { | |
101 UBYTE simTotal; /* total number of SIM storage */ | |
102 UBYTE simUsed; /* used number of SIM storage (counter) */ | |
103 UBYTE meTotal; /* total number of ME storage */ | |
104 UBYTE meUsed; /* used number of ME storage (counter) */ | |
105 UBYTE smsParamRecLen; /* record length of EF(SMSP) */ | |
106 UBYTE smsParamMaxRec; /* number of records in EF(SMSP) */ | |
107 UBYTE snd_msg_ref; /* last used message reference (for +CMGC) */ | |
108 } T_ACI_SMS_PARAMETER; | |
109 | |
110 | |
111 typedef struct SMSCBMParameter | |
112 { | |
113 T_OWN cbchOwner; /* identifies the used set for a | |
114 CBCH request */ | |
115 UBYTE cbmHndl; /* CBCH message handling */ | |
116 UBYTE cbmMode; /* CBCH message type modus */ | |
117 USHORT msgId[MAX_IDENTS]; /* CBCH message identifier */ | |
118 UBYTE dcsId[MAX_IDENTS]; /* CBCH data coding scheme */ | |
119 UBYTE cbmFoundIds; /* actual found IDs */ | |
120 UBYTE cbmSIMmaxId; /* number IDs storable on SIM */ | |
121 UBYTE cbmSIMmaxIdRge; /* number ID ranges storable on SIM */ | |
122 UBYTE IMSI [MAX_IMSI]; /* IMSI */ | |
123 #ifdef SIM_TOOLKIT | |
124 USHORT CBDtaDwnlIdent[MAX_IDENTS_SAT]; /* Identifiers for SAT CB data Dwn */ | |
125 UBYTE CBDtaDwnlFoundIds; /* actual found IDs */ | |
126 UBYTE cbmSIMmaxSATId; /* number SAT IDs storable on SIM */ | |
127 #endif /* of SIM_TOOLKIT */ | |
128 #ifdef FF_HOMEZONE | |
129 UBYTE hzMode; /* Activation mode of homezone feature */ | |
130 UBYTE hzDcs; /* data coding sceme for homezone CBM */ | |
131 UBYTE hzTimeout; /* timeout period for homezone CBM */ | |
132 #endif /* FF_HOMEZONE */ | |
133 } T_SMS_CBM_PARAMETER; | |
134 | |
135 | |
136 /* this structure holds pointers to data to encode */ | |
137 typedef struct TpDataUnit | |
138 { | |
139 T_TP_SUBMIT *tp_submit; | |
140 T_TP_DELIVER *tp_deliver; | |
141 T_TP_COMMAND *tp_command; | |
142 T_rp_addr sc_addr; | |
143 } T_TP_DATA_UNIT; | |
144 | |
145 | |
146 typedef struct SMSShrdParm | |
147 { | |
148 T_OWN owner; /* identifies the used set */ | |
149 | |
150 T_SMS_SET_PRM *pSetPrm[OWN_SRC_MAX];/* possible sets */ | |
151 USHORT rslt; /* result of operation */ | |
152 #if defined DEBUG_ACI | |
153 char testPrm[TEST_STR_LEN]; /* test parameter */ | |
154 #endif | |
155 UBYTE smsStat; /* SMS status */ | |
156 UBYTE rdMode; /* SMS read mode */ | |
157 UBYTE mtHndl; /* mt message handling */ | |
158 UBYTE srHndl; /* status report handling */ | |
159 UBYTE accessEnabled; /* access condx for SMS commands */ | |
160 SHORT prmRdSeq; /* Status of SMS Parameters read */ | |
161 | |
162 UBYTE mem1; /* prefered memory for mem1 (in PSA type)*/ | |
163 UBYTE mem2; /* prefered memory for mem2 (in PSA type)*/ | |
164 UBYTE mem3; /* prefered memory for mem3 (in PSA type)*/ | |
165 UBYTE index; /* Index of the memory location to be deleted */ | |
166 UBYTE status; /* This is a delete flag, depending on which | |
167 multiple recods of the same status like | |
168 all read, all sent, all unsent are | |
169 deleted. */ | |
170 UBYTE cnma_ack_expected; /* +CNMA acknowlegdement expected */ | |
171 #ifdef REL99 | |
172 UBYTE auto_repeat_flag; /* Store whether auto retransmission is | |
173 enabled or not */ | |
174 BOOL is_msg_present_for_retrans; /* Store whether message is available for | |
175 manual retransmission */ | |
176 #endif | |
177 T_ACI_CMD_SRC uiInternalSmsStorage; /* indicates to the SMSStoCnf() --> no return values */ | |
178 | |
179 T_ACI_CMD_SRC smsSrcId; /* The ID if the source interested in unsolicited SMS indications */ | |
180 | |
181 T_ACI_CSMS_SERV CSMSservice; /* +CSMS parameters */ | |
182 T_ACI_CSMS_SUPP CSMSmt; | |
183 T_ACI_CSMS_SUPP CSMSmo; | |
184 T_ACI_CSMS_SUPP CSMSbm; | |
185 | |
186 T_ACI_CNMI_MT CNMImt; /* +CNMI parameters */ | |
187 T_ACI_CNMI_BM CNMIbm; | |
188 T_ACI_CNMI_DS CNMIds; | |
189 | |
190 | |
191 T_ENT_STAT2 | |
192 smsEntStat; /* */ | |
193 | |
194 T_ACI_SMS_PARAMETER | |
195 aci_sms_parameter; /* */ | |
196 | |
197 T_SMS_CBM_PARAMETER | |
198 cbmPrm; /* */ | |
199 | |
200 T_TP_DATA_UNIT tpdu; | |
201 | |
202 T_ACI_CMGL_SM *pDecMsg; /* pointer to decoded message */ | |
203 | |
204 #ifdef SIM_TOOLKIT | |
205 char fuRef; /* Reference for File Update */ | |
206 #endif /* of SIM_TOOLKIT */ | |
207 | |
208 /* points to reply call-back */ | |
209 union | |
210 { | |
211 T_CMSS_FCT *cmss; | |
212 T_CMGS_FCT *cmgs; | |
213 T_CMGC_FCT *cmgc; | |
214 T_CMGR_FCT *cmgr; | |
215 T_CMGW_FCT *cmgw; | |
216 T_CMGD_FCT *cmgd; | |
217 T_CMGMDU_FCT *cmgmdu; | |
218 #ifdef REL99 | |
219 T_CMGRS_FCT *cmgrs; | |
220 #endif | |
221 } rplyCB; | |
222 | |
223 /* points to CMS error call-back */ | |
224 T_ERROR_FCT *errorCB; | |
225 | |
226 #ifdef FF_MMI_RIV | |
227 T_ACI_PERC_SMBS_MOD perccmgf_smbs_mode; /* Enable SMBS: force presenting of PDU to SMBS */ | |
228 #endif /* of FF_MMI_RIV */ | |
229 UBYTE CMMSmode; /* Mode of CMMS command */ | |
230 | |
231 #ifdef FF_ATI_BAT | |
232 | |
233 /* | |
234 * !!! For test purposes only !!! | |
235 * easier method of conveying alphanumeric data from BAT to ATI. | |
236 */ | |
237 UBYTE alpha_len; | |
238 CHAR alpha[BAT_MAX_CMT_ALPHA+1]; | |
239 | |
240 #endif | |
241 | |
242 #ifdef FF_CPHS_REL4 | |
243 T_ACI_MWIS_MWI MWISdata; | |
244 #endif | |
245 | |
246 } T_SMS_SHRD_PRM; | |
247 | |
248 | |
249 | |
250 /*==== PROTOTYPES =================================================*/ | |
251 | |
252 void psaSMS_Init ( void ); | |
253 void psaSMS_InitParams ( void ); | |
254 | |
255 /*==== EXPORT =====================================================*/ | |
256 | |
257 #ifdef PSA_SMSF_C | |
258 | |
259 GLOBAL T_SMS_SHRD_PRM smsShrdPrm; | |
260 #else | |
261 | |
262 EXTERN T_SMS_SHRD_PRM smsShrdPrm; | |
263 #endif /* PSA_SMSF_C */ | |
264 | |
265 EXTERN SHORT psaSMS_ReadReq ( UBYTE mem_type, USHORT rec_num, | |
266 UBYTE read_mode, T_ACI_SMS_STAT stat ); | |
267 | |
268 #ifdef TI_PS_FF_AT_P_CMD_CPRSM | |
269 /* ACI-ENH-19450: Added for %CPRMS command */ | |
270 EXTERN void psaSMS_PauseReq (); | |
271 EXTERN void psaSMS_ResumeReq (); | |
272 EXTERN void psaSMS_QueryReq ( UBYTE query_type ); | |
273 #endif /* TI_PS_FF_AT_P_CMD_CPRSM */ | |
274 | |
275 #ifdef FF_HOMEZONE | |
276 EXTERN SHORT psaMMI_homezone_req( void ); | |
277 #endif /* FF_HOMEZONE */ | |
278 | |
279 #endif /* PSA_SMS_H */ | |
280 | |
281 /*==== EOF =======================================================*/ |