lbs/lbstestutils/inc/ctlbstimerutils.h
author Maciej Seroka <maciejs@symbian.org>
Wed, 28 Apr 2010 14:40:18 +0100
branchSymbian3
changeset 28 9050b340637a
parent 6 c108117318cb
permissions -rw-r--r--
Removed flash tag from Syborg test plan (Added automatically by ats_specialise_drop)

// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of the License "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:
// @file ctlbstimerutils.h
// 
//



/**
 @file
 @internalTechnology
 @test
*/

#ifndef __CT_LBS_TIMER_UTILS_H__
#define __CT_LBS_TIMER_UTILS_H__

#include <e32base.h>

class MT_LbsTimerUtilsObserver
	{
public:
	virtual void HandleTimerL(TInt aTimerId, const TTime& aTargetTime) = 0;
	};


class CT_LbsTimerUtils : public CTimer
	{
public:
	IMPORT_C static CT_LbsTimerUtils* NewL(MT_LbsTimerUtilsObserver* aObserver, TInt aTimerId);
	
	IMPORT_C ~CT_LbsTimerUtils();
	
	IMPORT_C void SetTimer(const TTimeIntervalMicroSeconds32 aPeriod);
	IMPORT_C void SetTimer(const TTime& aUtcTargetTime);

	IMPORT_C void CancelTimer();

protected:
	CT_LbsTimerUtils(MT_LbsTimerUtilsObserver* aObserver, TInt aTimerId);
	void ConstructL();
	
	void RunL();
	
private:
	MT_LbsTimerUtilsObserver* iObserver;
	TInt  iTimerId;
	TTime iTargetTime;
	};

#endif //__CT_LBS_TIMER_UTILS_H__