wvuing/IMPSAlwaysOnlinePlugin/src/CPEngAOPluginTimer.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 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 class implements the waiting for next login retry feature
       
    15 *				 for the Always Online Plugin
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __CPENGAOPLUGINTIMER_H
       
    21 #define __CPENGAOPLUGINTIMER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class MPEngAOWaitObserver;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 *  The CPEngAOPluginTimer class handles the waiting functionality for the
       
    33 *  Always Online plugin.
       
    34 *
       
    35 *  @lib PEngAOPlugin.dll
       
    36 *  @since 2.1
       
    37 */
       
    38 class CPEngAOPluginTimer : public CTimer
       
    39     {
       
    40     public:  // Constructors and destructor
       
    41 
       
    42         /**
       
    43         * Two-phased constructor.
       
    44         */
       
    45         static CPEngAOPluginTimer* NewL();
       
    46 
       
    47         /**
       
    48         * Destructor.
       
    49         */
       
    50         virtual ~CPEngAOPluginTimer();
       
    51 
       
    52     protected:  // Functions from CTimer
       
    53 
       
    54         /**
       
    55         * @see CTimer
       
    56         */
       
    57         void RunL();
       
    58 
       
    59         /**
       
    60         * @see CTimer
       
    61         */
       
    62         TInt RunError( TInt aError );
       
    63 
       
    64     public: // new methods
       
    65 
       
    66         /**
       
    67         * Sets the observer to which the notify about the timer events is
       
    68         * given.
       
    69         * @param aObserver The observer
       
    70         */
       
    71         void SetObserver( MPEngAOWaitObserver* aObserver );
       
    72 
       
    73         /**
       
    74          * This method is implemented to enable debugging in the call. It only
       
    75          * calls the CTimer::At method.
       
    76          * @param aTime Time when to complete the request
       
    77          */
       
    78         void At( const TTime& aTime );
       
    79 
       
    80     private:
       
    81 
       
    82         /**
       
    83         * C++ default constructor.
       
    84         */
       
    85         CPEngAOPluginTimer();
       
    86 
       
    87         /**
       
    88         * By default Symbian 2nd phase constructor is private.
       
    89         */
       
    90         void ConstructL();
       
    91 
       
    92     private:    // Data
       
    93 
       
    94         /// A pointer to the observer, not owned
       
    95         MPEngAOWaitObserver* iObserver;
       
    96 
       
    97         /// Reserved pointer for future extension
       
    98         TAny* iReserved;
       
    99 
       
   100         /// Used for resetting timer when time has set during
       
   101         /// timer active state
       
   102         TTime iTimerStarted;
       
   103         TTime iExpectedLaunchTime;
       
   104     };
       
   105 
       
   106 #endif      // __CPENGAOPLUGINTIMER_H
       
   107 
       
   108 // End of File