os/security/cryptomgmtlibs/securitytestfw/test/testutil/server/testutilserver.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 * testutil - server classes
    16 *
    17 */
    18 
    19 
    20 /**
    21  @file 
    22  @test
    23  @internalComponent
    24 */
    25 
    26 #include <e32base.h>
    27 #include <f32file.h>
    28 #include "testutilssessioncommon.h"
    29 
    30 class CTestUtilServer : public CServer2
    31 	{
    32 public:
    33 	static CServer2* NewLC();
    34 	virtual ~CTestUtilServer();
    35 	void AddSession();
    36 	void DropSession();
    37 	void Send(const TDesC& aMessage);
    38 	inline RFs& FS();
    39 	inline CFileMan& FileMan();
    40 private:
    41 	CTestUtilServer();
    42 	void ConstructL();
    43 	CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
    44 private:
    45 	TInt iSessionCount;
    46 	RFs iFs;
    47 	CFileMan* iFileMan;
    48 	CTestUtilSessionCommon* iTestUtilSessionCommon;
    49 	};
    50 
    51 // CTestUtilServer inlines
    52 inline CTestUtilServer::CTestUtilServer()
    53 	:CServer2(0,ESharableSessions)
    54 	{}
    55 
    56 inline RFs& CTestUtilServer::FS()
    57 	{
    58 	return iFs;
    59 	}
    60 
    61 inline CFileMan& CTestUtilServer::FileMan()
    62 	{
    63 	return *iFileMan;
    64 	}