diff -r 000000000000 -r 33413c0669b9 vpnengine/vpnmanager/src/vpnmanagersession.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vpnengine/vpnmanager/src/vpnmanagersession.cpp Thu Dec 17 09:14:51 2009 +0200 @@ -0,0 +1,62 @@ +/* +* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Handles client requests. +* +*/ + + + +#include "vpnmanagerserver.h" +#include "vpnmanagerserverdefs.h" +#include "vpnmanagersession.h" +#include "requestdispatcher.h" +#include + +CVpnManagerSession* CVpnManagerSession::NewL(CVpnManagerServer& aServer, + CRequestDispatcher& aRequestDispatcher) + { + CVpnManagerSession* self = CVpnManagerSession::NewLC(aServer, aRequestDispatcher); + CleanupStack::Pop(self); + return self; + } + +CVpnManagerSession* CVpnManagerSession::NewLC(CVpnManagerServer& aServer, + CRequestDispatcher& aRequestDispatcher) + { + CVpnManagerSession* self = new (ELeave) CVpnManagerSession(aServer, aRequestDispatcher); + CleanupStack::PushL(self) ; + self->ConstructL() ; + return self ; + } + +CVpnManagerSession::CVpnManagerSession(CVpnManagerServer& aServer, + CRequestDispatcher& aRequestDispatcher) + : iServer(aServer), iRequestDispatcher(aRequestDispatcher) + { + } + +void CVpnManagerSession::ConstructL() + { + iServer.IncrementSessions(); + } + +CVpnManagerSession::~CVpnManagerSession() + { + iServer.DecrementSessions(); + } + +void CVpnManagerSession::ServiceL(const RMessage2& aMessage) + { + iRequestDispatcher.ServiceL(aMessage, this); + }