24
|
1 |
// Copyright (c) 2003-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 |
// umtsapi.h - UMTS QoS API
|
|
15 |
//
|
|
16 |
|
|
17 |
#include "umtsextn.h"
|
|
18 |
#include "qosextn_constants.h"
|
|
19 |
#include "qosextn_log.h"
|
|
20 |
#include <networking/pfqos.h>
|
|
21 |
//
|
|
22 |
// TUmtsQoSParameters
|
|
23 |
//
|
|
24 |
//lint -e{1927} would like initializing in initializer list instead of in body.
|
|
25 |
EXPORT_C TUmtsQoSParameters::TUmtsQoSParameters()
|
|
26 |
{
|
|
27 |
iTrafficClass = ETrafficClassUnspecified;
|
|
28 |
iDeliveryOrder = EDeliveryOrderUnspecified;
|
|
29 |
iDeliveryOfErroneusSdu = EErroneousSDUDeliveryUnspecified;
|
|
30 |
iResidualBer = EBERUnspecified;
|
|
31 |
iErrorRatio = ESDUErrorRatioUnspecified;
|
|
32 |
iPriority = ETrafficPriorityUnspecified;
|
|
33 |
iTransferDelay = KTransferDelayUnspecified;
|
|
34 |
iMaxSduSize = KMaxSDUUnspecified;
|
|
35 |
iMaxBitrateUplink = KMaxBitRateUnspecified;
|
|
36 |
iMaxBitrateDownlink = KMaxBitRateUnspecified;
|
|
37 |
iGuaBitrateUplink = KGrtdBitRateUnspecified;
|
|
38 |
iGuaBitrateDownlink = KGrtdBitRateUnspecified;
|
|
39 |
}
|
|
40 |
|
|
41 |
EXPORT_C TUmtsTrafficClass TUmtsQoSParameters::TrafficClass() const
|
|
42 |
{
|
|
43 |
return iTrafficClass;
|
|
44 |
}
|
|
45 |
|
|
46 |
|
|
47 |
EXPORT_C TUmtsDeliveryOrder TUmtsQoSParameters::DeliveryOrder() const
|
|
48 |
{
|
|
49 |
return iDeliveryOrder;
|
|
50 |
}
|
|
51 |
|
|
52 |
EXPORT_C TUmtsErroneousSDUDelivery TUmtsQoSParameters::DeliveryOfErroneusSdu() const
|
|
53 |
{
|
|
54 |
return iDeliveryOfErroneusSdu;
|
|
55 |
}
|
|
56 |
|
|
57 |
EXPORT_C TUmtsBitErrorRatio TUmtsQoSParameters::ResidualBer() const
|
|
58 |
{
|
|
59 |
return iResidualBer;
|
|
60 |
}
|
|
61 |
|
|
62 |
EXPORT_C TUmtsSDUErrorRatio TUmtsQoSParameters::ErrorRatio() const
|
|
63 |
{
|
|
64 |
return iErrorRatio;
|
|
65 |
}
|
|
66 |
|
|
67 |
EXPORT_C TUmtsTrafficHandlingPriority TUmtsQoSParameters::Priority() const
|
|
68 |
{
|
|
69 |
return iPriority;
|
|
70 |
}
|
|
71 |
|
|
72 |
EXPORT_C TInt TUmtsQoSParameters::TransferDelay() const
|
|
73 |
{
|
|
74 |
return iTransferDelay;
|
|
75 |
}
|
|
76 |
|
|
77 |
EXPORT_C TInt TUmtsQoSParameters::MaxSduSize() const
|
|
78 |
{
|
|
79 |
return iMaxSduSize;
|
|
80 |
}
|
|
81 |
|
|
82 |
EXPORT_C TInt TUmtsQoSParameters::MaxBitrateUplink() const
|
|
83 |
{
|
|
84 |
return iMaxBitrateUplink;
|
|
85 |
}
|
|
86 |
|
|
87 |
EXPORT_C TInt TUmtsQoSParameters::MaxBitrateDownlink() const
|
|
88 |
{
|
|
89 |
return iMaxBitrateDownlink;
|
|
90 |
}
|
|
91 |
|
|
92 |
EXPORT_C TInt TUmtsQoSParameters::GuaranteedBitrateUplink() const
|
|
93 |
{
|
|
94 |
return iGuaBitrateUplink;
|
|
95 |
}
|
|
96 |
|
|
97 |
EXPORT_C TInt TUmtsQoSParameters::GuaranteedBitrateDownlink() const
|
|
98 |
{
|
|
99 |
return iGuaBitrateDownlink;
|
|
100 |
}
|
|
101 |
|
|
102 |
|
|
103 |
EXPORT_C TInt TUmtsQoSParameters::SetTrafficClass(TUmtsTrafficClass aTrafficClass)
|
|
104 |
{
|
|
105 |
iTrafficClass = aTrafficClass;
|
|
106 |
return KErrNone;
|
|
107 |
}
|
|
108 |
|
|
109 |
EXPORT_C TInt TUmtsQoSParameters::SetDeliveryOrder(TUmtsDeliveryOrder aDeliveryOrder)
|
|
110 |
{
|
|
111 |
iDeliveryOrder = aDeliveryOrder;
|
|
112 |
return KErrNone;
|
|
113 |
}
|
|
114 |
|
|
115 |
EXPORT_C TInt TUmtsQoSParameters::SetDeliveryOfErroneusSdu(TUmtsErroneousSDUDelivery aDeliveryOfErroneusSdu)
|
|
116 |
{
|
|
117 |
iDeliveryOfErroneusSdu = aDeliveryOfErroneusSdu;
|
|
118 |
return KErrNone;
|
|
119 |
}
|
|
120 |
|
|
121 |
EXPORT_C TInt TUmtsQoSParameters::SetResidualBer(TUmtsBitErrorRatio aResidualBer)
|
|
122 |
{
|
|
123 |
iResidualBer = aResidualBer;
|
|
124 |
return KErrNone;
|
|
125 |
}
|
|
126 |
|
|
127 |
EXPORT_C TInt TUmtsQoSParameters::SetErrorRatio(TUmtsSDUErrorRatio aErrorRatio)
|
|
128 |
{
|
|
129 |
iErrorRatio = aErrorRatio;
|
|
130 |
return KErrNone;
|
|
131 |
}
|
|
132 |
|
|
133 |
EXPORT_C TInt TUmtsQoSParameters::SetPriority(TUmtsTrafficHandlingPriority aPriority)
|
|
134 |
{
|
|
135 |
iPriority = aPriority;
|
|
136 |
return KErrNone;
|
|
137 |
}
|
|
138 |
|
|
139 |
EXPORT_C TInt TUmtsQoSParameters::SetTransferDelay(TUint aTransferDelay)
|
|
140 |
{
|
|
141 |
if (aTransferDelay > KTransferDelayMax)
|
|
142 |
return KErrArgument;
|
|
143 |
iTransferDelay = aTransferDelay;
|
|
144 |
return KErrNone;
|
|
145 |
}
|
|
146 |
|
|
147 |
EXPORT_C TInt TUmtsQoSParameters::SetMaxSduSize(TUint aMaxSduSize)
|
|
148 |
{
|
|
149 |
if (aMaxSduSize > KMaxSDUMaximum)
|
|
150 |
return KErrArgument;
|
|
151 |
iMaxSduSize = aMaxSduSize;
|
|
152 |
return KErrNone;
|
|
153 |
}
|
|
154 |
|
|
155 |
EXPORT_C TInt TUmtsQoSParameters::SetMaxBitrateUplink(TUint aMaxBitrateUplink)
|
|
156 |
{
|
|
157 |
if (aMaxBitrateUplink > KMaxBitRateMaximum)
|
|
158 |
return KErrArgument;
|
|
159 |
iMaxBitrateUplink = aMaxBitrateUplink;
|
|
160 |
return KErrNone;
|
|
161 |
}
|
|
162 |
|
|
163 |
EXPORT_C TInt TUmtsQoSParameters::SetMaxBitrateDownlink(TUint aMaxBitrateDownlink)
|
|
164 |
{
|
|
165 |
if (aMaxBitrateDownlink > KMaxBitRateMaximum)
|
|
166 |
return KErrArgument;
|
|
167 |
iMaxBitrateDownlink = aMaxBitrateDownlink;
|
|
168 |
return KErrNone;
|
|
169 |
}
|
|
170 |
|
|
171 |
EXPORT_C TInt TUmtsQoSParameters::SetGuaranteedBitrateUplink(TUint aGuaBitrateUplink)
|
|
172 |
{
|
|
173 |
if (aGuaBitrateUplink > KGrtdBitRateMaximum)
|
|
174 |
return KErrArgument;
|
|
175 |
iGuaBitrateUplink = aGuaBitrateUplink;
|
|
176 |
return KErrNone;
|
|
177 |
}
|
|
178 |
|
|
179 |
EXPORT_C TInt TUmtsQoSParameters::SetGuaranteedBitrateDownlink(TUint aGuaBitrateDownlink)
|
|
180 |
{
|
|
181 |
if (aGuaBitrateDownlink > KGrtdBitRateMaximum)
|
|
182 |
return KErrArgument;
|
|
183 |
iGuaBitrateDownlink = aGuaBitrateDownlink;
|
|
184 |
return KErrNone;
|
|
185 |
}
|
|
186 |
|
|
187 |
|
|
188 |
//
|
|
189 |
// TNegotiatedUmtsQoSParameters
|
|
190 |
//
|
|
191 |
EXPORT_C TNegotiatedUmtsQoSParameters::TNegotiatedUmtsQoSParameters() : iCompression(0), iErrorCode(KErrNone)
|
|
192 |
{
|
|
193 |
}
|
|
194 |
|
|
195 |
EXPORT_C TUint TNegotiatedUmtsQoSParameters::HeaderCompression() const
|
|
196 |
{
|
|
197 |
return iCompression;
|
|
198 |
}
|
|
199 |
|
|
200 |
EXPORT_C TInt TNegotiatedUmtsQoSParameters::ErrorCode() const
|
|
201 |
{
|
|
202 |
return iErrorCode;
|
|
203 |
}
|
|
204 |
|
|
205 |
// Buffer size
|
|
206 |
const TUint KUmtsApiBufSize = 8192;
|
|
207 |
|
|
208 |
//
|
|
209 |
// TUmtsQoSPolicy
|
|
210 |
//
|
|
211 |
EXPORT_C CUmtsQoSPolicy* CUmtsQoSPolicy::NewL()
|
|
212 |
{
|
|
213 |
CUmtsQoSPolicy* policy = new (ELeave) CUmtsQoSPolicy();
|
|
214 |
CleanupStack::PushL(policy);
|
|
215 |
policy->ConstructL();
|
|
216 |
CleanupStack::Pop();
|
|
217 |
return policy;
|
|
218 |
}
|
|
219 |
|
|
220 |
CUmtsQoSPolicy::CUmtsQoSPolicy() : iBufPtr(0,0)
|
|
221 |
{
|
|
222 |
iType = KPfqosExtensionUmts;
|
|
223 |
}
|
|
224 |
|
|
225 |
void CUmtsQoSPolicy::ConstructL()
|
|
226 |
{
|
|
227 |
iData = HBufC8::NewL(KUmtsApiBufSize);
|
|
228 |
TPtr8 tmp(iData->Des());
|
|
229 |
iBufPtr.Set(tmp);
|
|
230 |
}
|
|
231 |
|
|
232 |
EXPORT_C CUmtsQoSPolicy::~CUmtsQoSPolicy()
|
|
233 |
{
|
|
234 |
delete iData;
|
|
235 |
iData = 0;
|
|
236 |
}
|
|
237 |
|
|
238 |
static void SetIntValue(pfqos_configblock_int& data, TInt aValue, const TDesC8& aName)
|
|
239 |
{
|
|
240 |
data.len = sizeof(pfqos_configblock_int)/8;
|
|
241 |
data.padding = data.reserved = 0;
|
|
242 |
data.type = KPfqosTypeInteger;
|
|
243 |
data.value = aValue;
|
|
244 |
Mem::FillZ(data.id, KPfqosMaxName);
|
|
245 |
Mem::Copy(data.id, aName.Ptr(), aName.Length());
|
|
246 |
}
|
|
247 |
|
|
248 |
EXPORT_C TDesC8& CUmtsQoSPolicy::Data()
|
|
249 |
{
|
|
250 |
iBufPtr.SetLength(0);
|
|
251 |
const int byte_len = (sizeof(pfqos_configure)+sizeof(pfqos_extension)+sizeof(pfqos_configblock_int)*37);
|
|
252 |
|
|
253 |
pfqos_configure iHeader;
|
|
254 |
iHeader.pfqos_configure_len = (TUint16)((byte_len + 7) / 8);
|
|
255 |
iHeader.pfqos_ext_type = EPfqosExtExtension;
|
|
256 |
iHeader.reserved = 0;
|
|
257 |
iHeader.protocol_id = 0;
|
|
258 |
iBufPtr.Append((TUint8*)&iHeader, sizeof(pfqos_configure));
|
|
259 |
|
|
260 |
pfqos_extension aExtensionType;
|
|
261 |
aExtensionType.pfqos_ext_len = 0;
|
|
262 |
aExtensionType.pfqos_ext_type = EPfqosExtExtension;
|
|
263 |
aExtensionType.pfqos_extension_type = KPfqosExtensionUmts;
|
|
264 |
iBufPtr.Append((TUint8*)&aExtensionType, sizeof(pfqos_extension));
|
|
265 |
|
|
266 |
pfqos_configblock_int iExt;
|
|
267 |
|
|
268 |
// Minimum
|
|
269 |
SetIntValue(iExt, iMinimum.iTrafficClass, KDescTrafficClassMinimum);
|
|
270 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
271 |
|
|
272 |
SetIntValue(iExt, iMinimum.iDeliveryOrder, KDescDeliveryOrderMinimum);
|
|
273 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
274 |
|
|
275 |
SetIntValue(iExt, iMinimum.iDeliveryOfErroneusSdu, KDescDeliveryOfErroneusSduMinimum);
|
|
276 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
277 |
|
|
278 |
SetIntValue(iExt, iMinimum.iResidualBer, KDescResidualBerMinimum);
|
|
279 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
280 |
|
|
281 |
SetIntValue(iExt, iMinimum.iErrorRatio, KDescErrorRatioMinimum);
|
|
282 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
283 |
|
|
284 |
SetIntValue(iExt, iMinimum.iPriority, KDescPriorityMinimum);
|
|
285 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
286 |
|
|
287 |
SetIntValue(iExt, iMinimum.iTransferDelay, KDescTransferDelayMinimum);
|
|
288 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
289 |
|
|
290 |
SetIntValue(iExt, iMinimum.iMaxSduSize, KDescMaxSduSizeMinimum);
|
|
291 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
292 |
|
|
293 |
SetIntValue(iExt, iMinimum.iMaxBitrateUplink, KDescMaxBitrateUplinkMinimum);
|
|
294 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
295 |
|
|
296 |
SetIntValue(iExt, iMinimum.iMaxBitrateDownlink, KDescMaxBitrateDownlinkMinimum);
|
|
297 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
298 |
|
|
299 |
SetIntValue(iExt, iMinimum.iGuaBitrateUplink, KDescGuaBitrateUplinkMinimum);
|
|
300 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
301 |
|
|
302 |
SetIntValue(iExt, iMinimum.iGuaBitrateDownlink, KDescGuaBitrateDownlinkMinimum);
|
|
303 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
304 |
|
|
305 |
// Requested
|
|
306 |
SetIntValue(iExt, iRequested.iTrafficClass, KDescTrafficClassRequested);
|
|
307 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
308 |
|
|
309 |
SetIntValue(iExt, iRequested.iDeliveryOrder, KDescDeliveryOrderRequested);
|
|
310 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
311 |
|
|
312 |
SetIntValue(iExt, iRequested.iDeliveryOfErroneusSdu, KDescDeliveryOfErroneusSduRequested);
|
|
313 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
314 |
|
|
315 |
SetIntValue(iExt, iRequested.iResidualBer, KDescResidualBerRequested);
|
|
316 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
317 |
|
|
318 |
SetIntValue(iExt, iRequested.iErrorRatio, KDescErrorRatioRequested);
|
|
319 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
320 |
|
|
321 |
SetIntValue(iExt, iRequested.iPriority, KDescPriorityRequested);
|
|
322 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
323 |
|
|
324 |
SetIntValue(iExt, iRequested.iTransferDelay, KDescTransferDelayRequested);
|
|
325 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
326 |
|
|
327 |
SetIntValue(iExt, iRequested.iMaxSduSize, KDescMaxSduSizeRequested);
|
|
328 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
329 |
|
|
330 |
SetIntValue(iExt, iRequested.iMaxBitrateUplink, KDescMaxBitrateUplinkRequested);
|
|
331 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
332 |
|
|
333 |
SetIntValue(iExt, iRequested.iMaxBitrateDownlink, KDescMaxBitrateDownlinkRequested);
|
|
334 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
335 |
|
|
336 |
SetIntValue(iExt, iRequested.iGuaBitrateUplink, KDescGuaBitrateUplinkRequested);
|
|
337 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
338 |
|
|
339 |
SetIntValue(iExt, iRequested.iGuaBitrateDownlink, KDescGuaBitrateDownlinkRequested);
|
|
340 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
341 |
|
|
342 |
// Negotiated
|
|
343 |
SetIntValue(iExt, iNegotiated.iTrafficClass, KDescTrafficClassNegotiated);
|
|
344 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
345 |
|
|
346 |
SetIntValue(iExt, iNegotiated.iDeliveryOrder, KDescDeliveryOrderNegotiated);
|
|
347 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
348 |
|
|
349 |
SetIntValue(iExt, iNegotiated.iDeliveryOfErroneusSdu, KDescDeliveryOfErroneusSduNegotiated);
|
|
350 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
351 |
|
|
352 |
SetIntValue(iExt, iNegotiated.iResidualBer, KDescResidualBerNegotiated);
|
|
353 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
354 |
|
|
355 |
SetIntValue(iExt, iNegotiated.iErrorRatio, KDescErrorRatioNegotiated);
|
|
356 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
357 |
|
|
358 |
SetIntValue(iExt, iNegotiated.iPriority, KDescPriorityNegotiated);
|
|
359 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
360 |
|
|
361 |
SetIntValue(iExt, iNegotiated.iTransferDelay, KDescTransferDelayNegotiated);
|
|
362 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
363 |
|
|
364 |
SetIntValue(iExt, iNegotiated.iMaxSduSize, KDescMaxSduSizeNegotiated);
|
|
365 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
366 |
|
|
367 |
SetIntValue(iExt, iNegotiated.iMaxBitrateUplink, KDescMaxBitrateUplinkNegotiated);
|
|
368 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
369 |
|
|
370 |
SetIntValue(iExt, iNegotiated.iMaxBitrateDownlink, KDescMaxBitrateDownlinkNegotiated);
|
|
371 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
372 |
|
|
373 |
SetIntValue(iExt, iNegotiated.iGuaBitrateUplink, KDescGuaBitrateUplinkNegotiated);
|
|
374 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
375 |
|
|
376 |
SetIntValue(iExt, iNegotiated.iGuaBitrateDownlink, KDescGuaBitrateDownlinkNegotiated);
|
|
377 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
378 |
|
|
379 |
|
|
380 |
SetIntValue(iExt, iCompression, KDescHeaderCompression);
|
|
381 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
382 |
|
|
383 |
iBufPtr.AppendFill(0, iHeader.pfqos_configure_len * 8 - byte_len);
|
|
384 |
return iBufPtr;
|
|
385 |
}
|
|
386 |
|
|
387 |
EXPORT_C TInt CUmtsQoSPolicy::ParseMessage(const TDesC8& aData)
|
|
388 |
{
|
|
389 |
const TUint8 *p = aData.Ptr();
|
|
390 |
TInt length = aData.Length();
|
|
391 |
//lint --e{826} Not a suspicious conversion, as lint thinks (shut off all of them for this function)
|
|
392 |
struct pfqos_configure *ext = (struct pfqos_configure *) p;
|
|
393 |
|
|
394 |
if (length < (TInt)sizeof(pfqos_configure))
|
|
395 |
return KErrGeneral; // EMSGSIZE (impossible message size)
|
|
396 |
|
|
397 |
if (ext->pfqos_configure_len * 8 != length)
|
|
398 |
return KErrGeneral; // EMSGSIZE (incorrect message length)
|
|
399 |
|
|
400 |
if (ext->pfqos_ext_type == EPfqosExtExtension)
|
|
401 |
{
|
|
402 |
p += sizeof(struct pfqos_configure);
|
|
403 |
pfqos_extension *aExtensionType = (pfqos_extension *) p;
|
|
404 |
|
|
405 |
if (aExtensionType->pfqos_extension_type != KPfqosExtensionUmts)
|
|
406 |
return KErrGeneral;
|
|
407 |
|
|
408 |
while (length > 0)
|
|
409 |
{
|
|
410 |
struct pfqos_configblock *block = (struct pfqos_configblock *)(p + sizeof(pfqos_extension));
|
|
411 |
int block_len = block->len;
|
|
412 |
|
|
413 |
if (block_len < 1)
|
|
414 |
break;
|
|
415 |
block_len *= 8;
|
|
416 |
|
|
417 |
if (block_len > length)
|
|
418 |
break;
|
|
419 |
|
|
420 |
if (block->type == KPfqosTypeInteger)
|
|
421 |
{
|
|
422 |
TPtrC8 tmp((TUint8 *)&block->id[0]);
|
|
423 |
struct pfqos_configblock_int *block_int = (struct pfqos_configblock_int*) block;
|
|
424 |
|
|
425 |
// Negotiated set
|
|
426 |
//lint -e{961} would like terminating 'else' here...
|
|
427 |
if (tmp.Compare(_L8("DeliveryOfErroneusSduNegotiated"))==0)
|
|
428 |
{
|
|
429 |
iNegotiated.iDeliveryOfErroneusSdu = (TUmtsErroneousSDUDelivery)block_int->value;
|
|
430 |
}
|
|
431 |
else if (tmp.Compare(_L8("DeliveryOrderNegotiated"))==0)
|
|
432 |
{
|
|
433 |
iNegotiated.iDeliveryOrder = (TUmtsDeliveryOrder)block_int->value;
|
|
434 |
}
|
|
435 |
else if (tmp.Compare(_L8("ErrorRatioNegotiated"))==0)
|
|
436 |
{
|
|
437 |
iNegotiated.iErrorRatio = (TUmtsSDUErrorRatio)block_int->value;
|
|
438 |
}
|
|
439 |
else if (tmp.Compare(_L8("GuaBitrateDownlinkNegotiated"))==0)
|
|
440 |
{
|
|
441 |
iNegotiated.iGuaBitrateDownlink = block_int->value;
|
|
442 |
}
|
|
443 |
else if (tmp.Compare(_L8("GuaBitrateUplinkNegotiated"))==0)
|
|
444 |
{
|
|
445 |
iNegotiated.iGuaBitrateUplink = block_int->value;
|
|
446 |
}
|
|
447 |
else if (tmp.Compare(_L8("MaxBitrateDownlinkNegotiated"))==0)
|
|
448 |
{
|
|
449 |
iNegotiated.iMaxBitrateDownlink = block_int->value;
|
|
450 |
}
|
|
451 |
else if (tmp.Compare(_L8("MaxBitrateUplinkNegotiated"))==0)
|
|
452 |
{
|
|
453 |
iNegotiated.iMaxBitrateUplink = block_int->value;
|
|
454 |
}
|
|
455 |
else if (tmp.Compare(_L8("MaxSduSizeNegotiated"))==0)
|
|
456 |
{
|
|
457 |
iNegotiated.iMaxSduSize = block_int->value;
|
|
458 |
}
|
|
459 |
else if (tmp.Compare(_L8("PriorityNegotiated"))==0)
|
|
460 |
{
|
|
461 |
iNegotiated.iPriority = (TUmtsTrafficHandlingPriority)block_int->value;
|
|
462 |
}
|
|
463 |
else if (tmp.Compare(_L8("ResidualBerNegotiated"))==0)
|
|
464 |
{
|
|
465 |
iNegotiated.iResidualBer = (TUmtsBitErrorRatio)block_int->value;
|
|
466 |
}
|
|
467 |
else if (tmp.Compare(_L8("TrafficClassNegotiated"))==0)
|
|
468 |
{
|
|
469 |
iNegotiated.iTrafficClass = (TUmtsTrafficClass)block_int->value;
|
|
470 |
}
|
|
471 |
else if (tmp.Compare(_L8("TransferDelayNegotiated"))==0)
|
|
472 |
{
|
|
473 |
iNegotiated.iTransferDelay = block_int->value;
|
|
474 |
}
|
|
475 |
// Minimum set
|
|
476 |
else if (tmp.Compare(_L8("DeliveryOfErroneusSduMinimum"))==0)
|
|
477 |
{
|
|
478 |
iMinimum.iDeliveryOfErroneusSdu = (TUmtsErroneousSDUDelivery)block_int->value;
|
|
479 |
}
|
|
480 |
else if (tmp.Compare(_L8("DeliveryOrderMinimum"))==0)
|
|
481 |
{
|
|
482 |
iMinimum.iDeliveryOrder = (TUmtsDeliveryOrder)block_int->value;
|
|
483 |
}
|
|
484 |
else if (tmp.Compare(_L8("ErrorRatioMinimum"))==0)
|
|
485 |
{
|
|
486 |
iMinimum.iErrorRatio = (TUmtsSDUErrorRatio)block_int->value;
|
|
487 |
}
|
|
488 |
else if (tmp.Compare(_L8("GuaBitrateDownlinkMinimum"))==0)
|
|
489 |
{
|
|
490 |
iMinimum.iGuaBitrateDownlink = block_int->value;
|
|
491 |
}
|
|
492 |
else if (tmp.Compare(_L8("GuaBitrateUplinkMinimum"))==0)
|
|
493 |
{
|
|
494 |
iMinimum.iGuaBitrateUplink = block_int->value;
|
|
495 |
}
|
|
496 |
else if (tmp.Compare(_L8("MaxBitrateDownlinkMinimum"))==0)
|
|
497 |
{
|
|
498 |
iMinimum.iMaxBitrateDownlink = block_int->value;
|
|
499 |
}
|
|
500 |
else if (tmp.Compare(_L8("MaxBitrateUplinkMinimum"))==0)
|
|
501 |
{
|
|
502 |
iMinimum.iMaxBitrateUplink = block_int->value;
|
|
503 |
}
|
|
504 |
else if (tmp.Compare(_L8("MaxSduSizeMinimum"))==0)
|
|
505 |
{
|
|
506 |
iMinimum.iMaxSduSize = block_int->value;
|
|
507 |
}
|
|
508 |
else if (tmp.Compare(_L8("PriorityMinimum"))==0)
|
|
509 |
{
|
|
510 |
iMinimum.iPriority = (TUmtsTrafficHandlingPriority)block_int->value;
|
|
511 |
}
|
|
512 |
else if (tmp.Compare(_L8("ResidualBerMinimum"))==0)
|
|
513 |
{
|
|
514 |
iMinimum.iResidualBer = (TUmtsBitErrorRatio)block_int->value;
|
|
515 |
}
|
|
516 |
else if (tmp.Compare(_L8("TrafficClassMinimum"))==0)
|
|
517 |
{
|
|
518 |
iMinimum.iTrafficClass = (TUmtsTrafficClass)block_int->value;
|
|
519 |
}
|
|
520 |
else if (tmp.Compare(_L8("TransferDelayMinimum"))==0)
|
|
521 |
{
|
|
522 |
iMinimum.iTransferDelay = block_int->value;
|
|
523 |
}
|
|
524 |
// Requested set
|
|
525 |
else if (tmp.Compare(_L8("DeliveryOfErroneusSduRequested"))==0)
|
|
526 |
{
|
|
527 |
iRequested.iDeliveryOfErroneusSdu = (TUmtsErroneousSDUDelivery)block_int->value;
|
|
528 |
}
|
|
529 |
else if (tmp.Compare(_L8("DeliveryOrderRequested"))==0)
|
|
530 |
{
|
|
531 |
iRequested.iDeliveryOrder = (TUmtsDeliveryOrder)block_int->value;
|
|
532 |
}
|
|
533 |
else if (tmp.Compare(_L8("ErrorRatioRequested"))==0)
|
|
534 |
{
|
|
535 |
iRequested.iErrorRatio = (TUmtsSDUErrorRatio)block_int->value;
|
|
536 |
}
|
|
537 |
else if (tmp.Compare(_L8("GuaBitrateDownlinkRequested"))==0)
|
|
538 |
{
|
|
539 |
iRequested.iGuaBitrateDownlink = block_int->value;
|
|
540 |
}
|
|
541 |
else if (tmp.Compare(_L8("GuaBitrateUplinkRequested"))==0)
|
|
542 |
{
|
|
543 |
iRequested.iGuaBitrateUplink = block_int->value;
|
|
544 |
}
|
|
545 |
else if (tmp.Compare(_L8("MaxBitrateDownlinkRequested"))==0)
|
|
546 |
{
|
|
547 |
iRequested.iMaxBitrateDownlink = block_int->value;
|
|
548 |
}
|
|
549 |
else if (tmp.Compare(_L8("MaxBitrateUplinkRequested"))==0)
|
|
550 |
{
|
|
551 |
iRequested.iMaxBitrateUplink = block_int->value;
|
|
552 |
}
|
|
553 |
else if (tmp.Compare(_L8("MaxSduSizeRequested"))==0)
|
|
554 |
{
|
|
555 |
iRequested.iMaxSduSize = block_int->value;
|
|
556 |
}
|
|
557 |
else if (tmp.Compare(_L8("PriorityRequested"))==0)
|
|
558 |
{
|
|
559 |
iRequested.iPriority = (TUmtsTrafficHandlingPriority)block_int->value;
|
|
560 |
}
|
|
561 |
else if (tmp.Compare(_L8("ResidualBerRequested"))==0)
|
|
562 |
{
|
|
563 |
iRequested.iResidualBer = (TUmtsBitErrorRatio)block_int->value;
|
|
564 |
}
|
|
565 |
else if (tmp.Compare(_L8("TrafficClassRequested"))==0)
|
|
566 |
{
|
|
567 |
iRequested.iTrafficClass = (TUmtsTrafficClass)block_int->value;
|
|
568 |
}
|
|
569 |
else if (tmp.Compare(_L8("TransferDelayRequested"))==0)
|
|
570 |
{
|
|
571 |
iRequested.iTransferDelay = block_int->value;
|
|
572 |
}
|
|
573 |
else if (tmp.Compare(_L8("HeaderCompression"))==0)
|
|
574 |
{
|
|
575 |
iNegotiated.iCompression = block_int->value;
|
|
576 |
}
|
|
577 |
else if (tmp.Compare(_L8("ErrorCode"))==0)
|
|
578 |
{
|
|
579 |
iNegotiated.iErrorCode = block_int->value;
|
|
580 |
}
|
|
581 |
}
|
|
582 |
p += block_len;
|
|
583 |
length -= block_len;
|
|
584 |
}
|
|
585 |
}
|
|
586 |
return KErrNone;
|
|
587 |
}
|
|
588 |
|
|
589 |
EXPORT_C CExtensionBase* CUmtsQoSPolicy::CreateL()
|
|
590 |
{
|
|
591 |
CUmtsQoSPolicy *extension = CUmtsQoSPolicy::NewL();
|
|
592 |
return extension;
|
|
593 |
}
|
|
594 |
|
|
595 |
EXPORT_C TInt CUmtsQoSPolicy::Copy(const CExtensionBase& aExtension)
|
|
596 |
{
|
|
597 |
if (aExtension.Type() != iType)
|
|
598 |
return KErrArgument;
|
|
599 |
const CUmtsQoSPolicy& policy = (const CUmtsQoSPolicy&)aExtension;
|
|
600 |
policy.GetQoSMinimum(iMinimum);
|
|
601 |
policy.GetQoSRequested(iRequested);
|
|
602 |
policy.GetQoSNegotiated(iNegotiated);
|
|
603 |
iCompression = policy.HeaderCompression();
|
|
604 |
return KErrNone;
|
|
605 |
}
|
|
606 |
|
|
607 |
EXPORT_C void CUmtsQoSPolicy::SetQoSRequested(const TUmtsQoSParameters& aRequested)
|
|
608 |
{
|
|
609 |
|
|
610 |
LOG(Log::Printf(_L("<------------------------------------------------\n")));
|
|
611 |
LOG(Log::Printf(_L("CUmtsQoSPolicy::SetQoSRequested")));
|
|
612 |
LOG(Log::Printf(_L("\n")));
|
|
613 |
LOG(Log::Printf(_L("REQUESTED R99 VALUES SUPPLIED BY CLIENT IS \n")));
|
|
614 |
LOG(Log::Printf(_L("\n")));
|
|
615 |
LOG(Log::Printf(_L(" [aRequested.iTrafficClass = %d]\n"),aRequested.iTrafficClass));
|
|
616 |
LOG(Log::Printf(_L(" [aRequested.iDeliveryOrder = %d]\n"),aRequested.iDeliveryOrder));
|
|
617 |
LOG(Log::Printf(_L(" [aRequested.iDeliveryOfErroneusSdu = %d]\n"),aRequested.iDeliveryOfErroneusSdu));
|
|
618 |
LOG(Log::Printf(_L(" [aRequested.iMaxSduSize = %d]\n"),aRequested.iMaxSduSize));
|
|
619 |
LOG(Log::Printf(_L(" [aRequested.iMaxBitrateUplink = %d]\n"),aRequested.iMaxBitrateUplink));
|
|
620 |
LOG(Log::Printf(_L(" [aRequested.iMaxBitrateDownlink = %d]\n"),aRequested.iMaxBitrateDownlink));
|
|
621 |
LOG(Log::Printf(_L(" [aRequested.iResidualBer = %d]\n"),aRequested.iResidualBer));
|
|
622 |
LOG(Log::Printf(_L(" [aRequested.iErrorRatio = %d]\n"),aRequested.iErrorRatio));
|
|
623 |
LOG(Log::Printf(_L(" [aRequested.iPriority = %d]\n"),aRequested.iPriority));
|
|
624 |
LOG(Log::Printf(_L(" [aRequested.iTransferDelay = %d]\n"),aRequested.iTransferDelay));
|
|
625 |
LOG(Log::Printf(_L(" [aRequested.iGuaBitrateUplink = %d]\n"),aRequested.iGuaBitrateUplink));
|
|
626 |
LOG(Log::Printf(_L(" [aRequested.iGuaBitrateDownlink = %d]\n"),aRequested.iGuaBitrateDownlink));
|
|
627 |
LOG(Log::Printf(_L("------------------------------------------------>\n")));
|
|
628 |
|
|
629 |
iRequested = aRequested;
|
|
630 |
}
|
|
631 |
|
|
632 |
EXPORT_C void CUmtsQoSPolicy::SetQoSMinimum(const TUmtsQoSParameters& aMinimum)
|
|
633 |
{
|
|
634 |
LOG(Log::Printf(_L("<------------------------------------------------\n")));
|
|
635 |
LOG(Log::Printf(_L("CUmtsQoSPolicy::SetQoSMinimum")));
|
|
636 |
LOG(Log::Printf(_L("\n")));
|
|
637 |
LOG(Log::Printf(_L("MINIMUM R99 VALUES SUPPLIED BY CLIENT IS \n")));
|
|
638 |
LOG(Log::Printf(_L("\n")));
|
|
639 |
LOG(Log::Printf(_L(" [aMinimum.iTrafficClass = %d]\n"),aMinimum.iTrafficClass));
|
|
640 |
LOG(Log::Printf(_L(" [aMinimum.iDeliveryOrder = %d]\n"),aMinimum.iDeliveryOrder));
|
|
641 |
LOG(Log::Printf(_L(" [aMinimum.iDeliveryOfErroneusSdu = %d]\n"),aMinimum.iDeliveryOfErroneusSdu));
|
|
642 |
LOG(Log::Printf(_L(" [aMinimum.iMaxSduSize = %d]\n"),aMinimum.iMaxSduSize));
|
|
643 |
LOG(Log::Printf(_L(" [aMinimum.iMaxBitrateUplink = %d]\n"),aMinimum.iMaxBitrateUplink));
|
|
644 |
LOG(Log::Printf(_L(" [aMinimum.iMaxBitrateDownlink = %d]\n"),aMinimum.iMaxBitrateDownlink));
|
|
645 |
LOG(Log::Printf(_L(" [aMinimum.iResidualBer = %d]\n"),aMinimum.iResidualBer));
|
|
646 |
LOG(Log::Printf(_L(" [aMinimum.iErrorRatio = %d]\n"),aMinimum.iErrorRatio));
|
|
647 |
LOG(Log::Printf(_L(" [aMinimum.iPriority = %d]\n"),aMinimum.iPriority));
|
|
648 |
LOG(Log::Printf(_L(" [aMinimum.iTransferDelay = %d]\n"),aMinimum.iTransferDelay));
|
|
649 |
LOG(Log::Printf(_L(" [aMinimum.iGuaBitrateUplink = %d]\n"),aMinimum.iGuaBitrateUplink));
|
|
650 |
LOG(Log::Printf(_L(" [aMinimum.iGuaBitrateDownlink = %d]\n"),aMinimum.iGuaBitrateDownlink));
|
|
651 |
LOG(Log::Printf(_L("------------------------------------------------>\n")));
|
|
652 |
|
|
653 |
iMinimum = aMinimum;
|
|
654 |
}
|
|
655 |
|
|
656 |
EXPORT_C void CUmtsQoSPolicy::GetQoSRequested(TUmtsQoSParameters& aRequested) const
|
|
657 |
{
|
|
658 |
aRequested = iRequested;
|
|
659 |
}
|
|
660 |
|
|
661 |
EXPORT_C void CUmtsQoSPolicy::GetQoSMinimum(TUmtsQoSParameters& aMinimum) const
|
|
662 |
{
|
|
663 |
aMinimum = iMinimum;
|
|
664 |
}
|
|
665 |
|
|
666 |
EXPORT_C void CUmtsQoSPolicy::GetQoSNegotiated(TNegotiatedUmtsQoSParameters& aNegotiated) const
|
|
667 |
{
|
|
668 |
aNegotiated = iNegotiated;
|
|
669 |
}
|
|
670 |
|
|
671 |
EXPORT_C TInt CUmtsQoSPolicy::SetHeaderCompression(TUint aCompression)
|
|
672 |
{
|
|
673 |
if (aCompression & ~(KPdpDataCompression|KPdpHeaderCompression))
|
|
674 |
return KErrNotSupported;
|
|
675 |
iCompression = aCompression;
|
|
676 |
return KErrNone;
|
|
677 |
}
|
|
678 |
|
|
679 |
EXPORT_C TUint CUmtsQoSPolicy::HeaderCompression() const
|
|
680 |
{
|
|
681 |
return iCompression;
|
|
682 |
}
|
|
683 |
|
|
684 |
//
|
|
685 |
// TUmtsR5QoSParameters
|
|
686 |
//
|
|
687 |
EXPORT_C TUmtsR5QoSParameters::TUmtsR5QoSParameters()
|
|
688 |
: TUmtsQoSParameters(),
|
|
689 |
iSignallingIndicator(EFalse),
|
|
690 |
iSrcStatisticsDesc(ESourceStatisticsDescriptorUnknown)
|
|
691 |
{
|
|
692 |
}
|
|
693 |
|
|
694 |
EXPORT_C TBool TUmtsR5QoSParameters::SignallingIndicator() const
|
|
695 |
{
|
|
696 |
return iSignallingIndicator;
|
|
697 |
}
|
|
698 |
|
|
699 |
EXPORT_C TUmtsSourceStatisticsDescriptor TUmtsR5QoSParameters::SourceStatisticsDescriptor() const
|
|
700 |
{
|
|
701 |
return iSrcStatisticsDesc;
|
|
702 |
}
|
|
703 |
|
|
704 |
EXPORT_C TInt TUmtsR5QoSParameters::SetSignallingIndicator(TBool aSignallingIndicator)
|
|
705 |
{
|
|
706 |
iSignallingIndicator = aSignallingIndicator;
|
|
707 |
return KErrNone;
|
|
708 |
}
|
|
709 |
|
|
710 |
EXPORT_C TInt TUmtsR5QoSParameters::SetSourceStatisticsDescriptor(TUmtsSourceStatisticsDescriptor aSrcStatisticsDesc)
|
|
711 |
{
|
|
712 |
iSrcStatisticsDesc = aSrcStatisticsDesc;
|
|
713 |
return KErrNone;
|
|
714 |
}
|
|
715 |
|
|
716 |
|
|
717 |
//
|
|
718 |
// TNegotiatedUmtsR5QoSParameters
|
|
719 |
//
|
|
720 |
EXPORT_C TNegotiatedUmtsR5QoSParameters::TNegotiatedUmtsR5QoSParameters() : iCompression(0), iErrorCode(KErrNone)
|
|
721 |
{
|
|
722 |
}
|
|
723 |
|
|
724 |
EXPORT_C TUint TNegotiatedUmtsR5QoSParameters::HeaderCompression() const
|
|
725 |
{
|
|
726 |
return iCompression;
|
|
727 |
}
|
|
728 |
|
|
729 |
EXPORT_C TInt TNegotiatedUmtsR5QoSParameters::ErrorCode() const
|
|
730 |
{
|
|
731 |
return iErrorCode;
|
|
732 |
}
|
|
733 |
|
|
734 |
|
|
735 |
// Buffer size
|
|
736 |
// const TUint KUmtsApiBufSize = 8192; should be defined in case
|
|
737 |
// if the umts r5 and r99 needs to be supported seperately
|
|
738 |
|
|
739 |
//
|
|
740 |
// CUmtsR5QoSPolicy
|
|
741 |
//
|
|
742 |
EXPORT_C CUmtsR5QoSPolicy* CUmtsR5QoSPolicy::NewL()
|
|
743 |
{
|
|
744 |
CUmtsR5QoSPolicy* policy = new (ELeave) CUmtsR5QoSPolicy();
|
|
745 |
CleanupStack::PushL(policy);
|
|
746 |
policy->ConstructL();
|
|
747 |
CleanupStack::Pop();
|
|
748 |
return policy;
|
|
749 |
}
|
|
750 |
|
|
751 |
CUmtsR5QoSPolicy::CUmtsR5QoSPolicy() : iBufPtr(0,0)
|
|
752 |
{
|
|
753 |
iType = KPfqosR5ExtensionUmts;
|
|
754 |
}
|
|
755 |
|
|
756 |
void CUmtsR5QoSPolicy::ConstructL()
|
|
757 |
{
|
|
758 |
iData = HBufC8::NewL(KUmtsApiBufSize);
|
|
759 |
TPtr8 tmp(iData->Des());
|
|
760 |
iBufPtr.Set(tmp);
|
|
761 |
}
|
|
762 |
|
|
763 |
EXPORT_C CUmtsR5QoSPolicy::~CUmtsR5QoSPolicy()
|
|
764 |
{
|
|
765 |
delete iData;
|
|
766 |
iData = 0;
|
|
767 |
}
|
|
768 |
|
|
769 |
EXPORT_C TDesC8& CUmtsR5QoSPolicy::Data()
|
|
770 |
{
|
|
771 |
iBufPtr.SetLength(0);
|
|
772 |
const int byte_len = (sizeof(pfqos_configure)+sizeof(pfqos_extension)+sizeof(pfqos_configblock_int)*43);
|
|
773 |
|
|
774 |
pfqos_configure iHeader;
|
|
775 |
iHeader.pfqos_configure_len = (TUint16)((byte_len + 7) / 8);
|
|
776 |
iHeader.pfqos_ext_type = EPfqosExtExtension;
|
|
777 |
iHeader.reserved = 0;
|
|
778 |
iHeader.protocol_id = 0;
|
|
779 |
iBufPtr.Append((TUint8*)&iHeader, sizeof(pfqos_configure));
|
|
780 |
|
|
781 |
pfqos_extension aExtensionType;
|
|
782 |
aExtensionType.pfqos_ext_len = 0;
|
|
783 |
aExtensionType.pfqos_ext_type = EPfqosExtExtension;
|
|
784 |
aExtensionType.pfqos_extension_type = KPfqosR5ExtensionUmts;
|
|
785 |
iBufPtr.Append((TUint8*)&aExtensionType, sizeof(pfqos_extension));
|
|
786 |
|
|
787 |
pfqos_configblock_int iExt;
|
|
788 |
|
|
789 |
// Minimum
|
|
790 |
SetIntValue(iExt, iMinimum.iTrafficClass, KDescTrafficClassMinimum);
|
|
791 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
792 |
|
|
793 |
SetIntValue(iExt, iMinimum.iDeliveryOrder, KDescDeliveryOrderMinimum);
|
|
794 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
795 |
|
|
796 |
SetIntValue(iExt, iMinimum.iDeliveryOfErroneusSdu, KDescDeliveryOfErroneusSduMinimum);
|
|
797 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
798 |
|
|
799 |
SetIntValue(iExt, iMinimum.iResidualBer, KDescResidualBerMinimum);
|
|
800 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
801 |
|
|
802 |
SetIntValue(iExt, iMinimum.iErrorRatio, KDescErrorRatioMinimum);
|
|
803 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
804 |
|
|
805 |
SetIntValue(iExt, iMinimum.iPriority, KDescPriorityMinimum);
|
|
806 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
807 |
|
|
808 |
SetIntValue(iExt, iMinimum.iTransferDelay, KDescTransferDelayMinimum);
|
|
809 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
810 |
|
|
811 |
SetIntValue(iExt, iMinimum.iMaxSduSize, KDescMaxSduSizeMinimum);
|
|
812 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
813 |
|
|
814 |
SetIntValue(iExt, iMinimum.iMaxBitrateUplink, KDescMaxBitrateUplinkMinimum);
|
|
815 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
816 |
|
|
817 |
SetIntValue(iExt, iMinimum.iMaxBitrateDownlink, KDescMaxBitrateDownlinkMinimum);
|
|
818 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
819 |
|
|
820 |
SetIntValue(iExt, iMinimum.iGuaBitrateUplink, KDescGuaBitrateUplinkMinimum);
|
|
821 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
822 |
|
|
823 |
SetIntValue(iExt, iMinimum.iGuaBitrateDownlink, KDescGuaBitrateDownlinkMinimum);
|
|
824 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
825 |
|
|
826 |
SetIntValue(iExt, iMinimum.iSignallingIndicator, KDescSignallingIndicatorMinimum);
|
|
827 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
828 |
|
|
829 |
SetIntValue(iExt, iMinimum.iSrcStatisticsDesc, KDescSrcStatDescMinimum);
|
|
830 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
831 |
|
|
832 |
// Requested
|
|
833 |
SetIntValue(iExt, iRequested.iTrafficClass, KDescTrafficClassRequested);
|
|
834 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
835 |
|
|
836 |
SetIntValue(iExt, iRequested.iDeliveryOrder, KDescDeliveryOrderRequested);
|
|
837 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
838 |
|
|
839 |
SetIntValue(iExt, iRequested.iDeliveryOfErroneusSdu, KDescDeliveryOfErroneusSduRequested);
|
|
840 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
841 |
|
|
842 |
SetIntValue(iExt, iRequested.iResidualBer, KDescResidualBerRequested);
|
|
843 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
844 |
|
|
845 |
SetIntValue(iExt, iRequested.iErrorRatio, KDescErrorRatioRequested);
|
|
846 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
847 |
|
|
848 |
SetIntValue(iExt, iRequested.iPriority, KDescPriorityRequested);
|
|
849 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
850 |
|
|
851 |
SetIntValue(iExt, iRequested.iTransferDelay, KDescTransferDelayRequested);
|
|
852 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
853 |
|
|
854 |
SetIntValue(iExt, iRequested.iMaxSduSize, KDescMaxSduSizeRequested);
|
|
855 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
856 |
|
|
857 |
SetIntValue(iExt, iRequested.iMaxBitrateUplink, KDescMaxBitrateUplinkRequested);
|
|
858 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
859 |
|
|
860 |
SetIntValue(iExt, iRequested.iMaxBitrateDownlink, KDescMaxBitrateDownlinkRequested);
|
|
861 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
862 |
|
|
863 |
SetIntValue(iExt, iRequested.iGuaBitrateUplink, KDescGuaBitrateUplinkRequested);
|
|
864 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
865 |
|
|
866 |
SetIntValue(iExt, iRequested.iGuaBitrateDownlink, KDescGuaBitrateDownlinkRequested);
|
|
867 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
868 |
|
|
869 |
SetIntValue(iExt, iRequested.iSignallingIndicator, KDescSignallingIndicatorRequested);
|
|
870 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
871 |
|
|
872 |
SetIntValue(iExt, iRequested.iSrcStatisticsDesc, KDescSrcStatDescRequested);
|
|
873 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
874 |
|
|
875 |
// Negotiated
|
|
876 |
SetIntValue(iExt, iNegotiated.iTrafficClass, KDescTrafficClassNegotiated);
|
|
877 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
878 |
|
|
879 |
SetIntValue(iExt, iNegotiated.iDeliveryOrder, KDescDeliveryOrderNegotiated);
|
|
880 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
881 |
|
|
882 |
SetIntValue(iExt, iNegotiated.iDeliveryOfErroneusSdu, KDescDeliveryOfErroneusSduNegotiated);
|
|
883 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
884 |
|
|
885 |
SetIntValue(iExt, iNegotiated.iResidualBer, KDescResidualBerNegotiated);
|
|
886 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
887 |
|
|
888 |
SetIntValue(iExt, iNegotiated.iErrorRatio, KDescErrorRatioNegotiated);
|
|
889 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
890 |
|
|
891 |
SetIntValue(iExt, iNegotiated.iPriority, KDescPriorityNegotiated);
|
|
892 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
893 |
|
|
894 |
SetIntValue(iExt, iNegotiated.iTransferDelay, KDescTransferDelayNegotiated);
|
|
895 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
896 |
|
|
897 |
SetIntValue(iExt, iNegotiated.iMaxSduSize, KDescMaxSduSizeNegotiated);
|
|
898 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
899 |
|
|
900 |
SetIntValue(iExt, iNegotiated.iMaxBitrateUplink, KDescMaxBitrateUplinkNegotiated);
|
|
901 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
902 |
|
|
903 |
SetIntValue(iExt, iNegotiated.iMaxBitrateDownlink, KDescMaxBitrateDownlinkNegotiated);
|
|
904 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
905 |
|
|
906 |
SetIntValue(iExt, iNegotiated.iGuaBitrateUplink, KDescGuaBitrateUplinkNegotiated);
|
|
907 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
908 |
|
|
909 |
SetIntValue(iExt, iNegotiated.iGuaBitrateDownlink, KDescGuaBitrateDownlinkNegotiated);
|
|
910 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
911 |
|
|
912 |
SetIntValue(iExt, iNegotiated.iSignallingIndicator, KDescSignallingIndicatorNegotiated);
|
|
913 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
914 |
|
|
915 |
SetIntValue(iExt, iNegotiated.iSrcStatisticsDesc, KDescSrcStatDescNegotiated);
|
|
916 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
917 |
|
|
918 |
SetIntValue(iExt, iCompression, KDescHeaderCompression);
|
|
919 |
iBufPtr.Append((TUint8*)&iExt, sizeof(pfqos_configblock_int));
|
|
920 |
|
|
921 |
iBufPtr.AppendFill(0, iHeader.pfqos_configure_len * 8 - byte_len);
|
|
922 |
return iBufPtr;
|
|
923 |
}
|
|
924 |
|
|
925 |
EXPORT_C TInt CUmtsR5QoSPolicy::ParseMessage(const TDesC8& aData)
|
|
926 |
{
|
|
927 |
const TUint8 *p = aData.Ptr();
|
|
928 |
TInt length = aData.Length();
|
|
929 |
//lint --e{826} Not a suspicious conversion, as lint thinks (shut off all of them for this function)
|
|
930 |
struct pfqos_configure *ext = (struct pfqos_configure *) p;
|
|
931 |
|
|
932 |
if (length < (TInt)sizeof(pfqos_configure))
|
|
933 |
return KErrGeneral; // EMSGSIZE (impossible message size)
|
|
934 |
|
|
935 |
if (ext->pfqos_configure_len * 8 != length)
|
|
936 |
return KErrGeneral; // EMSGSIZE (incorrect message length)
|
|
937 |
|
|
938 |
if (ext->pfqos_ext_type == EPfqosExtExtension)
|
|
939 |
{
|
|
940 |
p += sizeof(struct pfqos_configure);
|
|
941 |
pfqos_extension *aExtensionType = (pfqos_extension *) p;
|
|
942 |
|
|
943 |
if (aExtensionType->pfqos_extension_type != KPfqosR5ExtensionUmts)
|
|
944 |
return KErrGeneral;
|
|
945 |
|
|
946 |
while (length > 0)
|
|
947 |
{
|
|
948 |
struct pfqos_configblock *block = (struct pfqos_configblock *)(p + sizeof(pfqos_extension));
|
|
949 |
int block_len = block->len;
|
|
950 |
|
|
951 |
if (block_len < 1)
|
|
952 |
break;
|
|
953 |
block_len *= 8;
|
|
954 |
|
|
955 |
if (block_len > length)
|
|
956 |
break;
|
|
957 |
|
|
958 |
if (block->type == KPfqosTypeInteger)
|
|
959 |
{
|
|
960 |
TPtrC8 tmp((TUint8 *)&block->id[0]);
|
|
961 |
struct pfqos_configblock_int *block_int = (struct pfqos_configblock_int*) block;
|
|
962 |
|
|
963 |
// Negotiated set
|
|
964 |
//lint -e{961} would like terminating 'else' here...
|
|
965 |
if (tmp.Compare(_L8("DeliveryOfErroneusSduNegotiated"))==0)
|
|
966 |
{
|
|
967 |
iNegotiated.iDeliveryOfErroneusSdu = (TUmtsErroneousSDUDelivery)block_int->value;
|
|
968 |
}
|
|
969 |
else if (tmp.Compare(_L8("DeliveryOrderNegotiated"))==0)
|
|
970 |
{
|
|
971 |
iNegotiated.iDeliveryOrder = (TUmtsDeliveryOrder)block_int->value;
|
|
972 |
}
|
|
973 |
else if (tmp.Compare(_L8("ErrorRatioNegotiated"))==0)
|
|
974 |
{
|
|
975 |
iNegotiated.iErrorRatio = (TUmtsSDUErrorRatio)block_int->value;
|
|
976 |
}
|
|
977 |
else if (tmp.Compare(_L8("GuaBitrateDownlinkNegotiated"))==0)
|
|
978 |
{
|
|
979 |
iNegotiated.iGuaBitrateDownlink = block_int->value;
|
|
980 |
}
|
|
981 |
else if (tmp.Compare(_L8("GuaBitrateUplinkNegotiated"))==0)
|
|
982 |
{
|
|
983 |
iNegotiated.iGuaBitrateUplink = block_int->value;
|
|
984 |
}
|
|
985 |
else if (tmp.Compare(_L8("MaxBitrateDownlinkNegotiated"))==0)
|
|
986 |
{
|
|
987 |
iNegotiated.iMaxBitrateDownlink = block_int->value;
|
|
988 |
}
|
|
989 |
else if (tmp.Compare(_L8("MaxBitrateUplinkNegotiated"))==0)
|
|
990 |
{
|
|
991 |
iNegotiated.iMaxBitrateUplink = block_int->value;
|
|
992 |
}
|
|
993 |
else if (tmp.Compare(_L8("MaxSduSizeNegotiated"))==0)
|
|
994 |
{
|
|
995 |
iNegotiated.iMaxSduSize = block_int->value;
|
|
996 |
}
|
|
997 |
else if (tmp.Compare(_L8("PriorityNegotiated"))==0)
|
|
998 |
{
|
|
999 |
iNegotiated.iPriority = (TUmtsTrafficHandlingPriority)block_int->value;
|
|
1000 |
}
|
|
1001 |
else if (tmp.Compare(_L8("ResidualBerNegotiated"))==0)
|
|
1002 |
{
|
|
1003 |
iNegotiated.iResidualBer = (TUmtsBitErrorRatio)block_int->value;
|
|
1004 |
}
|
|
1005 |
else if (tmp.Compare(_L8("TrafficClassNegotiated"))==0)
|
|
1006 |
{
|
|
1007 |
iNegotiated.iTrafficClass = (TUmtsTrafficClass)block_int->value;
|
|
1008 |
}
|
|
1009 |
else if (tmp.Compare(_L8("TransferDelayNegotiated"))==0)
|
|
1010 |
{
|
|
1011 |
iNegotiated.iTransferDelay = block_int->value;
|
|
1012 |
}
|
|
1013 |
else if (tmp.Compare(_L8("SignallingIndicatorNegotiated"))==0)
|
|
1014 |
{
|
|
1015 |
iNegotiated.iSignallingIndicator = block_int->value;
|
|
1016 |
}
|
|
1017 |
else if (tmp.Compare(_L8("SrcStatDescNegotiated"))==0)
|
|
1018 |
{
|
|
1019 |
iNegotiated.iSrcStatisticsDesc = (TUmtsSourceStatisticsDescriptor)block_int->value;
|
|
1020 |
}
|
|
1021 |
// Minimum set
|
|
1022 |
else if (tmp.Compare(_L8("DeliveryOfErroneusSduMinimum"))==0)
|
|
1023 |
{
|
|
1024 |
iMinimum.iDeliveryOfErroneusSdu = (TUmtsErroneousSDUDelivery)block_int->value;
|
|
1025 |
}
|
|
1026 |
else if (tmp.Compare(_L8("DeliveryOrderMinimum"))==0)
|
|
1027 |
{
|
|
1028 |
iMinimum.iDeliveryOrder = (TUmtsDeliveryOrder)block_int->value;
|
|
1029 |
}
|
|
1030 |
else if (tmp.Compare(_L8("ErrorRatioMinimum"))==0)
|
|
1031 |
{
|
|
1032 |
iMinimum.iErrorRatio = (TUmtsSDUErrorRatio)block_int->value;
|
|
1033 |
}
|
|
1034 |
else if (tmp.Compare(_L8("GuaBitrateDownlinkMinimum"))==0)
|
|
1035 |
{
|
|
1036 |
iMinimum.iGuaBitrateDownlink = block_int->value;
|
|
1037 |
}
|
|
1038 |
else if (tmp.Compare(_L8("GuaBitrateUplinkMinimum"))==0)
|
|
1039 |
{
|
|
1040 |
iMinimum.iGuaBitrateUplink = block_int->value;
|
|
1041 |
}
|
|
1042 |
else if (tmp.Compare(_L8("MaxBitrateDownlinkMinimum"))==0)
|
|
1043 |
{
|
|
1044 |
iMinimum.iMaxBitrateDownlink = block_int->value;
|
|
1045 |
}
|
|
1046 |
else if (tmp.Compare(_L8("MaxBitrateUplinkMinimum"))==0)
|
|
1047 |
{
|
|
1048 |
iMinimum.iMaxBitrateUplink = block_int->value;
|
|
1049 |
}
|
|
1050 |
else if (tmp.Compare(_L8("MaxSduSizeMinimum"))==0)
|
|
1051 |
{
|
|
1052 |
iMinimum.iMaxSduSize = block_int->value;
|
|
1053 |
}
|
|
1054 |
else if (tmp.Compare(_L8("PriorityMinimum"))==0)
|
|
1055 |
{
|
|
1056 |
iMinimum.iPriority = (TUmtsTrafficHandlingPriority)block_int->value;
|
|
1057 |
}
|
|
1058 |
else if (tmp.Compare(_L8("ResidualBerMinimum"))==0)
|
|
1059 |
{
|
|
1060 |
iMinimum.iResidualBer = (TUmtsBitErrorRatio)block_int->value;
|
|
1061 |
}
|
|
1062 |
else if (tmp.Compare(_L8("TrafficClassMinimum"))==0)
|
|
1063 |
{
|
|
1064 |
iMinimum.iTrafficClass = (TUmtsTrafficClass)block_int->value;
|
|
1065 |
}
|
|
1066 |
else if (tmp.Compare(_L8("TransferDelayMinimum"))==0)
|
|
1067 |
{
|
|
1068 |
iMinimum.iTransferDelay = block_int->value;
|
|
1069 |
}
|
|
1070 |
else if (tmp.Compare(_L8("SignallingIndicatorMinimum"))==0)
|
|
1071 |
{
|
|
1072 |
iMinimum.iSignallingIndicator = block_int->value;
|
|
1073 |
}
|
|
1074 |
else if (tmp.Compare(_L8("SrcStatDescMinimum"))==0)
|
|
1075 |
{
|
|
1076 |
iMinimum.iSrcStatisticsDesc = (TUmtsSourceStatisticsDescriptor)block_int->value;
|
|
1077 |
}
|
|
1078 |
// Requested set
|
|
1079 |
else if (tmp.Compare(_L8("DeliveryOfErroneusSduRequested"))==0)
|
|
1080 |
{
|
|
1081 |
iRequested.iDeliveryOfErroneusSdu = (TUmtsErroneousSDUDelivery)block_int->value;
|
|
1082 |
}
|
|
1083 |
else if (tmp.Compare(_L8("DeliveryOrderRequested"))==0)
|
|
1084 |
{
|
|
1085 |
iRequested.iDeliveryOrder = (TUmtsDeliveryOrder)block_int->value;
|
|
1086 |
}
|
|
1087 |
else if (tmp.Compare(_L8("ErrorRatioRequested"))==0)
|
|
1088 |
{
|
|
1089 |
iRequested.iErrorRatio = (TUmtsSDUErrorRatio)block_int->value;
|
|
1090 |
}
|
|
1091 |
else if (tmp.Compare(_L8("GuaBitrateDownlinkRequested"))==0)
|
|
1092 |
{
|
|
1093 |
iRequested.iGuaBitrateDownlink = block_int->value;
|
|
1094 |
}
|
|
1095 |
else if (tmp.Compare(_L8("GuaBitrateUplinkRequested"))==0)
|
|
1096 |
{
|
|
1097 |
iRequested.iGuaBitrateUplink = block_int->value;
|
|
1098 |
}
|
|
1099 |
else if (tmp.Compare(_L8("MaxBitrateDownlinkRequested"))==0)
|
|
1100 |
{
|
|
1101 |
iRequested.iMaxBitrateDownlink = block_int->value;
|
|
1102 |
}
|
|
1103 |
else if (tmp.Compare(_L8("MaxBitrateUplinkRequested"))==0)
|
|
1104 |
{
|
|
1105 |
iRequested.iMaxBitrateUplink = block_int->value;
|
|
1106 |
}
|
|
1107 |
else if (tmp.Compare(_L8("MaxSduSizeRequested"))==0)
|
|
1108 |
{
|
|
1109 |
iRequested.iMaxSduSize = block_int->value;
|
|
1110 |
}
|
|
1111 |
else if (tmp.Compare(_L8("PriorityRequested"))==0)
|
|
1112 |
{
|
|
1113 |
iRequested.iPriority = (TUmtsTrafficHandlingPriority)block_int->value;
|
|
1114 |
}
|
|
1115 |
else if (tmp.Compare(_L8("ResidualBerRequested"))==0)
|
|
1116 |
{
|
|
1117 |
iRequested.iResidualBer = (TUmtsBitErrorRatio)block_int->value;
|
|
1118 |
}
|
|
1119 |
else if (tmp.Compare(_L8("TrafficClassRequested"))==0)
|
|
1120 |
{
|
|
1121 |
iRequested.iTrafficClass = (TUmtsTrafficClass)block_int->value;
|
|
1122 |
}
|
|
1123 |
else if (tmp.Compare(_L8("TransferDelayRequested"))==0)
|
|
1124 |
{
|
|
1125 |
iRequested.iTransferDelay = block_int->value;
|
|
1126 |
}
|
|
1127 |
else if (tmp.Compare(_L8("SignallingIndicatorRequested"))==0)
|
|
1128 |
{
|
|
1129 |
iRequested.iSignallingIndicator = block_int->value;
|
|
1130 |
}
|
|
1131 |
else if (tmp.Compare(_L8("SrcStatDescRequested"))==0)
|
|
1132 |
{
|
|
1133 |
iRequested.iSrcStatisticsDesc = (TUmtsSourceStatisticsDescriptor)block_int->value;
|
|
1134 |
}
|
|
1135 |
else if (tmp.Compare(_L8("HeaderCompression"))==0)
|
|
1136 |
{
|
|
1137 |
iNegotiated.iCompression = block_int->value;
|
|
1138 |
}
|
|
1139 |
else if (tmp.Compare(_L8("ErrorCode"))==0)
|
|
1140 |
{
|
|
1141 |
iNegotiated.iErrorCode = block_int->value;
|
|
1142 |
}
|
|
1143 |
}
|
|
1144 |
p += block_len;
|
|
1145 |
length -= block_len;
|
|
1146 |
}
|
|
1147 |
}
|
|
1148 |
return KErrNone;
|
|
1149 |
}
|
|
1150 |
|
|
1151 |
EXPORT_C CExtensionBase* CUmtsR5QoSPolicy::CreateL()
|
|
1152 |
{
|
|
1153 |
CUmtsR5QoSPolicy *extension = CUmtsR5QoSPolicy::NewL();
|
|
1154 |
return extension;
|
|
1155 |
}
|
|
1156 |
|
|
1157 |
EXPORT_C TInt CUmtsR5QoSPolicy::Copy(const CExtensionBase& aExtension)
|
|
1158 |
{
|
|
1159 |
if (aExtension.Type() != iType)
|
|
1160 |
return KErrArgument;
|
|
1161 |
const CUmtsR5QoSPolicy& policy = (const CUmtsR5QoSPolicy&)aExtension;
|
|
1162 |
policy.GetQoSMinimum(iMinimum);
|
|
1163 |
policy.GetQoSRequested(iRequested);
|
|
1164 |
policy.GetQoSNegotiated(iNegotiated);
|
|
1165 |
iCompression = policy.HeaderCompression();
|
|
1166 |
return KErrNone;
|
|
1167 |
}
|
|
1168 |
|
|
1169 |
EXPORT_C void CUmtsR5QoSPolicy::SetQoSRequested(const TUmtsR5QoSParameters& aRequested)
|
|
1170 |
{
|
|
1171 |
|
|
1172 |
LOG(Log::Printf(_L("<------------------------------------------------\n")));
|
|
1173 |
LOG(Log::Printf(_L("CUmtsR5QoSPolicy::SetQoSRequested")));
|
|
1174 |
LOG(Log::Printf(_L("\n")));
|
|
1175 |
LOG(Log::Printf(_L("REQUESTED R5 VALUES SUPPLIED BY CLIENT IS \n")));
|
|
1176 |
LOG(Log::Printf(_L("\n")));
|
|
1177 |
LOG(Log::Printf(_L(" [aRequested.iTrafficClass = %d]\n"),aRequested.iTrafficClass));
|
|
1178 |
LOG(Log::Printf(_L(" [aRequested.iDeliveryOrder = %d]\n"),aRequested.iDeliveryOrder));
|
|
1179 |
LOG(Log::Printf(_L(" [aRequested.iDeliveryOfErroneusSdu = %d]\n"),aRequested.iDeliveryOfErroneusSdu));
|
|
1180 |
LOG(Log::Printf(_L(" [aRequested.iMaxSduSize = %d]\n"),aRequested.iMaxSduSize));
|
|
1181 |
LOG(Log::Printf(_L(" [aRequested.iMaxBitrateUplink = %d]\n"),aRequested.iMaxBitrateUplink));
|
|
1182 |
LOG(Log::Printf(_L(" [aRequested.iMaxBitrateDownlink = %d]\n"),aRequested.iMaxBitrateDownlink));
|
|
1183 |
LOG(Log::Printf(_L(" [aRequested.iResidualBer = %d]\n"),aRequested.iResidualBer));
|
|
1184 |
LOG(Log::Printf(_L(" [aRequested.iErrorRatio = %d]\n"),aRequested.iErrorRatio));
|
|
1185 |
LOG(Log::Printf(_L(" [aRequested.iPriority = %d]\n"),aRequested.iPriority));
|
|
1186 |
LOG(Log::Printf(_L(" [aRequested.iTransferDelay = %d]\n"),aRequested.iTransferDelay));
|
|
1187 |
LOG(Log::Printf(_L(" [aRequested.iGuaBitrateUplink = %d]\n"),aRequested.iGuaBitrateUplink));
|
|
1188 |
LOG(Log::Printf(_L(" [aRequested.iGuaBitrateDownlink = %d]\n"),aRequested.iGuaBitrateDownlink));
|
|
1189 |
LOG(Log::Printf(_L(" [aRequested.iSignallingIndicator = %d]\n"),aRequested.iSignallingIndicator));
|
|
1190 |
LOG(Log::Printf(_L(" [aRequested.iSrcStatisticsDesc = %d]\n"),aRequested.iSrcStatisticsDesc));
|
|
1191 |
LOG(Log::Printf(_L("------------------------------------------------>\n")));
|
|
1192 |
|
|
1193 |
iRequested = aRequested;
|
|
1194 |
}
|
|
1195 |
|
|
1196 |
EXPORT_C void CUmtsR5QoSPolicy::SetQoSMinimum(const TUmtsR5QoSParameters& aMinimum)
|
|
1197 |
{
|
|
1198 |
LOG(Log::Printf(_L("<------------------------------------------------\n")));
|
|
1199 |
LOG(Log::Printf(_L("CUmtsR5QoSPolicy::SetQoSMinimum")));
|
|
1200 |
LOG(Log::Printf(_L("\n")));
|
|
1201 |
LOG(Log::Printf(_L("MINIMUM R5 VALUES SUPPLIED BY CLIENT IS \n")));
|
|
1202 |
LOG(Log::Printf(_L("\n")));
|
|
1203 |
LOG(Log::Printf(_L(" [aMinimum.iTrafficClass = %d]\n"),aMinimum.iTrafficClass));
|
|
1204 |
LOG(Log::Printf(_L(" [aMinimum.iDeliveryOrder = %d]\n"),aMinimum.iDeliveryOrder));
|
|
1205 |
LOG(Log::Printf(_L(" [aMinimum.iDeliveryOfErroneusSdu = %d]\n"),aMinimum.iDeliveryOfErroneusSdu));
|
|
1206 |
LOG(Log::Printf(_L(" [aMinimum.iMaxSduSize = %d]\n"),aMinimum.iMaxSduSize));
|
|
1207 |
LOG(Log::Printf(_L(" [aMinimum.iMaxBitrateUplink = %d]\n"),aMinimum.iMaxBitrateUplink));
|
|
1208 |
LOG(Log::Printf(_L(" [aMinimum.iMaxBitrateDownlink = %d]\n"),aMinimum.iMaxBitrateDownlink));
|
|
1209 |
LOG(Log::Printf(_L(" [aMinimum.iResidualBer = %d]\n"),aMinimum.iResidualBer));
|
|
1210 |
LOG(Log::Printf(_L(" [aMinimum.iErrorRatio = %d]\n"),aMinimum.iErrorRatio));
|
|
1211 |
LOG(Log::Printf(_L(" [aMinimum.iPriority = %d]\n"),aMinimum.iPriority));
|
|
1212 |
LOG(Log::Printf(_L(" [aMinimum.iTransferDelay = %d]\n"),aMinimum.iTransferDelay));
|
|
1213 |
LOG(Log::Printf(_L(" [aMinimum.iGuaBitrateUplink = %d]\n"),aMinimum.iGuaBitrateUplink));
|
|
1214 |
LOG(Log::Printf(_L(" [aMinimum.iGuaBitrateDownlink = %d]\n"),aMinimum.iGuaBitrateDownlink));
|
|
1215 |
LOG(Log::Printf(_L(" [aMinimum.iSignallingIndicator = %d]\n"),aMinimum.iSignallingIndicator));
|
|
1216 |
LOG(Log::Printf(_L(" [aMinimum.iSrcStatisticsDesc = %d]\n"),aMinimum.iSrcStatisticsDesc));
|
|
1217 |
LOG(Log::Printf(_L("------------------------------------------------>\n")));
|
|
1218 |
|
|
1219 |
iMinimum = aMinimum;
|
|
1220 |
}
|
|
1221 |
|
|
1222 |
EXPORT_C void CUmtsR5QoSPolicy::GetQoSRequested(TUmtsR5QoSParameters& aRequested) const
|
|
1223 |
{
|
|
1224 |
aRequested = iRequested;
|
|
1225 |
}
|
|
1226 |
|
|
1227 |
EXPORT_C void CUmtsR5QoSPolicy::GetQoSMinimum(TUmtsR5QoSParameters& aMinimum) const
|
|
1228 |
{
|
|
1229 |
aMinimum = iMinimum;
|
|
1230 |
}
|
|
1231 |
|
|
1232 |
EXPORT_C void CUmtsR5QoSPolicy::GetQoSNegotiated(TNegotiatedUmtsR5QoSParameters& aNegotiated) const
|
|
1233 |
{
|
|
1234 |
aNegotiated = iNegotiated;
|
|
1235 |
}
|
|
1236 |
|
|
1237 |
EXPORT_C TInt CUmtsR5QoSPolicy::SetHeaderCompression(TUint aCompression)
|
|
1238 |
{
|
|
1239 |
if (aCompression & ~(KPdpDataCompression|KPdpHeaderCompression))
|
|
1240 |
return KErrNotSupported;
|
|
1241 |
iCompression = aCompression;
|
|
1242 |
return KErrNone;
|
|
1243 |
}
|
|
1244 |
|
|
1245 |
EXPORT_C TUint CUmtsR5QoSPolicy::HeaderCompression() const
|
|
1246 |
{
|
|
1247 |
return iCompression;
|
|
1248 |
}
|
|
1249 |
|