linklayerprotocols/pppnif/SPPP/PPPLINK.CPP
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include "PPPLCP.H"
       
    17 #include "PPPBASE.H"
       
    18 #include "PPPHDLC.H"
       
    19 #include "PppUmts.h"
       
    20 
       
    21 //
       
    22 // PPP Link Protocols Base
       
    23 //
       
    24 
       
    25 CPppLinkBase::CPppLinkBase(CPppLcp* aLcp)
       
    26 	: iPppLcp(aLcp)
       
    27 	{
       
    28 	}
       
    29 
       
    30 CPppLinkBase::~CPppLinkBase()
       
    31 	{
       
    32 	}
       
    33 
       
    34 CPppLinkBase* CPppLinkBase::PppCreateLinkL(CPppLcp* aLcp, const TDesC& aNifName)
       
    35 	{
       
    36 	//Instantiate relevant next layer
       
    37 	CPppLinkBase* link=NULL;
       
    38 
       
    39 	if(aNifName.Length() == 0)
       
    40 		{
       
    41 		link = new (ELeave) CPppHdlcLink(aLcp);
       
    42 		CleanupStack::PushL(link);
       
    43 		link->CreateL();
       
    44 		}
       
    45 	else
       
    46 		{
       
    47 		User::Leave(KErrArgument);
       
    48 		}
       
    49 	CleanupStack::Pop();
       
    50 	return link;
       
    51 	}