104 const TUint8 KSimMbdn = 0x00; |
104 const TUint8 KSimMbdn = 0x00; |
105 |
105 |
106 //File ID |
106 //File ID |
107 const TUint16 KMasterFile = 0x3F00; // Master File |
107 const TUint16 KMasterFile = 0x3F00; // Master File |
108 const TUint16 KDedicatedFileGSM = 0x7F20; // Dedicated File (Gsm) |
108 const TUint16 KDedicatedFileGSM = 0x7F20; // Dedicated File (Gsm) |
109 const TUint16 KDedicatedFileMBI = 0x6FC9; // Dedicated File (MBI) |
|
110 |
109 |
111 |
110 |
112 const TUint8 KTagFCIFileDescriptor = 0x82; // for file descriptor tag in FCI data received from UICC Server |
111 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 |
112 const TUint8 KTagFCIFileIdentifier = 0x83; // for File identifier in FCI data |
114 const TUint8 KTagFCIFileSize = 0x85; // for File size data |
113 const TUint8 KTagFCIFileSize = 0x80; // for File size data |
115 const TUint8 KTagConstructedTagA8 = 0xA8; // Type 1 files tag in PBR file |
114 const TUint8 KTagConstructedTagA8 = 0xA8; // Type 1 files tag in PBR file |
116 const TUint8 KTagConstructedTagA9 = 0xA9; // Type 2 files tag in PBR file |
115 const TUint8 KTagConstructedTagA9 = 0xA9; // Type 2 files tag in PBR file |
117 const TUint8 KTagConstructedTagAA = 0xAA; // Type 3 files tag in PBR file |
116 const TUint8 KTagConstructedTagAA = 0xAA; // Type 3 files tag in PBR file |
118 const TUint8 KTagUnusedbyte = 0xFF; // constant to find unused bytes |
117 const TUint8 KTagUnusedbyte = 0xFF; // constant to find unused bytes |
119 |
118 |
120 const TUint8 KRecordLength = 0; |
119 const TUint8 KRecordLength = 0; |
121 const TUint8 KNoOfRecords = 1; |
120 const TUint8 KNoOfRecords = 1; |
122 const TUint8 KFileSize = 2; |
121 const TUint8 KFileSize1 = 2; |
123 const TUint8 KFileIdentifier = 3; |
122 const TUint8 KFileIdentifier1 = 3; |
124 const TUint8 KFileStatus = 4; |
123 const TUint8 KFileStatus1 = 4; |
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
124 |
131 // UICC constants |
125 // UICC constants |
132 #define MF_FILE 0x3F00 //Master file |
126 #define MF_FILE 0x3F00 //Master file |
133 #define DF_CURRENT_APP 0x7FFF // |
127 #define DF_CURRENT_APP 0x7FFF // |
134 #define DF_PHONEBOOK 0x5F3A |
128 #define DF_PHONEBOOK 0x5F3A |
135 #define APPL_FILE_ID 0x7F10 // Address for DFphonebook |
129 #define APPL_FILE_ID 0x7F10 // Address for DFphonebook |
136 #define UICC_SESSION_ID_NOT_USED 0x00 |
130 #define UICC_SESSION_ID_NOT_USED 0x00 |
137 #define PB_UICC_SB_APPL_PATH_SB_LENGTH 0x0010 |
131 #define PB_UICC_SB_APPL_PATH_SB_LENGTH 0x0010 |
138 #define PB_UICC_SB_APPL_PATH_SB_LENGTH_2 0x0012 |
132 #define PB_UICC_SB_APPL_PATH_SB_LENGTH_2 0x0012 |
139 #define PB_ADN_FID 0x6F3A |
133 #define PB_ADN_FID 0x6F3A |
140 #define PB_FDN_FID 0x6F3B |
134 #define PB_FDN_FID 0x6F3B |
141 #define PB_SDN_FID 0x6F49 |
135 #define PB_SDN_FID 0x6F49 |
142 #define PB_BDN_FID 0x6F4D |
136 #define PB_BDN_FID 0x6F4D |
143 #define PB_MBDN_FID 0x6FC7 |
137 #define PB_MBDN_FID 0x6FC7 |
|
138 #define PB_MBI_FID 0x6FC9 |
144 #define PB_MSISDN_FID 0x6F40 |
139 #define PB_MSISDN_FID 0x6F40 |
145 #define PB_VMBX_FID 0x6F17 |
140 #define PB_VMBX_FID 0x6F17 |
146 #define PB_EXT1_FID 0x6F4A |
141 #define PB_EXT1_FID 0x6F4A |
147 #define PB_EXT2_FID 0x6F4B |
142 #define PB_EXT2_FID 0x6F4B |
148 #define PB_EXT3_FID 0x6F4C |
143 #define PB_EXT3_FID 0x6F4C |
149 #define PB_EXT4_FID 0x6F55 |
144 #define PB_EXT4_FID 0x6F4E |
150 #define PB_EXT5_FID 0x6F4E |
145 #define PB_EXT5_FID 0x6F55 |
151 #define PB_EXT6_FID 0x6FC8 |
146 #define PB_EXT6_FID 0x6FC8 |
|
147 #define PB_EXT7_FID 0x6FCC |
152 #define PB_PBR_FID 0x4F30 |
148 #define PB_PBR_FID 0x4F30 |
153 #define DF_PB_FILE_PATH 0x3F007FFF5F3A |
149 #define DF_PB_FILE_PATH 0x3F007FFF5F3A |
154 #define UICC_SFI_NOT_PRESENT 0x00 |
150 #define UICC_SFI_NOT_PRESENT 0x00 |
155 #define DF_PATH_LENGTH 0x06 |
151 #define DF_PATH_LENGTH 0x06 |
156 #define DF_PATH_TELECOM 0x7F10 |
152 #define DF_PATH_TELECOM 0x7F10 |
157 #define DF_PATH_PHONEBOOK 0x5F3A |
153 #define DF_PATH_PHONEBOOK 0x5F3A |
158 #define UICC_SB_LINEAR_FIXED_SB_LENGTH 0x0008 |
154 #define UICC_SB_LINEAR_FIXED_SB_LENGTH 0x0008 |
159 #define UICC_APPL_CMD_RESP_OFFSET 0x07 |
155 #define UICC_APPL_CMD_RESP_OFFSET 0x07 |
|
156 #define UICC_ILLEGAL_FILE_ID 0xFFFF |
160 |
157 |
161 #define UICC_SB_FCI_FCP_EF_NO_REC_OFFSET 0x12 |
158 #define UICC_SB_FCI_FCP_EF_NO_REC_OFFSET 0x12 |
162 #define UICC_SB_FCI_FCP_EF_REC_L_OFFSET 0x10 |
159 #define UICC_SB_FCI_FCP_EF_REC_L_OFFSET 0x10 |
163 |
160 |
164 #define UICC_SB_FILE_DATA_OFFSET 0x08 |
161 #define UICC_SB_FILE_DATA_OFFSET 0x08 |
165 #define UICC_EF_ANR_EXT_REC_OFFSET 0x15 |
162 #define UICC_EF_ANR_EXT_REC_OFFSET 0x15 |
166 #define UICC_EF_FILE_EXT_FILE_NOT_EXIST 0xFF |
163 #define UICC_EF_FILE_EXT_FILE_NOT_EXIST 0xFF |
167 #define UICC_EF_FDN_NO_EXT_NUM_LEN 20 |
164 #define UICC_EF_FDN_NO_EXT_NUM_LEN 20 |
|
165 #define UICC_EF_EXT_REC_NUM_LEN 11 |
168 #define UICC_EF_MAX_NUM_LEN_WITH_EXT 2814 |
166 #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 |
167 #define UICC_EF_ANR_EXT_OFFSET 14 |
171 #define UICC_EF_MAX_REC_LEN 255 |
168 #define UICC_EF_MAX_REC_LEN 255 |
172 |
169 |
173 #define UICC_EF_FDN_MIN_REC_LEN 14 |
170 #define UICC_EF_FDN_MIN_REC_LEN 14 |
174 |
171 |
447 * @param aDataPackage not used |
428 * @param aDataPackage not used |
448 * @return KErrNotSupported. |
429 * @return KErrNotSupported. |
449 */ |
430 */ |
450 virtual TInt UICCCreateReq( |
431 virtual TInt UICCCreateReq( |
451 TInt /*aIpc*/, |
432 TInt /*aIpc*/, |
452 const CMmDataPackage* /*aDataPackage*/) |
433 const CMmDataPackage* /*aDataPackage*/, |
|
434 TUint8 /*aTransId*/ ) |
453 { |
435 { |
454 TFLOGSTRING("TSY: CMmPhoneBookStoreOperationBase::CreateReq - Return KErrNotSupported"); |
436 TFLOGSTRING("TSY: CMmPhoneBookStoreOperationBase::CreateReq - Return KErrNotSupported"); |
455 return KErrNotSupported; |
437 return KErrNotSupported; |
456 }; |
438 }; |
457 |
439 |
458 |
440 |
459 /** |
441 /** |
460 * Converts client phonebook to phonebook mask. |
442 * Converts client phonebook to phonebook mask. |
461 * |
443 * |
462 * @param aPBType |
444 * @param aPBType |
463 * @return TUint8 |
445 * @return TUint8 |
464 */ |
446 */ |
465 static TUint8 ConvertToPBtype( const TName& aPBType ); |
447 static TUint8 ConvertToPBtype( const TName& aPBType ); |
466 |
448 |
467 |
449 |
468 /** |
450 /** |
469 * Converts client phonebook to phonebook mask. |
451 * Converts client phonebook to phonebook mask. |
470 * |
452 * |
471 * @param aPBType |
453 * @param aPBType |
472 * @return TUint8 |
454 * @return TUint8 |
473 */ |
455 */ |
474 static TUint8 ConvertToPBtypeUICC( const TName& aPBType ); |
456 static TUint16 ConvertToPBfileId( const TName& aPBType, TUint16& aFileIdExt ); |
475 |
457 |
476 |
458 |
477 /** |
459 /** |
478 * Converts client phonebooktype to client phonebook name. |
460 * Converts File ID to Index |
|
461 * |
|
462 * @param aFileId |
|
463 * @return TUint8 |
|
464 */ |
|
465 static TUint8 ConvertToConfArrayIndex( const TUint16 aFileId ); |
|
466 /** |
|
467 * Give return value for the transactio id According to operation and Phoenbook type |
|
468 * |
|
469 * @param aPBType |
|
470 * @param aOperation |
|
471 * @return TUint8 |
|
472 */ |
|
473 static TUint8 GetTransId( const TName& aPBType, const TUint8 aOperation ); |
|
474 |
|
475 |
|
476 /** |
|
477 * Converts client phonebook to phonebook mask. |
479 * |
478 * |
480 * @param aPBType |
479 * @param aPBType |
481 * @return TUint8 |
480 * @return TUint8 |
482 */ |
481 */ |
483 void ConvertPBTypeToPbName(const TUint aPhonebookType, TName& aName ); |
482 static TUint8 ConvertToPBtypeUICC( const TName& aPBType ); |
484 |
483 |
485 /** |
484 |
486 * Converts client phonebook to phonebook mask. |
485 /** |
|
486 * Converts client phonebooktype to client phonebook name. |
487 * |
487 * |
488 * @param aPBType |
488 * @param aPBType |
489 * @return TUint8 |
489 * @return TUint8 |
490 */ |
490 */ |
|
491 void ConvertPBTypeToPbName(const TUint aPhonebookType, TName& aName ); |
|
492 |
|
493 /** |
|
494 * Converts client phonebook to phonebook mask. |
|
495 * |
|
496 * @param aPBType |
|
497 * @return TUint8 |
|
498 */ |
491 void ConvertToPBname( const TUint8 aTrans, TName& aName ); |
499 void ConvertToPBname( const TUint8 aTrans, TName& aName ); |
492 |
500 |
493 /** |
501 /** |
494 * Separate Phonebook Entry from UICC -message |
502 * Gets PhoneBookName. |
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 * |
503 * |
521 * @param None |
504 * @param None |
522 * @return TransactionId. |
505 * @return phonebookname. |
523 */ |
506 */ |
524 TUint8 TransId(); |
507 const TName& GetPhoneBookName()const; |
525 |
508 |
526 /** |
509 /** |
527 * Convert number of phonebook type to server's phonebook type |
510 * Convert number of phonebook type to server's phonebook type |
528 * |
511 * |
529 * @param aPbMask Phonebook mask |
512 * @param aPbMask Phonebook mask |
530 * @return Server phonebook type. |
513 * @return Server phonebook type. |
531 */ |
514 */ |
532 TUint16 ConvertToSimPhoneBookType( |
515 TUint16 ConvertToSimPhoneBookType( |
533 const TUint8 aPbMask ); |
516 const TUint8 aPbMask ); |
534 |
517 |
535 |
518 /** |
536 /** |
519 * Handle number to convert in Ascii Format |
537 * Gets the required parameter from FCI Data |
520 * @param const TDesC8& aSource: Message to be converted in Ascii |
538 * |
521 * @param TDes16 aTarget : After conversion data to be staored in |
539 * @param TDesC8 aFileData FCI Data |
522 */ |
540 * @param TInt aValue actual value of parameter to be read |
523 //void ConvertToUcs2FromBCD(const TDesC8 &aSource, TDes16 &aTarget ); |
541 * @param TUint8 aParam parameter to be read |
524 |
542 * @return Error |
525 /** |
543 */ |
526 * Handle to Find the Empty Entry |
544 TInt HandleFcpData( |
527 * @param const TDesC8& aFileData: Entry data to checked entry is empty or not |
545 const TDesC8 &aFileData, |
528 * @return TInt: KErrNone or KErrNotFound |
546 TInt& aValue, |
529 */ |
547 TUint8 aParam); |
530 TInt EmptyEntryCheck( const TDesC8 &aFileData ); |
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 |
531 |
559 protected: |
532 protected: |
560 |
533 |
561 |
534 |
562 |
535 |
652 //slot where SIM contact has been written. |
625 //slot where SIM contact has been written. |
653 TUint16 iWriteLocation; |
626 TUint16 iWriteLocation; |
654 |
627 |
655 // Attribute to hold the information what index to be read |
628 // Attribute to hold the information what index to be read |
656 TInt iIndexToRead; |
629 TInt iIndexToRead; |
|
630 |
|
631 // Is there any mailbox id |
|
632 TBool iMailboxIdExist; |
|
633 |
657 // Attribute to store record length |
634 // Attribute to store record length |
658 TInt iRecordLength; |
635 TInt iRecordLength; |
659 |
636 |
660 // Keeps track of error value if write completed only partially. |
637 // Keeps track of error value if write completed only partially. |
661 TInt iRet; |
638 TInt iRet; |
662 |
639 |
663 // Phonebooktype, ADN, FDN, SDN... |
640 // modifiable Store number if there is extension number also there |
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; |
641 TBuf8<UICC_EF_MAX_NUM_LEN_WITH_EXT> iNumberBuf; |
668 |
642 |
669 // Store entry name |
643 // Store entry name |
670 TBuf8<UICC_EF_MAX_NAME_LEN> iNameBuf; |
644 TBuf8<UICC_EF_MAX_NAME_LEN> iNameBuf; |
671 |
645 |
|
646 |
|
647 // Store for Empty Space |
|
648 TUint8 iEmptyIndex; |
|
649 |
|
650 // Attribute to check what kind of read is ongoing |
|
651 TTypeOfFileToBeRead iTypeOfReading ; |
672 |
652 |
673 #ifdef INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS |
653 #ifdef INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS |
674 // Holds information for AAS and GAS |
654 // Holds information for AAS and GAS |
675 RMmCustomAPI::TAlphaStringParams iAlphaStringParams; |
655 RMmCustomAPI::TAlphaStringParams iAlphaStringParams; |
676 #endif // INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS |
656 #endif // INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS |