1 // Copyright (c) 2005-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Inline Functions file for the 3GPP SubConnection Extension Parameters
26 #ifndef QOS3GPP_SUBCONPARAMS_INL
27 #define QOS3GPP_SUBCONPARAMS_INL
30 @param aFamily the sub-connection parameter family to which the newly created object is to be added
31 @param aType The type of the set from TParameterSetType (ERequested, EAcceptable or EGranted)
32 @return pointer to the created object
36 CSubConQosR99ParamSet* CSubConQosR99ParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType)
38 CSubConQosR99ParamSet* obj = NewL();
39 CleanupStack::PushL(obj);
40 aFamily.AddExtensionSetL(*obj, aType);
41 CleanupStack::Pop(obj);
46 @param aFamily the parameter family to which the newly created object is to be added
47 @param aType The type of the set from TParameterSetType (ERequested, EAcceptable or EGranted)
48 @return pointer to the created object
52 CSubConQosR99ParamSet* CSubConQosR99ParamSet::NewL(RParameterFamily& aFamily, RParameterFamily::TParameterSetType aType)
54 CSubConQosR99ParamSet* obj = NewL();
55 CleanupStack::PushL(obj);
56 aFamily.AddParameterSetL(obj, aType);
57 CleanupStack::Pop(obj);
62 @return pointer to the created object
66 CSubConQosR99ParamSet* CSubConQosR99ParamSet::NewL()
68 STypeId typeId = STypeId::CreateSTypeId(KSubCon3GPPExtParamsFactoryUid, KSubConQosR99ParamsType);
69 return static_cast<CSubConQosR99ParamSet*>(CSubConParameterSet::NewL(typeId));
76 CSubConQosR99ParamSet::CSubConQosR99ParamSet()
77 : CSubConExtensionParameterSet(),
78 iTrafficClass(RPacketQoS::ETrafficClassUnspecified),
79 iDeliveryOrder(RPacketQoS::EDeliveryOrderUnspecified),
80 iDeliveryOfErroneusSdu(RPacketQoS::EErroneousSDUDeliveryUnspecified),
81 iResidualBer(RPacketQoS::EBERUnspecified),
82 iErrorRatio(RPacketQoS::ESDUErrorRatioUnspecified),
83 iPriority(RPacketQoS::ETrafficPriorityUnspecified),
87 iMaxBitrateDownlink(0),
89 iGuaBitrateDownlink(0)
93 /** Identifies the current traffic class. Traffic class is; Converstional, Streaming, Interactive or Background.
95 @return the traffic class
99 RPacketQoS::TTrafficClass CSubConQosR99ParamSet::GetTrafficClass() const
101 return iTrafficClass;
104 /** Current delivery order. Indicates whether the bearer shall provide in-sequence SDU delivery or not.
105 @return Current delivery order.
109 RPacketQoS::TDeliveryOrder CSubConQosR99ParamSet::GetDeliveryOrder() const
111 return iDeliveryOrder;
114 /** Current delivery of erroneous SDUs. Indicates whether SDUs detected as erroneous shall be delivered or discarded.
115 @return Current delivery of erroneous SDUs.
119 RPacketQoS::TErroneousSDUDelivery CSubConQosR99ParamSet::GetErroneousSDUDelivery() const
121 return iDeliveryOfErroneusSdu;
124 /** Indicates the undetected bit error ratio in the delivered SDUs. If no error detection is
125 requested, Residual bit error ratio indicates the bit error ratio in
127 @return the residual bit error ratio.
131 RPacketQoS::TBitErrorRatio CSubConQosR99ParamSet::GetResidualBitErrorRatio() const
136 /** Indicates the fraction of SDUs lost or detected as erroneous.
137 @return the SDU error ratio.
141 RPacketQoS::TSDUErrorRatio CSubConQosR99ParamSet::GetSDUErrorRatio() const
146 /** Current traffic handling priority. Specifies the relative importance for handling of all SDUs
147 belonging to the UMTS bearer compared to the SDUs of other bearers. This is defined only for
148 Interactive traffic class. See 3GPP TS 23.107
149 @return the traffic handling priority.
153 RPacketQoS::TTrafficHandlingPriority CSubConQosR99ParamSet::GetTrafficHandlingPriority() const
158 /** @return the transfer delay. Indicates maximum delay for 95th percentile of the distribution
159 of delay for all delivered SDUs during the lifetime of a bearer service, where delay for an SDU
160 is defined as the time from a request to transfer an SDU at one SAP to its delivery at the other
165 TInt CSubConQosR99ParamSet::GetTransferDelay() const
167 return iTransferDelay;
170 /** @return the maximum SDU size.
174 TInt CSubConQosR99ParamSet::GetMaxSduSize() const
179 /** @return Current maximum bitrate for uplink direction. The traffic is conformant with Maximum
180 bitrate as long as it follows a token bucket algorithm where token rate equals Maximum bitrate
181 and bucket size equals Maximum SDU size.
185 TInt CSubConQosR99ParamSet::GetMaxBitrateUplink() const
187 return iMaxBitrateUplink;
190 /** Getter function for the maximum downlink bit rate.
191 @return the maximum downlink bit rate.
195 TInt CSubConQosR99ParamSet::GetMaxBitrateDownlink() const
197 return iMaxBitrateDownlink;
200 /** Getter function for the guaranteed uplink bit rate.
201 @return the guaranteed uplink bit rate.
205 TInt CSubConQosR99ParamSet::GetGuaBitrateUplink() const
207 return iGuaBitrateUplink;
210 /** Getter function for the guaranteed downlink bit rate.
211 @return the guaranteed downlink bit rate.
215 TInt CSubConQosR99ParamSet::GetGuaBitrateDownlink() const
217 return iGuaBitrateDownlink;
220 /** Sets the traffic class.
221 @param aTrafficClass Value to which to set the traffic class.
225 void CSubConQosR99ParamSet::SetTrafficClass(RPacketQoS::TTrafficClass aTrafficClass)
227 iTrafficClass = aTrafficClass;
230 /** Sets the delivery order. Indicates whether in-sequence SDU delivery shall be provided or not.
231 @param aDeliveryOrder Value to which to set the delivery order.
235 void CSubConQosR99ParamSet::SetDeliveryOrder(RPacketQoS::TDeliveryOrder aDeliveryOrder)
237 iDeliveryOrder = aDeliveryOrder;
240 /** Sets the handling of the delivery of erroneous SDUs
241 @param aDeliveryOfErroneusSdu Value to which to set the dilvery of erroneous SDUs.
242 Indicates whether SUDs detected as erroneous shall be delivered or discarded.
246 void CSubConQosR99ParamSet::SetErroneousSDUDelivery(RPacketQoS::TErroneousSDUDelivery aDeliveryOfErroneusSdu)
248 iDeliveryOfErroneusSdu = aDeliveryOfErroneusSdu;
251 /** Sets the residual bit error ratio. Indicates the undetected bit error ratio in the delivered SDUs.
252 If no error detection is requested, Residual bit error ratio indicates the bit error ratio in the delivered SDUs.
253 @param aResidualBer Value to which to set the residual bit error ratio.
257 void CSubConQosR99ParamSet::SetResidualBitErrorRatio(RPacketQoS::TBitErrorRatio aResidualBer)
259 iResidualBer = aResidualBer;
262 /** Sets the error ratio. Indicates the fraction of SDUs lost or detected as erroneous.
263 SDU error ratio is defined only for conforming traffic.
264 @param aErrorRatio Sets the error ratio. Indicates the fraction of SDUs lost or detected as erroneous.
265 SDU error ratio is defined only for conforming traffic.
269 void CSubConQosR99ParamSet::SetSDUErrorRatio(RPacketQoS::TSDUErrorRatio aErrorRatio)
271 iErrorRatio = aErrorRatio;
274 /** Sets the traffic handling priority.
275 @param aPriority Value to which to set the traffic handling priority.
279 void CSubConQosR99ParamSet::SetTrafficHandlingPriority(RPacketQoS::TTrafficHandlingPriority aPriority)
281 iPriority = aPriority;
284 /** Sets the transfer delay. Indicates maximum delay for 95th percentile of the distribution of delay for
285 all delivered SDUs during the lifetime of a bearer service, where delay for an SDU is defined as the time
286 from a request to transfer an SDU at one SAP to its delivery at the other SAP.
287 @param aTransferDelay Value to which to set the transfer delay.
291 void CSubConQosR99ParamSet::SetTransferDelay(TInt aTransferDelay)
293 iTransferDelay = aTransferDelay;
296 /** Sets the maximum SDU size. Defines the maximum allowed SDU size.
297 @param aMaxSduSize Value to which to set the maximum SDU size.
301 void CSubConQosR99ParamSet::SetMaxSduSize(TInt aMaxSduSize)
303 iMaxSduSize = aMaxSduSize;
306 /** Sets the maximum bitrate for uplink direction. The traffic is conformant with Maximum bitrate as
307 long as it follows a token bucket algorithm where token rate equals Maximum bitrate and bucket size
308 equals Maximum SDU size.
309 @param aMaxBitrate Value to which to set the maximum bitrate for uplink direction.
313 void CSubConQosR99ParamSet::SetMaxBitrateUplink(TInt aMaxBitrateUplink)
315 iMaxBitrateUplink = aMaxBitrateUplink;
318 /** Sets the maximum bitrate for downlink direction. The traffic is conformant with Maximum bitrate as
319 long as it follows a token bucket algorithm where token rate equals Maximum bitrate and bucket size
320 equals Maximum SDU size.
321 @param aMaxBitrate Value to which to set the maximum bitrate for downlink direction.
325 void CSubConQosR99ParamSet::SetMaxBitrateDownlink(TInt aMaxBitrateDownlink)
327 iMaxBitrateDownlink = aMaxBitrateDownlink;
330 /** Sets the guaranteed bitrate for uplink direction.
331 @param aGuaBitrateUplink Value to which to set the guaranteed SDU size.
335 void CSubConQosR99ParamSet::SetGuaBitrateUplink(TInt aGuaBitrateUplink)
337 iGuaBitrateUplink = aGuaBitrateUplink;
340 /** Sets the guaranteed bitrate for downlink direction.
341 @param aGuaBitrateDownlink Value to which to set the guaranteed SDU size.
345 void CSubConQosR99ParamSet::SetGuaBitrateDownlink(TInt aGuaBitrateDownlink)
347 iGuaBitrateDownlink = aGuaBitrateDownlink;
351 #ifdef SYMBIAN_NETWORKING_UMTSR5
353 @param aFamily the sub-connection parameter family to which the newly created object is to be added
354 @param aType The type of the set from TParameterSetType (ERequested, EAcceptable or EGranted)
355 @return pointer to the created object
357 CSubConImsExtParamSet* CSubConImsExtParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType)
359 CSubConImsExtParamSet* obj = NewL();
360 CleanupStack::PushL(obj);
361 aFamily.AddExtensionSetL(*obj, aType);
362 CleanupStack::Pop(obj);
367 @param aFamily the parameter family to which the newly created object is to be added
368 @param aType The type of the set from TParameterSetType (ERequested, EAcceptable or EGranted)
369 @return pointer to the created object
371 CSubConImsExtParamSet* CSubConImsExtParamSet::NewL(RParameterFamily& aFamily, RParameterFamily::TParameterSetType aType)
373 CSubConImsExtParamSet* obj = NewL();
374 CleanupStack::PushL(obj);
375 aFamily.AddParameterSetL(obj, aType);
376 CleanupStack::Pop(obj);
381 @return pointer to the created object
383 CSubConImsExtParamSet* CSubConImsExtParamSet::NewL()
385 STypeId typeId = STypeId::CreateSTypeId(KSubCon3GPPExtParamsFactoryUid, KSubConImsExtParamsType);
386 return static_cast<CSubConImsExtParamSet*>(CSubConParameterSet::NewL(typeId));
389 CSubConImsExtParamSet::CSubConImsExtParamSet()
390 : iImsSignallingIndicator(EFalse)
394 /** @return the IMS Signalling Indicator flag for 3GPP R5 dedicated signalling PDP contexts.
396 TBool CSubConImsExtParamSet::GetImsSignallingIndicator() const
398 return iImsSignallingIndicator;
401 /** Sets the IMS Signalling Indicator flag for 3GPP R5 dedicated signalling PDP contexts.
402 @param aImsSignallingIndicator Value to which to set the IMS signalling indicator. */
403 void CSubConImsExtParamSet::SetImsSignallingIndicator(TBool aImsSignallingIndicator)
405 iImsSignallingIndicator = aImsSignallingIndicator;
409 @param aFamily the sub-connection parameter family to which the newly created object is to be added
410 @param aType The type of the set from TParameterSetType (ERequested, EAcceptable or EGranted)
411 @return pointer to the created object
413 CSubConQosR5ParamSet* CSubConQosR5ParamSet::NewL(CSubConParameterFamily& aFamily,CSubConParameterFamily::TParameterSetType aType)
415 CSubConQosR5ParamSet* obj = NewL();
416 CleanupStack::PushL(obj);
417 aFamily.AddExtensionSetL(*obj, aType);
418 CleanupStack::Pop(obj);
423 @param aFamily the parameter family to which the newly created object is to be added
424 @param aType The type of the set from TParameterSetType (ERequested, EAcceptable or EGranted)
425 @return pointer to the created object
427 CSubConQosR5ParamSet* CSubConQosR5ParamSet::NewL(RParameterFamily& aFamily, RParameterFamily::TParameterSetType aType)
429 CSubConQosR5ParamSet* obj = NewL();
430 CleanupStack::PushL(obj);
431 aFamily.AddParameterSetL(obj, aType);
432 CleanupStack::Pop(obj);
437 @return pointer to the created object
439 CSubConQosR5ParamSet* CSubConQosR5ParamSet::NewL()
441 STypeId typeId = STypeId::CreateSTypeId(KSubCon3GPPExtParamsFactoryUid, KSubConQosR5ParamsType);
442 return static_cast<CSubConQosR5ParamSet*>(CSubConParameterSet::NewL(typeId));
447 CSubConQosR5ParamSet::CSubConQosR5ParamSet()
448 : iSrcStatsDesc(RPacketQoS::ESourceStatisticsDescriptorUnknown), iSignallingIndicator(EFalse)
452 /** Gets the signalling nature of the SDU's. Signalling traffic can have different characteristics
453 to other interactive traffic, eg higher priority, lower delay and increased peakiness. This attribute
454 permits enhancing the Radio Access Network (RAN) operation accordingly. See 3GPP TS 23.107
455 @return the signalling nature of the SDU's.
457 TBool CSubConQosR5ParamSet::GetSignallingIndicator() const
459 return iSignallingIndicator;
462 /** Sets signalling nature of the SDU's. This attribute is additional to the other QoS
463 attributes and does not over-ride them. Signalling traffic can have different characteristics
464 to other interactive traffic, eg higher priority, lower delay and increased peakiness. This
465 attribute permits enhancing the Radio Access Network (RAN) operation accordingly. An example use of
466 the Signalling Indication is for IMS signalling traffic. See 3GPP TS 23.107
467 @param aSignallingIndicator Value to which to set the signalling indicator. */
468 void CSubConQosR5ParamSet::SetSignallingIndicator(TBool aSignallingIndicator)
470 iSignallingIndicator = aSignallingIndicator;
473 /** @return the source of the SDU's. */
474 RPacketQoS::TSourceStatisticsDescriptor CSubConQosR5ParamSet::GetSourceStatisticsDescriptor() const
476 return iSrcStatsDesc;
479 /** Sets the source characteristic of the SDU's. Conversational speech has a well-known statistical
480 behaviour (or the discontinuous transmission (DTX) factor). By being informed that the SDUs for a Radio
481 Access Bearer (RAB) are generated by a speech source, Radio Access Network (RAN) may, based on experience,
482 calculate a statistical multiplex gain for use in admission control on the radio and RAN Access interfaces.
483 @param aSrcStatsDescType Value to which to set the source statistics indicator. */
484 void CSubConQosR5ParamSet::SetSourceStatisticsDescriptor(RPacketQoS::TSourceStatisticsDescriptor aSrcStatsDescType)
486 iSrcStatsDesc = aSrcStatsDescType;
490 // SYMBIAN_NETWORKING_UMTSR5
492 /** the Media Component number as specified in 3GPP TS 29.207
493 @return the media component number portion of the flow identifier
497 TUint16 TFlowId::GetMediaComponentNumber() const
499 return iMediaComponentNumber;
502 /** the IP flow number as specified in 3GPP TS 29.207
503 @return the IP flow portion of the flow identifier
507 TUint16 TFlowId::GetIPFlowNumber() const
509 return iIPFlowNumber;
512 /** Sets the media component number portion of the flow identifier. The Media Component number is specified in 3GPP TS 29.207
513 @param aMediaComponentNumber the media component portion of the flow identifier
517 void TFlowId::SetMediaComponentNumber(TUint16 aMediaComponentNumber)
519 iMediaComponentNumber = aMediaComponentNumber;
523 @param the IP flow portion of the flow identifier.
527 void TFlowId::SetIPFlowNumber(TUint16 aIPFlowNumber)
529 iIPFlowNumber = aIPFlowNumber;
533 //===========================
534 // Implementation Extension class
539 CSubConSBLPR5ExtensionParamSet::CSubConSBLPR5ExtensionParamSet()
540 : CSubConExtensionParameterSet()
548 CSubConSBLPR5ExtensionParamSet::~CSubConSBLPR5ExtensionParamSet()
554 @param aFamily the sub-connection parameter family to which the newly created object is to be added
555 @param aType The type of the set from TParameterSetType (ERequested, EAcceptable or EGranted)
556 @return pointer to the created object
560 CSubConSBLPR5ExtensionParamSet* CSubConSBLPR5ExtensionParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType)
562 CSubConSBLPR5ExtensionParamSet* sblpExtn = NewL();
563 CleanupStack::PushL(sblpExtn);
564 aFamily.AddExtensionSetL(*sblpExtn, aType);
565 CleanupStack::Pop(sblpExtn);
570 @param aFamily the parameter family to which the newly created object is to be added
571 @param aType The type of the set from TParameterSetType (ERequested, EAcceptable or EGranted)
572 @return pointer to the created object
576 CSubConSBLPR5ExtensionParamSet* CSubConSBLPR5ExtensionParamSet::NewL(RParameterFamily& aFamily, RParameterFamily::TParameterSetType aType)
578 CSubConSBLPR5ExtensionParamSet* obj = NewL();
579 CleanupStack::PushL(obj);
580 aFamily.AddParameterSetL(obj, aType);
581 CleanupStack::Pop(obj);
586 @return pointer to the created object
590 CSubConSBLPR5ExtensionParamSet* CSubConSBLPR5ExtensionParamSet::NewL()
592 STypeId typeId = STypeId::CreateSTypeId(KSubCon3GPPExtParamsFactoryUid, KSubConnSBLPR5ExtensionParamsType);
593 return static_cast<CSubConSBLPR5ExtensionParamSet*>(CSubConParameterSet::NewL(typeId));
597 @return the media authorisation token
601 const TAuthToken& CSubConSBLPR5ExtensionParamSet::GetMAT() const
607 @param aAuthToken sets the media authorisation token
611 void CSubConSBLPR5ExtensionParamSet::SetMAT(const TAuthToken& aAuthToken)
613 iAuthToken = aAuthToken;
617 @return the number of flow indexes in this session
621 TInt CSubConSBLPR5ExtensionParamSet::GetNumberOfFlowIds() const
623 return iFlowIds.Count();
627 @param aIndex the index of the flow identifier that will be returned.
628 @return the flow identifier at the index given by aIndex.
632 const TFlowId& CSubConSBLPR5ExtensionParamSet::GetFlowIdAt(TInt aIndex) const
634 return iFlowIds[aIndex];
637 /** adds a flow identifier to this session.
638 @param aFlowId the flow indentifier to be added.
642 void CSubConSBLPR5ExtensionParamSet::AddFlowIdL(const TFlowId & aFlowId)
644 iFlowIds.AppendL(aFlowId);
648 // QOS3GPP_SUBCONPARAMS_INL