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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Inline Functions file for the 3GPP SubConnection Extension Parameters
27 #ifndef QOS3GPP_SUBCONPARAMS_INL
28 #define QOS3GPP_SUBCONPARAMS_INL
31 @param aFamily the sub-connection parameter to which the newly created object is to be added
32 @param aType The type of the set from TParameterSetType (ERequested, EAcceptable or EGranted)
33 @return pointer to the created object
35 CSubConQosR99ParamSet* CSubConQosR99ParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType)
37 CSubConQosR99ParamSet* obj = NewL();
38 CleanupStack::PushL(obj);
39 aFamily.AddExtensionSetL(*obj, aType);
40 CleanupStack::Pop(obj);
45 @return pointer to the created object
47 CSubConQosR99ParamSet* CSubConQosR99ParamSet::NewL()
49 STypeId typeId(KSubCon3GPPExtParamsFactoryUid, KSubConQosR99ParamsType);
50 return static_cast<CSubConQosR99ParamSet*>(CSubConParameterSet::NewL(typeId));
55 CSubConQosR99ParamSet::CSubConQosR99ParamSet()
56 : CSubConExtensionParameterSet(),
57 iTrafficClass(RPacketQoS::ETrafficClassUnspecified),
58 iDeliveryOrder(RPacketQoS::EDeliveryOrderUnspecified),
59 iDeliveryOfErroneusSdu(RPacketQoS::EErroneousSDUDeliveryUnspecified),
60 iResidualBer(RPacketQoS::EBERUnspecified),
61 iErrorRatio(RPacketQoS::ESDUErrorRatioUnspecified),
62 iPriority(RPacketQoS::ETrafficPriorityUnspecified),
66 iMaxBitrateDownlink(0),
68 iGuaBitrateDownlink(0)
72 /** Identifies the current traffic class. Traffic class is; Converstional, Streaming, Interactive or Background.
74 @return the traffic class */
75 RPacketQoS::TTrafficClass CSubConQosR99ParamSet::GetTrafficClass() const
80 /** Current delivery order. Indicates whether the bearer shall provide in-sequence SDU delivery or not.
81 @return Current delivery order. */
82 RPacketQoS::TDeliveryOrder CSubConQosR99ParamSet::GetDeliveryOrder() const
84 return iDeliveryOrder;
87 /** Current delivery of erroneous SDUs. Indicates whether SDUs detected as erroneous shall be delivered or discarded.
88 @return Current delivery of erroneous SDUs. */
89 RPacketQoS::TErroneousSDUDelivery CSubConQosR99ParamSet::GetErroneousSDUDelivery() const
91 return iDeliveryOfErroneusSdu;
94 /** Indicates the undetected bit error ratio in the delivered SDUs. If no error detection is
95 requested, Residual bit error ratio indicates the bit error ratio in
97 @return the residual bit error ratio. */
98 RPacketQoS::TBitErrorRatio CSubConQosR99ParamSet::GetResidualBitErrorRatio() const
103 /** Indicates the fraction of SDUs lost or detected as erroneous.
104 @return the SDU error ratio. */
105 RPacketQoS::TSDUErrorRatio CSubConQosR99ParamSet::GetSDUErrorRatio() const
110 /** Current traffic handling priority. Specifies the relative importance for handling of all SDUs
111 belonging to the UMTS bearer compared to the SDUs of other bearers. This is defined only for
112 Interactive traffic class. See 3GPP TS 23.107
113 @return the traffic handling priority. */
114 RPacketQoS::TTrafficHandlingPriority CSubConQosR99ParamSet::GetTrafficHandlingPriority() const
119 /** @return the transfer delay. Indicates maximum delay for 95th percentile of the distribution
120 of delay for all delivered SDUs during the lifetime of a bearer service, where delay for an SDU
121 is defined as the time from a request to transfer an SDU at one SAP to its delivery at the other
123 TInt CSubConQosR99ParamSet::GetTransferDelay() const
125 return iTransferDelay;
128 /** @return the maximum SDU size. */
129 TInt CSubConQosR99ParamSet::GetMaxSduSize() const
134 /** @return Current maximum bitrate for uplink direction. The traffic is conformant with Maximum
135 bitrate as long as it follows a token bucket algorithm where token rate equals Maximum bitrate
136 and bucket size equals Maximum SDU size.
138 TInt CSubConQosR99ParamSet::GetMaxBitrateUplink() const
140 return iMaxBitrateUplink;
143 /** Getter function for the maximum downlink bit rate.
144 @return the maximum downlink bit rate. */
145 TInt CSubConQosR99ParamSet::GetMaxBitrateDownlink() const
147 return iMaxBitrateDownlink;
150 /** Getter function for the guaranteed uplink bit rate.
151 @return the guaranteed uplink bit rate. */
152 TInt CSubConQosR99ParamSet::GetGuaBitrateUplink() const
154 return iGuaBitrateUplink;
157 /** Getter function for the guaranteed downlink bit rate.
158 @return the guaranteed downlink bit rate. */
159 TInt CSubConQosR99ParamSet::GetGuaBitrateDownlink() const
161 return iGuaBitrateDownlink;
164 /** Sets the traffic class.
165 @param aTrafficClass Value to which to set the traffic class. */
166 void CSubConQosR99ParamSet::SetTrafficClass(RPacketQoS::TTrafficClass aTrafficClass)
168 iTrafficClass = aTrafficClass;
171 /** Sets the delivery order. Indicates whether in-sequence SDU delivery shall be provided or not.
172 @param aDeliveryOrder Value to which to set the delivery order. */
173 void CSubConQosR99ParamSet::SetDeliveryOrder(RPacketQoS::TDeliveryOrder aDeliveryOrder)
175 iDeliveryOrder = aDeliveryOrder;
178 /** Sets the handling of the delivery of erroneous SDUs
179 @param aDeliveryOfErroneusSdu Value to which to set the dilvery of erroneous SDUs.
180 Indicates whether SUDs detected as erroneous shall be delivered or discarded. */
181 void CSubConQosR99ParamSet::SetErroneousSDUDelivery(RPacketQoS::TErroneousSDUDelivery aDeliveryOfErroneusSdu)
183 iDeliveryOfErroneusSdu = aDeliveryOfErroneusSdu;
186 /** Sets the residual bit error ratio. Indicates the undetected bit error ratio in the delivered SDUs.
187 If no error detection is requested, Residual bit error ratio indicates the bit error ratio in the delivered SDUs.
188 @param aResidualBer Value to which to set the residual bit error ratio. */
189 void CSubConQosR99ParamSet::SetResidualBitErrorRatio(RPacketQoS::TBitErrorRatio aResidualBer)
191 iResidualBer = aResidualBer;
194 /** Sets the error ratio. Indicates the fraction of SDUs lost or detected as erroneous.
195 SDU error ratio is defined only for conforming traffic.
196 @param aErrorRatio Sets the error ratio. Indicates the fraction of SDUs lost or detected as erroneous.
197 SDU error ratio is defined only for conforming traffic. */
198 void CSubConQosR99ParamSet::SetSDUErrorRatio(RPacketQoS::TSDUErrorRatio aErrorRatio)
200 iErrorRatio = aErrorRatio;
203 /** Sets the traffic handling priority.
204 @param aPriority Value to which to set the traffic handling priority. */
205 void CSubConQosR99ParamSet::SetTrafficHandlingPriority(RPacketQoS::TTrafficHandlingPriority aPriority)
207 iPriority = aPriority;
210 /** Sets the transfer delay. Indicates maximum delay for 95th percentile of the distribution of delay for
211 all delivered SDUs during the lifetime of a bearer service, where delay for an SDU is defined as the time
212 from a request to transfer an SDU at one SAP to its delivery at the other SAP.
213 @param aTransferDelay Value to which to set the transfer delay. */
214 void CSubConQosR99ParamSet::SetTransferDelay(TInt aTransferDelay)
216 iTransferDelay = aTransferDelay;
219 /** Sets the maximum SDU size. Defines the maximum allowed SDU size.
220 @param aMaxSduSize Value to which to set the maximum SDU size. */
221 void CSubConQosR99ParamSet::SetMaxSduSize(TInt aMaxSduSize)
223 iMaxSduSize = aMaxSduSize;
226 /** Sets the maximum bitrate for uplink direction. The traffic is conformant with Maximum bitrate as
227 long as it follows a token bucket algorithm where token rate equals Maximum bitrate and bucket size
228 equals Maximum SDU size.
229 @param aMaxBitrate Value to which to set the maximum bitrate for uplink direction.
231 void CSubConQosR99ParamSet::SetMaxBitrateUplink(TInt aMaxBitrateUplink)
233 iMaxBitrateUplink = aMaxBitrateUplink;
236 /** Sets the maximum bitrate for downlink direction. The traffic is conformant with Maximum bitrate as
237 long as it follows a token bucket algorithm where token rate equals Maximum bitrate and bucket size
238 equals Maximum SDU size.
239 @param aMaxBitrate Value to which to set the maximum bitrate for downlink direction.
241 void CSubConQosR99ParamSet::SetMaxBitrateDownlink(TInt aMaxBitrateDownlink)
243 iMaxBitrateDownlink = aMaxBitrateDownlink;
246 /** Sets the guaranteed bitrate for uplink direction.
247 @param aGuaBitrateUplink Value to which to set the guaranteed SDU size.
249 void CSubConQosR99ParamSet::SetGuaBitrateUplink(TInt aGuaBitrateUplink)
251 iGuaBitrateUplink = aGuaBitrateUplink;
254 /** Sets the guaranteed bitrate for downlink direction.
255 @param aGuaBitrateDownlink Value to which to set the guaranteed SDU size.
257 void CSubConQosR99ParamSet::SetGuaBitrateDownlink(TInt aGuaBitrateDownlink)
259 iGuaBitrateDownlink = aGuaBitrateDownlink;
263 #ifdef SYMBIAN_NETWORKING_UMTSR5
265 @param aFamily the sub-connection parameter set family to which the newly created object it to be added.
266 @param aType The type of the set from TParameterSetType (ERequested, EAcceptable or EGranted)
267 @return pointer to the created object
269 CSubConImsExtParamSet* CSubConImsExtParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType)
271 CSubConImsExtParamSet* obj = NewL();
272 CleanupStack::PushL(obj);
273 aFamily.AddExtensionSetL(*obj, aType);
274 CleanupStack::Pop(obj);
279 @return pointer to the created object
281 CSubConImsExtParamSet* CSubConImsExtParamSet::NewL()
283 STypeId typeId(KSubCon3GPPExtParamsFactoryUid, KSubConImsExtParamsType);
284 return static_cast<CSubConImsExtParamSet*>(CSubConParameterSet::NewL(typeId));
287 CSubConImsExtParamSet::CSubConImsExtParamSet()
288 : iImsSignallingIndicator(EFalse)
292 /** @return the IMS Signalling Indicator flag for 3GPP R5 dedicated signalling PDP contexts.
294 TBool CSubConImsExtParamSet::GetImsSignallingIndicator() const
296 return iImsSignallingIndicator;
299 /** Sets the IMS Signalling Indicator flag for 3GPP R5 dedicated signalling PDP contexts.
300 @param aImsSignallingIndicator Value to which to set the IMS signalling indicator. */
301 void CSubConImsExtParamSet::SetImsSignallingIndicator(TBool aImsSignallingIndicator)
303 iImsSignallingIndicator = aImsSignallingIndicator;
307 @param aFamily the sub-connection parameter to which the newly created object is to be added
308 @param aType The type of the set from TParameterSetType (ERequested, EAcceptable or EGranted)
309 @return pointer to the created object
311 CSubConQosR5ParamSet* CSubConQosR5ParamSet::NewL(CSubConParameterFamily& aFamily,CSubConParameterFamily::TParameterSetType aType)
313 CSubConQosR5ParamSet* obj = NewL();
314 CleanupStack::PushL(obj);
315 aFamily.AddExtensionSetL(*obj, aType);
316 CleanupStack::Pop(obj);
321 @return pointer to the created object
323 CSubConQosR5ParamSet* CSubConQosR5ParamSet::NewL()
325 STypeId typeId(KSubCon3GPPExtParamsFactoryUid, KSubConQosR5ParamsType);
326 return static_cast<CSubConQosR5ParamSet*>(CSubConParameterSet::NewL(typeId));
331 CSubConQosR5ParamSet::CSubConQosR5ParamSet()
332 : iSrcStatsDesc(RPacketQoS::ESourceStatisticsDescriptorUnknown), iSignallingIndicator(EFalse)
336 /** Gets the signalling nature of the SDU's. Signalling traffic can have different characteristics
337 to other interactive traffic, eg higher priority, lower delay and increased peakiness. This attribute
338 permits enhancing the Radio Access Network (RAN) operation accordingly. See 3GPP TS 23.107
339 @return the signalling nature of the SDU's.
341 TBool CSubConQosR5ParamSet::GetSignallingIndicator() const
343 return iSignallingIndicator;
346 /** Sets signalling nature of the SDU's. This attribute is additional to the other QoS
347 attributes and does not over-ride them. Signalling traffic can have different characteristics
348 to other interactive traffic, eg higher priority, lower delay and increased peakiness. This
349 attribute permits enhancing the Radio Access Network (RAN) operation accordingly. An example use of
350 the Signalling Indication is for IMS signalling traffic. See 3GPP TS 23.107
351 @param aSignallingIndicator Value to which to set the signalling indicator. */
352 void CSubConQosR5ParamSet::SetSignallingIndicator(TBool aSignallingIndicator)
354 iSignallingIndicator = aSignallingIndicator;
357 /** @return the source of the SDU's. */
358 RPacketQoS::TSourceStatisticsDescriptor CSubConQosR5ParamSet::GetSourceStatisticsDescriptor() const
360 return iSrcStatsDesc;
363 /** Sets the source characteristic of the SDU's. Conversational speech has a well-known statistical
364 behaviour (or the discontinuous transmission (DTX) factor). By being informed that the SDUs for a Radio
365 Access Bearer (RAB) are generated by a speech source, Radio Access Network (RAN) may, based on experience,
366 calculate a statistical multiplex gain for use in admission control on the radio and RAN Access interfaces.
367 @param aSrcStatsDescType Value to which to set the source statistics indicator. */
368 void CSubConQosR5ParamSet::SetSourceStatisticsDescriptor(RPacketQoS::TSourceStatisticsDescriptor aSrcStatsDescType)
370 iSrcStatsDesc = aSrcStatsDescType;
374 // SYMBIAN_NETWORKING_UMTSR5
376 /** the Media Component number as specified in 3GPP TS 29.207
377 @return the media component number portion of the flow identifier
379 TUint16 TFlowId::GetMediaComponentNumber() const
381 return iMediaComponentNumber;
384 /** the IP flow number as specified in 3GPP TS 29.207
385 @return the IP flow portion of the flow identifier
387 TUint16 TFlowId::GetIPFlowNumber() const
389 return iIPFlowNumber;
392 /** Sets the media component number portion of the flow identifier. The Media Component number is specified in 3GPP TS 29.207
393 @param aMediaComponentNumber the media component portion of the flow identifier
395 void TFlowId::SetMediaComponentNumber(TUint16 aMediaComponentNumber)
397 iMediaComponentNumber = aMediaComponentNumber;
401 @param the IP flow portion of the flow identifier.
403 void TFlowId::SetIPFlowNumber(TUint16 aIPFlowNumber)
405 iIPFlowNumber = aIPFlowNumber;
409 //===========================
410 // Implementation Extension class
411 CSubConSBLPR5ExtensionParamSet::CSubConSBLPR5ExtensionParamSet()
412 : CSubConExtensionParameterSet()
416 CSubConSBLPR5ExtensionParamSet::~CSubConSBLPR5ExtensionParamSet()
422 @param aFamily the sub-connection parameter set family that this extension parameter set will be added to.
423 @param aType The type of the set from TParameterSetType (ERequested, EAcceptable or EGranted)
424 @return pointer to the created object
426 CSubConSBLPR5ExtensionParamSet* CSubConSBLPR5ExtensionParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType)
428 CSubConSBLPR5ExtensionParamSet* sblpExtn = NewL();
429 CleanupStack::PushL(sblpExtn);
430 aFamily.AddExtensionSetL(*sblpExtn, aType);
431 CleanupStack::Pop(sblpExtn);
436 @return pointer to the created object
438 CSubConSBLPR5ExtensionParamSet* CSubConSBLPR5ExtensionParamSet::NewL()
440 STypeId typeId (KSubCon3GPPExtParamsFactoryUid, KSubConnSBLPR5ExtensionParamsType);
441 return static_cast<CSubConSBLPR5ExtensionParamSet*>(CSubConParameterSet::NewL(typeId));
445 @return the media authorisation token
447 const TAuthToken& CSubConSBLPR5ExtensionParamSet::GetMAT() const
453 @param aAuthToken sets the media authorisation token
455 void CSubConSBLPR5ExtensionParamSet::SetMAT(const TAuthToken& aAuthToken)
457 iAuthToken = aAuthToken;
461 @return the number of flow indexes in this session
463 TInt CSubConSBLPR5ExtensionParamSet::GetNumberOfFlowIds() const
465 return iFlowIds.Count();
469 @param aIndex the index of the flow identifier that will be returned.
470 @return the flow identifier at the index given by aIndex.
472 const TFlowId& CSubConSBLPR5ExtensionParamSet::GetFlowIdAt(TInt aIndex) const
474 return iFlowIds[aIndex];
477 /** adds a flow identifier to this session.
478 @param aFlowId the flow indentifier to be added.
480 void CSubConSBLPR5ExtensionParamSet::AddFlowIdL(const TFlowId & aFlowId)
482 iFlowIds.AppendL(aFlowId);
486 // QOS3GPP_SUBCONPARAMS_INL