epoc32/include/networking/qos3gpp_subconparams.inl
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // Inline Functions file for the 3GPP SubConnection Extension Parameters
    15 // 
    16 //
    17 
    18 
    19 
    20 /**
    21  @file
    22  @publishedAll
    23 */
    24 
    25 
    26 
    27 #ifndef QOS3GPP_SUBCONPARAMS_INL
    28 #define QOS3GPP_SUBCONPARAMS_INL
    29 
    30 /**
    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
    34 */
    35 CSubConQosR99ParamSet* CSubConQosR99ParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType)
    36     {
    37     CSubConQosR99ParamSet* obj = NewL();
    38     CleanupStack::PushL(obj);
    39     aFamily.AddExtensionSetL(*obj, aType);
    40     CleanupStack::Pop(obj);
    41     return obj;
    42     }
    43 
    44 /**
    45 @return     pointer to the created object
    46 */
    47 CSubConQosR99ParamSet* CSubConQosR99ParamSet::NewL()
    48     {
    49     STypeId typeId(KSubCon3GPPExtParamsFactoryUid, KSubConQosR99ParamsType);
    50     return static_cast<CSubConQosR99ParamSet*>(CSubConParameterSet::NewL(typeId));
    51     }
    52 
    53 /**
    54 */
    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),
    63     iTransferDelay(0),
    64     iMaxSduSize(0),
    65     iMaxBitrateUplink(0),
    66     iMaxBitrateDownlink(0),
    67     iGuaBitrateUplink(0),
    68     iGuaBitrateDownlink(0)
    69     {
    70     }
    71 
    72 /** Identifies the current traffic class. Traffic class is; Converstional, Streaming, Interactive or Background.
    73 See 3GPP TS 23.107.
    74 @return the traffic class */
    75 RPacketQoS::TTrafficClass CSubConQosR99ParamSet::GetTrafficClass() const
    76     {
    77     return iTrafficClass;
    78     }
    79 
    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
    83     {
    84     return iDeliveryOrder;
    85     }
    86 
    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
    90     {
    91     return iDeliveryOfErroneusSdu;
    92     }
    93 
    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
    96 the delivered SDUs.
    97 @return the residual bit error ratio. */
    98 RPacketQoS::TBitErrorRatio CSubConQosR99ParamSet::GetResidualBitErrorRatio() const
    99     {
   100     return iResidualBer;
   101     }
   102 
   103 /** Indicates the fraction of SDUs lost or detected as erroneous.
   104 @return the SDU error ratio.  */
   105 RPacketQoS::TSDUErrorRatio CSubConQosR99ParamSet::GetSDUErrorRatio() const
   106     {
   107     return iErrorRatio;
   108     }
   109 
   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
   115     {
   116     return iPriority;
   117     }
   118 
   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
   122 SAP. */
   123 TInt CSubConQosR99ParamSet::GetTransferDelay() const
   124     {
   125     return iTransferDelay;
   126     }
   127 
   128 /** @return the maximum SDU size. */
   129 TInt CSubConQosR99ParamSet::GetMaxSduSize() const
   130     {
   131     return iMaxSduSize;
   132     }
   133 
   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.
   137 */
   138 TInt CSubConQosR99ParamSet::GetMaxBitrateUplink() const
   139     {
   140     return iMaxBitrateUplink;
   141     }
   142 
   143 /** Getter function for the maximum downlink bit rate.
   144 @return the maximum downlink bit rate. */
   145 TInt CSubConQosR99ParamSet::GetMaxBitrateDownlink() const
   146     {
   147     return iMaxBitrateDownlink;
   148     }
   149 
   150 /** Getter function for the guaranteed uplink bit rate.
   151 @return the guaranteed uplink bit rate. */
   152 TInt CSubConQosR99ParamSet::GetGuaBitrateUplink() const
   153     {
   154     return iGuaBitrateUplink;
   155     }
   156 
   157 /** Getter function for the guaranteed downlink bit rate.
   158 @return the guaranteed downlink bit rate. */
   159 TInt CSubConQosR99ParamSet::GetGuaBitrateDownlink() const
   160     {
   161     return iGuaBitrateDownlink;
   162     }
   163 
   164 /** Sets the traffic class.
   165 @param aTrafficClass Value to which to set the traffic class. */
   166 void CSubConQosR99ParamSet::SetTrafficClass(RPacketQoS::TTrafficClass aTrafficClass)
   167     {
   168     iTrafficClass = aTrafficClass;
   169     }
   170 
   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)
   174     {
   175     iDeliveryOrder = aDeliveryOrder;
   176     }
   177 
   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)
   182     {
   183     iDeliveryOfErroneusSdu = aDeliveryOfErroneusSdu;
   184     }
   185 
   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)
   190     {
   191     iResidualBer = aResidualBer;
   192     }
   193 
   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)
   199     {
   200     iErrorRatio = aErrorRatio;
   201     }
   202 
   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)
   206     {
   207     iPriority = aPriority;
   208     }
   209 
   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)
   215     {
   216     iTransferDelay = aTransferDelay;
   217     }
   218 
   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)
   222     {
   223     iMaxSduSize = aMaxSduSize;
   224     }
   225 
   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.
   230 */
   231 void CSubConQosR99ParamSet::SetMaxBitrateUplink(TInt aMaxBitrateUplink)
   232     {
   233     iMaxBitrateUplink = aMaxBitrateUplink;
   234     }
   235 
   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.
   240 */
   241 void CSubConQosR99ParamSet::SetMaxBitrateDownlink(TInt aMaxBitrateDownlink)
   242     {
   243     iMaxBitrateDownlink = aMaxBitrateDownlink;
   244     }
   245 
   246 /** Sets the guaranteed bitrate for uplink direction.
   247 @param aGuaBitrateUplink Value to which to set the guaranteed SDU size.
   248 */
   249 void CSubConQosR99ParamSet::SetGuaBitrateUplink(TInt aGuaBitrateUplink)
   250     {
   251     iGuaBitrateUplink = aGuaBitrateUplink;
   252     }
   253 
   254 /** Sets the guaranteed bitrate for downlink direction.
   255 @param aGuaBitrateDownlink Value to which to set the guaranteed SDU size.
   256 */
   257 void CSubConQosR99ParamSet::SetGuaBitrateDownlink(TInt aGuaBitrateDownlink)
   258     {
   259     iGuaBitrateDownlink = aGuaBitrateDownlink;
   260     }
   261 
   262 
   263 #ifdef SYMBIAN_NETWORKING_UMTSR5
   264 /**
   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
   268 */
   269 CSubConImsExtParamSet* CSubConImsExtParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType)
   270     {
   271     CSubConImsExtParamSet* obj = NewL();
   272     CleanupStack::PushL(obj);
   273     aFamily.AddExtensionSetL(*obj, aType);
   274     CleanupStack::Pop(obj);
   275     return obj;
   276     }
   277 
   278 /**
   279 @return pointer to the created object
   280 */
   281 CSubConImsExtParamSet* CSubConImsExtParamSet::NewL()
   282     {
   283     STypeId typeId(KSubCon3GPPExtParamsFactoryUid, KSubConImsExtParamsType);
   284     return static_cast<CSubConImsExtParamSet*>(CSubConParameterSet::NewL(typeId));
   285     }
   286 
   287 CSubConImsExtParamSet::CSubConImsExtParamSet()
   288     : iImsSignallingIndicator(EFalse)
   289     {
   290     }
   291 
   292 /** @return the IMS Signalling Indicator flag for 3GPP R5 dedicated signalling PDP contexts.
   293 */
   294 TBool CSubConImsExtParamSet::GetImsSignallingIndicator() const
   295     {
   296     return iImsSignallingIndicator;
   297     }
   298 
   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)
   302     {
   303     iImsSignallingIndicator = aImsSignallingIndicator;
   304     }
   305 
   306 /**
   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
   310 */
   311 CSubConQosR5ParamSet* CSubConQosR5ParamSet::NewL(CSubConParameterFamily& aFamily,CSubConParameterFamily::TParameterSetType aType)
   312     {
   313     CSubConQosR5ParamSet* obj = NewL();
   314     CleanupStack::PushL(obj);
   315     aFamily.AddExtensionSetL(*obj, aType);
   316     CleanupStack::Pop(obj);
   317     return obj;
   318     }
   319 
   320 /**
   321 @return     pointer to the created object
   322 */
   323 CSubConQosR5ParamSet* CSubConQosR5ParamSet::NewL()
   324     {
   325     STypeId typeId(KSubCon3GPPExtParamsFactoryUid, KSubConQosR5ParamsType);
   326     return static_cast<CSubConQosR5ParamSet*>(CSubConParameterSet::NewL(typeId));
   327     }
   328 
   329 /**
   330 */
   331 CSubConQosR5ParamSet::CSubConQosR5ParamSet()
   332     : iSrcStatsDesc(RPacketQoS::ESourceStatisticsDescriptorUnknown), iSignallingIndicator(EFalse)
   333     {
   334     }
   335 
   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.
   340 */
   341 TBool CSubConQosR5ParamSet::GetSignallingIndicator() const
   342     {
   343     return iSignallingIndicator;
   344     }
   345 
   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)
   353     {
   354     iSignallingIndicator = aSignallingIndicator;
   355     }
   356 
   357 /** @return the source of the SDU's. */
   358 RPacketQoS::TSourceStatisticsDescriptor CSubConQosR5ParamSet::GetSourceStatisticsDescriptor() const
   359     {
   360     return iSrcStatsDesc;
   361     }
   362 
   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)
   369     {
   370     iSrcStatsDesc = aSrcStatsDescType;
   371     }
   372 
   373 #endif
   374 // SYMBIAN_NETWORKING_UMTSR5
   375 
   376 /** the Media Component number as specified in 3GPP TS 29.207
   377 @return the media component number portion of the flow identifier
   378 */
   379 TUint16 TFlowId::GetMediaComponentNumber() const
   380     {
   381     return iMediaComponentNumber;
   382     }
   383 
   384 /** the IP flow number as specified in 3GPP TS 29.207
   385 @return the IP flow portion of the flow identifier
   386 */
   387 TUint16 TFlowId::GetIPFlowNumber() const
   388     {
   389     return iIPFlowNumber;
   390     }
   391 
   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
   394 */
   395 void TFlowId::SetMediaComponentNumber(TUint16 aMediaComponentNumber)
   396     {
   397     iMediaComponentNumber = aMediaComponentNumber;
   398     }
   399 
   400 /**
   401 @param the IP flow portion of the flow identifier.
   402 */
   403 void TFlowId::SetIPFlowNumber(TUint16 aIPFlowNumber)
   404     {
   405     iIPFlowNumber = aIPFlowNumber;
   406     }
   407 
   408 
   409 //===========================
   410 // Implementation Extension class
   411 CSubConSBLPR5ExtensionParamSet::CSubConSBLPR5ExtensionParamSet()
   412     : CSubConExtensionParameterSet()
   413     {
   414     }
   415 
   416 CSubConSBLPR5ExtensionParamSet::~CSubConSBLPR5ExtensionParamSet()
   417     {
   418     iFlowIds.Close();
   419     }
   420 
   421 /**
   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
   425 */
   426 CSubConSBLPR5ExtensionParamSet* CSubConSBLPR5ExtensionParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType)
   427     {
   428     CSubConSBLPR5ExtensionParamSet* sblpExtn = NewL();
   429     CleanupStack::PushL(sblpExtn);
   430     aFamily.AddExtensionSetL(*sblpExtn, aType);
   431     CleanupStack::Pop(sblpExtn);
   432     return sblpExtn;
   433     }
   434 
   435 /**
   436 @return     pointer to the created object
   437 */
   438 CSubConSBLPR5ExtensionParamSet* CSubConSBLPR5ExtensionParamSet::NewL()
   439     {
   440     STypeId typeId (KSubCon3GPPExtParamsFactoryUid, KSubConnSBLPR5ExtensionParamsType);
   441     return static_cast<CSubConSBLPR5ExtensionParamSet*>(CSubConParameterSet::NewL(typeId));
   442     }
   443 
   444 /**
   445 @return     the media authorisation token
   446 */
   447 const TAuthToken& CSubConSBLPR5ExtensionParamSet::GetMAT() const
   448     {
   449     return iAuthToken;
   450     }
   451 
   452 /**
   453 @param      aAuthToken sets the media authorisation token
   454 */
   455 void CSubConSBLPR5ExtensionParamSet::SetMAT(const TAuthToken& aAuthToken)
   456     {
   457     iAuthToken = aAuthToken;
   458     }
   459 
   460 /**
   461 @return     the number of flow indexes in this session
   462 */
   463 TInt CSubConSBLPR5ExtensionParamSet::GetNumberOfFlowIds() const
   464     {
   465     return iFlowIds.Count();
   466     }
   467 
   468 /**
   469 @param      aIndex the index of the flow identifier that will be returned.
   470 @return     the flow identifier at the index given by aIndex.
   471 */
   472 const TFlowId& CSubConSBLPR5ExtensionParamSet::GetFlowIdAt(TInt aIndex) const
   473     {
   474     return iFlowIds[aIndex];
   475     }
   476 
   477 /**         adds a flow identifier to this session.
   478 @param      aFlowId the flow indentifier to be added.
   479 */
   480 void CSubConSBLPR5ExtensionParamSet::AddFlowIdL(const TFlowId & aFlowId)
   481     {
   482     iFlowIds.AppendL(aFlowId);
   483     }
   484 
   485 #endif
   486 // QOS3GPP_SUBCONPARAMS_INL