telephonyprotocols/pdplayer/umts/test/te_spud/src/InputRequestListener.cpp
changeset 38 b6a16c6baaa3
parent 0 3553901f7fa8
--- a/telephonyprotocols/pdplayer/umts/test/te_spud/src/InputRequestListener.cpp	Thu May 13 20:13:31 2010 +0100
+++ b/telephonyprotocols/pdplayer/umts/test/te_spud/src/InputRequestListener.cpp	Fri May 14 13:52:48 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-2010 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"
@@ -31,11 +31,11 @@
 #include "cpdpfsmfactory.h"
 #include "DefaultContextParameters.h"
 
-CInputRequestListener* CInputRequestListener::NewL(TBool aUseTestPdpInterface, TInt aUmtsRelease)
+CInputRequestListener* CInputRequestListener::NewL(TBool aUseTestPdpInterface, TThreadId aParentThreadId, TInt aUmtsRelease)
 	{
 	CInputRequestListener *me = new(ELeave) CInputRequestListener(aUseTestPdpInterface, aUmtsRelease);
 	CleanupStack::PushL(me);
-	me->ConstructL();
+	me->ConstructL(aParentThreadId);
 	CleanupStack::Pop(me);
 	return me;
 	}
@@ -62,8 +62,10 @@
     iUmtsRelease = aUmtsRelease;
 	}
 	
-void CInputRequestListener::ConstructL()
-	{ }
+void CInputRequestListener::ConstructL(TThreadId aParentThreadId)
+	{
+    User::LeaveIfError(iParentThread.Open(aParentThreadId));
+	}
 
 CInputRequestListener::~CInputRequestListener()
 	{
@@ -90,6 +92,7 @@
 		}
 
 	iEventHandlers.ResetAndDestroy();
+	iParentThread.Close();
 	}
 	
 void CInputRequestListener::DoCancel()