118 CMmCallMessHandler* aCallMessHandler, //pointer to the call mess handler |
118 CMmCallMessHandler* aCallMessHandler, //pointer to the call mess handler |
119 CMmMessageRouter* aMessageRouter, |
119 CMmMessageRouter* aMessageRouter, |
120 CMmUiccMessHandler* aUiccMessHandler ) |
120 CMmUiccMessHandler* aUiccMessHandler ) |
121 { |
121 { |
122 TFLOGSTRING("TSY: CMmSecurityMessHandler::NewL"); |
122 TFLOGSTRING("TSY: CMmSecurityMessHandler::NewL"); |
123 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_NEWL, "CMmSecurityMessHandler::NewL" ); |
123 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_NEWL_TD, "CMmSecurityMessHandler::NewL" ); |
124 CMmSecurityMessHandler* const securityMessHandler = |
124 CMmSecurityMessHandler* const securityMessHandler = |
125 new ( ELeave ) CMmSecurityMessHandler(); |
125 new ( ELeave ) CMmSecurityMessHandler(); |
126 |
126 |
127 CleanupStack::PushL( securityMessHandler ); |
127 CleanupStack::PushL( securityMessHandler ); |
128 securityMessHandler->iPhoNetSender = aPhoNetSender; |
128 securityMessHandler->iPhoNetSender = aPhoNetSender; |
168 // ----------------------------------------------------------------------------- |
168 // ----------------------------------------------------------------------------- |
169 // |
169 // |
170 void CMmSecurityMessHandler::ConstructL() |
170 void CMmSecurityMessHandler::ConstructL() |
171 { |
171 { |
172 TFLOGSTRING("TSY: CMmSecurityMessHandler::ConstructL"); |
172 TFLOGSTRING("TSY: CMmSecurityMessHandler::ConstructL"); |
173 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_CONSTRUCTL, "CMmSecurityMessHandler::ConstructL" ); |
173 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_CONSTRUCTL_TD, "CMmSecurityMessHandler::ConstructL" ); |
174 |
174 |
175 #ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
175 #ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
176 // Initialize the current MTC state to poweroff, and do the first state query |
176 // Initialize the current MTC state to poweroff, and do the first state query |
177 iBootState.iMtcCurrentState = MTC_POWER_OFF; |
177 iBootState.iMtcCurrentState = MTC_POWER_OFF; |
178 MtcStateQueryReq( KSecurityTransId ); |
178 MtcStateQueryReq( KSecurityTransId ); |
192 // This flags indicates if PIN attempts left query in case |
192 // This flags indicates if PIN attempts left query in case |
193 iPinAttemptsLeftQuery = EFalse; |
193 iPinAttemptsLeftQuery = EFalse; |
194 // This flags indicates if lock state query in case |
194 // This flags indicates if lock state query in case |
195 iLockStateQuery = EFalse; |
195 iLockStateQuery = EFalse; |
196 iCodeType = RMobilePhone::ESecurityCodePin1; |
196 iCodeType = RMobilePhone::ESecurityCodePin1; |
197 |
197 |
198 iFdnSetting = RMobilePhone::EFdnSetOff; |
198 iFdnSetting = RMobilePhone::EFdnSetOff; |
199 } |
199 } |
200 |
200 |
201 // ----------------------------------------------------------------------------- |
201 // ----------------------------------------------------------------------------- |
202 // CMmSecurityMessHandler::~CMmSecurityMessHandler |
202 // CMmSecurityMessHandler::~CMmSecurityMessHandler |
204 // ----------------------------------------------------------------------------- |
204 // ----------------------------------------------------------------------------- |
205 // |
205 // |
206 CMmSecurityMessHandler::~CMmSecurityMessHandler() |
206 CMmSecurityMessHandler::~CMmSecurityMessHandler() |
207 { |
207 { |
208 TFLOGSTRING("TSY: CMmSecurityMessHandler::~CMmSecurityMessHandler"); |
208 TFLOGSTRING("TSY: CMmSecurityMessHandler::~CMmSecurityMessHandler"); |
209 OstTrace0( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_CMMSECURITYMESSHANDLER, "CMmSecurityMessHandler::~CMmSecurityMessHandler" ); |
209 OstTrace0( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_CMMSECURITYMESSHANDLER_TD, "CMmSecurityMessHandler::~CMmSecurityMessHandler" ); |
210 } |
210 } |
211 |
211 |
212 // ----------------------------------------------------------------------------- |
212 // ----------------------------------------------------------------------------- |
213 // CMmSecurityMessHandler::ExtFuncL |
213 // CMmSecurityMessHandler::ExtFuncL |
214 // Dispatches Etel requests to DOS level handlers |
214 // Dispatches Etel requests to DOS level handlers |
217 TInt CMmSecurityMessHandler::ExtFuncL( |
217 TInt CMmSecurityMessHandler::ExtFuncL( |
218 TInt aIpc, |
218 TInt aIpc, |
219 const CMmDataPackage* aDataPackage ) |
219 const CMmDataPackage* aDataPackage ) |
220 { |
220 { |
221 TFLOGSTRING2("TSY: CMmSecurityMessHandler::ExtFuncL, aIpc: %d", aIpc); |
221 TFLOGSTRING2("TSY: CMmSecurityMessHandler::ExtFuncL, aIpc: %d", aIpc); |
222 OstTrace1( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_EXTFUNCL, "CMmSecurityMessHandler::ExtFuncL;aIpc=%d", aIpc ); |
222 OstTrace1( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_EXTFUNCL_TD, "CMmSecurityMessHandler::ExtFuncL;aIpc=%d", aIpc ); |
223 |
223 |
224 TInt ret( KErrNone ); |
224 TInt ret( KErrNone ); |
225 |
225 |
226 TUint8 transId( KSecurityTransId ); |
226 TUint8 transId( KSecurityTransId ); |
227 |
227 |
438 #ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
452 #ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
439 case EMmTsyBootGetRFStatusIPC: |
453 case EMmTsyBootGetRFStatusIPC: |
440 { |
454 { |
441 //This should not be in any use at the moment |
455 //This should not be in any use at the moment |
442 TFLOGSTRING("TSY: CMmSecurityMessHandler::ExtFuncL - EMmTsyBootGetRFStatusIPC (NOT IN USE!!!)"); |
456 TFLOGSTRING("TSY: CMmSecurityMessHandler::ExtFuncL - EMmTsyBootGetRFStatusIPC (NOT IN USE!!!)"); |
443 OstTrace0( TRACE_NORMAL, DUP5_CMMSECURITYMESSHANDLER_EXTFUNCL, "CMmSecurityMessHandler::ExtFuncL, EMmTsyBootGetRFStatusIPC (NOT IN USE!!!)" ); |
457 OstTrace0( TRACE_NORMAL, DUP5_CMMSECURITYMESSHANDLER_EXTFUNCL_TD, "CMmSecurityMessHandler::ExtFuncL, EMmTsyBootGetRFStatusIPC (NOT IN USE!!!)" ); |
444 ret = MtcRfStatusQueryReq( transId ); |
458 ret = MtcRfStatusQueryReq( transId ); |
445 break; |
459 break; |
446 } |
460 } |
447 #endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
461 #endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
448 default: |
462 default: |
449 { |
463 { |
450 TFLOGSTRING2("TSY: CMmSecurityMessHandler::ExtFuncL - Unknown IPC: %d", aIpc); |
464 TFLOGSTRING2("TSY: CMmSecurityMessHandler::ExtFuncL - Unknown IPC: %d", aIpc); |
451 OstTrace1( TRACE_NORMAL, DUP6_CMMSECURITYMESSHANDLER_EXTFUNCL, "CMmSecurityMessHandler::ExtFuncL;Unknown aIpc=%d", aIpc ); |
465 OstTrace1( TRACE_NORMAL, DUP6_CMMSECURITYMESSHANDLER_EXTFUNCL_TD, "CMmSecurityMessHandler::ExtFuncL;Unknown aIpc=%d", aIpc ); |
452 ret = KErrNotSupported; |
466 ret = KErrNotSupported; |
453 break; |
467 break; |
454 } |
468 } |
455 } |
469 } |
456 |
470 |
468 { |
482 { |
469 TInt resource (aIsiMessage.Get8bit(ISI_HEADER_OFFSET_RESOURCEID)); |
483 TInt resource (aIsiMessage.Get8bit(ISI_HEADER_OFFSET_RESOURCEID)); |
470 TInt messageId(aIsiMessage.Get8bit(ISI_HEADER_OFFSET_MESSAGEID)); |
484 TInt messageId(aIsiMessage.Get8bit(ISI_HEADER_OFFSET_MESSAGEID)); |
471 |
485 |
472 TFLOGSTRING3("TSY: CMmSecurityMessHandler::ReceiveMessageL - resource: %d, msgId: %d", resource, messageId); |
486 TFLOGSTRING3("TSY: CMmSecurityMessHandler::ReceiveMessageL - resource: %d, msgId: %d", resource, messageId); |
473 OstTraceExt2( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_RECEIVEMESSAGEL, "CMmSecurityMessHandler::ReceiveMessageL;resource=%d;messageId=%d", resource, messageId ); |
487 OstTraceExt2( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_RECEIVEMESSAGEL_TD, "CMmSecurityMessHandler::ReceiveMessageL;resource=%d;messageId=%d", resource, messageId ); |
474 |
488 |
475 switch ( resource ) |
489 switch ( resource ) |
476 { |
490 { |
477 #ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
491 #ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
478 case PN_MTC: |
492 case PN_MTC: |
524 break; |
538 break; |
525 } |
539 } |
526 default: |
540 default: |
527 { |
541 { |
528 TFLOGSTRING2("TSY: CMmSecurityMessHandler::ReceiveMessageL - PN_MTC - unknown msgId: %d", messageId); |
542 TFLOGSTRING2("TSY: CMmSecurityMessHandler::ReceiveMessageL - PN_MTC - unknown msgId: %d", messageId); |
529 OstTrace1( TRACE_NORMAL, DUP3_CMMSECURITYMESSHANDLER_RECEIVEMESSAGEL, "CMmSecurityMessHandler::ReceiveMessageL;PN_MTC - unknown messageId=%d", messageId ); |
543 OstTrace1( TRACE_NORMAL, DUP3_CMMSECURITYMESSHANDLER_RECEIVEMESSAGEL_TD, "CMmSecurityMessHandler::ReceiveMessageL;PN_MTC - unknown messageId=%d", messageId ); |
530 break; |
544 break; |
531 } |
545 } |
532 } // end switch ( messageId ) |
546 } // end switch ( messageId ) |
533 break; // end case PN_MODEM_MCE |
547 break; // end case PN_MODEM_MCE |
534 } |
548 } |
535 #endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
549 #endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
536 case PN_UICC: |
550 case PN_UICC: |
537 { |
551 { |
538 switch( messageId ) |
552 switch( messageId ) |
539 { |
553 { |
540 case UICC_RESP: |
|
541 { |
|
542 UiccResp( aIsiMessage ); |
|
543 break; |
|
544 } |
|
545 case UICC_IND: |
|
546 { |
|
547 UiccInd( aIsiMessage ); |
|
548 break; |
|
549 } |
|
550 case UICC_CARD_IND: |
554 case UICC_CARD_IND: |
551 { |
555 { |
552 UiccCardInd( aIsiMessage ); |
556 UiccCardInd( aIsiMessage ); |
553 break; |
557 break; |
554 } |
558 } |
590 TInt ret( KErrNotReady ); |
594 TInt ret( KErrNotReady ); |
591 RMobilePhone::TMobilePassword code( aCodes->iCode ); |
595 RMobilePhone::TMobilePassword code( aCodes->iCode ); |
592 RMobilePhone::TMobilePassword unblockCode( aCodes->iUnblockCode ); |
596 RMobilePhone::TMobilePassword unblockCode( aCodes->iUnblockCode ); |
593 |
597 |
594 TFLOGSTRING4("TSY: CMmSecurityMessHandler::VerifySecurityCode - code type: %d, code: %S, unblock code: %S",*aType, &code, &unblockCode); |
598 TFLOGSTRING4("TSY: CMmSecurityMessHandler::VerifySecurityCode - code type: %d, code: %S, unblock code: %S",*aType, &code, &unblockCode); |
595 OstTraceExt3( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_SECCODEVERIFYREQ, "CMmSecurityMessHandler::VerifySecurityCode;code=%S;unblockCode=%S;aType=%hhu", code, unblockCode, *aType ); |
599 OstTraceExt3( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_SECCODEVERIFYREQ_TD, "CMmSecurityMessHandler::VerifySecurityCode;code=%S;unblockCode=%S;aType=%hhu", code, unblockCode, *aType ); |
|
600 |
|
601 iSecurityCode = *aType; |
596 |
602 |
597 switch( *aType ) |
603 switch( *aType ) |
598 { |
604 { |
599 // PIN codes are verified in UICC server |
605 // PIN codes are verified in UICC server |
600 case RMobilePhone::ESecurityCodePin1: |
606 case RMobilePhone::ESecurityCodePin1: |
634 TUint8 aTransactionId, |
640 TUint8 aTransactionId, |
635 RMobilePhone::TMobilePhoneSecurityCode* aType, |
641 RMobilePhone::TMobilePhoneSecurityCode* aType, |
636 RMobilePhone::TMobilePhonePasswordChangeV1* aChange ) // Old&new password |
642 RMobilePhone::TMobilePhonePasswordChangeV1* aChange ) // Old&new password |
637 { |
643 { |
638 TFLOGSTRING3("TSY: CMmSecurityMessHandler::SecCodeChangeReq - traId: %d, type: %d", aTransactionId, *aType); |
644 TFLOGSTRING3("TSY: CMmSecurityMessHandler::SecCodeChangeReq - traId: %d, type: %d", aTransactionId, *aType); |
639 OstTraceExt2( TRACE_NORMAL, CMMSECURITYMESSHANDLER_SECCODECHANGEREQ, "CMmSecurityMessHandler::SecCodeChangeReq;aTransactionId=%hhu;aType=%d", aTransactionId, *aType ); |
645 OstTraceExt2( TRACE_NORMAL, CMMSECURITYMESSHANDLER_SECCODECHANGEREQ_TD, "CMmSecurityMessHandler::SecCodeChangeReq;aTransactionId=%hhu;aType=%d", aTransactionId, *aType ); |
640 TFLOGSTRING2("TSY: CMmSecurityMessHandler::SecCodeChangeReq - old password: %S", &(aChange->iOldPassword)); |
646 TFLOGSTRING2("TSY: CMmSecurityMessHandler::SecCodeChangeReq - old password: %S", &(aChange->iOldPassword)); |
641 OstTraceExt1( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_SECCODECHANGEREQ, "CMmSecurityMessHandler::SecCodeChangeReq;aChange->iOldPassword=%S", aChange->iOldPassword ); |
647 OstTraceExt1( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_SECCODECHANGEREQ_TD, "CMmSecurityMessHandler::SecCodeChangeReq;aChange->iOldPassword=%S", aChange->iOldPassword ); |
642 TFLOGSTRING2("TSY: CMmSecurityMessHandler::SecCodeChangeReq - new password: %S", &(aChange->iNewPassword)); |
648 TFLOGSTRING2("TSY: CMmSecurityMessHandler::SecCodeChangeReq - new password: %S", &(aChange->iNewPassword)); |
643 OstTraceExt1( TRACE_NORMAL, DUP2_CMMSECURITYMESSHANDLER_SECCODECHANGEREQ, "CMmSecurityMessHandler::SecCodeChangeReq;aChange->iNewPassword=%S", aChange->iNewPassword ); |
649 OstTraceExt1( TRACE_NORMAL, DUP2_CMMSECURITYMESSHANDLER_SECCODECHANGEREQ_TD, "CMmSecurityMessHandler::SecCodeChangeReq;aChange->iNewPassword=%S", aChange->iNewPassword ); |
644 |
650 |
645 TInt ret( KErrNone ); |
651 TInt ret( KErrNone ); |
646 |
652 |
647 if ( RMobilePhone::ESecurityCodePin1 == *aType || |
653 if ( RMobilePhone::ESecurityCodePin1 == *aType || |
648 RMobilePhone::ESecurityCodePin2 == *aType || |
654 RMobilePhone::ESecurityCodePin2 == *aType || |
658 ret = KErrNotSupported; |
664 ret = KErrNotSupported; |
659 } |
665 } |
660 return ret; |
666 return ret; |
661 } |
667 } |
662 |
668 |
663 // ----------------------------------------------------------------------------- |
|
664 // CMmSecurityMessHandler::UiccReq |
|
665 // Builds UICC_REQ ISI message and sends it via phonet |
|
666 // ----------------------------------------------------------------------------- |
|
667 // |
|
668 TInt CMmSecurityMessHandler::UiccReq() const |
|
669 { |
|
670 TFLOGSTRING("TSY: CMmSecurityMessHandler::UiccReq"); |
|
671 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_UICCREQ, "CMmSecurityMessHandler::UiccReq" ); |
|
672 |
|
673 // Create UICC_REQ message for querying card status |
|
674 TIsiSend isiMsg( iPhoNetSender->SendBufferDes() ); |
|
675 isiMsg.Set8bit( ISI_HEADER_OFFSET_RESOURCEID, PN_UICC ); |
|
676 isiMsg.Set8bit( ISI_HEADER_OFFSET_TRANSID, KSecurityTransId ); |
|
677 isiMsg.Set8bit( ISI_HEADER_OFFSET_MESSAGEID, UICC_REQ ); |
|
678 isiMsg.Set8bit( ISI_HEADER_SIZE + UICC_REQ_OFFSET_SERVICETYPE, |
|
679 UICC_STATUS_GET ); |
|
680 |
|
681 return iPhoNetSender->Send( isiMsg.Complete() ); |
|
682 } |
|
683 |
|
684 // ----------------------------------------------------------------------------- |
|
685 // CMmSecurityMessHandler::UiccResp |
|
686 // Breaks UICC_RESP ISI-message and completes "notify SIM ready" |
|
687 // to CommonTSY. |
|
688 // ----------------------------------------------------------------------------- |
|
689 // |
|
690 void CMmSecurityMessHandler::UiccResp( const TIsiReceiveC& aIsiMessage ) |
|
691 { |
|
692 // Get service type |
|
693 TUint8 serviceType( aIsiMessage.Get8bit( |
|
694 ISI_HEADER_SIZE + UICC_RESP_OFFSET_SERVICETYPE ) ); |
|
695 |
|
696 // Get status |
|
697 TUint8 status( aIsiMessage.Get8bit( |
|
698 ISI_HEADER_SIZE + UICC_RESP_OFFSET_STATUS ) ); |
|
699 |
|
700 TFLOGSTRING3("TSY: CMmSecurityMessHandler::UiccResp, service type: %d, status: %d", serviceType, status ); |
|
701 OstTraceExt2( TRACE_NORMAL, CMMSECURITYMESSHANDLER_UICCRESP, "CMmSecurityMessHandler::UiccResp;serviceType=%d;status=%d", serviceType, status ); |
|
702 |
|
703 if ( UICC_STATUS_GET == serviceType && UICC_STATUS_OK == status ) |
|
704 { |
|
705 if ( !iBootState.iSIMReady ) |
|
706 { |
|
707 // Set UICC as ready so that initialization can start |
|
708 iBootState.iSIMReady = ETrue; |
|
709 |
|
710 // let's cache service table and CPHS information table |
|
711 iMmUiccMessHandler->InitializeSimServiceTableCache(); |
|
712 iMmUiccMessHandler->InitializeCphsInformationCache(); |
|
713 } |
|
714 } |
|
715 } |
|
716 |
|
717 // ----------------------------------------------------------------------------- |
|
718 // CMmSecurityMessHandler::UiccInd |
|
719 // Breaks UICC_IND ISI-message and completes "notify SIM ready" |
|
720 // to CommonTSY. |
|
721 // ----------------------------------------------------------------------------- |
|
722 // |
|
723 void CMmSecurityMessHandler::UiccInd( const TIsiReceiveC& aIsiMessage ) |
|
724 { |
|
725 // Get service type |
|
726 TUint8 serviceType( aIsiMessage.Get8bit( |
|
727 ISI_HEADER_SIZE + UICC_IND_OFFSET_SERVICETYPE ) ); |
|
728 |
|
729 TFLOGSTRING2("TSY: CMmCustomMessHandler::UiccInd, service type: %d", serviceType ); |
|
730 OstTraceExt1( TRACE_NORMAL, CMMSECURITYMESSHANDLER_UICCIND, "CMmSecurityMessHandler::UiccInd;serviceType=%hhu", serviceType ); |
|
731 |
|
732 if ( UICC_START_UP_COMPLETE == serviceType ) |
|
733 { |
|
734 // Set UICC state to ready |
|
735 iBootState.iSIMReady = ETrue; |
|
736 |
|
737 // let's cache service table and CPHS information table |
|
738 iMmUiccMessHandler->InitializeSimServiceTableCache(); |
|
739 iMmUiccMessHandler->InitializeCphsInformationCache(); |
|
740 } |
|
741 } |
|
742 |
669 |
743 // ----------------------------------------------------------------------------- |
670 // ----------------------------------------------------------------------------- |
744 // CMmSecurityMessHandler::UiccCardInd |
671 // CMmSecurityMessHandler::UiccCardInd |
745 // Breaks UICC_CARD_IND ISI-message |
672 // Breaks UICC_CARD_IND ISI-message |
746 // ----------------------------------------------------------------------------- |
673 // ----------------------------------------------------------------------------- |
750 // Get service type |
677 // Get service type |
751 TUint8 serviceType( aIsiMessage.Get8bit( |
678 TUint8 serviceType( aIsiMessage.Get8bit( |
752 ISI_HEADER_SIZE + UICC_CARD_IND_OFFSET_SERVICETYPE ) ); |
679 ISI_HEADER_SIZE + UICC_CARD_IND_OFFSET_SERVICETYPE ) ); |
753 |
680 |
754 TFLOGSTRING2("TSY: CMmCustomMessHandler::UiccCardInd, service type: %d", serviceType ); |
681 TFLOGSTRING2("TSY: CMmCustomMessHandler::UiccCardInd, service type: %d", serviceType ); |
755 OstTraceExt1( TRACE_NORMAL, CMMSECURITYMESSHANDLER_UICCCARDIND, "CMmSecurityMessHandler::UiccCardInd;serviceType=%hhu", serviceType ); |
682 OstTraceExt1( TRACE_NORMAL, CMMSECURITYMESSHANDLER_UICCCARDIND_TD, "CMmSecurityMessHandler::UiccCardInd;serviceType=%hhu", serviceType ); |
756 |
683 |
757 if ( UICC_CARD_REMOVED == serviceType ) |
684 if ( UICC_CARD_REMOVED == serviceType ) |
758 { |
685 { |
759 TFLOGSTRING("TSY: CMmSecurityMessHandler::UiccCardInd - SIM Removed!"); |
686 TFLOGSTRING("TSY: CMmSecurityMessHandler::UiccCardInd - SIM Removed!"); |
760 OstTrace0( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_UICCCARDIND, "CMmSecurityMessHandler::UiccCardInd - SIM Removed!" ); |
687 OstTrace0( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_UICCCARDIND_TD, "CMmSecurityMessHandler::UiccCardInd - SIM Removed!" ); |
761 // Change old boot state from TSY to not ready |
688 // Change old boot state from TSY to not ready |
762 iBootState.iSecReady = EFalse; |
689 iBootState.iSecReady = EFalse; |
763 iBootState.iPinRequired = EFalse; |
690 iBootState.iPinRequired = EFalse; |
764 iBootState.iPinVerified = EFalse; |
691 iBootState.iPinVerified = EFalse; |
765 } |
692 } |
773 // |
700 // |
774 void CMmSecurityMessHandler::MtcStateInfoIndL( |
701 void CMmSecurityMessHandler::MtcStateInfoIndL( |
775 const TIsiReceiveC& aIsiMessage ) |
702 const TIsiReceiveC& aIsiMessage ) |
776 { |
703 { |
777 TFLOGSTRING("TSY: CMmSecurityMessHandler::MtcStateInfoIndL"); |
704 TFLOGSTRING("TSY: CMmSecurityMessHandler::MtcStateInfoIndL"); |
778 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_MTCSTATEINFOINDL, "CMmSecurityMessHandler::MtcStateInfoIndL" ); |
705 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_MTCSTATEINFOINDL_TD, "CMmSecurityMessHandler::MtcStateInfoIndL" ); |
779 |
706 |
780 TUint8 state( aIsiMessage.Get8bit( ISI_HEADER_SIZE + MTC_STATE_INFO_IND_OFFSET_STATE ) ); |
707 TUint8 state( aIsiMessage.Get8bit( ISI_HEADER_SIZE + MTC_STATE_INFO_IND_OFFSET_STATE ) ); |
781 TUint8 action( aIsiMessage.Get8bit( ISI_HEADER_SIZE + MTC_STATE_INFO_IND_OFFSET_ACTION ) ); |
708 TUint8 action( aIsiMessage.Get8bit( ISI_HEADER_SIZE + MTC_STATE_INFO_IND_OFFSET_ACTION ) ); |
782 |
709 |
783 TFLOGSTRING3("TSY: CMmSecurityMessHandler::MtcStateInfoIndL action: 0x%02x, state: 0x%02x", action, state); |
710 TFLOGSTRING3("TSY: CMmSecurityMessHandler::MtcStateInfoIndL action: 0x%02x, state: 0x%02x", action, state); |
784 OstTraceExt2( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_MTCSTATEINFOINDL, "CMmSecurityMessHandler::MtcStateInfoIndL;action=%hhx;state=%hhx", action, state ); |
711 OstTraceExt2( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_MTCSTATEINFOINDL_TD, "CMmSecurityMessHandler::MtcStateInfoIndL;action=%hhx;state=%hhx", action, state ); |
785 |
712 |
786 //1. CMT_STATE_READY _AND_ CURRENT_STATE_NEW |
713 //1. CMT_STATE_READY _AND_ CURRENT_STATE_NEW |
787 if ( ( MTC_NOS_READY == action || MTC_READY == action ) && |
714 if ( ( MTC_NOS_READY == action || MTC_READY == action ) && |
788 iBootState.iMtcCurrentState != state ) |
715 iBootState.iMtcCurrentState != state ) |
789 { |
716 { |
790 iBootState.iMtcCurrentState = state; |
717 iBootState.iMtcCurrentState = state; |
791 |
718 |
792 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MtcStateInfoIndL - CMT state transition occurred"); |
719 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MtcStateInfoIndL - CMT state transition occurred"); |
793 OstTrace0( TRACE_NORMAL, DUP2_CMMSECURITYMESSHANDLER_MTCSTATEINFOINDL, "CMmSecurityMessHandler::MtcStateInfoIndL, CMT state transition occurred" ); |
720 OstTrace0( TRACE_NORMAL, DUP2_CMMSECURITYMESSHANDLER_MTCSTATEINFOINDL_TD, "CMmSecurityMessHandler::MtcStateInfoIndL, CMT state transition occurred" ); |
794 if ( MTC_NORMAL == state ) |
721 if ( MTC_NORMAL == state ) |
795 { |
722 { |
796 TFLOGSTRING("TSY: CMmSecurityMessHandler::MtcStateInfoIndL - MTC_NORMAL"); |
723 TFLOGSTRING("TSY: CMmSecurityMessHandler::MtcStateInfoIndL - MTC_NORMAL"); |
797 OstTrace0( TRACE_NORMAL, DUP3_CMMSECURITYMESSHANDLER_MTCSTATEINFOINDL, "CMmSecurityMessHandler::MtcStateInfoIndL, MTC_NORMAL" ); |
724 OstTrace0( TRACE_NORMAL, DUP3_CMMSECURITYMESSHANDLER_MTCSTATEINFOINDL_TD, "CMmSecurityMessHandler::MtcStateInfoIndL, MTC_NORMAL" ); |
798 iMessageRouter->Complete( EMmTsyBootNotifyModemStatusReadyIPC, |
725 iMessageRouter->Complete( EMmTsyBootNotifyModemStatusReadyIPC, |
799 KErrNone ); |
726 KErrNone ); |
800 } |
727 } |
801 //no else |
728 //no else |
802 |
729 |
815 } |
742 } |
816 //2. CMT_STATE_READY ( _AND_ CURRENT_STATE_OLD ) |
743 //2. CMT_STATE_READY ( _AND_ CURRENT_STATE_OLD ) |
817 else if( ( MTC_NOS_READY == action || MTC_READY == action ) ) |
744 else if( ( MTC_NOS_READY == action || MTC_READY == action ) ) |
818 { |
745 { |
819 TFLOGSTRING("TSY: CMmSecurityMessHandler::MtcStateInfoIndL - CMT state already active"); |
746 TFLOGSTRING("TSY: CMmSecurityMessHandler::MtcStateInfoIndL - CMT state already active"); |
820 OstTrace0( TRACE_NORMAL, DUP4_CMMSECURITYMESSHANDLER_MTCSTATEINFOINDL, "CMmSecurityMessHandler::MtcStateInfoIndL, CMT state already active" ); |
747 OstTrace0( TRACE_NORMAL, DUP4_CMMSECURITYMESSHANDLER_MTCSTATEINFOINDL_TD, "CMmSecurityMessHandler::MtcStateInfoIndL, CMT state already active" ); |
821 } |
748 } |
822 //no else //3. CMT_STATE_NOT_READY - no action done in between state transition |
749 //no else //3. CMT_STATE_NOT_READY - no action done in between state transition |
823 } |
750 } |
824 |
751 |
825 // ----------------------------------------------------------------------------- |
752 // ----------------------------------------------------------------------------- |
863 |
790 |
864 //RF IS OFF ( this state is not updated when MTC_NORMAL ) |
791 //RF IS OFF ( this state is not updated when MTC_NORMAL ) |
865 if( MTC_RF_OFF == currentRfState ) |
792 if( MTC_RF_OFF == currentRfState ) |
866 { |
793 { |
867 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MtcRfStatusQueryResp - RF OFF" ); |
794 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MtcRfStatusQueryResp - RF OFF" ); |
868 OstTrace0( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_MTCRFSTATUSQUERYRESP, "CMmSecurityMessHandler::MtcRfStatusQueryResp, RF OFF" ); |
795 OstTrace0( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_MTCRFSTATUSQUERYRESP_TD, "CMmSecurityMessHandler::MtcRfStatusQueryResp, RF OFF" ); |
869 statusInfo = ERfsStateInfoInactive; |
796 statusInfo = ERfsStateInfoInactive; |
870 } |
797 } |
871 TFLOGSTRING2("TSY: OFFLINE MODE IS: %d", statusInfo ); |
798 TFLOGSTRING2("TSY: OFFLINE MODE IS: %d", statusInfo ); |
872 OstTrace1( TRACE_NORMAL, DUP4_CMMSECURITYMESSHANDLER_MTCRFSTATUSQUERYRESP, "CMmSecurityMessHandler::MtcRfStatusQueryResp;statusInfo=%d", statusInfo ); |
799 OstTrace1( TRACE_NORMAL, DUP4_CMMSECURITYMESSHANDLER_MTCRFSTATUSQUERYRESP_TD, "CMmSecurityMessHandler::MtcRfStatusQueryResp;statusInfo=%d", statusInfo ); |
873 |
800 |
874 CMmDataPackage dataPackage; |
801 CMmDataPackage dataPackage; |
875 dataPackage.PackData ( &statusInfo ); |
802 dataPackage.PackData ( &statusInfo ); |
876 |
803 |
877 //inform the upper layer about the new status of the rf |
804 //inform the upper layer about the new status of the rf |
908 // |
835 // |
909 void CMmSecurityMessHandler::MtcStateQueryRespL( |
836 void CMmSecurityMessHandler::MtcStateQueryRespL( |
910 const TIsiReceiveC& aIsiMessage ) |
837 const TIsiReceiveC& aIsiMessage ) |
911 { |
838 { |
912 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MtcStateQueryRespL"); |
839 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MtcStateQueryRespL"); |
913 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_MTCSTATEQUERYRESPL, "CMmSecurityMessHandler::MtcStateQueryRespL" ); |
840 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_MTCSTATEQUERYRESPL_TD, "CMmSecurityMessHandler::MtcStateQueryRespL" ); |
914 |
841 |
915 TUint8 currentState = aIsiMessage.Get8bit(ISI_HEADER_SIZE + MTC_STATE_QUERY_RESP_OFFSET_CURRENT); |
842 TUint8 currentState = aIsiMessage.Get8bit(ISI_HEADER_SIZE + MTC_STATE_QUERY_RESP_OFFSET_CURRENT); |
916 TUint8 nextState = aIsiMessage.Get8bit(ISI_HEADER_SIZE + MTC_STATE_QUERY_RESP_OFFSET_TARGET); |
843 TUint8 nextState = aIsiMessage.Get8bit(ISI_HEADER_SIZE + MTC_STATE_QUERY_RESP_OFFSET_TARGET); |
917 |
844 |
918 TFLOGSTRING3("NTSY: CMmSecurityMessHandler::MtcStateQueryRespL - (current: 0x%02x, next: 0x%02x)",currentState, nextState ); |
845 TFLOGSTRING3("NTSY: CMmSecurityMessHandler::MtcStateQueryRespL - (current: 0x%02x, next: 0x%02x)",currentState, nextState ); |
919 OstTraceExt2( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_MTCSTATEQUERYRESPL, "CMmSecurityMessHandler::MtcStateQueryRespL;currentState=%hhx;nextState=%hhx", currentState, nextState ); |
846 OstTraceExt2( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_MTCSTATEQUERYRESPL_TD, "CMmSecurityMessHandler::MtcStateQueryRespL;currentState=%hhx;nextState=%hhx", currentState, nextState ); |
920 |
847 |
921 //CMT side is ready when state transistion is completed (in all normal cases this should be the case) |
848 //CMT side is ready when state transistion is completed (in all normal cases this should be the case) |
922 |
849 |
923 //1. CMT_STATE_READY _AND_ CURRENT_STATE_NEW |
850 //1. CMT_STATE_READY _AND_ CURRENT_STATE_NEW |
924 if( currentState == nextState && iBootState.iMtcCurrentState != currentState ) |
851 if( currentState == nextState && iBootState.iMtcCurrentState != currentState ) |
925 { |
852 { |
926 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MtcStateQueryRespL - CMT ready." ); |
853 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MtcStateQueryRespL - CMT ready." ); |
927 OstTrace0( TRACE_NORMAL, DUP2_CMMSECURITYMESSHANDLER_MTCSTATEQUERYRESPL, "CMmSecurityMessHandler::MtcStateQueryRespL, CMT ready" ); |
854 OstTrace0( TRACE_NORMAL, DUP2_CMMSECURITYMESSHANDLER_MTCSTATEQUERYRESPL_TD, "CMmSecurityMessHandler::MtcStateQueryRespL, CMT ready" ); |
928 iBootState.iMtcCurrentState = currentState; |
855 iBootState.iMtcCurrentState = currentState; |
929 |
856 |
930 if( MTC_NORMAL == currentState ) |
857 if( MTC_NORMAL == currentState || MTC_RF_INACTIVE == currentState ) |
931 { |
858 { |
932 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MtcStateQueryRespL - EMmTsyBootNotifyModemStatusReadyIPC"); |
859 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MtcStateQueryRespL - EMmTsyBootNotifyModemStatusReadyIPC"); |
933 OstTrace0( TRACE_NORMAL, DUP3_CMMSECURITYMESSHANDLER_MTCSTATEQUERYRESPL, "CMmSecurityMessHandler::MtcStateQueryRespL, EMmTsyBootNotifyModemStatusReadyIPC" ); |
860 OstTrace0( TRACE_NORMAL, DUP3_CMMSECURITYMESSHANDLER_MTCSTATEQUERYRESPL_TD, "CMmSecurityMessHandler::MtcStateQueryRespL, EMmTsyBootNotifyModemStatusReadyIPC" ); |
934 iMessageRouter->Complete( EMmTsyBootNotifyModemStatusReadyIPC, KErrNone ); |
861 iMessageRouter->Complete( EMmTsyBootNotifyModemStatusReadyIPC, KErrNone ); |
935 } |
862 } |
936 //to complete EMmTsyBootGetRFStatusIPC |
863 //to complete EMmTsyBootGetRFStatusIPC |
937 MtcRfStatusQueryReq( KSecurityTransId ); |
864 MtcRfStatusQueryReq( KSecurityTransId ); |
938 } |
865 } |
939 //2. CMT_STATE_NOT_READY - renew state query, if transition is not yet ready |
866 //2. CMT_STATE_NOT_READY - renew state query, if transition is not yet ready |
940 else if ( currentState != nextState ) |
867 else if ( currentState != nextState ) |
941 { |
868 { |
942 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MtcStateQueryRespL - CMT state transition not ready."); |
869 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MtcStateQueryRespL - CMT state transition not ready."); |
943 OstTrace0( TRACE_NORMAL, DUP4_CMMSECURITYMESSHANDLER_MTCSTATEQUERYRESPL, "CMmSecurityMessHandler::MtcStateQueryRespL, CMT state transition not ready" ); |
870 OstTrace0( TRACE_NORMAL, DUP4_CMMSECURITYMESSHANDLER_MTCSTATEQUERYRESPL_TD, "CMmSecurityMessHandler::MtcStateQueryRespL, CMT state transition not ready" ); |
944 MtcStateQueryReq( KSecurityTransId ); |
871 MtcStateQueryReq( KSecurityTransId ); |
945 } |
872 } |
946 //no else //3. CMT_STATE_READY _AND_ CURRENT_STATE_OLD - no action needed if state already active |
873 //no else //3. CMT_STATE_READY _AND_ CURRENT_STATE_OLD - no action needed if state already active |
947 |
874 |
948 if ( nextState == currentState && |
875 if ( nextState == currentState && |
969 ISI_HEADER_SIZE + MCE_MODEM_STATE_IND_OFFSET_STATE ) ); |
896 ISI_HEADER_SIZE + MCE_MODEM_STATE_IND_OFFSET_STATE ) ); |
970 TUint8 action( aIsiMessage.Get8bit( |
897 TUint8 action( aIsiMessage.Get8bit( |
971 ISI_HEADER_SIZE + MCE_MODEM_STATE_IND_OFFSET_ACTION ) ); |
898 ISI_HEADER_SIZE + MCE_MODEM_STATE_IND_OFFSET_ACTION ) ); |
972 |
899 |
973 TFLOGSTRING3("TSY: CMmSecurityMessHandler::MceModemStateInd action: 0x%02x, state: 0x%02x", action, state); |
900 TFLOGSTRING3("TSY: CMmSecurityMessHandler::MceModemStateInd action: 0x%02x, state: 0x%02x", action, state); |
974 OstTraceExt2( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_MCEMODEMSTATEIND, "CMmSecurityMessHandler::MceModemStateInd;state=%hhx;action=%hhx", state, action ); |
901 OstTraceExt2( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_MCEMODEMSTATEIND_TD, "CMmSecurityMessHandler::MceModemStateInd;state=%hhx;action=%hhx", state, action ); |
975 |
902 |
976 // Modem is ready and CMT status has been changed |
903 // Modem is ready and CMT status has been changed |
977 if ( MCE_READY == action && iBootState.iMceCurrentState != state ) |
904 if ( MCE_READY == action && iBootState.iMceCurrentState != state ) |
978 { |
905 { |
979 iBootState.iMceCurrentState = state; |
906 iBootState.iMceCurrentState = state; |
980 |
907 |
981 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MceModemStateInd - CMT state transition occurred - MCE_NORMAL"); |
908 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MceModemStateInd - CMT state transition occurred - MCE_NORMAL"); |
982 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_MCEMODEMSTATEIND, "CMmSecurityMessHandler::MceModemStateInd - CMT state transition occurred - MCE_NORMAL" ); |
909 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_MCEMODEMSTATEIND_TD, "CMmSecurityMessHandler::MceModemStateInd - CMT state transition occurred - MCE_NORMAL" ); |
983 |
910 |
984 iMessageRouter->Complete( |
911 iMessageRouter->Complete( |
985 EMmTsyBootNotifyModemStatusReadyIPC, |
912 EMmTsyBootNotifyModemStatusReadyIPC, |
986 KErrNone ); |
913 KErrNone ); |
987 |
914 |
994 } |
921 } |
995 // Modem is ready but CMT status has not been changed |
922 // Modem is ready but CMT status has not been changed |
996 else if( MCE_READY == action && iBootState.iMceCurrentState == state ) |
923 else if( MCE_READY == action && iBootState.iMceCurrentState == state ) |
997 { |
924 { |
998 TFLOGSTRING("TSY: CMmSecurityMessHandler::MceModemStateInd - CMT state mot changed"); |
925 TFLOGSTRING("TSY: CMmSecurityMessHandler::MceModemStateInd - CMT state mot changed"); |
999 OstTrace0( TRACE_NORMAL, DUP2_CMMSECURITYMESSHANDLER_MCEMODEMSTATEIND, "CMmSecurityMessHandler::MceModemStateInd - CMT state not changed" ); |
926 OstTrace0( TRACE_NORMAL, DUP2_CMMSECURITYMESSHANDLER_MCEMODEMSTATEIND_TD, "CMmSecurityMessHandler::MceModemStateInd - CMT state not changed" ); |
1000 } |
927 } |
1001 // No else, modem state not ready - no action needed |
928 // No else, modem state not ready - no action needed |
1002 } |
929 } |
1003 |
930 |
1004 // ----------------------------------------------------------------------------- |
931 // ----------------------------------------------------------------------------- |
1007 // ----------------------------------------------------------------------------- |
934 // ----------------------------------------------------------------------------- |
1008 // |
935 // |
1009 TInt CMmSecurityMessHandler::MceRfStateQueryReq() const |
936 TInt CMmSecurityMessHandler::MceRfStateQueryReq() const |
1010 { |
937 { |
1011 TFLOGSTRING("TSY: CMmSecurityMessHandler::MceRfStateQueryReq"); |
938 TFLOGSTRING("TSY: CMmSecurityMessHandler::MceRfStateQueryReq"); |
1012 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_MCERFSTATEQUERYREQ, "CMmSecurityMessHandler::MceRfStateQueryReq" ); |
939 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_MCERFSTATEQUERYREQ_TD, "CMmSecurityMessHandler::MceRfStateQueryReq" ); |
1013 |
940 |
1014 // Create MCE_RF_STATE_QUERY_REQ message for querying modem state |
941 // Create MCE_RF_STATE_QUERY_REQ message for querying modem state |
1015 TIsiSend isiMsg( iPhoNetSender->SendBufferDes() ); |
942 TIsiSend isiMsg( iPhoNetSender->SendBufferDes() ); |
1016 isiMsg.Set8bit( ISI_HEADER_OFFSET_RESOURCEID, PN_MODEM_MCE ); |
943 isiMsg.Set8bit( ISI_HEADER_OFFSET_RESOURCEID, PN_MODEM_MCE ); |
1017 isiMsg.Set8bit( ISI_HEADER_OFFSET_TRANSID, KSecurityTransId ); |
944 isiMsg.Set8bit( ISI_HEADER_OFFSET_TRANSID, KSecurityTransId ); |
1044 { |
971 { |
1045 statusInfo = ERfsStateInfoNormal; |
972 statusInfo = ERfsStateInfoNormal; |
1046 } |
973 } |
1047 |
974 |
1048 TFLOGSTRING2("NTSY: CMmSecurityMessHandler::MceRfStateQueryResp: RF State is: %d", statusInfo ); |
975 TFLOGSTRING2("NTSY: CMmSecurityMessHandler::MceRfStateQueryResp: RF State is: %d", statusInfo ); |
1049 OstTrace1( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_MCERFSTATEQUERYRESP, "CMmSecurityMessHandler::MceRfStateQueryResp;statusInfo=%d", statusInfo ); |
976 OstTrace1( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_MCERFSTATEQUERYRESP_TD, "CMmSecurityMessHandler::MceRfStateQueryResp;statusInfo=%d", statusInfo ); |
1050 |
977 |
1051 CMmDataPackage dataPackage; |
978 CMmDataPackage dataPackage; |
1052 dataPackage.PackData ( &statusInfo ); |
979 dataPackage.PackData ( &statusInfo ); |
1053 // Complete RF state |
980 // Complete RF state |
1054 iMessageRouter->Complete( |
981 iMessageRouter->Complete( |
1064 // ----------------------------------------------------------------------------- |
991 // ----------------------------------------------------------------------------- |
1065 // |
992 // |
1066 TInt CMmSecurityMessHandler::MceModemStateQueryReq() const |
993 TInt CMmSecurityMessHandler::MceModemStateQueryReq() const |
1067 { |
994 { |
1068 TFLOGSTRING("TSY: CMmSecurityMessHandler::MceModemStateQueryReq" ); |
995 TFLOGSTRING("TSY: CMmSecurityMessHandler::MceModemStateQueryReq" ); |
1069 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_MCEMODEMSTATEQUERYREQ, "CMmSecurityMessHandler::MceModemStateQueryReq" ); |
996 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_MCEMODEMSTATEQUERYREQ_TD, "CMmSecurityMessHandler::MceModemStateQueryReq" ); |
1070 |
997 |
1071 // Create MCE_MODEM_STATE_QUERY_REQ message for querying modem state |
998 // Create MCE_MODEM_STATE_QUERY_REQ message for querying modem state |
1072 TIsiSend isiMsg( iPhoNetSender->SendBufferDes() ); |
999 TIsiSend isiMsg( iPhoNetSender->SendBufferDes() ); |
1073 isiMsg.Set8bit( ISI_HEADER_OFFSET_RESOURCEID, PN_MODEM_MCE ); |
1000 isiMsg.Set8bit( ISI_HEADER_OFFSET_RESOURCEID, PN_MODEM_MCE ); |
1074 isiMsg.Set8bit( ISI_HEADER_OFFSET_TRANSID, KSecurityTransId ); |
1001 isiMsg.Set8bit( ISI_HEADER_OFFSET_TRANSID, KSecurityTransId ); |
1089 // |
1016 // |
1090 void CMmSecurityMessHandler::MceModemStateQueryResp( |
1017 void CMmSecurityMessHandler::MceModemStateQueryResp( |
1091 const TIsiReceiveC& aIsiMessage ) |
1018 const TIsiReceiveC& aIsiMessage ) |
1092 { |
1019 { |
1093 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MceModemStateQueryResp"); |
1020 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MceModemStateQueryResp"); |
1094 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_MCEMODEMSTATEQUERYRESP, "CMmSecurityMessHandler::MceModemStateQueryResp" ); |
1021 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_MCEMODEMSTATEQUERYRESP_TD, "CMmSecurityMessHandler::MceModemStateQueryResp" ); |
1095 |
1022 |
1096 TUint8 currentState( aIsiMessage.Get8bit( |
1023 TUint8 currentState( aIsiMessage.Get8bit( |
1097 ISI_HEADER_SIZE + MCE_MODEM_STATE_QUERY_RESP_OFFSET_CURRENT ) ); |
1024 ISI_HEADER_SIZE + MCE_MODEM_STATE_QUERY_RESP_OFFSET_CURRENT ) ); |
1098 TUint8 nextState( aIsiMessage.Get8bit( |
1025 TUint8 nextState( aIsiMessage.Get8bit( |
1099 ISI_HEADER_SIZE + MCE_MODEM_STATE_QUERY_RESP_OFFSET_TARGET ) ); |
1026 ISI_HEADER_SIZE + MCE_MODEM_STATE_QUERY_RESP_OFFSET_TARGET ) ); |
1100 |
1027 |
1101 TFLOGSTRING3("NTSY: CMmSecurityMessHandler::MceModemStateQueryResp - (current: 0x%02x, next: 0x%02x)",currentState, nextState ); |
1028 TFLOGSTRING3("NTSY: CMmSecurityMessHandler::MceModemStateQueryResp - (current: 0x%02x, next: 0x%02x)",currentState, nextState ); |
1102 OstTraceExt2( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_MCEMODEMSTATEQUERYRESP, "CMmSecurityMessHandler::MceModemStateQueryResp;currentState=%hhx;nextState=%hhx", currentState, nextState ); |
1029 OstTraceExt2( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_MCEMODEMSTATEQUERYRESP_TD, "CMmSecurityMessHandler::MceModemStateQueryResp;currentState=%hhx;nextState=%hhx", currentState, nextState ); |
1103 |
1030 |
1104 // CMT side is ready when state transistion is completed |
1031 // CMT side is ready when state transistion is completed |
1105 // (in all normal cases this should be the case) |
1032 // (in all normal cases this should be the case) |
1106 |
1033 |
1107 // Modem is ready and CMT status has been changed |
1034 // Modem is ready and CMT status has been changed |
1108 if( currentState == nextState && |
1035 if( currentState == nextState && |
1109 iBootState.iMceCurrentState != currentState ) |
1036 iBootState.iMceCurrentState != currentState ) |
1110 { |
1037 { |
1111 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MceModemStateQueryResp - CMT ready." ); |
1038 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MceModemStateQueryResp - CMT ready." ); |
1112 OstTrace0( TRACE_NORMAL, DUP2_CMMSECURITYMESSHANDLER_MCEMODEMSTATEQUERYRESP, "CMmSecurityMessHandler::MceModemStateQueryResp - CMT ready" ); |
1039 OstTrace0( TRACE_NORMAL, DUP2_CMMSECURITYMESSHANDLER_MCEMODEMSTATEQUERYRESP_TD, "CMmSecurityMessHandler::MceModemStateQueryResp - CMT ready" ); |
1113 |
1040 |
1114 iBootState.iMceCurrentState = currentState; |
1041 iBootState.iMceCurrentState = currentState; |
1115 |
1042 |
1116 if( MCE_NORMAL == currentState ) |
1043 if( MCE_NORMAL == currentState ) |
1117 { |
1044 { |
1118 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MceModemStateQueryResp - EMmTsyBootNotifyModemStatusReadyIPC"); |
1045 TFLOGSTRING("NTSY: CMmSecurityMessHandler::MceModemStateQueryResp - EMmTsyBootNotifyModemStatusReadyIPC"); |
1119 OstTrace0( TRACE_NORMAL, DUP3_CMMSECURITYMESSHANDLER_MCEMODEMSTATEQUERYRESP, "CMmSecurityMessHandler::MceModemStateQueryResp- EMmTsyBootNotifyModemStatusReadyIPC" ); |
1046 OstTrace0( TRACE_NORMAL, DUP3_CMMSECURITYMESSHANDLER_MCEMODEMSTATEQUERYRESP_TD, "CMmSecurityMessHandler::MceModemStateQueryResp- EMmTsyBootNotifyModemStatusReadyIPC" ); |
1120 iMessageRouter->Complete( |
1047 iMessageRouter->Complete( |
1121 EMmTsyBootNotifyModemStatusReadyIPC, |
1048 EMmTsyBootNotifyModemStatusReadyIPC, |
1122 KErrNone ); |
1049 KErrNone ); |
1123 |
1050 |
1124 // Dataport opening must be delayed to here instead of |
1051 // Dataport opening must be delayed to here instead of |
1141 // Breaks a UICC_PIN_IND ISI-message. |
1068 // Breaks a UICC_PIN_IND ISI-message. |
1142 // ----------------------------------------------------------------------------- |
1069 // ----------------------------------------------------------------------------- |
1143 // |
1070 // |
1144 void CMmSecurityMessHandler::UiccPinInd( const TIsiReceiveC& aIsiMessage ) |
1071 void CMmSecurityMessHandler::UiccPinInd( const TIsiReceiveC& aIsiMessage ) |
1145 { |
1072 { |
1146 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_UICCPININD, "CMmSecurityMessHandler::UiccPinInd" ); |
1073 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_UICCPININD_TD, "CMmSecurityMessHandler::UiccPinInd" ); |
1147 TFLOGSTRING("TSY: CMmSecurityMessHandler::UiccPinInd"); |
1074 TFLOGSTRING("TSY: CMmSecurityMessHandler::UiccPinInd"); |
1148 |
1075 |
1149 // Event to be completed |
1076 // Event to be completed |
1150 RMobilePhone::TMobilePhoneSecurityEvent event( RMobilePhone::ENoICCFound ); |
1077 RMobilePhone::TMobilePhoneSecurityEvent event( RMobilePhone::ENoICCFound ); |
1151 |
1078 |
1222 const TUint8 aServiceType, |
1149 const TUint8 aServiceType, |
1223 const RMobilePhone::TMobilePassword& aCode, |
1150 const RMobilePhone::TMobilePassword& aCode, |
1224 const RMobilePhone::TMobilePassword& aUnblockCode ) |
1151 const RMobilePhone::TMobilePassword& aUnblockCode ) |
1225 { |
1152 { |
1226 TFLOGSTRING("TSY: CMmSecurityMessHandler::UiccPinReqVerify"); |
1153 TFLOGSTRING("TSY: CMmSecurityMessHandler::UiccPinReqVerify"); |
1227 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_UICCPINREQ, "CMmSecurityMessHandler::UiccPinReqVerify" ); |
1154 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_UICCPINREQ_TD, "CMmSecurityMessHandler::UiccPinReqVerify" ); |
1228 |
1155 |
1229 TUint8 numOfSubblocks( 1 ); // in case of PIN verify |
1156 TUint8 numOfSubblocks( 1 ); // in case of PIN verify |
1230 TUint8 pinQualifier( UICC_PIN_OLD ); // in case of PIN verify |
1157 TUint8 pinQualifier( UICC_PIN_OLD ); // in case of PIN verify |
1231 TUint messageOffset( ISI_HEADER_SIZE + SIZE_UICC_PIN_REQ ); |
1158 TUint messageOffset( ISI_HEADER_SIZE + SIZE_UICC_PIN_REQ ); |
1232 |
1159 |
1308 // Breaks a UICC_PIN_IND ISI-message. |
1235 // Breaks a UICC_PIN_IND ISI-message. |
1309 // ----------------------------------------------------------------------------- |
1236 // ----------------------------------------------------------------------------- |
1310 // |
1237 // |
1311 void CMmSecurityMessHandler::UiccPinResp( const TIsiReceiveC& aIsiMessage ) |
1238 void CMmSecurityMessHandler::UiccPinResp( const TIsiReceiveC& aIsiMessage ) |
1312 { |
1239 { |
1313 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_UICCPINRESP, "CMmSecurityMessHandler::UiccPinResp" ); |
1240 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_UICCPINRESP_TD, "CMmSecurityMessHandler::UiccPinResp" ); |
1314 TFLOGSTRING("TSY: CMmSecurityMessHandler::UiccPinResp"); |
1241 TFLOGSTRING("TSY: CMmSecurityMessHandler::UiccPinResp"); |
1315 |
1242 |
1316 // Get service type and status |
1243 // Get service type and status |
1317 TUint8 serviceType( aIsiMessage.Get8bit( |
1244 TUint8 serviceType( aIsiMessage.Get8bit( |
1318 ISI_HEADER_SIZE + UICC_PIN_RESP_OFFSET_SERVICETYPE ) ); |
1245 ISI_HEADER_SIZE + UICC_PIN_RESP_OFFSET_SERVICETYPE ) ); |
1350 } |
1278 } |
1351 } |
1279 } |
1352 } |
1280 } |
1353 |
1281 |
1354 // ----------------------------------------------------------------------------- |
1282 // ----------------------------------------------------------------------------- |
|
1283 // CMmSecurityMessHandler::CompleteIfCodeVerified |
|
1284 // Breaks a UICC_PIN_RESP ISI-message. |
|
1285 // ----------------------------------------------------------------------------- |
|
1286 // |
|
1287 void CMmSecurityMessHandler::CompleteIfCodeVerified( const TUint8 aStatus ) |
|
1288 { |
|
1289 TFLOGSTRING("TSY: CMmSecurityMessHandler::CompleteIfCodeVerified"); |
|
1290 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_COMPLETEIFCODEVERIFIED_TD, "CMmSecurityMessHandler::CompleteIfCodeVerified" ); |
|
1291 |
|
1292 RMobilePhone::TMobilePhoneSecurityEvent event( RMobilePhone::ENoICCFound ); |
|
1293 |
|
1294 if ( UICC_STATUS_OK == aStatus ) |
|
1295 { |
|
1296 switch ( iSecurityCode ) |
|
1297 { |
|
1298 case RMobilePhone::ESecurityUniversalPin: |
|
1299 { |
|
1300 event = RMobilePhone::EUniversalPinVerified; |
|
1301 break; |
|
1302 } |
|
1303 case RMobilePhone::ESecurityCodePin1: |
|
1304 { |
|
1305 event = RMobilePhone::EPin1Verified; |
|
1306 break; |
|
1307 } |
|
1308 case RMobilePhone::ESecurityCodePin2: |
|
1309 { |
|
1310 event = RMobilePhone::EPin2Verified; |
|
1311 break; |
|
1312 } |
|
1313 case RMobilePhone::ESecurityUniversalPuk: |
|
1314 { |
|
1315 event = RMobilePhone::EUniversalPukVerified; |
|
1316 break; |
|
1317 } |
|
1318 case RMobilePhone::ESecurityCodePuk1: |
|
1319 { |
|
1320 event = RMobilePhone::EPuk1Verified; |
|
1321 break; |
|
1322 } |
|
1323 case RMobilePhone::ESecurityCodePuk2: |
|
1324 { |
|
1325 event = RMobilePhone::EPuk2Verified; |
|
1326 break; |
|
1327 } |
|
1328 default: |
|
1329 { |
|
1330 OstTrace0( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_COMPLETEIFCODEVERIFIED_TD, "CMmSecurityMessHandler::CompleteIfCodeVerified - Default" ); |
|
1331 TFLOGSTRING("TSY: CMmSecurityMessHandler::CompleteIfCodeVerified - Default!"); |
|
1332 break; |
|
1333 } |
|
1334 |
|
1335 } //end of switch |
|
1336 } |
|
1337 if ( RMobilePhone::ENoICCFound != event ) |
|
1338 { |
|
1339 // Complete notify security event |
|
1340 CMmDataPackage dataPackage; |
|
1341 dataPackage.PackData( &event ); |
|
1342 |
|
1343 iMessageRouter->Complete( |
|
1344 EMobilePhoneNotifySecurityEvent, |
|
1345 &dataPackage, |
|
1346 KErrNone ); |
|
1347 } |
|
1348 } |
|
1349 |
|
1350 // ----------------------------------------------------------------------------- |
1355 // CMmSecurityMessHandler::UiccPinReqStateQuery |
1351 // CMmSecurityMessHandler::UiccPinReqStateQuery |
1356 // Creates and sends UICC_PIN_REQ ISI message. |
1352 // Creates and sends UICC_PIN_REQ ISI message. |
1357 // ----------------------------------------------------------------------------- |
1353 // ----------------------------------------------------------------------------- |
1358 // |
1354 // |
1359 TInt CMmSecurityMessHandler::UiccPinReqStateQuery( |
1355 TInt CMmSecurityMessHandler::UiccPinReqStateQuery( |
1360 const RMobilePhone::TMobilePhoneLock aLock ) |
1356 const RMobilePhone::TMobilePhoneLock aLock ) |
1361 { |
1357 { |
1362 TFLOGSTRING("TSY: CMmSecurityMessHandler::UiccPinReqStateQuery"); |
1358 TFLOGSTRING("TSY: CMmSecurityMessHandler::UiccPinReqStateQuery"); |
1363 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_UICCPINREQSTATEQUERY, "CMmSecurityMessHandler::UiccPinReqStateQuery" ); |
1359 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_UICCPINREQSTATEQUERY_TD, "CMmSecurityMessHandler::UiccPinReqStateQuery" ); |
1364 |
1360 |
1365 TUint8 pinId( 0 ); |
1361 TUint8 pinId( 0 ); |
1366 |
1362 |
1367 if ( RMobilePhone::ELockICC == aLock ) |
1363 if ( RMobilePhone::ELockICC == aLock ) |
1368 { |
1364 { |
1431 RMobilePhone::TMobilePhoneSecurityCode& aType, |
1427 RMobilePhone::TMobilePhoneSecurityCode& aType, |
1432 const RMobilePhone::TMobilePassword& aOldCode, |
1428 const RMobilePhone::TMobilePassword& aOldCode, |
1433 const RMobilePhone::TMobilePassword& aNewCode ) |
1429 const RMobilePhone::TMobilePassword& aNewCode ) |
1434 { |
1430 { |
1435 TFLOGSTRING("TSY: CMmSecurityMessHandler::UiccPinReqChange"); |
1431 TFLOGSTRING("TSY: CMmSecurityMessHandler::UiccPinReqChange"); |
1436 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_UICCPINREQCHANGE, "CMmSecurityMessHandler::UiccPinReqChange" ); |
1432 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_UICCPINREQCHANGE_TD, "CMmSecurityMessHandler::UiccPinReqChange" ); |
1437 |
1433 |
1438 TUint8 pinId( 0 ); |
1434 TUint8 pinId( 0 ); |
1439 if ( RMobilePhone::ESecurityCodePin1 == aType ) |
1435 if ( RMobilePhone::ESecurityCodePin1 == aType ) |
1440 { |
1436 { |
1441 pinId = iMmUiccMessHandler->GetPin1KeyReference(); |
1437 pinId = iMmUiccMessHandler->GetPin1KeyReference(); |
1525 const RMobilePhone::TMobilePhoneLock aLock, |
1521 const RMobilePhone::TMobilePhoneLock aLock, |
1526 const RMobilePhone::TMobilePhoneLockSetting& aSetting, |
1522 const RMobilePhone::TMobilePhoneLockSetting& aSetting, |
1527 const RMobilePhone::TMobilePassword& aCode ) |
1523 const RMobilePhone::TMobilePassword& aCode ) |
1528 { |
1524 { |
1529 TFLOGSTRING("TSY: CMmSecurityMessHandler::UiccPinReqChangeState"); |
1525 TFLOGSTRING("TSY: CMmSecurityMessHandler::UiccPinReqChangeState"); |
1530 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_UICCPINREQCHANGESTATE, "CMmSecurityMessHandler::UiccPinReqChangeState" ); |
1526 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_UICCPINREQCHANGESTATE_TD, "CMmSecurityMessHandler::UiccPinReqChangeState" ); |
1531 |
1527 |
1532 TInt ret( KErrNone ); |
1528 TInt ret( KErrNone ); |
1533 TUint8 pinId( KUniversalPinKeyReference ); |
1529 TUint8 pinId( KUniversalPinKeyReference ); |
1534 TUint8 pinIdToBeSubstituted( KUniversalPinKeyReference ); |
1530 TUint8 pinIdToBeSubstituted( KUniversalPinKeyReference ); |
1535 TUint8 pinIdSubstitution( KUniversalPinKeyReference ); |
1531 TUint8 pinIdSubstitution( KUniversalPinKeyReference ); |
1642 void CMmSecurityMessHandler::HandleUiccPinVerifyResp( |
1638 void CMmSecurityMessHandler::HandleUiccPinVerifyResp( |
1643 const TUint8 aStatus, |
1639 const TUint8 aStatus, |
1644 const TIsiReceiveC& aIsiMessage ) |
1640 const TIsiReceiveC& aIsiMessage ) |
1645 { |
1641 { |
1646 TFLOGSTRING("TSY: CMmSecurityMessHandler::HandleUiccPinVerifyResp"); |
1642 TFLOGSTRING("TSY: CMmSecurityMessHandler::HandleUiccPinVerifyResp"); |
1647 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_HANDLEUICCPINVERIFYRESP, "CMmSecurityMessHandler::HandleUiccPinVerifyResp" ); |
1643 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_HANDLEUICCPINVERIFYRESP_TD, "CMmSecurityMessHandler::HandleUiccPinVerifyResp" ); |
1648 |
1644 |
1649 TInt ret( KErrNone ); |
1645 TInt ret( KErrNone ); |
1650 |
1646 |
1651 if ( UICC_STATUS_OK != aStatus ) |
1647 if ( UICC_STATUS_OK != aStatus ) |
1652 { |
1648 { |
1700 void CMmSecurityMessHandler::HandleUiccPinInfoResp( |
1696 void CMmSecurityMessHandler::HandleUiccPinInfoResp( |
1701 const TUint8 aStatus, |
1697 const TUint8 aStatus, |
1702 const TIsiReceiveC& aIsiMessage ) |
1698 const TIsiReceiveC& aIsiMessage ) |
1703 { |
1699 { |
1704 TFLOGSTRING("TSY: CMmSecurityMessHandler::HandleUiccPinInfoResp"); |
1700 TFLOGSTRING("TSY: CMmSecurityMessHandler::HandleUiccPinInfoResp"); |
1705 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_HANDLEUICCPININFORESP, "CMmSecurityMessHandler::HandleUiccPinInfoResp" ); |
1701 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_HANDLEUICCPININFORESP_TD, "CMmSecurityMessHandler::HandleUiccPinInfoResp" ); |
1706 |
1702 |
1707 TInt ret( KErrNone ); |
1703 TInt ret( KErrNone ); |
1708 CMmDataPackage dataPackage; |
1704 CMmDataPackage dataPackage; |
1709 RMobilePhone::TMobilePhoneLockInfoV1 lockInfo; |
1705 RMobilePhone::TMobilePhoneLockInfoV1 lockInfo; |
1710 lockInfo.iStatus = RMobilePhone::EStatusLockUnknown; |
1706 lockInfo.iStatus = RMobilePhone::EStatusLockUnknown; |
1807 void CMmSecurityMessHandler::HandleUiccPinChangeResp( |
1803 void CMmSecurityMessHandler::HandleUiccPinChangeResp( |
1808 const TUint8 aStatus, |
1804 const TUint8 aStatus, |
1809 const TIsiReceiveC& aIsiMessage ) |
1805 const TIsiReceiveC& aIsiMessage ) |
1810 { |
1806 { |
1811 TFLOGSTRING("TSY: CMmSecurityMessHandler::HandleUiccPinChangeResp"); |
1807 TFLOGSTRING("TSY: CMmSecurityMessHandler::HandleUiccPinChangeResp"); |
1812 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_HANDLEUICCPINCHANGERESP, "CMmSecurityMessHandler::HandleUiccPinChangeResp" ); |
1808 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_HANDLEUICCPINCHANGERESP_TD, "CMmSecurityMessHandler::HandleUiccPinChangeResp" ); |
1813 |
1809 |
1814 TInt ret( KErrNone ); |
1810 TInt ret( KErrNone ); |
1815 if ( UICC_STATUS_OK != aStatus ) |
1811 if ( UICC_STATUS_OK != aStatus ) |
1816 { |
1812 { |
1817 ret = KErrNotSupported; |
1813 ret = KErrNotSupported; |
1869 void CMmSecurityMessHandler::HandleUiccPinStateChangeResp( |
1865 void CMmSecurityMessHandler::HandleUiccPinStateChangeResp( |
1870 const TUint8 aStatus, |
1866 const TUint8 aStatus, |
1871 const TIsiReceiveC& aIsiMessage ) |
1867 const TIsiReceiveC& aIsiMessage ) |
1872 { |
1868 { |
1873 TFLOGSTRING("TSY: CMmSecurityMessHandler::HandleUiccPinStateChangeResp"); |
1869 TFLOGSTRING("TSY: CMmSecurityMessHandler::HandleUiccPinStateChangeResp"); |
1874 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_HANDLEUICCPINSTATECHANGERESP, "CMmSecurityMessHandler::HandleUiccPinStateChangeResp" ); |
1870 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_HANDLEUICCPINSTATECHANGERESP_TD, "CMmSecurityMessHandler::HandleUiccPinStateChangeResp" ); |
1875 |
1871 |
1876 TInt ret( KErrNone ); |
1872 TInt ret( KErrNone ); |
1877 // Status and setting values are not used in CTSY, set to 'unknown' |
1873 // Status and setting values are not used in CTSY, set to 'unknown' |
1878 RMobilePhone::TMobilePhoneLockStatus status( |
1874 RMobilePhone::TMobilePhoneLockStatus status( |
1879 RMobilePhone::EStatusLockUnknown ); |
1875 RMobilePhone::EStatusLockUnknown ); |
1978 // ----------------------------------------------------------------------------- |
1974 // ----------------------------------------------------------------------------- |
1979 // |
1975 // |
1980 void CMmSecurityMessHandler::GetActivePin() |
1976 void CMmSecurityMessHandler::GetActivePin() |
1981 { |
1977 { |
1982 TFLOGSTRING("TSY: CMmSecurityMessHandler::GetActivePin"); |
1978 TFLOGSTRING("TSY: CMmSecurityMessHandler::GetActivePin"); |
1983 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_GETACTIVEPIN, "CMmSecurityMessHandler::GetActivePin" ); |
1979 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_GETACTIVEPIN_TD, "CMmSecurityMessHandler::GetActivePin" ); |
1984 RMobilePhone::TMobilePhoneSecurityCode activePin( |
1980 RMobilePhone::TMobilePhoneSecurityCode activePin( |
1985 iMmUiccMessHandler->GetActivePin()); |
1981 iMmUiccMessHandler->GetActivePin()); |
1986 CMmDataPackage dataPackage; |
1982 CMmDataPackage dataPackage; |
1987 dataPackage.PackData( &activePin ); |
1983 dataPackage.PackData( &activePin ); |
1988 iMessageRouter->Complete( |
1984 iMessageRouter->Complete( |
1997 // ----------------------------------------------------------------------------- |
1993 // ----------------------------------------------------------------------------- |
1998 // |
1994 // |
1999 void CMmSecurityMessHandler::GetActiveUsimApplication() |
1995 void CMmSecurityMessHandler::GetActiveUsimApplication() |
2000 { |
1996 { |
2001 TFLOGSTRING("TSY: CMmSecurityMessHandler::GetActiveUsimApplication"); |
1997 TFLOGSTRING("TSY: CMmSecurityMessHandler::GetActiveUsimApplication"); |
2002 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_GETACTIVEUSIMAPPLICATION, "CMmSecurityMessHandler::GetActiveUsimApplication" ); |
1998 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_GETACTIVEUSIMAPPLICATION_TD, "CMmSecurityMessHandler::GetActiveUsimApplication" ); |
2003 |
1999 |
2004 RMobilePhone::TAID aid( iMmUiccMessHandler->GetAid() ); |
2000 RMobilePhone::TAID aid( iMmUiccMessHandler->GetAid() ); |
2005 CMmDataPackage dataPackage; |
2001 CMmDataPackage dataPackage; |
2006 dataPackage.PackData( &aid ); |
2002 dataPackage.PackData( &aid ); |
2007 iMessageRouter->Complete( |
2003 iMessageRouter->Complete( |
2016 // ----------------------------------------------------------------------------- |
2012 // ----------------------------------------------------------------------------- |
2017 // |
2013 // |
2018 TInt CMmSecurityMessHandler::GetPukCodeReq() |
2014 TInt CMmSecurityMessHandler::GetPukCodeReq() |
2019 { |
2015 { |
2020 TFLOGSTRING("TSY: CMmSecurityMessHandler::GetPukCodeReq"); |
2016 TFLOGSTRING("TSY: CMmSecurityMessHandler::GetPukCodeReq"); |
2021 OstTrace0( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_GETPUKCODEREQ, "CMmSecurityMessHandler::GetPukCodeReq" ); |
2017 OstTrace0( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_GETPUKCODEREQ_TD, "CMmSecurityMessHandler::GetPukCodeReq" ); |
2022 return iPukCodeRequired; |
2018 return iPukCodeRequired; |
2023 } |
2019 } |
2024 |
2020 |
2025 // ----------------------------------------------------------------------------- |
2021 // ----------------------------------------------------------------------------- |
2026 // CMmSecurityMessHandler::SetFdnStateUicc |
2022 // CMmSecurityMessHandler::SetFdnStateUicc |
2028 // ----------------------------------------------------------------------------- |
2024 // ----------------------------------------------------------------------------- |
2029 // |
2025 // |
2030 TInt CMmSecurityMessHandler::ReadEfEst( TUiccTrId aTraId ) |
2026 TInt CMmSecurityMessHandler::ReadEfEst( TUiccTrId aTraId ) |
2031 { |
2027 { |
2032 TFLOGSTRING("TSY: CMmSecurityMessHandler::ReadEfEst"); |
2028 TFLOGSTRING("TSY: CMmSecurityMessHandler::ReadEfEst"); |
2033 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_READEFEST, "CMmSecurityMessHandler::ReadEfEst" ); |
2029 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_READEFEST_TD, "CMmSecurityMessHandler::ReadEfEst" ); |
2034 |
2030 |
2035 // Set parameters for UICC_APPL_CMD_REQ message |
2031 // Set parameters for UICC_APPL_CMD_REQ message |
2036 TUiccReadTransparent params; |
2032 TUiccReadTransparent params; |
2037 params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
2033 params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
2038 params.trId = aTraId; |
2034 params.trId = aTraId; |
2161 } |
2157 } |
2162 else |
2158 else |
2163 { |
2159 { |
2164 // state is already correct, let's just complete the request |
2160 // state is already correct, let's just complete the request |
2165 TFLOGSTRING("TSY: CMmSecurityMessHandler::FdnSetReadEfEstResp: FDN state already correct, let's complete"); |
2161 TFLOGSTRING("TSY: CMmSecurityMessHandler::FdnSetReadEfEstResp: FDN state already correct, let's complete"); |
2166 OstTrace0( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_FDNSETREADEFESTRESP, "CMmSecurityMessHandler::FdnSetReadEfEstResp: FDN state already correct, let's complete" ); |
2162 OstTrace0( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_FDNSETREADEFESTRESP_TD, "CMmSecurityMessHandler::FdnSetReadEfEstResp: FDN state already correct, let's complete" ); |
2167 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, KErrNone ); |
2163 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, KErrNone ); |
2168 } |
2164 } |
2169 } |
2165 } |
2170 else |
2166 else |
2171 { |
2167 { |
2172 TFLOGSTRING("TSY: CMmSecurityMessHandler::FdnSetReadEfEstResp: FDN state not supported in EFust"); |
2168 TFLOGSTRING("TSY: CMmSecurityMessHandler::FdnSetReadEfEstResp: FDN state not supported in EFust"); |
2173 OstTrace0( TRACE_NORMAL, DUP2_CMMSECURITYMESSHANDLER_FDNSETREADEFESTRESP, "CMmSecurityMessHandler::FdnSetReadEfEstResp: FDN state not supported in EFust" ); |
2169 OstTrace0( TRACE_NORMAL, DUP2_CMMSECURITYMESSHANDLER_FDNSETREADEFESTRESP_TD, "CMmSecurityMessHandler::FdnSetReadEfEstResp: FDN state not supported in EFust" ); |
2174 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, KErrNotSupported ); |
2170 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, KErrNotSupported ); |
2175 } |
2171 } |
2176 } |
2172 } |
2177 else |
2173 else |
2178 { |
2174 { |
2179 // error in reading EFest, let's complete the request |
2175 // error in reading EFest, let's complete the request |
2180 TFLOGSTRING2("TSY: CMmSecurityMessHandler::FdnSetReadEfEstResp: reading failed, 0x%x", aStatus); |
2176 TFLOGSTRING2("TSY: CMmSecurityMessHandler::FdnSetReadEfEstResp: reading failed, 0x%x", aStatus); |
2181 OstTrace1( TRACE_NORMAL, DUP3_CMMSECURITYMESSHANDLER_FDNSETREADEFESTRESP, "CMmSecurityMessHandler::FdnSetReadEfEstResp: reading failed, 0x%x", aStatus ); |
2177 OstTrace1( TRACE_NORMAL, DUP3_CMMSECURITYMESSHANDLER_FDNSETREADEFESTRESP_TD, "CMmSecurityMessHandler::FdnSetReadEfEstResp: reading failed, 0x%x", aStatus ); |
2182 |
2178 |
2183 // compete setting of FDN state |
2179 // compete setting of FDN state |
2184 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, KErrGeneral ); |
2180 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, KErrGeneral ); |
2185 } |
2181 } |
2186 } |
2182 } |
2225 } |
2221 } |
2226 else |
2222 else |
2227 { |
2223 { |
2228 // error in reading EFest, let's complete the request |
2224 // error in reading EFest, let's complete the request |
2229 TFLOGSTRING2("TSY: CMmSecurityMessHandler::FdnGetReadEfEstResp: reading failed, 0x%x", aStatus); |
2225 TFLOGSTRING2("TSY: CMmSecurityMessHandler::FdnGetReadEfEstResp: reading failed, 0x%x", aStatus); |
2230 OstTrace1( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_FDNGETREADEFESTRESP, "CMmSecurityMessHandler::FdnGetReadEfEstResp: reading failed, 0x%x", aStatus ); |
2226 OstTrace1( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_FDNGETREADEFESTRESP_TD, "CMmSecurityMessHandler::FdnGetReadEfEstResp: reading failed, 0x%x", aStatus ); |
2231 |
2227 |
2232 fdnSetting = RMobilePhone::EFdnNotSupported; |
2228 fdnSetting = RMobilePhone::EFdnNotSupported; |
2233 CMmDataPackage dataPackage; |
2229 CMmDataPackage dataPackage; |
2234 dataPackage.PackData ( &fdnSetting ); |
2230 dataPackage.PackData ( &fdnSetting ); |
2235 iMessageRouter->Complete( EMobilePhoneGetFdnStatus, &dataPackage, KErrGeneral ); |
2231 iMessageRouter->Complete( EMobilePhoneGetFdnStatus, &dataPackage, KErrGeneral ); |
2243 // ----------------------------------------------------------------------------- |
2239 // ----------------------------------------------------------------------------- |
2244 // |
2240 // |
2245 void CMmSecurityMessHandler::WriteEfEstResp( const TInt aStatus ) |
2241 void CMmSecurityMessHandler::WriteEfEstResp( const TInt aStatus ) |
2246 { |
2242 { |
2247 TFLOGSTRING("TSY: CMmSecurityMessHandler::WriteEfEstResp"); |
2243 TFLOGSTRING("TSY: CMmSecurityMessHandler::WriteEfEstResp"); |
2248 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_WRITEEFESTRESP, "CMmSecurityMessHandler::WriteEfEstResp" ); |
2244 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_WRITEEFESTRESP_TD, "CMmSecurityMessHandler::WriteEfEstResp" ); |
2249 |
2245 |
2250 if( UICC_STATUS_OK == aStatus ) |
2246 if( UICC_STATUS_OK == aStatus ) |
2251 { |
2247 { |
2252 TFLOGSTRING("TSY: CMmSecurityMessHandler::WriteEfEstResp: FDN state set succesfully"); |
2248 TFLOGSTRING("TSY: CMmSecurityMessHandler::WriteEfEstResp: FDN state set succesfully"); |
2253 OstTrace0( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_WRITEEFESTRESP, "CMmSecurityMessHandler::WriteEfEstResp: FDN state set succesfully" ); |
2249 OstTrace0( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_WRITEEFESTRESP_TD, "CMmSecurityMessHandler::WriteEfEstResp: FDN state set succesfully" ); |
2254 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, KErrNone ); |
2250 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, KErrNone ); |
2255 } |
2251 } |
2256 else |
2252 else |
2257 { |
2253 { |
2258 TFLOGSTRING("TSY: CMmSecurityMessHandler::WriteEfEstResp: FDN state set failed"); |
2254 TFLOGSTRING("TSY: CMmSecurityMessHandler::WriteEfEstResp: FDN state set failed"); |
2259 OstTrace0( TRACE_NORMAL, DUP2_CMMSECURITYMESSHANDLER_WRITEEFESTRESP, "CMmSecurityMessHandler::WriteEfEstResp: FDN state set failed" ); |
2255 OstTrace0( TRACE_NORMAL, DUP2_CMMSECURITYMESSHANDLER_WRITEEFESTRESP_TD, "CMmSecurityMessHandler::WriteEfEstResp: FDN state set failed" ); |
2260 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, KErrGeneral ); |
2256 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, KErrGeneral ); |
2261 } |
2257 } |
2262 } |
2258 } |
2263 |
2259 |
2264 // ----------------------------------------------------------------------------- |
2260 // ----------------------------------------------------------------------------- |
2268 // ----------------------------------------------------------------------------- |
2264 // ----------------------------------------------------------------------------- |
2269 // |
2265 // |
2270 TInt CMmSecurityMessHandler::SendFdnStateCommand() |
2266 TInt CMmSecurityMessHandler::SendFdnStateCommand() |
2271 { |
2267 { |
2272 TFLOGSTRING("TSY: CMmSecurityMessHandler::SendFdnStateCommand"); |
2268 TFLOGSTRING("TSY: CMmSecurityMessHandler::SendFdnStateCommand"); |
2273 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_SENDFDNSTATECOMMAND, "CMmSecurityMessHandler::SendFdnStateCommand" ); |
2269 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_SENDFDNSTATECOMMAND_TD, "CMmSecurityMessHandler::SendFdnStateCommand" ); |
2274 |
2270 |
2275 TInt ret( 0 ); |
2271 TInt ret( 0 ); |
2276 TUiccSendApdu params; |
2272 TUiccSendApdu params; |
2277 params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
2273 params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
2278 params.serviceType = UICC_APPL_APDU_SEND; |
2274 params.serviceType = UICC_APPL_APDU_SEND; |
2324 void CMmSecurityMessHandler::FdnStateCommandResp( |
2320 void CMmSecurityMessHandler::FdnStateCommandResp( |
2325 TInt aStatus, |
2321 TInt aStatus, |
2326 const TDesC8& aFileData ) |
2322 const TDesC8& aFileData ) |
2327 { |
2323 { |
2328 TFLOGSTRING("TSY: CMmSecurityMessHandler::SendFdnStateCommand"); |
2324 TFLOGSTRING("TSY: CMmSecurityMessHandler::SendFdnStateCommand"); |
2329 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_FDNSTATECOMMANDRESP, "CMmSecurityMessHandler::FdnStateCommandResp" ); |
2325 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_FDNSTATECOMMANDRESP_TD, "CMmSecurityMessHandler::FdnStateCommandResp" ); |
2330 |
2326 |
2331 if( UICC_STATUS_OK == aStatus ) |
2327 if( UICC_STATUS_OK == aStatus ) |
2332 { |
2328 { |
2333 // get the status word |
2329 // get the status word |
2334 TUint8 sw1( aFileData[aFileData.Length() - KSw1Position] ); |
2330 TUint8 sw1( aFileData[aFileData.Length() - KSw1Position] ); |
2335 TUint8 sw2( aFileData[aFileData.Length() - KSw2Position] ); |
2331 TUint8 sw2( aFileData[aFileData.Length() - KSw2Position] ); |
2336 |
2332 |
2337 TFLOGSTRING3("TSY: CMmSecurityMessHandler::SendFdnStateCommand: sw1: 0x%x, sw2: 0x%x", sw1, sw2); |
2333 TFLOGSTRING3("TSY: CMmSecurityMessHandler::SendFdnStateCommand: sw1: 0x%x, sw2: 0x%x", sw1, sw2); |
2338 OstTraceExt2( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_FDNSTATECOMMANDRESP, "CMmSecurityMessHandler::FdnStateCommandResp: sw1: 0x%x, sw2: 0x%x", sw1, sw2 ); |
2334 OstTraceExt2( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_FDNSTATECOMMANDRESP_TD, "CMmSecurityMessHandler::FdnStateCommandResp: sw1: 0x%x, sw2: 0x%x", sw1, sw2 ); |
2339 |
2335 |
2340 TInt ret( KErrGeneral ); |
2336 TInt ret( KErrGeneral ); |
2341 |
2337 |
2342 if( ( 0x90 == sw1 && 0x00 == sw2 ) || |
2338 if( ( 0x90 == sw1 && 0x00 == sw2 ) || |
2343 ( 0x91 == sw1 ) ) |
2339 ( 0x91 == sw1 ) ) |
2351 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, ret ); |
2347 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, ret ); |
2352 } |
2348 } |
2353 else |
2349 else |
2354 { |
2350 { |
2355 TFLOGSTRING2("TSY: CMmSecurityMessHandler::SendFdnStateCommand, Fdn state set failed: 0x%x", aStatus); |
2351 TFLOGSTRING2("TSY: CMmSecurityMessHandler::SendFdnStateCommand, Fdn state set failed: 0x%x", aStatus); |
2356 OstTrace1( TRACE_NORMAL, DUP2_CMMSECURITYMESSHANDLER_FDNSTATECOMMANDRESP, "CMmSecurityMessHandler::FdnStateCommandResp, Fdn state set failed: 0x%x", aStatus ); |
2352 OstTrace1( TRACE_NORMAL, DUP2_CMMSECURITYMESSHANDLER_FDNSTATECOMMANDRESP_TD, "CMmSecurityMessHandler::FdnStateCommandResp, Fdn state set failed: 0x%x", aStatus ); |
2357 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, KErrGeneral ); |
2353 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, KErrGeneral ); |
2358 } |
2354 } |
2359 } |
2355 } |
2360 |
2356 |
2361 // ----------------------------------------------------------------------------- |
2357 // ----------------------------------------------------------------------------- |
2364 // ----------------------------------------------------------------------------- |
2360 // ----------------------------------------------------------------------------- |
2365 // |
2361 // |
2366 TInt CMmSecurityMessHandler::ReadEfAdnFileInfo( TUiccTrId aTraId ) |
2362 TInt CMmSecurityMessHandler::ReadEfAdnFileInfo( TUiccTrId aTraId ) |
2367 { |
2363 { |
2368 TFLOGSTRING("TSY: CMmSecurityMessHandler::ReadEfAdnFileInfo"); |
2364 TFLOGSTRING("TSY: CMmSecurityMessHandler::ReadEfAdnFileInfo"); |
2369 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_READEFADNFILEINFO, "CMmSecurityMessHandler::ReadEfAdnFileInfo" ); |
2365 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_READEFADNFILEINFO_TD, "CMmSecurityMessHandler::ReadEfAdnFileInfo" ); |
2370 |
2366 |
2371 TUiccApplFileInfo params; |
2367 TUiccApplFileInfo params; |
2372 params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
2368 params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
2373 params.serviceType = UICC_APPL_FILE_INFO; |
2369 params.serviceType = UICC_APPL_FILE_INFO; |
2374 params.fileId = KElemAdnIcc; |
2370 params.fileId = KElemAdnIcc; |
2390 void CMmSecurityMessHandler::FdnSetReadEfAdnFileInfoResp( |
2386 void CMmSecurityMessHandler::FdnSetReadEfAdnFileInfoResp( |
2391 TInt aStatus, |
2387 TInt aStatus, |
2392 const TDesC8& aFileData ) |
2388 const TDesC8& aFileData ) |
2393 { |
2389 { |
2394 TFLOGSTRING("TSY: CMmSecurityMessHandler::FdnSetReadEfAdnFileInfoResp"); |
2390 TFLOGSTRING("TSY: CMmSecurityMessHandler::FdnSetReadEfAdnFileInfoResp"); |
2395 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_FDNSETREADEFADNFILEINFORESP, "CMmSecurityMessHandler::FdnSetReadEfAdnFileInfoResp" ); |
2391 OstTrace0( TRACE_NORMAL, CMMSECURITYMESSHANDLER_FDNSETREADEFADNFILEINFORESP_TD, "CMmSecurityMessHandler::FdnSetReadEfAdnFileInfoResp" ); |
2396 |
2392 |
2397 if( UICC_STATUS_OK == aStatus ) |
2393 if( UICC_STATUS_OK == aStatus ) |
2398 { |
2394 { |
2399 // let's check is ADN and FDN supported in EFest |
2395 // let's check is ADN and FDN supported in EFest |
2400 if( iMmUiccMessHandler->GetServiceStatus( KIccServiceFdn ) && |
2396 if( iMmUiccMessHandler->GetServiceStatus( KIccServiceFdn ) && |
2412 RMobilePhone::EFdnSetOff == iFdnSetting ) ) |
2408 RMobilePhone::EFdnSetOff == iFdnSetting ) ) |
2413 { |
2409 { |
2414 // Current FDN state is already correct, so we can |
2410 // Current FDN state is already correct, so we can |
2415 // complete the request |
2411 // complete the request |
2416 TFLOGSTRING("TSY: CMmSecurityMessHandler::FdnSetReadEfAdnFileInfoResp: FDN state already correct, let's complete"); |
2412 TFLOGSTRING("TSY: CMmSecurityMessHandler::FdnSetReadEfAdnFileInfoResp: FDN state already correct, let's complete"); |
2417 OstTrace0( TRACE_NORMAL, DUP2_CMMSECURITYMESSHANDLER_FDNSETREADEFADNFILEINFORESP, "CMmSecurityMessHandler::FdnSetReadEfAdnFileInfoResp: FDN state already correct, let's complete" ); |
2413 OstTrace0( TRACE_NORMAL, DUP2_CMMSECURITYMESSHANDLER_FDNSETREADEFADNFILEINFORESP_TD, "CMmSecurityMessHandler::FdnSetReadEfAdnFileInfoResp: FDN state already correct, let's complete" ); |
2418 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, KErrNone ); |
2414 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, KErrNone ); |
2419 } |
2415 } |
2420 else |
2416 else |
2421 { |
2417 { |
2422 // Current FDN state is not correct, we need to change it |
2418 // Current FDN state is not correct, we need to change it |
2424 } |
2420 } |
2425 } |
2421 } |
2426 else |
2422 else |
2427 { |
2423 { |
2428 TFLOGSTRING("TSY: CMmSecurityMessHandler::FdnSetReadEfAdnFileInfoResp: FDN or ADN not supported in EFsst"); |
2424 TFLOGSTRING("TSY: CMmSecurityMessHandler::FdnSetReadEfAdnFileInfoResp: FDN or ADN not supported in EFsst"); |
2429 OstTrace0( TRACE_NORMAL, DUP3_CMMSECURITYMESSHANDLER_FDNSETREADEFADNFILEINFORESP, "CMmSecurityMessHandler::FdnSetReadEfAdnFileInfoResp: FDN or ADN not supported in EFsst" ); |
2425 OstTrace0( TRACE_NORMAL, DUP3_CMMSECURITYMESSHANDLER_FDNSETREADEFADNFILEINFORESP_TD, "CMmSecurityMessHandler::FdnSetReadEfAdnFileInfoResp: FDN or ADN not supported in EFsst" ); |
2430 |
2426 |
2431 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, KErrNotSupported ); |
2427 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, KErrNotSupported ); |
2432 } |
2428 } |
2433 } |
2429 } |
2434 else |
2430 else |
2435 { |
2431 { |
2436 TFLOGSTRING2("TSY: CMmSecurityMessHandler::FdnSetReadEfAdnFileInfoResp: reading failed: 0x%x", aStatus); |
2432 TFLOGSTRING2("TSY: CMmSecurityMessHandler::FdnSetReadEfAdnFileInfoResp: reading failed: 0x%x", aStatus); |
2437 OstTrace1( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_FDNSETREADEFADNFILEINFORESP, "CMmSecurityMessHandler::FdnSetReadEfAdnFileInfoResp: reading failed: 0x%x", aStatus ); |
2433 OstTrace1( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_FDNSETREADEFADNFILEINFORESP_TD, "CMmSecurityMessHandler::FdnSetReadEfAdnFileInfoResp: reading failed: 0x%x", aStatus ); |
2438 |
2434 |
2439 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, KErrNotSupported ); |
2435 iMessageRouter->Complete( EMobilePhoneSetFdnSetting, KErrNotSupported ); |
2440 } |
2436 } |
2441 } |
2437 } |
2442 |
2438 |
2481 iMessageRouter->Complete( EMobilePhoneGetFdnStatus, &dataPackage, KErrNone ); |
2477 iMessageRouter->Complete( EMobilePhoneGetFdnStatus, &dataPackage, KErrNone ); |
2482 } |
2478 } |
2483 else |
2479 else |
2484 { |
2480 { |
2485 TFLOGSTRING2("TSY: CMmSecurityMessHandler::FdnGetReadEfAdnFileInfoResp: reading failed: 0x%x", aStatus); |
2481 TFLOGSTRING2("TSY: CMmSecurityMessHandler::FdnGetReadEfAdnFileInfoResp: reading failed: 0x%x", aStatus); |
2486 OstTrace1( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_FDNGETREADEFADNFILEINFORESP, "CMmSecurityMessHandler::FdnGetReadEfAdnFileInfoResp: reading failed: 0x%x", aStatus ); |
2482 OstTrace1( TRACE_NORMAL, DUP1_CMMSECURITYMESSHANDLER_FDNGETREADEFADNFILEINFORESP_TD, "CMmSecurityMessHandler::FdnGetReadEfAdnFileInfoResp: reading failed: 0x%x", aStatus ); |
2487 |
2483 |
2488 fdnSetting = RMobilePhone::EFdnNotSupported; |
2484 fdnSetting = RMobilePhone::EFdnNotSupported; |
2489 CMmDataPackage dataPackage; |
2485 CMmDataPackage dataPackage; |
2490 dataPackage.PackData ( &fdnSetting ); |
2486 dataPackage.PackData ( &fdnSetting ); |
2491 iMessageRouter->Complete( EMobilePhoneGetFdnStatus, &dataPackage, KErrNotSupported ); |
2487 iMessageRouter->Complete( EMobilePhoneGetFdnStatus, &dataPackage, KErrNotSupported ); |