FreeCalypso > hg > tcs211-l1-reconst
comparison g23m/condat/ms/src/aci/psa_sms.h @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : GSM-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_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 T_ACI_CMD_SRC uiInternalSmsStorage; /* indicates to the SMSStoCnf() --> no return values */ | |
172 | |
173 T_ACI_CMD_SRC smsSrcId; /* The ID if the source interested in unsolicited SMS indications */ | |
174 | |
175 T_ACI_CSMS_SERV CSMSservice; /* +CSMS parameters */ | |
176 T_ACI_CSMS_SUPP CSMSmt; | |
177 T_ACI_CSMS_SUPP CSMSmo; | |
178 T_ACI_CSMS_SUPP CSMSbm; | |
179 | |
180 T_ACI_CNMI_MT CNMImt; /* +CNMI parameters */ | |
181 T_ACI_CNMI_BM CNMIbm; | |
182 T_ACI_CNMI_DS CNMIds; | |
183 | |
184 | |
185 T_ENT_STAT2 | |
186 smsEntStat; /* */ | |
187 | |
188 T_ACI_SMS_PARAMETER | |
189 aci_sms_parameter; /* */ | |
190 | |
191 T_SMS_CBM_PARAMETER | |
192 cbmPrm; /* */ | |
193 | |
194 T_TP_DATA_UNIT tpdu; | |
195 | |
196 T_ACI_CMGL_SM *pDecMsg; /* pointer to decoded message */ | |
197 | |
198 #ifdef SIM_TOOLKIT | |
199 char fuRef; /* Reference for File Update */ | |
200 #endif /* of SIM_TOOLKIT */ | |
201 | |
202 /* points to reply call-back */ | |
203 union | |
204 { | |
205 T_CMSS_FCT *cmss; | |
206 T_CMGS_FCT *cmgs; | |
207 T_CMGC_FCT *cmgc; | |
208 T_CMGR_FCT *cmgr; | |
209 T_CMGW_FCT *cmgw; | |
210 T_CMGD_FCT *cmgd; | |
211 T_CMGMDU_FCT *cmgmdu; | |
212 } rplyCB; | |
213 | |
214 /* points to CMS error call-back */ | |
215 T_ERROR_FCT *errorCB; | |
216 | |
217 #ifdef FF_MMI_RIV | |
218 T_ACI_PERC_SMBS_MOD perccmgf_smbs_mode; /* Enable SMBS: force presenting of PDU to SMBS */ | |
219 #endif /* of FF_MMI_RIV */ | |
220 UBYTE CMMSmode; /* Mode of CMMS command */ | |
221 | |
222 #ifdef FF_ATI_BAT | |
223 | |
224 /* | |
225 * !!! For test purposes only !!! | |
226 * easier method of conveying alphanumeric data from BAT to ATI. | |
227 */ | |
228 UBYTE alpha_len; | |
229 CHAR alpha[BAT_MAX_CMT_ALPHA+1]; | |
230 | |
231 #endif | |
232 | |
233 } T_SMS_SHRD_PRM; | |
234 | |
235 | |
236 | |
237 /*==== PROTOTYPES =================================================*/ | |
238 | |
239 void psaSMS_Init ( void ); | |
240 void psaSMS_InitParams ( void ); | |
241 | |
242 /*==== EXPORT =====================================================*/ | |
243 | |
244 #ifdef PSA_SMSF_C | |
245 | |
246 GLOBAL T_SMS_SHRD_PRM smsShrdPrm; | |
247 #else | |
248 | |
249 EXTERN T_SMS_SHRD_PRM smsShrdPrm; | |
250 #endif /* PSA_SMSF_C */ | |
251 | |
252 EXTERN SHORT psaSMS_ReadReq ( UBYTE mem_type, USHORT rec_num, | |
253 UBYTE read_mode, T_ACI_SMS_STAT stat ); | |
254 | |
255 /* ACI-ENH-19450: Added for %CPRMS command */ | |
256 EXTERN void psaSMS_PauseReq (); | |
257 EXTERN void psaSMS_ResumeReq (); | |
258 EXTERN void psaSMS_QueryReq ( UBYTE query_type ); | |
259 | |
260 #ifdef FF_HOMEZONE | |
261 EXTERN SHORT psaMMI_homezone_req( void ); | |
262 #endif /* FF_HOMEZONE */ | |
263 | |
264 #endif /* PSA_SMS_H */ | |
265 | |
266 /*==== EOF =======================================================*/ |