telephonyprotocols/umtsgprsscpr/src/UmtsGprs_defaultSubconnProv.cpp
author hgs
Thu, 29 Jul 2010 12:12:57 +0100
changeset 56 ab72d5c1d770
parent 44 8b72faa1200f
permissions -rw-r--r--
201029_05
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     1
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     2
// All rights reserved.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     3
// This component and the accompanying materials are made available
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     5
// which accompanies this distribution, and is available
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     7
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     8
// Initial Contributors:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    10
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    11
// Contributors:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    12
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    13
// Description:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    14
// Implementation file for the Default Umts/Gprs SubConnection Provider
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    15
// 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    16
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    17
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    18
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    19
 @file
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    20
 @internalComponent
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    21
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    22
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    23
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    24
#include "UmtsGprs_defaultSubconnProv.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    25
#include "UmtsGprs_subconnProvFactory.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    26
#include "PdpFsmRequest.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    27
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    28
#include <commsdattypesv1_1.h>
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    29
#include <ss_connsettings.h>
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    30
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    31
#ifdef SYMBIAN_NETWORKING_UMTSR5
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    32
#include <ip_subconparams.h>
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    33
#endif	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    34
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    35
CUmtsGprsDefaultSubConnProvd* CUmtsGprsDefaultSubConnProvd::NewL(CSubConnectionProviderFactoryBase& aFactory, 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    36
	                          CConnectionProviderBase& aConnProvider)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    37
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    38
    CUmtsGprsDefaultSubConnProvd* provider = new(ELeave)CUmtsGprsDefaultSubConnProvd(aFactory, aConnProvider);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    39
	CleanupStack::PushL(provider);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    40
    provider->ConstructL();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    41
    CleanupStack::Pop(provider);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    42
    return provider;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    43
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    44
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    45
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    46
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    47
CUmtsGprsDefaultSubConnProvd::CUmtsGprsDefaultSubConnProvd(
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    48
                              CSubConnectionProviderFactoryBase& aFactory, 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    49
	                          CConnectionProviderBase& aConnProvider)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    50
:CUmtsGprsSubConnProvd(aFactory, aConnProvider),
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    51
 iPdpFsm(NULL)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    52
/** 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    53
Constructs a default UMTS SubConnection Provider
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    54
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    55
@param aFactory CSubConnectionProviderFactoryBase that should own the reference to 'this'
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    56
@param aConnProvider a connection that 'this' subconnection belongs to
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    57
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    58
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    59
	iContextId = KPrimaryContextId;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    60
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    61
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    62
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    63
void CUmtsGprsDefaultSubConnProvd::ConstructL()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    64
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    65
    iPdpFsm = new(ELeave) CPdpFsmInterface(*this);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    66
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    67
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    68
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    69
CUmtsGprsDefaultSubConnProvd::~CUmtsGprsDefaultSubConnProvd()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    70
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    71
    delete iPdpFsm;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    72
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    73
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    74
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    75
CUmtsGprsSubConnProvd& CUmtsGprsDefaultSubConnProvd::GetDefaultSubConnection()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    76
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    77
    return *this;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    78
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    79
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    80
TBool CUmtsGprsDefaultSubConnProvd::ShouldIDeleteNow()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    81
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    82
    // Never allow client leaving events to destroy this default scpr
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    83
    // The CPr will call ConnectionGoingDown when it is deleted
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    84
    // and then we will delete this.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    85
    return EFalse;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    86
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    87
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    88
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    89
#ifdef SYMBIAN_NETWORKING_UMTSR5
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    90
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    91
TInt CUmtsGprsDefaultSubConnProvd::AddIMCNInformationToParameterBundleL(TBool aImCnInfo)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    92
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    93
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    94
Will add the information related to the IMCN Signalling Flag into the SubCon Parameter Bundle
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    95
so that it can be accessible by the IPSCPR while restricting the sockets
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    96
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    97
@param aImCnInfo Grant status of the IMCN signalling flag  
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    98
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    99
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   100
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   101
	// Check and create the parameter bundle if NULL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   102
	if (iParameterBundle == NULL)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   103
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   104
		iParameterBundle = CSubConParameterBundle::NewL();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   105
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   106
		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   107
	// Add information Regarding the grant status to the parameter bundle with family
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   108
    CSubConParameterFamily * imcnFamily = CSubConParameterFamily::NewL(*iParameterBundle,KSubConnContextDescrParamsFamily);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   109
	CleanupStack::PushL(imcnFamily);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   110
	CSubConImsExtParamSet *imcnFlag = CSubConImsExtParamSet::NewL(*imcnFamily,CSubConParameterFamily::EGranted);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   111
	CleanupStack::Pop(imcnFamily);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   112
	// Set the Signalling Indication
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   113
	imcnFlag->SetImsSignallingIndicator(aImCnInfo);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   114
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   115
	return KErrNone;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   116
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   117
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   118
#endif //SYMBIAN_NETWORKING_UMTSR5
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   119
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   120
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   121
void CUmtsGprsDefaultSubConnProvd::DoParametersAboutToBeSetL(CSubConParameterBundle& aParameterBundle)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   122
/** Should set parameters on the primary/default PDP context represented by 'this'
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   123
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   124
@param 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   125
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   126
{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   127
	__FLOG_1(_L("CUmtsGprsDefaultSubConnProvd [this=%08x]:\tDoParametersAboutToBeSetL()"), this);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   128
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   129
	if (iCurrentPdpFsmReq)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   130
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   131
	User::Leave(KErrInUse);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   132
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   133
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   134
#ifdef SYMBIAN_NETWORKING_UMTSR5
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   135
	// For PREQ 635, The information regarding the dedicated signalling indication is used to be stored in the
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   136
	// iParameterBundle of the Base class. Since after this call and lower layer calls (if any) is completed then 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   137
	// iParameterBundle will be replaced by aParameterBundle coming as formal function parameters. 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   138
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   139
	// To be able to save the information if somebody calls RSubConnection::SetParameters(...), which is there in 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   140
	// existing Parameter Bundle we need to copy the information about IMCN Signalling flag which is already there 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   141
	// iParameterBundle into aParameterBundle. 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   142
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   143
	// The catch here is that The layer above this must call the SetParameters() to get the parameter values, because
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   144
	// This particular call adds the granted status
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   145
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   146
	// Check for the existance of the appropriate family
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   147
	CSubConParameterFamily * imCnFamily = iParameterBundle != NULL ? iParameterBundle->FindFamily(KSubConnContextDescrParamsFamily): NULL;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   148
	if (imCnFamily)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   149
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   150
		// we have the Family, get the status of IMCN signalling Flag
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   151
		CSubConImsExtParamSet *imCnSig = static_cast<CSubConImsExtParamSet*>
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   152
    	(imCnFamily->FindExtensionSet(STypeId::CreateSTypeId(KSubConIPParamsUid,KSubConImsExtParamsType), 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   153
    	CSubConParameterFamily::EGranted));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   154
		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   155
		// We have the variable, copy the contents
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   156
		if(imCnSig)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   157
    		{ 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   158
    		CSubConParameterFamily * contextFamily = CSubConParameterFamily::NewL(aParameterBundle,KSubConnContextDescrParamsFamily);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   159
			CleanupStack::PushL(contextFamily);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   160
    	  	CSubConImsExtParamSet *imCnFlag = CSubConImsExtParamSet::NewL(*contextFamily,CSubConParameterFamily::EGranted);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   161
			CleanupStack::Pop(contextFamily);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   162
		    imCnFlag->SetImsSignallingIndicator(imCnSig->GetImsSignallingIndicator());
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   163
    	  	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   164
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   165
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   166
#endif // SYMBIAN_NETWORKING_UMTSR5 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   167
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   168
    ResetQosRelease();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   169
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   170
#ifdef SYMBIAN_NETWORKING_UMTSR5
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   171
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   172
        RPacketQoS::TQoSR5Requested requestedParams;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   173
        MapQosParamBundleToEtelL(aParameterBundle, &requestedParams);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   174
        CModifyR5QoS* modifyR5QoS = CModifyR5QoS::NewL(*this, *this, requestedParams);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   175
        iCurrentPdpFsmReq = modifyR5QoS;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   176
        modifyR5QoS->Start();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   177
        
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   178
#else
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   179
		RPacketQoS::TQoSR99_R4Requested requestedParams;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   180
		MapQosParamBundleToEtelL(aParameterBundle, &requestedParams);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   181
		CModifyR4QoS* modifyR4QoS = CModifyR4QoS::NewL(*this, *this, requestedParams);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   182
		iCurrentPdpFsmReq = modifyR4QoS;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   183
		modifyR4QoS->Start();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   184
		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   185
#endif // SYMBIAN_NETWORKING_UMTSR5
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   186
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   187
}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   188
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   189
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   190
void CUmtsGprsDefaultSubConnProvd::GetQoSDefaultsL(RPacketQoS::TQoSR99_R4Requested* aParams)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   191
{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   192
   CConnectionSettings& settingAccess = iConnectionProvider->SettingsAccessL();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   193
	TUint32 data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   194
	    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   195
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqTrafficClass),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   196
	aParams->iReqTrafficClass = (RPacketQoS::TTrafficClass)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   197
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   198
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMinTrafficClass),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   199
	aParams->iMinTrafficClass = (RPacketQoS::TTrafficClass)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   200
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   201
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqDeliveryOrder),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   202
	aParams->iReqDeliveryOrderReqd = (RPacketQoS::TDeliveryOrder)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   203
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   204
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMinDeliveryOrder),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   205
	aParams->iMinDeliveryOrderReqd = (RPacketQoS::TDeliveryOrder)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   206
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   207
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqDeliverErroneousSDU),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   208
	aParams->iReqDeliverErroneousSDU = (RPacketQoS::TErroneousSDUDelivery)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   209
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   210
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMinDeliverErroneousSDU),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   211
	aParams->iMinDeliverErroneousSDU = (RPacketQoS::TErroneousSDUDelivery)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   212
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   213
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqMaxSDUSize),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   214
	aParams->iReqMaxSDUSize = (TInt)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   215
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   216
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMinAcceptableMaxSDUSize),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   217
	aParams->iMinAcceptableMaxSDUSize = (TInt)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   218
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   219
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqMaxUplinkRate),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   220
	aParams->iReqMaxRate.iUplinkRate = (TInt)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   221
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   222
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqMinUplinkRate),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   223
	aParams->iMinAcceptableMaxRate.iUplinkRate = (TInt)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   224
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   225
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqMaxDownlinkRate),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   226
	aParams->iReqMaxRate.iDownlinkRate = (TInt)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   227
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   228
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqMinDownlinkRate),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   229
	aParams->iMinAcceptableMaxRate.iDownlinkRate = (TInt)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   230
		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   231
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqBER),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   232
	aParams->iReqBER = (RPacketQoS::TBitErrorRatio)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   233
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   234
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMaxBER),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   235
	aParams->iMaxBER = (RPacketQoS::TBitErrorRatio)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   236
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   237
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqSDUErrorRatio),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   238
	aParams->iReqSDUErrorRatio = (RPacketQoS::TSDUErrorRatio)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   239
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   240
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMaxSDUErrorRatio),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   241
	aParams->iMaxSDUErrorRatio = (RPacketQoS::TSDUErrorRatio)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   242
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   243
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqTrafficHandlingPriority),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   244
	aParams->iReqTrafficHandlingPriority = (RPacketQoS::TTrafficHandlingPriority)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   245
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   246
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMinTrafficHandlingPriority),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   247
	aParams->iMinTrafficHandlingPriority = (RPacketQoS::TTrafficHandlingPriority)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   248
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   249
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqTransferDelay),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   250
	aParams->iReqTransferDelay = (TInt)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   251
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   252
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMaxTransferDelay),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   253
	aParams->iMaxTransferDelay = (TInt)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   254
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   255
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqGuaranteedUplinkRate),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   256
	aParams->iReqGuaranteedRate.iUplinkRate = (TInt)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   257
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   258
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMinGuaranteedUplinkRate),data, NULL);			
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   259
	aParams->iMinGuaranteedRate.iUplinkRate = (TInt)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   260
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   261
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSReqGuaranteedDownlinkRate),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   262
	aParams->iMinGuaranteedRate.iDownlinkRate = (TInt)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   263
		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   264
	settingAccess.GetIntSettingL(TPtrC(KCDTypeNameGPRSMinGuaranteedDownlinkRate),data, NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   265
	aParams->iMinGuaranteedRate.iDownlinkRate = (TInt)data;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   266
}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   267
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   268
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   269
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   270
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   271
/** 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   272
This override of the DoControl() method is used to initialise the RPdpFsmInterface object
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   273
in the SpudMan with a pointer to the real CPdpFsmInterface object owned by the 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   274
subconnection provider.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   275
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   276
@param aOptionLevel
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   277
@param aOptionName
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   278
@param aOption
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   279
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   280
TInt CUmtsGprsDefaultSubConnProvd::DoControl(TUint aOptionLevel, TUint aOptionName, TDes8& aOption)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   281
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   282
	__FLOG_1(_L("CUmtsGprsDefaultSubConnProvd::DoControl [%08x]"), this);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   283
	if (aOptionLevel == KSOLInterface && aOptionName == KInitialisePdpFsm)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   284
    	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   285
    	CNifIfBase* nif = *reinterpret_cast<CNifIfBase**>(const_cast<TUint8*>(aOption.Ptr()));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   286
    	ASSERT(nif != NULL);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   287
        TPckg<MPdpFsmInterface*> pdpfsm(iPdpFsm);    	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   288
    	return nif->Control(KSOLInterface, KInitialisePdpFsm, pdpfsm);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   289
    	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   290
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   291
    return CUmtsGprsSubConnProvd::Control(aOptionLevel, aOptionName, aOption);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   292
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   293
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   294
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   295
CPdpFsmInterface& CUmtsGprsDefaultSubConnProvd::GetPdpFsmInterface()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   296
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   297
    return *iPdpFsm;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   298
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   299