phoneengine/phonemodel/inc/cpetimer.h
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2002-2004 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:  This file contains the header file of the CPECallData object
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPETIMER_H
       
    20 #define CPETIMER_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <pevirtualengine.h>
       
    25 
       
    26 // CONSTANTS
       
    27 // None
       
    28 
       
    29 // MACROS
       
    30 // None
       
    31 
       
    32 // DATA TYPES
       
    33 // None
       
    34 
       
    35 // FUNCTION PROTOTYPES
       
    36 // None
       
    37 
       
    38 // FORWARD DECLARATIONS
       
    39 // None
       
    40 
       
    41 // CLASS DECLARATION
       
    42 class MPEPhoneModelInternal;
       
    43 
       
    44 /**
       
    45 *  Offers timer service to the phone engine modules 
       
    46 *  
       
    47 *
       
    48 *  @lib PhoneEngineBase.lib
       
    49 *  @since Series60_2.7
       
    50 */
       
    51 NONSHARABLE_CLASS( CPETimer ) : public CActive
       
    52     {
       
    53     public: //Constructors and descructor
       
    54         
       
    55         /**
       
    56         * Two-phased constructor.
       
    57         */
       
    58         static CPETimer* NewL( MPEPhoneModelInternal& aModel );
       
    59 
       
    60         /**
       
    61         * Destructor.
       
    62         */
       
    63         ~CPETimer();
       
    64 
       
    65     public:    //New functions
       
    66         /**
       
    67         * Gets callId
       
    68         * @since Series60_2.7
       
    69         * @param aCallId is origival callId which is going to be redialed
       
    70         */
       
    71         void GetCallId( TInt& aCallId ) const;
       
    72 
       
    73         /**
       
    74         * Resets Timer
       
    75         * @since Series60_2.7
       
    76         */
       
    77         void ResetTimer();
       
    78 
       
    79         /**
       
    80         * Starts Timer
       
    81         * @since Series60_2.7
       
    82         * @param aSenconds includes timer delay
       
    83         * @param aCallId the identification number of the response message
       
    84         * @param aResponseMessage the identification number of the response message
       
    85         * @return possible error code
       
    86         */
       
    87         TInt StartTimer( 
       
    88             const TTimeIntervalMicroSeconds32 aSeconds, 
       
    89             const MEngineMonitor::TPEMessagesFromPhoneEngine aResponseMessage, 
       
    90             const TInt aCallId );
       
    91 
       
    92     protected: // From CActive
       
    93         /**
       
    94         * Cancels asyncronous request(s).
       
    95         * @since Series60_2.7
       
    96         */
       
    97         void DoCancel();
       
    98 
       
    99         /**
       
   100         * Informs object that asyncronous request is ready.
       
   101         * @since Series60_2.7
       
   102         */
       
   103         void RunL();
       
   104 
       
   105     private:
       
   106         
       
   107         /**
       
   108         * C++ default constructor.
       
   109         */
       
   110         CPETimer( MPEPhoneModelInternal& aModel );
       
   111 
       
   112         /**
       
   113         * By default Symbian 2nd phase constructor is private.
       
   114         */
       
   115         void ConstructL();
       
   116 
       
   117     private:    
       
   118         // MPEPhoneModelInternal is used to message sending.
       
   119         MPEPhoneModelInternal& iModel;
       
   120         // RTimer object 
       
   121         RTimer iTimer;
       
   122         // Responce message
       
   123         MEngineMonitor::TPEMessagesFromPhoneEngine iResponseMessage;
       
   124         // The identification number of the call( it is used to rerouting responce message to the right call )
       
   125         TInt iCallId;
       
   126 };
       
   127 
       
   128 #endif // CPETIMER_H
       
   129 
       
   130 // End of File