telephonyprotocols/gprsumtsqosprt/inc/parameters.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2007-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 #ifndef __PARAMETERS_H__
       
    17 #define __PARAMETERS_H__
       
    18 
       
    19 #include <networking/qosparameters.h>
       
    20 #include <networking/pfqosparser.h>
       
    21 
       
    22 #if MM_ETEL_API
       
    23 #include "uscl_qos.h"
       
    24 #else
       
    25 #include <etelqos.h>
       
    26 #endif
       
    27 
       
    28 const TUint KTransferDelayMax	= 4100;
       
    29 const TUint KMaxSDUMax			= 1520;
       
    30 const TUint KMaxBitRate			= 2048;
       
    31 // SBLP - MAT string size
       
    32 const TUint KMatSize			= 255;
       
    33 
       
    34 
       
    35 #ifdef SYMBIAN_NETWORKING_UMTSR5  
       
    36 // Requested QoS
       
    37 class TQoSRequested : public RPacketQoS::TQoSR5Requested
       
    38 	{
       
    39 public:
       
    40 	TQoSRequested();
       
    41 	void Reset();
       
    42 	void ParsePolicyData(CExtensionPolicy* aExtensionPolicy);
       
    43 	void ClearMinimumParameters();
       
    44 public:
       
    45 	TUint iHeaderCompression;
       
    46 	};
       
    47 
       
    48 // Negotiated QoS
       
    49 class TQoSNegotiated : public RPacketQoS::TQoSR5Negotiated
       
    50 	{
       
    51 public:
       
    52 	TQoSNegotiated() 
       
    53 		{
       
    54 		iTrafficClass = RPacketQoS::ETrafficClassUnspecified;
       
    55 		iDeliveryOrderReqd = RPacketQoS::EDeliveryOrderUnspecified;
       
    56 		iDeliverErroneousSDU = RPacketQoS::EErroneousSDUDeliveryUnspecified;
       
    57 		iMaxSDUSize = 0;
       
    58 		iMaxRate.iUplinkRate = 0;
       
    59 		iMaxRate.iDownlinkRate = 0;
       
    60 		iBER = RPacketQoS::EBERUnspecified;
       
    61 		iSDUErrorRatio = RPacketQoS::ESDUErrorRatioUnspecified;
       
    62 		iTrafficHandlingPriority = RPacketQoS::ETrafficPriorityUnspecified;
       
    63 		iTransferDelay = 0;
       
    64 		iGuaranteedRate.iUplinkRate = 0;
       
    65 		iGuaranteedRate.iDownlinkRate = 0;
       
    66 		iSignallingIndication = 0;
       
    67 		iSourceStatisticsDescriptor = RPacketQoS::ESourceStatisticsDescriptorUnknown;
       
    68 		}
       
    69 	};
       
    70 #else
       
    71 // Requested QoS
       
    72 class TQoSRequested : public RPacketQoS::TQoSR99_R4Requested
       
    73 	{
       
    74 public:
       
    75 	TQoSRequested();
       
    76 	void Reset();
       
    77 	void ParsePolicyData(CExtensionPolicy* aExtensionPolicy);
       
    78 	void ClearMinimumParameters();
       
    79 public:
       
    80 	TUint iHeaderCompression;
       
    81 	};
       
    82 
       
    83 // Negotiated QoS
       
    84 class TQoSNegotiated : public RPacketQoS::TQoSR99_R4Negotiated
       
    85 	{
       
    86 public:
       
    87 	TQoSNegotiated() 
       
    88 		{
       
    89 		iTrafficClass = RPacketQoS::ETrafficClassUnspecified;
       
    90 		iDeliveryOrderReqd = RPacketQoS::EDeliveryOrderUnspecified;
       
    91 		iDeliverErroneousSDU = RPacketQoS::EErroneousSDUDeliveryUnspecified;
       
    92 		iMaxSDUSize = 0;
       
    93 		iMaxRate.iUplinkRate = 0;
       
    94 		iMaxRate.iDownlinkRate = 0;
       
    95 		iBER = RPacketQoS::EBERUnspecified;
       
    96 		iSDUErrorRatio = RPacketQoS::ESDUErrorRatioUnspecified;
       
    97 		iTrafficHandlingPriority = RPacketQoS::ETrafficPriorityUnspecified;
       
    98 		iTransferDelay = 0;
       
    99 		iGuaranteedRate.iUplinkRate = 0;
       
   100 		iGuaranteedRate.iDownlinkRate = 0;
       
   101 		}
       
   102 	};
       
   103 
       
   104 #endif //SYMBIAN_NETWORKING_UMTSR5
       
   105 
       
   106 // Packet filter
       
   107 class TPacketFilter : public RPacketContext::TPacketFilterV2
       
   108 	{
       
   109 public:
       
   110 	TPacketFilter()
       
   111 		{
       
   112 		TPtr8 tmp((TUint8*)this, sizeof(RPacketContext::TPacketFilterV2), sizeof(RPacketContext::TPacketFilterV2));
       
   113 		tmp.FillZ();
       
   114 		}
       
   115 	};
       
   116 
       
   117 
       
   118 // Parameter mapping methods
       
   119 class ParameterMapper
       
   120 	{
       
   121 public:
       
   122 	static void MapGenericToRel99(const TQoSParameters& aSpec, RPacketQoS::TQoSR99_R4Requested& aGprs);
       
   123 	static TInt CombineParameters(const RPacketQoS::TQoSR99_R4Requested& aGprs, TQoSParameters& aFlowSpec);
       
   124 	static void CombineDefault(const TQoSRequested& aDefault, TQoSRequested& aPolicy);
       
   125 	static void CombineOverride(const TQoSRequested& aOverride, TQoSRequested& aPolicy);
       
   126 private:
       
   127 	inline static TUint Min(TUint a, TUint b) { return a < b ? a : b; };
       
   128 	};
       
   129 
       
   130 
       
   131 
       
   132 // For Flow extension parameters (SBLP)
       
   133 
       
   134 class RFlowExtensionParams //: public RPacketContext::CTFTMediaAuthorizationV3
       
   135 	{
       
   136 public:
       
   137 	~RFlowExtensionParams();
       
   138 	TBool ParsePolicyDataForSblp(CExtensionPolicy * aPolicy);
       
   139 	RFlowExtensionParams& operator=(const RFlowExtensionParams& aFlowExtParam);
       
   140 	RFlowExtensionParams();
       
   141 
       
   142 	// SBLP extension parameters
       
   143 	RPacketContext::TAuthorizationToken iAuthorizationToken;
       
   144 	RArray<RPacketContext::CTFTMediaAuthorizationV3::TFlowIdentifier>	iFlowIds;
       
   145 	};
       
   146 
       
   147 
       
   148 #endif
       
   149