servertimeouttimer.h

来自「Animation Client/Server Symbian 程序.」· C头文件 代码 · 共 105 行

H
105
字号
/*
* ==============================================================================
*  Name        : servertimeouttimer.h
*  Part of     : Animation example
*  Interface   :
*  Description :
*  Version     :
*
*  Copyright (c) 2004 - 2006 Nokia Corporation.
*  This material, including documentation and any related
*  computer programs, is protected by copyright controlled by
*  Nokia Corporation.
* ==============================================================================
*/

#ifndef __SERVERTIMEOUTTIMER_H__
#define __SERVERTIMEOUTTIMER_H__

// INCLUDES
#include <e32base.h>

// FORWARD DECLARATIONS
class MTimeoutNotify;


// CLASS DECLARATION

/**
* CTimeOutTimer
* An instance of CTimeoutTimer is a timer for scheduling animation
*/
class CTimeOutTimer : public CTimer
    {
    public: // Constructors and destructor

        /**
        * NewL.
        * Two-phased constructor.
        * Create a CTimeOutTimer object using two phase construction,
        * and return a pointer to the created object.
        * @param aPriority the priority to use for the active object
        * @param aTimeOutNotify the observer to notify
        * @return A pointer to the created instance of CTimeOutTimer.
        */
        static CTimeOutTimer* NewL( const TInt aPriority, 
                                    MTimeoutNotify& aTimeOutNotify );

        /**
        * NewLC.
        * Two-phased constructor.
        * Create a CTimeOutTimer object using two phase construction,
        * and return a pointer to the created object.
        * @param aPriority the priority to use for the active object
        * @param aTimeOutNotify the observer to notify
        * @return A pointer to the created instance of CTimeOutTimer.
        */
        static CTimeOutTimer* NewLC( const TInt aPriority, 
                                     MTimeoutNotify& aTimeOutNotify );

        /**
        * ~CTimeOutTimer
        * Virtual Destructor.
        */
        virtual ~CTimeOutTimer();

    public: // From CTimer

        /**
        * RunL
        * Handle the event when the timer expires.
        */
        void RunL();

    protected: // Constructor

        /**
        * CTimeOutTimer
        * Perform the first phase of two phase construction.
        * @param aPriority the priority to use for the active object
        * @param aTimeOutNotify the observer to notify
        */
        CTimeOutTimer( const TInt aPriority, MTimeoutNotify& aTimeOutNotify );

    protected: // Constructor

        /**
        * ConstructL
        * Perform the second phase of two phase construction.
        */
        void ConstructL();

    private: // Data

        /**
        * iNotify
        * Reference to object implementing the notify interface.
        * Called on timeout.
        */
        MTimeoutNotify& iNotify;
    };

#endif //__SERVERTIMEOUTTIMER_H__

// End of File

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?