vpnengine/vpnmanager/src/vpnmanagersession.cpp
changeset 0 33413c0669b9
child 2 ef893827b4d1
equal deleted inserted replaced
-1:000000000000 0:33413c0669b9
       
     1 /*
       
     2 * Copyright (c) 2003 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 "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: Handles client requests.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include "vpnmanagerserver.h"
       
    21 #include "vpnmanagerserverdefs.h"
       
    22 #include "vpnmanagersession.h"
       
    23 #include "requestdispatcher.h"
       
    24 #include <e32svr.h>
       
    25 
       
    26 CVpnManagerSession* CVpnManagerSession::NewL(CVpnManagerServer& aServer,
       
    27                                              CRequestDispatcher& aRequestDispatcher)
       
    28     {
       
    29     CVpnManagerSession* self = CVpnManagerSession::NewLC(aServer, aRequestDispatcher);
       
    30     CleanupStack::Pop(self);
       
    31     return self;
       
    32     }
       
    33 
       
    34 CVpnManagerSession* CVpnManagerSession::NewLC(CVpnManagerServer& aServer,
       
    35                                               CRequestDispatcher& aRequestDispatcher)
       
    36     {
       
    37     CVpnManagerSession* self = new (ELeave) CVpnManagerSession(aServer, aRequestDispatcher);
       
    38     CleanupStack::PushL(self) ;
       
    39     self->ConstructL() ;
       
    40     return self ;
       
    41     }
       
    42 
       
    43 CVpnManagerSession::CVpnManagerSession(CVpnManagerServer& aServer,
       
    44                                        CRequestDispatcher& aRequestDispatcher)
       
    45     : iServer(aServer), iRequestDispatcher(aRequestDispatcher)
       
    46     {
       
    47     }
       
    48 
       
    49 void CVpnManagerSession::ConstructL()
       
    50     {
       
    51     iServer.IncrementSessions();
       
    52     }
       
    53 
       
    54 CVpnManagerSession::~CVpnManagerSession()
       
    55     {
       
    56     iServer.DecrementSessions();
       
    57     }
       
    58 
       
    59 void CVpnManagerSession::ServiceL(const RMessage2& aMessage)
       
    60     {
       
    61     iRequestDispatcher.ServiceL(aMessage, this);
       
    62     }