os/security/cryptomgmtlibs/securitytestfw/test/testutil/server/testutilserver.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 * TestUtil - server implementation
26 #include "testutilserver.h"
27 #include "testutilsession.h"
28 #include "testutilclientserver.h"
30 CServer2* CTestUtilServer::NewLC()
32 CTestUtilServer* self=new(ELeave) CTestUtilServer;
33 CleanupStack::PushL(self);
39 CTestUtilServer::~CTestUtilServer()
43 delete iTestUtilSessionCommon;
46 void CTestUtilServer::ConstructL()
48 StartL(KTestUtilServerName);
49 User::LeaveIfError(iFs.Connect());
51 iFileMan = CFileMan::NewL(iFs);
52 iTestUtilSessionCommon = new (ELeave) CTestUtilSessionCommon();
55 CSession2* CTestUtilServer::NewSessionL(const TVersion&,const RMessage2&) const
57 return new(ELeave) CTestUtilSession();
60 void CTestUtilServer::AddSession()
65 void CTestUtilServer::DropSession()
70 void CTestUtilServer::Send(const TDesC& aMessage)
72 iSessionIter.SetToFirst();
73 while ((iSessionIter++)!=0)
75 iTestUtilSessionCommon->Send(aMessage);