|
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 "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 // @file umtsextn.h |
|
15 // Header file for UMTS (3GPP Release 4) API |
|
16 // @internalTechnology |
|
17 // @prototype |
|
18 // |
|
19 |
|
20 #ifndef __UMTSEXTN_H__ |
|
21 #define __UMTSEXTN_H__ |
|
22 |
|
23 #include <e32std.h> |
|
24 #include <in_sock.h> |
|
25 #include <es_mbuf.h> |
|
26 |
|
27 #include <networking/qoslib.h> |
|
28 |
|
29 #if MM_ETEL_API |
|
30 #include "uscl_qos.h" |
|
31 #else |
|
32 #include <etelqos.h> |
|
33 #endif |
|
34 |
|
35 const TInt KPdpDataCompression = 0x01; |
|
36 const TInt KPdpHeaderCompression = 0x02; |
|
37 |
|
38 // Traffic class |
|
39 enum TUmtsTrafficClass |
|
40 { |
|
41 ETrafficClassUnspecified = RPacketQoS::ETrafficClassUnspecified, |
|
42 ETrafficClassConversational = RPacketQoS::ETrafficClassConversational, |
|
43 ETrafficClassStreaming = RPacketQoS::ETrafficClassStreaming, |
|
44 ETrafficClassInteractive = RPacketQoS::ETrafficClassInteractive, |
|
45 ETrafficClassBackground = RPacketQoS::ETrafficClassBackground |
|
46 }; |
|
47 |
|
48 // Delivery order |
|
49 enum TUmtsDeliveryOrder |
|
50 { |
|
51 EDeliveryOrderUnspecified = RPacketQoS::EDeliveryOrderUnspecified, |
|
52 EDeliveryOrderRequired = RPacketQoS::EDeliveryOrderRequired, |
|
53 EDeliveryOrderNotRequired = RPacketQoS::EDeliveryOrderNotRequired |
|
54 }; |
|
55 |
|
56 // Delivery of erroneous SDUs |
|
57 enum TUmtsErroneousSDUDelivery |
|
58 { |
|
59 EErroneousSDUDeliveryUnspecified = RPacketQoS::EErroneousSDUDeliveryUnspecified, |
|
60 EErroneousSDUDeliveryRequired = RPacketQoS::EErroneousSDUDeliveryRequired, |
|
61 EErroneousSDUDeliveryNotRequired = RPacketQoS::EErroneousSDUDeliveryNotRequired |
|
62 }; |
|
63 |
|
64 // Residual BER |
|
65 enum TUmtsBitErrorRatio |
|
66 { |
|
67 EBERUnspecified = RPacketQoS::EBERUnspecified, |
|
68 EBERFivePerHundred = RPacketQoS::EBERFivePerHundred, |
|
69 EBEROnePerHundred = RPacketQoS::EBEROnePerHundred, |
|
70 EBERFivePerThousand = RPacketQoS::EBERFivePerThousand, |
|
71 EBERFourPerThousand = RPacketQoS::EBERFourPerThousand, |
|
72 EBEROnePerThousand = RPacketQoS::EBEROnePerThousand, |
|
73 EBEROnePerTenThousand = RPacketQoS::EBEROnePerTenThousand, |
|
74 EBEROnePerHundredThousand = RPacketQoS::EBEROnePerHundredThousand, |
|
75 EBEROnePerMillion = RPacketQoS::EBEROnePerMillion, |
|
76 EBERSixPerHundredMillion = RPacketQoS::EBERSixPerHundredMillion |
|
77 }; |
|
78 |
|
79 // Error ratio |
|
80 enum TUmtsSDUErrorRatio |
|
81 { |
|
82 ESDUErrorRatioUnspecified = RPacketQoS::ESDUErrorRatioUnspecified, |
|
83 ESDUErrorRatioOnePerTen = RPacketQoS::ESDUErrorRatioOnePerTen, |
|
84 ESDUErrorRatioOnePerHundred = RPacketQoS::ESDUErrorRatioOnePerHundred, |
|
85 ESDUErrorRatioSevenPerThousand = RPacketQoS::ESDUErrorRatioSevenPerThousand, |
|
86 ESDUErrorRatioOnePerThousand = RPacketQoS::ESDUErrorRatioOnePerThousand, |
|
87 ESDUErrorRatioOnePerTenThousand = RPacketQoS::ESDUErrorRatioOnePerTenThousand, |
|
88 ESDUErrorRatioOnePerHundredThousand = RPacketQoS::ESDUErrorRatioOnePerHundredThousand, |
|
89 ESDUErrorRatioOnePerMillion = RPacketQoS::ESDUErrorRatioOnePerMillion |
|
90 }; |
|
91 |
|
92 // Priority |
|
93 enum TUmtsTrafficHandlingPriority |
|
94 { |
|
95 ETrafficPriorityUnspecified = RPacketQoS::ETrafficPriorityUnspecified, |
|
96 ETrafficPriority1 = RPacketQoS::ETrafficPriority1, |
|
97 ETrafficPriority2 = RPacketQoS::ETrafficPriority2, |
|
98 ETrafficPriority3 = RPacketQoS::ETrafficPriority3 |
|
99 }; |
|
100 |
|
101 enum TUmtsSourceStatisticsDescriptor |
|
102 { |
|
103 /** Unknown source statistics descriptor. */ |
|
104 ESourceStatisticsDescriptorUnknown = RPacketQoS::ESourceStatisticsDescriptorUnknown, |
|
105 /** Speech source statistics descriptor. */ |
|
106 ESourceStatisticsDescriptorSpeech = RPacketQoS::ESourceStatisticsDescriptorSpeech |
|
107 }; |
|
108 |
|
109 // Delay |
|
110 const TUint KTransferDelayUnspecified = 0; |
|
111 const TUint KTransferDelayMax = 4100; // 4100 ms |
|
112 |
|
113 // Max SDU size |
|
114 const TUint KMaxSDUUnspecified = 0; |
|
115 const TUint KMaxSDUMaximum = 1520; |
|
116 |
|
117 // Max bitrate |
|
118 const TUint KMaxBitRateUnspecified = 0; |
|
119 const TUint KMaxBitRateMaximum = 2048; // 2048 kbps |
|
120 |
|
121 // Guaranteed bitrate |
|
122 const TUint KGrtdBitRateUnspecified = 0; |
|
123 const TUint KGrtdBitRateMaximum = 2048; // 2048 kbps |
|
124 |
|
125 /** |
|
126 * This class contains the QoS parameters defined in 3GPP Release 4 specifications. |
|
127 * See 3GPP TS 23.107 for more information about the QoS parameters. |
|
128 * |
|
129 * @internalTechnology |
|
130 * @prototype |
|
131 */ |
|
132 class TUmtsQoSParameters |
|
133 { |
|
134 friend class CUmtsQoSPolicy; |
|
135 public: |
|
136 |
|
137 /** |
|
138 * Constructor |
|
139 */ |
|
140 IMPORT_C TUmtsQoSParameters(); |
|
141 |
|
142 /** |
|
143 * @return Current traffic class. Defines the type of application for which the UMTS bearer service |
|
144 * is optimised. |
|
145 */ |
|
146 IMPORT_C TUmtsTrafficClass TrafficClass() const; |
|
147 |
|
148 /** |
|
149 * @return Current delivery order. Indicates whether the UMTS bearer shall provide in-sequence |
|
150 * SDU delivery or not. |
|
151 */ |
|
152 IMPORT_C TUmtsDeliveryOrder DeliveryOrder() const; |
|
153 |
|
154 /** |
|
155 * @return Current delivery of erroneous SDUs. Indicates whether SDUs detected as erroneous |
|
156 * shall be delivered or discarded. |
|
157 */ |
|
158 IMPORT_C TUmtsErroneousSDUDelivery DeliveryOfErroneusSdu() const; |
|
159 |
|
160 /** |
|
161 * @return Current residual bit error ratio. Indicates the undetected bit error ratio in the |
|
162 * delivered SDUs. If no error detection is requested, Residual bit error ratio indicates the |
|
163 * bit error ratio in the delivered SDUs. |
|
164 */ |
|
165 IMPORT_C TUmtsBitErrorRatio ResidualBer() const; |
|
166 |
|
167 /** |
|
168 * @return Current SDU error ratio. Indicates the fraction of SDUs lost or detected as erroneous. |
|
169 * SDU error ratio is defined only for conforming traffic. |
|
170 */ |
|
171 IMPORT_C TUmtsSDUErrorRatio ErrorRatio() const; |
|
172 |
|
173 /** |
|
174 * @return Current traffic handling priority. Specifies the relative importance for handling |
|
175 * of all SDUs belonging to the UMTS bearer compared to the SDUs of other bearers. |
|
176 * This is defined only for Interactive traffic class. |
|
177 */ |
|
178 IMPORT_C TUmtsTrafficHandlingPriority Priority() const; |
|
179 |
|
180 /** |
|
181 * @return Current transfer delay. Indicates maximum delay for 95th percentile of the distribution |
|
182 * of delay for all delivered SDUs during the lifetime of a bearer service, where delay for an SDU |
|
183 * is defined as the time from a request to transfer an SDU at one SAP to its delivery at the other SAP. |
|
184 */ |
|
185 IMPORT_C TInt TransferDelay() const; |
|
186 |
|
187 /** |
|
188 * @return Current maximum SDU size. Defines the maximum allowed SDU size. |
|
189 */ |
|
190 IMPORT_C TInt MaxSduSize() const; |
|
191 |
|
192 /** |
|
193 * @return Current maximum bitrate for uplink direction. Maximum number of bits delivered by UMTS and to |
|
194 * UMTS at a SAP within a period of time, divided by the duration of the period. The traffic is conformant |
|
195 * with Maximum bitrate as long as it follows a token bucket algorithm where token rate equals Maximum |
|
196 * bitrate and bucket size equals Maximum SDU size. |
|
197 */ |
|
198 IMPORT_C TInt MaxBitrateUplink() const; |
|
199 |
|
200 /** |
|
201 * @return Current maximum bitrate for downlink direction. Maximum number of bits delivered by UMTS and to |
|
202 * UMTS at a SAP within a period of time, divided by the duration of the period. The traffic is conformant |
|
203 * with Maximum bitrate as long as it follows a token bucket algorithm where token rate equals Maximum |
|
204 * bitrate and bucket size equals Maximum SDU size. |
|
205 */ |
|
206 IMPORT_C TInt MaxBitrateDownlink() const; |
|
207 |
|
208 /** |
|
209 * @return Current guaranteed bitrate for uplink direction. Guaranteed number of bits delivered by UMTS at |
|
210 * a SAP within a period of time (provided that there is data to deliver), divided by the duration of the |
|
211 * period. The traffic is conformant with the guaranteed bitrate as long as it follows a token bucket |
|
212 * algorithm where token rate equals Guaranteed bitrate and bucket size equals k*Maximum SDU size. |
|
213 * For release 1999, k=1. |
|
214 */ |
|
215 IMPORT_C TInt GuaranteedBitrateUplink() const; |
|
216 |
|
217 /** |
|
218 * @return Current guaranteed bitrate for downlink direction. Guaranteed number of bits delivered by UMTS at |
|
219 * a SAP within a period of time (provided that there is data to deliver), divided by the duration of the |
|
220 * period. The traffic is conformant with the guaranteed bitrate as long as it follows a token bucket |
|
221 * algorithm where token rate equals Guaranteed bitrate and bucket size equals k*Maximum SDU size. |
|
222 * For release 1999, k=1. |
|
223 */ |
|
224 IMPORT_C TInt GuaranteedBitrateDownlink() const; |
|
225 |
|
226 |
|
227 /** |
|
228 * Sets the traffic class. Traffic class defines the type of application for which |
|
229 * the UMTS bearer service is optimised. |
|
230 * |
|
231 * @param aTrafficClass Value to which to set the traffic class. |
|
232 */ |
|
233 IMPORT_C TInt SetTrafficClass(TUmtsTrafficClass aTrafficClass); |
|
234 |
|
235 /** |
|
236 * Sets the delivery order. Indicates whether the UMTS bearer shall provide in-sequence |
|
237 * SDU delivery or not. |
|
238 * |
|
239 * @param aDeliveryOrder Value to which to set the delivery order. |
|
240 */ |
|
241 IMPORT_C TInt SetDeliveryOrder(TUmtsDeliveryOrder aDeliveryOrder); |
|
242 |
|
243 /** |
|
244 * Sets the delivery of erroneous SDUs. |
|
245 * |
|
246 * @param aDeliveryOfErroneousSdu Value to which to set the delivery of erroneous SDUs. Indicates |
|
247 * whether SDUs detected as erroneous shall be delivered or discarded. |
|
248 */ |
|
249 IMPORT_C TInt SetDeliveryOfErroneusSdu(TUmtsErroneousSDUDelivery aDeliveryOfErroneousSdu); |
|
250 |
|
251 /** |
|
252 * Sets the residual bit error ratio. Indicates the undetected bit error ratio in the |
|
253 * delivered SDUs. If no error detection is requested, Residual bit error ratio indicates the |
|
254 * bit error ratio in the delivered SDUs. |
|
255 * |
|
256 * @param aResidualBer Value to which to set the residual bit error ratio. |
|
257 */ |
|
258 IMPORT_C TInt SetResidualBer(TUmtsBitErrorRatio aResidualBer); |
|
259 |
|
260 |
|
261 /** |
|
262 * Sets the error ratio. Indicates the fraction of SDUs lost or detected as erroneous. |
|
263 * SDU error ratio is defined only for conforming traffic. |
|
264 * |
|
265 * @param aErrorRatio Value to which to set the error ratio. |
|
266 */ |
|
267 IMPORT_C TInt SetErrorRatio(TUmtsSDUErrorRatio aErrorRatio); |
|
268 |
|
269 /** |
|
270 * Sets the traffic handling priority. Specifies the relative importance for handling |
|
271 * of all SDUs belonging to the UMTS bearer compared to the SDUs of other bearers. This |
|
272 * is defined only for Interactive traffic class. |
|
273 * |
|
274 * @param aPriority Value to which to set the traffic handling priority. |
|
275 */ |
|
276 IMPORT_C TInt SetPriority(TUmtsTrafficHandlingPriority aPriority); |
|
277 |
|
278 /** |
|
279 * Sets the transfer delay. Indicates maximum delay for 95th percentile of the distribution |
|
280 * of delay for all delivered SDUs during the lifetime of a bearer service, where delay for an SDU |
|
281 * is defined as the time from a request to transfer an SDU at one SAP to its delivery at the other SAP. |
|
282 * |
|
283 * @param aTransferDelay Value to which to set the transfer delay. |
|
284 */ |
|
285 IMPORT_C TInt SetTransferDelay(TUint aTransferDelay); |
|
286 |
|
287 /** |
|
288 * Sets the maximum SDU size. Defines the maximum allowed SDU size. |
|
289 * |
|
290 * @param aMaxSduSize Value to which to set the maximum SDU size. |
|
291 */ |
|
292 IMPORT_C TInt SetMaxSduSize(TUint aMaxSduSize); |
|
293 |
|
294 /** |
|
295 * Sets the maximum bitrate for uplink direction. Maximum number of bits delivered by UMTS and to |
|
296 * UMTS at a SAP within a period of time, divided by the duration of the period. The traffic is conformant |
|
297 * with Maximum bitrate as long as it follows a token bucket algorithm where token rate equals Maximum |
|
298 * bitrate and bucket size equals Maximum SDU size. |
|
299 * |
|
300 * @param aMaxBitrate Value to which to set the maximum bitrate for uplink direction. |
|
301 */ |
|
302 IMPORT_C TInt SetMaxBitrateUplink(TUint aMaxBitrate); |
|
303 |
|
304 /** |
|
305 * Sets the maximum bitrate for downlink direction. Maximum number of bits delivered by UMTS and to |
|
306 * UMTS at a SAP within a period of time, divided by the duration of the period. The traffic is conformant |
|
307 * with Maximum bitrate as long as it follows a token bucket algorithm where token rate equals Maximum |
|
308 * bitrate and bucket size equals Maximum SDU size. |
|
309 * |
|
310 * @param aMaxBitrate Value to which to set the maximum bitrate for downlink direction. |
|
311 */ |
|
312 IMPORT_C TInt SetMaxBitrateDownlink(TUint aMaxBitrate); |
|
313 |
|
314 /** |
|
315 * Sets the guaranteed bitrate for uplink direction. Guaranteed number of bits delivered by UMTS at |
|
316 * a SAP within a period of time (provided that there is data to deliver), divided by the duration of the |
|
317 * period. The traffic is conformant with the guaranteed bitrate as long as it follows a token bucket |
|
318 * algorithm where token rate equals Guaranteed bitrate and bucket size equals k*Maximum SDU size. |
|
319 * For release 1999, k=1. |
|
320 * |
|
321 * @param aGuaBitrate Value to which to set the maximum SDU size. |
|
322 */ |
|
323 IMPORT_C TInt SetGuaranteedBitrateUplink(TUint aGuaBitrate); |
|
324 |
|
325 /** |
|
326 * Sets the guaranteed bitrate for downlink direction. Guaranteed number of bits delivered by UMTS at |
|
327 * a SAP within a period of time (provided that there is data to deliver), divided by the duration of the |
|
328 * period. The traffic is conformant with the guaranteed bitrate as long as it follows a token bucket |
|
329 * algorithm where token rate equals Guaranteed bitrate and bucket size equals k*Maximum SDU size. |
|
330 * For release 1999, k=1. |
|
331 * |
|
332 * @param aGuaBitrate Value to which to set the maximum SDU size. |
|
333 */ |
|
334 IMPORT_C TInt SetGuaranteedBitrateDownlink(TUint aGuaBitrate); |
|
335 |
|
336 protected: |
|
337 TUmtsTrafficClass iTrafficClass; // Traffic class |
|
338 TUmtsDeliveryOrder iDeliveryOrder; // Delivery order |
|
339 TUmtsErroneousSDUDelivery iDeliveryOfErroneusSdu; // Delivery of erroneous SDUs |
|
340 TUmtsBitErrorRatio iResidualBer; // Residual BER |
|
341 TUmtsSDUErrorRatio iErrorRatio; // SDU error ratio |
|
342 TUmtsTrafficHandlingPriority iPriority; // Traffic handling priority |
|
343 TInt iTransferDelay; // Transfer delay |
|
344 TInt iMaxSduSize; // Maximum SDU size |
|
345 TInt iMaxBitrateUplink; // Maximum bit rate for uplink |
|
346 TInt iMaxBitrateDownlink; // Maximum bit rate for downlink |
|
347 TInt iGuaBitrateUplink; // Guaranteed bit rate for uplink |
|
348 TInt iGuaBitrateDownlink; // Guaranteed bit rate for downlink |
|
349 }; |
|
350 |
|
351 /** |
|
352 * This class contains the negotiated QoS parameters that the network has granted. |
|
353 * |
|
354 * @internalTechnology |
|
355 * @prototype |
|
356 */ |
|
357 class TNegotiatedUmtsQoSParameters : public TUmtsQoSParameters |
|
358 { |
|
359 friend class TUmtsQoSPolicy; |
|
360 friend class CUmtsQoSPolicy; |
|
361 public: |
|
362 |
|
363 IMPORT_C TNegotiatedUmtsQoSParameters(); |
|
364 |
|
365 /** |
|
366 * @return Header compression used in the PDP context. A bitmask indicationg |
|
367 * if header compression (KPdpHeaderCompression) or data compression (KPdpDataCompression) is used. |
|
368 */ |
|
369 IMPORT_C TUint HeaderCompression() const; |
|
370 |
|
371 /** |
|
372 * @return Error code == KErrNone if QoS request was succesful. If error code != KErrNone, |
|
373 * the negotiated QoS parameters have no meaning. |
|
374 */ |
|
375 IMPORT_C TInt ErrorCode() const; |
|
376 |
|
377 protected: |
|
378 TUint iCompression; // Header compression |
|
379 TInt iErrorCode; // Error code |
|
380 }; |
|
381 |
|
382 |
|
383 |
|
384 /** |
|
385 * This is a Umts policy extension, that can be added to a CQoSParameters object. |
|
386 * |
|
387 * @internalTechnology |
|
388 * @prototype |
|
389 */ |
|
390 class CUmtsQoSPolicy : public CExtensionBase |
|
391 { |
|
392 public: |
|
393 /** |
|
394 * 2 phase constructor. Creates a CUmtsQoSPolicy object. |
|
395 * @return A pointer to CUmtsQoSPolicy object. |
|
396 * @exception Leaves if no memory is available. |
|
397 */ |
|
398 IMPORT_C static CUmtsQoSPolicy* NewL(); |
|
399 |
|
400 /** |
|
401 * destructor. |
|
402 */ |
|
403 IMPORT_C ~CUmtsQoSPolicy(); |
|
404 |
|
405 /** |
|
406 * Returns Umts policy extension in a descriptor. This is used by QoS API library. |
|
407 * @return Descriptor that contains umts policy. |
|
408 */ |
|
409 IMPORT_C TDesC8& Data(); |
|
410 |
|
411 /** |
|
412 * Parses a Umts policy extension given in a descriptor. This is used by QoS API library. |
|
413 * @return KErrNone if aData contains a valid Umts policy extension, otherwise KErrGeneral. |
|
414 */ |
|
415 IMPORT_C TInt ParseMessage(const TDesC8& aData); |
|
416 |
|
417 /** |
|
418 * Creates a CUmtsQoSPolicy object. This is used by QoS API library. |
|
419 * @return A pointer to CUmtsQoSPolicy object. |
|
420 * @exception Leaves if no memory is available. |
|
421 */ |
|
422 IMPORT_C CExtensionBase* CreateL(); |
|
423 |
|
424 /** |
|
425 * Copies the parameters from aExtension object to this object. aExtension must be a CUmtsQoSPolicy |
|
426 * object. If some other extension is given as a parameter, KErrArgument is returned. |
|
427 * @param aExtension A CUmtsQoSPolicy object that is copied into this object. |
|
428 * @return KErrNone, aExtension is a CUmtsQoSPolicy object, otherwise KErrArgument. |
|
429 */ |
|
430 IMPORT_C TInt Copy(const CExtensionBase& aExtension); |
|
431 |
|
432 /** |
|
433 * Sets the requested Umts QoS parameter set. |
|
434 * @param aRequested Contains the requested Umts QoS parameters. |
|
435 */ |
|
436 IMPORT_C void SetQoSRequested(const TUmtsQoSParameters& aRequested); |
|
437 |
|
438 /** |
|
439 * Sets the minimum Umts QoS parameter set. |
|
440 * @param aMinimum Contains the minimum Umts QoS parameters. |
|
441 */ |
|
442 IMPORT_C void SetQoSMinimum(const TUmtsQoSParameters& aMinimum); |
|
443 |
|
444 /** |
|
445 * Gets the requested Umts QoS parameter set. |
|
446 * @param aRequested Requested QoS parameter set will be copied to aRequested. |
|
447 */ |
|
448 IMPORT_C void GetQoSRequested(TUmtsQoSParameters& aRequested) const; |
|
449 |
|
450 /** |
|
451 * Gets the minimum Umts QoS parameter set. |
|
452 * @param aMinimum Minimum QoS parameter set will be copied to aMinimum. |
|
453 */ |
|
454 IMPORT_C void GetQoSMinimum(TUmtsQoSParameters& aMinimum) const; |
|
455 |
|
456 /** |
|
457 * Gets the negotiated Umts QoS parameter set. |
|
458 * @param aNegotiated Negotiated QoS parameter set will be copied to aNegotiated. |
|
459 */ |
|
460 IMPORT_C void GetQoSNegotiated(TNegotiatedUmtsQoSParameters& aNegotiated) const; |
|
461 |
|
462 /** |
|
463 * Sets the requested header compression value. |
|
464 * @param aCompression Contains the requested header compression value: a bitmask indicationg |
|
465 * if header compression (KPdpHeaderCompression) or data compression (KPdpDataCompression) is used. |
|
466 * @return KErrNone, if aCompression contains supported header compression value, |
|
467 * KErrNotSupported in other case. |
|
468 */ |
|
469 IMPORT_C TInt SetHeaderCompression(TUint aCompression); |
|
470 |
|
471 /** |
|
472 * Gets the current requested header compression value: a bitmask indicationg |
|
473 * if header compression (KPdpHeaderCompression) or data compression (KPdpDataCompression) is used. |
|
474 * @return Current requested header compression value. |
|
475 */ |
|
476 IMPORT_C TUint HeaderCompression() const; |
|
477 |
|
478 protected: |
|
479 CUmtsQoSPolicy(); |
|
480 void ConstructL(); |
|
481 |
|
482 private: |
|
483 TUmtsQoSParameters iMinimum; // Minimum QoS parameter set |
|
484 TUmtsQoSParameters iRequested; // Requested QoS parameter set |
|
485 TNegotiatedUmtsQoSParameters iNegotiated; // Negotiated QoS parameters |
|
486 TUint iCompression; // Header compression |
|
487 TPtr8 iBufPtr; |
|
488 }; |
|
489 |
|
490 /** |
|
491 This class contain the 3GPP R5 Networking QoS support paramters |
|
492 with the old R99 umts parameters (supported by TUmtsQoSParameters class) |
|
493 |
|
494 @internalTechnology |
|
495 @prototype |
|
496 */ |
|
497 class TUmtsR5QoSParameters : public TUmtsQoSParameters |
|
498 { |
|
499 friend class CUmtsR5QoSPolicy; |
|
500 public: |
|
501 |
|
502 /** |
|
503 Constructor |
|
504 */ |
|
505 IMPORT_C TUmtsR5QoSParameters(); |
|
506 |
|
507 /** |
|
508 Gets the current Signalling Indicator flag |
|
509 |
|
510 @return current Signalling Indicator flag |
|
511 */ |
|
512 IMPORT_C TBool SignallingIndicator() const; |
|
513 |
|
514 /** |
|
515 Gets the current Source Statistics Descriptor value |
|
516 |
|
517 @return current Source Statistics Descriptor value |
|
518 */ |
|
519 IMPORT_C TUmtsSourceStatisticsDescriptor SourceStatisticsDescriptor() const; |
|
520 |
|
521 /** |
|
522 Sets the Signalling Indicator flag |
|
523 |
|
524 @param aSignallingIndicator Value to which to set the Signalling Indicator flag |
|
525 */ |
|
526 IMPORT_C TInt SetSignallingIndicator(TBool aSignallingIndicator); |
|
527 |
|
528 /** |
|
529 Sets the Source Statistics Descriptor |
|
530 |
|
531 @param aSrcStatisticsDesc Value to which to set the Source Statistics Descriptor |
|
532 */ |
|
533 IMPORT_C TInt SetSourceStatisticsDescriptor(TUmtsSourceStatisticsDescriptor aSrcStatisticsDesc); |
|
534 |
|
535 protected: |
|
536 |
|
537 TBool iSignallingIndicator; // Signalling Indicator flag |
|
538 TUmtsSourceStatisticsDescriptor iSrcStatisticsDesc; // Source Statistics Descriptor |
|
539 }; |
|
540 |
|
541 /** |
|
542 This class contains the negotiated UMTS R5 QoS parameters that the network has granted. |
|
543 |
|
544 @internalTechnology |
|
545 @prototype |
|
546 */ |
|
547 class TNegotiatedUmtsR5QoSParameters : public TUmtsR5QoSParameters |
|
548 { |
|
549 friend class CUmtsR5QoSPolicy; |
|
550 public: |
|
551 |
|
552 IMPORT_C TNegotiatedUmtsR5QoSParameters(); |
|
553 |
|
554 /** |
|
555 @return Header compression used in the PDP context. A bitmask indicationg |
|
556 if header compression (KPdpHeaderCompression) or data compression (KPdpDataCompression) is used. |
|
557 */ |
|
558 IMPORT_C TUint HeaderCompression() const; |
|
559 |
|
560 /** |
|
561 @return Error code == KErrNone if QoS request was succesful. If error code != KErrNone, |
|
562 the negotiated QoS parameters have no meaning. |
|
563 */ |
|
564 IMPORT_C TInt ErrorCode() const; |
|
565 |
|
566 protected: |
|
567 TUint iCompression; // Header compression |
|
568 TInt iErrorCode; // Error code |
|
569 }; |
|
570 |
|
571 |
|
572 /** |
|
573 This is the UMTS R5 policy extension. The UMTS R5 policy can be extended by adding the |
|
574 CSubConIMSExtensionParamSet object at the client side |
|
575 |
|
576 @internalTechnology |
|
577 @prototype |
|
578 */ |
|
579 class CUmtsR5QoSPolicy : public CExtensionBase |
|
580 { |
|
581 public: |
|
582 |
|
583 /** Two phase constructor. Creates a CUmtsR5QoSPolicy object. |
|
584 |
|
585 @return A pointer to CUmtsR5QoSPolicy object. |
|
586 @exception Leaves if no memory is available. |
|
587 */ |
|
588 IMPORT_C static CUmtsR5QoSPolicy* NewL(); |
|
589 |
|
590 /** destructor. |
|
591 */ |
|
592 IMPORT_C ~CUmtsR5QoSPolicy(); |
|
593 |
|
594 /** Returns Umts policy r5 extension in a descriptor. This is used by ipscpr. |
|
595 |
|
596 @return Descriptor that contains umts r5 policy. |
|
597 */ |
|
598 IMPORT_C TDesC8& Data(); |
|
599 |
|
600 /** Parses a Umts r5 policy extension given in a descriptor. This is used by ipscpr. |
|
601 |
|
602 @return KErrNone if aData contains a valid Umts r5 policy extension, otherwise KErrGeneral. |
|
603 */ |
|
604 IMPORT_C TInt ParseMessage(const TDesC8& aData); |
|
605 |
|
606 /** Creates a CUmtsR5QoSPolicy object. This is used by ipscpr. |
|
607 |
|
608 @return A pointer to CUmtsR5QoSPolicy object. |
|
609 @exception Leaves if no memory is available. |
|
610 */ |
|
611 IMPORT_C CExtensionBase* CreateL(); |
|
612 |
|
613 /** Copies the parameters from aExtension object to this object. aExtension must be a CUmtsR5QoSPolicy |
|
614 object. If some other extension is given as a parameter, KErrArgument is returned. |
|
615 |
|
616 @param aExtension A CUmtsR5QoSPolicy object that is copied into this object. |
|
617 @return KErrNone, aExtension is a CUmtsR5QoSPolicy object, otherwise KErrArgument. |
|
618 */ |
|
619 IMPORT_C TInt Copy(const CExtensionBase& aExtension); |
|
620 |
|
621 /** Sets the requested Umts r5 QoS parameter set. |
|
622 |
|
623 @param aRequested Contains the requested Umts r5 QoS parameters. |
|
624 */ |
|
625 IMPORT_C void SetQoSRequested(const TUmtsR5QoSParameters& aRequested); |
|
626 |
|
627 /** Sets the minimum Umts r5 QoS parameter set. |
|
628 |
|
629 @param aMinimum Contains the minimum Umts r5 QoS parameters. |
|
630 */ |
|
631 IMPORT_C void SetQoSMinimum(const TUmtsR5QoSParameters& aMinimum); |
|
632 |
|
633 /** Gets the requested Umts r5 QoS parameter set. |
|
634 |
|
635 @param aRequested Requested r5 QoS parameter set will be copied to aRequested. |
|
636 */ |
|
637 IMPORT_C void GetQoSRequested(TUmtsR5QoSParameters& aRequested) const; |
|
638 |
|
639 /** Gets the minimum Umts r5 QoS parameter set. |
|
640 |
|
641 @param aMinimum Minimum r5 QoS parameter set will be copied to aMinimum. |
|
642 */ |
|
643 IMPORT_C void GetQoSMinimum(TUmtsR5QoSParameters& aMinimum) const; |
|
644 |
|
645 /** Gets the negotiated Umts r5 QoS parameter set. |
|
646 |
|
647 @param aNegotiated Negotiated r5 QoS parameter set will be copied to aNegotiated. |
|
648 */ |
|
649 IMPORT_C void GetQoSNegotiated(TNegotiatedUmtsR5QoSParameters& aNegotiated) const; |
|
650 |
|
651 /** Sets the requested header compression value. |
|
652 |
|
653 @param aCompression Contains the requested header compression value: a bitmask indicationg |
|
654 if header compression (KPdpHeaderCompression) or data compression (KPdpDataCompression) is used. |
|
655 @return KErrNone, if aCompression contains supported header compression value, |
|
656 KErrNotSupported in other case. |
|
657 */ |
|
658 IMPORT_C TInt SetHeaderCompression(TUint aCompression); |
|
659 |
|
660 /** Gets the current requested header compression value: a bitmask indicationg |
|
661 if header compression (KPdpHeaderCompression) or data compression (KPdpDataCompression) is used. |
|
662 |
|
663 @return Current requested header compression value. |
|
664 */ |
|
665 IMPORT_C TUint HeaderCompression() const; |
|
666 |
|
667 protected: |
|
668 CUmtsR5QoSPolicy(); |
|
669 void ConstructL(); |
|
670 |
|
671 private: |
|
672 TUmtsR5QoSParameters iMinimum; // Minimum QoS parameter set |
|
673 TUmtsR5QoSParameters iRequested; // Requested QoS parameter set |
|
674 TNegotiatedUmtsR5QoSParameters iNegotiated; // Negotiated QoS parameters |
|
675 TUint iCompression; // Header compression |
|
676 TPtr8 iBufPtr; |
|
677 }; |
|
678 |
|
679 #endif // __UMTSEXTN_H__ |