phoneapp/phoneuicontrol/src/cphonedtmfwaitchartimer.cpp
changeset 21 92ab7f8d0eab
parent 0 5f000ab63145
child 51 f39ed5e045e0
child 62 5266b1f337bd
equal deleted inserted replaced
4:c84cf270c54f 21:92ab7f8d0eab
    29 // C++ default constructor can NOT contain any code, that
    29 // C++ default constructor can NOT contain any code, that
    30 // might leave.
    30 // might leave.
    31 // -----------------------------------------------------------------------------
    31 // -----------------------------------------------------------------------------
    32 //
    32 //
    33 CPhoneDtmfWaitCharTimer::CPhoneDtmfWaitCharTimer( MPhoneStateMachine* aStateMachine ) :
    33 CPhoneDtmfWaitCharTimer::CPhoneDtmfWaitCharTimer( MPhoneStateMachine* aStateMachine ) :
    34 	iTimer( NULL ),
    34     iTimer( NULL ),
    35 	iStateMachine( aStateMachine )
    35     iStateMachine( aStateMachine )
    36 	{
    36     {
    37 		
    37         
    38 	}
    38     }
    39 
    39 
    40 // Destructor
    40 // Destructor
    41 CPhoneDtmfWaitCharTimer::~CPhoneDtmfWaitCharTimer()
    41 CPhoneDtmfWaitCharTimer::~CPhoneDtmfWaitCharTimer()
    42     {
    42     {
    43     if( iTimer )
    43     if( iTimer )
    44 	    {
    44         {
    45 		if( iTimer->IsActive() )
    45         if( iTimer->IsActive() )
    46 			{
    46             {
    47 			iTimer->CancelTimer();				
    47             iTimer->CancelTimer();              
    48 			}
    48             }
    49 	    }
    49         }
    50 	    delete iTimer;
    50         delete iTimer;
    51     }
    51     }
    52 
    52 
    53 // -----------------------------------------------------------
    53 // -----------------------------------------------------------
    54 // CPhoneDtmfWaitCharTimer::NewL()
    54 // CPhoneDtmfWaitCharTimer::NewL()
    55 // Two-phased constructor
    55 // Two-phased constructor
    84 // ---------------------------------------------------------
    84 // ---------------------------------------------------------
    85 //
    85 //
    86 void CPhoneDtmfWaitCharTimer::HandleTimeOutL()
    86 void CPhoneDtmfWaitCharTimer::HandleTimeOutL()
    87     {
    87     {
    88     __LOGMETHODSTARTEND( EPhoneControl, 
    88     __LOGMETHODSTARTEND( EPhoneControl, 
    89     	"CPhoneDtmfWaitCharTimer::HandleTimeOutL( ) ");
    89         "CPhoneDtmfWaitCharTimer::HandleTimeOutL( ) ");
    90     
    90     
    91     iStateMachine->SendPhoneEngineMessage( 
    91     iStateMachine->SendPhoneEngineMessage( 
    92         MPEPhoneModel::EPEMessageContinueDTMFSending );
    92         MPEPhoneModel::EPEMessageContinueDTMFSending );
    93     }
    93     }
    94 
    94 
    95 // ---------------------------------------------------------
    95 // ---------------------------------------------------------
    96 // CPhoneDtmfWaitCharTimer::ButtonPressedL
    96 // CPhoneDtmfWaitCharTimer::ButtonPressedL
    97 // ---------------------------------------------------------
    97 // ---------------------------------------------------------
    98 //
    98 //
    99 void CPhoneDtmfWaitCharTimer::ButtonPressedL()
    99 void CPhoneDtmfWaitCharTimer::ButtonPressedL()
   100 	{
   100     {
   101 	if( !iTimer )
   101     if( !iTimer )
   102 		{
   102         {
   103 		iTimer = CPhoneTimer::NewL();			
   103         iTimer = CPhoneTimer::NewL();           
   104 		}
   104         }
   105 	else
   105     else
   106 		{
   106         {
   107 		if( iTimer->IsActive() )
   107         if( iTimer->IsActive() )
   108 			{
   108             {
   109 			iTimer->CancelTimer();				
   109             iTimer->CancelTimer();              
   110 			}
   110             }
   111 		}	
   111         }   
   112 	
   112     
   113 	iTimer->After( KDtmfWaitNoteTimeoutValue, this );	
   113     iTimer->After( KDtmfWaitNoteTimeoutValue, this );   
   114 	}
   114     }
   115 
   115 
   116 // End of File
   116 // End of File