telephonyprotocols/umtsgprsscpr/src/UmtsGprs_subconnProv.cpp
author hgs
Mon, 28 Jun 2010 17:02:18 +0100
changeset 45 28dbf5a297f4
parent 44 8b72faa1200f
permissions -rw-r--r--
201024_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 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
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    25
#include <cs_subconevents.h>
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    26
#include "UmtsGprs_subconnProv.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    27
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    28
const TInt KQoSMappingBorderDelay = 250;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    29
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    30
#define IN_RANGE_INCLUSIVE(value, left, right) (value >= left && value <= right )
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    31
#define MIN(left, right) (left < right ? left : right)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    32
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    33
//We need to use a cleanup item here becuase CSubConNotificationEvents are not CBase derived. This means that on cleanup, things are not cleaned up as expected
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    34
//We therefore need a TCleanupItem to deal with it.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    35
void SubconEventCleanupFunction(TAny* aEvent)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    36
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    37
	CSubConNotificationEvent* ptr = static_cast<CSubConNotificationEvent*>(aEvent);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    38
	delete ptr;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    39
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    40
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    41
void SubconParamSetCleanupFunction(TAny* aEvent)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    42
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    43
	CSubConParameterSet* ptr = static_cast<CSubConParameterSet*>(aEvent);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    44
	delete ptr;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    45
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    46
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    47
#ifdef SYMBIAN_NETWORKING_UMTSR5
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    48
void CUmtsGprsSubConnProvd::MapQosParamBundleToEtelL(const CSubConParameterBundle& aIn, 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    49
   RPacketQoS::TQoSR5Requested* aOut)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    50
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    51
#else
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    52
// !SYMBIAN_NETWORKING_UMTSR5
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    53
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    54
void CUmtsGprsSubConnProvd::MapQosParamBundleToEtelL(const CSubConParameterBundle& aIn, 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    55
    RPacketQoS::TQoSR99_R4Requested* aOut)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    56
#endif
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    57
// SYMBIAN_NETWORKING_UMTSR5
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    58
   {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    59
	ASSERT(aOut);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    60
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    61
    //Note: There should probably be const and non-const versions of FindFamily. 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    62
    //There is only non-const, hence casting below.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    63
	CSubConParameterFamily* family = const_cast<CSubConParameterBundle&>(aIn).FindFamily(KSubConQoSFamily);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    64
	if (!family)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    65
        {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    66
        User::Leave(KErrArgument);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    67
        }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    68
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    69
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    70
#ifdef SYMBIAN_NETWORKING_UMTSR5
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    71
	// check the UMTS R5 extension first
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    72
	CSubConQosR5ParamSet* extRequestedR5 = NULL;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    73
	CSubConQosR5ParamSet* extAcceptableR5 = NULL;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    74
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    75
	extRequestedR5 = static_cast<CSubConQosR5ParamSet*>(family->FindExtensionSet(
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    76
        STypeId::CreateSTypeId(KSubCon3GPPExtParamsFactoryUid,KSubConQosR5ParamsType), CSubConParameterFamily::ERequested));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    77
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    78
	extAcceptableR5 = static_cast<CSubConQosR5ParamSet*>(family->FindExtensionSet(
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    79
        STypeId::CreateSTypeId(KSubCon3GPPExtParamsFactoryUid,KSubConQosR5ParamsType), CSubConParameterFamily::EAcceptable));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    80
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    81
	if (extRequestedR5)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    82
        {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    83
        MapQosR5ExtensionSetToEtel (*extRequestedR5, extAcceptableR5, aOut);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    84
        iParameterRelease = KParameterRel5;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    85
        return;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    86
        }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    87
#endif
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    88
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    89
	// No R5 so check the UMTS R99/R4 extension next
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    90
	CSubConQosR99ParamSet* extRequestedR99 = NULL;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    91
	CSubConQosR99ParamSet* extAcceptableR99 = NULL;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    92
	extRequestedR99 = static_cast<CSubConQosR99ParamSet*>(family->FindExtensionSet(
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    93
        STypeId::CreateSTypeId(KSubCon3GPPExtParamsFactoryUid,KSubConQosR99ParamsType), CSubConParameterFamily::ERequested));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    94
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    95
	extAcceptableR99 = static_cast<CSubConQosR99ParamSet*>(family->FindExtensionSet(
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    96
        STypeId::CreateSTypeId(KSubCon3GPPExtParamsFactoryUid,KSubConQosR99ParamsType), CSubConParameterFamily::EAcceptable));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    97
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    98
	if (extRequestedR99)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    99
        {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   100
        MapQosR99ExtensionSetToEtel (*extRequestedR99, extAcceptableR99, aOut);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   101
        iParameterRelease = KParameterRel4Rel99;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   102
        return;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   103
        }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   104
      
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   105
      
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   106
	// Still nothing specific, try to use the generic params
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   107
	CSubConQosGenericParamSet* genericRequested = 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   108
        static_cast<CSubConQosGenericParamSet*>(family->GetGenericSet(CSubConParameterFamily::ERequested));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   109
	CSubConQosGenericParamSet* genericAcceptable = 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   110
        static_cast<CSubConQosGenericParamSet*>(family->GetGenericSet(CSubConParameterFamily::EAcceptable));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   111
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   112
    if (genericRequested)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   113
        {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   114
        MapQosGenericSetToEtel (*genericRequested, genericAcceptable, aOut);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   115
        iParameterRelease = KParameterRelGeneric;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   116
        return;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   117
        }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   118
    	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   119
    // Nothing left that we support
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   120
    User::Leave(KErrNotSupported);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   121
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   122
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   123
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   124
/** 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   125
Maps given requested and acceptable sets of R99/R4 parameters as defined CSubConQosR99ParamSet
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   126
into the Etel format (RPacketQoS::TQoSR99_R4Requested).
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   127
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   128
@param aInRequested requested CSubConQosR99ParamSet to be converted
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   129
@param aInAcceptable optional acceptable CSubConQosR99ParamSet to be converted
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   130
@param aOut RPacketQoS::TQoSR99_R4Requested derived class to be mapped into.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   131
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   132
void CUmtsGprsSubConnProvd::MapQosR99ExtensionSetToEtel(const CSubConQosR99ParamSet& aInRequested,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   133
   const CSubConQosR99ParamSet* aInAcceptable, RPacketQoS::TQoSR99_R4Requested* aOut)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   134
   {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   135
   ASSERT (aOut);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   136
   
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   137
	aOut->iReqTrafficClass =  aInRequested.GetTrafficClass();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   138
	aOut->iReqDeliveryOrderReqd = aInRequested.GetDeliveryOrder();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   139
	aOut->iReqDeliverErroneousSDU = aInRequested.GetErroneousSDUDelivery();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   140
	aOut->iReqBER = aInRequested.GetResidualBitErrorRatio();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   141
	aOut->iReqSDUErrorRatio = aInRequested.GetSDUErrorRatio();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   142
	aOut->iReqTrafficHandlingPriority = aInRequested.GetTrafficHandlingPriority();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   143
	aOut->iReqTransferDelay = aInRequested.GetTransferDelay();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   144
	aOut->iReqMaxSDUSize = aInRequested.GetMaxSduSize();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   145
	aOut->iReqMaxRate.iUplinkRate = aInRequested.GetMaxBitrateUplink();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   146
	aOut->iReqMaxRate.iDownlinkRate = aInRequested.GetMaxBitrateDownlink();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   147
	aOut->iReqGuaranteedRate.iUplinkRate = aInRequested.GetGuaBitrateUplink();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   148
	aOut->iReqGuaranteedRate.iDownlinkRate = aInRequested.GetGuaBitrateDownlink();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   149
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   150
	if (!aInAcceptable)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   151
	   {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   152
	   // when aInAcceptable is ommitted the minimum is the requested
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   153
	   aInAcceptable = &aInRequested;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   154
	   }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   155
	   
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   156
	aOut->iMinTrafficClass = aInAcceptable->GetTrafficClass();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   157
	aOut->iMinDeliveryOrderReqd = aInAcceptable->GetDeliveryOrder();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   158
	aOut->iMinDeliverErroneousSDU = aInAcceptable->GetErroneousSDUDelivery();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   159
	aOut->iMaxBER = aInAcceptable->GetResidualBitErrorRatio();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   160
	aOut->iMaxSDUErrorRatio = aInAcceptable->GetSDUErrorRatio();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   161
	aOut->iMinTrafficHandlingPriority = aInAcceptable->GetTrafficHandlingPriority();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   162
	aOut->iMaxTransferDelay = aInAcceptable->GetTransferDelay();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   163
	aOut->iMinAcceptableMaxSDUSize = aInAcceptable->GetMaxSduSize();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   164
	aOut->iMinAcceptableMaxRate.iUplinkRate = aInAcceptable->GetMaxBitrateUplink();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   165
	aOut->iMinAcceptableMaxRate.iDownlinkRate = aInAcceptable->GetMaxBitrateDownlink();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   166
	aOut->iMinGuaranteedRate.iUplinkRate = aInAcceptable->GetGuaBitrateUplink();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   167
	aOut->iMinGuaranteedRate.iDownlinkRate = aInAcceptable->GetGuaBitrateDownlink();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   168
   }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   169
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   170
  
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   171
#ifdef SYMBIAN_NETWORKING_UMTSR5
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   172
/** 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   173
Maps given requested and acceptable sets of R5 parameters as defined CSubConQosR5ParamSet
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   174
into the Etel format (RPacketQoS::TQoSR5Requested).
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   175
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   176
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   177
@param aInRequested requested CSubConQosR5ParamSet to be converted
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   178
@param aInAcceptable optional acceptable CSubConQosR5ParamSet to be converted
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   179
@param aOut RPacketQoS::TQoSR5Requested derived class to be mapped into.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   180
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   181
void CUmtsGprsSubConnProvd::MapQosR5ExtensionSetToEtel(const CSubConQosR5ParamSet& aInRequested,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   182
    const CSubConQosR5ParamSet* aInAcceptable, RPacketQoS::TQoSR5Requested* aOut)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   183
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   184
    MapQosR99ExtensionSetToEtel(aInRequested,aInAcceptable,aOut);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   185
    aOut->iSourceStatisticsDescriptor =  aInRequested.GetSourceStatisticsDescriptor();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   186
    aOut->iSignallingIndication = aInRequested.GetSignallingIndicator();
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 CUmtsGprsSubConnProvd::MapQosR99ExtensionSetToEtel(const CSubConQosR99ParamSet& aInRequested,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   191
    const CSubConQosR99ParamSet* aInAcceptable, RPacketQoS::TQoSR5Requested* aOut)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   192
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   193
    MapQosR99ExtensionSetToEtel(aInRequested, aInAcceptable, static_cast<RPacketQoS::TQoSR99_R4Requested*>(aOut));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   194
    aOut->iSourceStatisticsDescriptor =  RPacketQoS::ESourceStatisticsDescriptorUnknown;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   195
    aOut->iSignallingIndication = EFalse;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   196
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   197
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   198
#endif 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   199
// SYMBIAN_NETWORKING_UMTSR5   
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   200
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   201
/** 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   202
Given a set of generic parameters, the method derives the R99 value for the traffic class.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   203
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   204
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   205
@param aIn requested CSubConQosGenericParamSet to be converted
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   206
@return the value of RPacketQoS::TTrafficClass
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   207
*/	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   208
RPacketQoS::TTrafficClass CUmtsGprsSubConnProvd::DeriveTrafficClass(const CSubConQosGenericParamSet& aIn )
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   209
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   210
    //-----------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   211
    // Traffic class
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   212
    //-----------------------------------
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   213
    if (IN_RANGE_INCLUSIVE(aIn.GetUpLinkDelay(), 0, KQoSMappingBorderDelay-1) ||
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   214
        IN_RANGE_INCLUSIVE(aIn.GetDownLinkDelay(), 0, KQoSMappingBorderDelay-1) )
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   215
	    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   216
	    return RPacketQoS::ETrafficClassConversational;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   217
	    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   218
    else if (aIn.GetUpLinkDelay() >= KQoSMappingBorderDelay || 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   219
    		 aIn.GetDownLinkDelay() >= KQoSMappingBorderDelay )
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   220
	    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   221
	    return RPacketQoS::ETrafficClassStreaming;	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   222
	    }  
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   223
    else if (IN_RANGE_INCLUSIVE(aIn.GetUpLinkPriority(), 1, 3) ||
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   224
    		 IN_RANGE_INCLUSIVE(aIn.GetDownLinkPriority(), 1, 3))
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   225
	    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   226
	    return RPacketQoS::ETrafficClassInteractive;	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   227
	    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   228
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   229
	return RPacketQoS::ETrafficClassBackground;	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   230
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   231
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   232
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   233
/** 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   234
Given a set of generic parameters, the method derives the R99 value for the traffic priority.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   235
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   236
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   237
@param aIn requested CSubConQosGenericParamSet to be converted
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   238
@return the value of RPacketQoS::TTrafficHandlingPriority
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   239
*/	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   240
RPacketQoS::TTrafficHandlingPriority CUmtsGprsSubConnProvd::DeriveTrafficPriority(const CSubConQosGenericParamSet& aIn )
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   241
    {    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   242
    //
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   243
    // Traffic handling priority
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   244
    //
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   245
    if (aIn.GetUpLinkPriority() == 1 || aIn.GetDownLinkPriority() == 1)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   246
	    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   247
	    return RPacketQoS::ETrafficPriority1;	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   248
	    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   249
    else if (aIn.GetUpLinkPriority() == 2 || aIn.GetDownLinkPriority() == 2)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   250
	    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   251
	    return RPacketQoS::ETrafficPriority2;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   252
	    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   253
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   254
	return RPacketQoS::ETrafficPriority3;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   255
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   256
	    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   257
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   258
/** 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   259
Maps given requested and acceptable sets of generic QoS parameters as defined CSubConQosGenericParamSet
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   260
into the Etel format (RPacketQoS::TQoSR99_R4Requested).
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   261
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   262
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   263
@param aInRequested requested CSubConQosGenericParamSet to be converted
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   264
@param aInAcceptable optional acceptable CSubConQosGenericParamSet to be converted
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   265
@param aOut RPacketQoS::TQoSR99_R4Requested to be produced.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   266
*/	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   267
void CUmtsGprsSubConnProvd::MapQosGenericSetToEtel(const CSubConQosGenericParamSet& aInRequested, 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   268
   const CSubConQosGenericParamSet* aInAcceptable, RPacketQoS::TQoSR99_R4Requested* aOut)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   269
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   270
	ASSERT (aOut);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   271
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   272
	aOut->iReqDeliveryOrderReqd = RPacketQoS::EDeliveryOrderNotRequired;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   273
	aOut->iReqDeliverErroneousSDU = RPacketQoS::EErroneousSDUDeliveryNotRequired;;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   274
	aOut->iReqBER = RPacketQoS::EBERUnspecified;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   275
   aOut->iReqSDUErrorRatio = RPacketQoS::ESDUErrorRatioUnspecified;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   276
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   277
	aOut->iReqTrafficClass = DeriveTrafficClass(aInRequested);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   278
	aOut->iReqTrafficHandlingPriority = DeriveTrafficPriority(aInRequested);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   279
	aOut->iReqTransferDelay = MIN(aInRequested.GetUpLinkDelay(), aInRequested.GetDownLinkDelay());
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   280
	aOut->iReqMaxSDUSize = aInRequested.GetUpLinkMaximumPacketSize();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   281
	aOut->iReqMaxRate.iUplinkRate = aInRequested.GetUplinkBandwidth();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   282
	aOut->iReqMaxRate.iDownlinkRate = aInRequested.GetDownlinkBandwidth();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   283
	aOut->iReqGuaranteedRate.iUplinkRate = aInRequested.GetUplinkBandwidth();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   284
	aOut->iReqGuaranteedRate.iDownlinkRate = aInRequested.GetDownlinkBandwidth();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   285
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   286
	if (!aInAcceptable)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   287
	   {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   288
	   // when aInAcceptable is ommitted the minimum is the requested
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   289
	   aInAcceptable = &aInRequested;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   290
	   }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   291
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   292
	aOut->iMinDeliveryOrderReqd = RPacketQoS::EDeliveryOrderNotRequired;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   293
	aOut->iMinDeliverErroneousSDU = RPacketQoS::EErroneousSDUDeliveryNotRequired;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   294
	aOut->iMaxBER = RPacketQoS::EBERUnspecified;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   295
	aOut->iMaxSDUErrorRatio = RPacketQoS::ESDUErrorRatioUnspecified;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   296
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   297
	aOut->iMinTrafficClass = DeriveTrafficClass(*aInAcceptable);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   298
	aOut->iMinTrafficHandlingPriority = DeriveTrafficPriority(*aInAcceptable);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   299
	aOut->iMaxTransferDelay = MIN(aInAcceptable->GetUpLinkDelay(), aInAcceptable->GetDownLinkDelay());
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   300
	aOut->iMinAcceptableMaxSDUSize = aInAcceptable->GetUpLinkMaximumPacketSize();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   301
	aOut->iMinAcceptableMaxRate.iUplinkRate = aInAcceptable->GetUplinkBandwidth();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   302
	aOut->iMinAcceptableMaxRate.iDownlinkRate = aInAcceptable->GetDownlinkBandwidth();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   303
	aOut->iMinGuaranteedRate.iUplinkRate = aInAcceptable->GetUplinkBandwidth();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   304
	aOut->iMinGuaranteedRate.iDownlinkRate = aInAcceptable->GetDownlinkBandwidth();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   305
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   306
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   307
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   308
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   309
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   310
Maps QoS parameters received from the network via Etel into a CSubConGenEventParamsGranted class
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   311
so that it is usable by the RSubConnection API.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   312
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   313
@param aNetworkQoS  - A pointer to an Etel TPacketDataConfigBase class containing the
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   314
QoS to be mapped into the QoS event.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   315
@param aGranted - A reference to the CSubConGenEventParamsGranted object that should receive the mapped
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   316
QoS parameters.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   317
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   318
void CUmtsGprsSubConnProvd::MapQosEtelToGrantedParamsL (TPacketDataConfigBase* aNetworkQoS,CSubConGenEventParamsGranted& aGranted)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   319
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   320
    ASSERT (aNetworkQoS);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   321
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   322
    // Always set the generic set
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   323
    MapQosEtelToGenericSetL ((static_cast<RPacketQoS::TQoSR99_R4Negotiated*>(aNetworkQoS)), aGranted);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   324
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   325
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   326
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   327
    switch (iParameterRelease)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   328
        {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   329
#ifdef SYMBIAN_NETWORKING_UMTSR5
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   330
        case KParameterRel5:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   331
            // Control client sent us an R5 qos request
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   332
            MapQosEtelToR5SetL ((static_cast<RPacketQoS::TQoSR5Negotiated*>(aNetworkQoS)), aGranted);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   333
            break;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   334
#endif
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   335
// SYMBIAN_NETWORKING_UMTSR5
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   336
            
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   337
        case KParameterRelInvalid:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   338
#ifdef SYMBIAN_NETWORKING_UMTSR5
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   339
            // This will be the case if the client hasn't actually requested a level of QoS yet
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   340
            // but the network has notified us of a QoS change. We don't know what the client might
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   341
            // support so return both sets (if the define is set, else just what the code supports)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   342
            MapQosEtelToR5SetL ((static_cast<RPacketQoS::TQoSR5Negotiated*>(aNetworkQoS)), aGranted);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   343
#endif
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   344
            MapQosEtelToR99SetL ((static_cast<RPacketQoS::TQoSR99_R4Negotiated*>(aNetworkQoS)), aGranted);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   345
            break;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   346
            
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   347
        case KParameterRel4Rel99:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   348
            // Control client sent us an R4/R99 qos request
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   349
            MapQosEtelToR99SetL ((static_cast<RPacketQoS::TQoSR99_R4Negotiated*>(aNetworkQoS)), aGranted);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   350
            break;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   351
        
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   352
        case KParameterRelGeneric:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   353
            // Generic set always returned. Done above.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   354
            break;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   355
        }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   356
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   357
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   358
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   359
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   360
Maps QoS parameters received from the network via Etel into a 3GPP Release R4/R99 set and
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   361
sets it in the given event.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   362
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   363
@param aNetworkQoS  - A pointer to an Etel RPacketQoS::TQoSR99_R4Requested derived class containing
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   364
the QoS to be mapped.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   365
@param aGranted - A reference to the CSubConGenEventParamsGranted object that should receive the
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   366
extension QoS parameters.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   367
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   368
void CUmtsGprsSubConnProvd::MapQosEtelToR99SetL (RPacketQoS::TQoSR99_R4Negotiated* aNetworkQoS,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   369
   CSubConGenEventParamsGranted& aGranted)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   370
   {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   371
   ASSERT (aNetworkQoS);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   372
   
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   373
   CSubConQosR99ParamSet* r99Extension = CSubConQosR99ParamSet::NewL ();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   374
   CleanupStack::PushL(TCleanupItem(SubconParamSetCleanupFunction,r99Extension));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   375
   r99Extension->SetTrafficClass(aNetworkQoS->iTrafficClass);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   376
   r99Extension->SetDeliveryOrder(aNetworkQoS->iDeliveryOrderReqd);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   377
   r99Extension->SetErroneousSDUDelivery(aNetworkQoS->iDeliverErroneousSDU);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   378
   r99Extension->SetResidualBitErrorRatio(aNetworkQoS->iBER);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   379
   r99Extension->SetSDUErrorRatio(aNetworkQoS->iSDUErrorRatio);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   380
   r99Extension->SetTrafficHandlingPriority(aNetworkQoS->iTrafficHandlingPriority);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   381
   r99Extension->SetTransferDelay(aNetworkQoS->iTransferDelay);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   382
   r99Extension->SetMaxSduSize(aNetworkQoS->iMaxSDUSize);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   383
   r99Extension->SetMaxBitrateUplink(aNetworkQoS->iMaxRate.iUplinkRate);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   384
   r99Extension->SetMaxBitrateDownlink(aNetworkQoS->iMaxRate.iDownlinkRate);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   385
   r99Extension->SetGuaBitrateUplink(aNetworkQoS->iGuaranteedRate.iUplinkRate);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   386
   r99Extension->SetGuaBitrateDownlink(aNetworkQoS->iGuaranteedRate.iDownlinkRate);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   387
   
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   388
   aGranted.AddExtensionSetL (r99Extension);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   389
   CleanupStack::Pop(); //r99Extension
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   390
   }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   391
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   392
#ifdef SYMBIAN_NETWORKING_UMTSR5
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   393
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   394
Maps QoS parameters received from the network via Etel into a 3GPP Release R5 set and
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   395
sets it in the given event.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   396
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   397
@param aNetworkQoS  - A pointer to an Etel RPacketQoS::TQoSR5Requested derived class containing
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   398
the QoS to be mapped.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   399
@param aGranted - A reference to the CSubConGenEventParamsGranted object that should receive the
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   400
extension QoS parameters.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   401
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   402
void CUmtsGprsSubConnProvd::MapQosEtelToR5SetL (RPacketQoS::TQoSR5Negotiated* aNetworkQoS,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   403
   CSubConGenEventParamsGranted& aGranted)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   404
   {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   405
   ASSERT (aNetworkQoS);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   406
   
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   407
   CSubConQosR5ParamSet* r5Extension = CSubConQosR5ParamSet::NewL ();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   408
   CleanupStack::PushL(TCleanupItem(SubconParamSetCleanupFunction,r5Extension));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   409
   r5Extension->SetTrafficClass(aNetworkQoS->iTrafficClass);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   410
   r5Extension->SetDeliveryOrder(aNetworkQoS->iDeliveryOrderReqd);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   411
   r5Extension->SetErroneousSDUDelivery(aNetworkQoS->iDeliverErroneousSDU);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   412
   r5Extension->SetResidualBitErrorRatio(aNetworkQoS->iBER);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   413
   r5Extension->SetSDUErrorRatio(aNetworkQoS->iSDUErrorRatio);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   414
   r5Extension->SetTrafficHandlingPriority(aNetworkQoS->iTrafficHandlingPriority);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   415
   r5Extension->SetTransferDelay(aNetworkQoS->iTransferDelay);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   416
   r5Extension->SetMaxSduSize(aNetworkQoS->iMaxSDUSize);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   417
   r5Extension->SetMaxBitrateUplink(aNetworkQoS->iMaxRate.iUplinkRate);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   418
   r5Extension->SetMaxBitrateDownlink(aNetworkQoS->iMaxRate.iDownlinkRate);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   419
   r5Extension->SetGuaBitrateUplink(aNetworkQoS->iGuaranteedRate.iUplinkRate);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   420
   r5Extension->SetGuaBitrateDownlink(aNetworkQoS->iGuaranteedRate.iDownlinkRate);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   421
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   422
   r5Extension->SetSourceStatisticsDescriptor(aNetworkQoS->iSourceStatisticsDescriptor);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   423
   r5Extension->SetSignallingIndicator(aNetworkQoS->iSignallingIndication);		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   424
   
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   425
   aGranted.AddExtensionSetL (r5Extension);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   426
   CleanupStack::Pop(); //r5Extension
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   427
   }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   428
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   429
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   430
#endif 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   431
// SYMBIAN_NETWORKING_UMTSR5 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   432
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   433
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   434
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   435
Maps QoS parameters received from the network via Etel into a generic set and sets it in the given event.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   436
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   437
@param aNetworkQoS  - A pointer to an Etel RPacketQoS::TQoSR99_R4Requested derived class containing the QoS
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   438
to be mapped.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   439
@param aFamily - A reference to the CSubConGenEventParamsGranted object that should receive the
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   440
generic QoS parameters.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   441
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   442
void CUmtsGprsSubConnProvd::MapQosEtelToGenericSetL (RPacketQoS::TQoSR99_R4Negotiated* aNetworkQoS,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   443
   CSubConGenEventParamsGranted& aGranted)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   444
   {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   445
   ASSERT (aNetworkQoS);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   446
   
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   447
   CSubConQosGenericParamSet* genericQoS = CSubConQosGenericParamSet::NewL ();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   448
   
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   449
   genericQoS->SetDownlinkBandwidth (aNetworkQoS->iGuaranteedRate.iDownlinkRate);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   450
   genericQoS->SetUplinkBandwidth (aNetworkQoS->iGuaranteedRate.iUplinkRate);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   451
   genericQoS->SetDownLinkDelay (aNetworkQoS->iTransferDelay);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   452
   genericQoS->SetUpLinkDelay (aNetworkQoS->iTransferDelay);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   453
   genericQoS->SetDownLinkMaximumPacketSize (aNetworkQoS->iMaxSDUSize);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   454
   genericQoS->SetUpLinkMaximumPacketSize (aNetworkQoS->iMaxSDUSize);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   455
   
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   456
   switch (aNetworkQoS->iTrafficHandlingPriority) 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   457
      {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   458
         case RPacketQoS::ETrafficPriority1:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   459
            genericQoS->SetDownLinkPriority (RPacketQoS::ETrafficPriority1);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   460
            genericQoS->SetUpLinkPriority (RPacketQoS::ETrafficPriority1);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   461
            break;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   462
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   463
         case RPacketQoS::ETrafficPriority2:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   464
            genericQoS->SetDownLinkPriority (RPacketQoS::ETrafficPriority2);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   465
            genericQoS->SetUpLinkPriority (RPacketQoS::ETrafficPriority2);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   466
            break;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   467
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   468
         case RPacketQoS::ETrafficPriority3:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   469
            genericQoS->SetDownLinkPriority (RPacketQoS::ETrafficPriority3);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   470
            genericQoS->SetUpLinkPriority (RPacketQoS::ETrafficPriority3);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   471
            break;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   472
            
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   473
         default:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   474
            genericQoS->SetDownLinkPriority (RPacketQoS::ETrafficPriorityUnspecified);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   475
            genericQoS->SetUpLinkPriority (RPacketQoS::ETrafficPriorityUnspecified);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   476
            break;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   477
      }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   478
      
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   479
   aGranted.SetGenericSet (genericQoS);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   480
   }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   481
   
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   482
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   483
   
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   484
CPdpFsmInterface& CUmtsGprsSubConnProvd::GetPdpFsmInterface()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   485
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   486
    return GetDefaultSubConnection().GetPdpFsmInterface();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   487
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   488
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   489
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   490
TBool CUmtsGprsSubConnProvd::PdpFsmEvent(TContextId aContextId, TInt aEvent, TInt aParam)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   491
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   492
    if (iCurrentPdpFsmReq)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   493
        {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   494
        TBool handled(EFalse);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   495
        handled = iCurrentPdpFsmReq->PdpFsmEvent(aContextId, aEvent, aParam);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   496
        return handled;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   497
        }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   498
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   499
	// Any events that are not a result of a request that we've made must be forwarded to
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   500
	// control clients.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   501
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   502
	switch(aEvent)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   503
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   504
		case KContextParametersChangeEvent:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   505
	    // For QoS Changed the event must be processed here, it doesn't occur as a response
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   506
    	// to something we've requested.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   507
        __FLOG_2(_L("CUmtsGprsSubConnProvd [this=%08x]:\tPdpFsmEvent(): QoS Params Changed [aParam=%d]"), this, aParam);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   508
        TRAP_IGNORE(NotifyParamsChangedL(aParam));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   509
		break;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   510
		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   511
		case KContextDeleteEvent:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   512
		// For network-initiate close of PDP context.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   513
        __FLOG_2(_L("CUmtsGprsSubConnProvd [this=%08x]:\tPdpFsmEvent(): Context Delete Event [aParam=%d]"), this, aParam);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   514
        TRAP_IGNORE(NotifySubConDownL(aParam));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   515
		break;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   516
		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   517
		case KContextBlockedEvent:		// A PDP context becomes blocked
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   518
		case KContextUnblockedEvent:	// A PDP context becomes unblocked
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   519
		case KNetworkStatusEvent:		// For different network indications	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   520
		case KContextQoSSetEvent:		// Response to KContextQoSSet
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   521
		case KContextTFTModifiedEvent:	// Response to KContextTFTModify
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   522
		case KPrimaryContextCreated:	// Primary context at startup created
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   523
		case KSecondaryContextCreated:	// Secondary context created
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   524
		case KContextModifyActiveEvent:	// Response to KModifyActive
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   525
		case KGetNegQoSEvent:			// Response to KGetNegQoS. ** Used internally by NIF **
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   526
		default:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   527
		// Do nothing.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   528
		break;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   529
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   530
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   531
    // Although we have notified the change of qos to the client application we haven't handled this
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   532
    // event. We can get here because the network changed the QoS without a request from us, or
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   533
    // because a secondary context (actually owned by GuQoS) has been promoted to default. 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   534
    return EFalse;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   535
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   536
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   537
void CUmtsGprsSubConnProvd::NotifySubConDownL(TInt aError)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   538
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   539
   	CSubConGenEventSubConDown* event = CSubConGenEventSubConDown::NewL();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   540
	CleanupStack::PushL(TCleanupItem(SubconEventCleanupFunction, event));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   541
	event->SetError(aError);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   542
	NotifyClientEvent(*event);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   543
	CleanupStack::PopAndDestroy (); //event
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   544
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   545
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   546
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   547
void CUmtsGprsSubConnProvd::NotifyParamsChangedL(TInt aError)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   548
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   549
    CSubConGenEventParamsChanged* event = CSubConGenEventParamsChanged::NewL();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   550
    CleanupStack::PushL(TCleanupItem(SubconEventCleanupFunction, event));
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   551
    event->SetFamily (KSubConQoSFamily);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   552
    event->SetError (aError);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   553
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   554
#ifdef SYMBIAN_NETWORKING_UMTSR5  
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   555
	RPacketQoS::TQoSR5Negotiated negotiatedQoS;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   556
#else
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   557
    RPacketQoS::TQoSR99_R4Negotiated negotiatedQoS;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   558
#endif 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   559
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   560
    GetPdpFsmInterface().Get(GetContextId(), negotiatedQoS);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   561
    MapQosEtelToGrantedParamsL(&negotiatedQoS, *event);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   562
	NotifyClientEvent (*event);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   563
	CleanupStack::PopAndDestroy (); //event
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   564
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   565
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   566
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   567
MConnectionDataClient* CUmtsGprsSubConnProvd::DoSelfConnectionDataClient()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   568
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   569
    return this;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   570
    }    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   571
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   572
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   573
CPdpFsmRequestBase::CPdpFsmRequestBase(CUmtsGprsSubConnProvd& aProvider, MPdpFsmRequestOwner& aOwner)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   574
   :iProvider(aProvider), iOwner(aOwner)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   575
   {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   576
   __FLOG_OPEN(KUmtsGprsLogTag1, KUmtsGprsLogTag2);     
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   577
   }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   578
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   579
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   580
CSubConnectionProviderBase* CUmtsGprsSubConnProvd::DoNextLayer()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   581
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   582
	__FLOG_1(_L("CUmtsGprsSubConnProvd::DoNextLayer [this=%08x] - this is (by design) the last layer"), this);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   583
	return NULL;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   584
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   585
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   586
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   587
//-=========================================================
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   588
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   589
// Ignored overrides.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   590
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   591
//-=========================================================	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   592
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   593
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   594
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   595
/** Convert the given parameter budle to Etel language (r99) and if at the time possible, submit the request SPUDFSM.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   596
@param 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   597
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   598
void CUmtsGprsSubConnProvd::DoParametersAboutToBeSetL(CSubConParameterBundle& /*aParameterBundle*/)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   599
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   600
	__FLOG_1(_L("CUmtsGprsSubConnProvd::DoParametersAboutToBeSetL [this=%08x]"), this);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   601
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   602
	iParameterRelease = KParameterRelInvalid;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   603
    //TODO: implement set qos on secondaries when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   604
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   605
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   606
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   607
CConnDataTransfer& CUmtsGprsSubConnProvd::DoDataTransferL()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   608
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   609
    //TODO: implement when UmtsGprsSCPR enables ECreateNew SubConnection Providers.    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   610
	User::Leave(KErrNotSupported);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   611
	return iNextLayer->DataTransferL();    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   612
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   613
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   614
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   615
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   616
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   617
From MConnectionDataClient
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   618
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   619
void CUmtsGprsSubConnProvd::Notify(TNotify /*aNotifyType*/, CConnectionProviderBase* /*aConnProvider*/, 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   620
                                   TInt /*aError*/, const CConNotificationEvent* /*aConNotificationEvent*/)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   621
    {   
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   622
    //TODO: implement when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   623
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   624
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   625
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   626
From MConnectionDataClient
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   627
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   628
void CUmtsGprsSubConnProvd::AttachToNext(CSubConnectionProviderBase* /*aSubConnProvider*/)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   629
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   630
    //TODO: implement when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   631
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   632
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   633
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   634
From MConnectionDataClient
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   635
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   636
void CUmtsGprsSubConnProvd::ConnectionGoingDown(CConnectionProviderBase& aConnProvider)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   637
   {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   638
   (void)aConnProvider;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   639
	__FLOG_2(_L("CUmtsGprsSubConnProvd [this=%08x]:\tConnectionGoingDown() [aConnProvider=%08x]"), this, &aConnProvider);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   640
	iConnectionProvider = NULL;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   641
	DeleteMeNow();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   642
   }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   643
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   644
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   645
From MConnectionDataClient
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   646
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   647
void CUmtsGprsSubConnProvd::ConnectionError(TInt /*aStage*/, TInt /*aError*/)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   648
    {   
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   649
    //TODO: implement when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   650
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   651
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   652
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   653
Function called by Connection Provider when a socket is to be added to the QoS Flow ('this')
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   654
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   655
@param aDataClient Data Client to add to the QoS Channel
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   656
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   657
void CUmtsGprsSubConnProvd::DoDataClientJoiningL(MSubConnectionDataClient& aDataClient)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   658
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   659
    (void)aDataClient;    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   660
	__FLOG_3(_L("CUmtsGprsSubConnProvd [this=%08x]:\tDoDataClientJoiningL() [iDataClients.Count=%d] [aDataClient=%08x]"), this, iDataClients.Count(), &aDataClient);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   661
	//We're not interested in knowing about MSubConnectionDataClient joining this sub-connection
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   662
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   663
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   664
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   665
Function called by Connection Provider when a socket is to be removed from the QoS Flow ('this')
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   666
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   667
@param aDataClient Data Client to remove from this QoS Channel
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   668
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   669
void CUmtsGprsSubConnProvd::DoDataClientLeaving(MSubConnectionDataClient& aDataClient)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   670
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   671
    (void)aDataClient;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   672
	__FLOG_3(_L("CUmtsGprsSubConnProvd [this=%08x]:\tDoDataClientLeaving() [iDataClients.Count=%d] [aDataClient=%08x]"), this, iDataClients.Count(), &aDataClient);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   673
	 aDataClient.LeaveComplete (*this);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   674
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   675
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   676
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   677
Function called by SubConnection Provider when a control client is to join to this the QoS Flow ('this')
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   678
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   679
@param aControlClient Control Client to remove from this QoS Channel
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   680
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   681
void CUmtsGprsSubConnProvd::DoControlClientJoiningL(MSubConnectionControlClient& aControlClient)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   682
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   683
    (void)aControlClient;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   684
	__FLOG_3(_L("CUmtsGprsSubConnProvd [this=%08x]:\tDoControlClientJoiningL() [iControlClients.Count=%d] [aControlClient=%08x]"), this, iControlClients.Count(), &aControlClient);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   685
	//We're not interested in knowing about MSubConnectionControlClient joining this sub-connection
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   686
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   687
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   688
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   689
Function called by SubConnection Provider when a control client is to be removed from the QoS Flow ('this')
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   690
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   691
@param aControlClient Control Client to remove from this QoS Channel
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   692
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   693
void CUmtsGprsSubConnProvd::DoControlClientLeaving(MSubConnectionControlClient& aControlClient)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   694
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   695
    (void)aControlClient;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   696
	__FLOG_3(_L("CUmtsGprsSubConnProvd [this=%08x]:\tDoControlClientLeaving() [iControlClients.Count=%d] [aControlClient=%08x]"), this, iControlClients.Count(), &aControlClient);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   697
	//We're not interested in knowing about MSubConnectionControlClient leaving this sub-connection
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   698
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   699
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   700
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   701
/** 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   702
@param 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   703
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   704
void CUmtsGprsSubConnProvd::DoSourceAddressUpdate(MSubConnectionDataClient& /*aDataClient*/, const TSockAddr& /*aSource*/)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   705
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   706
    //TODO: implement when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   707
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   708
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   709
/** 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   710
@param 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   711
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   712
void CUmtsGprsSubConnProvd::DoDestinationAddressUpdate(MSubConnectionDataClient& /*aDataClient*/, const TSockAddr& /*aDestination*/)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   713
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   714
    //TODO: implement when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   715
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   716
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   717
void CUmtsGprsSubConnProvd::DoDataClientRouted(MSubConnectionDataClient& /*aDataClient*/, const TSockAddr& /*aSource*/, const TSockAddr& /*aDestination*/, const TDesC8& /*aConnectionInfo*/)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   718
/** 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   719
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   720
@param 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   721
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   722
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   723
    //TODO: implement when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   724
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   725
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   726
TInt CUmtsGprsSubConnProvd::DoControl(TUint /*aOptionLevel*/, TUint /*aOptionName*/, TDes8& /*aOption*/)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   727
/** 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   728
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   729
@param 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   730
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   731
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   732
	__FLOG_1(_L("CUmtsGprsSubConnProvd::DoControl [this=%08x]"), this);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   733
	return KErrNotSupported;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   734
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   735
 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   736
void CUmtsGprsSubConnProvd::DoStartL()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   737
/** 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   738
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   739
@param 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   740
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   741
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   742
    //TODO: implement when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   743
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   744
    
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   745
void CUmtsGprsSubConnProvd::DoStop()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   746
/** 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   747
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   748
@param 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   749
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   750
    {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   751
    //TODO: implement when UmtsGprsSCPR enables ECreateNew SubConnection Providers.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   752
    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   753
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   754
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   755
CUmtsGprsSubConnProvd::~CUmtsGprsSubConnProvd ()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   756
   {
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   757
	__FLOG_1(_L("~CUmtsGprsSubConnProvd [this=%08x]"), this);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   758
	if (iConnectionProvider)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   759
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   760
		iConnectionProvider->Leave(*this);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   761
		}   
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   762
    delete iCurrentPdpFsmReq;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   763
    __FLOG_CLOSE;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   764
   }