|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // PDP FSM implementation |
|
15 // @internalTechnology |
|
16 // |
|
17 // |
|
18 |
|
19 |
|
20 #include "tpdpstates.h" |
|
21 #include "cpdpfsm.h" |
|
22 #include "cpdpfsmfactory.h" |
|
23 #include "spudfsmdebuglogger.h" |
|
24 #include "eteldrivernmspace.h" |
|
25 |
|
26 |
|
27 #ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
28 CPdpFsm* CPdpFsm::NewL(TContextId aPdpId, CPdpFsmFactory * aPdpFsmFactory, REtelDriverInput * aEtelDriverInput) |
|
29 #else |
|
30 CPdpFsm* CPdpFsm::NewL(TContextId aPdpId, CPdpFsmFactory * aPdpFsmFactory, REtelDriverInput * aEtelDriverInput, MPdpFsmEventHandler& aPdpFsmEventHandler, SpudMan::TPdpContextType aContextType) |
|
31 #endif |
|
32 { |
|
33 #ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
34 CPdpFsm* self = new(ELeave) CPdpFsm(aPdpId, aPdpFsmFactory, aEtelDriverInput); |
|
35 #else |
|
36 CPdpFsm* self = new(ELeave) CPdpFsm(aPdpId, aPdpFsmFactory, aEtelDriverInput, aPdpFsmEventHandler, aContextType); |
|
37 #endif |
|
38 CleanupStack::PushL(self); |
|
39 self->ConstructL(); |
|
40 CleanupStack::Pop(self); |
|
41 return self; |
|
42 } |
|
43 |
|
44 void CPdpFsm::ConstructL() |
|
45 { |
|
46 iContextConfig.CreateL(PdpFsm::KContextConfigBufferSize); |
|
47 iContextConfig.SetMax(); |
|
48 iContextConfig.FillZ(); |
|
49 } |
|
50 |
|
51 |
|
52 |
|
53 #ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
54 CPdpFsm::CPdpFsm(TContextId aPdpId, CPdpFsmFactory * aPdpFsmFactory, REtelDriverInput * aEtelDriverInput) |
|
55 #else |
|
56 CPdpFsm::CPdpFsm(TContextId aPdpId, CPdpFsmFactory * aPdpFsmFactory, REtelDriverInput * aEtelDriverInput, MPdpFsmEventHandler& aPdpFsmEventHandler,SpudMan::TPdpContextType aContextType) |
|
57 :iPdpFsmEventHandler(&aPdpFsmEventHandler) |
|
58 #endif |
|
59 // NOTE: Both pointers are valid when called - see CPdpFsmFactory and CPdpFsmInterface. |
|
60 // No other caller is expected. |
|
61 { |
|
62 SPUDFSMVERBOSE_FNLOG("CPdpFsm::CPdpFsm()"); |
|
63 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
64 |
|
65 // save for later |
|
66 iPdpId = aPdpId; |
|
67 |
|
68 iPdpFsmFactory = aPdpFsmFactory; |
|
69 |
|
70 iEtelDriverInput = aEtelDriverInput; |
|
71 iContextType = aContextType; |
|
72 |
|
73 // we need a state |
|
74 iState = &iPdpFsmFactory->iStateInitialised; |
|
75 } |
|
76 |
|
77 |
|
78 CPdpFsm::~CPdpFsm() |
|
79 { |
|
80 SPUDFSMVERBOSE_FNLOG("CPdpFsm::~CPdpFsm()"); |
|
81 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
82 iContextConfig.Close(); |
|
83 iEtelDriverInput->DeletePdp(iPdpId); |
|
84 iSessionInfo.iSessionIds.Close(); |
|
85 } |
|
86 |
|
87 |
|
88 TInt CPdpFsm::Input (const TInt aOperation, const TInt aParam) |
|
89 { |
|
90 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Input()"); |
|
91 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
92 |
|
93 #ifdef _DEBUG // NOT DEBUGRELEASE |
|
94 SPUDFSMVERBOSE_LOG1(_L("State : %S"), &iState->iName); |
|
95 #endif |
|
96 |
|
97 SPUDFSM_LOG3(_L("Pdp ID %d, State '%S', Operation '%S'"),iPdpId, &iState->iName, iState->LogOperation(*this, aOperation)); |
|
98 |
|
99 return iState->Input (*this, aOperation, aParam); |
|
100 } |
|
101 |
|
102 |
|
103 #ifdef SYMBIAN_NETWORKING_UMTSR5 |
|
104 void CPdpFsm::Get(RPacketQoS::TQoSR5Requested& aParam) |
|
105 { |
|
106 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(QoSR5Req)"); |
|
107 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
108 |
|
109 ASSERT(iQosRequested.ExtensionId() == TPacketDataConfigBase::KConfigRel5); |
|
110 aParam = iQosRequested.RequestedQoSR5(); |
|
111 } |
|
112 |
|
113 void CPdpFsm::Get(RPacketQoS::TQoSR5Negotiated& aParam) |
|
114 { |
|
115 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(QoSR5Neg)"); |
|
116 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
117 |
|
118 ASSERT(iQosNegotiated.ExtensionId() == TPacketDataConfigBase::KConfigRel5); |
|
119 aParam = iQosNegotiated.NegotiatedQoSR5(); |
|
120 } |
|
121 |
|
122 #else |
|
123 // !SYMBIAN_NETWORKING_UMTSR5 |
|
124 |
|
125 void CPdpFsm::Get(RPacketQoS::TQoSR99_R4Requested& aParam) |
|
126 { |
|
127 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(QosReq)"); |
|
128 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
129 |
|
130 aParam = iQosRequested.RequestedQoSR99_R4(); |
|
131 } |
|
132 |
|
133 void CPdpFsm::Get(RPacketQoS::TQoSR99_R4Negotiated& aParam) |
|
134 { |
|
135 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(QoSNeg)"); |
|
136 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
137 |
|
138 aParam = iQosNegotiated.NegotiatedQoSR99_R4(); |
|
139 } |
|
140 |
|
141 #endif |
|
142 // SYMBIAN_NETWORKING_UMTSR5 |
|
143 |
|
144 |
|
145 void CPdpFsm::Get(TTFTInfo& aParam) |
|
146 { |
|
147 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(TFTInfo)"); |
|
148 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
149 |
|
150 aParam = iTFT; |
|
151 } |
|
152 |
|
153 void CPdpFsm::Get(TTFTOperationCode& aParam) |
|
154 { |
|
155 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(TFTOperationCode)"); |
|
156 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
157 |
|
158 aParam = iTFTOperationCode; |
|
159 } |
|
160 |
|
161 void CPdpFsm::Get(RPacketContext::TDataChannelV2& aParam) |
|
162 { |
|
163 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(RPacketContext::TDataChannelV2)"); |
|
164 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
165 |
|
166 aParam = iDataChannelV2; |
|
167 } |
|
168 |
|
169 void CPdpFsm::Get(TPacketDataConfigBase& aParam) |
|
170 { |
|
171 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(TPacketDataConfigBase)"); |
|
172 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
173 |
|
174 TInt rel = GetContextConfigAs<TPacketDataConfigBase>().ExtensionId(); |
|
175 if (rel == 0) |
|
176 { |
|
177 // buffer has not been initialised yet |
|
178 InitialiseContextConfig(aParam.ExtensionId()); |
|
179 } |
|
180 |
|
181 switch (rel) |
|
182 { |
|
183 case TPacketDataConfigBase::KConfigGPRS: |
|
184 Mem::Copy(&aParam, const_cast<TUint8*>(iContextConfig.Ptr()), sizeof(RPacketContext::TContextConfigGPRS)); |
|
185 break; |
|
186 |
|
187 case TPacketDataConfigBase::KConfigRel99Rel4: |
|
188 Mem::Copy(&aParam, const_cast<TUint8*>(iContextConfig.Ptr()), sizeof(RPacketContext::TContextConfigR99_R4)); |
|
189 break; |
|
190 |
|
191 case TPacketDataConfigBase::KConfigRel5: |
|
192 Mem::Copy(&aParam, const_cast<TUint8*>(iContextConfig.Ptr()), sizeof(RPacketContext::TContextConfig_R5)); |
|
193 break; |
|
194 } |
|
195 } |
|
196 |
|
197 void CPdpFsm::Get(RPacketContext::TContextStatus& aParam) |
|
198 { |
|
199 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(RPacketContext::TContextStatus)"); |
|
200 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
201 |
|
202 aParam = iContextStatus; |
|
203 } |
|
204 |
|
205 |
|
206 #ifdef SYMBIAN_NETWORKING_UMTSR5 |
|
207 void CPdpFsm::Set(const RPacketQoS::TQoSR5Requested& aParam) |
|
208 { |
|
209 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(QoSR5Req)"); |
|
210 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
211 |
|
212 iQosRequested = aParam; |
|
213 } |
|
214 |
|
215 void CPdpFsm::Set(const RPacketQoS::TQoSR5Negotiated& aParam) |
|
216 { |
|
217 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(QoSR5Neg)"); |
|
218 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
219 |
|
220 iQosNegotiated = aParam; |
|
221 } |
|
222 |
|
223 #else |
|
224 // !SYMBIAN_NETWORKING_UMTSR5 |
|
225 |
|
226 |
|
227 void CPdpFsm::Set(const RPacketQoS::TQoSR99_R4Requested& aParam) |
|
228 { |
|
229 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(QoSReq)"); |
|
230 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
231 |
|
232 iQosRequested = aParam; |
|
233 |
|
234 } |
|
235 |
|
236 |
|
237 void CPdpFsm::Set(const RPacketQoS::TQoSR99_R4Negotiated& aParam) |
|
238 { |
|
239 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(QoSNeg)"); |
|
240 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
241 |
|
242 iQosNegotiated = aParam; |
|
243 } |
|
244 |
|
245 |
|
246 #endif |
|
247 // SYMBIAN_NETWORKING_UMTSR5 |
|
248 |
|
249 |
|
250 void CPdpFsm::Set(const TTFTInfo& aParam) |
|
251 { |
|
252 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(TFT)"); |
|
253 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
254 |
|
255 iTFT = aParam; |
|
256 } |
|
257 |
|
258 void CPdpFsm::Set(const TTFTOperationCode& aParam) |
|
259 { |
|
260 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(TFTOperationCode)"); |
|
261 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
262 |
|
263 iTFTOperationCode = aParam; |
|
264 } |
|
265 |
|
266 void CPdpFsm::Set(const RPacketContext::TDataChannelV2& aParam) |
|
267 { |
|
268 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(RPacketContext::TDataChannelV2)"); |
|
269 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
270 |
|
271 iDataChannelV2 = aParam; |
|
272 } |
|
273 |
|
274 void CPdpFsm::Set(const RPacketContext::TContextStatus& aParam) |
|
275 { |
|
276 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(RPacketContext::TContextStatus)"); |
|
277 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
278 |
|
279 iContextStatus = aParam; |
|
280 } |
|
281 |
|
282 void CPdpFsm::Set(const TPacketDataConfigBase& aParam) |
|
283 { |
|
284 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(RPacketContext::TContextConfigGPRS)"); |
|
285 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
286 |
|
287 switch ((const_cast<TPacketDataConfigBase&>(aParam)).ExtensionId()) |
|
288 { |
|
289 case TPacketDataConfigBase::KConfigGPRS: |
|
290 Mem::Copy(const_cast<TUint8*>(iContextConfig.Ptr()), &aParam, sizeof(RPacketContext::TContextConfigGPRS)); |
|
291 break; |
|
292 |
|
293 case TPacketDataConfigBase::KConfigRel99Rel4: |
|
294 Mem::Copy(const_cast<TUint8*>(iContextConfig.Ptr()), &aParam, sizeof(RPacketContext::TContextConfigR99_R4)); |
|
295 break; |
|
296 |
|
297 case TPacketDataConfigBase::KConfigRel5: |
|
298 Mem::Copy(const_cast<TUint8*>(iContextConfig.Ptr()), &aParam, sizeof(RPacketContext::TContextConfig_R5)); |
|
299 break; |
|
300 } |
|
301 } |
|
302 |
|
303 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
304 void CPdpFsm::Set(MPdpFsmEventHandler& aPdpFsmEventHandler) |
|
305 { |
|
306 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Set(MPdpFsmEventHandler&)"); |
|
307 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
308 |
|
309 if (iPdpFsmEventHandler) |
|
310 { |
|
311 iPdpFsmEventHandler->Event(KContextDeleteEvent, KErrAbort); |
|
312 } |
|
313 iPdpFsmEventHandler = &aPdpFsmEventHandler; |
|
314 } |
|
315 #endif |
|
316 |
|
317 void CPdpFsm::EtelInput (EtelDriver::TEtelInput aOperation) |
|
318 { |
|
319 SPUDFSMVERBOSE_FNLOG("CPdpFsm::EtelInput"); |
|
320 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
321 |
|
322 iEtelDriverInput->Input (iPdpId, aOperation); |
|
323 } |
|
324 |
|
325 void CPdpFsm::EtelCancel (void) |
|
326 { |
|
327 SPUDFSMVERBOSE_FNLOG("CPdpFsm::EtelCancel"); |
|
328 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
329 |
|
330 iEtelDriverInput->CancelPdp (iPdpId); |
|
331 } |
|
332 |
|
333 void CPdpFsm::SpudInput (TInt aNotification, TInt aParam) |
|
334 { |
|
335 SPUDFSMVERBOSE_FNLOG("CPdpFsm::SpudInput"); |
|
336 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
337 #ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
338 iPdpFsmFactory->SpudInput (iPdpId, aNotification, aParam); |
|
339 #else |
|
340 ASSERT(iPdpFsmEventHandler); |
|
341 iPdpFsmEventHandler->Event(aNotification, aParam); |
|
342 #endif |
|
343 } |
|
344 |
|
345 // state change members |
|
346 |
|
347 void CPdpFsm::ChangeStateToInitialised(void) |
|
348 { |
|
349 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToInitialised"); |
|
350 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
351 SPUDFSM_LOG(_L("New State : Initialised")); |
|
352 |
|
353 iState = &iPdpFsmFactory->iStateInitialised; |
|
354 } |
|
355 |
|
356 void CPdpFsm::ChangeStateToOpeningPhone(void) |
|
357 { |
|
358 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToOpeningPhone"); |
|
359 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
360 SPUDFSM_LOG(_L("New State : OpeningPhone")); |
|
361 |
|
362 iState = &iPdpFsmFactory->iStateOpeningPhone; |
|
363 } |
|
364 |
|
365 void CPdpFsm::ChangeStateToCreatingPrimary(void) |
|
366 { |
|
367 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToCreatingPrimary"); |
|
368 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
369 SPUDFSM_LOG(_L("New State : CreatingPrimary")); |
|
370 |
|
371 iState = &iPdpFsmFactory->iStateCreatingPrimary; |
|
372 } |
|
373 |
|
374 void CPdpFsm::ChangeStateToActivatingPrimary(void) |
|
375 { |
|
376 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToActivatingPrimary"); |
|
377 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
378 SPUDFSM_LOG(_L("New State : ActivatingPrimary")); |
|
379 |
|
380 iState = &iPdpFsmFactory->iStateActivatingPrimary; |
|
381 } |
|
382 |
|
383 void CPdpFsm::ChangeStateToCreatingSecondary(void) |
|
384 { |
|
385 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToCreatingSecondary"); |
|
386 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
387 SPUDFSM_LOG(_L("New State : CreatingSecondary")); |
|
388 |
|
389 iState = &iPdpFsmFactory->iStateCreatingSecondary; |
|
390 } |
|
391 |
|
392 void CPdpFsm::ChangeStateToCreatedSecondary(void) |
|
393 { |
|
394 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToCreatedSecondary"); |
|
395 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
396 SPUDFSM_LOG(_L("New State : CreatedSecondary")); |
|
397 |
|
398 iState = &iPdpFsmFactory->iStateCreatedSecondary; |
|
399 } |
|
400 |
|
401 void CPdpFsm::ChangeStateToSettingTFT(void) |
|
402 { |
|
403 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToSettingTFT"); |
|
404 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
405 SPUDFSM_LOG(_L("New State : SettingTFT")); |
|
406 |
|
407 iState = &iPdpFsmFactory->iStateSettingTFT; |
|
408 } |
|
409 |
|
410 void CPdpFsm::ChangeStateToSettingQoS(void) |
|
411 { |
|
412 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToSettingQoS"); |
|
413 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
414 SPUDFSM_LOG(_L("New State : SettingQoS")); |
|
415 |
|
416 iState = &iPdpFsmFactory->iStateSettingQoS; |
|
417 } |
|
418 |
|
419 void CPdpFsm::ChangeStateToActivatingSecondary(void) |
|
420 { |
|
421 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToActivatingSecondary"); |
|
422 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
423 SPUDFSM_LOG(_L("New State : ActivatingSecondary")); |
|
424 |
|
425 iState = &iPdpFsmFactory->iStateActivatingSecondary; |
|
426 } |
|
427 |
|
428 void CPdpFsm::ChangeStateToOpen(void) |
|
429 { |
|
430 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToOpen"); |
|
431 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
432 SPUDFSM_LOG(_L("New State : Open")); |
|
433 |
|
434 iState = &iPdpFsmFactory->iStateOpen; |
|
435 } |
|
436 |
|
437 void CPdpFsm::ChangeStateToChangingQoS(void) |
|
438 { |
|
439 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToChangingQoS"); |
|
440 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
441 SPUDFSM_LOG(_L("New State : ChangingQoS")); |
|
442 |
|
443 iState = &iPdpFsmFactory->iStateChangingQoS; |
|
444 } |
|
445 |
|
446 void CPdpFsm::ChangeStateToChangingTFT(void) |
|
447 { |
|
448 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToChangingTFT"); |
|
449 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
450 SPUDFSM_LOG(_L("New State : ChangingTFT")); |
|
451 |
|
452 iState = &iPdpFsmFactory->iStateChangingTFT; |
|
453 } |
|
454 |
|
455 void CPdpFsm::ChangeStateToGettingNegQoS(void) |
|
456 { |
|
457 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToGettingNegQoS"); |
|
458 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
459 SPUDFSM_LOG(_L("New State : GettingNegQoS")); |
|
460 |
|
461 iState = &iPdpFsmFactory->iStateGettingNegQoS; |
|
462 } |
|
463 |
|
464 |
|
465 |
|
466 void CPdpFsm::ChangeStateToModifingActive(void) |
|
467 { |
|
468 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToModifingActive"); |
|
469 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
470 SPUDFSM_LOG(_L("New State : ModifingActive")); |
|
471 |
|
472 iState = &iPdpFsmFactory->iStateModifyingActive; |
|
473 } |
|
474 |
|
475 void CPdpFsm::ChangeStateToSuspended(void) |
|
476 { |
|
477 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToSuspended"); |
|
478 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
479 SPUDFSM_LOG(_L("New State : Suspended")); |
|
480 |
|
481 iState = &iPdpFsmFactory->iStateSuspended; |
|
482 } |
|
483 |
|
484 void CPdpFsm::ChangeStateToClosing(void) |
|
485 { |
|
486 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToClosing"); |
|
487 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
488 SPUDFSM_LOG(_L("New State : Closing")); |
|
489 |
|
490 iState = &iPdpFsmFactory->iStateClosing; |
|
491 } |
|
492 |
|
493 void CPdpFsm::ChangeStateToStopping(void) |
|
494 { |
|
495 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToStopping"); |
|
496 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
497 SPUDFSM_LOG(_L("New State : Stopping")); |
|
498 |
|
499 iState = &iPdpFsmFactory->iStateStopping; |
|
500 } |
|
501 |
|
502 void CPdpFsm::ChangeStateToCreatingMbms(void) |
|
503 { |
|
504 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToCreatingMbms"); |
|
505 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
506 SPUDFSM_LOG(_L("New State : Creating")); |
|
507 |
|
508 iState = &iPdpFsmFactory->iStateCreatingMbms; |
|
509 } |
|
510 |
|
511 void CPdpFsm::ChangeStateToActivatingMbms(void) |
|
512 { |
|
513 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToActivatingMbms"); |
|
514 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
515 SPUDFSM_LOG(_L("New State : Activating")); |
|
516 |
|
517 iState = &iPdpFsmFactory->iStateActivatingMbms; |
|
518 } |
|
519 |
|
520 void CPdpFsm::ChangeStateToCreatedMbms(void) |
|
521 { |
|
522 SPUDFSMVERBOSE_FNLOG("CPdpFsm::ChangeStateToCreatingMbms"); |
|
523 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
524 SPUDFSM_LOG(_L("New State : Created")); |
|
525 |
|
526 iState = &iPdpFsmFactory->iStateCreatedMbms; |
|
527 } |
|
528 |
|
529 |
|
530 |
|
531 void CPdpFsm::Get(RPacketMbmsContext::TContextConfigMbmsV1& aParam) |
|
532 { |
|
533 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(RPacketMbmsContext::TContextConfigMbmsV1)"); |
|
534 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
535 |
|
536 aParam = iMbms; |
|
537 } |
|
538 |
|
539 |
|
540 void CPdpFsm::Set(const RPacketMbmsContext::TContextConfigMbmsV1& aParam) |
|
541 { |
|
542 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(RPacketMbmsContext::TContextConfigMbmsV1)"); |
|
543 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
544 |
|
545 iMbms = aParam ; |
|
546 } |
|
547 |
|
548 |
|
549 void CPdpFsm::Get(TSessionOperatioInfo& aParam) |
|
550 { |
|
551 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(Session)"); |
|
552 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
553 |
|
554 aParam = iSessionInfo; |
|
555 } |
|
556 |
|
557 |
|
558 void CPdpFsm::Set(const TSessionOperatioInfo& aParam) |
|
559 { |
|
560 SPUDFSMVERBOSE_FNLOG("CPdpFsm::Get(Session)"); |
|
561 SPUDFSMVERBOSE_LOG1(_L("Pdp ID %d"),iPdpId); |
|
562 |
|
563 iSessionInfo = aParam ; |
|
564 } |
|
565 |
|
566 void CPdpFsm::InitialiseContextConfig(TUint32 aConfigRel) |
|
567 { |
|
568 ASSERT(aConfigRel == TPacketDataConfigBase::KConfigGPRS |
|
569 || aConfigRel == TPacketDataConfigBase::KConfigRel99Rel4 |
|
570 || aConfigRel == TPacketDataConfigBase::KConfigRel5); |
|
571 |
|
572 switch(aConfigRel) |
|
573 { |
|
574 case TPacketDataConfigBase::KConfigGPRS: |
|
575 { |
|
576 RPacketContext::TContextConfigGPRS tmp; |
|
577 Mem::Copy(const_cast<TUint8*>(iContextConfig.Ptr()), &tmp, sizeof(tmp)); |
|
578 } |
|
579 break; |
|
580 |
|
581 case TPacketDataConfigBase::KConfigRel99Rel4: |
|
582 { |
|
583 RPacketContext::TContextConfigR99_R4 tmp; |
|
584 Mem::Copy(const_cast<TUint8*>(iContextConfig.Ptr()), &tmp, sizeof(tmp)); |
|
585 } |
|
586 break; |
|
587 |
|
588 case TPacketDataConfigBase::KConfigRel5: |
|
589 { |
|
590 RPacketContext::TContextConfig_R5 tmp; |
|
591 Mem::Copy(const_cast<TUint8*>(iContextConfig.Ptr()), &tmp, sizeof(tmp)); |
|
592 } |
|
593 break; |
|
594 } |
|
595 } |
|
596 |
|
597 |