tcpsockettimer.h
来自「《基于Symbian OS的手机开发与应用实践》这本书的配套源码。」· C头文件 代码 · 共 92 行
H
92 行
/*
* ============================================================================
* Name : CTcpSocketTimer from TcpSocketTimer.h
* Part of : Timer
* Created : 06.03.2006 by ToBeReplacedByAuthor
* Description:
* Declares the timer engine class.
* Version :
* Copyright: ToBeReplacedByCopyright
* ============================================================================
*/
#ifndef __TCPSOCKET_TIMER_H__
#define __TCPSOCKET_TIMER_H__
// INCLUDES
#include <e32base.h> // for CTimer
// FORWARD DECLARATIONS
// CLASS DECLARATIONS
/**
* A simple timer with observer.
*/
class CTcpSocketTimer : 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 CTcpSocketTimer object
* @param aObserver The timer event observer
* @result a pointer to the created instance of CTcpSocketTimer
*/
static CTcpSocketTimer* NewL(MTimerObserver& aObserver);
/**
* Create a CTcpSocketTimer object
* @param aObserver The timer event observer
* @result a pointer to the created instance of CTcpSocketTimer
*/
static CTcpSocketTimer* NewLC(MTimerObserver& aObserver);
/**
* Destroy the object and release all memory objects
*/
~CTcpSocketTimer();
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
*/
CTcpSocketTimer(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 // __TCPSOCKET_TIMER_H__
// End Of File
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?