phoneapp/phoneuicontrol/inc/cphonedtmfwaitchartimer.h
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *     Class for implementing DTMF wait character timer.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPHONEDTMFWAITCHARTIMER_H
       
    21 #define CPHONEDTMFWAITCHARTIMER_H
       
    22 
       
    23 // INCLUDES
       
    24 #include "cphonetimer.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class MPhoneStateMachine;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 class CPhoneDtmfWaitCharTimer : public CBase,
       
    32                                 protected MPhoneTimer
       
    33     {
       
    34     public:  
       
    35 
       
    36         /**
       
    37         * Destructor.
       
    38         */
       
    39         virtual ~CPhoneDtmfWaitCharTimer();
       
    40         
       
    41         /**
       
    42         * This function is called after timeout.
       
    43         */
       
    44         void HandleTimeOutL();
       
    45 
       
    46         /**
       
    47         * Two-phased constructor.
       
    48         * @param aStateMachine - pointer to our state machine.
       
    49         */
       
    50         static CPhoneDtmfWaitCharTimer* NewL( MPhoneStateMachine* aStateMachine );
       
    51         
       
    52         /**
       
    53         * This method should be called when DTMF wait note is
       
    54         * displayed and CBA is pressed for transmitting the rest
       
    55         * of the remaining DTMF string.
       
    56         * Calling this method triggers our internal timer so that
       
    57         * we get enough run time at the view's end to get our
       
    58         * method calls end properly. Otherwise we will fall into
       
    59         * recursive calls with multiple wait characters in a DTMF
       
    60         * string and that causes telephony application to crash.
       
    61         *
       
    62         * This is a dirty hack I know. If you come up with a better
       
    63         * solution you are more than welcome to change this.
       
    64         * To test this works make a single call and send 'www456ppp'
       
    65         * DTMF string. If it doesn't crash in the target HW it works :)
       
    66         */
       
    67         void ButtonPressedL();
       
    68         
       
    69 
       
    70     private:
       
    71 
       
    72         /**
       
    73         * By default EPOC constructor is private.
       
    74         */
       
    75         void ConstructL();
       
    76 
       
    77         /**
       
    78         * C++ default constructor.
       
    79         * @param aStateMachine - pointer to our state machine.
       
    80         */
       
    81         CPhoneDtmfWaitCharTimer( MPhoneStateMachine* aStateMachine );
       
    82                         
       
    83         
       
    84     private:
       
    85     
       
    86         /**
       
    87         * Our internal timer
       
    88         */
       
    89         CPhoneTimer* iTimer;
       
    90         
       
    91         /**
       
    92         * Pointer to the state machine for sending
       
    93         * EPEMessageContinueDTMFSending message.
       
    94         */
       
    95         MPhoneStateMachine* iStateMachine;
       
    96                 
       
    97     };
       
    98     
       
    99 #endif // CPHONEDTMFWAITCHARTIMER_H
       
   100 
       
   101 // End of File