mtptransports/mtpptpiptransport/ptpipcontroller/src/cptpiptimer.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 02 Feb 2010 01:11:40 +0200
changeset 0 d0791faffa3f
child 47 63cf70d3ecd8
permissions -rw-r--r--
Revision: 201003 Kit: 201005

// Copyright (c) 2008-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:
// cptpiptransport.cpp
// 
//

/**
 @internalComponent
*/

#include "cptpiptimer.h"
#include "cptpipcontroller.h"

CPTPIPTimer::CPTPIPTimer(CPTPIPController& aController) : CTimer(CActive::EPriorityStandard)
	{
	iController=&aController;
	}

CPTPIPTimer* CPTPIPTimer::NewLC(CPTPIPController& aController)
	{
	CPTPIPTimer* self=new (ELeave) CPTPIPTimer(aController);
	CleanupStack::PushL(self);
	self->ConstructL();
	return self;
	}

CPTPIPTimer* CPTPIPTimer::NewL(CPTPIPController& aController)
	{
	CPTPIPTimer* self = NewLC(aController);
	CleanupStack::Pop(self);
	return self;
	}

void CPTPIPTimer::ConstructL()
	{
	CTimer::ConstructL();
	CActiveScheduler::Add(this);
	}

void CPTPIPTimer::IssueRequest(TInt aTimerValue)
	{	
	CTimer::After(aTimerValue * KTimerMultiplier);
	}

void CPTPIPTimer::RunL()
	{
 	iController->OnTimeOut();
	}