phoneapp/phoneuistates/src/cphoneidle.cpp
branchRCL_3
changeset 61 41a7f70b3818
parent 44 3c221667e687
child 62 5266b1f337bd
equal deleted inserted replaced
58:40a3f856b14d 61:41a7f70b3818
    20 #include "cphoneidle.h"
    20 #include "cphoneidle.h"
    21 #include "phonerssbase.h"
    21 #include "phonerssbase.h"
    22 #include "phonelogger.h"
    22 #include "phonelogger.h"
    23 #include "cphonegeneralgsmmessageshandler.h"
    23 #include "cphonegeneralgsmmessageshandler.h"
    24 #include "tphonecmdparamboolean.h"
    24 #include "tphonecmdparamboolean.h"
    25 #include "mphonesecuritymodeobserver.h"
       
    26 #include "mphonestatemachine.h"
       
    27 
    25 
    28 // ================= MEMBER FUNCTIONS =======================
    26 // ================= MEMBER FUNCTIONS =======================
    29 
    27 
    30 // C++ default constructor can NOT contain any code, that
    28 // C++ default constructor can NOT contain any code, that
    31 // might leave.
    29 // might leave.
    93         "CPhoneIdle::HandlePhoneEngineMessageL() ");
    91         "CPhoneIdle::HandlePhoneEngineMessageL() ");
    94     switch ( aMessage )
    92     switch ( aMessage )
    95         {
    93         {
    96         case MEngineMonitor::EPEMessageRemoteHeld:
    94         case MEngineMonitor::EPEMessageRemoteHeld:
    97             CPhoneState::SendGlobalInfoNoteL( 
    95             CPhoneState::SendGlobalInfoNoteL( 
    98                 EPhoneInformationRemotePutOnHoldNote );
    96                 EPhoneInformationRemotePutOnHoldNote, ETrue );
    99             break;
    97             break;
   100         
    98         
   101         case MEngineMonitor::EPEMessageRemoteResumed:
    99         case MEngineMonitor::EPEMessageRemoteResumed:
   102             CPhoneState::SendGlobalInfoNoteL( 
   100             CPhoneState::SendGlobalInfoNoteL( 
   103                 EPhoneInformationConnectedNote );
   101                 EPhoneInformationConnectedNote, ETrue );
   104             break;
   102             break;
   105             
   103             
   106         case MEngineMonitor::EPEMessageAudioOutputChanged:
   104         case MEngineMonitor::EPEMessageAudioOutputChanged:
   107             HandleAudioOutputChangedL();
   105             HandleAudioOutputChangedL();
   108             break;
   106             break;
   109 
   107 
   110         case MEngineMonitor::EPEMessageIssuedSSRequest: // fall through 
   108         case MEngineMonitor::EPEMessageIssuedSSRequest: // fall through 
   111         	// Note that after the sending of SS 
   109             // Note that after the sending of SS 
   112 			// strings the view stays in Dialer.
   110             // strings the view stays in Dialer.
   113             if ( !iOnScreenDialer )  
   111             if ( !iOnScreenDialer )  
   114         		{
   112                 {
   115             	SetupIdleScreenInBackgroundL();
   113                 SetupIdleScreenInBackgroundL();
   116         		}
   114                 }
   117         case MEngineMonitor::EPEMessageIssuingSSRequest: // fall through
   115         case MEngineMonitor::EPEMessageIssuingSSRequest: // fall through
   118         case MEngineMonitor::EPEMessageCallBarred: // fall through
   116         case MEngineMonitor::EPEMessageCallBarred: // fall through
   119         case MEngineMonitor::EPEMessageTempClirActivationUnsuccessful:
   117         case MEngineMonitor::EPEMessageTempClirActivationUnsuccessful:
   120         case MEngineMonitor::EPEMessageIncCallIsForw: // fall through
   118         case MEngineMonitor::EPEMessageIncCallIsForw: // fall through
   121         case MEngineMonitor::EPEMessageIncCallForwToC: // fall through
   119         case MEngineMonitor::EPEMessageIncCallForwToC: // fall through
   122         case MEngineMonitor::EPEMessageOutCallForwToC: // fall through
   120         case MEngineMonitor::EPEMessageOutCallForwToC: // fall through
   123         case MEngineMonitor::EPEMessageForwardUnconditionalModeActive: // fall through
   121         case MEngineMonitor::EPEMessageForwardUnconditionalModeActive: // fall through
   124         case MEngineMonitor::EPEMessageForwardConditionallyModeActive:
   122         case MEngineMonitor::EPEMessageForwardConditionallyModeActive:
   125 			{
   123             {
   126 			CPhoneGeneralGsmMessagesHandler* gsmMsgHandler =
   124             CPhoneGeneralGsmMessagesHandler* gsmMsgHandler =
   127 				CPhoneGeneralGsmMessagesHandler::NewL( *iStateMachine,
   125                 CPhoneGeneralGsmMessagesHandler::NewL( *iStateMachine,
   128 													   *iViewCommandHandle,
   126                                                        *iViewCommandHandle,
   129 													   *this );
   127                                                        *this );
   130 			CleanupStack::PushL( gsmMsgHandler );
   128             CleanupStack::PushL( gsmMsgHandler );
   131 			gsmMsgHandler->HandlePhoneEngineMessageL( aMessage, aCallId );
   129             gsmMsgHandler->HandlePhoneEngineMessageL( aMessage, aCallId );
   132 			CleanupStack::PopAndDestroy( gsmMsgHandler );
   130             CleanupStack::PopAndDestroy( gsmMsgHandler );
   133 			}
   131             }
   134 			break;
   132             break;
   135 		
   133 
   136 		case MEngineMonitor::EPEMessageShowVersion:
       
   137 			{
       
   138 			if ( !iStateMachine->SecurityMode()->IsSecurityMode() )
       
   139 				{
       
   140 				CPhoneGeneralGsmMessagesHandler* gsmMsgHandler =
       
   141 				CPhoneGeneralGsmMessagesHandler::NewL( *iStateMachine,
       
   142 													   *iViewCommandHandle,
       
   143 													   *this );
       
   144 				CleanupStack::PushL( gsmMsgHandler );
       
   145 				gsmMsgHandler->HandlePhoneEngineMessageL( aMessage, aCallId );
       
   146 				CleanupStack::PopAndDestroy( gsmMsgHandler );
       
   147 				}
       
   148 			}
       
   149 			break;
       
   150 		
       
   151         default:
   134         default:
   152             CPhoneStateIdle::HandlePhoneEngineMessageL( 
   135             CPhoneStateIdle::HandlePhoneEngineMessageL( 
   153                 aMessage, aCallId );
   136                 aMessage, aCallId );
   154             break;
   137             break;
   155         }
   138         }
   156 
       
   157 #ifndef __SYNCML_DM
       
   158       switch ( aMessage )
       
   159         {
       
   160         case MEngineMonitor::EPEMessageShowVersion:
       
   161             if ( !iOnScreenDialer )
       
   162                 {
       
   163                 HandleNumberEntryClearedL();
       
   164                 }
       
   165             break;
       
   166         default:    
       
   167             break;
       
   168         }
       
   169 #endif        
       
   170     }
   139     }
   171 
   140 
   172 // -----------------------------------------------------------
   141 // -----------------------------------------------------------
   173 // CPhoneIdle::HandleErrorL
   142 // CPhoneIdle::HandleErrorL
   174 // -----------------------------------------------------------
   143 // -----------------------------------------------------------
   175 //
   144 //
   176 EXPORT_C void CPhoneIdle::HandleErrorL( const TPEErrorInfo& aErrorInfo )
   145 EXPORT_C void CPhoneIdle::HandleErrorL( const TPEErrorInfo& aErrorInfo )
   177     {
   146     {
   178     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneIdle::HandleErrorL() ");
   147     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneIdle::HandleErrorL() ");
   179     
   148     
   180     TPhoneCmdParamBoolean blockingDialogStatus;
   149     CPhoneState::HandleErrorL( aErrorInfo );
   181     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetBlockingDialogStatus, 
       
   182         &blockingDialogStatus );
       
   183 
       
   184     if( blockingDialogStatus.Boolean() )
       
   185         {
       
   186         blockingDialogStatus.SetBoolean( EFalse );
       
   187         iViewCommandHandle->ExecuteCommandL( EPhoneViewSetBlockingDialogStatus, 
       
   188             &blockingDialogStatus );
       
   189         }
       
   190     
       
   191     CPhoneStateIdle::HandleErrorL( aErrorInfo );
       
   192     }
   150     }
   193 
   151 
   194 // End of File
   152 // End of File