|
1 // Copyright (c) 2006-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 // PDP SubConnection Provider class definition. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #ifndef SYMBIAN_PDPPARAMMAPPER_H |
|
24 #define SYMBIAN_PDPPARAMMAPPER_H |
|
25 |
|
26 #include <comms-infras/ss_parameterfamilybundle.h> |
|
27 |
|
28 #include <networking/qos3gpp_subconparams.h> |
|
29 #include <cs_subconparams.h> |
|
30 #include <cs_subconevents.h> |
|
31 |
|
32 class MPDPParamMapper |
|
33 /** Aggegation of the QoS parameter mapping methods. |
|
34 |
|
35 @internalTechnology |
|
36 @released Since 9.4 */ |
|
37 { |
|
38 public: |
|
39 |
|
40 enum TQosParameterRelease |
|
41 { |
|
42 KParameterRelInvalid = 0, |
|
43 KParameterRelGeneric = 1, |
|
44 KParameterRel4Rel99 = 4, |
|
45 KParameterRel5 = 5, |
|
46 }; |
|
47 /** |
|
48 Scans given parameter bundle for supported parameter sets |
|
49 The first one found gets converted to RPacketQoS::TQoSR5Requested. |
|
50 The supported parameter sets are (in order of priority): |
|
51 1) KSubConQosR5ParamsType |
|
52 2) KSubConQosR99ParamsType |
|
53 3) Generic QoS |
|
54 |
|
55 @param aIn RCFParameterFamilyBundle to be converted. |
|
56 @param aOut RPacketQoS::TQoSR5Requested to be populated from aIn |
|
57 @exception KErrNotSupported - if CUmtsGprsSubConnProvd does not support conversion from what's |
|
58 in the supplied parameter bundle. |
|
59 */ |
|
60 static TQosParameterRelease MapQosParamBundleToEtelL(const ESock::RCFParameterFamilyBundleC& aIn, |
|
61 RPacketQoS::TQoSR5Requested& aOut); |
|
62 |
|
63 /** |
|
64 Maps QoS parameters received from the network via Etel into a CSubConGenEventParamsGranted class |
|
65 for client event notification. |
|
66 |
|
67 @param aNetworkQoS - A pointer to an Etel TPacketDataConfigBase class containing the |
|
68 QoS to be mapped into the event. |
|
69 @param aGranted - A reference to the CSubConGenEventParamsGranted object that should receive the mapped |
|
70 QoS parameters. |
|
71 */ |
|
72 static void MapQosEtelToGrantedParamsL(TPacketDataConfigBase* aNetworkQoS, |
|
73 CSubConGenEventParamsGranted& aGranted, |
|
74 TQosParameterRelease aRequestedRelease); |
|
75 |
|
76 static TBool QoSRequested(const ESock::RCFParameterFamilyBundleC& aIn); |
|
77 |
|
78 protected: |
|
79 //-=================================================== |
|
80 // |
|
81 // To Etel mappers |
|
82 // |
|
83 //-=================================================== |
|
84 static void MapQosR99ExtensionSetToEtel(const CSubConQosR99ParamSet& aInRequested, |
|
85 const CSubConQosR99ParamSet* aInAcceptable, |
|
86 RPacketQoS::TQoSR99_R4Requested& aOut); |
|
87 |
|
88 static void MapQosR5ExtensionSetToEtel( const CSubConQosR5ParamSet& aInRequested, |
|
89 const CSubConQosR5ParamSet* aInAcceptable, |
|
90 RPacketQoS::TQoSR5Requested& aOut); |
|
91 |
|
92 static void MapQosGenericSetToEtel( const CSubConQosGenericParamSet& aInRequested, |
|
93 const CSubConQosGenericParamSet* aInAcceptable, |
|
94 RPacketQoS::TQoSR99_R4Requested& aOut); |
|
95 /** |
|
96 Given a set of generic parameters, the method derives the R99 value for the traffic class. |
|
97 |
|
98 @param aIn requested CSubConQosGenericParamSet to be converted |
|
99 @return the value of RPacketQoS::TTrafficClass |
|
100 */ |
|
101 static RPacketQoS::TTrafficClass DeriveTrafficClass(const CSubConQosGenericParamSet& aIn ); |
|
102 |
|
103 /** |
|
104 Given a set of generic parameters, the method derives the R99 value for the traffic priority. |
|
105 |
|
106 @param aIn requested CSubConQosGenericParamSet to be converted |
|
107 @return the value of RPacketQoS::TTrafficHandlingPriority |
|
108 */ |
|
109 static RPacketQoS::TTrafficHandlingPriority DeriveTrafficPriority(const CSubConQosGenericParamSet& aIn, TUint aTrafficClass ); |
|
110 |
|
111 //-=================================================== |
|
112 // |
|
113 // From Etel mappers |
|
114 // |
|
115 //-=================================================== |
|
116 static void MapQosEtelToGenericSetL(RPacketQoS::TQoSR99_R4Negotiated* aNetworkQoS, |
|
117 CSubConGenEventParamsGranted& aGranted); |
|
118 static void MapQosEtelToR99SetL(RPacketQoS::TQoSR99_R4Negotiated* aNetworkQoS, |
|
119 CSubConGenEventParamsGranted& aGranted); |
|
120 static void MapQosEtelToR5SetL(RPacketQoS::TQoSR5Negotiated* aNetworkQoS, |
|
121 CSubConGenEventParamsGranted& aGranted); |
|
122 |
|
123 }; |
|
124 |
|
125 #endif //SYMBIAN_PDPPARAMMAPPER_H |