os/security/cryptomgmtlibs/securitycommonutils/test/source/scstestserver/scstestserver.cpp
Update contrib.
2 * Copyright (c) 2007-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 * Implements CScsTestServer. See class and function definitions
16 * for more information.
25 #include "scstestserver.h"
26 #include "scstestclient.h"
29 CScsTestServer* CScsTestServer::NewLC()
31 Factory function allocates a new, initialized instance of CScsTestServer.
33 @return New instance of CScsTestServer, which is owned by the
34 caller and left on the cleanup stack. On return, the
35 server has been started.
38 CScsTestServer* self = new(ELeave) CScsTestServer();
39 CleanupStack::PushL(self);
41 User::LeaveIfError(fs.Connect());
43 TInt r = fs.Att(KDisableScsTestServerTimeout(), attr);
50 self->ConstructL(ScsTestImpl::KShutdownPeriodUs);
55 CScsTestServer::CScsTestServer()
57 This private constructor prevents direct instantiation.
59 : CScsServer(ScsTestImpl::Version())
64 void CScsTestServer::ConstructL(TInt aShutdownPeriodUs)
66 Secondary initialization initializes the base class and
70 CScsServer::ConstructL(aShutdownPeriodUs);
71 StartL(ScsTestImpl::KServerName);
74 CScsTestServer::~CScsTestServer()
76 This empty constructor provides a single point of definition.
82 CScsSession* CScsTestServer::DoNewSessionL(const RMessage2& aMessage)
84 Implement CSessionCountServer by allocating a new instance of CScsSession.
86 @param aMessage Connect message. Not used.
87 @return New, initialized instance of CScsTestSession.
88 This object will be destroyed by the framework
89 when the session is closed.
94 return CScsTestSession::NewL(*this);