telephonyprotocols/pdplayer/umts/spudfsm/inc/pdpfsmnmspace.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2004-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 // Common header for pdp FSM
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file 
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #ifndef PDPFSMNMSPACE_H
       
    24 #define PDPFSMNMSPACE_H
       
    25 
       
    26 #include <etelqos.h>
       
    27 #include <networking/mbmsparams.h>//for MBMS Extension Set Operation
       
    28 
       
    29 namespace PdpFsm
       
    30 {
       
    31 // Needs to be big enough to hold the largest of the context config structures
       
    32 const TInt KContextConfigBufferSize = 1024;
       
    33 /** completion and notification signals */
       
    34 enum TEtelSignal
       
    35 	{
       
    36 	EPhoneOpened,
       
    37 	EPhoneOpenedFailed,
       
    38 	
       
    39 	EQoSSet,
       
    40 	EQoSSetFailed,
       
    41 	ETftSet,
       
    42 	ETftSetFailed,
       
    43 	ETftChanged,
       
    44 	ETftChangedFailed,
       
    45 	
       
    46 	E1ryPdpContextCreated,
       
    47 	E1ryPdpContextCreatedFailed,
       
    48 	E2ryPdpContextCreated,
       
    49 	E2ryPdpContextCreatedFailed,
       
    50 	
       
    51 	EMbmsPdpContextCreated,
       
    52 	EMbmsPdpContextCreatedFailed,
       
    53 	EMbmsActivated,
       
    54 	EMbmsActivatedFailed,
       
    55 	EPdpNegQoSRetrieved,
       
    56 	EPdpNegQoSRetrievedFailed,
       
    57 	EPdpContextModified,
       
    58 	EPdpContextModifiedFailed,
       
    59 	EPdpActivated,
       
    60 	EPdpActivatedFailed,
       
    61 	EContextDeleted,
       
    62 	EContextDeletedFailed,
       
    63 	// add new signals here
       
    64 	
       
    65 	// network signals
       
    66 	EQoSProfileChangeNetwork,
       
    67 	EConfigGPRSChangeNetwork,
       
    68 	EContextStatusChangeNetwork,
       
    69 	EServiceStatusChangeNetwork,
       
    70 	EPacketStatusChangeNetwork,
       
    71 	// add new signals here
       
    72 	
       
    73 	ESentinelSignal
       
    74 	};
       
    75 } // namespace PdpFsm
       
    76 
       
    77 
       
    78 
       
    79 
       
    80 /**
       
    81 A buffer to potentially hold one of the following:
       
    82 Unfortuntely can't use a union for these since they have default ctors.
       
    83 
       
    84 RPacketQoS::TQoSR99_R4Negotiated
       
    85 RPacketQoS::TQoSR5Negotiated
       
    86 
       
    87 @internalComponent
       
    88 */
       
    89 struct TNegotiatedProfileBuffer
       
    90     {
       
    91 private:    
       
    92 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
    93     RPacketQoS::TQoSR5Negotiated iNegotiatedBuffer;
       
    94 #else
       
    95     RPacketQoS::TQoSR99_R4Negotiated iNegotiatedBuffer;
       
    96 #endif    
       
    97     
       
    98 public:
       
    99     inline TInt ExtensionId();
       
   100 
       
   101     inline const RPacketQoS::TQoSR99_R4Negotiated& NegotiatedQoSR99_R4();
       
   102     inline TNegotiatedProfileBuffer& operator=(const RPacketQoS::TQoSR99_R4Negotiated& aParam);
       
   103     
       
   104 #ifdef SYMBIAN_NETWORKING_UMTSR5    
       
   105     inline const RPacketQoS::TQoSR5Negotiated& NegotiatedQoSR5();
       
   106     inline TNegotiatedProfileBuffer& operator=(const RPacketQoS::TQoSR5Negotiated& aParam);
       
   107 #endif    
       
   108     };
       
   109     
       
   110 
       
   111 struct TRequestedProfileBuffer
       
   112     {
       
   113 private:
       
   114     // Use R5 since its the largest
       
   115 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
   116     RPacketQoS::TQoSR5Requested iRequestedBuffer;
       
   117 #else
       
   118     RPacketQoS::TQoSR99_R4Requested iRequestedBuffer;
       
   119 #endif  
       
   120 
       
   121 public:
       
   122     inline TInt ExtensionId();
       
   123 
       
   124     inline const RPacketQoS::TQoSR99_R4Requested& RequestedQoSR99_R4();
       
   125     inline TRequestedProfileBuffer& operator=(const RPacketQoS::TQoSR99_R4Requested& aParam);
       
   126 
       
   127 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
   128     inline const RPacketQoS::TQoSR5Requested& RequestedQoSR5();
       
   129     inline TRequestedProfileBuffer& operator=(const RPacketQoS::TQoSR5Requested& aParam);
       
   130 #endif    
       
   131     };
       
   132 
       
   133 
       
   134 inline TInt TNegotiatedProfileBuffer::ExtensionId()
       
   135     {
       
   136     return (reinterpret_cast<TPacketDataConfigBase&>(iNegotiatedBuffer)).ExtensionId();
       
   137     }
       
   138 
       
   139 
       
   140 inline const RPacketQoS::TQoSR99_R4Negotiated& TNegotiatedProfileBuffer::NegotiatedQoSR99_R4()
       
   141     {
       
   142     return reinterpret_cast<RPacketQoS::TQoSR99_R4Negotiated&>(iNegotiatedBuffer);
       
   143     }
       
   144 
       
   145 
       
   146 inline TNegotiatedProfileBuffer& TNegotiatedProfileBuffer::operator=(const RPacketQoS::TQoSR99_R4Negotiated& aParam)
       
   147     {
       
   148     // Use this tmp value, since its ExtensionId is set when it is constructed.
       
   149     // Can't trust the ExtensionId of struct passed in.
       
   150 
       
   151 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
   152     // If we support R5 then store as R5
       
   153     RPacketQoS::TQoSR5Negotiated tmp; 
       
   154     tmp.iSignallingIndication = EFalse;
       
   155     tmp.iSourceStatisticsDescriptor = RPacketQoS::ESourceStatisticsDescriptorUnknown;
       
   156 
       
   157 #else
       
   158     RPacketQoS::TQoSR99_R4Negotiated tmp; 
       
   159 #endif
       
   160 
       
   161     tmp.iBER = aParam.iBER;
       
   162     tmp.iDeliverErroneousSDU = aParam.iDeliverErroneousSDU;
       
   163     tmp.iDeliveryOrderReqd = aParam.iDeliveryOrderReqd;
       
   164     tmp.iGuaranteedRate = aParam.iGuaranteedRate;
       
   165     tmp.iMaxRate = aParam.iMaxRate;
       
   166     tmp.iMaxSDUSize = aParam.iMaxSDUSize;
       
   167     tmp.iSDUErrorRatio = aParam.iSDUErrorRatio;
       
   168     tmp.iTrafficClass = aParam.iTrafficClass;
       
   169     tmp.iTrafficHandlingPriority = aParam.iTrafficHandlingPriority;
       
   170     tmp.iTransferDelay = aParam.iTransferDelay;
       
   171     
       
   172     iNegotiatedBuffer = tmp;
       
   173 
       
   174     return *this;
       
   175     }
       
   176 
       
   177 
       
   178 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
   179 inline const RPacketQoS::TQoSR5Negotiated& TNegotiatedProfileBuffer::NegotiatedQoSR5()
       
   180     {
       
   181     return iNegotiatedBuffer;
       
   182     }
       
   183 
       
   184 
       
   185 inline TNegotiatedProfileBuffer& TNegotiatedProfileBuffer::operator=(const RPacketQoS::TQoSR5Negotiated& aParam)
       
   186     {
       
   187     // Use this tmp value, since its ExtensionId is set when it is constructed.
       
   188     // Can't trust the ExtensionId of struct passed in.
       
   189     RPacketQoS::TQoSR5Negotiated tmp;
       
   190 
       
   191     tmp.iBER = aParam.iBER;
       
   192     tmp.iDeliverErroneousSDU = aParam.iDeliverErroneousSDU;
       
   193     tmp.iDeliveryOrderReqd = aParam.iDeliveryOrderReqd;
       
   194     tmp.iGuaranteedRate = aParam.iGuaranteedRate;
       
   195     tmp.iMaxRate = aParam.iMaxRate;
       
   196     tmp.iMaxSDUSize = aParam.iMaxSDUSize;
       
   197     tmp.iSDUErrorRatio = aParam.iSDUErrorRatio;
       
   198     tmp.iTrafficClass = aParam.iTrafficClass;
       
   199     tmp.iTrafficHandlingPriority = aParam.iTrafficHandlingPriority;
       
   200     tmp.iTransferDelay = aParam.iTransferDelay;
       
   201     tmp.iSignallingIndication = aParam.iSignallingIndication;
       
   202     tmp.iSourceStatisticsDescriptor = aParam.iSourceStatisticsDescriptor;
       
   203  
       
   204     iNegotiatedBuffer = tmp;
       
   205 
       
   206     return *this;
       
   207     }
       
   208 #endif
       
   209 
       
   210     
       
   211 
       
   212 
       
   213 inline TInt TRequestedProfileBuffer::ExtensionId()
       
   214     {
       
   215     return (reinterpret_cast<TPacketDataConfigBase&>(iRequestedBuffer)).ExtensionId();
       
   216     }
       
   217 
       
   218     
       
   219 inline const RPacketQoS::TQoSR99_R4Requested& TRequestedProfileBuffer::RequestedQoSR99_R4()
       
   220     {
       
   221     return reinterpret_cast<RPacketQoS::TQoSR99_R4Requested&>(iRequestedBuffer);
       
   222     }
       
   223 
       
   224     
       
   225 inline TRequestedProfileBuffer& TRequestedProfileBuffer::operator=(const RPacketQoS::TQoSR99_R4Requested& aParam)
       
   226     {
       
   227     // Use this tmp value, since its ExtensionId is set when it is constructed.
       
   228     // Can't trust the ExtensionId of struct passed in.
       
   229 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
   230     // If we support R5 then store as R5
       
   231     RPacketQoS::TQoSR5Requested tmp;
       
   232     tmp.iSignallingIndication = EFalse;
       
   233     tmp.iSourceStatisticsDescriptor = RPacketQoS::ESourceStatisticsDescriptorUnknown;
       
   234 
       
   235 #else
       
   236     // If we don't support R5 then store as R4/R99
       
   237     RPacketQoS::TQoSR99_R4Requested tmp;
       
   238 #endif
       
   239 
       
   240     tmp.iReqTrafficClass = aParam.iReqTrafficClass;
       
   241     tmp.iMinTrafficClass = aParam.iMinTrafficClass;
       
   242     tmp.iReqDeliveryOrderReqd = aParam.iReqDeliveryOrderReqd;
       
   243     tmp.iMinDeliveryOrderReqd = aParam.iMinDeliveryOrderReqd;
       
   244     tmp.iReqDeliverErroneousSDU = aParam.iReqDeliverErroneousSDU;
       
   245     tmp.iMinDeliverErroneousSDU = aParam.iMinDeliverErroneousSDU;
       
   246     tmp.iReqMaxSDUSize = aParam.iReqMaxSDUSize;
       
   247     tmp.iMinAcceptableMaxSDUSize = aParam.iMinAcceptableMaxSDUSize;
       
   248     tmp.iReqMaxRate = aParam.iReqMaxRate;
       
   249     tmp.iMinAcceptableMaxRate = aParam.iMinAcceptableMaxRate;
       
   250     tmp.iReqBER = aParam.iReqBER;
       
   251     tmp.iMaxBER = aParam.iMaxBER;
       
   252     tmp.iReqSDUErrorRatio = aParam.iReqSDUErrorRatio;
       
   253     tmp.iMaxSDUErrorRatio = aParam.iMaxSDUErrorRatio;
       
   254     tmp.iReqTrafficHandlingPriority = aParam.iReqTrafficHandlingPriority;
       
   255     tmp.iMinTrafficHandlingPriority = aParam.iMinTrafficHandlingPriority;
       
   256     tmp.iReqTransferDelay = aParam.iReqTransferDelay;
       
   257     tmp.iMaxTransferDelay = aParam.iMaxTransferDelay;
       
   258     tmp.iReqGuaranteedRate = aParam.iReqGuaranteedRate;
       
   259     tmp.iMinGuaranteedRate = aParam.iMinGuaranteedRate;
       
   260  
       
   261     iRequestedBuffer = tmp;
       
   262 
       
   263     return *this;
       
   264     }
       
   265 
       
   266 
       
   267 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
   268 inline const RPacketQoS::TQoSR5Requested& TRequestedProfileBuffer::RequestedQoSR5()
       
   269     {
       
   270     return iRequestedBuffer;
       
   271     }
       
   272     
       
   273     
       
   274 inline TRequestedProfileBuffer& TRequestedProfileBuffer::operator=(const RPacketQoS::TQoSR5Requested& aParam)
       
   275     {
       
   276     // Use this tmp value, since its ExtensionId is set when it is constructed.
       
   277     // Can't trust the ExtensionId of struct passed in.
       
   278     RPacketQoS::TQoSR5Requested tmp; 
       
   279 
       
   280     tmp.iReqTrafficClass = aParam.iReqTrafficClass;
       
   281     tmp.iMinTrafficClass = aParam.iMinTrafficClass;
       
   282     tmp.iReqDeliveryOrderReqd = aParam.iReqDeliveryOrderReqd;
       
   283     tmp.iMinDeliveryOrderReqd = aParam.iMinDeliveryOrderReqd;
       
   284     tmp.iReqDeliverErroneousSDU = aParam.iReqDeliverErroneousSDU;
       
   285     tmp.iMinDeliverErroneousSDU = aParam.iMinDeliverErroneousSDU;
       
   286     tmp.iReqMaxSDUSize = aParam.iReqMaxSDUSize;
       
   287     tmp.iMinAcceptableMaxSDUSize = aParam.iMinAcceptableMaxSDUSize;
       
   288     tmp.iReqMaxRate = aParam.iReqMaxRate;
       
   289     tmp.iMinAcceptableMaxRate = aParam.iMinAcceptableMaxRate;
       
   290     tmp.iReqBER = aParam.iReqBER;
       
   291     tmp.iMaxBER = aParam.iMaxBER;
       
   292     tmp.iReqSDUErrorRatio = aParam.iReqSDUErrorRatio;
       
   293     tmp.iMaxSDUErrorRatio = aParam.iMaxSDUErrorRatio;
       
   294     tmp.iReqTrafficHandlingPriority = aParam.iReqTrafficHandlingPriority;
       
   295     tmp.iMinTrafficHandlingPriority = aParam.iMinTrafficHandlingPriority;
       
   296     tmp.iReqTransferDelay = aParam.iReqTransferDelay;
       
   297     tmp.iMaxTransferDelay = aParam.iMaxTransferDelay;
       
   298     tmp.iReqGuaranteedRate = aParam.iReqGuaranteedRate;
       
   299     tmp.iMinGuaranteedRate = aParam.iMinGuaranteedRate;
       
   300     tmp.iSignallingIndication = aParam.iSignallingIndication;
       
   301     tmp.iSourceStatisticsDescriptor = aParam.iSourceStatisticsDescriptor;
       
   302 
       
   303     iRequestedBuffer = tmp; 
       
   304     
       
   305     return *this;
       
   306     }
       
   307 #endif    
       
   308 
       
   309 struct TSessionOperatioInfo
       
   310 	{
       
   311 	ConnectionServ::CSubConMBMSExtensionParamSet::TOperationType iOperation;
       
   312 	RArray<TUint> iSessionIds;	
       
   313 	inline TSessionOperatioInfo& operator=(const TSessionOperatioInfo& aParam);
       
   314 
       
   315 	};
       
   316 
       
   317 
       
   318 typedef TPckg<TNegotiatedProfileBuffer> TNegotiatedProfileBufferPckg;
       
   319 typedef TPckg<TRequestedProfileBuffer>  TRequestedProfileBufferPckg;
       
   320 
       
   321 inline TSessionOperatioInfo& TSessionOperatioInfo::operator=(const TSessionOperatioInfo& aParam)
       
   322     {
       
   323 
       
   324     this->iOperation = aParam.iOperation;
       
   325     this->iSessionIds.Reset();
       
   326 	for(TInt i=0;i<aParam.iSessionIds.Count();i++)
       
   327 		{
       
   328 		this->iSessionIds.Append(aParam.iSessionIds[i]);
       
   329 		}
       
   330 	return *this;
       
   331 	
       
   332     }
       
   333 	
       
   334 #endif
       
   335 // PDPFSMNMSPACE_H