Nokia N97 SDK
Example Applications Guide

servertimeouttimer.h

00001 /*
00002 * ==============================================================================
00003 *  Name        : servertimeouttimer.h
00004 *  Part of     : Animation example
00005 *  Interface   :
00006 *  Description :
00007 *  Version     :
00008 *
00009 *  Copyright (c) 2004 - 2006 Nokia Corporation.
00010 *  This material, including documentation and any related
00011 *  computer programs, is protected by copyright controlled by
00012 *  Nokia Corporation.
00013 * ==============================================================================
00014 */
00015 
00016 #ifndef __SERVERTIMEOUTTIMER_H__
00017 #define __SERVERTIMEOUTTIMER_H__
00018 
00019 // INCLUDES
00020 #include <e32base.h>
00021 
00022 // FORWARD DECLARATIONS
00023 class MTimeoutNotify;
00024 
00025 
00026 // CLASS DECLARATION
00027 
00028 /**
00029 * CTimeOutTimer
00030 * An instance of CTimeoutTimer is a timer for scheduling animation
00031 */
00032 class CTimeOutTimer : public CTimer
00033     {
00034     public: // Constructors and destructor
00035 
00036         /**
00037         * NewL.
00038         * Two-phased constructor.
00039         * Create a CTimeOutTimer object using two phase construction,
00040         * and return a pointer to the created object.
00041         * @param aPriority the priority to use for the active object
00042         * @param aTimeOutNotify the observer to notify
00043         * @return A pointer to the created instance of CTimeOutTimer.
00044         */
00045         static CTimeOutTimer* NewL( const TInt aPriority, 
00046                                     MTimeoutNotify& aTimeOutNotify );
00047 
00048         /**
00049         * NewLC.
00050         * Two-phased constructor.
00051         * Create a CTimeOutTimer object using two phase construction,
00052         * and return a pointer to the created object.
00053         * @param aPriority the priority to use for the active object
00054         * @param aTimeOutNotify the observer to notify
00055         * @return A pointer to the created instance of CTimeOutTimer.
00056         */
00057         static CTimeOutTimer* NewLC( const TInt aPriority, 
00058                                      MTimeoutNotify& aTimeOutNotify );
00059 
00060         /**
00061         * ~CTimeOutTimer
00062         * Virtual Destructor.
00063         */
00064         virtual ~CTimeOutTimer();
00065 
00066     public: // From CTimer
00067 
00068         /**
00069         * RunL
00070         * Handle the event when the timer expires.
00071         */
00072         void RunL();
00073 
00074     protected: // Constructor
00075 
00076         /**
00077         * CTimeOutTimer
00078         * Perform the first phase of two phase construction.
00079         * @param aPriority the priority to use for the active object
00080         * @param aTimeOutNotify the observer to notify
00081         */
00082         CTimeOutTimer( const TInt aPriority, MTimeoutNotify& aTimeOutNotify );
00083 
00084     protected: // Constructor
00085 
00086         /**
00087         * ConstructL
00088         * Perform the second phase of two phase construction.
00089         */
00090         void ConstructL();
00091 
00092     private: // Data
00093 
00094         /**
00095         * iNotify
00096         * Reference to object implementing the notify interface.
00097         * Called on timeout.
00098         */
00099         MTimeoutNotify& iNotify;
00100     };
00101 
00102 #endif //__SERVERTIMEOUTTIMER_H__
00103 
00104 // End of File

© Nokia 2009

Back to top