mmsengine/mmshttptransport/inc/mmsoperationtimer.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     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:  
       
    15 *     This class implements a timer used when waiting for information from WAP GW
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CMMSOPERATIONTIMER_H
       
    22 #define CMMSOPERATIONTIMER_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // MACROS
       
    30 
       
    31 // DATA TYPES
       
    32 
       
    33 // FUNCTION PROTOTYPES
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 class MMmsTransportObserver;
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 /**
       
    41 *   Class implementing timer
       
    42 */
       
    43 NONSHARABLE_CLASS( CMmsOperationTimer ):public CTimer
       
    44     {
       
    45     public:  // Constructors and destructor
       
    46             
       
    47         /**
       
    48         * Two-phased constructor.
       
    49         */
       
    50         static CMmsOperationTimer* NewL();
       
    51         
       
    52         /**
       
    53         * Destructor.
       
    54         */
       
    55         virtual ~CMmsOperationTimer();
       
    56 
       
    57     public: // New functions
       
    58             
       
    59         /**
       
    60         * Start the timer.
       
    61         * @param aRequester Caller object
       
    62         * @param aTimerValue Value for the timer
       
    63         */
       
    64         void Start( MMmsTransportObserver* aRequester, const TInt aTimerValue );
       
    65         
       
    66         /**
       
    67         * Pauses the timer.
       
    68         */
       
    69         void Pause();
       
    70 
       
    71         /**
       
    72         * Continues the timer.
       
    73         */
       
    74         void Continue();
       
    75 
       
    76     public: // Functions from base classes
       
    77 
       
    78     protected:  // New functions
       
    79         
       
    80     protected:  // Functions from base classes
       
    81         
       
    82         /**
       
    83         * Stops the timer.
       
    84         */
       
    85         void DoCancel();
       
    86 
       
    87     private:
       
    88 
       
    89         /**
       
    90         * C++ default constructor.
       
    91         */
       
    92         CMmsOperationTimer();
       
    93 
       
    94         /**
       
    95         * By default Symbian OS constructor is private.
       
    96         */
       
    97         void ConstructL();
       
    98 
       
    99         /**
       
   100         * Active object completion
       
   101         */
       
   102         void RunL();
       
   103       
       
   104         // By default, prohibit copy constructor
       
   105         CMmsOperationTimer( const CMmsOperationTimer& );
       
   106         
       
   107         // Prohibit assignment operator
       
   108         CMmsOperationTimer& operator= ( const CMmsOperationTimer& );
       
   109 
       
   110     public:     // Data
       
   111     
       
   112     protected:  // Data
       
   113 
       
   114     private:    // Data
       
   115                 
       
   116         TTime   iStartTime;
       
   117         TTime   iEndTime;
       
   118         TTime   iCurrentTime;
       
   119         TTimeIntervalMicroSeconds iTimeLeft;
       
   120         TTimeIntervalMicroSeconds iOriginalTimerValue;
       
   121 
       
   122         MMmsTransportObserver* iRequester;
       
   123  
       
   124     public:     // Friend classes
       
   125     protected:  // Friend classes
       
   126     private:    // Friend classes
       
   127 
       
   128     };
       
   129 
       
   130 #endif      // CMMSOPERATIONTIMER_H   
       
   131             
       
   132 // End of File