os/security/cryptomgmtlibs/securitytestfw/test/testutil/testutilcommon/testutilssessioncommon.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2004-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 and testutilswi
    16 *
    17 */
    18 
    19 
    20 /**
    21  @file 
    22  @test
    23  @internalComponent
    24 */
    25 
    26 #include <e32base.h>
    27 
    28 enum TTestUtilPanic
    29 	{
    30 	EPanicBadDescriptor,
    31 	EPanicIllegalFunction,
    32 	EPanicAlreadyReceiving
    33 	};
    34 
    35 void PanicClient(const RMessagePtr2& aMessage,TTestUtilPanic TTestUtilPanic);
    36 
    37 class CTestUtilSessionCommon : public CBase
    38 	{
    39 public:
    40 	CTestUtilSessionCommon();
    41 	~CTestUtilSessionCommon();
    42 private:
    43 	static HBufC* AllocateInputBufferLC(const RMessage2& aMessage,TInt aParam);
    44 	void Send(const TDesC& aMessage);
    45 	inline TBool ReceivePending() const;
    46 	
    47 	friend class CTestUtilSessionSwi;
    48 	friend class CTestUtilServerSwi;
    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();}
    59