cryptomgmtlibs/securitytestfw/test/testutil/testutilcommon/testutilssessioncommon.h
changeset 0 2c201484c85f
child 8 35751d3474b7
equal deleted inserted replaced
-1:000000000000 0:2c201484c85f
       
     1 /*
       
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 * Common class for the testutil 
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 /**
       
    23  @file 
       
    24  @test
       
    25  @internalComponent
       
    26 */
       
    27 
       
    28 #include <e32base.h>
       
    29 
       
    30 enum TTestUtilPanic
       
    31 	{
       
    32 	EPanicBadDescriptor,
       
    33 	EPanicIllegalFunction,
       
    34 	EPanicAlreadyReceiving
       
    35 	};
       
    36 
       
    37 void PanicClient(const RMessagePtr2& aMessage,TTestUtilPanic TTestUtilPanic);
       
    38 
       
    39 class CTestUtilSessionCommon : public CBase
       
    40 	{
       
    41 public:
       
    42 	CTestUtilSessionCommon();
       
    43 	~CTestUtilSessionCommon();
       
    44 private:
       
    45 	static HBufC* AllocateInputBufferLC(const RMessage2& aMessage,TInt aParam);
       
    46 	void Send(const TDesC& aMessage);
       
    47 	inline TBool ReceivePending() const;
       
    48 	
       
    49 	friend class CTestUtilSession;
       
    50 	friend class CTestUtilServer;
       
    51 	friend class CTestFileDetector;
       
    52 private:
       
    53 	RMessagePtr2 iReceiveMsg;
       
    54 	};
       
    55 
       
    56 // CTestUtilSession inlines
       
    57 inline TBool CTestUtilSessionCommon::ReceivePending() const
       
    58 	{return !iReceiveMsg.IsNull();}