buildverification/autosmoketest/messaging/Src/TestMessTimer.cpp
branchRCL_3
changeset 10 4ca382093dae
parent 5 6beaa9cf4752
child 11 493058e57c8c
equal deleted inserted replaced
5:6beaa9cf4752 10:4ca382093dae
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // TestMessTimer.h
       
    15 // This contains CTestMessTimer
       
    16 // EPOC includes
       
    17 // 
       
    18 //
       
    19 
       
    20 #include "TestMessTimer.h"
       
    21 #include "TestMessProcessor.h"
       
    22 
       
    23 //
       
    24 // Construction/Destruction
       
    25 //
       
    26 
       
    27 CTestMessTimer* CTestMessTimer::NewL(TTimeIntervalMicroSeconds32 aInterval, CTestMessProcessor& aProcessor)
       
    28 	{
       
    29 	CTestMessTimer*	self=new(ELeave) CTestMessTimer(aInterval, aProcessor);
       
    30 	CleanupStack::PushL(self);
       
    31 	self->ConstructL();
       
    32 	CleanupStack::Pop();
       
    33 	return self;
       
    34 	}
       
    35 
       
    36 CTestMessTimer::CTestMessTimer(TTimeIntervalMicroSeconds32 aInterval, CTestMessProcessor& aProcessor)
       
    37 : CTimer(EPriorityStandard)
       
    38 , iInterval(aInterval)
       
    39 , iProcessor(aProcessor)
       
    40 	{
       
    41 	}
       
    42 
       
    43 void CTestMessTimer::ConstructL()
       
    44 	{
       
    45 	CTimer::ConstructL();
       
    46 	CActiveScheduler::Add(this);
       
    47 	}
       
    48 
       
    49 
       
    50 CTestMessTimer::~CTestMessTimer()
       
    51 	{
       
    52 	}
       
    53 
       
    54 void CTestMessTimer::RunL()
       
    55 	{
       
    56 	iProcessor.DisplayProgress();
       
    57 	IssueRequest();
       
    58 	};
       
    59 
       
    60 void CTestMessTimer::IssueRequest()
       
    61 	{
       
    62 	After(iInterval);
       
    63 	}