0
|
1 |
/*
|
|
2 |
* Copyright (c) 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 |
#ifndef CMMPHONEBOOKSOPERATIONBASE_H
|
|
19 |
#define CMMPHONEBOOKSOPERATIONBASE_H
|
|
20 |
|
|
21 |
// INCLUDES
|
|
22 |
#include <ctsy/pluginapi/cmmdatapackage.h>
|
|
23 |
#include "cmmstaticutility.h"
|
|
24 |
#include <ctsy/serviceapi/cmmgsmphonestorageutility.h>
|
|
25 |
#include <badesca.h> //for arrays
|
|
26 |
#include <e32base.h>
|
|
27 |
|
|
28 |
#ifdef INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS
|
|
29 |
#include <ctsy/rmmcustomapi.h>
|
|
30 |
#endif // INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS
|
|
31 |
|
|
32 |
#include "cmmphonetsender.h"
|
|
33 |
#include "cmmphonetreceiver.h"
|
|
34 |
#include "cmmphonebookstoremesshandler.h"
|
|
35 |
|
|
36 |
|
|
37 |
//UICC
|
|
38 |
#include "muiccoperationbase.h"
|
|
39 |
#include "cmmuiccmesshandler.h"
|
|
40 |
#include <uiccisi.h>
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
// CONSTANTS
|
|
45 |
const TInt KLocationFirst = -1;
|
|
46 |
const TUint8 KMinLength = 1;
|
|
47 |
const TUint8 KLengthWithSFI = 3;
|
|
48 |
const TUint8 KLengthWithOutSFI = 2;
|
|
49 |
|
|
50 |
_LIT(KInternalPhoneBookType,"Init");
|
|
51 |
|
|
52 |
const TUint8 KPadding = 0;
|
|
53 |
|
|
54 |
#ifdef INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS
|
|
55 |
const TUint8 SIM_AAS = 0x10;
|
|
56 |
const TUint8 SIM_GAS = 0x11;
|
|
57 |
#endif // INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS
|
|
58 |
|
|
59 |
// Mask that is used to separate phonebooktype from transaction Id
|
|
60 |
const TUint8 KMaskPhonebookType = 0xF0;
|
|
61 |
|
|
62 |
// Mask that is used to separate operation from transaction Id
|
|
63 |
const TUint8 KMaskOperationType = 0x0F;
|
|
64 |
|
|
65 |
// Added mask (4 most significant bits) to separate different phonebook's
|
|
66 |
const TUint8 KMaskAdnType = 0x10; //0001 0000 = ADN
|
|
67 |
const TUint8 KMaskFdnType = 0x20; //0010 0000 = FDN
|
|
68 |
const TUint8 KMaskSdnType = 0x30; //0011 0000 = SDN
|
|
69 |
const TUint8 KMaskBdnType = 0x40; //0100 0000 = BDN
|
|
70 |
const TUint8 KMaskMbdnType = 0x50; //0101 0000 = MBDN
|
|
71 |
const TUint8 KMaskVoiceMailBox = 0x60; //0110 0000 = VMBX
|
|
72 |
|
|
73 |
#ifdef INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS
|
|
74 |
const TUint8 KMaskAasType = 0x70; //0111 0000 = Additional Alpha String
|
|
75 |
const TUint8 KMaskGasType = 0x80; //1000 0000 = Group Alpha String
|
|
76 |
#endif // INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS
|
|
77 |
|
|
78 |
//const TUint8 KMaskFreeType = 0x09; //1001 0000 = Free
|
|
79 |
//const TUint8 KMaskFreeType = 0xA0; //1010 0000 = Free
|
|
80 |
//const TUint8 KMaskFreeType = 0xB0; //1011 0000 = Free
|
|
81 |
//const TUint8 KMaskFreeType = 0xC0; //1100 0000 = Free
|
|
82 |
//const TUint8 KMaskFreeType = 0xD0; //1101 0000 = Free
|
|
83 |
//const TUint8 KMaskFreeType = 0xE0; //1110 0000 = Free
|
|
84 |
const TUint8 KMaskUnspecifiedType = 0xF0;//1111 0000 = Unknown
|
|
85 |
|
|
86 |
// Added mask (4 least significant bits) to separate different request IPC's
|
|
87 |
const TUint8 KOperationInit = 0x01; //0000 0001 = init
|
|
88 |
const TUint8 KOperationCache = 0x02; //0000 0010 = cache
|
|
89 |
const TUint8 KOperationRead = 0x03; //0000 0011 = Read
|
|
90 |
const TUint8 KOperationWrite = 0x04; //0000 0100 = Write
|
|
91 |
const TUint8 KOperationDelete = 0x05; //0000 0101 = Delete
|
|
92 |
const TUint8 KOperationDeleteAll = 0x6; //0000 0110 = DeleteAll
|
|
93 |
const TUint8 KOperationDeleteWrite = 0x07; //0000 0111 = writeDelete = AdnCase
|
|
94 |
const TUint8 KOperationReWrite = 0x08; //0000 1000 = rewrite = adn case
|
|
95 |
const TUint8 KOperationGetMailBoxNumber = 0x09; //0000 1001 = GetMBDN number
|
|
96 |
const TUint8 KOperationGetInfo = 0x0A; //0000 1010
|
|
97 |
//const TUint8 KOperationFree = 0x0C;
|
|
98 |
//const TUint8 KOperationFree = 0x0D;
|
|
99 |
//const TUint8 KOperationFree = 0x0E;
|
|
100 |
const TUint8 KOperationUnknown = 0x0F; //0000 1111 = Unknown
|
|
101 |
const TUint8 KOperationMask = 0x0F;
|
|
102 |
|
|
103 |
const TUint8 KMBDNPhonebook = 6;
|
|
104 |
const TUint8 KSimMbdn = 0x00;
|
|
105 |
|
|
106 |
//File ID
|
|
107 |
const TUint16 KMasterFile = 0x3F00; // Master File
|
|
108 |
const TUint16 KDedicatedFileGSM = 0x7F20; // Dedicated File (Gsm)
|
|
109 |
const TUint16 KDedicatedFileMBI = 0x6FC9; // Dedicated File (MBI)
|
|
110 |
|
|
111 |
|
|
112 |
const TUint8 KTagFCIFileDescriptor = 0x82; // for file descriptor tag in FCI data received from UICC Server
|
|
113 |
const TUint8 KTagFCIFileIdentifier = 0x83; // for File identifier in FCI data
|
|
114 |
const TUint8 KTagFCIFileSize = 0x85; // for File size data
|
|
115 |
const TUint8 KTagConstructedTagA8 = 0xA8; // Type 1 files tag in PBR file
|
|
116 |
const TUint8 KTagConstructedTagA9 = 0xA9; // Type 2 files tag in PBR file
|
|
117 |
const TUint8 KTagConstructedTagAA = 0xAA; // Type 3 files tag in PBR file
|
|
118 |
const TUint8 KTagUnusedbyte = 0xFF; // constant to find unused bytes
|
|
119 |
|
|
120 |
const TUint8 KRecordLength = 0;
|
|
121 |
const TUint8 KNoOfRecords = 1;
|
|
122 |
const TUint8 KFileSize = 2;
|
|
123 |
const TUint8 KFileIdentifier = 3;
|
|
124 |
const TUint8 KFileStatus = 4;
|
|
125 |
|
|
126 |
|
|
127 |
|
|
128 |
|
|
129 |
|
|
130 |
|
|
131 |
// UICC constants
|
|
132 |
#define MF_FILE 0x3F00 //Master file
|
|
133 |
#define DF_CURRENT_APP 0x7FFF //
|
|
134 |
#define DF_PHONEBOOK 0x5F3A
|
|
135 |
#define APPL_FILE_ID 0x7F10 // Address for DFphonebook
|
|
136 |
#define UICC_SESSION_ID_NOT_USED 0x00
|
|
137 |
#define PB_UICC_SB_APPL_PATH_SB_LENGTH 0x0010
|
|
138 |
#define PB_UICC_SB_APPL_PATH_SB_LENGTH_2 0x0012
|
|
139 |
#define PB_ADN_FID 0x6F3A
|
|
140 |
#define PB_FDN_FID 0x6F3B
|
|
141 |
#define PB_SDN_FID 0x6F49
|
|
142 |
#define PB_BDN_FID 0x6F4D
|
|
143 |
#define PB_MBDN_FID 0x6FC7
|
|
144 |
#define PB_MSISDN_FID 0x6F40
|
|
145 |
#define PB_VMBX_FID 0x6F17
|
|
146 |
#define PB_EXT1_FID 0x6F4A
|
|
147 |
#define PB_EXT2_FID 0x6F4B
|
|
148 |
#define PB_EXT3_FID 0x6F4C
|
|
149 |
#define PB_EXT4_FID 0x6F55
|
|
150 |
#define PB_EXT5_FID 0x6F4E
|
|
151 |
#define PB_EXT6_FID 0x6FC8
|
|
152 |
#define PB_PBR_FID 0x4F30
|
|
153 |
#define DF_PB_FILE_PATH 0x3F007FFF5F3A
|
|
154 |
#define UICC_SFI_NOT_PRESENT 0x00
|
|
155 |
#define DF_PATH_LENGTH 0x06
|
|
156 |
#define DF_PATH_TELECOM 0x7F10
|
|
157 |
#define DF_PATH_PHONEBOOK 0x5F3A
|
|
158 |
#define UICC_SB_LINEAR_FIXED_SB_LENGTH 0x0008
|
|
159 |
#define UICC_APPL_CMD_RESP_OFFSET 0x07
|
|
160 |
|
|
161 |
#define UICC_SB_FCI_FCP_EF_NO_REC_OFFSET 0x12
|
|
162 |
#define UICC_SB_FCI_FCP_EF_REC_L_OFFSET 0x10
|
|
163 |
|
|
164 |
#define UICC_SB_FILE_DATA_OFFSET 0x08
|
|
165 |
#define UICC_EF_ANR_EXT_REC_OFFSET 0x15
|
|
166 |
#define UICC_EF_FILE_EXT_FILE_NOT_EXIST 0xFF
|
|
167 |
#define UICC_EF_FDN_NO_EXT_NUM_LEN 20
|
|
168 |
#define UICC_EF_MAX_NUM_LEN_WITH_EXT 2814
|
|
169 |
#define UICC_EF_MAX_NAME_LEN 241
|
|
170 |
#define UICC_EF_ANR_EXT_OFFSET 14
|
|
171 |
#define UICC_EF_MAX_REC_LEN 255
|
|
172 |
|
|
173 |
#define UICC_EF_FDN_MIN_REC_LEN 14
|
|
174 |
|
|
175 |
#define UICC_APPL_CMD_RESP_TRANSID_OFFSET 0x00
|
|
176 |
#define UICC_APPL_CMD_RESP_NUMSBLOCK_OFFSET 0x07
|
|
177 |
#define UICC_APPL_CMD_RESP_STATUS_OFFSET 0x04
|
|
178 |
#define UICC_APPL_CMD_RESP_DETAILS_OFFSET 0x05
|
|
179 |
#define UICC_SERVER_STATUS_OFFSET 0x03
|
|
180 |
|
|
181 |
#define UICC_PBR_CONSTRUCTED_TAG_A8 0xA8
|
|
182 |
#define UICC_PBR_CONSTRUCTED_TAG_A9 0xA9
|
|
183 |
#define UICC_PBR_CONSTRUCTED_TAG_AA 0xAA
|
|
184 |
|
|
185 |
#define UICC_OFFSET_TO_FIRST_PRIM_TAG 0x25
|
|
186 |
#define UICC_OFFSET_TO_FIRST_PRIM_TAG_FDI 0x26
|
|
187 |
#define UICC_OFFSET_TO_FIRST_PRIM_TAG_SFI 0x27
|
|
188 |
#define UICC_PBR_PRIMITIVE_TAG_SFI_IS_ZERO 0x00
|
|
189 |
|
|
190 |
#define UICC_ADN_PRIM_TAG 0xC0
|
|
191 |
#define UICC_IAP_PRIM_TAG 0xC1
|
|
192 |
#define UICC_SNE_PRIM_TAG 0xC3
|
|
193 |
#define UICC_ANR_PRIM_TAG 0xC4
|
|
194 |
#define UICC_GRP_PRIM_TAG 0xC6
|
|
195 |
#define UICC_EMAIL_PRIM_TAG 0xCA
|
|
196 |
|
|
197 |
#define UICC_FCI_EF_NO_REC_OFFSET 0x12
|
|
198 |
|
|
199 |
#define UICC_FCI_FILE_DESC_TAG 0x82
|
|
200 |
#define UICC_FCI_EF_FDESC_OFFSET_NUM_ENTR 6
|
|
201 |
#define UICC_FCI_EF_FDESC_OFFSET_ENT_LENG 4
|
|
202 |
#define UICC_ADN_EF_REC_LEN_FIXED_PART 14
|
|
203 |
|
|
204 |
#define UICC_EF_ADN_TAG 0xC0
|
|
205 |
#define UICC_EF_IAP_TAG 0xC1
|
|
206 |
#define UICC_EF_EXT1_TAG 0xC2
|
|
207 |
#define UICC_EF_SNE_TAG 0xC3
|
|
208 |
#define UICC_EF_ANR_TAG 0xC4
|
|
209 |
#define UICC_EF_PBC_TAG 0xC5
|
|
210 |
#define UICC_EF_GRP_TAG 0xC6
|
|
211 |
#define UICC_EF_AAS_TAG 0xC7
|
|
212 |
#define UICC_EF_GAS_TAG 0xC8
|
|
213 |
#define UICC_EF_UID_TAG 0xC9
|
|
214 |
#define UICC_EF_EMAIL_TAG 0xCA
|
|
215 |
#define UICC_EF_CCP1_TAG 0xCB
|
|
216 |
|
|
217 |
// UICC Server Service type
|
|
218 |
#define UICC_APPL_READ_TRANSPARENT 0x21
|
|
219 |
#define UICC_APPL_UPDATE_TRANSPARENT 0x22
|
|
220 |
#define UICC_APPL_READ_LINEAR_FIXED 0x23
|
|
221 |
#define UICC_APPL_UPDATE_LINEAR_FIXED 0x24
|
|
222 |
#define UICC_APPL_FILE_INFO 0x25
|
|
223 |
#define UICC_APPL_APDU_SEND 0x26
|
|
224 |
#define UICC_APPL_CLEAR_CACHE 0x27
|
|
225 |
#define UICC_APPL_SESSION_START 0x28
|
|
226 |
#define UICC_APPL_SESSION_END 0x29
|
|
227 |
|
|
228 |
// SST table Service numebers
|
|
229 |
|
|
230 |
#define ICC_ADN_SERVICE_NUM 2
|
|
231 |
#define ICC_FDN_SERVICE_NUM 3
|
|
232 |
#define ICC_SDN_SERVICE_NUM 18
|
|
233 |
#define ICC_BDN_SERVICE_NUM 31
|
|
234 |
#define ICC_MSISDN_SERVICE_NUM 9
|
|
235 |
#define ICC_EXT1_SERVICE_NUM 10
|
|
236 |
#define ICC_EXT2_SERVICE_NUM 11
|
|
237 |
#define ICC_EXT3_SERVICE_NUM 19
|
|
238 |
#define ICC_EXT4_SERVICE_NUM 32
|
|
239 |
#define ICC_EXT5_SERVICE_NUM 44
|
|
240 |
#define ICC_MBDN_SERVICE_NUM 53
|
|
241 |
|
|
242 |
// UST Table Service numbers
|
|
243 |
|
|
244 |
#define UICC_FDN_SERVICE_NUM 2
|
|
245 |
#define UICC_SDN_SERVICE_NUM 4
|
|
246 |
#define UICC_BDN_SERVICE_NUM 6
|
|
247 |
#define UICC_MSISDN_SERVICE_NUM 21
|
|
248 |
#define UICC_EXT2_SERVICE_NUM 3
|
|
249 |
#define UICC_EXT3_SERVICE_NUM 5
|
|
250 |
#define UICC_EXT4_SERVICE_NUM 7
|
|
251 |
#define UICC_EXT5_SERVICE_NUM 44
|
|
252 |
#define UICC_MBDN_SERVICE_NUM 47
|
|
253 |
|
|
254 |
|
|
255 |
// CPHS Service table
|
|
256 |
#define ICC_CSP_SERVICE_NUM 1
|
|
257 |
#define ICC_SST_SERVICE_NUM 2
|
|
258 |
#define ICC_MAILBOX_NUM 3
|
|
259 |
#define ICC_OP_NAME_SERVICE_NUM 4
|
|
260 |
|
|
261 |
|
|
262 |
#define UICC_NO_EXT_MAX_NUM_LEN 0x14
|
|
263 |
|
|
264 |
|
|
265 |
// File types
|
|
266 |
|
|
267 |
#define UICC_TYPE1_FILE 1
|
|
268 |
#define UICC_TYPE2_FILE 2
|
|
269 |
#define UICC_TYPE3_FILE 3
|
|
270 |
|
|
271 |
|
|
272 |
// end UICC constants
|
|
273 |
|
|
274 |
|
|
275 |
// MACROS
|
|
276 |
//none
|
|
277 |
|
|
278 |
// DATA TYPES
|
|
279 |
//none
|
|
280 |
|
|
281 |
// EXTERNAL DATA STRUCTURES
|
|
282 |
enum TPBIniPhases
|
|
283 |
{
|
|
284 |
EPBInitPhaseADN = 0,
|
|
285 |
EPBInitPhaseFDN,
|
|
286 |
EPBInitPhaseSDN,
|
|
287 |
EPBInitPhaseMBDN,
|
|
288 |
EPBInitPhaseMSISDN,
|
|
289 |
EPBInitPhaseVMBX,
|
|
290 |
EPBInitPhase_File_Info,
|
|
291 |
EPBInitPhase_FIle_Data,
|
|
292 |
EPBInitPhase_Complete,
|
|
293 |
EPBInitPhase_3GADN_PBR,
|
|
294 |
EPBInitPhase_3GADN_Type1,
|
|
295 |
EPBInitPhase_3GADN_Type2,
|
|
296 |
EPBInitPhase_3GADN_Type3,
|
|
297 |
EPBIniPhase_3GADNDone,
|
|
298 |
EPBIniPhase_PBInitialized,
|
|
299 |
EPBIniPhase_Unknown,
|
|
300 |
EPBIniPhase_Internal
|
|
301 |
};
|
|
302 |
|
|
303 |
|
|
304 |
enum TPhonebookType
|
|
305 |
{
|
|
306 |
EPhonebookTypeAdn = 0,
|
|
307 |
EPhonebookTypeFdn,
|
|
308 |
EPhonebookTypeSdn,
|
|
309 |
EPhonebookTypeBdn,
|
|
310 |
EPhonebookTypeVMBX,
|
|
311 |
EPhonebookTypeMBDN
|
|
312 |
};
|
|
313 |
|
|
314 |
enum TPBWritePhases
|
|
315 |
{
|
|
316 |
EPBWritePhase_delete = 0,
|
|
317 |
EPBWritePhase_rewrite,
|
|
318 |
EPBWritePhase_complete
|
|
319 |
};
|
|
320 |
|
|
321 |
|
|
322 |
// Struct data
|
|
323 |
|
|
324 |
struct TPrimitiveTag
|
|
325 |
{
|
|
326 |
TUint8 tagValue; // 1 byte long
|
|
327 |
TInt tagFID; // 2 byte long
|
|
328 |
TUint8 tagSFI;
|
|
329 |
};
|
|
330 |
|
|
331 |
// FUNCTION PROTOTYPES
|
|
332 |
//none
|
|
333 |
|
|
334 |
// FORWARD DECLARATIONS
|
|
335 |
class CMmPhoneBookStoreExtInterface;
|
|
336 |
class CPhoneBookStoreEntry;
|
|
337 |
class CStorageInfoData;
|
|
338 |
class CMmUiccMessHandler;
|
|
339 |
|
|
340 |
#ifdef INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS
|
|
341 |
class CAlphaString;
|
|
342 |
#endif // INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS
|
|
343 |
|
|
344 |
// CLASS DECLARATION
|
|
345 |
/**
|
|
346 |
* CMmPhoneBookStoreOperationBase is base class for all operations
|
|
347 |
*/
|
|
348 |
class CMmPhoneBookStoreOperationBase
|
|
349 |
: public CBase
|
|
350 |
{
|
|
351 |
public:
|
|
352 |
|
|
353 |
/**
|
|
354 |
* C++ constructor.
|
|
355 |
*/
|
|
356 |
CMmPhoneBookStoreOperationBase();
|
|
357 |
|
|
358 |
/**
|
|
359 |
* Destructor.
|
|
360 |
*/
|
|
361 |
~CMmPhoneBookStoreOperationBase();
|
|
362 |
|
|
363 |
// Second phase constructor
|
|
364 |
static CMmPhoneBookStoreOperationBase* NewL(CMmUiccMessHandler* aUiccMessHandler);
|
|
365 |
/**
|
|
366 |
* Basic implementation to handling request if operation not found.
|
|
367 |
*
|
|
368 |
* @param aIpc not used
|
|
369 |
* @param aDataPackage not used
|
|
370 |
* @return KErrNotSupported.
|
|
371 |
*/
|
|
372 |
virtual TInt CreateReq(
|
|
373 |
TInt /*aIpc*/,
|
|
374 |
const CMmDataPackage* /*aDataPackage*/ )
|
|
375 |
{TFLOGSTRING("TSY: CMmPhoneBookStoreOperationBase::CreateReq - Return KErrNotSupported");
|
|
376 |
return KErrNotSupported; };
|
|
377 |
|
|
378 |
/**
|
|
379 |
* Cancels the operation.
|
|
380 |
*/
|
|
381 |
virtual void CancelReq();
|
|
382 |
|
|
383 |
/**
|
|
384 |
* Prepares the operation (makes it ready to be launched).
|
|
385 |
*
|
|
386 |
* @param aIpc IPC request
|
|
387 |
* @param aDataPackage parameters to prepare request with
|
|
388 |
* @return TInt KErrNotReady on attempt to prepare prepared operation
|
|
389 |
*/
|
|
390 |
virtual TInt PrepareReq( TInt aIpc, const CMmDataPackage* aDataPackage );
|
|
391 |
|
|
392 |
/**
|
|
393 |
* Checks if operation is ready to be launched.
|
|
394 |
* Base implementation returns EFalse
|
|
395 |
*
|
|
396 |
* @return TBool ETrue - operation is ready to be launched
|
|
397 |
*/
|
|
398 |
virtual TBool IsPrepared() const;
|
|
399 |
|
|
400 |
/**
|
|
401 |
* Launches activated operation.
|
|
402 |
*
|
|
403 |
* @return TInt KErrNotReady on attempt to launch not prepared operation;
|
|
404 |
* or system-wide error code
|
|
405 |
*/
|
|
406 |
virtual TInt LaunchReq();
|
|
407 |
|
|
408 |
/**
|
|
409 |
* Completes the request.
|
|
410 |
*
|
|
411 |
* @param aErrorCode error code to be completed with
|
|
412 |
* @return TInt KErrNone or KErrNotSupported if operation is not prepared
|
|
413 |
*/
|
|
414 |
virtual TInt CompleteReq( TInt aErrorCode );
|
|
415 |
|
|
416 |
/**
|
|
417 |
* Basic implementation to handling response if operation not found.
|
|
418 |
*
|
|
419 |
* @param aIsiMessage not used
|
|
420 |
* @param aComplete not used
|
|
421 |
* @return KErrNotSupported.
|
|
422 |
*/
|
|
423 |
virtual TInt HandleSimPbRespL(
|
|
424 |
const TIsiReceiveC& /*aIsiMessage*/, TBool& /*aComplete*/ )
|
|
425 |
{TFLOGSTRING("TSY: CMmPhoneBookStoreOperationBase::HandleSimPbResp - Return KErrNotSupported");
|
|
426 |
return KErrNotSupported; };
|
|
427 |
|
|
428 |
|
|
429 |
/**
|
|
430 |
* Basic implementation to handling request if operation not found in UICC.
|
|
431 |
*
|
|
432 |
* @param aComplete not used
|
|
433 |
* @param aStatus not used
|
|
434 |
* @param aFileData KErrNotSupported
|
|
435 |
* @return KErrNotSupported.
|
|
436 |
*/
|
|
437 |
|
|
438 |
virtual TInt HandleUICCPbRespL( TBool & /*complete*/, TInt /*aStatus*/, const TDesC8& /*aFileData*/, TInt /*aTransId*/)
|
|
439 |
{TFLOGSTRING("TSY: CMmPhoneBookStoreOperationBase::HandleUICCPbRespL - Return KErrNotSupported");
|
|
440 |
return KErrNotSupported;
|
|
441 |
};
|
|
442 |
|
|
443 |
/**
|
|
444 |
* Basic implementation to handling request if operation not found in UICC.
|
|
445 |
*
|
|
446 |
* @param aIpc not used
|
|
447 |
* @param aDataPackage not used
|
|
448 |
* @return KErrNotSupported.
|
|
449 |
*/
|
|
450 |
virtual TInt UICCCreateReq(
|
|
451 |
TInt /*aIpc*/,
|
|
452 |
const CMmDataPackage* /*aDataPackage*/)
|
|
453 |
{
|
|
454 |
TFLOGSTRING("TSY: CMmPhoneBookStoreOperationBase::CreateReq - Return KErrNotSupported");
|
|
455 |
return KErrNotSupported;
|
|
456 |
};
|
|
457 |
|
|
458 |
|
|
459 |
/**
|
|
460 |
* Converts client phonebook to phonebook mask.
|
|
461 |
*
|
|
462 |
* @param aPBType
|
|
463 |
* @return TUint8
|
|
464 |
*/
|
|
465 |
static TUint8 ConvertToPBtype( const TName& aPBType );
|
|
466 |
|
|
467 |
|
|
468 |
/**
|
|
469 |
* Converts client phonebook to phonebook mask.
|
|
470 |
*
|
|
471 |
* @param aPBType
|
|
472 |
* @return TUint8
|
|
473 |
*/
|
|
474 |
static TUint8 ConvertToPBtypeUICC( const TName& aPBType );
|
|
475 |
|
|
476 |
|
|
477 |
/**
|
|
478 |
* Converts client phonebooktype to client phonebook name.
|
|
479 |
*
|
|
480 |
* @param aPBType
|
|
481 |
* @return TUint8
|
|
482 |
*/
|
|
483 |
void ConvertPBTypeToPbName(const TUint aPhonebookType, TName& aName );
|
|
484 |
|
|
485 |
/**
|
|
486 |
* Converts client phonebook to phonebook mask.
|
|
487 |
*
|
|
488 |
* @param aPBType
|
|
489 |
* @return TUint8
|
|
490 |
*/
|
|
491 |
void ConvertToPBname( const TUint8 aTrans, TName& aName );
|
|
492 |
|
|
493 |
/**
|
|
494 |
* Separate Phonebook Entry from UICC -message
|
|
495 |
*
|
|
496 |
* @param aFileData Received UICC message
|
|
497 |
* @param aEntry Entry to be separated
|
|
498 |
* @return KErrNone or error value.
|
|
499 |
*/
|
|
500 |
TInt SeparatePhoneBookEntryFromUiccMsgL(
|
|
501 |
const TDesC8& aFileData,
|
|
502 |
TDes8& aNameBuf,
|
|
503 |
TUint16 aSimPhonebookType);
|
|
504 |
|
|
505 |
|
|
506 |
/**
|
|
507 |
* Store Phonebook Entry from UICC -message
|
|
508 |
*
|
|
509 |
* @param aFileData Received UICC message
|
|
510 |
* @param aEntry Entry to be separated
|
|
511 |
* @return KErrNone or error value.
|
|
512 |
*/
|
|
513 |
void StorePhonebookEntry(
|
|
514 |
TDes8& aName,
|
|
515 |
TDes8& aNumber,
|
|
516 |
CPhoneBookStoreEntry& aEntry);
|
|
517 |
|
|
518 |
/**
|
|
519 |
* Gets transactionId.
|
|
520 |
*
|
|
521 |
* @param None
|
|
522 |
* @return TransactionId.
|
|
523 |
*/
|
|
524 |
TUint8 TransId();
|
|
525 |
|
|
526 |
/**
|
|
527 |
* Convert number of phonebook type to server's phonebook type
|
|
528 |
*
|
|
529 |
* @param aPbMask Phonebook mask
|
|
530 |
* @return Server phonebook type.
|
|
531 |
*/
|
|
532 |
TUint16 ConvertToSimPhoneBookType(
|
|
533 |
const TUint8 aPbMask );
|
|
534 |
|
|
535 |
|
|
536 |
/**
|
|
537 |
* Gets the required parameter from FCI Data
|
|
538 |
*
|
|
539 |
* @param TDesC8 aFileData FCI Data
|
|
540 |
* @param TInt aValue actual value of parameter to be read
|
|
541 |
* @param TUint8 aParam parameter to be read
|
|
542 |
* @return Error
|
|
543 |
*/
|
|
544 |
TInt HandleFcpData(
|
|
545 |
const TDesC8 &aFileData,
|
|
546 |
TInt& aValue,
|
|
547 |
TUint8 aParam);
|
|
548 |
|
|
549 |
|
|
550 |
/**
|
|
551 |
* Handle FileData of Type1File Response
|
|
552 |
* @param const TDes8& aFileData: UICC Message
|
|
553 |
* @return TInt: KErrNone or error value.
|
|
554 |
*/
|
|
555 |
void Get16bit(TInt& aTarget, const TDesC8& aSource, TInt aIndex);
|
|
556 |
|
|
557 |
|
|
558 |
|
|
559 |
protected:
|
|
560 |
|
|
561 |
|
|
562 |
|
|
563 |
private:
|
|
564 |
|
|
565 |
/**
|
|
566 |
* Converts operation mask to IPC
|
|
567 |
*
|
|
568 |
* @param aDestination Operation mask
|
|
569 |
* @param aSource Client IPC
|
|
570 |
* @return None
|
|
571 |
*/
|
|
572 |
void ConvertOperationToClientIPCType(
|
|
573 |
TInt& aDestination,
|
|
574 |
const TUint8 aSource );
|
|
575 |
|
|
576 |
|
|
577 |
// ConstructL
|
|
578 |
|
|
579 |
void ConstructL();
|
|
580 |
/**
|
|
581 |
* Collects all needed data together.
|
|
582 |
*
|
|
583 |
* @param aSbStartOffSet Offset
|
|
584 |
* @param aNumOfSubBlocks Number of subblocks
|
|
585 |
* @param aIsiMessage ISI message
|
|
586 |
* @param aEntry Phonebook entry
|
|
587 |
* @param aEmailFound Flag indicate if email found or not
|
|
588 |
* @param aAnrFound Flag indicate if anr found or not
|
|
589 |
* @param aSneFound Flag indicate if sne found or not
|
|
590 |
* @param aGrpFound Flag indicate if grp found or not
|
|
591 |
* @return None
|
|
592 |
*/
|
|
593 |
void CollectAvailableDataL(
|
|
594 |
TUint& aSbStartOffSet,
|
|
595 |
TInt& aNumOfSubBlocks,
|
|
596 |
const TIsiReceiveC& aIsiMessage,
|
|
597 |
CPhoneBookStoreEntry& aEntry,
|
|
598 |
TBool& aEmailFound,
|
|
599 |
TBool& aAnrFound,
|
|
600 |
TBool& aSneFound
|
|
601 |
#ifdef INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS
|
|
602 |
,TBool& aGrpFound
|
|
603 |
#endif // INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS
|
|
604 |
);
|
|
605 |
|
|
606 |
/**
|
|
607 |
* Construct a SIM_READ_FIELD_REQ message and send it through phonet.
|
|
608 |
*
|
|
609 |
* @param aTransId Transaction Id
|
|
610 |
* @return KErrNone / Error value from phonet
|
|
611 |
*/
|
|
612 |
TInt SimReadFieldReq( TUint8 aTransId );
|
|
613 |
|
|
614 |
/**
|
|
615 |
* Breaks received SIM_READ_FIELD_RESP ISI message
|
|
616 |
*
|
|
617 |
* @param aIsiMessage Received ISI message
|
|
618 |
* @param aComplete Indicates if request can remove from
|
|
619 |
* operationlist or not.
|
|
620 |
* @return None
|
|
621 |
*/
|
|
622 |
void SimReadFieldRespL(
|
|
623 |
const TIsiReceiveC& aIsiMessage,
|
|
624 |
TBool& aComplete );
|
|
625 |
|
|
626 |
|
|
627 |
|
|
628 |
public: // Data
|
|
629 |
// None
|
|
630 |
|
|
631 |
protected: // Data
|
|
632 |
|
|
633 |
// Pointer to CMmPhoneBookStoreMessHandler.
|
|
634 |
CMmPhoneBookStoreMessHandler* iMmPhoneBookStoreMessHandler;
|
|
635 |
|
|
636 |
// Pointer to UICC message handler
|
|
637 |
CMmUiccMessHandler* iMmUiccMessHandler;
|
|
638 |
|
|
639 |
// TransactionId that consist with phonebook type and transactionId.
|
|
640 |
TUint8 iTransactionId;
|
|
641 |
|
|
642 |
// Pointer to array for Caching PB Store <ADN/FDN>.
|
|
643 |
// CTSY take care of deleting entries.
|
|
644 |
CArrayPtrSeg<CPhoneBookStoreEntry>* iPhoneBookStoreCacheArray;
|
|
645 |
|
|
646 |
// Number of FDN info responses.
|
|
647 |
TUint8 iNumberOfFdnInfoResps;
|
|
648 |
|
|
649 |
// FDN info responses.
|
|
650 |
TPBFdnInfo iPbFdnInfo;
|
|
651 |
|
|
652 |
//slot where SIM contact has been written.
|
|
653 |
TUint16 iWriteLocation;
|
|
654 |
|
|
655 |
// Attribute to hold the information what index to be read
|
|
656 |
TInt iIndexToRead;
|
|
657 |
// Attribute to store record length
|
|
658 |
TInt iRecordLength;
|
|
659 |
|
|
660 |
// Keeps track of error value if write completed only partially.
|
|
661 |
TInt iRet;
|
|
662 |
|
|
663 |
// Phonebooktype, ADN, FDN, SDN...
|
|
664 |
TName iPhonebookType;
|
|
665 |
|
|
666 |
// modifiable Store number if there is extension number also there
|
|
667 |
TBuf8<UICC_EF_MAX_NUM_LEN_WITH_EXT> iNumberBuf;
|
|
668 |
|
|
669 |
// Store entry name
|
|
670 |
TBuf8<UICC_EF_MAX_NAME_LEN> iNameBuf;
|
|
671 |
|
|
672 |
|
|
673 |
#ifdef INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS
|
|
674 |
// Holds information for AAS and GAS
|
|
675 |
RMmCustomAPI::TAlphaStringParams iAlphaStringParams;
|
|
676 |
#endif // INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS
|
|
677 |
|
|
678 |
private: // Data
|
|
679 |
//none
|
|
680 |
};
|
|
681 |
|
|
682 |
#endif // CMMPHONEBOOKSOPERATIONBASE_H
|
|
683 |
|
|
684 |
// End of file
|