24
|
1 |
// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// PDP Config structures for TProvision message.
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
@internalComponent
|
|
21 |
*/
|
|
22 |
|
|
23 |
#include <comms-infras/ss_log.h>
|
|
24 |
#include <in_sock.h>
|
|
25 |
#include <comms-infras/metadata.h>
|
|
26 |
#include <comms-infras/agentmcpr.h>
|
|
27 |
#include <comms-infras/ss_log.h>
|
|
28 |
#include <comms-infras/ss_tiermanagerutils.h>
|
|
29 |
|
|
30 |
#include "PDPProvision.h"
|
|
31 |
|
|
32 |
using namespace ESock;
|
|
33 |
|
|
34 |
#if defined(__CFLOG_ACTIVE)
|
|
35 |
#define KPDPMCprTag KESockMetaConnectionTag
|
|
36 |
_LIT8(KPDPMCprSubTag, "pdpmcpr");
|
|
37 |
#endif
|
|
38 |
|
|
39 |
//
|
|
40 |
// Attribute table for provisioning structure passed to CFProtocol
|
|
41 |
//
|
|
42 |
START_ATTRIBUTE_TABLE(CGPRSProvision, CGPRSProvision::EUid, CGPRSProvision::ETypeId)
|
|
43 |
// No attributes defined, as no serialisation takes place.
|
|
44 |
END_ATTRIBUTE_TABLE()
|
|
45 |
|
|
46 |
START_ATTRIBUTE_TABLE(CTSYProvision, CGPRSProvision::EUid, CTSYProvision::ETypeId)
|
|
47 |
// No attributes defined, as no serialisation takes place.
|
|
48 |
END_ATTRIBUTE_TABLE()
|
|
49 |
|
|
50 |
START_ATTRIBUTE_TABLE(CDefaultPacketQoSProvision, CDefaultPacketQoSProvision::EUid, CDefaultPacketQoSProvision::ETypeId)
|
|
51 |
// No attributes defined, as no serialisation takes place.
|
|
52 |
END_ATTRIBUTE_TABLE()
|
|
53 |
|
|
54 |
START_ATTRIBUTE_TABLE(CImsExtProvision, CImsExtProvision::EUid, CImsExtProvision::ETypeId)
|
|
55 |
// No attributes defined, as no serialisation takes place.
|
|
56 |
END_ATTRIBUTE_TABLE()
|
|
57 |
|
|
58 |
CGPRSProvision* CGPRSProvision::NewLC(ESock::CCommsDatIapView* aIapView)
|
|
59 |
{
|
|
60 |
CGPRSProvision* self = new (ELeave) CGPRSProvision;
|
|
61 |
CleanupStack::PushL(self);
|
|
62 |
self->InitialiseConfigL(aIapView);
|
|
63 |
return self;
|
|
64 |
}
|
|
65 |
TInt CGPRSProvision::UmtsGprsRelease() const
|
|
66 |
{
|
|
67 |
return iUmtsGprsRelease;
|
|
68 |
}
|
|
69 |
|
|
70 |
void CGPRSProvision::InitialiseConfigL(ESock::CCommsDatIapView* aIapView)
|
|
71 |
{
|
|
72 |
TInt getErr = aIapView->GetInt(KCDTIdUmtsGprsRelease | KCDTIdOutgoingGprsRecord, iUmtsGprsRelease);
|
|
73 |
|
|
74 |
if (getErr == KErrNotFound || getErr == KErrUnknown)
|
|
75 |
{
|
|
76 |
// default to GPRS
|
|
77 |
getErr = KErrNone;
|
|
78 |
iUmtsGprsRelease = TPacketDataConfigBase::KConfigGPRS;
|
|
79 |
}
|
|
80 |
|
|
81 |
TBool useEdge = EFalse;
|
|
82 |
|
|
83 |
aIapView->GetBoolL(KCDTIdWCDMAUseEdge | KCDTIdOutgoingGprsRecord, useEdge);
|
|
84 |
|
|
85 |
getErr = InitialiseScratchContext(iUmtsGprsRelease);
|
|
86 |
//-====================================================
|
|
87 |
//LENIENT PROVISION
|
|
88 |
//-====================================================
|
|
89 |
//With some provision parameters (e.g.: pdpAddress), CGPRSProvision
|
|
90 |
//tries to be lenient as technically they can be supplied by
|
|
91 |
//someone further in the chain (e.g.: GPRS), if not found in the db.
|
|
92 |
switch (iUmtsGprsRelease)
|
|
93 |
{
|
|
94 |
case TPacketDataConfigBase::KConfigGPRS:
|
|
95 |
{
|
|
96 |
RPacketContext::TContextConfigGPRS& contextGPRS = GetScratchContextAs<RPacketContext::TContextConfigGPRS>();
|
|
97 |
RetrievePdpTypeL(contextGPRS.iPdpType, aIapView);
|
|
98 |
RetrieveApnNameL(contextGPRS.iAccessPointName, aIapView);
|
|
99 |
RetrieveIPAndDnsSettingsL(contextGPRS.iPdpAddress,
|
|
100 |
contextGPRS.iProtocolConfigOption.iDnsAddresses.iPrimaryDns,
|
|
101 |
contextGPRS.iProtocolConfigOption.iDnsAddresses.iSecondaryDns, aIapView);
|
|
102 |
RetrieveAuthenticationInfoL(contextGPRS.iProtocolConfigOption, aIapView);
|
|
103 |
// GPRS specific
|
|
104 |
RetrieveGprsCompression(contextGPRS.iPdpCompression, aIapView);
|
|
105 |
RetrieveGprsAnonymousAccess(contextGPRS.iAnonymousAccessReqd, aIapView);
|
|
106 |
contextGPRS.iUseEdge = useEdge;
|
|
107 |
}
|
|
108 |
break;
|
|
109 |
case TPacketDataConfigBase::KConfigRel5:
|
|
110 |
{
|
|
111 |
// Rel 5 specific
|
|
112 |
RPacketContext::TContextConfig_R5& contextR5 = GetScratchContextAs<RPacketContext::TContextConfig_R5>();
|
|
113 |
RetrieveUmtsCompressionL(contextR5.iPdpHeaderCompression, contextR5.iPdpDataCompression, aIapView);
|
|
114 |
|
|
115 |
RetrievePdpTypeL(contextR5.iPdpType, aIapView);
|
|
116 |
RetrieveApnNameL(contextR5.iAccessPointName, aIapView);
|
|
117 |
RetrieveIPAndDnsSettingsL(contextR5.iPdpAddress,
|
|
118 |
contextR5.iProtocolConfigOption.iDnsAddresses.iPrimaryDns,
|
|
119 |
contextR5.iProtocolConfigOption.iDnsAddresses.iSecondaryDns, aIapView);
|
|
120 |
RetrieveAuthenticationInfoL(contextR5.iProtocolConfigOption, aIapView);
|
|
121 |
contextR5.iUseEdge = useEdge;
|
|
122 |
|
|
123 |
RetrieveUmtsPacketFlowIdentifierL(contextR5.iPFI, aIapView);
|
|
124 |
}
|
|
125 |
break;
|
|
126 |
case TPacketDataConfigBase::KConfigRel99Rel4:
|
|
127 |
{
|
|
128 |
RPacketContext::TContextConfigR99_R4& contextUMTS = GetScratchContextAs<RPacketContext::TContextConfigR99_R4>();
|
|
129 |
|
|
130 |
RetrievePdpTypeL(contextUMTS.iPdpType, aIapView);
|
|
131 |
RetrieveApnNameL(contextUMTS.iAccessPointName, aIapView);
|
|
132 |
RetrieveIPAndDnsSettingsL(contextUMTS.iPdpAddress,
|
|
133 |
contextUMTS.iProtocolConfigOption.iDnsAddresses.iPrimaryDns,
|
|
134 |
contextUMTS.iProtocolConfigOption.iDnsAddresses.iSecondaryDns, aIapView);
|
|
135 |
RetrieveAuthenticationInfoL(contextUMTS.iProtocolConfigOption, aIapView);
|
|
136 |
contextUMTS.iUseEdge = useEdge;
|
|
137 |
RetrieveUmtsPacketFlowIdentifierL(contextUMTS.iPFI, aIapView);
|
|
138 |
}
|
|
139 |
break;
|
|
140 |
default:
|
|
141 |
User::Leave(KErrNotSupported);
|
|
142 |
}
|
|
143 |
}
|
|
144 |
|
|
145 |
void CGPRSProvision::RetrieveGprsCompression(TUint& aCompression, ESock::CCommsDatIapView* aIapView) const
|
|
146 |
{
|
|
147 |
aCompression = 0;
|
|
148 |
TBool isCompression = EFalse;
|
|
149 |
aIapView->GetBool(KCDTIdWCDMADataCompression | KCDTIdOutgoingGprsRecord, isCompression);
|
|
150 |
if (isCompression)
|
|
151 |
{
|
|
152 |
aCompression |= RPacketContext::KPdpDataCompression;
|
|
153 |
}
|
|
154 |
|
|
155 |
isCompression = EFalse;
|
|
156 |
aIapView->GetBool(KCDTIdWCDMAHeaderCompression | KCDTIdOutgoingGprsRecord, isCompression);
|
|
157 |
if (isCompression)
|
|
158 |
{
|
|
159 |
aCompression |= RPacketContext::KPdpHeaderCompression;
|
|
160 |
}
|
|
161 |
__CFLOG_VAR((KPDPMCprTag, KPDPMCprSubTag, _L8("CGPRSProvision [this=%08x]::InitialiseConfigL() KCDTIdWCDMADataCompression|KCDTIdWCDMAHeaderCompression [%d]"), this, aCompression));
|
|
162 |
}
|
|
163 |
|
|
164 |
void CGPRSProvision::RetrieveGprsAnonymousAccess(RPacketContext::TAnonymousAccess& aAnonymous, ESock::CCommsDatIapView* aIapView) const
|
|
165 |
{
|
|
166 |
TBool isAnonymous = EFalse;
|
|
167 |
aIapView->GetBool(KCDTIdWCDMAAnonymousAccess | KCDTIdOutgoingGprsRecord,isAnonymous);
|
|
168 |
if (isAnonymous)
|
|
169 |
aAnonymous = RPacketContext::ERequired;
|
|
170 |
else
|
|
171 |
aAnonymous = RPacketContext::ENotRequired;
|
|
172 |
|
|
173 |
__CFLOG_VAR((KPDPMCprTag, KPDPMCprSubTag, _L8("CGPRSProvision [this=%08x]::InitialiseConfigL() KCDTIdWCDMAAnonymousAccess [%d]"), this, aAnonymous));
|
|
174 |
}
|
|
175 |
|
|
176 |
void CGPRSProvision::RetrieveApnNameL(TDes8& aApnName, ESock::CCommsDatIapView* aIapView) const
|
|
177 |
{
|
|
178 |
HBufC* buf = NULL;
|
|
179 |
TInt getErr;
|
|
180 |
|
|
181 |
if ((getErr = aIapView->GetText(KCDTIdAPN | KCDTIdOutgoingGprsRecord, buf)) == KErrNone)
|
|
182 |
{
|
|
183 |
aApnName.Copy(*buf);
|
|
184 |
delete buf;
|
|
185 |
}
|
|
186 |
else if (getErr != KErrNotFound )
|
|
187 |
{
|
|
188 |
User::Leave(getErr);
|
|
189 |
}
|
|
190 |
__CFLOG_VAR((KPDPMCprTag, KPDPMCprSubTag, _L8("CGPRSProvision [this=%08x]::InitialiseConfigL() KCDTIdAPN [%S]"), this, &aApnName));
|
|
191 |
}
|
|
192 |
|
|
193 |
void CGPRSProvision::RetrievePdpTypeL(RPacketContext::TProtocolType& aPdpType, ESock::CCommsDatIapView* aIapView) const
|
|
194 |
{
|
|
195 |
TUint32 pdpType(0);
|
|
196 |
|
|
197 |
aIapView->GetIntL(KCDTIdWCDMPDPType | KCDTIdOutgoingGprsRecord, pdpType);
|
|
198 |
aPdpType = static_cast<RPacketContext::TProtocolType>(pdpType);
|
|
199 |
__CFLOG_VAR((KPDPMCprTag, KPDPMCprSubTag, _L8("CGPRSProvision [this=%08x]::InitialiseConfigL() KCDTIdWCDMPDPType=%d"), this, aPdpType));
|
|
200 |
}
|
|
201 |
|
|
202 |
void CGPRSProvision::RetrieveAuthenticationInfoL(RPacketContext::TProtocolConfigOptionV2& aProtocolConfigOption, ESock::CCommsDatIapView* aIapView)
|
|
203 |
{
|
|
204 |
HBufC* buf = NULL;
|
|
205 |
TInt getErr;
|
|
206 |
|
|
207 |
__CFLOG_VAR((KPDPMCprTag, KPDPMCprSubTag, _L8("CGPRSProvision [this=%08x]::RetrieveAuthenticationInfoL()"), this));
|
|
208 |
|
|
209 |
getErr = aIapView->GetText(KCDTIdWCDMAIfAuthName | KCDTIdOutgoingGprsRecord, buf);
|
|
210 |
if ( getErr == KErrNone )
|
|
211 |
{
|
|
212 |
ASSERT(buf);
|
|
213 |
aProtocolConfigOption.iAuthInfo.iUsername.Copy(*buf);
|
|
214 |
delete buf;
|
|
215 |
buf = NULL;
|
|
216 |
|
|
217 |
__CFLOG_VAR((KPDPMCprTag, KPDPMCprSubTag, _L8("CGPRSProvision [this=%08x]::RetrieveAuthenticationInfoL() KCDTIdWCDMAIfAuthName [%S] "), this, &aProtocolConfigOption.iAuthInfo.iUsername));
|
|
218 |
|
|
219 |
aProtocolConfigOption.iId = 1;
|
|
220 |
getErr = aIapView->GetText(KCDTIdWCDMAIfAuthPass | KCDTIdOutgoingGprsRecord, buf);
|
|
221 |
if ( getErr == KErrNone )
|
|
222 |
{
|
|
223 |
ASSERT(buf);
|
|
224 |
aProtocolConfigOption.iAuthInfo.iPassword.Copy(*buf);
|
|
225 |
delete buf;
|
|
226 |
buf = NULL;
|
|
227 |
|
|
228 |
__CFLOG_VAR((KPDPMCprTag, KPDPMCprSubTag, _L8("CGPRSProvision [this=%08x]::RetrieveAuthenticationInfoL() KCDTIdWCDMAIfAuthPass [%S]"), this, &aProtocolConfigOption.iAuthInfo.iPassword));
|
|
229 |
}
|
|
230 |
else if (getErr != KErrNotFound)
|
|
231 |
{
|
|
232 |
User::Leave(getErr);
|
|
233 |
}
|
|
234 |
}
|
|
235 |
else if (getErr != KErrNotFound)
|
|
236 |
{
|
|
237 |
User::Leave(getErr);
|
|
238 |
}
|
|
239 |
}
|
|
240 |
|
|
241 |
void CGPRSProvision::RetrieveIPAndDnsSettingsL(TDes8& aPdpAddress, TDes8& aDns1, TDes8& aDns2, ESock::CCommsDatIapView* aIapView) const
|
|
242 |
{
|
|
243 |
HBufC* buf = NULL;
|
|
244 |
|
|
245 |
aPdpAddress.SetLength(0);
|
|
246 |
aDns1.SetLength(0);
|
|
247 |
aDns2.SetLength(0);
|
|
248 |
|
|
249 |
TBool fromServer;
|
|
250 |
aIapView->GetBoolL(KCDTIdWCDMAIPAddrFromServer | KCDTIdOutgoingGprsRecord, fromServer);
|
|
251 |
if (!fromServer)
|
|
252 |
{
|
|
253 |
aIapView->GetTextL(KCDTIdWCDMAIPAddr | KCDTIdOutgoingGprsRecord, buf);
|
|
254 |
TInetAddr addr;
|
|
255 |
User::LeaveIfError(addr.Input(*buf));
|
|
256 |
// sending ASCII to MA but checking the validity of the address above.
|
|
257 |
aPdpAddress.Copy(*buf);
|
|
258 |
delete buf;
|
|
259 |
buf = NULL;
|
|
260 |
}
|
|
261 |
|
|
262 |
// We can only use IPv4 or IPv6 - we use the first one listed in the IfNetworks field
|
|
263 |
aIapView->GetTextL(KCDTIdWCDMAIfNetworks | KCDTIdOutgoingGprsRecord, buf);
|
|
264 |
|
|
265 |
TInt pos = buf->Find(_L(","));
|
|
266 |
if (pos == KErrNotFound)
|
|
267 |
{
|
|
268 |
pos = buf->Length();
|
|
269 |
}
|
|
270 |
|
|
271 |
TBufC<KCommsDbSvrMaxFieldLength> temp(buf->Mid(0, pos));
|
|
272 |
delete buf;
|
|
273 |
buf = NULL;
|
|
274 |
_LIT(KIp4, "ip");
|
|
275 |
_LIT(KIp6, "ip6");
|
|
276 |
if (temp.CompareF(KIp4) == 0)
|
|
277 |
{
|
|
278 |
// IPv4 settings
|
|
279 |
aIapView->GetBoolL(KCDTIdWCDMAIPDNSAddrFromServer | KCDTIdOutgoingGprsRecord, fromServer);
|
|
280 |
if (!fromServer)
|
|
281 |
{
|
|
282 |
aIapView->GetTextL(KCDTIdWCDMAIPNameServer1 | KCDTIdOutgoingGprsRecord, buf);
|
|
283 |
TInetAddr addr;
|
|
284 |
User::LeaveIfError(addr.Input(*buf));
|
|
285 |
// sending ASCII to MA but checking the validity of the address above.
|
|
286 |
aDns1.Copy(*buf);
|
|
287 |
delete buf;
|
|
288 |
buf = NULL;
|
|
289 |
aIapView->GetTextL(KCDTIdWCDMAIPNameServer2 | KCDTIdOutgoingGprsRecord, buf);
|
|
290 |
User::LeaveIfError(addr.Input(*buf));
|
|
291 |
// sending ASCII to MA but checking the validity of the address above.
|
|
292 |
aDns2.Copy(*buf);
|
|
293 |
delete buf;
|
|
294 |
buf = NULL;
|
|
295 |
}
|
|
296 |
}
|
|
297 |
else if (temp.CompareF(KIp6) == 0)
|
|
298 |
{
|
|
299 |
// IPv6 settings
|
|
300 |
aIapView->GetBoolL(KCDTIdWCDMAIP6DNSAddrFromServer | KCDTIdOutgoingGprsRecord, fromServer);
|
|
301 |
if (!fromServer)
|
|
302 |
{
|
|
303 |
aIapView->GetTextL(KCDTIdWCDMAIP6NameServer1 | KCDTIdOutgoingGprsRecord, buf);
|
|
304 |
TInetAddr addr;
|
|
305 |
User::LeaveIfError(addr.Input(*buf));
|
|
306 |
// sending ASCII to MA but checking the validity of the address above.
|
|
307 |
aDns1.Copy(*buf);
|
|
308 |
delete buf;
|
|
309 |
buf = NULL;
|
|
310 |
aIapView->GetTextL(KCDTIdWCDMAIP6NameServer2 | KCDTIdOutgoingGprsRecord, buf);
|
|
311 |
User::LeaveIfError(addr.Input(*buf));
|
|
312 |
// sending ASCII to MA but checking the validity of the address above.
|
|
313 |
aDns2.Copy(*buf);
|
|
314 |
delete buf;
|
|
315 |
buf = NULL;
|
|
316 |
}
|
|
317 |
}
|
|
318 |
else
|
|
319 |
{
|
|
320 |
// Anything else is a serious misconfiguration
|
|
321 |
User::Leave(KErrArgument);
|
|
322 |
}
|
|
323 |
}
|
|
324 |
void CGPRSProvision::RetrieveUmtsCompressionL(RPacketContext::THeaderCompression& aHeaderCompression, RPacketContext::TDataCompression& aDataCompression, ESock::CCommsDatIapView* aIapView) const
|
|
325 |
{
|
|
326 |
TUint32 headerComp;
|
|
327 |
TUint32 dataComp;
|
|
328 |
TInt err;
|
|
329 |
|
|
330 |
err = aIapView->GetInt(KCDTIdR5DataCompression | KCDTIdOutgoingGprsRecord, headerComp);
|
|
331 |
if (err == KErrNotFound || err == KErrUnknown)
|
|
332 |
{
|
|
333 |
err = KErrNone;
|
|
334 |
headerComp = RPacketContext::ENoHeaderCompression;
|
|
335 |
}
|
|
336 |
User::LeaveIfError(err);
|
|
337 |
|
|
338 |
aHeaderCompression = static_cast<RPacketContext::THeaderCompression>(headerComp);
|
|
339 |
|
|
340 |
err = aIapView->GetInt(KCDTIdR5HeaderCompression | KCDTIdOutgoingGprsRecord, dataComp);
|
|
341 |
if (err == KErrNotFound || err == KErrUnknown)
|
|
342 |
{
|
|
343 |
err = KErrNone;
|
|
344 |
dataComp = RPacketContext::ENoDataCompression;
|
|
345 |
}
|
|
346 |
User::LeaveIfError(err);
|
|
347 |
|
|
348 |
aDataCompression = static_cast<RPacketContext::TDataCompression>(dataComp);
|
|
349 |
}
|
|
350 |
|
|
351 |
void CGPRSProvision::RetrieveUmtsPacketFlowIdentifierL(RPacketContext::TPacketFlowIdentifier& aPfi, ESock::CCommsDatIapView* aIapView) const
|
|
352 |
{
|
|
353 |
TUint32 pfi;
|
|
354 |
TInt err = aIapView->GetInt(KCDTIdPacketFlowIdentifier | KCDTIdOutgoingGprsRecord, pfi);
|
|
355 |
if (err == KErrNotFound || err == KErrUnknown)
|
|
356 |
{
|
|
357 |
err = KErrNone;
|
|
358 |
pfi = RPacketContext::EBestEffort;
|
|
359 |
}
|
|
360 |
User::LeaveIfError(err);
|
|
361 |
aPfi = static_cast<RPacketContext::TPacketFlowIdentifier>(pfi);
|
|
362 |
}
|
|
363 |
|
|
364 |
|
|
365 |
TInt CGPRSProvision::InitialiseScratchContext(TUint32 aConfigRel) const
|
|
366 |
{
|
|
367 |
switch(aConfigRel)
|
|
368 |
{
|
|
369 |
case TPacketDataConfigBase::KConfigGPRS:
|
|
370 |
{
|
|
371 |
RPacketContext::TContextConfigGPRS tmp;
|
|
372 |
Mem::Copy(const_cast<TUint8*>(iScratchContext.Ptr()), &tmp, sizeof(tmp));
|
|
373 |
}
|
|
374 |
break;
|
|
375 |
|
|
376 |
case TPacketDataConfigBase::KConfigRel99Rel4:
|
|
377 |
{
|
|
378 |
RPacketContext::TContextConfigR99_R4 tmp;
|
|
379 |
Mem::Copy(const_cast<TUint8*>(iScratchContext.Ptr()), &tmp, sizeof(tmp));
|
|
380 |
}
|
|
381 |
break;
|
|
382 |
|
|
383 |
case TPacketDataConfigBase::KConfigRel5:
|
|
384 |
{
|
|
385 |
RPacketContext::TContextConfig_R5 tmp;
|
|
386 |
Mem::Copy(const_cast<TUint8*>(iScratchContext.Ptr()), &tmp, sizeof(tmp));
|
|
387 |
}
|
|
388 |
break;
|
|
389 |
default:
|
|
390 |
return KErrNotSupported;
|
|
391 |
}
|
|
392 |
return KErrNone;
|
|
393 |
}
|
|
394 |
|
|
395 |
|
|
396 |
CTSYProvision* CTSYProvision::NewLC(ESock::CCommsDatIapView* aIapView)
|
|
397 |
{
|
|
398 |
CTSYProvision* self = new (ELeave) CTSYProvision;
|
|
399 |
CleanupStack::PushL(self);
|
|
400 |
self->InitialiseConfigL(aIapView);
|
|
401 |
return self;
|
|
402 |
}
|
|
403 |
|
|
404 |
void CTSYProvision::InitialiseConfigL(ESock::CCommsDatIapView* aIapView)
|
|
405 |
{
|
|
406 |
HBufC* buf = NULL;
|
|
407 |
|
|
408 |
aIapView->GetTextL(KCDTIdTsyName, buf);
|
|
409 |
iTsyName.Copy(*buf);
|
|
410 |
__CFLOG_VAR((KPDPMCprTag, KPDPMCprSubTag, _L8("CTSYProvision [this=%08x]::InitialiseConfigL() KCDTIdTsyName=%s"), this, &iTsyName));
|
|
411 |
delete buf;
|
|
412 |
}
|
|
413 |
|
|
414 |
CDefaultPacketQoSProvision* CDefaultPacketQoSProvision::NewL(ESock::CCommsDatIapView* aIapView)
|
|
415 |
{
|
|
416 |
CDefaultPacketQoSProvision* self = new (ELeave) CDefaultPacketQoSProvision;
|
|
417 |
CleanupStack::PushL(self);
|
|
418 |
self->InitialiseConfigL(aIapView);
|
|
419 |
CleanupStack::Pop(self);
|
|
420 |
return self;
|
|
421 |
}
|
|
422 |
|
|
423 |
void CDefaultPacketQoSProvision::InitialiseConfigL(ESock::CCommsDatIapView* aIapView)
|
|
424 |
{
|
|
425 |
TUint32 data;
|
|
426 |
|
|
427 |
aIapView->GetIntL(KCDTIdWCDMAReqTrafficClass,data);
|
|
428 |
iParams.iReqTrafficClass = (RPacketQoS::TTrafficClass)data;
|
|
429 |
|
|
430 |
aIapView->GetIntL(KCDTIdWCDMAMinTrafficClass,data);
|
|
431 |
iParams.iMinTrafficClass = (RPacketQoS::TTrafficClass)data;
|
|
432 |
|
|
433 |
aIapView->GetIntL(KCDTIdWCDMAReqDeliveryOrder,data);
|
|
434 |
iParams.iReqDeliveryOrderReqd = (RPacketQoS::TDeliveryOrder)data;
|
|
435 |
|
|
436 |
aIapView->GetIntL(KCDTIdWCDMAMinDeliveryOrder,data);
|
|
437 |
iParams.iMinDeliveryOrderReqd = (RPacketQoS::TDeliveryOrder)data;
|
|
438 |
|
|
439 |
aIapView->GetIntL(KCDTIdWCDMAReqDeliverErroneousSDU,data);
|
|
440 |
iParams.iReqDeliverErroneousSDU = (RPacketQoS::TErroneousSDUDelivery)data;
|
|
441 |
|
|
442 |
aIapView->GetIntL(KCDTIdWCDMAMinDeliverErroneousSDU,data);
|
|
443 |
iParams.iMinDeliverErroneousSDU = (RPacketQoS::TErroneousSDUDelivery)data;
|
|
444 |
|
|
445 |
aIapView->GetIntL(KCDTIdWCDMAReqMaxSDUSize,data);
|
|
446 |
iParams.iReqMaxSDUSize = (TInt)data;
|
|
447 |
|
|
448 |
aIapView->GetIntL(KCDTIdWCDMAMinAcceptableMaxSDUSize,data);
|
|
449 |
iParams.iMinAcceptableMaxSDUSize = (TInt)data;
|
|
450 |
|
|
451 |
aIapView->GetIntL(KCDTIdWCDMAReqMaxUplinkRate,data);
|
|
452 |
iParams.iReqMaxRate.iUplinkRate = (TInt)data;
|
|
453 |
|
|
454 |
aIapView->GetIntL(KCDTIdWCDMAReqMinUplinkRate,data);
|
|
455 |
iParams.iMinAcceptableMaxRate.iUplinkRate = (TInt)data;
|
|
456 |
|
|
457 |
aIapView->GetIntL(KCDTIdWCDMAReqMaxDownlinkRate,data);
|
|
458 |
iParams.iReqMaxRate.iDownlinkRate = (TInt)data;
|
|
459 |
|
|
460 |
aIapView->GetIntL(KCDTIdWCDMAReqMinDownlinkRate,data);
|
|
461 |
iParams.iMinAcceptableMaxRate.iDownlinkRate = (TInt)data;
|
|
462 |
|
|
463 |
aIapView->GetIntL(KCDTIdWCDMAReqBER,data);
|
|
464 |
iParams.iReqBER = (RPacketQoS::TBitErrorRatio)data;
|
|
465 |
|
|
466 |
aIapView->GetIntL(KCDTIdWCDMAMaxBER,data);
|
|
467 |
iParams.iMaxBER = (RPacketQoS::TBitErrorRatio)data;
|
|
468 |
|
|
469 |
aIapView->GetIntL(KCDTIdWCDMAReqSDUErrorRatio,data);
|
|
470 |
iParams.iReqSDUErrorRatio = (RPacketQoS::TSDUErrorRatio)data;
|
|
471 |
|
|
472 |
aIapView->GetIntL(KCDTIdWCDMAMaxSDUErrorRatio,data);
|
|
473 |
iParams.iMaxSDUErrorRatio = (RPacketQoS::TSDUErrorRatio)data;
|
|
474 |
|
|
475 |
aIapView->GetIntL(KCDTIdWCDMAReqTrafficHandlingPriority,data);
|
|
476 |
iParams.iReqTrafficHandlingPriority = (RPacketQoS::TTrafficHandlingPriority)data;
|
|
477 |
|
|
478 |
aIapView->GetIntL(KCDTIdWCDMAMinTrafficHandlingPriority,data);
|
|
479 |
iParams.iMinTrafficHandlingPriority = (RPacketQoS::TTrafficHandlingPriority)data;
|
|
480 |
|
|
481 |
aIapView->GetIntL(KCDTIdWCDMAReqTransferDelay,data);
|
|
482 |
iParams.iReqTransferDelay = (TInt)data;
|
|
483 |
|
|
484 |
aIapView->GetIntL(KCDTIdWCDMAMaxTransferDelay,data);
|
|
485 |
iParams.iMaxTransferDelay = (TInt)data;
|
|
486 |
|
|
487 |
aIapView->GetIntL(KCDTIdWCDMAReqGuaranteedUplinkRate,data);
|
|
488 |
iParams.iReqGuaranteedRate.iUplinkRate = (TInt)data;
|
|
489 |
|
|
490 |
aIapView->GetIntL(KCDTIdWCDMAMinGuaranteedUplinkRate,data);
|
|
491 |
iParams.iMinGuaranteedRate.iUplinkRate = (TInt)data;
|
|
492 |
|
|
493 |
aIapView->GetIntL(KCDTIdWCDMAReqGuaranteedDownlinkRate,data);
|
|
494 |
iParams.iReqGuaranteedRate.iDownlinkRate = (TInt)data;
|
|
495 |
|
|
496 |
aIapView->GetIntL(KCDTIdWCDMAMinGuaranteedDownlinkRate,data);
|
|
497 |
iParams.iMinGuaranteedRate.iDownlinkRate = (TInt)data;
|
|
498 |
|
|
499 |
TBool bdata = EFalse;
|
|
500 |
#ifdef _DEBUG
|
|
501 |
TInt debugErr =
|
|
502 |
#endif
|
|
503 |
aIapView->GetBool(KCDTIdWCDMASignallingIndication,bdata);
|
|
504 |
iParams.iSignallingIndication = bdata;
|
|
505 |
}
|
|
506 |
|
|
507 |
CImsExtProvision* CImsExtProvision::NewLC(ESock::CCommsDatIapView* aIapView)
|
|
508 |
{
|
|
509 |
CImsExtProvision* self = new (ELeave) CImsExtProvision;
|
|
510 |
CleanupStack::PushL(self);
|
|
511 |
self->InitialiseConfigL(aIapView);
|
|
512 |
return self;
|
|
513 |
}
|
|
514 |
|
|
515 |
void CImsExtProvision::InitialiseConfigL(ESock::CCommsDatIapView* aIapView)
|
|
516 |
{
|
|
517 |
TBool bdata = EFalse;
|
|
518 |
aIapView->GetBool(KCDTIdWCDMAImCmSignallingIndication,bdata);
|
|
519 |
iImsSignalIndicator = bdata;
|
|
520 |
}
|
|
521 |
|
|
522 |
|