?? timeouttimer.cpp
字號:
/* Copyright (c) 2001, Nokia. All rights reserved */
#include "TimeOutTimer.h"
#include "TimeOutNotifier.h"
#include "Sockets.pan"
CTimeOutTimer* CTimeOutTimer::NewL(const TInt aPriority, MTimeOutNotifier& aTimeOutNotify)
{
CTimeOutTimer* self = CTimeOutTimer::NewLC(aPriority, aTimeOutNotify);
CleanupStack::Pop(self);
return self;
}
CTimeOutTimer* CTimeOutTimer::NewLC(const TInt aPriority, MTimeOutNotifier& aTimeOutNotify)
{
CTimeOutTimer* self = new (ELeave) CTimeOutTimer(aPriority, aTimeOutNotify);
CleanupStack::PushL(self);
self->ConstructL();
return self;
}
CTimeOutTimer::CTimeOutTimer(const TInt aPriority, MTimeOutNotifier& aTimeOutNotify)
: CTimer(aPriority), iNotify(aTimeOutNotify)
{
}
CTimeOutTimer::~CTimeOutTimer()
{
}
void CTimeOutTimer::ConstructL()
{
CTimer::ConstructL();
CActiveScheduler::Add(this);
}
void CTimeOutTimer::RunL()
{
// Timer request has completed, so notify the timer's owner
if (iStatus == KErrNone)
{
iNotify.TimerExpired();
}
else
{
User::Panic(KPanicSockets, ESocketsBadStatus);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -