1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
14 // |
14 // |
15 |
15 |
16 |
16 |
17 |
17 |
18 // INCLUDE FILES |
18 // INCLUDE FILES |
|
19 |
|
20 #include "OstTraceDefinitions.h" |
|
21 #ifdef OST_TRACE_COMPILER_IN_USE |
|
22 #include "CMmWimTsyTraces.h" |
|
23 #endif |
|
24 |
19 #include "CMmWimTsy.h" |
25 #include "CMmWimTsy.h" |
20 #include <ctsy/rmmcustomapi.h> |
26 #include <ctsy/rmmcustomapi.h> |
21 #include <ctsy/tflogger.h> |
|
22 #include <ctsy/pluginapi/cmmdatapackage.h> |
27 #include <ctsy/pluginapi/cmmdatapackage.h> |
23 |
28 |
24 // ======== MEMBER FUNCTIONS ======== |
29 // ======== MEMBER FUNCTIONS ======== |
25 |
30 |
26 CMmWimTsy::CMmWimTsy() |
31 CMmWimTsy::CMmWimTsy() |
501 // |
506 // |
502 void CMmWimTsy::Complete( |
507 void CMmWimTsy::Complete( |
503 TInt aReqHandleType, |
508 TInt aReqHandleType, |
504 TInt aError ) |
509 TInt aError ) |
505 { |
510 { |
506 TFLOGSTRING3( "CustomTSY: CMmWimTsy::Complete.\n\t ReqHandleType:%d \n\t Error:%d\n", aReqHandleType, aError ); |
511 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_COMPLETE_1, "CustomTSY: CMmWimTsy::Complete.\n\t ReqHandleType:%d \n\t Error:%d\n", aReqHandleType, aError ); |
507 iMmCustomTsy->ReqCompleted( iTsyReqHandleStore->ResetTsyReqHandle( |
512 iMmCustomTsy->ReqCompleted( iTsyReqHandleStore->ResetTsyReqHandle( |
508 aReqHandleType ), aError ); |
513 aReqHandleType ), aError ); |
509 } |
514 } |
510 #endif // REQHANDLE_TIMER |
515 #endif // REQHANDLE_TIMER |
511 |
516 |
517 // |
522 // |
518 TInt CMmWimTsy::GetATRL( |
523 TInt CMmWimTsy::GetATRL( |
519 const TTsyReqHandle aTsyReqHandle, |
524 const TTsyReqHandle aTsyReqHandle, |
520 TDes8 *aATR ) |
525 TDes8 *aATR ) |
521 { |
526 { |
522 TFLOGSTRING( "TSY: CMmWimTsy::GetATRL" ); |
527 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_GETATRL_1, "TSY: CMmWimTsy::GetATRL" ); |
523 |
528 |
524 TTsyReqHandle getAtrHandle = iTsyReqHandleStore-> |
529 TTsyReqHandle getAtrHandle = iTsyReqHandleStore-> |
525 GetTsyReqHandle( EWIMRequestTypeGetATR ); |
530 GetTsyReqHandle( EWIMRequestTypeGetATR ); |
526 |
531 |
527 if ( 0 < getAtrHandle ) |
532 if ( 0 < getAtrHandle ) |
528 { |
533 { |
529 // The request is already in processing because of previous request |
534 // The request is already in processing because of previous request |
530 // Complete request with status value informing the client about |
535 // Complete request with status value informing the client about |
531 // the situation. |
536 // the situation. |
532 TFLOGSTRING( "TSY: CMmWimTsy::GetATRL - KErrServerBusy" ); |
537 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_GETATRL_2, "TSY: CMmWimTsy::GetATRL - KErrServerBusy" ); |
533 iMmCustomTsy->ReqCompleted( aTsyReqHandle, KErrServerBusy ); |
538 iMmCustomTsy->ReqCompleted( aTsyReqHandle, KErrServerBusy ); |
534 } |
539 } |
535 else |
540 else |
536 { |
541 { |
537 // save pointer to client for response data |
542 // save pointer to client for response data |
570 // |
575 // |
571 void CMmWimTsy::CompleteGetATR( |
576 void CMmWimTsy::CompleteGetATR( |
572 TPtrC8& aData, |
577 TPtrC8& aData, |
573 TInt aError ) |
578 TInt aError ) |
574 { |
579 { |
575 TFLOGSTRING( "TSY: CMmWimTsy::CompleteGetATR "); |
580 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_COMPLETEGETATR_1, "TSY: CMmWimTsy::CompleteGetATR "); |
576 // reset the reqhandle |
581 // reset the reqhandle |
577 TTsyReqHandle tsyReqHandle = |
582 TTsyReqHandle tsyReqHandle = |
578 iTsyReqHandleStore->ResetTsyReqHandle( EWIMRequestTypeGetATR ); |
583 iTsyReqHandleStore->ResetTsyReqHandle( EWIMRequestTypeGetATR ); |
579 |
584 |
580 // Check the reqHandle |
585 // Check the reqHandle |
604 // (other items were commented in a header). |
609 // (other items were commented in a header). |
605 // --------------------------------------------------------------------------- |
610 // --------------------------------------------------------------------------- |
606 // |
611 // |
607 TInt CMmWimTsy::GetATRCancel() |
612 TInt CMmWimTsy::GetATRCancel() |
608 { |
613 { |
609 TFLOGSTRING( "CMmWimTsy::GetATRCancel" ); |
614 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_GETATRCANCEL_1, "CMmWimTsy::GetATRCancel" ); |
610 // reset the reqhandle |
615 // reset the reqhandle |
611 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
616 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
612 EWIMRequestTypeGetATR ); |
617 EWIMRequestTypeGetATR ); |
613 |
618 |
614 // reset pointer to client data |
619 // reset pointer to client data |
630 // --------------------------------------------------------------------------- |
635 // --------------------------------------------------------------------------- |
631 // |
636 // |
632 TInt CMmWimTsy::SimWarmResetL( |
637 TInt CMmWimTsy::SimWarmResetL( |
633 const TTsyReqHandle aTsyReqHandle ) |
638 const TTsyReqHandle aTsyReqHandle ) |
634 { |
639 { |
635 TFLOGSTRING( "CMmWimTsy::SimWarmResetL"); |
640 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_SIMWARMRESETL_1, "CMmWimTsy::SimWarmResetL"); |
636 TTsyReqHandle simWarmResetHandle = |
641 TTsyReqHandle simWarmResetHandle = |
637 iTsyReqHandleStore->GetTsyReqHandle( EWIMRequestTypeSimWarmReset ); |
642 iTsyReqHandleStore->GetTsyReqHandle( EWIMRequestTypeSimWarmReset ); |
638 |
643 |
639 if ( 0 < simWarmResetHandle ) |
644 if ( 0 < simWarmResetHandle ) |
640 { |
645 { |
641 // The request is already in processing because of previous request |
646 // The request is already in processing because of previous request |
642 // Complete request with status value informing the client about |
647 // Complete request with status value informing the client about |
643 // the situation. |
648 // the situation. |
644 TFLOGSTRING( "TSY: CMmWimTsy::SimWarmResetL - KErrServerBusy" ); |
649 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_SIMWARMRESETL_2, "TSY: CMmWimTsy::SimWarmResetL - KErrServerBusy" ); |
645 iMmCustomTsy->ReqCompleted( aTsyReqHandle, KErrServerBusy ); |
650 iMmCustomTsy->ReqCompleted( aTsyReqHandle, KErrServerBusy ); |
646 } |
651 } |
647 else |
652 else |
648 { |
653 { |
649 TInt ret = iMmCustomTsy->Phone()->MessageManager()->HandleRequestL( |
654 TInt ret = iMmCustomTsy->Phone()->MessageManager()->HandleRequestL( |
676 // --------------------------------------------------------------------------- |
681 // --------------------------------------------------------------------------- |
677 // |
682 // |
678 void CMmWimTsy::CompleteSimWarmReset( |
683 void CMmWimTsy::CompleteSimWarmReset( |
679 TInt aError ) |
684 TInt aError ) |
680 { |
685 { |
681 TFLOGSTRING( "CMmWimTsy::CompleteSimWarmReset" ); |
686 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_COMPLETESIMWARMRESET_1, "CMmWimTsy::CompleteSimWarmReset" ); |
682 |
687 |
683 // reset the reqhandle |
688 // reset the reqhandle |
684 TTsyReqHandle tsyReqHandle = |
689 TTsyReqHandle tsyReqHandle = |
685 iTsyReqHandleStore->ResetTsyReqHandle( EWIMRequestTypeSimWarmReset ); |
690 iTsyReqHandleStore->ResetTsyReqHandle( EWIMRequestTypeSimWarmReset ); |
686 |
691 |
697 // (other items were commented in a header). |
702 // (other items were commented in a header). |
698 // --------------------------------------------------------------------------- |
703 // --------------------------------------------------------------------------- |
699 // |
704 // |
700 TInt CMmWimTsy::SimWarmResetCancel() |
705 TInt CMmWimTsy::SimWarmResetCancel() |
701 { |
706 { |
702 TFLOGSTRING( "TSY: CMmWimTsy::SimWarmResetCancel" ); |
707 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_SIMWARMRESETCANCEL_1, "TSY: CMmWimTsy::SimWarmResetCancel" ); |
703 // reset the reqhandle |
708 // reset the reqhandle |
704 TTsyReqHandle reqHandle = |
709 TTsyReqHandle reqHandle = |
705 iTsyReqHandleStore->ResetTsyReqHandle( EWIMRequestTypeSimWarmReset ); |
710 iTsyReqHandleStore->ResetTsyReqHandle( EWIMRequestTypeSimWarmReset ); |
706 |
711 |
707 if( EWIMTsyReqHandleUnknown != reqHandle ) |
712 if( EWIMTsyReqHandleUnknown != reqHandle ) |
721 // |
726 // |
722 TInt CMmWimTsy::GetSimCardReaderStatusL( |
727 TInt CMmWimTsy::GetSimCardReaderStatusL( |
723 const TTsyReqHandle aTsyReqHandle, |
728 const TTsyReqHandle aTsyReqHandle, |
724 RMmCustomAPI::TSimCardReaderStatus* aSimCardReaderStatus ) |
729 RMmCustomAPI::TSimCardReaderStatus* aSimCardReaderStatus ) |
725 { |
730 { |
726 TFLOGSTRING( "TSY: CMmWimTsy::GetSimCardReaderStatusL" ); |
731 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_GETSIMCARDREADERSTATUSL_1, "TSY: CMmWimTsy::GetSimCardReaderStatusL" ); |
727 TTsyReqHandle getSimCardReaderStatusHandle = |
732 TTsyReqHandle getSimCardReaderStatusHandle = |
728 iTsyReqHandleStore->GetTsyReqHandle( |
733 iTsyReqHandleStore->GetTsyReqHandle( |
729 EWIMRequestTypeGetSimCardReaderStatus ); |
734 EWIMRequestTypeGetSimCardReaderStatus ); |
730 |
735 |
731 if ( 0 < getSimCardReaderStatusHandle ) |
736 if ( 0 < getSimCardReaderStatusHandle ) |
732 { |
737 { |
733 // The request is already in processing because of previous request |
738 // The request is already in processing because of previous request |
734 // Complete request with status value informing the client about |
739 // Complete request with status value informing the client about |
735 // the situation. |
740 // the situation. |
736 TFLOGSTRING( "TSY: CMmWimTsy::GetSimCardReaderStatusL - KErrServerBusy" ); |
741 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_GETSIMCARDREADERSTATUSL_2, "TSY: CMmWimTsy::GetSimCardReaderStatusL - KErrServerBusy" ); |
737 iMmCustomTsy->ReqCompleted( aTsyReqHandle, KErrServerBusy ); |
742 iMmCustomTsy->ReqCompleted( aTsyReqHandle, KErrServerBusy ); |
738 } |
743 } |
739 else |
744 else |
740 { |
745 { |
741 // call DOS, packed parameter: aSimCardReaderStatus |
746 // call DOS, packed parameter: aSimCardReaderStatus |
774 // |
779 // |
775 void CMmWimTsy::CompleteGetSimCardReaderStatus( |
780 void CMmWimTsy::CompleteGetSimCardReaderStatus( |
776 TPtrC8& aData, |
781 TPtrC8& aData, |
777 TInt aError ) |
782 TInt aError ) |
778 { |
783 { |
779 TFLOGSTRING( "CMmWimTsy::CompleteGetSimCardReaderStatus" ); |
784 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_COMPLETEGETSIMCARDREADERSTATUS_1, "CMmWimTsy::CompleteGetSimCardReaderStatus" ); |
780 // reset the reqhandle |
785 // reset the reqhandle |
781 TTsyReqHandle tsyReqHandle = |
786 TTsyReqHandle tsyReqHandle = |
782 iTsyReqHandleStore->ResetTsyReqHandle( |
787 iTsyReqHandleStore->ResetTsyReqHandle( |
783 EWIMRequestTypeGetSimCardReaderStatus ); |
788 EWIMRequestTypeGetSimCardReaderStatus ); |
784 |
789 |
809 // (other items were commented in a header). |
814 // (other items were commented in a header). |
810 // --------------------------------------------------------------------------- |
815 // --------------------------------------------------------------------------- |
811 // |
816 // |
812 TInt CMmWimTsy::GetSimCardReaderStatusCancel() |
817 TInt CMmWimTsy::GetSimCardReaderStatusCancel() |
813 { |
818 { |
814 TFLOGSTRING( "TSY: CMmWimTsy::GetSimCardReaderStatusCancel" ); |
819 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_GETSIMCARDREADERSTATUSCANCEL_1, "TSY: CMmWimTsy::GetSimCardReaderStatusCancel" ); |
815 // reset the reqhandle |
820 // reset the reqhandle |
816 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
821 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
817 EWIMRequestTypeGetSimCardReaderStatus ); |
822 EWIMRequestTypeGetSimCardReaderStatus ); |
818 |
823 |
819 // reset pointer to client data |
824 // reset pointer to client data |
836 // |
841 // |
837 TInt CMmWimTsy::NotifySimCardStatus( |
842 TInt CMmWimTsy::NotifySimCardStatus( |
838 const TTsyReqHandle aTsyReqHandle, |
843 const TTsyReqHandle aTsyReqHandle, |
839 RMmCustomAPI::TSIMCardStatus* aCardStatus ) |
844 RMmCustomAPI::TSIMCardStatus* aCardStatus ) |
840 { |
845 { |
841 TFLOGSTRING( "TSY: CMmWimTsy::NotifySimCardStatus" ); |
846 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_NOTIFYSIMCARDSTATUS_1, "TSY: CMmWimTsy::NotifySimCardStatus" ); |
842 if ( NULL != aCardStatus ) |
847 if ( NULL != aCardStatus ) |
843 { |
848 { |
844 // save pointer to client for response data |
849 // save pointer to client for response data |
845 iNotifiedSimCardStatus = aCardStatus; |
850 iNotifiedSimCardStatus = aCardStatus; |
846 |
851 |
860 // --------------------------------------------------------------------------- |
865 // --------------------------------------------------------------------------- |
861 // |
866 // |
862 void CMmWimTsy::CompleteNotifySimCardStatus( |
867 void CMmWimTsy::CompleteNotifySimCardStatus( |
863 RMmCustomAPI::TSIMCardStatus aCardStatus ) |
868 RMmCustomAPI::TSIMCardStatus aCardStatus ) |
864 { |
869 { |
865 TFLOGSTRING( "CMmWimTsy::CompleteNotifySimCardStatus" ); |
870 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_COMPLETENOTIFYSIMCARDSTATUS_1, "CMmWimTsy::CompleteNotifySimCardStatus" ); |
866 // reset req handle. Returns the deleted req handle |
871 // reset req handle. Returns the deleted req handle |
867 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
872 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
868 EWIMRequestTypeNotifySimCardStatus ); |
873 EWIMRequestTypeNotifySimCardStatus ); |
869 |
874 |
870 // check the handle and complete |
875 // check the handle and complete |
886 // (other items were commented in a header). |
891 // (other items were commented in a header). |
887 // --------------------------------------------------------------------------- |
892 // --------------------------------------------------------------------------- |
888 // |
893 // |
889 TInt CMmWimTsy::NotifySimCardStatusCancel() |
894 TInt CMmWimTsy::NotifySimCardStatusCancel() |
890 { |
895 { |
891 TFLOGSTRING( "TSY: CMmWimTsy::NotifySimCardStatusCancel" ); |
896 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_NOTIFYSIMCARDSTATUSCANCEL_1, "TSY: CMmWimTsy::NotifySimCardStatusCancel" ); |
892 // reset pointer to client data |
897 // reset pointer to client data |
893 iNotifiedSimCardStatus = NULL; |
898 iNotifiedSimCardStatus = NULL; |
894 |
899 |
895 // reset reqhandle |
900 // reset reqhandle |
896 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
901 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
913 // |
918 // |
914 TInt CMmWimTsy::SendAPDUReqV2L( |
919 TInt CMmWimTsy::SendAPDUReqV2L( |
915 const TTsyReqHandle aTsyReqHandle, |
920 const TTsyReqHandle aTsyReqHandle, |
916 RMmCustomAPI::TApduParameters* aApduParameters ) |
921 RMmCustomAPI::TApduParameters* aApduParameters ) |
917 { |
922 { |
918 TFLOGSTRING( "TSY: CMmWimTsy::SendAPDUReqV2L" ); |
923 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_SENDAPDUREQV2L_1, "TSY: CMmWimTsy::SendAPDUReqV2L" ); |
919 TTsyReqHandle sendApduReqV2Handle = |
924 TTsyReqHandle sendApduReqV2Handle = |
920 iTsyReqHandleStore->GetTsyReqHandle( EWIMRequestTypeSendAPDUReqV2 ); |
925 iTsyReqHandleStore->GetTsyReqHandle( EWIMRequestTypeSendAPDUReqV2 ); |
921 TInt ret = KErrNone; |
926 TInt ret = KErrNone; |
922 |
927 |
923 if ( 0 < sendApduReqV2Handle ) |
928 if ( 0 < sendApduReqV2Handle ) |
924 { |
929 { |
925 // The request is already in processing because of previous request |
930 // The request is already in processing because of previous request |
926 // Complete request with status value informing the client about |
931 // Complete request with status value informing the client about |
927 // the situation. |
932 // the situation. |
928 TFLOGSTRING( "TSY: CMmWimTsy::SendAPDUReqV2L - KErrServerBusy" ); |
933 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_SENDAPDUREQV2L_2, "TSY: CMmWimTsy::SendAPDUReqV2L - KErrServerBusy" ); |
929 iMmCustomTsy->ReqCompleted( aTsyReqHandle, KErrServerBusy ); |
934 iMmCustomTsy->ReqCompleted( aTsyReqHandle, KErrServerBusy ); |
930 return ret; |
935 return ret; |
931 } |
936 } |
932 else |
937 else |
933 { |
938 { |
961 // |
966 // |
962 void CMmWimTsy::CompleteSendAPDUReqV2( |
967 void CMmWimTsy::CompleteSendAPDUReqV2( |
963 TPtrC8 &aData, |
968 TPtrC8 &aData, |
964 TInt aError ) |
969 TInt aError ) |
965 { |
970 { |
966 TFLOGSTRING( "TSY: CMmWimTsy::CompleteSendAPDUReqV2" ); |
971 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_COMPLETESENDAPDUREQV2_1, "TSY: CMmWimTsy::CompleteSendAPDUReqV2" ); |
967 // reset the reqhandle |
972 // reset the reqhandle |
968 TTsyReqHandle tsyReqHandle = |
973 TTsyReqHandle tsyReqHandle = |
969 iTsyReqHandleStore->ResetTsyReqHandle( EWIMRequestTypeSendAPDUReqV2 ); |
974 iTsyReqHandleStore->ResetTsyReqHandle( EWIMRequestTypeSendAPDUReqV2 ); |
970 |
975 |
971 // check the handle and complete |
976 // check the handle and complete |
995 // (other items were commented in a header). |
1000 // (other items were commented in a header). |
996 // --------------------------------------------------------------------------- |
1001 // --------------------------------------------------------------------------- |
997 // |
1002 // |
998 TInt CMmWimTsy::SendAPDUReqV2Cancel() |
1003 TInt CMmWimTsy::SendAPDUReqV2Cancel() |
999 { |
1004 { |
1000 TFLOGSTRING( "TSY: CMmWimTsy::SendAPDUReqV2Cancel" ); |
1005 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_SENDAPDUREQV2CANCEL_1, "TSY: CMmWimTsy::SendAPDUReqV2Cancel" ); |
1001 // reset the reqhandle |
1006 // reset the reqhandle |
1002 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
1007 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
1003 EWIMRequestTypeSendAPDUReqV2 ); |
1008 EWIMRequestTypeSendAPDUReqV2 ); |
1004 |
1009 |
1005 // reset return pointer |
1010 // reset return pointer |
1021 // --------------------------------------------------------------------------- |
1026 // --------------------------------------------------------------------------- |
1022 // |
1027 // |
1023 TInt CMmWimTsy::PowerSimOnL( |
1028 TInt CMmWimTsy::PowerSimOnL( |
1024 const TTsyReqHandle aTsyReqHandle ) |
1029 const TTsyReqHandle aTsyReqHandle ) |
1025 { |
1030 { |
1026 TFLOGSTRING( "TSY: CMmWimTsy::PowerSimOnL" ); |
1031 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_POWERSIMONL_1, "TSY: CMmWimTsy::PowerSimOnL" ); |
1027 TTsyReqHandle powerSimOnHandle = |
1032 TTsyReqHandle powerSimOnHandle = |
1028 iTsyReqHandleStore->GetTsyReqHandle( EWIMRequestTypePowerSimOn ); |
1033 iTsyReqHandleStore->GetTsyReqHandle( EWIMRequestTypePowerSimOn ); |
1029 |
1034 |
1030 if ( 0 < powerSimOnHandle ) |
1035 if ( 0 < powerSimOnHandle ) |
1031 { |
1036 { |
1032 // The request is already in processing because of previous request |
1037 // The request is already in processing because of previous request |
1033 // Complete request with status value informing the client about |
1038 // Complete request with status value informing the client about |
1034 // the situation. |
1039 // the situation. |
1035 TFLOGSTRING( "TSY: CMmWimTsy::PowerSimOnL - KErrServerBusy" ); |
1040 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_POWERSIMONL_2, "TSY: CMmWimTsy::PowerSimOnL - KErrServerBusy" ); |
1036 iMmCustomTsy->ReqCompleted( aTsyReqHandle, KErrServerBusy ); |
1041 iMmCustomTsy->ReqCompleted( aTsyReqHandle, KErrServerBusy ); |
1037 } |
1042 } |
1038 else |
1043 else |
1039 { |
1044 { |
1040 TInt ret = iMmCustomTsy->Phone()->MessageManager()->HandleRequestL( |
1045 TInt ret = iMmCustomTsy->Phone()->MessageManager()->HandleRequestL( |
1066 // --------------------------------------------------------------------------- |
1071 // --------------------------------------------------------------------------- |
1067 // |
1072 // |
1068 void CMmWimTsy::CompletePowerSimOn( |
1073 void CMmWimTsy::CompletePowerSimOn( |
1069 TInt aError ) |
1074 TInt aError ) |
1070 { |
1075 { |
1071 TFLOGSTRING( "TSY: CMmWimTsy::CompletePowerSimOn" ); |
1076 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_COMPLETEPOWERSIMON_1, "TSY: CMmWimTsy::CompletePowerSimOn" ); |
1072 // reset the reqhandle |
1077 // reset the reqhandle |
1073 TTsyReqHandle tsyReqHandle = |
1078 TTsyReqHandle tsyReqHandle = |
1074 iTsyReqHandleStore->ResetTsyReqHandle( EWIMRequestTypePowerSimOn ); |
1079 iTsyReqHandleStore->ResetTsyReqHandle( EWIMRequestTypePowerSimOn ); |
1075 |
1080 |
1076 if ( EWIMTsyReqHandleUnknown != tsyReqHandle ) |
1081 if ( EWIMTsyReqHandleUnknown != tsyReqHandle ) |
1086 // (other items were commented in a header). |
1091 // (other items were commented in a header). |
1087 // --------------------------------------------------------------------------- |
1092 // --------------------------------------------------------------------------- |
1088 // |
1093 // |
1089 TInt CMmWimTsy::PowerSimOnCancel() |
1094 TInt CMmWimTsy::PowerSimOnCancel() |
1090 { |
1095 { |
1091 TFLOGSTRING( "TSY: CMmWimTsy::PowerSimOnCancel" ); |
1096 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_POWERSIMONCANCEL_1, "TSY: CMmWimTsy::PowerSimOnCancel" ); |
1092 // reset the reqhandle |
1097 // reset the reqhandle |
1093 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
1098 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
1094 EWIMRequestTypePowerSimOn ); |
1099 EWIMRequestTypePowerSimOn ); |
1095 |
1100 |
1096 if( EWIMTsyReqHandleUnknown != reqHandle ) |
1101 if( EWIMTsyReqHandleUnknown != reqHandle ) |
1109 // --------------------------------------------------------------------------- |
1114 // --------------------------------------------------------------------------- |
1110 // |
1115 // |
1111 TInt CMmWimTsy::PowerSimOffL( |
1116 TInt CMmWimTsy::PowerSimOffL( |
1112 const TTsyReqHandle aTsyReqHandle ) |
1117 const TTsyReqHandle aTsyReqHandle ) |
1113 { |
1118 { |
1114 TFLOGSTRING( "TSY: CMmWimTsy::PowerSimOffL" ); |
1119 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_POWERSIMOFFL_1, "TSY: CMmWimTsy::PowerSimOffL" ); |
1115 TTsyReqHandle powerSimOffHandle = |
1120 TTsyReqHandle powerSimOffHandle = |
1116 iTsyReqHandleStore->GetTsyReqHandle( EWIMRequestTypePowerSimOff ); |
1121 iTsyReqHandleStore->GetTsyReqHandle( EWIMRequestTypePowerSimOff ); |
1117 |
1122 |
1118 if ( 0 < powerSimOffHandle ) |
1123 if ( 0 < powerSimOffHandle ) |
1119 { |
1124 { |
1120 // The request is already in processing because of previous request |
1125 // The request is already in processing because of previous request |
1121 // Complete request with status value informing the client about |
1126 // Complete request with status value informing the client about |
1122 // the situation. |
1127 // the situation. |
1123 TFLOGSTRING( "TSY: CMmWimTsy::PowerSimOffL - KErrServerBusy" ); |
1128 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_POWERSIMOFFL_2, "TSY: CMmWimTsy::PowerSimOffL - KErrServerBusy" ); |
1124 iMmCustomTsy->ReqCompleted( aTsyReqHandle, KErrServerBusy ); |
1129 iMmCustomTsy->ReqCompleted( aTsyReqHandle, KErrServerBusy ); |
1125 } |
1130 } |
1126 else |
1131 else |
1127 { |
1132 { |
1128 TInt ret = iMmCustomTsy->Phone()->MessageManager()->HandleRequestL( |
1133 TInt ret = iMmCustomTsy->Phone()->MessageManager()->HandleRequestL( |
1154 // --------------------------------------------------------------------------- |
1159 // --------------------------------------------------------------------------- |
1155 // |
1160 // |
1156 void CMmWimTsy::CompletePowerSimOff( |
1161 void CMmWimTsy::CompletePowerSimOff( |
1157 TInt aError ) |
1162 TInt aError ) |
1158 { |
1163 { |
1159 TFLOGSTRING( "TSY: CMmWimTsy::CompletePowerSimOff" ); |
1164 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_COMPLETEPOWERSIMOFF_1, "TSY: CMmWimTsy::CompletePowerSimOff" ); |
1160 // reset the reqhandle |
1165 // reset the reqhandle |
1161 TTsyReqHandle tsyReqHandle = |
1166 TTsyReqHandle tsyReqHandle = |
1162 iTsyReqHandleStore->ResetTsyReqHandle( EWIMRequestTypePowerSimOff ); |
1167 iTsyReqHandleStore->ResetTsyReqHandle( EWIMRequestTypePowerSimOff ); |
1163 |
1168 |
1164 if ( EWIMTsyReqHandleUnknown != tsyReqHandle ) |
1169 if ( EWIMTsyReqHandleUnknown != tsyReqHandle ) |
1174 // (other items were commented in a header). |
1179 // (other items were commented in a header). |
1175 // --------------------------------------------------------------------------- |
1180 // --------------------------------------------------------------------------- |
1176 // |
1181 // |
1177 TInt CMmWimTsy::PowerSimOffCancel() |
1182 TInt CMmWimTsy::PowerSimOffCancel() |
1178 { |
1183 { |
1179 TFLOGSTRING( "TSY: CMmWimTsy::PowerSimOffCancel" ); |
1184 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMWIMTSY_POWERSIMOFFCANCEL_1, "TSY: CMmWimTsy::PowerSimOffCancel" ); |
1180 // reset the reqhandle |
1185 // reset the reqhandle |
1181 TTsyReqHandle reqHandle = |
1186 TTsyReqHandle reqHandle = |
1182 iTsyReqHandleStore->ResetTsyReqHandle( EWIMRequestTypePowerSimOff ); |
1187 iTsyReqHandleStore->ResetTsyReqHandle( EWIMRequestTypePowerSimOff ); |
1183 |
1188 |
1184 if( EWIMTsyReqHandleUnknown != reqHandle ) |
1189 if( EWIMTsyReqHandleUnknown != reqHandle ) |