FreeCalypso > hg > tcs211-l1-reconst
comparison g23m/condat/ms/src/aci/cmh_mmiq.c @ 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 : CMH_MMIS | |
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 provides the query functions related to the | |
18 | protocol stack adapter for the man machine interface. | |
19 +----------------------------------------------------------------------------- | |
20 */ | |
21 | |
22 #ifndef CMH_MMIQ_C | |
23 #define CMH_MMIQ_C | |
24 #endif | |
25 | |
26 #include "aci_all.h" | |
27 | |
28 /*==== INCLUDES ===================================================*/ | |
29 #include "aci_cmh.h" | |
30 #include "psa_mmi.h" | |
31 #include "cmh_mmi.h" | |
32 #include "pcm.h" | |
33 | |
34 #ifdef UART | |
35 #include "dti.h" | |
36 #include "dti_conn_mng.h" | |
37 #endif | |
38 | |
39 | |
40 #ifdef FAX_AND_DATA | |
41 #include "aci_fd.h" | |
42 #endif /* of #ifdef FAX_AND_DATA */ | |
43 #include "psa.h" | |
44 #include "psa_sim.h" | |
45 #include "cmh.h" | |
46 #include "cmh_sim.h" | |
47 #include "aoc.h" | |
48 | |
49 /*==== CONSTANTS ==================================================*/ | |
50 | |
51 /*==== EXPORT =====================================================*/ | |
52 | |
53 /*==== VARIABLES ==================================================*/ | |
54 | |
55 /*==== FUNCTIONS ==================================================*/ | |
56 | |
57 /* | |
58 +--------------------------------------------------------------------+ | |
59 | PROJECT : GSM-PS (6147) MODULE : CMH_MMIQ | | |
60 | STATE : code ROUTINE : qAT_PlusCLAN | | |
61 +--------------------------------------------------------------------+ | |
62 | |
63 PURPOSE : This is the functional counterpart to the +CLAN AT command | |
64 which is responsible for query supporetd language code in | |
65 ME. | |
66 */ | |
67 | |
68 GLOBAL T_ACI_RETURN qAT_PlusCLAN ( T_ACI_CMD_SRC srcId, | |
69 T_ACI_LAN_SUP* lngCode ) | |
70 { | |
71 CHAR* ef = EF_CLNG_ID; | |
72 pcm_FileInfo_Type fileInfo; | |
73 EF_CLNG lng; | |
74 T_SIM_CMD_PRM * pSIMCmdPrm; /* points to SIM command parameters */ | |
75 char *auptr="au"; | |
76 | |
77 TRACE_FUNCTION ("qAT_PlusCLAN()"); | |
78 | |
79 /* | |
80 *------------------------------------------------------------------- | |
81 * check command source | |
82 *------------------------------------------------------------------- | |
83 */ | |
84 if(!cmh_IsVldCmdSrc (srcId)) | |
85 { | |
86 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
87 return( AT_FAIL ); | |
88 } | |
89 | |
90 pSIMCmdPrm = &cmhPrm[srcId].simCmdPrm; | |
91 | |
92 /* | |
93 *------------------------------------------------------------------- | |
94 * read supported language from ME | |
95 *------------------------------------------------------------------- | |
96 */ | |
97 if (pcm_GetFileInfo ( ( UBYTE* ) ef, &fileInfo) NEQ PCM_OK) | |
98 { | |
99 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_Unknown ); | |
100 return( AT_FAIL ); | |
101 } | |
102 else | |
103 { | |
104 | |
105 if ( pcm_ReadFile ( (UBYTE*)ef, | |
106 fileInfo.FileSize, | |
107 (UBYTE*) &lng, | |
108 &fileInfo.Version) EQ PCM_OK ) | |
109 { | |
110 memcpy(lngCode->str, &lng.data[0], 2); | |
111 } | |
112 else | |
113 { | |
114 ACI_ERR_DESC( ACI_ERR_CLASS_Cms, CMS_ERR_MemFail ); | |
115 return( AT_FAIL ); | |
116 } | |
117 } | |
118 /* | |
119 *------------------------------------------------------------------- | |
120 * Read EF ELP or LP from the sim if Automatic language is selected | |
121 *------------------------------------------------------------------- | |
122 */ | |
123 | |
124 if (!strcmp(lngCode->str, auptr)) | |
125 { | |
126 /* | |
127 *------------------------------------------------------------- | |
128 * check entity status | |
129 *------------------------------------------------------------- | |
130 */ | |
131 if( simEntStat.curCmd NEQ AT_CMD_NONE ) | |
132 return( AT_BUSY ); | |
133 | |
134 pSIMCmdPrm -> CLANact = CLAN_ACT_Read; | |
135 | |
136 /* | |
137 *------------------------------------------------------------- | |
138 * request EF ELP from SIM | |
139 *------------------------------------------------------------- | |
140 */ | |
141 return cmhSIM_ReqLanguage ( srcId ); | |
142 | |
143 } | |
144 | |
145 return( AT_CMPL ); | |
146 } | |
147 | |
148 /* | |
149 +--------------------------------------------------------------------+ | |
150 | PROJECT : GSM-PS (6147) MODULE : CMH_MMIQ | | |
151 | STATE : code ROUTINE : qAT_PlusCLAE | | |
152 +--------------------------------------------------------------------+ | |
153 | |
154 PURPOSE : This is the functional counterpart to the +CLAE? AT command | |
155 which returns the current setting of mode . | |
156 | |
157 <mode>: Enable or Disable the unsolicited result code, | |
158 when the language in the ME is changend. | |
159 | |
160 */ | |
161 | |
162 GLOBAL T_ACI_RETURN qAT_PlusCLAE (T_ACI_CMD_SRC srcId, | |
163 T_ACI_CLAE_MOD *mode) | |
164 | |
165 { | |
166 T_PHB_CMD_PRM * pPHBCmdPrm; /* points to PHB command parameter */ | |
167 | |
168 | |
169 TRACE_FUNCTION ("qAT_PlusCLAE()"); | |
170 | |
171 /* | |
172 *------------------------------------------------------------------- | |
173 * check command source | |
174 *------------------------------------------------------------------- | |
175 */ | |
176 if(!cmh_IsVldCmdSrc (srcId)) | |
177 { | |
178 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
179 return( AT_FAIL ); | |
180 } | |
181 | |
182 pPHBCmdPrm = &cmhPrm[srcId].phbCmdPrm; | |
183 | |
184 /* | |
185 *------------------------------------------------------------------- | |
186 * fill parameter mode | |
187 *------------------------------------------------------------------- | |
188 */ | |
189 *mode= pPHBCmdPrm->CLAEmode; | |
190 | |
191 return( AT_CMPL ); | |
192 } | |
193 | |
194 | |
195 /* | |
196 +-------------------------------------------------------------------+ | |
197 | PROJECT : GSM-PS (6147) MODULE : CMH_MMIQ | | |
198 | ROUTINE : qAT_PercentCUST | | |
199 +-------------------------------------------------------------------+ | |
200 | |
201 PURPOSE : This function will set the customisation mode for the ACI and | |
202 other required entities | |
203 */ | |
204 | |
205 GLOBAL T_ACI_RETURN qAT_PercentCUST( T_ACI_CMD_SRC srcId, | |
206 T_CUST_MOD *customisation_mode) | |
207 { | |
208 /* | |
209 *------------------------------------------------------------------- | |
210 * check command source | |
211 *------------------------------------------------------------------- | |
212 */ | |
213 if(!cmh_IsVldCmdSrc (srcId)) | |
214 { | |
215 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
216 return( AT_FAIL ); | |
217 } | |
218 | |
219 *customisation_mode = simShrdPrm.setPrm[srcId].cust_mode; | |
220 | |
221 return (AT_CMPL); | |
222 } | |
223 | |
224 | |
225 /* | |
226 +-------------------------------------------------------------------+ | |
227 | PROJECT : GSM-PS (6147) MODULE : CMH_MMIQ | | |
228 | ROUTINE : qAT_PercentSATCC | | |
229 +-------------------------------------------------------------------+ | |
230 | |
231 PURPOSE : This function will query the Call Control mode from the ACI | |
232 */ | |
233 | |
234 GLOBAL T_ACI_RETURN qAT_PercentSATCC( T_ACI_CMD_SRC srcId, | |
235 T_SAT_CC_MOD *sat_cc_mode) | |
236 { | |
237 /* | |
238 *------------------------------------------------------------------- | |
239 * check command source | |
240 *------------------------------------------------------------------- | |
241 */ | |
242 if(!cmh_IsVldCmdSrc (srcId)) | |
243 { | |
244 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | |
245 return( AT_FAIL ); | |
246 } | |
247 | |
248 *sat_cc_mode = simShrdPrm.setPrm[srcId].sat_cc_mode; | |
249 | |
250 return (AT_CMPL); | |
251 } | |
252 | |
253 /*==== EOF ========================================================*/ | |
254 | |
255 | |
256 | |
257 | |
258 | |
259 | |
260 | |
261 | |
262 | |
263 |