📄 tcpcockettimer.h
字号:
/*
* ============================================================================
* Name : CTcpCocketTimer from TcpCocketTimer.h
* Part of : Timer
* Created : 06.03.2006 by ToBeReplacedByAuthor
* Description:
* Declares the timer engine class.
* Version :
* Copyright: ToBeReplacedByCopyright
* ============================================================================
*/
#ifndef __TCPCOCKET_TIMER_H__
#define __TCPCOCKET_TIMER_H__
// INCLUDES
#include <e32base.h> // for CTimer
// FORWARD DECLARATIONS
// CLASS DECLARATIONS
/**
* A simple timer with observer.
*/
class CTcpCocketTimer : public CTimer
{
public: // interface
/**
* The object which wants to receive timer event will implements
* this interface
*/
class MTimerObserver
{
public:
/**
* Called when timer request completed
*/
virtual void OnTimerL(TInt aError) = 0;
};
public: // standard construction sequence
/**
* Create a CTcpCocketTimer object
* @param aObserver The timer event observer
* @result a pointer to the created instance of CTcpCocketTimer
*/
static CTcpCocketTimer* NewL(MTimerObserver& aObserver);
/**
* Create a CTcpCocketTimer object
* @param aObserver The timer event observer
* @result a pointer to the created instance of CTcpCocketTimer
*/
static CTcpCocketTimer* NewLC(MTimerObserver& aObserver);
/**
* Destroy the object and release all memory objects
*/
~CTcpCocketTimer();
public: // new functions
void Start(TInt aSecond);
private: // standard construction sequence
/**
* Perform the first phase of two phase construction
* @param aObserver The timer event observer
*/
CTcpCocketTimer(MTimerObserver& aObserver);
/**
* Perform the second phase construction of
*/
void ConstructL();
private: //from CActive
/**
* Used to trigger timer event
*/
void RunL();
private: // member variables
/**
* The timer event observer
*/
MTimerObserver& iObserver;
};
#endif // __TCPCOCKET_TIMER_H__
// End Of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -