telephonyserverplugins/common_tsy/commontsy/src/mmpacket/cmmpacketqosgsmwcdmaext.cpp
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
child 42 3adadc800673
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 
       
    18 //  INCLUDE FILES
       
    19 #include "Cmmpacketservicetsy.h"
       
    20 #include "Cmmpacketcontexttsy.h"
       
    21 #include "cmmpacketqosgsmwcdmaext.h"
       
    22 #include "Cmmpacketqostsy.h"
       
    23 #include "Cmmpacketdef.h"
       
    24 #include "etelqos.h"
       
    25 #include "etelpckt.h"
       
    26 
       
    27 // ======== MEMBER FUNCTIONS ========
       
    28 
       
    29 CMmPacketQoSGsmWcdmaExt::CMmPacketQoSGsmWcdmaExt()
       
    30     {
       
    31     }
       
    32 
       
    33 CMmPacketQoSGsmWcdmaExt* CMmPacketQoSGsmWcdmaExt::NewL(
       
    34         CMmPacketQoSTsy* aMmPacketQoSTsy,     
       
    35         CMmPacketServiceTsy* aMmPacketService ) 
       
    36     {
       
    37     CMmPacketQoSGsmWcdmaExt* packetQoSGsmWcdmaExt =
       
    38         new ( ELeave ) CMmPacketQoSGsmWcdmaExt();
       
    39     
       
    40     CleanupStack::PushL( packetQoSGsmWcdmaExt );
       
    41     packetQoSGsmWcdmaExt->iMmPacketQoSTsy = aMmPacketQoSTsy;
       
    42     packetQoSGsmWcdmaExt->iMmPacketService = aMmPacketService;
       
    43     packetQoSGsmWcdmaExt->ConstructL();
       
    44     CleanupStack::Pop( packetQoSGsmWcdmaExt );
       
    45 
       
    46 TFLOGSTRING("TSY: CMmPacketQoSGsmWcdmaExt::NewL. ");
       
    47     return packetQoSGsmWcdmaExt;
       
    48     }
       
    49 
       
    50 void CMmPacketQoSGsmWcdmaExt::ConstructL()
       
    51     {
       
    52 	iQoSGPRSNotifyPckg = NULL;
       
    53     iQosAsked = EFalse;
       
    54     }
       
    55     
       
    56 CMmPacketQoSGsmWcdmaExt::~CMmPacketQoSGsmWcdmaExt()
       
    57     {
       
    58 TFLOGSTRING("TSY: CMmPacketQoSGsmWcdmaExt::~CMmPacketQoSGsmWcdmaExt." );
       
    59     }
       
    60 
       
    61 
       
    62 
       
    63 //----------------------------------------------------------------------------
       
    64 // CMmPacketQoSGsmWcdmaExt::GetProfileCapabilities
       
    65 // Gets profile capabilities 
       
    66 //----------------------------------------------------------------------------
       
    67 
       
    68 TInt CMmPacketQoSGsmWcdmaExt::GetProfileCapabilities(
       
    69         TDes8* aProfileCaps )
       
    70     {
       
    71 TFLOGSTRING("TSY: CMmPacketQoSGsmWcdmaExt::GetProfileCapabilities." );
       
    72 
       
    73     // Unpack the packet
       
    74     TPckg<TPacketDataConfigBase>* profileCapsPckg = 
       
    75         ( TPckg<TPacketDataConfigBase>* ) aProfileCaps;
       
    76     TPacketDataConfigBase& profileCaps = ( *profileCapsPckg )();
       
    77 
       
    78     // If extension is KConfigGPRS
       
    79     if ( TPacketDataConfigBase::KConfigGPRS == profileCaps.ExtensionId() )
       
    80         {
       
    81         TPckg<RPacketQoS::TQoSCapsGPRS>* gprsProfileCapsPckg = 
       
    82             ( TPckg<RPacketQoS::TQoSCapsGPRS>* ) aProfileCaps;
       
    83         RPacketQoS::TQoSCapsGPRS& gprsProfileCaps = ( *gprsProfileCapsPckg )();
       
    84 
       
    85         gprsProfileCaps.iPrecedence = KMmPrecedence;
       
    86         gprsProfileCaps.iDelay = KMmDelay;
       
    87         gprsProfileCaps.iReliability = KMmReliability;
       
    88         gprsProfileCaps.iPeak = KMmPeak;
       
    89         gprsProfileCaps.iMean = KMmMean;
       
    90         }
       
    91 
       
    92     // Else if extension is KConfigRel99Rel4 or KConfigRel5
       
    93     else if ( TPacketDataConfigBase::KConfigRel99Rel4 == 
       
    94         profileCaps.ExtensionId() ||
       
    95         TPacketDataConfigBase::KConfigRel5 == profileCaps.ExtensionId() )
       
    96         {
       
    97         TPckg<RPacketQoS::TQoSCapsR99_R4>* gprs99ProfileCapsPckg = 
       
    98             ( TPckg<RPacketQoS::TQoSCapsR99_R4>* ) aProfileCaps;
       
    99         RPacketQoS::TQoSCapsR99_R4& gprsProfileCaps = 
       
   100             ( *gprs99ProfileCapsPckg )();
       
   101 
       
   102         gprsProfileCaps.iTrafficClass = KMmTrafficClass;
       
   103         gprsProfileCaps.iDeliveryOrderReqd = KMmDeliveryOrderReqd;
       
   104         gprsProfileCaps.iDeliverErroneousSDU = KMmErroneousSDUDelivery;
       
   105         gprsProfileCaps.iBER = KMmBitErrorRatio;
       
   106         gprsProfileCaps.iSDUErrorRatio = KMmSDUErrorRatio;
       
   107         gprsProfileCaps.iTrafficHandlingPriority = KMmTrafficHandlingPriority;
       
   108         }
       
   109 
       
   110     else
       
   111         {
       
   112         return KErrNotSupported;
       
   113         }
       
   114 
       
   115     return KErrNone;
       
   116     }
       
   117 
       
   118 
       
   119 //----------------------------------------------------------------------------
       
   120 // CMmPacketQoSGsmWcdmaExt::GetProfileParameters
       
   121 // Gets negotiated Qos parameters 
       
   122 //----------------------------------------------------------------------------
       
   123 
       
   124 TInt CMmPacketQoSGsmWcdmaExt::GetProfileParameters(
       
   125         TDes8* aProfile ) 
       
   126     {
       
   127 
       
   128     // Unpack the packet
       
   129     TPckg<TPacketDataConfigBase>* profilePckg = 
       
   130         ( TPckg<TPacketDataConfigBase>* ) aProfile;
       
   131     TPacketDataConfigBase& profile = ( *profilePckg )();
       
   132 TFLOGSTRING("TSY: CMmPacketQoSGsmWcdmaExt::GetProfileParameters.");
       
   133 
       
   134 // If extension is KConfigGPRS
       
   135     if ( TPacketDataConfigBase::KConfigGPRS == profile.ExtensionId() )
       
   136         {
       
   137         TPckg<RPacketQoS::TQoSGPRSNegotiated >* gprsProfilePckg = 
       
   138                 ( TPckg<RPacketQoS::TQoSGPRSNegotiated >* ) aProfile;
       
   139         RPacketQoS::TQoSGPRSNegotiated& gprsProfile = ( *gprsProfilePckg )();
       
   140 
       
   141         gprsProfile.iPrecedence = iQoSGPRSNegotiated.iPrecedence;
       
   142         gprsProfile.iDelay = iQoSGPRSNegotiated.iDelay;
       
   143         gprsProfile.iReliability = iQoSGPRSNegotiated.iReliability;
       
   144         gprsProfile.iPeakThroughput = iQoSGPRSNegotiated.iPeakThroughput;
       
   145         gprsProfile.iMeanThroughput = iQoSGPRSNegotiated.iMeanThroughput;
       
   146         }
       
   147 // If extension is KConfigRel99Rel4
       
   148     else if ( TPacketDataConfigBase::KConfigRel99Rel4 == profile.ExtensionId() )
       
   149         {
       
   150         TPckg<RPacketQoS::TQoSR99_R4Negotiated >* gprsProfilePckg = 
       
   151                 ( TPckg<RPacketQoS::TQoSR99_R4Negotiated >* ) aProfile;
       
   152         RPacketQoS::TQoSR99_R4Negotiated& gprsProfile = ( *gprsProfilePckg )();
       
   153 
       
   154         gprsProfile.iTrafficClass = iQoSR99_R4Negotiated.iTrafficClass;
       
   155         gprsProfile.iDeliveryOrderReqd =
       
   156             iQoSR99_R4Negotiated.iDeliveryOrderReqd;
       
   157         gprsProfile.iDeliverErroneousSDU =
       
   158             iQoSR99_R4Negotiated.iDeliverErroneousSDU;
       
   159         gprsProfile.iMaxSDUSize = iQoSR99_R4Negotiated.iMaxSDUSize;
       
   160         gprsProfile.iMaxRate = iQoSR99_R4Negotiated.iMaxRate;
       
   161         gprsProfile.iBER = iQoSR99_R4Negotiated.iBER;
       
   162         gprsProfile.iSDUErrorRatio = iQoSR99_R4Negotiated.iSDUErrorRatio;
       
   163         gprsProfile.iTrafficHandlingPriority 
       
   164             = iQoSR99_R4Negotiated.iTrafficHandlingPriority;
       
   165         gprsProfile.iTransferDelay = iQoSR99_R4Negotiated.iTransferDelay;
       
   166         gprsProfile.iGuaranteedRate = iQoSR99_R4Negotiated.iGuaranteedRate;
       
   167         }
       
   168    // If extension is KConfigRel5
       
   169    else if ( TPacketDataConfigBase::KConfigRel5 == profile.ExtensionId() )
       
   170         { 
       
   171         
       
   172 TFLOGSTRING("TSY: CMmPacketQoSGsmWcdmaExt::GetProfileParameters. Rel 5");            
       
   173         TPckg<RPacketQoS::TQoSR5Negotiated >* gprsProfilePckg = 
       
   174                 ( TPckg<RPacketQoS::TQoSR5Negotiated >* ) aProfile;
       
   175         RPacketQoS::TQoSR5Negotiated& gprsProfile = ( *gprsProfilePckg )();
       
   176 
       
   177         gprsProfile.iTrafficClass = iQoSR5Negotiated.iTrafficClass;
       
   178         gprsProfile.iDeliveryOrderReqd =
       
   179             iQoSR5Negotiated.iDeliveryOrderReqd;
       
   180         gprsProfile.iDeliverErroneousSDU =
       
   181             iQoSR5Negotiated.iDeliverErroneousSDU;
       
   182         gprsProfile.iMaxSDUSize = iQoSR5Negotiated.iMaxSDUSize;
       
   183         gprsProfile.iMaxRate = iQoSR5Negotiated.iMaxRate;
       
   184         gprsProfile.iBER = iQoSR5Negotiated.iBER;
       
   185         gprsProfile.iSDUErrorRatio = iQoSR5Negotiated.iSDUErrorRatio;
       
   186         gprsProfile.iTrafficHandlingPriority =
       
   187             iQoSR5Negotiated.iTrafficHandlingPriority;
       
   188         gprsProfile.iTransferDelay = iQoSR5Negotiated.iTransferDelay;
       
   189         gprsProfile.iGuaranteedRate = iQoSR5Negotiated.iGuaranteedRate;	   
       
   190 	    gprsProfile.iSignallingIndication = 
       
   191             iQoSR5Negotiated.iSignallingIndication;	
       
   192 	    gprsProfile.iSourceStatisticsDescriptor =
       
   193             iQoSR5Negotiated.iSourceStatisticsDescriptor;	
       
   194         }        
       
   195         
       
   196     else 
       
   197         {
       
   198         return KErrNotSupported;
       
   199         }
       
   200 
       
   201     return KErrNone;
       
   202     }
       
   203 
       
   204 //----------------------------------------------------------------------------
       
   205 // CMmPacketQoSGsmWcdmaExt::NotifyProfileChanged
       
   206 // Saves new profile internally
       
   207 //----------------------------------------------------------------------------
       
   208 
       
   209 TInt CMmPacketQoSGsmWcdmaExt::NotifyProfileChanged(
       
   210         TDes8* aProfile )    
       
   211 	{
       
   212 
       
   213   	TPckg<TPacketDataConfigBase>* profilePckg = 
       
   214             ( TPckg<TPacketDataConfigBase>* ) aProfile;
       
   215         TPacketDataConfigBase& profile = ( *profilePckg )();
       
   216 
       
   217     if ( TPacketDataConfigBase::KConfigGPRS == profile.ExtensionId() ||
       
   218         TPacketDataConfigBase::KConfigRel99Rel4 == profile.ExtensionId()||
       
   219         TPacketDataConfigBase::KConfigRel5 == profile.ExtensionId() )
       
   220         {
       
   221         iQoSGPRSNotifyPckg = aProfile; 
       
   222         return KErrNone;
       
   223         }
       
   224 
       
   225 	return KErrNotSupported;
       
   226 
       
   227     }
       
   228 
       
   229 //----------------------------------------------------------------------------
       
   230 // CMmPacketQoSGsmWcdmaExt::NotifyProfileChangedCancel
       
   231 // Clears internally saved profile
       
   232 //----------------------------------------------------------------------------
       
   233 
       
   234 void CMmPacketQoSGsmWcdmaExt::NotifyProfileChangedCancel()
       
   235     {
       
   236 TFLOGSTRING( "TSY: CMmPacketQoSGsmWcdmaExt::NotifyProfileChangedCancel." );
       
   237 
       
   238 	iQoSGPRSNotifyPckg = NULL;
       
   239 
       
   240     }
       
   241 
       
   242 //----------------------------------------------------------------------------
       
   243 // CMmPacketQoSGsmWcdmaExt::SetProfileParametersL
       
   244 // Sends request for profile parameters to network
       
   245 //----------------------------------------------------------------------------
       
   246 
       
   247 TInt CMmPacketQoSGsmWcdmaExt::SetProfileParametersL(
       
   248         TDes8* aProfile ) 
       
   249     {
       
   250 TFLOGSTRING2("TSY: CMmPacketQoSGsmWcdmaExt::SetProfileParametersL. \t aProfile:%d", aProfile );
       
   251 
       
   252 	//Datapackage
       
   253 	CMmDataPackage data;
       
   254 
       
   255     // Initialize parameters 
       
   256     TInfoName contextName;
       
   257     RPacketContext::TProtocolType pdpType;
       
   258     TBool contextType( EFalse );
       
   259     TInfoName primaryContextName;
       
   260 
       
   261     //Get context configuration information 
       
   262     TInt ret = iMmPacketQoSTsy->PacketContextTsy()->
       
   263         PacketContextGsmWcdmaExt()->GetConfigurationData(
       
   264         contextName, pdpType, contextType, primaryContextName );
       
   265 
       
   266 	 //Get context status
       
   267     RPacketContext::TContextStatus contextStatus =
       
   268         iMmPacketQoSTsy->PacketContextTsy()->ContextStatus();
       
   269 
       
   270 	//initialize contextParams struct  
       
   271 	TContextParams	contextParams; 
       
   272 
       
   273 	contextParams.iContextName = contextName;
       
   274 	contextParams.iContextType = contextType;
       
   275 	contextParams.iPdpType = pdpType;
       
   276 	contextParams.iPrimaryContextName = primaryContextName;
       
   277 	contextParams.iContextStatus = contextStatus;
       
   278 	
       
   279 	TPckg<TPacketDataConfigBase>* profilePckg = 
       
   280 						( TPckg<TPacketDataConfigBase>* ) aProfile;
       
   281     TPacketDataConfigBase& profile = ( *profilePckg )();
       
   282 
       
   283 	//Save what client has requested
       
   284 	if ( TPacketDataConfigBase::KConfigGPRS == profile.ExtensionId() )
       
   285 		{
       
   286         TPckg<RPacketQoS::TQoSGPRSRequested >* gprsProfilePckg = 
       
   287             ( TPckg<RPacketQoS::TQoSGPRSRequested >* ) aProfile;
       
   288         RPacketQoS::TQoSGPRSRequested& gprsProfile =( *gprsProfilePckg )();
       
   289         iRequested = gprsProfile;
       
   290         iConfigurationType = TPacketDataConfigBase::KConfigGPRS;        
       
   291 
       
   292         iQoSGPRSRequested = ETrue;
       
   293         }
       
   294     else if ( TPacketDataConfigBase::KConfigRel99Rel4 == profile.ExtensionId() )
       
   295         {
       
   296         TPckg<RPacketQoS::TQoSR99_R4Requested >* gprsProfilePckg = 
       
   297              ( TPckg<RPacketQoS::TQoSR99_R4Requested >* ) aProfile;
       
   298         RPacketQoS::TQoSR99_R4Requested& gprsProfile = ( *gprsProfilePckg )();
       
   299         iRequested99 = gprsProfile;
       
   300         iConfigurationType = TPacketDataConfigBase::KConfigRel99Rel4;
       
   301 
       
   302         iQoSR99_R4Requested = ETrue;
       
   303         }
       
   304     else if ( TPacketDataConfigBase::KConfigRel5 == profile.ExtensionId() )
       
   305         {
       
   306 TFLOGSTRING("TSY: CMmPacketQoSGsmWcdmaExt::SetProfileParameters. Rel 5");   
       
   307         TPckg<RPacketQoS::TQoSR5Requested >* gprsProfilePckg = 
       
   308              ( TPckg<RPacketQoS::TQoSR5Requested >* ) aProfile;
       
   309         RPacketQoS::TQoSR5Requested& gprsProfile = ( *gprsProfilePckg )();
       
   310         iRequestedR5 = gprsProfile;
       
   311         iConfigurationType = TPacketDataConfigBase::KConfigRel5;
       
   312 
       
   313         iQoSR5Requested = ETrue;
       
   314         }
       
   315     else
       
   316         {
       
   317         ret = KErrNotSupported;		
       
   318         }
       
   319 
       
   320 
       
   321     if ( KErrNone == ret )
       
   322         {
       
   323       
       
   324         data.PackData( &contextParams, &aProfile );
       
   325         TInt err = iMmPacketService->MessageManager()->HandleRequestL( 
       
   326             EPacketQoSSetProfileParams, &data ); 
       
   327 
       
   328 		if ( KErrNone != err )
       
   329 			{
       
   330 			ret = KErrNotSupported;
       
   331 			}
       
   332 			
       
   333         iQosAsked = ETrue;
       
   334         }
       
   335 
       
   336     else
       
   337         {
       
   338         ret = KErrNotSupported;
       
   339         }
       
   340 
       
   341     return ret;
       
   342     }
       
   343 
       
   344 //----------------------------------------------------------------------------
       
   345 // CMmPacketQoSGsmWcdmaExt::CompleteSetProfileParameters
       
   346 // Completes SetProfileParameters request to client
       
   347 //----------------------------------------------------------------------------
       
   348 
       
   349 void CMmPacketQoSGsmWcdmaExt::CompleteSetProfileParameters(
       
   350 		const TInt aErrorValue )
       
   351     {
       
   352 TFLOGSTRING2("TSY: CMmPacketQoSGsmWcdmaExt::CompleteSetProfileParameters.  \t aErrorValue:%d", aErrorValue );
       
   353 
       
   354     // Call CompleteSetProfileParameters from QoS Tsy
       
   355     iMmPacketQoSTsy->CompleteSetProfileParameters( aErrorValue );
       
   356 
       
   357     }
       
   358 
       
   359 //----------------------------------------------------------------------------
       
   360 // CMmPacketQoSGsmWcdmaExt::CompleteSetProfileParameters
       
   361 // Completes the notification to client.
       
   362 // save negotiated  qos values (values returned by network) 
       
   363 //----------------------------------------------------------------------------
       
   364 
       
   365 void CMmPacketQoSGsmWcdmaExt::CompleteNotifyProfileChanged(
       
   366         CMmDataPackage* aDataPackage )
       
   367     {
       
   368 
       
   369 	TInfoName mmPacketContextName;
       
   370     
       
   371     const CMmPacketDataPackage* data = 
       
   372         reinterpret_cast<const CMmPacketDataPackage*>(aDataPackage);
       
   373     //Get Qos parameters
       
   374     data->GetProfileChanged( iQoSGPRSNegotiated, iQoSR99_R4Negotiated, 
       
   375         iQoSR5Negotiated );
       
   376     //Unpack data from datapackage
       
   377     data->UnPackData( mmPacketContextName );
       
   378 
       
   379 
       
   380 
       
   381    
       
   382 TFLOGSTRING("TSY: CMmPacketQoSGsmWcdmaExt::CompleteNotifyProfileChanged . COPY new R99/R4 default values");
       
   383 		//Copy negotiated values to minimun values
       
   384 		iRequested99.iMinTrafficClass = iQoSR99_R4Negotiated.iTrafficClass;
       
   385 	    iRequested99.iMinDeliveryOrderReqd = 
       
   386 
       
   387 
       
   388 									iQoSR99_R4Negotiated.iDeliveryOrderReqd;
       
   389 	    iRequested99.iMinDeliverErroneousSDU = 
       
   390 
       
   391 
       
   392 									iQoSR99_R4Negotiated.iDeliverErroneousSDU;
       
   393 	    iRequested99.iMinAcceptableMaxSDUSize = 
       
   394 
       
   395 
       
   396 									iQoSR99_R4Negotiated.iMaxSDUSize;
       
   397 	    iRequested99.iMinAcceptableMaxRate = iQoSR99_R4Negotiated.iMaxRate;
       
   398 	    iRequested99.iMaxBER = iQoSR99_R4Negotiated.iBER;
       
   399 	    iRequested99.iMaxSDUErrorRatio = iQoSR99_R4Negotiated.iSDUErrorRatio;
       
   400 	    iRequested99.iMinTrafficHandlingPriority = 
       
   401 
       
   402 
       
   403 						iQoSR99_R4Negotiated.iTrafficHandlingPriority;
       
   404 	    iRequested99.iMaxTransferDelay = iQoSR99_R4Negotiated.iTransferDelay;
       
   405 		iRequested99.iMinGuaranteedRate = 
       
   406 
       
   407 
       
   408 										iQoSR99_R4Negotiated.iGuaranteedRate;
       
   409 
       
   410 		//Copy negotiated values to requested values for default usage of 2nd 
       
   411         //context TFT modify
       
   412 	    iRequested99.iReqTrafficClass = iQoSR99_R4Negotiated.iTrafficClass;
       
   413 	    iRequested99.iReqDeliveryOrderReqd = 
       
   414 
       
   415 
       
   416 	                                iQoSR99_R4Negotiated.iDeliveryOrderReqd;
       
   417         iRequested99.iReqDeliverErroneousSDU = 
       
   418 
       
   419 
       
   420                                     iQoSR99_R4Negotiated.iDeliverErroneousSDU;
       
   421         iRequested99.iReqMaxSDUSize = iQoSR99_R4Negotiated.iMaxSDUSize;
       
   422         iRequested99.iReqMaxRate = iQoSR99_R4Negotiated.iMaxRate;
       
   423         iRequested99.iReqBER = iQoSR99_R4Negotiated.iBER;
       
   424         iRequested99.iReqSDUErrorRatio = iQoSR99_R4Negotiated.iSDUErrorRatio;
       
   425         iRequested99.iReqTrafficHandlingPriority = 
       
   426 
       
   427 
       
   428                                 iQoSR99_R4Negotiated.iTrafficHandlingPriority;
       
   429         iRequested99.iReqTransferDelay = iQoSR99_R4Negotiated.iTransferDelay;
       
   430         iRequested99.iReqGuaranteedRate = iQoSR99_R4Negotiated.iGuaranteedRate;
       
   431 
       
   432 
       
   433 TFLOGSTRING("TSY: CMmPacketQoSGsmWcdmaExt::CompleteNotifyProfileChanged . COPY new R97 default values");
       
   434         iRequested.iReqPrecedence = iQoSGPRSNegotiated.iPrecedence;
       
   435         iRequested.iMinPrecedence = iQoSGPRSNegotiated.iPrecedence;
       
   436 
       
   437         iRequested.iReqDelay = iQoSGPRSNegotiated.iDelay;
       
   438         iRequested.iMinDelay = iQoSGPRSNegotiated.iDelay;
       
   439 
       
   440         iRequested.iReqReliability = iQoSGPRSNegotiated.iReliability;
       
   441         iRequested.iMinReliability = iQoSGPRSNegotiated.iReliability;
       
   442 
       
   443         iRequested.iReqPeakThroughput = iQoSGPRSNegotiated.iPeakThroughput;
       
   444         iRequested.iMinPeakThroughput = iQoSGPRSNegotiated.iPeakThroughput;
       
   445 
       
   446         iRequested.iReqMeanThroughput = iQoSGPRSNegotiated.iMeanThroughput;
       
   447         iRequested.iMinMeanThroughput = iQoSGPRSNegotiated.iMeanThroughput;
       
   448         
       
   449 
       
   450 
       
   451 TFLOGSTRING("TSY: CMmPacketQoSGsmWcdmaExt::CompleteNotifyProfileChanged . COPY new R5 default values");
       
   452 
       
   453         //Copy negotiated values to minimun values
       
   454         iRequestedR5.iMinTrafficClass = iQoSR5Negotiated.iTrafficClass;
       
   455         iRequestedR5.iMinDeliveryOrderReqd = 
       
   456             iQoSR5Negotiated.iDeliveryOrderReqd;
       
   457         iRequestedR5.iMinDeliverErroneousSDU = 
       
   458             iQoSR5Negotiated.iDeliverErroneousSDU;
       
   459         iRequestedR5.iMinAcceptableMaxSDUSize = 
       
   460             iQoSR5Negotiated.iMaxSDUSize;
       
   461         iRequestedR5.iMinAcceptableMaxRate = iQoSR5Negotiated.iMaxRate;
       
   462         iRequestedR5.iMaxBER = iQoSR5Negotiated.iBER;
       
   463         iRequestedR5.iMaxSDUErrorRatio = iQoSR5Negotiated.iSDUErrorRatio;
       
   464         iRequestedR5.iMinTrafficHandlingPriority = 
       
   465             iQoSR5Negotiated.iTrafficHandlingPriority;
       
   466         iRequestedR5.iMaxTransferDelay = iQoSR5Negotiated.iTransferDelay;
       
   467         iRequestedR5.iMinGuaranteedRate = iQoSR5Negotiated.iGuaranteedRate;
       
   468 
       
   469         //Copy negotiated values to requested values for default usage of 2nd 
       
   470         //context TFT modify
       
   471         iRequestedR5.iReqTrafficClass = iQoSR5Negotiated.iTrafficClass;
       
   472         iRequestedR5.iReqDeliveryOrderReqd = 
       
   473             iQoSR5Negotiated.iDeliveryOrderReqd;
       
   474         iRequestedR5.iReqDeliverErroneousSDU =
       
   475             iQoSR5Negotiated.iDeliverErroneousSDU;
       
   476         iRequestedR5.iReqMaxSDUSize = iQoSR5Negotiated.iMaxSDUSize;
       
   477         iRequestedR5.iReqMaxRate = iQoSR5Negotiated.iMaxRate;
       
   478         iRequestedR5.iReqBER = iQoSR5Negotiated.iBER;
       
   479         iRequestedR5.iReqSDUErrorRatio = iQoSR5Negotiated.iSDUErrorRatio;
       
   480         iRequestedR5.iReqTrafficHandlingPriority = 
       
   481             iQoSR5Negotiated.iTrafficHandlingPriority;
       
   482         iRequestedR5.iReqTransferDelay = iQoSR5Negotiated.iTransferDelay;
       
   483         iRequestedR5.iReqGuaranteedRate = iQoSR5Negotiated.iGuaranteedRate;
       
   484         iRequestedR5.iSignallingIndication = 
       
   485             iQoSR5Negotiated.iSignallingIndication;
       
   486 
       
   487 
       
   488         iRequestedR5.iSourceStatisticsDescriptor = 
       
   489             iQoSR5Negotiated.iSourceStatisticsDescriptor;
       
   490         
       
   491     // If pointer iQoSGPRSNotifyPckg exist
       
   492     if ( NULL != iQoSGPRSNotifyPckg )
       
   493         {
       
   494         TBool completeToClient( EFalse );
       
   495 
       
   496         TPckg<TPacketDataConfigBase>* profilePckg = 
       
   497                 ( TPckg<TPacketDataConfigBase>* ) iQoSGPRSNotifyPckg;
       
   498         TPacketDataConfigBase& profile = ( *profilePckg )();
       
   499 
       
   500         // if client uses R97 QoS parameters and aQoSNegotiated 
       
   501         // have been set
       
   502         if ( TPacketDataConfigBase::KConfigGPRS == profile.ExtensionId() &&
       
   503             iQoSGPRSRequested )
       
   504             {
       
   505             completeToClient = ETrue;
       
   506 
       
   507             TPckg<RPacketQoS::TQoSGPRSNegotiated >* gprsProfilePckg = 
       
   508                 ( TPckg<RPacketQoS::TQoSGPRSNegotiated >* ) iQoSGPRSNotifyPckg;
       
   509             RPacketQoS::TQoSGPRSNegotiated& gprsProfile = 
       
   510                 ( *gprsProfilePckg )();
       
   511 
       
   512             // Update the client side data through pointers
       
   513             gprsProfile = iQoSGPRSNegotiated;
       
   514 
       
   515 TFLOGSTRING("TSY: CMmPacketQoSGsmWcdmaExt::CompleteNotifyProfileChanged.  R97/98 QoS Parameters in use");
       
   516             }
       
   517 
       
   518         // if client uses R99 QoS parameters and aQoS99Negotiated 
       
   519         // have been set
       
   520         else if ( TPacketDataConfigBase::KConfigRel99Rel4 ==
       
   521                  profile.ExtensionId() && iQoSR99_R4Requested )
       
   522             {
       
   523             completeToClient = ETrue;
       
   524                         
       
   525                 TPckg<RPacketQoS::TQoSR99_R4Negotiated >* gprsProfilePckg = 
       
   526                     ( TPckg<RPacketQoS::TQoSR99_R4Negotiated >* ) iQoSGPRSNotifyPckg;
       
   527                 RPacketQoS::TQoSR99_R4Negotiated& gprsProfile = 
       
   528                     ( *gprsProfilePckg )();
       
   529                                        
       
   530                 // Update the client side data through pointers
       
   531                 gprsProfile = iQoSR99_R4Negotiated;
       
   532 TFLOGSTRING("TSY: CMmPacketQoSGsmWcdmaExt::CompleteNotifyProfileChanged.  R99/R4 QoS Parameters in use");
       
   533             
       
   534             }
       
   535 
       
   536         else if ( TPacketDataConfigBase::KConfigRel5 ==
       
   537                 profile.ExtensionId() && iQoSR5Requested )
       
   538             {
       
   539             completeToClient = ETrue;
       
   540 
       
   541             TPckg<RPacketQoS::TQoSR5Negotiated >* gprsProfilePckg = 
       
   542                 ( TPckg<RPacketQoS::TQoSR5Negotiated >* ) iQoSGPRSNotifyPckg;
       
   543             RPacketQoS::TQoSR5Negotiated& gprsProfile = 
       
   544                 ( *gprsProfilePckg )();
       
   545 
       
   546             // Update the client side data through pointers
       
   547             gprsProfile = iQoSR5Negotiated;
       
   548 TFLOGSTRING("TSY: CMmPacketQoSGsmWcdmaExt::CompleteNotifyProfileChanged.  R5 QoS Parameters in use");
       
   549             }            
       
   550 
       
   551         if ( completeToClient )
       
   552             {
       
   553 
       
   554             // Null pointers as notification is completed
       
   555             iQoSGPRSNotifyPckg = NULL;
       
   556 
       
   557             // Call CompleteNotifyProfileChanged from TSY
       
   558             iMmPacketQoSTsy->CompleteNotifyProfileChanged();
       
   559                                 
       
   560             }
       
   561         }
       
   562     }
       
   563 
       
   564 //----------------------------------------------------------------------------
       
   565 // CMmPacketQoSGsmWcdmaExt::ProfileAsked
       
   566 // Return value iQosAsked is true if client has request 
       
   567 // certain Qos values
       
   568 //----------------------------------------------------------------------------
       
   569 
       
   570 TBool CMmPacketQoSGsmWcdmaExt::ProfileAsked()
       
   571     {    
       
   572     return iQosAsked;    
       
   573     }
       
   574 
       
   575 
       
   576 //----------------------------------------------------------------------------
       
   577 // CMmPacketQoSGsmWcdmaExt::RequestedR5
       
   578 // Returns Rel5 Qos values reguested by client
       
   579 //----------------------------------------------------------------------------
       
   580 RPacketQoS::TQoSR5Requested* CMmPacketQoSGsmWcdmaExt::RequestedR5()
       
   581 
       
   582     {
       
   583     return &iRequestedR5;
       
   584     }
       
   585 
       
   586 //----------------------------------------------------------------------------
       
   587 // CMmPacketQoSGsmWcdmaExt::Requested99
       
   588 // Returns 99 Qos values reguested by client
       
   589 //----------------------------------------------------------------------------
       
   590 
       
   591 RPacketQoS::TQoSR99_R4Requested* CMmPacketQoSGsmWcdmaExt::Requested99()
       
   592 
       
   593     {
       
   594     return &iRequested99;
       
   595     }
       
   596 
       
   597 
       
   598 //----------------------------------------------------------------------------
       
   599 // CMmPacketQoSGsmWcdmaExt::Requested97
       
   600 // Returns 97/98 Qos values reguested by client
       
   601 //----------------------------------------------------------------------------
       
   602 
       
   603 RPacketQoS::TQoSGPRSRequested* CMmPacketQoSGsmWcdmaExt::Requested97()
       
   604     {
       
   605     return &iRequested;
       
   606     }
       
   607 
       
   608 //----------------------------------------------------------------------------
       
   609 // CMmPacketQoSGsmWcdmaExt::ConfigurationType
       
   610 // Returns return configuration type
       
   611 //----------------------------------------------------------------------------
       
   612 
       
   613 TInt CMmPacketQoSGsmWcdmaExt::ConfigurationType() const
       
   614     {
       
   615     return iConfigurationType;
       
   616     }
       
   617 
       
   618 
       
   619 //  End of File