0
|
1 |
/*
|
|
2 |
* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef SATCC_H
|
|
21 |
#define SATCC_H
|
|
22 |
|
|
23 |
|
|
24 |
// INCLUDES
|
|
25 |
#include <e32base.h> // base class cbase
|
|
26 |
#include <etelsat.h> // etel sat api
|
|
27 |
|
|
28 |
|
|
29 |
// CONSTANTS
|
|
30 |
const TUint8 KBccMaxSize = 0x10; // Maximum length for BCC
|
|
31 |
const TUint8 KStringMaxSize = 249; // Maximum length for SS and
|
|
32 |
// Call Destination address string
|
|
33 |
const TUint8 KUssdStringMaxSize = 160; // Maximum length for USSD string
|
|
34 |
const TUint8 KCallModeSize = 2; // Call Mode + Call Mode Info
|
|
35 |
|
|
36 |
|
|
37 |
// FORWARD DECLARATIONS
|
|
38 |
class TTlv;
|
|
39 |
class CSatMessHandler;
|
|
40 |
class CTsySatMessaging;
|
|
41 |
class TIsiReceiveC;
|
|
42 |
|
|
43 |
|
|
44 |
// CLASS DECLARATION
|
|
45 |
/**
|
|
46 |
* Sat Call control handling
|
|
47 |
*
|
|
48 |
* @lib simatktsy.lib
|
|
49 |
* @since Series60_ver 2.6
|
|
50 |
*/
|
|
51 |
class CSatCC : public CBase
|
|
52 |
{
|
|
53 |
public: // Constructors and destructor
|
|
54 |
|
|
55 |
/**
|
|
56 |
* Two-phased constructor.
|
|
57 |
* @since NCP 5.0
|
|
58 |
* @param aSatMessHandler pointer to satmessagehandler class
|
|
59 |
* @param aSatMessaging pointer to satmessaging class
|
|
60 |
*/
|
|
61 |
static CSatCC* NewL( CSatMessHandler* aSatMessHandler,
|
|
62 |
CTsySatMessaging* aSatMessaging );
|
|
63 |
|
|
64 |
/**
|
|
65 |
* Destructor.
|
|
66 |
* @since NCP 5.0
|
|
67 |
*/
|
|
68 |
virtual ~CSatCC();
|
|
69 |
|
|
70 |
|
|
71 |
private: // Constructors
|
|
72 |
|
|
73 |
/**
|
|
74 |
* C++ default constructor.
|
|
75 |
* @since NCP 5.0
|
|
76 |
* @param aSatMessHandler pointer to satmessagehandler class
|
|
77 |
* @param aSatMessaging pointer to satmessaging class
|
|
78 |
*/
|
|
79 |
CSatCC( CSatMessHandler* aSatMessHandler,
|
|
80 |
CTsySatMessaging* aSatMessaging );
|
|
81 |
|
|
82 |
/**
|
|
83 |
* By default Symbian 2nd phase constructor is private.
|
|
84 |
* @since NCP 5.0
|
|
85 |
*/
|
|
86 |
void ConstructL();
|
|
87 |
|
|
88 |
|
|
89 |
public: // New functions
|
|
90 |
|
|
91 |
/**
|
|
92 |
* Handles an incoming command from phonet
|
|
93 |
* Called by Phonet receiver when it receives ISI msg.
|
|
94 |
* @since NCP 3.1
|
|
95 |
* @param aIsiMessage received ISI message
|
|
96 |
* @return none
|
|
97 |
*/
|
|
98 |
void MessageReceivedL( const TIsiReceiveC& aIsiMessage );
|
|
99 |
|
|
100 |
/*
|
|
101 |
* Empties the arrays in case of refresh
|
|
102 |
* @since Series60_ver 2.6
|
|
103 |
* @return none
|
|
104 |
*/
|
|
105 |
void ClearArraysForRefresh();
|
|
106 |
|
|
107 |
/*
|
|
108 |
* Set internal flag according to EF-SST
|
|
109 |
* @since Series60_ver 2.6
|
|
110 |
* @param aStatus
|
|
111 |
* @return none
|
|
112 |
*/
|
|
113 |
void SetStatusOfUssdSupport( TBool aStatus );
|
|
114 |
|
|
115 |
/**
|
|
116 |
* Set CSatCC internal Ton and Npi
|
|
117 |
* @since Series60_ver 2.6
|
|
118 |
* @param aTonNpi
|
|
119 |
* @return none
|
|
120 |
*/
|
|
121 |
void SetTonNpi( const TUint8 aTonNpi );
|
|
122 |
|
|
123 |
private: // Data structures
|
|
124 |
|
|
125 |
struct TCallControl
|
|
126 |
{
|
|
127 |
// General with all resource control indications
|
|
128 |
TUint8 iTransId;
|
|
129 |
|
|
130 |
TUint8 iRecourceId;
|
|
131 |
|
|
132 |
TUint8 iResourceSeqId;
|
|
133 |
|
|
134 |
// Call specific
|
|
135 |
TUint8 iCallId;
|
|
136 |
|
|
137 |
TBuf8<KCallModeSize> iCallMode;
|
|
138 |
|
|
139 |
TBuf8<KBccMaxSize> iBearerCapabilities;
|
|
140 |
|
|
141 |
TUint8 iAddressType;
|
|
142 |
|
|
143 |
// SS and Call specific
|
|
144 |
TBuf8<KStringMaxSize> iString;
|
|
145 |
|
|
146 |
// USSD specific
|
|
147 |
TUint8 iUssdCodingInfo;
|
|
148 |
TBuf8<KUssdStringMaxSize> iUssdString;
|
|
149 |
};
|
|
150 |
|
|
151 |
private: // New methods
|
|
152 |
|
|
153 |
/**
|
|
154 |
* add Location Information simple TLV to TTlv
|
|
155 |
* @since Series60_ver 2.6
|
|
156 |
* @param TLV to add location information
|
|
157 |
* @ return none
|
|
158 |
*/
|
|
159 |
void AddLocationInformationToTlv( TTlv& aTlv );
|
|
160 |
|
|
161 |
/**
|
|
162 |
* send (to sim) call control envelope for SS operation
|
|
163 |
* @param aCcstruct structure containing data to be sent
|
|
164 |
* @return phonet sender status
|
|
165 |
*/
|
|
166 |
TInt SendSSEnvelope(const TCallControl& aCcstruct);
|
|
167 |
|
|
168 |
/**
|
|
169 |
* send (to sim) call control envelope for USSD operation
|
|
170 |
* @param aCcstruct structure containing data to be sent
|
|
171 |
* @return phonet sender status
|
|
172 |
*/
|
|
173 |
TInt SendUSSDEnvelope( const TCallControl& aCcstruct );
|
|
174 |
|
|
175 |
/**
|
|
176 |
* send (to sim) call control envelope for Call operation
|
|
177 |
* @param aCallControl structure containing data to be sent
|
|
178 |
* @return phonet sender status
|
|
179 |
*/
|
|
180 |
TInt SendCallEnvelope
|
|
181 |
(
|
|
182 |
const TIsiReceiveC& aIsiMessage,
|
|
183 |
const TCallControl& aCallControl
|
|
184 |
);
|
|
185 |
|
|
186 |
/**
|
|
187 |
* Send (to UICC) call control envelope for PDP Context Activation
|
|
188 |
* @since NCP 5.1
|
|
189 |
* @param aPdpCcEnvelopeTid: Transaction ID received in CC GPRS event
|
|
190 |
* @param aPdpContextActivationParams: PDP Activation Parameters
|
|
191 |
* @return phonet sender status
|
|
192 |
*/
|
|
193 |
TInt SendPdpContextActivationEnvelope( const TUint8 aPdpCcEnvelopeTid,
|
|
194 |
const TDesC8& aPdpContextActivationParams );
|
|
195 |
|
|
196 |
/**
|
|
197 |
* Handles UICC_CAT_RESP, which comes from UICC as a reply
|
|
198 |
* to call control envelope.
|
|
199 |
* @param aIsiMessage Received UICC_CAT_RESP
|
|
200 |
* @return void
|
|
201 |
*/
|
|
202 |
void UiccCatRespEnvelopeReceived( const TIsiReceiveC& aIsiMessage );
|
|
203 |
|
|
204 |
/*
|
|
205 |
* This methods returns ETrue when a Ussd string contains
|
|
206 |
* only "*", "#", and the numbers 0-9.
|
|
207 |
* @since Series60_ver 2.6
|
|
208 |
* @param aUSSDString
|
|
209 |
* @return true if ussd string contains valid values
|
|
210 |
*/
|
|
211 |
TBool IsOnlyDigitsInUssd( TPtrC8 aUSSDString );
|
|
212 |
|
|
213 |
/**
|
|
214 |
* Search thought the iCCarray and finds the index of requested
|
|
215 |
* CC event info
|
|
216 |
* @since Series60_ver 3.0
|
|
217 |
* @param aTid requested transaction ID
|
|
218 |
* @return index of CC event or KErrNotFound
|
|
219 |
*/
|
|
220 |
TInt GetArrayIndexById( const TInt &aTid );
|
|
221 |
|
|
222 |
/**
|
|
223 |
* Handles resource control request from modem Call server
|
|
224 |
* @param aIsiMessage CALL_MODEM_RESOURCE_IND
|
|
225 |
* @return none
|
|
226 |
*/
|
|
227 |
void CallModemResourceInd( const TIsiReceiveC& aIsiMessage );
|
|
228 |
|
|
229 |
/**
|
|
230 |
* Creates resource control response for modem Call server
|
|
231 |
* @param aTcc internally stored call control structure
|
|
232 |
* @param aResult call control result from (U)SIM
|
|
233 |
* @param aAtkData possible additional response data provided by (U)SIM
|
|
234 |
* @return none
|
|
235 |
*/
|
|
236 |
void SendCallModemResourceReq(
|
|
237 |
const TCallControl& aTcc,
|
|
238 |
const TUint8 aResult,
|
|
239 |
TPtrC8 aAtkData );
|
|
240 |
|
|
241 |
/**
|
|
242 |
* Handles resource control request from modem SS server
|
|
243 |
* @param aIsiMessage SS_RESOURCE_CONTROL_IND
|
|
244 |
* @return none
|
|
245 |
*/
|
|
246 |
void SsResourceControlInd( const TIsiReceiveC& aIsiMessage );
|
|
247 |
|
|
248 |
/**
|
|
249 |
* Creates resource control response for modem SS server
|
|
250 |
* @param aTcc internally stored call control structure
|
|
251 |
* @param aResult call control result from (U)SIM
|
|
252 |
* @param aAtkData possible additional response data provided by (U)SIM
|
|
253 |
* @return none
|
|
254 |
*/
|
|
255 |
void SendSsResourceControlReq(
|
|
256 |
const TCallControl& aTcc,
|
|
257 |
const TUint8 aResult,
|
|
258 |
TPtrC8 aAtkData );
|
|
259 |
|
|
260 |
/**
|
|
261 |
* Handles resource control request from modem GPDS server
|
|
262 |
* @param aIsiMessage GPDS_RESOURCE_CONTROL_IND
|
|
263 |
* @return none
|
|
264 |
*/
|
|
265 |
void GpdsResourceControlInd( const TIsiReceiveC& aIsiMessage );
|
|
266 |
|
|
267 |
/**
|
|
268 |
* Creates resource control response for modem GPDS server
|
|
269 |
* @param aTcc internally stored call control structure
|
|
270 |
* @param aResult call control result from (U)SIM
|
|
271 |
* @param aAtkData possible additional response data provided by (U)SIM
|
|
272 |
* @return none
|
|
273 |
*/
|
|
274 |
void SendGpdsResourceControlReq(
|
|
275 |
const TCallControl& aTcc,
|
|
276 |
const TUint8 aResult,
|
|
277 |
TPtrC8 aAtkData );
|
|
278 |
|
|
279 |
private: // Data
|
|
280 |
|
|
281 |
// Array for storing structures
|
|
282 |
RArray<TCallControl>* iCallControlArray;
|
|
283 |
|
|
284 |
// Pointers for messaging classes for internal communication
|
|
285 |
CSatMessHandler* iSatMessHandler;
|
|
286 |
CTsySatMessaging* iSatMessaging;
|
|
287 |
|
|
288 |
// True if Service n°41 in EF-SST is supported.
|
|
289 |
TBool iUssdTlvSupported;
|
|
290 |
|
|
291 |
// True if TonNpi is resolved from SEND SS proactive commmand
|
|
292 |
TBool iTonNpiPresent;
|
|
293 |
|
|
294 |
// For setting TON/NPI for SendSSEnvelope
|
|
295 |
TUint8 iTonNpiForSS;
|
|
296 |
|
|
297 |
// Storage to temporarily store response to call control envelope
|
|
298 |
HBufC8* iEnvelopeResponseData;
|
|
299 |
|
|
300 |
// CC result reported to cellmo
|
|
301 |
TUint8 iCcResult;
|
|
302 |
|
|
303 |
// call control status in (U)SIM card
|
|
304 |
TBool iCallControlEnabled;
|
|
305 |
|
|
306 |
// call control on GPRS status in (U)SIM card
|
|
307 |
TBool iCallControlOnGPRSEnabled;
|
|
308 |
};
|
|
309 |
|
|
310 |
|
|
311 |
#endif // SATCC_H
|
|
312 |
|
|
313 |
|
|
314 |
// End of file
|