os/security/cryptomgmtlibs/securitytestfw/test/testutil/testutilcommon/testutilssessioncommon.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/cryptomgmtlibs/securitytestfw/test/testutil/testutilcommon/testutilssessioncommon.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,59 @@
1.4 +/*
1.5 +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +* Common class for the testutil and testutilswi
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +/**
1.24 + @file
1.25 + @test
1.26 + @internalComponent
1.27 +*/
1.28 +
1.29 +#include <e32base.h>
1.30 +
1.31 +enum TTestUtilPanic
1.32 + {
1.33 + EPanicBadDescriptor,
1.34 + EPanicIllegalFunction,
1.35 + EPanicAlreadyReceiving
1.36 + };
1.37 +
1.38 +void PanicClient(const RMessagePtr2& aMessage,TTestUtilPanic TTestUtilPanic);
1.39 +
1.40 +class CTestUtilSessionCommon : public CBase
1.41 + {
1.42 +public:
1.43 + CTestUtilSessionCommon();
1.44 + ~CTestUtilSessionCommon();
1.45 +private:
1.46 + static HBufC* AllocateInputBufferLC(const RMessage2& aMessage,TInt aParam);
1.47 + void Send(const TDesC& aMessage);
1.48 + inline TBool ReceivePending() const;
1.49 +
1.50 + friend class CTestUtilSessionSwi;
1.51 + friend class CTestUtilServerSwi;
1.52 + friend class CTestUtilSession;
1.53 + friend class CTestUtilServer;
1.54 + friend class CTestFileDetector;
1.55 +private:
1.56 + RMessagePtr2 iReceiveMsg;
1.57 + };
1.58 +
1.59 +// CTestUtilSession inlines
1.60 +inline TBool CTestUtilSessionCommon::ReceivePending() const
1.61 + {return !iReceiveMsg.IsNull();}
1.62 +