examples/Bluetooth/BTExample1/src/cardgametimer.cpp

00001 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
00002 // All rights reserved.
00003 // This component and the accompanying materials are made available
00004 // under the terms of "Eclipse Public License v1.0"
00005 // which accompanies this distribution, and is available
00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
00007 //
00008 // Initial Contributors:
00009 // Nokia Corporation - initial contribution.
00010 //
00011 // Contributors:
00012 //
00013 // Description:
00014 //
00015 
00016 #include <e32base.h>
00017 #include "cardgametimer.h"
00018 #include "cardgamebase.h"
00022 CCardGameTimer::CCardGameTimer(CCardGameBase& aParent) 
00023         : CTimer(EPriorityNormal),
00024           iParent(aParent)       
00025         {
00026         CActiveScheduler::Add(this);    
00027         }
00028 
00032 CCardGameTimer* CCardGameTimer::NewL(CCardGameBase& aParent)
00033     {
00034     CCardGameTimer* self = new (ELeave) CCardGameTimer(aParent);
00035     CleanupStack::PushL(self);
00036     self->ConstructL();
00037     CleanupStack::Pop();
00038     return self;
00039     }
00040 
00044 void CCardGameTimer::ConstructL()
00045      {
00046      CTimer::ConstructL();
00047      }
00048 
00052 CCardGameTimer::~CCardGameTimer()
00053         {
00054         Cancel();// Cancel Active Object
00055         }
00056 
00061 void CCardGameTimer::RunL()
00062         {
00063         iParent.TimerComplete();
00064         }
00065         
00072 void CCardGameTimer::StartTimer(TInt aDuration)
00073         {
00074         CTimer::After(aDuration);
00075         }
00076 

Generated on Thu Jan 21 10:32:57 2010 for TB10.1 Example Applications by  doxygen 1.5.3