0
|
1 |
/*
|
|
2 |
* Copyright (c) 2007-2008 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 CMMPHONEMESSHANDLER_H
|
|
21 |
#define CMMPHONEMESSHANDLER_H
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include <badesca.h>
|
|
25 |
#include <ctsy/serviceapi/cmmutility.h>
|
|
26 |
#include <e32base.h>
|
|
27 |
#include <etelmm.h>
|
|
28 |
#include <ctsy/serviceapi/mmgsmwcdmautils.h>
|
|
29 |
|
|
30 |
#include "mmmmesshandlerbase.h"
|
|
31 |
#include "cmmphonetreceiver.h"
|
|
32 |
#include "nokiatsy_internal_variation.h"
|
|
33 |
#include "muiccoperationbase.h"
|
|
34 |
|
|
35 |
// CONSTANTS
|
|
36 |
//None
|
|
37 |
|
|
38 |
// MACROS
|
|
39 |
//None
|
|
40 |
|
|
41 |
// DATA TYPES
|
|
42 |
//None
|
|
43 |
|
|
44 |
// EXTERNAL DATA STRUCTURES
|
|
45 |
enum TTransIdStates
|
|
46 |
{
|
|
47 |
EPhoneDeleteEntryTransId = 100,
|
|
48 |
EPhoneGetAPNnameTransId = 101,
|
|
49 |
EPhoneGetEnumerateAPNEntriesTransId = 102,
|
|
50 |
EPhoneReadDataFromSimTransId = 103,
|
|
51 |
EPhoneWriteDataTransId = 104,
|
|
52 |
EPhoneGetACLStatusTransId = 105,
|
|
53 |
EPhoneSetACLStatusTransId = 106
|
|
54 |
};
|
|
55 |
|
|
56 |
// FUNCTION PROTOTYPES
|
|
57 |
//None
|
|
58 |
|
|
59 |
// FORWARD DECLARATIONS
|
|
60 |
class CMmPhoNetSender;
|
|
61 |
class CMmMessageRouter;
|
|
62 |
class TIsiReceiveC;
|
|
63 |
class CMmSupplServMessHandler;
|
|
64 |
class CMmUiccMessHandler;
|
|
65 |
|
|
66 |
// CLASS DECLARATION
|
|
67 |
|
|
68 |
/**
|
|
69 |
* CMmPhoneMessHandler is used to create and send mode-independent phone
|
|
70 |
* ISI messages to PhoNet via PhoNetSender. It also receives phone ISI
|
|
71 |
* messages from PhoNet via PhoNetReceiver. If the message is mode-independent,
|
|
72 |
* it will be handled here. Otherwise, the message will be sent to message
|
|
73 |
* handler of active mode.
|
|
74 |
*/
|
|
75 |
class CMmPhoneMessHandler:
|
|
76 |
public CBase,
|
|
77 |
public MMmMessHandlerBase,
|
|
78 |
public MMmMessageReceiver,
|
|
79 |
public MUiccOperationBase
|
|
80 |
{
|
|
81 |
public:
|
|
82 |
|
|
83 |
/**
|
|
84 |
* Creates a new GSM specific PhoneMessageHandler instance.
|
|
85 |
* @param CMmPhoNetSender* aPhoNetSender: Pointer to phonet sender.
|
|
86 |
* @param CMmPhoNetReceiver* aPhoNetReceiver: Pointer to phonet receiver.
|
|
87 |
* @param CMmMessageRouter* aMessageRouter: Pointer to message router.
|
|
88 |
* @param CMmSupplServMessHandler* aSupplServMessHandler: Pointer to
|
|
89 |
supplementary services.
|
|
90 |
* @return CMmPhoneMessHandler*: Pointer to message handler.
|
|
91 |
*/
|
|
92 |
static CMmPhoneMessHandler* NewL(
|
|
93 |
CMmPhoNetSender* aPhoNetSender,
|
|
94 |
CMmPhoNetReceiver* aPhoNetReceiver,
|
|
95 |
CMmMessageRouter* aMessageRouter,
|
|
96 |
CMmSupplServMessHandler* aSupplServMessHandler,
|
|
97 |
CMmUiccMessHandler* aUiccMessHandler);
|
|
98 |
|
|
99 |
/**
|
|
100 |
* Destructor.
|
|
101 |
*/
|
|
102 |
~CMmPhoneMessHandler();
|
|
103 |
|
|
104 |
/**
|
|
105 |
* From MMmMessHandlerBase. This method is the single entry point for
|
|
106 |
* requests coming from the Symbian OS layer to this message handler
|
|
107 |
* @param TInt aIpc: number of the request
|
|
108 |
* @param CMmDataPackage* aDataPackage: pointer to data package
|
|
109 |
* @return TInt KErrNone or error code
|
|
110 |
*/
|
|
111 |
TInt ExtFuncL( TInt aIpc, const CMmDataPackage* aDataPackage );
|
|
112 |
|
|
113 |
/**
|
|
114 |
* ISI message received by PhonetReceiver, interpret if GSM specific
|
|
115 |
* @param const TIsiReceiveC& aIsiMessage: reference to received ISI message
|
|
116 |
*/
|
|
117 |
void ReceiveMessageL( const TIsiReceiveC& aIsiMessage );
|
|
118 |
|
|
119 |
/**
|
|
120 |
* Handle UICC response messages
|
|
121 |
* @param aTraId Transaction ID
|
|
122 |
* @param aFileData Descriptor for file data
|
|
123 |
* @return KErrNone or error code
|
|
124 |
*/
|
|
125 |
TInt ProcessUiccMsg(
|
|
126 |
TInt aTraId,
|
|
127 |
TInt aStatus,
|
|
128 |
const TDesC8& aFileData );
|
|
129 |
|
|
130 |
protected:
|
|
131 |
|
|
132 |
/**
|
|
133 |
* Default constructor.
|
|
134 |
*/
|
|
135 |
CMmPhoneMessHandler();
|
|
136 |
|
|
137 |
/**
|
|
138 |
* Info serial number read response.
|
|
139 |
* @param CIsiMsg* aIsiMsg: Received ISI message
|
|
140 |
* @return void
|
|
141 |
*/
|
|
142 |
void InfoSerialNumberReadResp( const TIsiReceiveC &aIsiMessage );
|
|
143 |
|
|
144 |
/**
|
|
145 |
* Dynamic flags read request
|
|
146 |
* @return KErrNone or error code
|
|
147 |
*/
|
|
148 |
TInt UiccReadDynamicFlagsReq();
|
|
149 |
|
|
150 |
/**
|
|
151 |
* Dynamic flags read response
|
|
152 |
* @param aStatus Status
|
|
153 |
* @param aFileData File data
|
|
154 |
* @return None
|
|
155 |
*/
|
|
156 |
void UiccReadDynamicFlagsResp(
|
|
157 |
TInt aStatus,
|
|
158 |
const TDesC8& aFileData );
|
|
159 |
|
|
160 |
/**
|
|
161 |
* Dynamic flags write request
|
|
162 |
* @param aInfo Dynamic flags data
|
|
163 |
* @return KErrNone or error code
|
|
164 |
*/
|
|
165 |
TInt UiccWriteDynamicFlagsReq( TUint8 aInfo );
|
|
166 |
|
|
167 |
/**
|
|
168 |
* Dynamic flags write response
|
|
169 |
* @param aStatus Status
|
|
170 |
* @return None
|
|
171 |
*/
|
|
172 |
void UiccWriteDynamicFlagsResp( TInt aStatus );
|
|
173 |
|
|
174 |
|
|
175 |
/**
|
|
176 |
* CSP file request
|
|
177 |
* @return KErrNone or error code
|
|
178 |
*/
|
|
179 |
TInt UiccCspFileReq();
|
|
180 |
|
|
181 |
/**
|
|
182 |
* CSP file response
|
|
183 |
* @param aStatus Status
|
|
184 |
* @param aFileData File data
|
|
185 |
* @return None
|
|
186 |
*/
|
|
187 |
void UiccCspFileResp( TInt aStatus, const TDesC8& aFileData );
|
|
188 |
|
|
189 |
/**
|
|
190 |
* Class attributes are created in ConstructL
|
|
191 |
* @param CMmMessageRouter* aMessageRouter: pointer to message
|
|
192 |
* router object
|
|
193 |
* @return void : None
|
|
194 |
*/
|
|
195 |
void ConstructL( CMmMessageRouter* aMessageRouter );
|
|
196 |
|
|
197 |
private:
|
|
198 |
|
|
199 |
/**
|
|
200 |
* For nokiatsy internal refresh handling
|
|
201 |
*/
|
|
202 |
enum
|
|
203 |
{
|
|
204 |
KRefreshSms = 0x01,
|
|
205 |
KRefreshCallForwardingFlags = 0x02,
|
|
206 |
KRefreshOplRules = 0x04,
|
|
207 |
KRefreshPnnRecord = 0x08,
|
|
208 |
KRefreshOnsName = 0x10
|
|
209 |
};
|
|
210 |
|
|
211 |
/**
|
|
212 |
* Read IMSI from UICC
|
|
213 |
* @return Error code
|
|
214 |
*/
|
|
215 |
TInt UiccImsiReq();
|
|
216 |
|
|
217 |
/**
|
|
218 |
* Response to IMSI read request.
|
|
219 |
* @param aStatus Status of response message
|
|
220 |
* @param aFileData Data from SIM file
|
|
221 |
* @return void
|
|
222 |
*/
|
|
223 |
void UiccImsiResp( TInt aStatus, const TDesC8& aFileData );
|
|
224 |
|
|
225 |
/**
|
|
226 |
* Request to read Service Provider Name from UICC.
|
|
227 |
* @return Symbian error code
|
|
228 |
*/
|
|
229 |
TInt UiccReadServiceProviderName();
|
|
230 |
|
|
231 |
/**
|
|
232 |
* Response for request to read Service provider name from UICC.
|
|
233 |
* @param aStatus Status of response message
|
|
234 |
* @param aFileData Data from SIM file
|
|
235 |
* @return void
|
|
236 |
*/
|
|
237 |
void UiccReadServiceProviderNameResp(
|
|
238 |
TInt aStatus,
|
|
239 |
const TDesC8& aFileData );
|
|
240 |
|
|
241 |
/**
|
|
242 |
* Subscribes responses and indications from PhoNet.
|
|
243 |
* @return TInt : success/failure value
|
|
244 |
*/
|
|
245 |
TInt SubscribeEventsFromPhoNet();
|
|
246 |
|
|
247 |
/**
|
|
248 |
* Creates InfoSerialNumberReadReq ISI message and sends it to Phonet.
|
|
249 |
* @param TUint8 aTransactionId: unique TransactionId number
|
|
250 |
* @param TUint8 aTarget: request data
|
|
251 |
* @return TInt : success/failure value
|
|
252 |
*/
|
|
253 |
TInt InfoSerialNumberReadReq(
|
|
254 |
TUint8 aTransactionId,
|
|
255 |
TUint8 aTarget );
|
|
256 |
|
|
257 |
/**
|
|
258 |
* Process service type checking for service provider name query
|
|
259 |
* @param aFileData File data read from UICC
|
|
260 |
* @return Error code
|
|
261 |
*/
|
|
262 |
TInt UiccProcessServiceTypeCheck( const TDesC8& aFileData );
|
|
263 |
|
|
264 |
/**
|
|
265 |
* Process service provider name info
|
|
266 |
* @param aStatus UICC server status
|
|
267 |
* @param aFileData File data read from UICC
|
|
268 |
*/
|
|
269 |
void UiccProcessSpnNameInfo(
|
|
270 |
TInt aStatus,
|
|
271 |
const TDesC8& aFileData );
|
|
272 |
|
|
273 |
//ATTRIBUTES
|
|
274 |
public:
|
|
275 |
//none
|
|
276 |
|
|
277 |
protected:
|
|
278 |
|
|
279 |
//Pointer to the PhonetSender
|
|
280 |
CMmPhoNetSender* iPhoNetSender;
|
|
281 |
|
|
282 |
//Pointer to the Message Router
|
|
283 |
CMmMessageRouter* iMessageRouter;
|
|
284 |
|
|
285 |
//Pointer to the Supplementary Service
|
|
286 |
CMmSupplServMessHandler* iSupplServMessHandler;
|
|
287 |
|
|
288 |
// Pointer to UICC message handler
|
|
289 |
CMmUiccMessHandler* iMmUiccMessHandler;
|
|
290 |
|
|
291 |
// This flag indicates if re-reading of cached data
|
|
292 |
// is going on in commontsy.
|
|
293 |
TBool iCommonTSYRefreshPending;
|
|
294 |
|
|
295 |
private:
|
|
296 |
|
|
297 |
// Location index for SimPnReadReq
|
|
298 |
TUint16 iLocIndex;
|
|
299 |
|
|
300 |
// SIM Service Table, used to temporarily save data for completion
|
|
301 |
RMobilePhone::TMobilePhoneServiceTableV1 iSSTFile;
|
|
302 |
|
|
303 |
// USIM Service Table, used to temporarily save data for completion
|
|
304 |
RMobilePhone::TMobilePhoneServiceTableV1 iUSTFile;
|
|
305 |
|
|
306 |
//value of the second display condition byte
|
|
307 |
TUint8 iSecondDisplayCondition;
|
|
308 |
|
|
309 |
// Service table
|
|
310 |
SSSTFileData* iSSTFileData;
|
|
311 |
|
|
312 |
// Phone Store Info
|
|
313 |
SStoreInfo* iStoreInfo;
|
|
314 |
|
|
315 |
//Service provider name
|
|
316 |
RMobilePhone::TMobilePhoneServiceProviderNameV2 iServiceProviderName;
|
|
317 |
|
|
318 |
//Keeps track state of ACL enquiry
|
|
319 |
TBool iACLIsProgress;
|
|
320 |
|
|
321 |
// Keeps track of APN list
|
|
322 |
CDesC8ArrayFlat* iAPNList;
|
|
323 |
|
|
324 |
//Keeps track of APN data.
|
|
325 |
RMobilePhone::TAPNEntryV3 iAPNDataBuffer;
|
|
326 |
|
|
327 |
// Keeps track of ACL index to read or delete
|
|
328 |
TUint iAPNReadOrDeleteIndex;
|
|
329 |
|
|
330 |
//Current ALS line used
|
|
331 |
RMobilePhone::TMobilePhoneALSLine iAlsLine;
|
|
332 |
|
|
333 |
// Keeps track on nokiatsy internal refresh
|
|
334 |
TUint8 iInternalRefreshFiles;
|
|
335 |
|
|
336 |
// Keeps track if any errors happened during re-reading of cached files
|
|
337 |
TBool iRefreshError;
|
|
338 |
};
|
|
339 |
|
|
340 |
#endif // CMMPHONEMESSHANDLER_H
|
|
341 |
|
|
342 |
// End of file
|
|
343 |
|