diff -r 000000000000 -r 5a93021fdf25 connectionutilities/ConnectionDialogs/src/ExpiryTimer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectionutilities/ConnectionDialogs/src/ExpiryTimer.cpp Thu Dec 17 08:55:21 2009 +0200 @@ -0,0 +1,61 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implementation of class CExpiryTimer +* +*/ + + +#include "ExpiryTimer.h" + +static const TInt KTimeout = 60000000; +// --------------------------------------------------------------------------- +// NewL. Constructs and returns the class object. +// --------------------------------------------------------------------------- +// +CExpiryTimer* CExpiryTimer::NewL( MExpiryTimerCallback& aCallback ) + { + CExpiryTimer* self = new (ELeave) CExpiryTimer( aCallback ); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(); // self; + return self; + } + +CExpiryTimer::CExpiryTimer( MExpiryTimerCallback& aCallback ) + : CTimer(CActive::EPriorityStandard), + iCallback( aCallback ) + { + CActiveScheduler::Add(this); + } + +void CExpiryTimer::ConstructL() + { + CTimer::ConstructL(); + } + +// --------------------------------------------------------------------------- +// Start. Starts up the timer +// --------------------------------------------------------------------------- +// + +void CExpiryTimer::Start() + { + TTimeIntervalMicroSeconds32 timeout = KTimeout; + After( timeout ); + } + +void CExpiryTimer::RunL() + { + iCallback.HandleTimedOut(); + }