📄 timeouttimer.cpp
字号:
/*
* ==============================================================================
* Name : TimeOutTimer.cpp
* Part of : SocketEngine
* 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.
* ==============================================================================
*/
// INCLUDES
#include "TimeOutTimer.h"
#include "TimeOutNotify.h"
// -----------------------------------------------------------------------------
// CTimeOutTimer::NewL
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CTimeOutTimer* CTimeOutTimer::NewL(
MTimeOutNotify& aTimeOutNotify )
{
CTimeOutTimer* self = new( ELeave ) CTimeOutTimer( aTimeOutNotify );
CleanupStack::PushL( self );
self->ConstructL();
CleanupStack::Pop();
return self;
}
// -----------------------------------------------------------------------------
// CTimeOutTimer::CTimeOutTimer
// Constructor.
// -----------------------------------------------------------------------------
//
CTimeOutTimer::CTimeOutTimer( MTimeOutNotify& aTimeOutNotify )
: CTimer( EPriorityStandard ), iNotifier( aTimeOutNotify )
{
}
// -----------------------------------------------------------------------------
// CTimeOutTimer::ConstructL
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CTimeOutTimer::ConstructL()
{
CTimer::ConstructL();
CActiveScheduler::Add( this );
}
// -----------------------------------------------------------------------------
// CTimeOutTimer::~CTimeOutTimer
// Destructor.
// -----------------------------------------------------------------------------
//
CTimeOutTimer::~CTimeOutTimer()
{
Cancel();
}
// -----------------------------------------------------------------------------
// CTimeOutTimer::RunL
// To inform the notifier that xx seconds is up.
// -----------------------------------------------------------------------------
//
void CTimeOutTimer::RunL()
{
// Tell the notifier that times out.
iNotifier.TimerExpired();
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -