83 // None |
83 // None |
84 ) |
84 ) |
85 { |
85 { |
86 TFLOGSTRING("TSY: CMmPhoneBookOperationInit3G_adn::CMmPhoneBookOperationInit3G_adn"); |
86 TFLOGSTRING("TSY: CMmPhoneBookOperationInit3G_adn::CMmPhoneBookOperationInit3G_adn"); |
87 OstTrace0( TRACE_NORMAL, DUP1_CMMPHONEBOOKOPERATIONINIT3G_ADN_CMMPHONEBOOKOPERATIONINIT3G_ADN, "CMmPhoneBookOperationInit3G_adn::~CMmPhoneBookOperationInit3G_adn" ); |
87 OstTrace0( TRACE_NORMAL, DUP1_CMMPHONEBOOKOPERATIONINIT3G_ADN_CMMPHONEBOOKOPERATIONINIT3G_ADN, "CMmPhoneBookOperationInit3G_adn::~CMmPhoneBookOperationInit3G_adn" ); |
88 |
|
89 } |
88 } |
90 |
89 |
91 // ----------------------------------------------------------------------------- |
90 // ----------------------------------------------------------------------------- |
92 // CMmPhoneBookOperationInit3G_adn::NewL |
91 // CMmPhoneBookOperationInit3G_adn::NewL |
93 // Two-phased constructor. |
92 // Two-phased constructor. |
160 iPBStoreInfoData = new( ELeave ) CStorageInfoData(); |
159 iPBStoreInfoData = new( ELeave ) CStorageInfoData(); |
161 |
160 |
162 iIniPhase = 0; |
161 iIniPhase = 0; |
163 iServiceType = 0; |
162 iServiceType = 0; |
164 iNumOfPBRRecords = 0; |
163 iNumOfPBRRecords = 0; |
165 |
|
166 #ifdef INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS |
|
167 TFLOGSTRING("TSY: CMmPhoneBookStoreMessHandler. \ |
|
168 INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS is ON."); |
|
169 |
|
170 iMmPhoneBookStoreMessHandler->SetMaxNumOfAasEntries( 0 ); |
|
171 iMmPhoneBookStoreMessHandler->SetMaxNumberOfGAS( 0 ); |
|
172 #else |
|
173 TFLOGSTRING("TSY: CMmPhoneBookStoreMessHandler. \ |
|
174 INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS is OFF."); |
|
175 #endif // INTERNAL_RD_USIM_PHONEBOOK_GAS_AND_AAS |
|
176 } |
164 } |
177 |
165 |
178 |
166 |
179 // ----------------------------------------------------------------------------- |
167 // ----------------------------------------------------------------------------- |
180 // CMmPhoneBookOperationInit3G_adn::UICCCreateReq |
168 // CMmPhoneBookOperationInit3G_adn::UICCCreateReq |
264 TFLOGSTRING( "TSY: CMmPhoneBookOperationInit3G_adn::UICCInitializeReq3GADN - File Info Read Request for EF-PBR " ); |
252 TFLOGSTRING( "TSY: CMmPhoneBookOperationInit3G_adn::UICCInitializeReq3GADN - File Info Read Request for EF-PBR " ); |
265 OstTrace0( TRACE_NORMAL, DUP1_CMMPHONEBOOKOPERATIONINIT3G_ADN_UICCINITIALIZEREQ3GADN, "CMmPhoneBookOperationInit3G_adn::UICCInitializeReq3GADN - File Info Read Request for EF-PBR" ); |
253 OstTrace0( TRACE_NORMAL, DUP1_CMMPHONEBOOKOPERATIONINIT3G_ADN_UICCINITIALIZEREQ3GADN, "CMmPhoneBookOperationInit3G_adn::UICCInitializeReq3GADN - File Info Read Request for EF-PBR" ); |
266 |
254 |
267 cmdParams.fileId = PB_PBR_FID; |
255 cmdParams.fileId = PB_PBR_FID; |
268 cmdParams.serviceType = iServiceType; |
256 cmdParams.serviceType = iServiceType; |
269 cmdParams.record = 0; |
257 cmdParams.record = KStartRecord; |
270 break; |
258 break; |
271 } |
259 } |
272 case EPBInitPhase_3GADN_Type1: |
260 case EPBInitPhase_3GADN_Type1: |
273 { |
261 { |
274 // read Type 1 Files File descriptor, File Data and Extension File |
262 // read Type 1 Files File descriptor, File Data and Extension File |
315 //Info or File Data |
303 //Info or File Data |
316 // ----------------------------------------------------------------------------- |
304 // ----------------------------------------------------------------------------- |
317 // |
305 // |
318 TInt CMmPhoneBookOperationInit3G_adn::CreateReqFetchTypeFile( |
306 TInt CMmPhoneBookOperationInit3G_adn::CreateReqFetchTypeFile( |
319 TUiccReadLinearFixed & aparams, |
307 TUiccReadLinearFixed & aparams, |
320 const TUint8 aFileType) |
308 const TUint8 aFileType ) |
321 { |
309 { |
322 TFLOGSTRING("TSY: CMmPhoneBookOperationInit3G_adn::CreateReqFetchTypeFile"); |
310 TFLOGSTRING("TSY: CMmPhoneBookOperationInit3G_adn::CreateReqFetchTypeFile"); |
323 OstTrace0( TRACE_NORMAL, CMMPHONEBOOKOPERATIONINIT3G_ADN_CREATEREQFETCHTYPEFILE, "CMmPhoneBookOperationInit3G_adn::CreateReqFetchTypeFile" ); |
311 OstTrace0( TRACE_NORMAL, CMMPHONEBOOKOPERATIONINIT3G_ADN_CREATEREQFETCHTYPEFILE, "CMmPhoneBookOperationInit3G_adn::CreateReqFetchTypeFile" ); |
324 |
312 |
325 TInt ret( KErrNone ); |
313 TInt ret( KErrNone ); |
439 phoneBookData.PackData( iPBStoreInfoData ); |
427 phoneBookData.PackData( iPBStoreInfoData ); |
440 |
428 |
441 if ( UICC_STATUS_OK != aStatus ) |
429 if ( UICC_STATUS_OK != aStatus ) |
442 { |
430 { |
443 ret = CMmStaticUtility::UICCCSCauseToEpocError( aStatus ); |
431 ret = CMmStaticUtility::UICCCSCauseToEpocError( aStatus ); |
444 } |
432 } // no else |
445 |
433 |
446 iMmPhoneBookStoreMessHandler->MessageRouter()->Complete( |
434 iMmPhoneBookStoreMessHandler->MessageRouter()->Complete( |
447 EMmTsyPhoneBookStoreInitIPC, |
435 EMmTsyPhoneBookStoreInitIPC, |
448 &phoneBookData, |
436 &phoneBookData, |
449 ret ); |
437 ret ); |
450 |
438 |
451 complete = ETrue; |
439 complete = ETrue; |
452 } |
440 } // no else |
453 return complete; |
441 return complete; |
454 } |
442 } |
455 |
443 |
456 |
444 |
457 // ----------------------------------------------------------------------------- |
445 // ----------------------------------------------------------------------------- |
480 // the total no of entries in 3G ADN phonebook |
468 // the total no of entries in 3G ADN phonebook |
481 if( UICC_APPL_FILE_INFO == iServiceType ) |
469 if( UICC_APPL_FILE_INFO == iServiceType ) |
482 { |
470 { |
483 TFci fci( aFileData ); |
471 TFci fci( aFileData ); |
484 iNumOfPBRRecords = fci.GetNumberOfRecords(); |
472 iNumOfPBRRecords = fci.GetNumberOfRecords(); |
|
473 // Store PBR record no in internal conf list |
|
474 iMmPhoneBookStoreMessHandler-> |
|
475 iPBStoreConf[EPhonebookTypeAdn]. |
|
476 iPBRNoOfRecords = iNumOfPBRRecords; |
485 |
477 |
486 ret = KErrNone; |
478 ret = KErrNone; |
487 iServiceType = UICC_APPL_READ_LINEAR_FIXED; |
479 iServiceType = UICC_APPL_READ_LINEAR_FIXED; |
488 } |
480 } |
489 else if( UICC_APPL_READ_LINEAR_FIXED == iServiceType ) |
481 else if( UICC_APPL_READ_LINEAR_FIXED == iServiceType ) |
696 iPBStoreConf[EPhonebookTypeAdn].iEmailNoOfRecords = |
688 iPBStoreConf[EPhonebookTypeAdn].iEmailNoOfRecords = |
697 iPBStoreInfoData->iEmailNumOfEntries; |
689 iPBStoreInfoData->iEmailNumOfEntries; |
698 iMmPhoneBookStoreMessHandler-> |
690 iMmPhoneBookStoreMessHandler-> |
699 iPBStoreConf[EPhonebookTypeAdn].iEmailStringLength = |
691 iPBStoreConf[EPhonebookTypeAdn].iEmailStringLength = |
700 iPBStoreInfoData->iEmailTextLengthMax; |
692 iPBStoreInfoData->iEmailTextLengthMax; |
701 } |
693 } // no else |
702 break; |
694 break; |
703 } |
695 } |
704 |
696 |
705 case UICC_EF_GRP_TAG: |
697 case UICC_EF_GRP_TAG: |
706 { |
698 { |
707 if( KErrNone == ret ) |
699 if( KErrNone == ret ) |
708 { |
700 { |
709 // get the record record no from file info data |
701 // get the record record no from file info data |
710 iPBStoreInfoData->iGRPNumOfEntriesPerEntry = |
702 iPBStoreInfoData->iGRPNumOfEntriesPerEntry = |
711 noOfRecords; |
703 noOfRecords; |
712 } |
704 } // no else |
713 break; |
705 break; |
714 } |
706 } |
715 case UICC_EF_IAP_TAG: |
707 case UICC_EF_IAP_TAG: |
716 { |
708 { |
717 // This File is mandatory only when there are Type 2 Files |
709 // This File is mandatory only when there are Type 2 Files |
718 if( iType2FileArray.Count()== 0 ) |
710 if( iType2FileArray.Count()== 0 ) |
719 { |
711 { |
720 ret = KErrGeneral; |
712 ret = KErrGeneral; |
721 } |
713 } // no else |
722 if( KErrNone == ret ) |
714 if( KErrNone == ret ) |
723 { |
715 { |
724 // Store IAP record record length in internal buffer |
716 // Store IAP record record length in internal buffer |
725 iMmPhoneBookStoreMessHandler-> |
717 iMmPhoneBookStoreMessHandler-> |
726 iPBStoreConf[EPhonebookTypeAdn].iIAPRecordLength = |
718 iPBStoreConf[EPhonebookTypeAdn].iIAPRecordLength = |
727 recordLength; |
719 recordLength; |
728 } |
720 } // no else |
729 break; |
721 break; |
730 } |
722 } |
731 case UICC_EF_PBC_TAG: |
723 case UICC_EF_PBC_TAG: |
732 { |
724 { |
733 if( KErrNone == ret ) |
725 if( KErrNone == ret ) |
796 iADNPbInitilized = EFalse; |
787 iADNPbInitilized = EFalse; |
797 // ADN phonebook is not valid and check for other phonebooks |
788 // ADN phonebook is not valid and check for other phonebooks |
798 // parameters |
789 // parameters |
799 iIniPhase = EPBIniPhase_3GADNDone; |
790 iIniPhase = EPBIniPhase_3GADNDone; |
800 return; |
791 return; |
801 } |
792 } // no else |
802 iCurrentArrayCounter++; |
793 iCurrentArrayCounter++; |
803 } |
794 } |
804 |
795 |
805 // Check for next Phase |
796 // Check for next Phase |
806 if( iCurrentArrayCounter == iType1FileArray.Count() ) |
797 if( iCurrentArrayCounter == iType1FileArray.Count() ) |
807 { |
798 { |
808 iCurrentArrayCounter = 0; |
799 iCurrentArrayCounter = 0; |
809 |
800 |
810 // Change Phase to read other Files |
801 // Change Phase to read other Files |
811 if( 0 != iType2FileArray.Count() ) |
802 if( 0 != iType2FileArray.Count() ) |
|
803 { |
812 iIniPhase = EPBInitPhase_3GADN_Type2; |
804 iIniPhase = EPBInitPhase_3GADN_Type2; |
|
805 } |
813 |
806 |
814 else if( 0 != iType3FileArray.Count() ) |
807 else if( 0 != iType3FileArray.Count() ) |
815 { |
808 { |
816 iIniPhase = EPBInitPhase_3GADN_Type3; |
809 iIniPhase = EPBInitPhase_3GADN_Type3; |
817 } |
810 } |
818 else |
811 else |
819 { |
812 { |
820 iIniPhase = EPBIniPhase_3GADNDone; |
813 iIniPhase = EPBIniPhase_3GADNDone; |
821 } |
814 } |
822 } |
815 } // no else |
823 } // End of Type 1 file array handling |
816 } // End of Type 1 file array handling |
824 } |
817 } |
825 |
818 |
826 |
819 |
827 // ----------------------------------------------------------------------------- |
820 // ----------------------------------------------------------------------------- |
829 // HAndles Data for Type 2 file Response |
822 // HAndles Data for Type 2 file Response |
830 // ----------------------------------------------------------------------------- |
823 // ----------------------------------------------------------------------------- |
831 // |
824 // |
832 void CMmPhoneBookOperationInit3G_adn::HandleType2FileResp( |
825 void CMmPhoneBookOperationInit3G_adn::HandleType2FileResp( |
833 const TDesC8 &aFileData, |
826 const TDesC8 &aFileData, |
834 TInt aStatus) |
827 TInt aStatus ) |
835 { |
828 { |
836 TFLOGSTRING("TSY: CMmPhoneBookOperationInit3G_adn::HandleType2FileResp"); |
829 TFLOGSTRING("TSY: CMmPhoneBookOperationInit3G_adn::HandleType2FileResp"); |
837 OstTrace0( TRACE_NORMAL, CMMPHONEBOOKOPERATIONINIT3G_ADN_HANDLETYPE2FILERESP, "CMmPhoneBookOperationInit3G_adn::HandleType2FileResp" ); |
830 OstTrace0( TRACE_NORMAL, CMMPHONEBOOKOPERATIONINIT3G_ADN_HANDLETYPE2FILERESP, "CMmPhoneBookOperationInit3G_adn::HandleType2FileResp" ); |
838 |
831 |
839 TInt ret(KErrNone); |
832 TInt ret(KErrNone); |
840 TInt recordLength( 0 ); |
833 TInt recordLength( 0 ); |
841 TInt noOfRecords(0); |
834 TInt noOfRecords( 0 ); |
842 |
835 |
843 if( UICC_STATUS_OK == aStatus ) |
836 if( UICC_STATUS_OK == aStatus ) |
844 { |
837 { |
845 // Get the Record length for all linear fixed and circular EF's |
838 // Get the Record length for all linear fixed and circular EF's |
846 TFci fci( aFileData ); |
839 TFci fci( aFileData ); |
847 recordLength = fci.GetRecordLength(); |
840 recordLength = fci.GetRecordLength(); |
848 noOfRecords = fci.GetNumberOfRecords(); |
841 noOfRecords = fci.GetNumberOfRecords(); |
849 } |
842 } // no else |
850 |
843 |
851 // Get the tag value for current File |
844 // Get the tag value for current File |
852 TUint tagValue = iType2FileArray[iCurrentArrayCounter].tagValue; |
845 TUint tagValue = iType2FileArray[iCurrentArrayCounter].tagValue; |
853 |
846 |
854 if( iCurrentArrayCounter < iType2FileArray.Count() ) |
847 if( iCurrentArrayCounter < iType2FileArray.Count() ) |
855 { |
848 { |
856 if( UICC_STATUS_OK == aStatus ) |
849 if( UICC_STATUS_OK == aStatus ) |
857 { |
850 { |
858 switch(tagValue) |
851 switch( tagValue ) |
859 { |
852 { |
860 case UICC_EF_ANR_TAG: |
853 case UICC_EF_ANR_TAG: |
861 { |
854 { |
862 ret = CheckRecordSizeForFixedLength( |
855 ret = CheckRecordSizeForFixedLength( |
863 UICC_TYPE2_FILE, |
856 UICC_TYPE2_FILE, |
864 UICC_EF_ANR_TAG,recordLength ); |
857 UICC_EF_ANR_TAG,recordLength ); |
865 |
858 |
866 if(KErrNone == ret) |
859 if( KErrNone == ret ) |
867 { |
860 { |
868 // total no of entries in all ANR files |
861 // total no of entries in all ANR files |
869 iPBStoreInfoData->iANRNumOfEntries = |
862 iPBStoreInfoData->iANRNumOfEntries = |
870 noOfRecords* iNumOfPBRRecords; |
863 noOfRecords* iNumOfPBRRecords; |
871 // For this need to know about the ext files |
864 // For this need to know about the ext files |
943 // Check for next Phase |
945 // Check for next Phase |
944 if( iCurrentArrayCounter == iType2FileArray.Count() ) |
946 if( iCurrentArrayCounter == iType2FileArray.Count() ) |
945 { |
947 { |
946 iCurrentArrayCounter = 0; |
948 iCurrentArrayCounter = 0; |
947 if( 0 != iType3FileArray.Count() ) |
949 if( 0 != iType3FileArray.Count() ) |
|
950 { |
948 iIniPhase = EPBInitPhase_3GADN_Type3; |
951 iIniPhase = EPBInitPhase_3GADN_Type3; |
|
952 } |
949 else |
953 else |
|
954 { |
950 iIniPhase = EPBIniPhase_3GADNDone; |
955 iIniPhase = EPBIniPhase_3GADNDone; |
951 } |
956 } |
952 } |
957 } // no else |
|
958 } // no else |
953 } |
959 } |
954 |
960 |
955 |
961 |
956 // ----------------------------------------------------------------------------- |
962 // ----------------------------------------------------------------------------- |
957 // CmmPhonebookOperationInit::HandleType3FileResp |
963 // CmmPhonebookOperationInit::HandleType3FileResp |
972 if( UICC_STATUS_OK == aStatus ) |
978 if( UICC_STATUS_OK == aStatus ) |
973 { |
979 { |
974 TFci fci( aFileData ); |
980 TFci fci( aFileData ); |
975 recordLength = fci.GetRecordLength(); |
981 recordLength = fci.GetRecordLength(); |
976 noOfRecords = fci.GetNumberOfRecords(); |
982 noOfRecords = fci.GetNumberOfRecords(); |
977 } |
983 } // no else |
978 |
984 |
979 // Get the tag value for current File |
985 // Get the tag value for current File |
980 TUint tagValue ( iType3FileArray[iCurrentArrayCounter].tagValue ); |
986 TUint tagValue ( iType3FileArray[iCurrentArrayCounter].tagValue ); |
981 |
987 |
982 if( iCurrentArrayCounter < iType3FileArray.Count() ) |
988 if( iCurrentArrayCounter < iType3FileArray.Count() ) |
991 } |
997 } |
992 case UICC_EF_EXT1_TAG: |
998 case UICC_EF_EXT1_TAG: |
993 { |
999 { |
994 // Check for Fixed record length |
1000 // Check for Fixed record length |
995 ret = CheckRecordSizeForFixedLength( |
1001 ret = CheckRecordSizeForFixedLength( |
996 3, |
1002 UICC_TYPE3_FILE, |
997 UICC_EF_EXT1_TAG,recordLength ); |
1003 UICC_EF_EXT1_TAG,recordLength ); |
998 |
1004 |
999 // check for Error if Length doesn'nt match |
1005 // check for Error if Length doesn'nt match |
1000 if( KErrNone == ret ) |
1006 if( KErrNone == ret ) |
1001 { |
1007 { |
1002 // Get the file file length for extension data only |
1008 // Get the file file length for extension data only |
1003 // (remove record type and Identifier 2 bytes) |
1009 // (remove record type and Identifier 2 bytes) |
1004 TInt fileLength ( ( recordLength - 2 ) * noOfRecords ); |
1010 TInt fileLength ( ( recordLength - 2 ) * noOfRecords ); |
1005 iPBStoreInfoData->iADNNumberLengthMax = |
1011 iPBStoreInfoData->iADNNumberLengthMax = |
1006 UICC_NO_EXT_MAX_NUM_LEN+(2*fileLength); |
1012 UICC_NO_EXT_MAX_NUM_LEN+( 2*fileLength ); |
1007 |
1013 |
1008 // Check file is not invalid |
1014 // Check file is not invalid |
1009 if( UICC_NO_EXT_MAX_NUM_LEN == |
1015 if( UICC_NO_EXT_MAX_NUM_LEN == |
1010 iPBStoreInfoData->iANRNumLengthMax ) |
1016 iPBStoreInfoData->iANRNumLengthMax ) |
1011 { |
1017 { |
1012 iPBStoreInfoData->iANRNumLengthMax = |
1018 iPBStoreInfoData->iANRNumLengthMax = |
1013 UICC_NO_EXT_MAX_NUM_LEN+(2*fileLength); |
1019 UICC_NO_EXT_MAX_NUM_LEN+( 2*fileLength ); |
1014 } |
1020 } // no else |
1015 |
1021 |
1016 iMmPhoneBookStoreMessHandler-> |
1022 iMmPhoneBookStoreMessHandler-> |
1017 iPBStoreConf[EPhonebookTypeAdn].iNumlength = |
1023 iPBStoreConf[EPhonebookTypeAdn].iNumlength = |
1018 iPBStoreInfoData->iADNNumberLengthMax; |
1024 iPBStoreInfoData->iADNNumberLengthMax; |
1019 iMmPhoneBookStoreMessHandler-> |
1025 iMmPhoneBookStoreMessHandler-> |
1020 iPBStoreConf[EPhonebookTypeAdn].iExtNoOfRec = |
1026 iPBStoreConf[EPhonebookTypeAdn].iExtNoOfRec = |
1021 ( noOfRecords * iNumOfPBRRecords ); |
1027 ( noOfRecords * iNumOfPBRRecords ); |
1022 } |
1028 } // no else |
1023 break; |
1029 break; |
1024 } |
1030 } |
1025 case UICC_EF_GAS_TAG: |
1031 case UICC_EF_GAS_TAG: |
1026 { |
1032 { |
1027 break; |
1033 break; |
1074 |
1080 |
1075 // Check for Type1 File Id's with all Type1, Type2 and Type3 file Id's |
1081 // Check for Type1 File Id's with all Type1, Type2 and Type3 file Id's |
1076 for( TInt j=0; j < iType1FileArray.Count(); j++ ) |
1082 for( TInt j=0; j < iType1FileArray.Count(); j++ ) |
1077 { |
1083 { |
1078 // Check for Type 1 files |
1084 // Check for Type 1 files |
1079 for( TInt i = (j+1); i< (iType1FileArray.Count()-j); i++ ) |
1085 for( TInt i = ( j+1 ); i< ( iType1FileArray.Count()-j ); i++ ) |
1080 { |
1086 { |
1081 if( iType1FileArray[i].tagFID == iType1FileArray[j].tagFID ) |
1087 if( iType1FileArray[i].tagFID == iType1FileArray[j].tagFID ) |
1082 { |
1088 { |
1083 // Check if it is a ADN EF then it will be a failure case |
1089 // Check if it is a ADN EF then it will be a failure case |
1084 if( iType1FileArray[i].tagValue == UICC_ADN_PRIM_TAG ) |
1090 if( iType1FileArray[i].tagValue == UICC_ADN_PRIM_TAG ) |
1085 ret = KErrGeneral; |
1091 { |
|
1092 ret = KErrGeneral; |
|
1093 } |
1086 else |
1094 else |
1087 { |
1095 { |
1088 // remove Entry |
1096 // remove Entry |
1089 iType1FileArray.Remove(i); |
1097 iType1FileArray.Remove(i); |
1090 iType1FileArray.Remove(j); |
1098 iType1FileArray.Remove(j); |
1091 } |
1099 } |
1092 } |
1100 } // no else |
1093 } |
1101 } |
1094 // Check for Type2 file id's |
1102 // Check for Type2 file id's |
1095 for(TInt i=0; i<iType2FileArray.Count(); i++) |
1103 for(TInt i=0; i<iType2FileArray.Count(); i++) |
1096 { |
1104 { |
1097 if( iType2FileArray[i].tagFID == iType1FileArray[j].tagFID ) |
1105 if( iType2FileArray[i].tagFID == iType1FileArray[j].tagFID ) |
1105 { |
1113 { |
1106 // remove thise Entries |
1114 // remove thise Entries |
1107 iType1FileArray.Remove(j); |
1115 iType1FileArray.Remove(j); |
1108 iType2FileArray.Remove(i); |
1116 iType2FileArray.Remove(i); |
1109 } |
1117 } |
1110 } |
1118 } // no else |
1111 } |
1119 } |
1112 // Check for Type 3 File Id's |
1120 // Check for Type 3 File Id's |
1113 for( TInt i=0; i<iType3FileArray.Count(); i++ ) |
1121 for( TInt i=0; i<iType3FileArray.Count(); i++ ) |
1114 { |
1122 { |
1115 if( iType3FileArray[i].tagFID == iType1FileArray[j].tagFID ) |
1123 if( iType3FileArray[i].tagFID == iType1FileArray[j].tagFID ) |
|
1124 { |
1116 // Check for ADN file |
1125 // Check for ADN file |
1117 if( iType1FileArray[j].tagValue == UICC_ADN_PRIM_TAG ) |
1126 if( iType1FileArray[j].tagValue == UICC_ADN_PRIM_TAG ) |
|
1127 { |
1118 ret = KErrGeneral; |
1128 ret = KErrGeneral; |
|
1129 } |
1119 else |
1130 else |
1120 { |
1131 { |
1121 // remove those entries |
1132 // remove those entries |
1122 iType1FileArray.Remove(j); |
1133 iType1FileArray.Remove( j ); |
1123 iType3FileArray.Remove(i); |
1134 iType3FileArray.Remove( i ); |
1124 } |
1135 } |
1125 } |
1136 } // no else |
1126 } |
1137 } |
1127 |
1138 } |
1128 // Check for Type2 File Id's with all Type2 and Type3 file Id's |
1139 |
1129 for( TInt j=0; j< iType2FileArray.Count(); j++ ) |
1140 // Check for Type2 File Id's with all Type2 and Type3 file Id's |
1130 { |
1141 for( TInt j=0; j< iType2FileArray.Count(); j++ ) |
1131 // Check for Type 2 files |
1142 { |
1132 for( TInt i = (j+1); i< ( iType2FileArray.Count()-j ); i++ ) |
1143 // Check for Type 2 files |
1133 { |
1144 for( TInt i = (j+1); i< ( iType2FileArray.Count()-j ); i++ ) |
1134 if( iType2FileArray[i].tagFID == iType2FileArray[j].tagFID) |
1145 { |
1135 { |
1146 if( iType2FileArray[i].tagFID == iType2FileArray[j].tagFID ) |
1136 iType2FileArray.Remove(j); |
1147 { |
1137 iType2FileArray.Remove(i); |
1148 iType2FileArray.Remove( j ); |
1138 } |
1149 iType2FileArray.Remove( i ); |
1139 } |
1150 } // no else |
1140 // Check for Type 3 File Id's |
1151 } |
1141 for( TInt i=0; i<iType3FileArray.Count(); i++ ) |
1152 // Check for Type 3 File Id's |
1142 { |
1153 for( TInt i=0; i<iType3FileArray.Count(); i++ ) |
1143 if( iType3FileArray[i].tagFID == iType2FileArray[j].tagFID ) |
1154 { |
1144 { |
1155 if( iType3FileArray[i].tagFID == iType2FileArray[j].tagFID ) |
1145 iType2FileArray.Remove(j); |
1156 { |
1146 iType3FileArray.Remove(i); |
1157 iType2FileArray.Remove( j ); |
1147 } |
1158 iType3FileArray.Remove( i ); |
1148 } |
1159 } // no else |
1149 } |
1160 } |
1150 |
1161 } |
1151 //Check for Type3 File Id's with all other Type3 file Id's |
1162 |
1152 for( TInt j=0; j< iType3FileArray.Count(); j++ ) |
1163 //Check for Type3 File Id's with all other Type3 file Id's |
1153 { |
1164 for( TInt j=0; j< iType3FileArray.Count(); j++ ) |
1154 // Check for Type 2 files |
1165 { |
1155 for( TInt i = (j+1); i< (iType3FileArray.Count()-j); i++ ) |
1166 // Check for Type 2 files |
1156 { |
1167 for( TInt i = ( j+1 ); i< ( iType3FileArray.Count()-j ); i++ ) |
1157 if( iType3FileArray[i].tagFID == iType3FileArray[j].tagFID ) |
1168 { |
1158 { |
1169 if( iType3FileArray[i].tagFID == iType3FileArray[j].tagFID ) |
1159 iType3FileArray.Remove(j); |
1170 { |
1160 iType3FileArray.Remove(i); |
1171 iType3FileArray.Remove( j ); |
1161 } |
1172 iType3FileArray.Remove( i ); |
1162 } |
1173 } // no else |
1163 } |
1174 } |
|
1175 } |
1164 |
1176 |
1165 return ret; |
1177 return ret; |
1166 } |
1178 } |
1167 |
1179 |
1168 // ----------------------------------------------------------------------------- |
1180 // ----------------------------------------------------------------------------- |
1176 TFLOGSTRING( "TSY: CMmPhoneBookOperationInit3G_adn::CheckForNoOfRecords" ); |
1188 TFLOGSTRING( "TSY: CMmPhoneBookOperationInit3G_adn::CheckForNoOfRecords" ); |
1177 OstTrace0( TRACE_NORMAL, CMMPHONEBOOKOPERATIONINIT3G_ADN_CHECKFORNOOFRECORDS, "CMmPhoneBookOperationInit3G_adn::CheckForNoOfRecords" ); |
1189 OstTrace0( TRACE_NORMAL, CMMPHONEBOOKOPERATIONINIT3G_ADN_CHECKFORNOOFRECORDS, "CMmPhoneBookOperationInit3G_adn::CheckForNoOfRecords" ); |
1178 |
1190 |
1179 TInt ret( KErrNone ); |
1191 TInt ret( KErrNone ); |
1180 |
1192 |
1181 if( iPBStoreInfoData->iADNNumOfEntries != aNoOfRecord ) |
1193 // get the no of records in one ADN Ef |
|
1194 TInt maxNoOfRecInOneAdnEf = ( ( iMmPhoneBookStoreMessHandler-> |
|
1195 iPBStoreConf[EPhonebookTypeAdn].iNoOfRecords ) / |
|
1196 ( iMmPhoneBookStoreMessHandler-> |
|
1197 iPBStoreConf[EPhonebookTypeAdn].iPBRNoOfRecords ) ); |
|
1198 if( maxNoOfRecInOneAdnEf != aNoOfRecord ) |
1182 { |
1199 { |
1183 ret = KErrGeneral; |
1200 ret = KErrGeneral; |
1184 } |
1201 } // no else |
1185 return ret; |
1202 return ret; |
1186 } |
1203 } |
1187 |
1204 |
1188 |
1205 |
1189 // ----------------------------------------------------------------------------- |
1206 // ----------------------------------------------------------------------------- |