1 // Copyright (c) 2004-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.
22 #ifndef __CS_SUBCONPARAMS_INL__
23 #define __CS_SUBCONPARAMS_INL__
25 CSubConQosGenericParamSet* CSubConQosGenericParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType)
26 /** Creates a generic Qos family parameterset.
29 The aFamily parameter that is passed into this method will take ownership of the newly
30 created CSubConQosGenericParamSet object. When the family is destroyed, this parameter
31 set object will also be destroyed (along with any other parameter sets owned by the family).
33 @param aFamily Parameter sets.
34 @param aType Parameter type (Requested/Acceptable/Granted)
35 @return a CSubConQosGenericParamSet object pointer if successful,
36 otherwise leaves with a system error code.
39 CSubConQosGenericParamSet* obj = NewL();
40 CleanupStack::PushL(obj);
41 aFamily.SetGenericSetL(*obj, aType);
42 CleanupStack::Pop(obj);
46 CSubConQosGenericParamSet* CSubConQosGenericParamSet::NewL(RParameterFamily& aFamily, RParameterFamily::TParameterSetType aType)
47 /** Creates a generic Qos family parameterset.
50 The aFamily parameter that is passed into this method will take ownership of the newly
51 created CSubConQosGenericParamSet object. When the family is destroyed, this parameter
52 set object will also be destroyed (along with any other parameter sets owned by the family).
54 @param aFamily Parameter sets.
55 @param aType Parameter type (Requested/Acceptable/Granted)
56 @return a CSubConQosGenericParamSet object pointer if successful,
57 otherwise leaves with a system error code.
60 CSubConQosGenericParamSet* obj = NewL();
61 CleanupStack::PushL(obj);
62 aFamily.AddParameterSetL(obj, aType);
63 CleanupStack::Pop(obj);
67 CSubConQosGenericParamSet* CSubConQosGenericParamSet::NewL()
68 /** Creates a generic Qos family parameterset.
70 @return a CSubConQosGenericParamSet object pointer if successful,
71 otherwise leaves with a system error code.
74 STypeId typeId = STypeId::CreateSTypeId(CSubConQosGenericParamSet::EUid, CSubConQosGenericParamSet::EType);
75 return static_cast<CSubConQosGenericParamSet*>(CSubConParameterSet::NewL(typeId));
78 CSubConQosGenericParamSet::CSubConQosGenericParamSet()
79 : CSubConGenericParameterSet(),
80 iDownlinkBandwidth(0),
82 iDownLinkMaximumBurstSize(0),
83 iUpLinkMaximumBurstSize(0),
84 iDownLinkAveragePacketSize(0),
85 iUpLinkAveragePacketSize(0),
86 iDownLinkMaximumPacketSize(0),
87 iUpLinkMaximumPacketSize(0),
90 iDownLinkDelayVariation(0),
91 iUpLinkDelayVariation(0),
95 /** Empty CSubConQosGenericParamSet constructor
100 TInt CSubConQosGenericParamSet::GetDownlinkBandwidth() const
101 /** Gets downlink bandwidth value.
103 @return downlink bandwidth value. */
105 return iDownlinkBandwidth;
108 TInt CSubConQosGenericParamSet::GetUplinkBandwidth() const
109 /** Gets uplink bandwidth value.
111 @return uplink bandwidth value. */
113 return iUplinkBandwidth;
116 TInt CSubConQosGenericParamSet::GetDownLinkMaximumBurstSize() const
117 /** Gets downlink max burst size client can handle.
119 @return downlink max burst size . */
121 return iDownLinkMaximumBurstSize;
124 TInt CSubConQosGenericParamSet::GetUpLinkMaximumBurstSize() const
125 /** Gets uplink max burst size client can handle.
127 @return uplink max burst size . */
129 return iUpLinkMaximumBurstSize;
132 TInt CSubConQosGenericParamSet::GetDownLinkAveragePacketSize() const
133 /** Gets downlink average packet size required.
135 @return downlink average packet size . */
137 return iDownLinkAveragePacketSize;
140 TInt CSubConQosGenericParamSet::GetUpLinkAveragePacketSize() const
141 /** Gets uplink average packet size required.
143 @return uplink average packet size . */
145 return iUpLinkAveragePacketSize;
148 TInt CSubConQosGenericParamSet::GetDownLinkMaximumPacketSize() const
149 /** Gets downlink max packet size client can handle.
151 @return downlink max packet size . */
153 return iDownLinkMaximumPacketSize;
156 TInt CSubConQosGenericParamSet::GetUpLinkMaximumPacketSize() const
157 /** Gets uplink max packet size client can handle.
159 @return uplink max packet size . */
161 return iUpLinkMaximumPacketSize;
164 TInt CSubConQosGenericParamSet::GetDownLinkDelay() const
165 /** Gets acceptable downlink delay value.
167 @return downlink delay value. */
169 return iDownLinkDelay;
172 TInt CSubConQosGenericParamSet::GetUpLinkDelay() const
173 /** Gets acceptable uplink delay value.
175 @return uplink delay value. */
180 TInt CSubConQosGenericParamSet::GetDownLinkDelayVariation() const
181 /** Gets acceptable downlink delay variation value.
183 @return downlink delay variation value. */
185 return iDownLinkDelayVariation;
188 TInt CSubConQosGenericParamSet::GetUpLinkDelayVariation() const
189 /** Gets acceptable uplink delay variation value.
191 @return uplink delay variation value. */
193 return iUpLinkDelayVariation;
196 TInt CSubConQosGenericParamSet::GetDownLinkPriority() const
197 /** Gets downlink priority value (relative to other channel's priority).
199 @return downlink priority value. */
201 return iDownLinkPriority;
204 TInt CSubConQosGenericParamSet::GetUpLinkPriority() const
205 /** Gets uplink priority value (relative to other channel's priority).
207 @return uplink priority value. */
209 return iUpLinkPriority;
212 TBool CSubConQosGenericParamSet::GetHeaderMode() const
213 /** Gets header mode.
215 @return boolean value indicating whether the header size
216 should be calculated by the QoS module or specified by the client. */
221 const TName& CSubConQosGenericParamSet::GetName() const
222 /** Gets Qos Parameter set name.
224 @return Qos Parameter set name. */
229 void CSubConQosGenericParamSet::SetDownlinkBandwidth(TInt aDownlinkBandwidth)
230 /** Sets downlink bandwidth value.
232 @param aDownlinkBandwidth downlink bandwidth value. */
234 iDownlinkBandwidth = aDownlinkBandwidth;
237 void CSubConQosGenericParamSet::SetUplinkBandwidth(TInt aUplinkBandwidth)
238 /** Sets uplink bandwidth value.
240 @param aUplinkBandwidth uplink bandwidth value. */
242 iUplinkBandwidth = aUplinkBandwidth;
245 void CSubConQosGenericParamSet::SetDownLinkMaximumBurstSize(TInt aDownLinkMaximumBurstSize)
246 /** Sets downlink max burst size client can handle.
248 @param aDownLinkMaximumBurstSize downlink max burst size . */
250 iDownLinkMaximumBurstSize = aDownLinkMaximumBurstSize;
253 void CSubConQosGenericParamSet::SetUpLinkMaximumBurstSize(TInt aUpLinkMaximumBurstSize)
254 /** Sets uplink max burst size client can handle.
256 @param aUpLinkMaximumBurstSize uplink max burst size . */
258 iUpLinkMaximumBurstSize = aUpLinkMaximumBurstSize;
261 void CSubConQosGenericParamSet::SetDownLinkAveragePacketSize(TInt aDownLinkAveragePacketSize)
262 /** Sets downlink average packet size required.
264 @param aDownLinkAveragePacketSize downlink average packet size . */
266 iDownLinkAveragePacketSize = aDownLinkAveragePacketSize;
269 void CSubConQosGenericParamSet::SetUpLinkAveragePacketSize(TInt aUpLinkAveragePacketSize)
270 /** Sets uplink average packet size required.
272 @param aUpLinkAveragePacketSize uplink average packet size . */
274 iUpLinkAveragePacketSize = aUpLinkAveragePacketSize;
277 void CSubConQosGenericParamSet::SetDownLinkMaximumPacketSize(TInt aDownLinkMaximumPacketSize)
278 /** Sets downlink max packet size client can handle.
280 @param aDownLinkMaximumPacketSize downlink max packet size . */
282 iDownLinkMaximumPacketSize = aDownLinkMaximumPacketSize;
285 void CSubConQosGenericParamSet::SetUpLinkMaximumPacketSize(TInt aUpLinkMaximumPacketSize)
286 /** Sets uplink max packet size client can handle.
288 @param aUpLinkMaximumPacketSize uplink max packet size . */
290 iUpLinkMaximumPacketSize = aUpLinkMaximumPacketSize;
293 void CSubConQosGenericParamSet::SetDownLinkDelay(TInt aDownLinkDelay)
294 /** Sets acceptable downlink delay value.
296 @param aDownLinkDelay downlink delay value. */
298 iDownLinkDelay = aDownLinkDelay;
301 void CSubConQosGenericParamSet::SetUpLinkDelay(TInt aUpLinkDelay)
302 /** Sets acceptable uplink delay value.
304 @param aUpLinkDelay uplink delay value. */
306 iUpLinkDelay = aUpLinkDelay;
309 void CSubConQosGenericParamSet::SetDownLinkDelayVariation(TInt aDownLinkDelayVariation)
310 /** Sets acceptable downlink delay variation value.
312 @param aDownLinkDelayVariation downlink delay variation value. */
314 iDownLinkDelayVariation = aDownLinkDelayVariation;
317 void CSubConQosGenericParamSet::SetUpLinkDelayVariation(TInt aUpLinkDelayVariation)
318 /** Sets acceptable uplink delay variation value.
320 @param aUpLinkDelayVariation uplink delay variation value. */
322 iUpLinkDelayVariation = aUpLinkDelayVariation;
325 void CSubConQosGenericParamSet::SetDownLinkPriority(TInt aDownLinkPriority)
326 /** Sets downlink priority value (relative to other channel's priority).
328 @param aDownLinkPriority downlink priority value. */
330 iDownLinkPriority = aDownLinkPriority;
333 void CSubConQosGenericParamSet::SetUpLinkPriority(TInt aUpLinkPriority)
334 /** Sets uplink priority value (relative to other channel's priority).
336 @param aUpLinkPriority uplink priority value. */
338 iUpLinkPriority = aUpLinkPriority;
341 void CSubConQosGenericParamSet::SetHeaderMode(TBool aHeaderMode)
342 /** Sets header mode.
344 @param aHeaderMode boolean value indicating whether the header size
345 should be calculated by the QoS module or specified by the client. */
347 iHeaderMode = aHeaderMode;
350 void CSubConQosGenericParamSet::SetName(const TName& aName)
351 /** Sets Qos Parameter set name.
353 @param aName Qos Parameter set name. */
359 CSubConAuthorisationGenericParamSet* CSubConAuthorisationGenericParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType)
360 /** Creates a generic Authorisation family parameterset.
363 The aFamily parameter that is passed into this method will take ownership of the newly
364 created CSubConAuthorisationGenericParamSet object. When the family is destroyed, this
365 parameter set object will also be destroyed (along with any other parameter sets owned
368 @param aFamily parameter sets.
369 @param aType parameter type (Requested/Acceptable/Granted)
370 @return a CSubConAuthorisationGenericParamSet object pointer if successful,
371 otherwise leaves with a system error code.
374 CSubConAuthorisationGenericParamSet* obj = NewL();
375 CleanupStack::PushL(obj);
376 aFamily.SetGenericSetL(*obj, aType);
377 CleanupStack::Pop(obj);
381 CSubConAuthorisationGenericParamSet* CSubConAuthorisationGenericParamSet::NewL(RParameterFamily& aFamily, RParameterFamily::TParameterSetType aType)
382 /** Creates a generic Authorisation family parameterset.
385 The aFamily parameter that is passed into this method will take ownership of the newly
386 created CSubConAuthorisationGenericParamSet object. When the family is destroyed, this
387 parameter set object will also be destroyed (along with any other parameter sets owned
390 @param aFamily parameter sets.
391 @param aType parameter type (Requested/Acceptable/Granted)
392 @return a CSubConAuthorisationGenericParamSet object pointer if successful,
393 otherwise leaves with a system error code.
396 CSubConAuthorisationGenericParamSet* obj = NewL();
397 CleanupStack::PushL(obj);
398 aFamily.AddParameterSetL(obj, aType);
399 CleanupStack::Pop(obj);
403 CSubConAuthorisationGenericParamSet* CSubConAuthorisationGenericParamSet::NewL()
404 /** Creates a generic Authorisation family parameterset.
406 @return a CSubConAuthorisationGenericParamSet object pointer if successful,
407 otherwise leaves with a system error code.
410 STypeId typeId = STypeId::CreateSTypeId(CSubConAuthorisationGenericParamSet::EUid, CSubConAuthorisationGenericParamSet::EType);
411 return static_cast<CSubConAuthorisationGenericParamSet*>(CSubConParameterSet::NewL(typeId));
414 CSubConAuthorisationGenericParamSet::CSubConAuthorisationGenericParamSet()
415 : CSubConGenericParameterSet(),
417 /** Empty CSubConAuthorisationGenericParamSet constructor
422 TInt CSubConAuthorisationGenericParamSet::GetId() const
423 /** Gets Id of Authorisation Parameter set.
425 @return Id of Authorisation Parameter set. */
430 void CSubConAuthorisationGenericParamSet::SetId(TInt aId)
431 /** Sets Id of Authorisation Parameter set.
433 @param aId Id of Authorisation Parameter set. */
438 #endif // __CS_SUBCONPARAMS_INL__