messagingfw/biomsgfw/wappsrc/GprsBearerData.cpp
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 // Copyright (c) 2003-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 "GprsBearerData.h"
       
    17 #include <wappdef.h>
       
    18 #include <ipaddr.h>
       
    19 #include <etelpckt.h>
       
    20 
       
    21 _LIT(KNullIpAddress, "0.0.0.0");
       
    22 _LIT(KPPP, "ppp");
       
    23 
       
    24 CWapGprsBearerData*  CWapGprsBearerData::NewLC()
       
    25 	{	
       
    26 	CWapGprsBearerData*  self = new (ELeave) CWapGprsBearerData();
       
    27 	CleanupStack::PushL(self);
       
    28 	self->ConstructL();
       
    29 	return self;
       
    30 	}
       
    31 
       
    32 CWapGprsBearerData*  CWapGprsBearerData::NewL()
       
    33 	{
       
    34 	CWapGprsBearerData*  self;
       
    35 	self = CWapGprsBearerData::NewLC();
       
    36 	CleanupStack::Pop();
       
    37 	return self;
       
    38 	}
       
    39 
       
    40 void CWapGprsBearerData::ConstructL()
       
    41 	{
       
    42 	// Mandatory fields
       
    43 
       
    44 	iIFName = KPPP().AllocL();
       
    45 
       
    46 	iPDPType = RPacketContext::EPdpTypeIPv4;
       
    47 	iPDPAddress = KNullIpAddress().AllocL();
       
    48 	iIPDnsAddrFromServer = ETrue;
       
    49 	iPlainTextAuthDisabled = EFalse;
       
    50 
       
    51 	iGatewayAddr = CIpAddress::NewL();
       
    52 	iIpAddrFromServer = ETrue;
       
    53 	}
       
    54 
       
    55 CWapGprsBearerData::~CWapGprsBearerData()
       
    56 	{
       
    57 	delete iPDPAddress;
       
    58 	delete iIFName;
       
    59 	delete iGatewayAddr;
       
    60 	}