os/security/cryptomgmtlibs/securitytestfw/test/testutil/testutilcommon/testutilssessioncommon.cpp
Update contrib.
2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Implementation of common class for testutil and testutilswi
26 #include "testutilssessioncommon.h"
28 CTestUtilSessionCommon::CTestUtilSessionCommon()
33 CTestUtilSessionCommon::~CTestUtilSessionCommon()
37 void CTestUtilSessionCommon::Send(const TDesC& aMessage)
42 TInt r=iReceiveMsg.Write(0,m);
44 iReceiveMsg.Complete(KErrNone);
46 PanicClient(iReceiveMsg,EPanicBadDescriptor);
50 HBufC* CTestUtilSessionCommon::AllocateInputBufferLC(const RMessage2& aMessage,TInt aParam)
52 TInt srcLen = aMessage.GetDesLength(aParam);
53 HBufC* inputBuffer=HBufC::NewLC(srcLen);
54 TPtr ptr(inputBuffer->Des());
55 TRAPD(err, aMessage.ReadL(aParam, ptr));
58 PanicClient(aMessage, EPanicBadDescriptor);