312 if( itemSubscriberId != NULL ) |
318 if( itemSubscriberId != NULL ) |
313 { |
319 { |
314 TInt ret=CTestConfig::GetElement(itemSubscriberId->Value(),KStdDelimiter,0,IMSI); |
320 TInt ret=CTestConfig::GetElement(itemSubscriberId->Value(),KStdDelimiter,0,IMSI); |
315 if( ret != KErrNone ) |
321 if( ret != KErrNone ) |
316 { |
322 { |
317 LOGPARSERR("IMSI",ret,0,&KSubscriberId); |
323 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_CONSTRUCTL_2, "WARNING - CONFIGURATION FILE PARSING - Reading element IMSI returned %d (element no. %d) from tag %s.",ret,0,KSubscriberId); |
318 } |
324 } |
319 // coverity[check_return] |
325 // coverity[check_return] |
320 CTestConfig::GetElement(itemSubscriberId->Value(),KStdDelimiter,1,iSubscriberId.iError); |
326 CTestConfig::GetElement(itemSubscriberId->Value(),KStdDelimiter,1,iSubscriberId.iError); |
321 iSubscriberId.iIMSI.Copy(IMSI); |
327 iSubscriberId.iIMSI.Copy(IMSI); |
322 } |
328 } |
327 |
333 |
328 iNtwkMode=(RMobilePhone::TMobilePhoneNetworkMode)CfgFile()->ItemValue(KNetworkMode,KNetworkModeDefault); |
334 iNtwkMode=(RMobilePhone::TMobilePhoneNetworkMode)CfgFile()->ItemValue(KNetworkMode,KNetworkModeDefault); |
329 //get phone id from config file |
335 //get phone id from config file |
330 GetPhoneIdAndCaps(); |
336 GetPhoneIdAndCaps(); |
331 |
337 |
332 LOGPHONE1("Loading the version configuration"); |
338 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_CONSTRUCTL_3, "Loading the version configuration"); |
333 iSimTsyVersion = CfgFile()->ItemValue(KTsyVersionNumber,KSimTsyDefaultVersion); |
339 iSimTsyVersion = CfgFile()->ItemValue(KTsyVersionNumber,KSimTsyDefaultVersion); |
334 LOGPHONE2("Simulated SIMTSY version: %d", iSimTsyVersion); |
340 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_CONSTRUCTL_4, "Simulated SIMTSY version: %d", iSimTsyVersion); |
335 |
341 |
336 iPacketService = CSimPacketService::NewL(this); |
342 iPacketService = CSimPacketService::NewL(this); |
337 iBatteryCharger = CSimBatteryCharger::NewL(this); |
343 iBatteryCharger = CSimBatteryCharger::NewL(this); |
338 iSat = CSimSat::NewL(this); |
344 iSat = CSimSat::NewL(this); |
339 iIndicator = CSimIndicator::NewL(this); |
345 iIndicator = CSimIndicator::NewL(this); |
604 TPtrC8 phonebookName; |
610 TPtrC8 phonebookName; |
605 TInt maxNumSlots, telNumMaxLen, alphaTagMaxLen; |
611 TInt maxNumSlots, telNumMaxLen, alphaTagMaxLen; |
606 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,phonebookName); |
612 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,phonebookName); |
607 if(ret!=KErrNone) |
613 if(ret!=KErrNone) |
608 { |
614 { |
609 LOGPARSERR("phonebookName",ret,0,&KPhBkStore); |
615 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_FINDANDCREATEPHBKSTORESL_2, "WARNING - CONFIGURATION FILE PARSING - Reading element PHONEBOOKNAME returned %d (element no. %d) from tag %s.",ret,0,KPhBkStore); |
610 continue; |
616 continue; |
611 } |
617 } |
612 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,maxNumSlots); |
618 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,maxNumSlots); |
613 if(ret!=KErrNone) |
619 if(ret!=KErrNone) |
614 { |
620 { |
615 LOGPARSERR("maxNumSlots",ret,1,&KPhBkStore); |
621 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_FINDANDCREATEPHBKSTORESL_3, "WARNING - CONFIGURATION FILE PARSING - Reading element MAXNUMSLOTS returned %d (element no. %d) from tag %s.",ret,1,KPhBkStore); |
616 continue; |
622 continue; |
617 } |
623 } |
618 |
624 |
619 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,telNumMaxLen); |
625 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,telNumMaxLen); |
620 if(ret!=KErrNone) |
626 if(ret!=KErrNone) |
621 { |
627 { |
622 LOGPARSERR("telNumMaxLen",ret,2,&KPhBkStore); |
628 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_FINDANDCREATEPHBKSTORESL_4, "WARNING - CONFIGURATION FILE PARSING - Reading element TELNUMMAXLEN returned %d (element no. %d) from tag %s.",ret,2,KPhBkStore); |
623 continue; |
629 continue; |
624 } |
630 } |
625 |
631 |
626 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,alphaTagMaxLen); |
632 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,alphaTagMaxLen); |
627 if(ret!=KErrNone) |
633 if(ret!=KErrNone) |
628 { |
634 { |
629 LOGPARSERR("alphaTagMaxLen",ret,3,&KPhBkStore); |
635 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_FINDANDCREATEPHBKSTORESL_5, "WARNING - CONFIGURATION FILE PARSING - Reading element ALPHATAGMAXLEN returned %d (element no. %d) from tag %s.",ret,3,KPhBkStore); |
630 continue; |
636 continue; |
631 } |
637 } |
632 |
638 |
633 |
639 |
634 CSimPhBkStore* phBkStore=CSimPhBkStore::NewL(this,phonebookName,maxNumSlots,telNumMaxLen,alphaTagMaxLen); |
640 CSimPhBkStore* phBkStore=CSimPhBkStore::NewL(this,phonebookName,maxNumSlots,telNumMaxLen,alphaTagMaxLen); |
654 TInt additional, maxEmail, maxAdditionalTelNumLen, maxAdditionalTextLen; |
660 TInt additional, maxEmail, maxAdditionalTelNumLen, maxAdditionalTextLen; |
655 |
661 |
656 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,phonebookStore); |
662 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,phonebookStore); |
657 if(ret!=KErrNone) |
663 if(ret!=KErrNone) |
658 { |
664 { |
659 LOGPARSERR("phonebookStore",ret,0,&KPhBkUSimStore); |
665 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_FINDANDCREATEPHBKSTORESL_7, "WARNING - CONFIGURATION FILE PARSING - Reading element PHONEBOOKSTORE returned %d (element no. %d) from tag %s.",ret,0,KPhBkUSimStore); |
660 continue; |
666 continue; |
661 } |
667 } |
662 |
668 |
663 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,phonebookName); |
669 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,phonebookName); |
664 if(ret!=KErrNone) |
670 if(ret!=KErrNone) |
665 { |
671 { |
666 LOGPARSERR("phonebookName",ret,1,&KPhBkUSimStore); |
672 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_FINDANDCREATEPHBKSTORESL_8, "WARNING - CONFIGURATION FILE PARSING - Reading element PHONEBOOKNAME returned %d (element no. %d) from tag %s.",ret,1,KPhBkUSimStore); |
667 continue; |
673 continue; |
668 } |
674 } |
669 |
675 |
670 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,maxNumSlots); |
676 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,maxNumSlots); |
671 if(ret!=KErrNone) |
677 if(ret!=KErrNone) |
672 { |
678 { |
673 LOGPARSERR("maxNumSlots",ret,2,&KPhBkUSimStore); |
679 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_FINDANDCREATEPHBKSTORESL_9, "WARNING - CONFIGURATION FILE PARSING - Reading element MAXNUMSLOTS returned %d (element no. %d) from tag %s.",ret,2,KPhBkUSimStore); |
674 continue; |
680 continue; |
675 } |
681 } |
676 |
682 |
677 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,telNumMaxLen); |
683 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,telNumMaxLen); |
678 if(ret!=KErrNone) |
684 if(ret!=KErrNone) |
679 { |
685 { |
680 LOGPARSERR("telNumMaxLen",ret,3,&KPhBkUSimStore); |
686 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_FINDANDCREATEPHBKSTORESL_10, "WARNING - CONFIGURATION FILE PARSING - Reading element TELNUMMAXLEN returned %d (element no. %d) from tag %s.",ret,3,KPhBkUSimStore); |
681 continue; |
687 continue; |
682 } |
688 } |
683 |
689 |
684 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,alphaTagMaxLen); |
690 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,alphaTagMaxLen); |
685 if(ret!=KErrNone) |
691 if(ret!=KErrNone) |
686 { |
692 { |
687 LOGPARSERR("alphaTagMaxLen",ret,4,&KPhBkUSimStore); |
693 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_FINDANDCREATEPHBKSTORESL_11, "WARNING - CONFIGURATION FILE PARSING - Reading element ALPHATAGMAXLEN returned %d (element no. %d) from tag %s.",ret,4,KPhBkUSimStore); |
688 continue; |
694 continue; |
689 } |
695 } |
690 |
696 |
691 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,additional); |
697 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,additional); |
692 if(ret!=KErrNone) |
698 if(ret!=KErrNone) |
693 { |
699 { |
694 LOGPARSERR("additional",ret,5,&KPhBkUSimStore); |
700 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_FINDANDCREATEPHBKSTORESL_12, "WARNING - CONFIGURATION FILE PARSING - Reading element ADDITIONAL returned %d (element no. %d) from tag %s.",ret,5,KPhBkUSimStore); |
695 continue; |
701 continue; |
696 } |
702 } |
697 |
703 |
698 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,6,maxEmail); |
704 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,6,maxEmail); |
699 if(ret!=KErrNone) |
705 if(ret!=KErrNone) |
700 { |
706 { |
701 LOGPARSERR("maxEmail",ret,6,&KPhBkUSimStore); |
707 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_FINDANDCREATEPHBKSTORESL_13, "WARNING - CONFIGURATION FILE PARSING - Reading element MAXEMAIL returned %d (element no. %d) from tag %s.",ret,6,KPhBkUSimStore); |
702 continue; |
708 continue; |
703 } |
709 } |
704 |
710 |
705 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,7,maxAdditionalTelNumLen); |
711 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,7,maxAdditionalTelNumLen); |
706 if(ret!=KErrNone) |
712 if(ret!=KErrNone) |
707 { |
713 { |
708 LOGPHONE1("WARNING maxAdditionalTelNumLen missing, defaulting to telNumMaxLen"); |
714 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_FINDANDCREATEPHBKSTORESL_14, "WARNING maxAdditionalTelNumLen missing, defaulting to telNumMaxLen"); |
709 maxAdditionalTelNumLen = telNumMaxLen; |
715 maxAdditionalTelNumLen = telNumMaxLen; |
710 } |
716 } |
711 |
717 |
712 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,8,maxAdditionalTextLen); |
718 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,8,maxAdditionalTextLen); |
713 if(ret!=KErrNone) |
719 if(ret!=KErrNone) |
714 { |
720 { |
715 LOGPHONE1("WARNING maxAdditionalTextLen missing, defaulting to alphaTagMaxLen"); |
721 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_FINDANDCREATEPHBKSTORESL_15, "WARNING maxAdditionalTextLen missing, defaulting to alphaTagMaxLen"); |
716 maxAdditionalTextLen = alphaTagMaxLen; |
722 maxAdditionalTextLen = alphaTagMaxLen; |
717 } |
723 } |
718 |
724 |
719 TInt countStores = iPhBkUSimStores->Count(); |
725 TInt countStores = iPhBkUSimStores->Count(); |
720 TBool found=EFalse; |
726 TBool found=EFalse; |
768 } |
774 } |
769 for(i=0;i<iPhBkUSimStores->Count();i++) |
775 for(i=0;i<iPhBkUSimStores->Count();i++) |
770 { |
776 { |
771 iPhBkUSimStores->At(i)->PopulateStoreFromConfigFileL(); |
777 iPhBkUSimStores->At(i)->PopulateStoreFromConfigFileL(); |
772 } |
778 } |
773 LOGPHONE1("Finished parsing PhBkStores config parameters"); |
779 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_FINDANDCREATEPHBKSTORESL_17, "Finished parsing PhBkStores config parameters"); |
774 } |
780 } |
775 |
781 |
776 void CSimPhone::CreateONStoreL() |
782 void CSimPhone::CreateONStoreL() |
777 { |
783 { |
778 const CTestConfigItem* item=NULL; |
784 const CTestConfigItem* item=NULL; |
779 TInt ret=KErrNone; |
785 TInt ret=KErrNone; |
780 |
786 |
781 LOGPHONE1("Starting to Load and Parse Own Number Config parameters"); |
787 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_CREATEONSTOREL_1, "Starting to Load and Parse Own Number Config parameters"); |
782 |
788 |
783 TInt i=0; |
789 TInt i=0; |
784 item=CfgFile()->Item(KONStore,i); |
790 item=CfgFile()->Item(KONStore,i); |
785 if(!item) |
791 if(!item) |
786 return; |
792 return; |
787 |
793 |
788 TInt maxNumSlots, telNumMaxLen, alphaTagMaxLen; |
794 TInt maxNumSlots, telNumMaxLen, alphaTagMaxLen; |
789 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,maxNumSlots); |
795 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,maxNumSlots); |
790 if(ret!=KErrNone) |
796 if(ret!=KErrNone) |
791 { |
797 { |
792 LOGPARSERR("maxNumSlots",ret,1,&KONStore); |
798 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_CREATEONSTOREL_2, "WARNING - CONFIGURATION FILE PARSING - Reading element MAXNUMSLOTS returned %d (element no. %d) from tag %s.",ret,1,KONStore); |
793 return; |
799 return; |
794 } |
800 } |
795 |
801 |
796 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,telNumMaxLen); |
802 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,telNumMaxLen); |
797 if(ret!=KErrNone) |
803 if(ret!=KErrNone) |
798 { |
804 { |
799 LOGPARSERR("telNumMaxLen",ret,2,&KONStore); |
805 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_CREATEONSTOREL_3, "WARNING - CONFIGURATION FILE PARSING - Reading element TELNUMMAXLEN returned %d (element no. %d) from tag %s.",ret,2,KONStore); |
800 return; |
806 return; |
801 } |
807 } |
802 |
808 |
803 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,alphaTagMaxLen); |
809 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,alphaTagMaxLen); |
804 if(ret!=KErrNone) |
810 if(ret!=KErrNone) |
805 { |
811 { |
806 LOGPARSERR("alphaTagMaxLen",ret,3,&KONStore); |
812 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_CREATEONSTOREL_4, "WARNING - CONFIGURATION FILE PARSING - Reading element ALPHATAGMAXLEN returned %d (element no. %d) from tag %s.",ret,3,KONStore); |
807 return; |
813 return; |
808 } |
814 } |
809 |
815 |
810 iONStore=CSimONStore::NewL(this,maxNumSlots,telNumMaxLen,alphaTagMaxLen); |
816 iONStore=CSimONStore::NewL(this,maxNumSlots,telNumMaxLen,alphaTagMaxLen); |
811 |
817 |
812 // Populate the Own Number Store |
818 // Populate the Own Number Store |
813 iONStore->PopulateStoreFromConfigFileL(); |
819 iONStore->PopulateStoreFromConfigFileL(); |
814 |
820 |
815 LOGPHONE1("Finished parsing Own Number Store config parameters"); |
821 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_CREATEONSTOREL_5, "Finished parsing Own Number Store config parameters"); |
816 } |
822 } |
817 |
823 |
818 TInt CSimPhone::ExtFunc(const TTsyReqHandle aReqHandle, const TInt aIpc, const TDataPackage& aPckg) |
824 TInt CSimPhone::ExtFunc(const TTsyReqHandle aReqHandle, const TInt aIpc, const TDataPackage& aPckg) |
819 /** |
825 /** |
820 * ExtFunc is called by the server when it has a "extended", i.e. non-core ETel request |
826 * ExtFunc is called by the server when it has a "extended", i.e. non-core ETel request |
1536 |
1542 |
1537 CTelObject* phoneScEap = iPhoneScEapMan->CreateScEapSubSessionL(tempAID, eapType); |
1543 CTelObject* phoneScEap = iPhoneScEapMan->CreateScEapSubSessionL(tempAID, eapType); |
1538 |
1544 |
1539 if (phoneScEap == NULL) |
1545 if (phoneScEap == NULL) |
1540 { |
1546 { |
1541 LOGPHONE1("ERROR CSimSmartCardEap object not created, returning KErrGeneral"); |
1547 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_OPENNEWOBJECTBYNAMEL_2, "ERROR CSimSmartCardEap object not created, returning KErrGeneral"); |
1542 User::Leave(KErrGeneral); |
1548 User::Leave(KErrGeneral); |
1543 } |
1549 } |
1544 |
1550 |
1545 LOGPHONE2("CSimPhone::OpenNewObjectByNameL CSimSmartCardEap object created [0x%08x]", phoneScEap); |
1551 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_OPENNEWOBJECTBYNAMEL_3, "CSimPhone::OpenNewObjectByNameL CSimSmartCardEap object created [0x%08x]", phoneScEap); |
1546 return phoneScEap; |
1552 return phoneScEap; |
1547 } // End of opening Smart Card EAP sub-session |
1553 } // End of opening Smart Card EAP sub-session |
1548 else if (aName.CompareF(KETelOwnNumberStore) == 0) |
1554 else if (aName.CompareF(KETelOwnNumberStore) == 0) |
1549 { |
1555 { |
1550 if(iONStore==NULL) |
1556 if(iONStore==NULL) |
1551 { |
1557 { |
1552 LOGPHONE1("ERROR CSimONStore object not found. Please check config file."); |
1558 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_OPENNEWOBJECTBYNAMEL_4, "ERROR CSimONStore object not found. Please check config file."); |
1553 User::Leave(KErrNotFound); |
1559 User::Leave(KErrNotFound); |
1554 } |
1560 } |
1555 else |
1561 else |
1556 { |
1562 { |
1557 (void)iONStore->Open(); |
1563 (void)iONStore->Open(); |
2251 __ASSERT_ALWAYS(iMode!=RPhone::EModeUnknown,SimPanic(EPhoneModeUnknownIllegal)); |
2257 __ASSERT_ALWAYS(iMode!=RPhone::EModeUnknown,SimPanic(EPhoneModeUnknownIllegal)); |
2252 __ASSERT_ALWAYS(iNtwkMode!=RMobilePhone::ENetworkModeUnknown,SimPanic(ENetworkModeUnknownIllegal)); |
2258 __ASSERT_ALWAYS(iNtwkMode!=RMobilePhone::ENetworkModeUnknown,SimPanic(ENetworkModeUnknownIllegal)); |
2253 |
2259 |
2254 // If there is no active line defined, then any state changes are fine. However, |
2260 // If there is no active line defined, then any state changes are fine. However, |
2255 // we need to watch for a shift to an "active" status. |
2261 // we need to watch for a shift to an "active" status. |
2256 LOGPHONE1(">>CSimPhone::ValidateChangeState"); |
2262 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_VALIDATECHANGESTATE_1, ">>CSimPhone::ValidateChangeState"); |
2257 if(!iActiveLine) |
2263 if(!iActiveLine) |
2258 { |
2264 { |
2259 iMode=ConvertStateToMode(aState); |
2265 iMode=ConvertStateToMode(aState); |
2260 if(IsStateActive(aState)) |
2266 if(IsStateActive(aState)) |
2261 iActiveLine=aOriginatingLine; |
2267 iActiveLine=aOriginatingLine; |
2308 * @param aOriginatingLine pointer to the line requesting for the change of state |
2314 * @param aOriginatingLine pointer to the line requesting for the change of state |
2309 * @param aState the state the aOriginatingLine wants to change to |
2315 * @param aState the state the aOriginatingLine wants to change to |
2310 * @return Error indicates whether the change of state is successful or not |
2316 * @return Error indicates whether the change of state is successful or not |
2311 */ |
2317 */ |
2312 { |
2318 { |
2313 LOGPHONE1(">>CSimPhone::ValidateChangeState packet"); |
2319 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_VALIDATECHANGESTATE1_1, ">>CSimPhone::ValidateChangeState packet"); |
2314 __ASSERT_ALWAYS(iMode!=RPhone::EModeUnknown,SimPanic(EPhoneModeUnknownIllegal)); |
2320 __ASSERT_ALWAYS(iMode!=RPhone::EModeUnknown,SimPanic(EPhoneModeUnknownIllegal)); |
2315 __ASSERT_ALWAYS(iNtwkMode!=RMobilePhone::ENetworkModeUnknown,SimPanic(ENetworkModeUnknownIllegal)); |
2321 __ASSERT_ALWAYS(iNtwkMode!=RMobilePhone::ENetworkModeUnknown,SimPanic(ENetworkModeUnknownIllegal)); |
2316 __ASSERT_ALWAYS(iPacketService->MSClass()!=RPacketService::EMSClassUnknown,SimPanic(EPacketMSClassUnKnown)); |
2322 __ASSERT_ALWAYS(iPacketService->MSClass()!=RPacketService::EMSClassUnknown,SimPanic(EPacketMSClassUnKnown)); |
2317 |
2323 |
2318 //we must know the type of class the phone supports in order to determine what action to take. |
2324 //we must know the type of class the phone supports in order to determine what action to take. |
2411 const CTestConfigItem* item=CfgFile()->Item(KPhoneId); |
2417 const CTestConfigItem* item=CfgFile()->Item(KPhoneId); |
2412 if (item) |
2418 if (item) |
2413 { |
2419 { |
2414 TInt ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,manufacturer); |
2420 TInt ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,manufacturer); |
2415 if(ret!=KErrNone) |
2421 if(ret!=KErrNone) |
2416 LOGPARSERR("manufacturer",ret,0,&KPhoneId); |
2422 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_GETPHONEIDANDCAPS_1, "WARNING - CONFIGURATION FILE PARSING - Reading element MANUFACTURER returned %d (element no. %d) from tag %s.",ret,0,KPhoneId); |
2417 ret = CTestConfig::GetElement(item->Value(),KStdDelimiter,1,model); |
2423 ret = CTestConfig::GetElement(item->Value(),KStdDelimiter,1,model); |
2418 if(ret!=KErrNone) |
2424 if(ret!=KErrNone) |
2419 LOGPARSERR("model",ret,1,&KPhoneId); |
2425 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_GETPHONEIDANDCAPS_2, "WARNING - CONFIGURATION FILE PARSING - Reading element MODEL returned %d (element no. %d) from tag %s.",ret,1,KPhoneId); |
2420 ret = CTestConfig::GetElement(item->Value(),KStdDelimiter,2,revision); |
2426 ret = CTestConfig::GetElement(item->Value(),KStdDelimiter,2,revision); |
2421 if(ret!=KErrNone) |
2427 if(ret!=KErrNone) |
2422 LOGPARSERR("revision",ret,2,&KPhoneId); |
2428 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_GETPHONEIDANDCAPS_3, "WARNING - CONFIGURATION FILE PARSING - Reading element REVISION returned %d (element no. %d) from tag %s.",ret,2,KPhoneId); |
2423 ret = CTestConfig::GetElement(item->Value(),KStdDelimiter,3,imei); |
2429 ret = CTestConfig::GetElement(item->Value(),KStdDelimiter,3,imei); |
2424 if(ret!=KErrNone) |
2430 if(ret!=KErrNone) |
2425 LOGPARSERR("imei",ret,3,&KPhoneId); |
2431 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_GETPHONEIDANDCAPS_4, "WARNING - CONFIGURATION FILE PARSING - Reading element IMEI returned %d (element no. %d) from tag %s.",ret,3,KPhoneId); |
2426 ret = CTestConfig::GetElement(item->Value(),KStdDelimiter,4,iPhoneId.iError); |
2432 ret = CTestConfig::GetElement(item->Value(),KStdDelimiter,4,iPhoneId.iError); |
2427 |
2433 |
2428 iPhoneId.iManufacturerId.Copy(manufacturer); |
2434 iPhoneId.iManufacturerId.Copy(manufacturer); |
2429 iPhoneId.iModelId.Copy(model); |
2435 iPhoneId.iModelId.Copy(model); |
2430 iPhoneId.iRevisionId.Copy(revision); |
2436 iPhoneId.iRevisionId.Copy(revision); |
3053 Implementation of MTimerCallback::TimerCallBack |
3059 Implementation of MTimerCallback::TimerCallBack |
3054 Simply completes the suspend call processing request after the delay |
3060 Simply completes the suspend call processing request after the delay |
3055 */ |
3061 */ |
3056 void CSimPhone::CNetworkModeTimerCallBack::TimerCallBack(TInt /*aId*/) |
3062 void CSimPhone::CNetworkModeTimerCallBack::TimerCallBack(TInt /*aId*/) |
3057 { |
3063 { |
3058 LOGPACKET1(">>CSimPhone::CNetworkModeTimerCallBack::TimerCallBack"); |
3064 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_CNETWORKMODETIMERCALLBACK_TIMERCALLBACK_1, ">>CSimPhone::CNetworkModeTimerCallBack::TimerCallBack"); |
3059 iPhone->TimerCallBackNetworkMode(); |
3065 iPhone->TimerCallBackNetworkMode(); |
3060 } |
3066 } |
3061 |
3067 |
3062 TInt CSimPhone::NotifyModeChange(const TTsyReqHandle aTsyReqHandle, RMobilePhone::TMobilePhoneNetworkMode* aCaps) |
3068 TInt CSimPhone::NotifyModeChange(const TTsyReqHandle aTsyReqHandle, RMobilePhone::TMobilePhoneNetworkMode* aCaps) |
3063 { |
3069 { |
3064 LOGPACKET1("CSimPhone::NotifyModeChange called"); |
3070 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_NOTIFYMODECHANGE_1, "CSimPhone::NotifyModeChange called"); |
3065 __ASSERT_ALWAYS(!iNotifyNetworkModeChange.iNotifyPending,SimPanic(ENotificationAlreadyPending)); |
3071 __ASSERT_ALWAYS(!iNotifyNetworkModeChange.iNotifyPending,SimPanic(ENotificationAlreadyPending)); |
3066 |
3072 |
3067 if (iNetworkModeArray->Count() == 0) |
3073 if (iNetworkModeArray->Count() == 0) |
3068 { |
3074 { |
3069 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
3075 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
3328 return self; |
3334 return self; |
3329 } |
3335 } |
3330 |
3336 |
3331 void CSimPhone::CSimTestNumberObserver::ConstructL() |
3337 void CSimPhone::CSimTestNumberObserver::ConstructL() |
3332 { |
3338 { |
3333 LOGPHONE1("CSimPhone::CSimPhoneObserver::ConstructL"); |
3339 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_CSIMTESTNUMBEROBSERVER_CONSTRUCTL_1, "CSimPhone::CSimPhoneObserver::ConstructL"); |
3334 User::LeaveIfError(iProperty.Attach(KUidPSSimTsyCategory, KPSSimTsyTestNumber)); |
3340 User::LeaveIfError(iProperty.Attach(KUidPSSimTsyCategory, KPSSimTsyTestNumber)); |
3335 Start(); |
3341 Start(); |
3336 } |
3342 } |
3337 |
3343 |
3338 void CSimPhone::CSimTestNumberObserver::Start() |
3344 void CSimPhone::CSimTestNumberObserver::Start() |
3339 { |
3345 { |
3340 LOGPHONE1("CSimPhone::CSimPhoneObserver::Start"); |
3346 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_CSIMTESTNUMBEROBSERVER_START_1, "CSimPhone::CSimPhoneObserver::Start"); |
3341 iProperty.Subscribe(iStatus); |
3347 iProperty.Subscribe(iStatus); |
3342 SetActive(); |
3348 SetActive(); |
3343 } |
3349 } |
3344 |
3350 |
3345 void CSimPhone::CSimTestNumberObserver::RunL() |
3351 void CSimPhone::CSimTestNumberObserver::RunL() |
3346 { |
3352 { |
3347 LOGPHONE2("CSimPhone::CSimPhoneObserver::RunL [iStatus=%d]", iStatus.Int()); |
3353 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONE_CSIMTESTNUMBEROBSERVER_RUNL_1, "CSimPhone::CSimPhoneObserver::RunL [iStatus=%d]", iStatus.Int()); |
3348 TInt err = iSimPhone.CheckConfigFile(); |
3354 TInt err = iSimPhone.CheckConfigFile(); |
3349 if( err == KErrNone ) |
3355 if( err == KErrNone ) |
3350 { |
3356 { |
3351 iSimPhone.HandleTestNumberChangedL(); |
3357 iSimPhone.HandleTestNumberChangedL(); |
3352 } |
3358 } |